0010bd5c <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10bd5c: 55 push %ebp 10bd5d: 89 e5 mov %esp,%ebp 10bd5f: 57 push %edi 10bd60: 56 push %esi 10bd61: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10bd64: 8d 7d e8 lea -0x18(%ebp),%edi 10bd67: be 20 f9 11 00 mov $0x11f920,%esi 10bd6c: b9 04 00 00 00 mov $0x4,%ecx 10bd71: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10bd73: 68 40 54 12 00 push $0x125440 10bd78: e8 43 09 00 00 call 10c6c0 <_Objects_Allocate> <== ALWAYS TAKEN 10bd7d: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10bd7f: 83 c4 0c add $0xc,%esp 10bd82: 6a 01 push $0x1 10bd84: 8d 45 e8 lea -0x18(%ebp),%eax 10bd87: 50 push %eax 10bd88: 8d 46 10 lea 0x10(%esi),%eax 10bd8b: 50 push %eax 10bd8c: e8 9f 01 00 00 call 10bf30 <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bd91: 0f b7 56 08 movzwl 0x8(%esi),%edx 10bd95: a1 5c 54 12 00 mov 0x12545c,%eax 10bd9a: 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; 10bd9d: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10bda4: 8b 45 08 mov 0x8(%ebp),%eax 10bda7: 89 30 mov %esi,(%eax) 10bda9: 83 c4 10 add $0x10,%esp } 10bdac: 8d 65 f8 lea -0x8(%ebp),%esp 10bdaf: 5e pop %esi 10bdb0: 5f pop %edi 10bdb1: c9 leave 10bdb2: c3 ret 0010bdd8 <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10bdd8: 55 push %ebp 10bdd9: 89 e5 mov %esp,%ebp 10bddb: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10bdde: 6a 00 push $0x0 10bde0: 6a 00 push $0x0 10bde2: 6a 74 push $0x74 10bde4: ff 75 08 pushl 0x8(%ebp) 10bde7: 6a 02 push $0x2 10bde9: 6a 01 push $0x1 10bdeb: 68 40 54 12 00 push $0x125440 10bdf0: e8 e3 0d 00 00 call 10cbd8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10bdf5: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10bdf8: c9 leave 10bdf9: c3 ret 0010bdb4 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10bdb4: 55 push %ebp 10bdb5: 89 e5 mov %esp,%ebp 10bdb7: 83 ec 14 sub $0x14,%esp 10bdba: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10bdbd: 9c pushf 10bdbe: fa cli 10bdbf: 5a pop %edx _CORE_mutex_Seize( 10bdc0: 52 push %edx 10bdc1: 6a 00 push $0x0 10bdc3: 6a 01 push $0x1 10bdc5: ff 70 08 pushl 0x8(%eax) 10bdc8: 83 c0 10 add $0x10,%eax 10bdcb: 50 push %eax 10bdcc: e8 57 02 00 00 call 10c028 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10bdd1: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10bdd4: c9 leave 10bdd5: c3 ret 0010bdfc <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10bdfc: 55 push %ebp 10bdfd: 89 e5 mov %esp,%ebp 10bdff: 83 ec 0c sub $0xc,%esp 10be02: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10be05: 8b 15 38 53 12 00 mov 0x125338,%edx 10be0b: 42 inc %edx 10be0c: 89 15 38 53 12 00 mov %edx,0x125338 _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10be12: 6a 00 push $0x0 10be14: ff 70 08 pushl 0x8(%eax) 10be17: 83 c0 10 add $0x10,%eax 10be1a: 50 push %eax 10be1b: e8 a8 02 00 00 call 10c0c8 <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be20: 83 c4 10 add $0x10,%esp } 10be23: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be24: e9 8f 15 00 00 jmp 10d3b8 <_Thread_Enable_dispatch> 0010bd44 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10bd44: 55 push %ebp 10bd45: 89 e5 mov %esp,%ebp 10bd47: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10bd4a: ff 75 08 pushl 0x8(%ebp) 10bd4d: 68 98 55 12 00 push $0x125598 10bd52: e8 d5 00 00 00 call 10be2c <_Chain_Append> <== ALWAYS TAKEN 10bd57: 83 c4 10 add $0x10,%esp } 10bd5a: c9 leave 10bd5b: c3 ret 0010bce0 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bce0: 55 push %ebp 10bce1: 89 e5 mov %esp,%ebp 10bce3: 53 push %ebx 10bce4: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bce7: 8b 1d 98 55 12 00 mov 0x125598,%ebx 10bced: 81 fb 9c 55 12 00 cmp $0x12559c,%ebx 10bcf3: 74 10 je 10bd05 <_API_extensions_Run_postdriver+0x25> <== ALWAYS TAKEN 10bcf5: 8d 76 00 lea 0x0(%esi),%esi * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 10bcf8: 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 ) { 10bcfb: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bcfd: 81 fb 9c 55 12 00 cmp $0x12559c,%ebx 10bd03: 75 f3 jne 10bcf8 <_API_extensions_Run_postdriver+0x18> <== ALWAYS TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bd05: 58 pop %eax 10bd06: 5b pop %ebx 10bd07: c9 leave 10bd08: c3 ret 0010bd0c <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bd0c: 55 push %ebp 10bd0d: 89 e5 mov %esp,%ebp 10bd0f: 53 push %ebx 10bd10: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd13: 8b 1d 98 55 12 00 mov 0x125598,%ebx 10bd19: 81 fb 9c 55 12 00 cmp $0x12559c,%ebx 10bd1f: 74 1c je 10bd3d <_API_extensions_Run_postswitch+0x31> <== ALWAYS TAKEN 10bd21: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10bd24: 83 ec 0c sub $0xc,%esp 10bd27: ff 35 f8 53 12 00 pushl 0x1253f8 10bd2d: 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 ) { 10bd30: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd32: 83 c4 10 add $0x10,%esp 10bd35: 81 fb 9c 55 12 00 cmp $0x12559c,%ebx 10bd3b: 75 e7 jne 10bd24 <_API_extensions_Run_postswitch+0x18> <== ALWAYS TAKEN #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bd3d: 8b 5d fc mov -0x4(%ebp),%ebx 10bd40: c9 leave 10bd41: c3 ret 00111ce4 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 111ce4: 55 push %ebp 111ce5: 89 e5 mov %esp,%ebp 111ce7: 56 push %esi 111ce8: 53 push %ebx 111ce9: 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)) ) { 111cec: 31 db xor %ebx,%ebx 111cee: eb 01 jmp 111cf1 <_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++; 111cf0: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 111cf1: 83 ec 0c sub $0xc,%esp 111cf4: 56 push %esi 111cf5: e8 76 ba ff ff call 10d770 <_Thread_queue_Dequeue> 111cfa: 83 c4 10 add $0x10,%esp 111cfd: 85 c0 test %eax,%eax 111cff: 75 ef jne 111cf0 <_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; 111d01: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 111d08: 89 d8 mov %ebx,%eax 111d0a: 8d 65 f8 lea -0x8(%ebp),%esp 111d0d: 5b pop %ebx 111d0e: 5e pop %esi 111d0f: c9 leave 111d10: c3 ret 00111d14 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 111d14: 55 push %ebp 111d15: 89 e5 mov %esp,%ebp 111d17: 57 push %edi 111d18: 56 push %esi 111d19: 53 push %ebx 111d1a: 83 ec 1c sub $0x1c,%esp 111d1d: 8b 45 08 mov 0x8(%ebp),%eax 111d20: 8b 5d 0c mov 0xc(%ebp),%ebx 111d23: 8b 75 14 mov 0x14(%ebp),%esi 111d26: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 111d29: 8b 15 f8 53 12 00 mov 0x1253f8,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 111d2f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 111d36: 9c pushf 111d37: fa cli 111d38: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 111d3b: 8b 48 48 mov 0x48(%eax),%ecx 111d3e: 41 inc %ecx 111d3f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 111d42: 83 78 40 00 cmpl $0x0,0x40(%eax) 111d46: 75 05 jne 111d4d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 111d48: 3b 48 44 cmp 0x44(%eax),%ecx 111d4b: 74 2b je 111d78 <_CORE_barrier_Wait+0x64> 111d4d: 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; 111d54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 111d57: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 111d5a: ff 75 e4 pushl -0x1c(%ebp) 111d5d: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 111d5e: c7 45 10 9c db 10 00 movl $0x10db9c,0x10(%ebp) 111d65: 89 75 0c mov %esi,0xc(%ebp) 111d68: 89 45 08 mov %eax,0x8(%ebp) } 111d6b: 83 c4 1c add $0x1c,%esp 111d6e: 5b pop %ebx 111d6f: 5e pop %esi 111d70: 5f pop %edi 111d71: 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 ); 111d72: e9 15 bb ff ff jmp 10d88c <_Thread_queue_Enqueue_with_handler> 111d77: 90 nop <== NOT EXECUTED _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 111d78: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 111d7f: ff 75 e4 pushl -0x1c(%ebp) 111d82: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 111d83: 89 7d 10 mov %edi,0x10(%ebp) 111d86: 89 5d 0c mov %ebx,0xc(%ebp) 111d89: 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 ); } 111d8c: 83 c4 1c add $0x1c,%esp 111d8f: 5b pop %ebx 111d90: 5e pop %esi 111d91: 5f pop %edi 111d92: 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 ); 111d93: e9 4c ff ff ff jmp 111ce4 <_CORE_barrier_Release> <== ALWAYS TAKEN 001193f0 <_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 ) { 1193f0: 55 push %ebp 1193f1: 89 e5 mov %esp,%ebp 1193f3: 57 push %edi 1193f4: 56 push %esi 1193f5: 53 push %ebx 1193f6: 83 ec 1c sub $0x1c,%esp 1193f9: 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 ) { 1193fc: 8b 45 10 mov 0x10(%ebp),%eax 1193ff: 39 43 4c cmp %eax,0x4c(%ebx) 119402: 72 60 jb 119464 <_CORE_message_queue_Broadcast+0x74> <== ALWAYS TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 119404: 8b 43 48 mov 0x48(%ebx),%eax 119407: 85 c0 test %eax,%eax 119409: 75 45 jne 119450 <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11940b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 119412: eb 18 jmp 11942c <_CORE_message_queue_Broadcast+0x3c> <== ALWAYS TAKEN waitp = &the_thread->Wait; number_broadcasted += 1; 119414: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119417: 8b 42 2c mov 0x2c(%edx),%eax 11941a: 89 c7 mov %eax,%edi 11941c: 8b 75 0c mov 0xc(%ebp),%esi 11941f: 8b 4d 10 mov 0x10(%ebp),%ecx 119422: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 119424: 8b 42 28 mov 0x28(%edx),%eax 119427: 8b 55 10 mov 0x10(%ebp),%edx 11942a: 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))) { 11942c: 83 ec 0c sub $0xc,%esp 11942f: 53 push %ebx 119430: e8 83 23 00 00 call 11b7b8 <_Thread_queue_Dequeue> 119435: 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 = 119437: 83 c4 10 add $0x10,%esp 11943a: 85 c0 test %eax,%eax 11943c: 75 d6 jne 119414 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11943e: 8b 55 e4 mov -0x1c(%ebp),%edx 119441: 8b 45 1c mov 0x1c(%ebp),%eax 119444: 89 10 mov %edx,(%eax) 119446: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119448: 8d 65 f4 lea -0xc(%ebp),%esp 11944b: 5b pop %ebx 11944c: 5e pop %esi 11944d: 5f pop %edi 11944e: c9 leave 11944f: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 119450: 8b 55 1c mov 0x1c(%ebp),%edx 119453: c7 02 00 00 00 00 movl $0x0,(%edx) 119459: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11945b: 8d 65 f4 lea -0xc(%ebp),%esp 11945e: 5b pop %ebx 11945f: 5e pop %esi 119460: 5f pop %edi 119461: c9 leave 119462: c3 ret 119463: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 119464: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119469: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11946c: 5b pop %ebx <== NOT EXECUTED 11946d: 5e pop %esi <== NOT EXECUTED 11946e: 5f pop %edi <== NOT EXECUTED 11946f: c9 leave <== NOT EXECUTED 119470: c3 ret <== NOT EXECUTED 0011766c <_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 ) { 11766c: 55 push %ebp 11766d: 89 e5 mov %esp,%ebp 11766f: 53 push %ebx 117670: 83 ec 08 sub $0x8,%esp 117673: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 117676: ff 75 10 pushl 0x10(%ebp) 117679: ff 75 0c pushl 0xc(%ebp) 11767c: 53 push %ebx 11767d: e8 d2 b1 ff ff call 112854 <_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 ) 117682: 83 c4 10 add $0x10,%esp 117685: 8b 43 48 mov 0x48(%ebx),%eax 117688: 85 c0 test %eax,%eax 11768a: 74 0c je 117698 <_CORE_message_queue_Close+0x2c> (void) _CORE_message_queue_Flush_support( the_message_queue ); 11768c: 83 ec 0c sub $0xc,%esp 11768f: 53 push %ebx 117690: e8 13 00 00 00 call 1176a8 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 117695: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 117698: 8b 43 5c mov 0x5c(%ebx),%eax 11769b: 89 45 08 mov %eax,0x8(%ebp) } 11769e: 8b 5d fc mov -0x4(%ebp),%ebx 1176a1: 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 ); 1176a2: e9 45 bc ff ff jmp 1132ec <_Workspace_Free> 001194b0 <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 1194b0: 55 push %ebp 1194b1: 89 e5 mov %esp,%ebp 1194b3: 83 ec 08 sub $0x8,%esp 1194b6: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 1194b9: 8b 50 48 mov 0x48(%eax),%edx 1194bc: 85 d2 test %edx,%edx 1194be: 75 04 jne 1194c4 <_CORE_message_queue_Flush+0x14> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 1194c0: 31 c0 xor %eax,%eax 1194c2: c9 leave 1194c3: 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 ); 1194c4: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 1194c7: 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 ); 1194c8: e9 03 00 00 00 jmp 1194d0 <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 00114bf4 <_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 ) { 114bf4: 55 push %ebp 114bf5: 89 e5 mov %esp,%ebp 114bf7: 57 push %edi 114bf8: 56 push %esi 114bf9: 53 push %ebx 114bfa: 83 ec 0c sub $0xc,%esp 114bfd: 8b 5d 08 mov 0x8(%ebp),%ebx 114c00: 8b 75 10 mov 0x10(%ebp),%esi 114c03: 8b 45 14 mov 0x14(%ebp),%eax size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 114c06: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114c09: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114c10: 89 43 4c mov %eax,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 114c13: a8 03 test $0x3,%al 114c15: 75 19 jne 114c30 <_CORE_message_queue_Initialize+0x3c> 114c17: 89 c2 mov %eax,%edx /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 114c19: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114c1c: 89 f8 mov %edi,%eax 114c1e: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c21: 39 d0 cmp %edx,%eax 114c23: 73 23 jae 114c48 <_CORE_message_queue_Initialize+0x54> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c25: 31 c0 xor %eax,%eax } 114c27: 8d 65 f4 lea -0xc(%ebp),%esp 114c2a: 5b pop %ebx 114c2b: 5e pop %esi 114c2c: 5f pop %edi 114c2d: c9 leave 114c2e: c3 ret 114c2f: 90 nop <== NOT EXECUTED * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 114c30: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114c33: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114c36: 39 d0 cmp %edx,%eax 114c38: 77 eb ja 114c25 <_CORE_message_queue_Initialize+0x31> <== 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)); 114c3a: 8d 7a 10 lea 0x10(%edx),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 114c3d: 89 f8 mov %edi,%eax 114c3f: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c42: 39 d0 cmp %edx,%eax 114c44: 72 df jb 114c25 <_CORE_message_queue_Initialize+0x31> <== ALWAYS TAKEN 114c46: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114c48: 83 ec 0c sub $0xc,%esp 114c4b: 50 push %eax 114c4c: e8 2f 28 00 00 call 117480 <_Workspace_Allocate> 114c51: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114c54: 83 c4 10 add $0x10,%esp 114c57: 85 c0 test %eax,%eax 114c59: 74 ca je 114c25 <_CORE_message_queue_Initialize+0x31> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114c5b: 57 push %edi 114c5c: 56 push %esi 114c5d: 50 push %eax 114c5e: 8d 43 60 lea 0x60(%ebx),%eax 114c61: 50 push %eax 114c62: e8 f9 42 00 00 call 118f60 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114c67: 8d 43 54 lea 0x54(%ebx),%eax 114c6a: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114c6d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114c74: 8d 43 50 lea 0x50(%ebx),%eax 114c77: 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( 114c7a: 6a 06 push $0x6 114c7c: 68 80 00 00 00 push $0x80 114c81: 8b 45 0c mov 0xc(%ebp),%eax 114c84: 83 38 01 cmpl $0x1,(%eax) 114c87: 0f 94 c0 sete %al 114c8a: 0f b6 c0 movzbl %al,%eax 114c8d: 50 push %eax 114c8e: 53 push %ebx 114c8f: e8 0c 1e 00 00 call 116aa0 <_Thread_queue_Initialize> 114c94: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c96: 83 c4 20 add $0x20,%esp } 114c99: 8d 65 f4 lea -0xc(%ebp),%esp 114c9c: 5b pop %ebx 114c9d: 5e pop %esi 114c9e: 5f pop %edi 114c9f: c9 leave 114ca0: c3 ret 00110020 <_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 ) { 110020: 55 push %ebp 110021: 89 e5 mov %esp,%ebp 110023: 53 push %ebx 110024: 8b 45 08 mov 0x8(%ebp),%eax 110027: 8b 55 0c mov 0xc(%ebp),%edx #endif _CORE_message_queue_Set_message_priority( the_message, submit_type ); #if !defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) _ISR_Disable( level ); 11002a: 9c pushf 11002b: fa cli 11002c: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11002d: ff 40 48 incl 0x48(%eax) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) 110030: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp) 110037: 74 17 je 110050 <_CORE_message_queue_Insert_message+0x30> 110039: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 11003c: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 11003f: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110042: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 110045: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 110047: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 11004a: 53 push %ebx 11004b: 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 } 11004c: 5b pop %ebx 11004d: c9 leave 11004e: c3 ret 11004f: 90 nop <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110050: 8d 48 54 lea 0x54(%eax),%ecx 110053: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 110055: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110058: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 11005b: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 11005d: 89 4a 04 mov %ecx,0x4(%edx) 110060: eb e8 jmp 11004a <_CORE_message_queue_Insert_message+0x2a> <== ALWAYS TAKEN 00114ca4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114ca4: 55 push %ebp 114ca5: 89 e5 mov %esp,%ebp 114ca7: 57 push %edi 114ca8: 56 push %esi 114ca9: 53 push %ebx 114caa: 83 ec 1c sub $0x1c,%esp 114cad: 8b 45 08 mov 0x8(%ebp),%eax 114cb0: 8b 55 0c mov 0xc(%ebp),%edx 114cb3: 89 55 dc mov %edx,-0x24(%ebp) 114cb6: 8b 55 10 mov 0x10(%ebp),%edx 114cb9: 89 55 e4 mov %edx,-0x1c(%ebp) 114cbc: 8b 7d 14 mov 0x14(%ebp),%edi 114cbf: 8b 55 1c mov 0x1c(%ebp),%edx 114cc2: 89 55 d8 mov %edx,-0x28(%ebp) 114cc5: 8a 5d 18 mov 0x18(%ebp),%bl ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114cc8: 8b 0d 78 fa 12 00 mov 0x12fa78,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114cce: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114cd5: 9c pushf 114cd6: fa cli 114cd7: 8f 45 e0 popl -0x20(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114cda: 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; 114cdd: 8d 70 54 lea 0x54(%eax),%esi 114ce0: 39 f2 cmp %esi,%edx 114ce2: 74 44 je 114d28 <_CORE_message_queue_Seize+0x84> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114ce4: 8b 0a mov (%edx),%ecx the_chain->first = new_first; 114ce6: 89 48 50 mov %ecx,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 114ce9: 8d 58 50 lea 0x50(%eax),%ebx 114cec: 89 59 04 mov %ebx,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 114cef: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 114cf2: ff 75 e0 pushl -0x20(%ebp) 114cf5: 9d popf *size_p = the_message->Contents.size; 114cf6: 8b 4a 08 mov 0x8(%edx),%ecx 114cf9: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 114cfb: 8b 0d 78 fa 12 00 mov 0x12fa78,%ecx 114d01: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d08: 8d 72 0c lea 0xc(%edx),%esi 114d0b: 8b 0f mov (%edi),%ecx 114d0d: 8b 7d e4 mov -0x1c(%ebp),%edi 114d10: 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 ); 114d12: 89 55 0c mov %edx,0xc(%ebp) 114d15: 83 c0 60 add $0x60,%eax 114d18: 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 ); } 114d1b: 83 c4 1c add $0x1c,%esp 114d1e: 5b pop %ebx 114d1f: 5e pop %esi 114d20: 5f pop %edi 114d21: c9 leave 114d22: e9 4d fe ff ff jmp 114b74 <_Chain_Append> <== ALWAYS TAKEN 114d27: 90 nop <== NOT EXECUTED return; } #endif } if ( !wait ) { 114d28: 84 db test %bl,%bl 114d2a: 75 14 jne 114d40 <_CORE_message_queue_Seize+0x9c> _ISR_Enable( level ); 114d2c: ff 75 e0 pushl -0x20(%ebp) 114d2f: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114d30: 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 ); } 114d37: 83 c4 1c add $0x1c,%esp 114d3a: 5b pop %ebx 114d3b: 5e pop %esi 114d3c: 5f pop %edi 114d3d: c9 leave 114d3e: c3 ret 114d3f: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 114d40: 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; 114d47: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 114d4a: 8b 55 dc mov -0x24(%ebp),%edx 114d4d: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114d50: 8b 55 e4 mov -0x1c(%ebp),%edx 114d53: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114d56: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114d59: ff 75 e0 pushl -0x20(%ebp) 114d5c: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114d5d: c7 45 10 50 6b 11 00 movl $0x116b50,0x10(%ebp) 114d64: 8b 55 d8 mov -0x28(%ebp),%edx 114d67: 89 55 0c mov %edx,0xc(%ebp) 114d6a: 89 45 08 mov %eax,0x8(%ebp) } 114d6d: 83 c4 1c add $0x1c,%esp 114d70: 5b pop %ebx 114d71: 5e pop %esi 114d72: 5f pop %edi 114d73: 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 ); 114d74: e9 c7 1a 00 00 jmp 116840 <_Thread_queue_Enqueue_with_handler> 0010be74 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10be74: 55 push %ebp 10be75: 89 e5 mov %esp,%ebp 10be77: 57 push %edi 10be78: 56 push %esi 10be79: 53 push %ebx 10be7a: 83 ec 0c sub $0xc,%esp 10be7d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be80: 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 ) { 10be83: 8b 45 10 mov 0x10(%ebp),%eax 10be86: 39 43 4c cmp %eax,0x4c(%ebx) 10be89: 72 51 jb 10bedc <_CORE_message_queue_Submit+0x68> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10be8b: 8b 43 48 mov 0x48(%ebx),%eax 10be8e: 85 c0 test %eax,%eax 10be90: 74 5a je 10beec <_CORE_message_queue_Submit+0x78> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10be92: 39 43 44 cmp %eax,0x44(%ebx) 10be95: 77 0d ja 10bea4 <_CORE_message_queue_Submit+0x30> 10be97: b8 02 00 00 00 mov $0x2,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10be9c: 8d 65 f4 lea -0xc(%ebp),%esp 10be9f: 5b pop %ebx 10bea0: 5e pop %esi 10bea1: 5f pop %edi 10bea2: c9 leave 10bea3: c3 ret RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10bea4: 83 ec 0c sub $0xc,%esp 10bea7: 8d 43 60 lea 0x60(%ebx),%eax 10beaa: 50 push %eax 10beab: e8 a0 ff ff ff call 10be50 <_Chain_Get> <== ALWAYS TAKEN 10beb0: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10beb2: 8d 40 0c lea 0xc(%eax),%eax 10beb5: 89 c7 mov %eax,%edi 10beb7: 8b 4d 10 mov 0x10(%ebp),%ecx 10beba: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10bebc: 8b 4d 10 mov 0x10(%ebp),%ecx 10bebf: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10bec2: 83 c4 0c add $0xc,%esp 10bec5: ff 75 1c pushl 0x1c(%ebp) 10bec8: 52 push %edx 10bec9: 53 push %ebx 10beca: e8 51 41 00 00 call 110020 <_CORE_message_queue_Insert_message> 10becf: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10bed1: 83 c4 10 add $0x10,%esp _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bed4: 8d 65 f4 lea -0xc(%ebp),%esp 10bed7: 5b pop %ebx 10bed8: 5e pop %esi 10bed9: 5f pop %edi 10beda: c9 leave 10bedb: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bedc: b8 01 00 00 00 mov $0x1,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bee1: 8d 65 f4 lea -0xc(%ebp),%esp 10bee4: 5b pop %ebx 10bee5: 5e pop %esi 10bee6: 5f pop %edi 10bee7: c9 leave 10bee8: c3 ret 10bee9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 10beec: 83 ec 0c sub $0xc,%esp 10beef: 53 push %ebx 10bef0: e8 7b 18 00 00 call 10d770 <_Thread_queue_Dequeue> 10bef5: 89 c2 mov %eax,%edx if ( the_thread ) { 10bef7: 83 c4 10 add $0x10,%esp 10befa: 85 c0 test %eax,%eax 10befc: 74 1e je 10bf1c <_CORE_message_queue_Submit+0xa8> 10befe: 8b 40 2c mov 0x2c(%eax),%eax 10bf01: 89 c7 mov %eax,%edi 10bf03: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf06: 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; 10bf08: 8b 42 28 mov 0x28(%edx),%eax 10bf0b: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf0e: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bf10: 8b 45 1c mov 0x1c(%ebp),%eax 10bf13: 89 42 24 mov %eax,0x24(%edx) 10bf16: 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; 10bf18: eb 82 jmp 10be9c <_CORE_message_queue_Submit+0x28> <== ALWAYS TAKEN 10bf1a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 10bf1c: 8b 43 48 mov 0x48(%ebx),%eax 10bf1f: e9 6e ff ff ff jmp 10be92 <_CORE_message_queue_Submit+0x1e> <== ALWAYS TAKEN 0010bf30 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10bf30: 55 push %ebp 10bf31: 89 e5 mov %esp,%ebp 10bf33: 57 push %edi 10bf34: 56 push %esi 10bf35: 53 push %ebx 10bf36: 83 ec 0c sub $0xc,%esp 10bf39: 8b 45 08 mov 0x8(%ebp),%eax 10bf3c: 8b 5d 0c mov 0xc(%ebp),%ebx 10bf3f: 8b 55 10 mov 0x10(%ebp),%edx /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 10bf42: 8d 78 40 lea 0x40(%eax),%edi 10bf45: b9 04 00 00 00 mov $0x4,%ecx 10bf4a: 89 de mov %ebx,%esi 10bf4c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10bf4e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10bf51: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10bf58: 85 d2 test %edx,%edx 10bf5a: 75 30 jne 10bf8c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10bf5c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10bf63: 8b 15 f8 53 12 00 mov 0x1253f8,%edx 10bf69: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10bf6c: 8b 4a 08 mov 0x8(%edx),%ecx 10bf6f: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bf72: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10bf75: 83 f9 02 cmp $0x2,%ecx 10bf78: 74 05 je 10bf7f <_CORE_mutex_Initialize+0x4f> 10bf7a: 83 f9 03 cmp $0x3,%ecx 10bf7d: 75 22 jne 10bfa1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10bf7f: 8b 4a 14 mov 0x14(%edx),%ecx 10bf82: 3b 48 4c cmp 0x4c(%eax),%ecx 10bf85: 72 41 jb 10bfc8 <_CORE_mutex_Initialize+0x98> _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 10bf87: ff 42 1c incl 0x1c(%edx) 10bf8a: eb 15 jmp 10bfa1 <_CORE_mutex_Initialize+0x71> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10bf8c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10bf93: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10bf9a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10bfa1: 6a 05 push $0x5 10bfa3: 68 00 04 00 00 push $0x400 10bfa8: 31 d2 xor %edx,%edx 10bfaa: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10bfae: 0f 95 c2 setne %dl 10bfb1: 52 push %edx 10bfb2: 50 push %eax 10bfb3: e8 34 1b 00 00 call 10daec <_Thread_queue_Initialize> 10bfb8: 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; 10bfba: 83 c4 10 add $0x10,%esp } 10bfbd: 8d 65 f4 lea -0xc(%ebp),%esp 10bfc0: 5b pop %ebx 10bfc1: 5e pop %esi 10bfc2: 5f pop %edi 10bfc3: c9 leave 10bfc4: c3 ret 10bfc5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10bfc8: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10bfcd: 8d 65 f4 lea -0xc(%ebp),%esp 10bfd0: 5b pop %ebx 10bfd1: 5e pop %esi 10bfd2: 5f pop %edi 10bfd3: c9 leave 10bfd4: c3 ret 0010c028 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c028: 55 push %ebp 10c029: 89 e5 mov %esp,%ebp 10c02b: 53 push %ebx 10c02c: 83 ec 14 sub $0x14,%esp 10c02f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c032: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c035: a1 38 53 12 00 mov 0x125338,%eax 10c03a: 85 c0 test %eax,%eax 10c03c: 74 04 je 10c042 <_CORE_mutex_Seize+0x1a> 10c03e: 84 d2 test %dl,%dl 10c040: 75 36 jne 10c078 <_CORE_mutex_Seize+0x50> <== NEVER TAKEN 10c042: 83 ec 08 sub $0x8,%esp 10c045: 8d 45 18 lea 0x18(%ebp),%eax 10c048: 50 push %eax 10c049: 53 push %ebx 10c04a: 88 55 f4 mov %dl,-0xc(%ebp) 10c04d: e8 12 40 00 00 call 110064 <_CORE_mutex_Seize_interrupt_trylock> 10c052: 83 c4 10 add $0x10,%esp 10c055: 85 c0 test %eax,%eax 10c057: 8a 55 f4 mov -0xc(%ebp),%dl 10c05a: 74 14 je 10c070 <_CORE_mutex_Seize+0x48> 10c05c: 84 d2 test %dl,%dl 10c05e: 75 30 jne 10c090 <_CORE_mutex_Seize+0x68> 10c060: ff 75 18 pushl 0x18(%ebp) 10c063: 9d popf 10c064: a1 f8 53 12 00 mov 0x1253f8,%eax 10c069: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c070: 8b 5d fc mov -0x4(%ebp),%ebx 10c073: c9 leave 10c074: c3 ret 10c075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c078: 83 3d 00 55 12 00 01 cmpl $0x1,0x125500 10c07f: 76 c1 jbe 10c042 <_CORE_mutex_Seize+0x1a> 10c081: 53 push %ebx 10c082: 6a 13 push $0x13 10c084: 6a 00 push $0x0 10c086: 6a 00 push $0x0 10c088: e8 9b 05 00 00 call 10c628 <_Internal_error_Occurred> <== ALWAYS TAKEN 10c08d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c090: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c097: a1 f8 53 12 00 mov 0x1253f8,%eax 10c09c: 89 58 44 mov %ebx,0x44(%eax) 10c09f: 8b 55 0c mov 0xc(%ebp),%edx 10c0a2: 89 50 20 mov %edx,0x20(%eax) 10c0a5: a1 38 53 12 00 mov 0x125338,%eax 10c0aa: 40 inc %eax 10c0ab: a3 38 53 12 00 mov %eax,0x125338 10c0b0: ff 75 18 pushl 0x18(%ebp) 10c0b3: 9d popf 10c0b4: 83 ec 08 sub $0x8,%esp 10c0b7: ff 75 14 pushl 0x14(%ebp) 10c0ba: 53 push %ebx 10c0bb: e8 18 ff ff ff call 10bfd8 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10c0c0: 83 c4 10 add $0x10,%esp } 10c0c3: 8b 5d fc mov -0x4(%ebp),%ebx 10c0c6: c9 leave 10c0c7: c3 ret 0010bfd8 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10bfd8: 55 push %ebp 10bfd9: 89 e5 mov %esp,%ebp 10bfdb: 56 push %esi 10bfdc: 53 push %ebx 10bfdd: 8b 5d 08 mov 0x8(%ebp),%ebx 10bfe0: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10bfe3: a1 f8 53 12 00 mov 0x1253f8,%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10bfe8: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10bfec: 74 1e je 10c00c <_CORE_mutex_Seize_interrupt_blocking+0x34> false ); } } the_mutex->blocked_count++; 10bfee: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10bff1: 50 push %eax 10bff2: 68 9c db 10 00 push $0x10db9c 10bff7: 56 push %esi 10bff8: 53 push %ebx 10bff9: e8 8e 18 00 00 call 10d88c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10bffe: 83 c4 10 add $0x10,%esp } 10c001: 8d 65 f8 lea -0x8(%ebp),%esp 10c004: 5b pop %ebx 10c005: 5e pop %esi 10c006: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10c007: e9 ac 13 00 00 jmp 10d3b8 <_Thread_Enable_dispatch> { Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { 10c00c: 8b 53 5c mov 0x5c(%ebx),%edx 10c00f: 8b 40 14 mov 0x14(%eax),%eax 10c012: 39 42 14 cmp %eax,0x14(%edx) 10c015: 76 d7 jbe 10bfee <_CORE_mutex_Seize_interrupt_blocking+0x16> _Thread_Change_priority( 10c017: 51 push %ecx 10c018: 6a 00 push $0x0 10c01a: 50 push %eax 10c01b: 52 push %edx 10c01c: e8 af 0e 00 00 call 10ced0 <_Thread_Change_priority> 10c021: 83 c4 10 add $0x10,%esp 10c024: eb c8 jmp 10bfee <_CORE_mutex_Seize_interrupt_blocking+0x16> <== ALWAYS TAKEN 00110064 <_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 ) { 110064: 55 push %ebp 110065: 89 e5 mov %esp,%ebp 110067: 56 push %esi 110068: 53 push %ebx 110069: 8b 45 08 mov 0x8(%ebp),%eax 11006c: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 11006f: 8b 15 f8 53 12 00 mov 0x1253f8,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110075: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 11007c: 8b 58 50 mov 0x50(%eax),%ebx 11007f: 85 db test %ebx,%ebx 110081: 74 31 je 1100b4 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110083: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11008a: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 11008d: 8b 5a 08 mov 0x8(%edx),%ebx 110090: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110093: 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; 11009a: 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 ) || 11009d: 83 fb 02 cmp $0x2,%ebx 1100a0: 74 26 je 1100c8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 1100a2: 83 fb 03 cmp $0x3,%ebx 1100a5: 74 3d je 1100e4 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 1100a7: ff 31 pushl (%ecx) 1100a9: 9d popf 1100aa: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 1100ac: 8d 65 f8 lea -0x8(%ebp),%esp 1100af: 5b pop %ebx 1100b0: 5e pop %esi 1100b1: c9 leave 1100b2: c3 ret 1100b3: 90 nop <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 1100b4: 3b 50 5c cmp 0x5c(%eax),%edx 1100b7: 74 17 je 1100d0 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 1100b9: b8 01 00 00 00 mov $0x1,%eax 1100be: 8d 65 f8 lea -0x8(%ebp),%esp 1100c1: 5b pop %ebx 1100c2: 5e pop %esi 1100c3: c9 leave 1100c4: c3 ret 1100c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 1100c8: ff 42 1c incl 0x1c(%edx) 1100cb: eb da jmp 1100a7 <_CORE_mutex_Seize_interrupt_trylock+0x43> <== ALWAYS TAKEN 1100cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 1100d0: 8b 58 40 mov 0x40(%eax),%ebx 1100d3: 85 db test %ebx,%ebx 1100d5: 75 45 jne 11011c <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 1100d7: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 1100da: ff 31 pushl (%ecx) 1100dc: 9d popf 1100dd: 31 c0 xor %eax,%eax 1100df: eb dd jmp 1100be <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 1100e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 1100e4: 8b 5a 1c mov 0x1c(%edx),%ebx 1100e7: 8d 73 01 lea 0x1(%ebx),%esi 1100ea: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 1100ed: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 1100f0: 39 70 4c cmp %esi,0x4c(%eax) 1100f3: 74 6b je 110160 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1100f5: 72 39 jb 110130 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1100f7: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1100fe: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110105: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 11010c: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 11010f: ff 31 pushl (%ecx) 110111: 9d popf 110112: 31 c0 xor %eax,%eax 110114: 8d 65 f8 lea -0x8(%ebp),%esp 110117: 5b pop %ebx 110118: 5e pop %esi 110119: c9 leave 11011a: c3 ret 11011b: 90 nop <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 11011c: 4b dec %ebx 11011d: 75 9a jne 1100b9 <_CORE_mutex_Seize_interrupt_trylock+0x55> <== NEVER TAKEN case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 11011f: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) <== NOT EXECUTED _ISR_Enable( *level_p ); 110126: ff 31 pushl (%ecx) <== NOT EXECUTED 110128: 9d popf <== NOT EXECUTED 110129: 31 c0 xor %eax,%eax <== NOT EXECUTED 11012b: eb 91 jmp 1100be <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== NOT EXECUTED 11012d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110130: 8b 15 38 53 12 00 mov 0x125338,%edx 110136: 42 inc %edx 110137: 89 15 38 53 12 00 mov %edx,0x125338 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 11013d: ff 31 pushl (%ecx) 11013f: 9d popf _Thread_Change_priority( 110140: 52 push %edx 110141: 6a 00 push $0x0 110143: ff 70 4c pushl 0x4c(%eax) 110146: ff 70 5c pushl 0x5c(%eax) 110149: e8 82 cd ff ff call 10ced0 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 11014e: e8 65 d2 ff ff call 10d3b8 <_Thread_Enable_dispatch> 110153: 31 c0 xor %eax,%eax 110155: 83 c4 10 add $0x10,%esp 110158: e9 61 ff ff ff jmp 1100be <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 11015d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p ); 110160: ff 31 pushl (%ecx) 110162: 9d popf 110163: 31 c0 xor %eax,%eax 110165: e9 54 ff ff ff jmp 1100be <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 0010c0c8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c0c8: 55 push %ebp 10c0c9: 89 e5 mov %esp,%ebp 10c0cb: 53 push %ebx 10c0cc: 83 ec 04 sub $0x4,%esp 10c0cf: 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; 10c0d2: 8b 43 5c mov 0x5c(%ebx),%eax * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 10c0d5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c0d9: 74 15 je 10c0f0 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c0db: 3b 05 f8 53 12 00 cmp 0x1253f8,%eax 10c0e1: 74 0d je 10c0f0 <_CORE_mutex_Surrender+0x28> 10c0e3: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c0e8: 8b 5d fc mov -0x4(%ebp),%ebx 10c0eb: c9 leave 10c0ec: c3 ret 10c0ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 10c0f0: 8b 53 54 mov 0x54(%ebx),%edx 10c0f3: 85 d2 test %edx,%edx 10c0f5: 74 65 je 10c15c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c0f7: 4a dec %edx 10c0f8: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c0fb: 85 d2 test %edx,%edx 10c0fd: 75 5d jne 10c15c <_CORE_mutex_Surrender+0x94> 10c0ff: 8b 53 48 mov 0x48(%ebx),%edx /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c102: 83 fa 02 cmp $0x2,%edx 10c105: 0f 84 99 00 00 00 je 10c1a4 <_CORE_mutex_Surrender+0xdc> 10c10b: 83 fa 03 cmp $0x3,%edx 10c10e: 0f 84 90 00 00 00 je 10c1a4 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c114: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c11b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c122: 83 fa 02 cmp $0x2,%edx 10c125: 74 5d je 10c184 <_CORE_mutex_Surrender+0xbc> 10c127: 83 fa 03 cmp $0x3,%edx 10c12a: 74 58 je 10c184 <_CORE_mutex_Surrender+0xbc> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c12c: 83 ec 0c sub $0xc,%esp 10c12f: 53 push %ebx 10c130: e8 3b 16 00 00 call 10d770 <_Thread_queue_Dequeue> 10c135: 83 c4 10 add $0x10,%esp 10c138: 85 c0 test %eax,%eax 10c13a: 74 7c je 10c1b8 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c13c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c13f: 8b 50 08 mov 0x8(%eax),%edx 10c142: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c145: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c14c: 8b 53 48 mov 0x48(%ebx),%edx 10c14f: 83 fa 02 cmp $0x2,%edx 10c152: 74 58 je 10c1ac <_CORE_mutex_Surrender+0xe4> 10c154: 83 fa 03 cmp $0x3,%edx 10c157: 74 0b je 10c164 <_CORE_mutex_Surrender+0x9c> 10c159: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c15c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c15e: 8b 5d fc mov -0x4(%ebp),%ebx 10c161: c9 leave 10c162: c3 ret 10c163: 90 nop <== NOT EXECUTED 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++; 10c164: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c167: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c16a: 3b 50 14 cmp 0x14(%eax),%edx 10c16d: 73 ed jae 10c15c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c16f: 51 push %ecx 10c170: 6a 00 push $0x0 10c172: 52 push %edx 10c173: 50 push %eax 10c174: e8 57 0d 00 00 call 10ced0 <_Thread_Change_priority> 10c179: 31 c0 xor %eax,%eax 10c17b: 83 c4 10 add $0x10,%esp 10c17e: e9 65 ff ff ff jmp 10c0e8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c183: 90 nop <== NOT EXECUTED _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 && 10c184: 8b 50 1c mov 0x1c(%eax),%edx 10c187: 85 d2 test %edx,%edx 10c189: 75 a1 jne 10c12c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c18b: 8b 50 18 mov 0x18(%eax),%edx 10c18e: 3b 50 14 cmp 0x14(%eax),%edx 10c191: 74 99 je 10c12c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c193: 51 push %ecx 10c194: 6a 01 push $0x1 10c196: 52 push %edx 10c197: 50 push %eax 10c198: e8 33 0d 00 00 call 10ced0 <_Thread_Change_priority> <== ALWAYS TAKEN 10c19d: 83 c4 10 add $0x10,%esp 10c1a0: eb 8a jmp 10c12c <_CORE_mutex_Surrender+0x64> <== ALWAYS TAKEN 10c1a2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c1a4: ff 48 1c decl 0x1c(%eax) 10c1a7: e9 68 ff ff ff jmp 10c114 <_CORE_mutex_Surrender+0x4c> <== 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++; 10c1ac: ff 40 1c incl 0x1c(%eax) 10c1af: 31 c0 xor %eax,%eax break; 10c1b1: e9 32 ff ff ff jmp 10c0e8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c1b6: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c1b8: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c1bf: 31 c0 xor %eax,%eax 10c1c1: e9 22 ff ff ff jmp 10c0e8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 0010c214 <_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 ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 53 push %ebx 10c218: 83 ec 10 sub $0x10,%esp 10c21b: 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)) ) { 10c21e: 53 push %ebx 10c21f: e8 4c 15 00 00 call 10d770 <_Thread_queue_Dequeue> 10c224: 83 c4 10 add $0x10,%esp 10c227: 85 c0 test %eax,%eax 10c229: 74 09 je 10c234 <_CORE_semaphore_Surrender+0x20> 10c22b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c22d: 8b 5d fc mov -0x4(%ebp),%ebx 10c230: c9 leave 10c231: c3 ret 10c232: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10c234: 9c pushf 10c235: fa cli 10c236: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c237: 8b 43 48 mov 0x48(%ebx),%eax 10c23a: 3b 43 40 cmp 0x40(%ebx),%eax 10c23d: 72 0d jb 10c24c <_CORE_semaphore_Surrender+0x38> <== NEVER TAKEN 10c23f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c244: 52 push %edx 10c245: 9d popf } return status; } 10c246: 8b 5d fc mov -0x4(%ebp),%ebx 10c249: c9 leave 10c24a: c3 ret 10c24b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c24c: 40 inc %eax 10c24d: 89 43 48 mov %eax,0x48(%ebx) 10c250: 31 c0 xor %eax,%eax 10c252: eb f0 jmp 10c244 <_CORE_semaphore_Surrender+0x30> <== ALWAYS TAKEN 0010be50 <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10be50: 55 push %ebp 10be51: 89 e5 mov %esp,%ebp 10be53: 53 push %ebx 10be54: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10be57: 9c pushf 10be58: fa cli 10be59: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10be5a: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10be5c: 8d 4a 04 lea 0x4(%edx),%ecx 10be5f: 39 c8 cmp %ecx,%eax 10be61: 74 0d je 10be70 <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10be63: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10be65: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10be67: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10be6a: 53 push %ebx 10be6b: 9d popf return return_node; } 10be6c: 5b pop %ebx 10be6d: c9 leave 10be6e: c3 ret 10be6f: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10be70: 31 c0 xor %eax,%eax 10be72: eb f6 jmp 10be6a <_Chain_Get+0x1a> <== ALWAYS TAKEN 0010ffe0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 10ffe0: 55 push %ebp 10ffe1: 89 e5 mov %esp,%ebp 10ffe3: 57 push %edi 10ffe4: 56 push %esi 10ffe5: 53 push %ebx 10ffe6: 8b 7d 08 mov 0x8(%ebp),%edi 10ffe9: 8b 4d 10 mov 0x10(%ebp),%ecx 10ffec: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10ffef: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 10fff1: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 10fff8: 85 c9 test %ecx,%ecx 10fffa: 74 17 je 110013 <_Chain_Initialize+0x33> <== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 10fffc: 8b 45 0c mov 0xc(%ebp),%eax 10ffff: eb 05 jmp 110006 <_Chain_Initialize+0x26> <== ALWAYS TAKEN 110001: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 110004: 89 d8 mov %ebx,%eax current->next = next; 110006: 89 02 mov %eax,(%edx) next->previous = current; 110008: 89 50 04 mov %edx,0x4(%eax) 11000b: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 11000e: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 110010: 49 dec %ecx 110011: 75 f1 jne 110004 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 110013: 8d 47 04 lea 0x4(%edi),%eax 110016: 89 02 mov %eax,(%edx) the_chain->last = current; 110018: 89 57 08 mov %edx,0x8(%edi) } 11001b: 5b pop %ebx 11001c: 5e pop %esi 11001d: 5f pop %edi 11001e: c9 leave 11001f: c3 ret 0010af24 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10af24: 55 push %ebp 10af25: 89 e5 mov %esp,%ebp 10af27: 57 push %edi 10af28: 56 push %esi 10af29: 53 push %ebx 10af2a: 83 ec 2c sub $0x2c,%esp 10af2d: 8b 45 08 mov 0x8(%ebp),%eax 10af30: 8b 4d 0c mov 0xc(%ebp),%ecx 10af33: 8b 55 10 mov 0x10(%ebp),%edx 10af36: 89 55 dc mov %edx,-0x24(%ebp) 10af39: 8b 7d 14 mov 0x14(%ebp),%edi rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10af3c: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10af42: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10af49: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi _ISR_Disable( level ); 10af4f: 9c pushf 10af50: fa cli 10af51: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10af54: 8b 16 mov (%esi),%edx 10af56: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10af59: 21 c2 and %eax,%edx 10af5b: 89 55 e4 mov %edx,-0x1c(%ebp) 10af5e: 74 0d je 10af6d <_Event_Seize+0x49> 10af60: 39 d0 cmp %edx,%eax 10af62: 0f 84 84 00 00 00 je 10afec <_Event_Seize+0xc8> 10af68: f6 c1 02 test $0x2,%cl 10af6b: 75 7f jne 10afec <_Event_Seize+0xc8> <== NEVER TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10af6d: f6 c1 01 test $0x1,%cl 10af70: 75 62 jne 10afd4 <_Event_Seize+0xb0> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10af72: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10af75: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10af78: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10af7b: c7 05 ec 55 12 00 01 movl $0x1,0x1255ec 10af82: 00 00 00 _ISR_Enable( level ); 10af85: ff 75 e0 pushl -0x20(%ebp) 10af88: 9d popf if ( ticks ) { 10af89: 8b 45 dc mov -0x24(%ebp),%eax 10af8c: 85 c0 test %eax,%eax 10af8e: 0f 85 80 00 00 00 jne 10b014 <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10af94: 83 ec 08 sub $0x8,%esp 10af97: 68 00 01 00 00 push $0x100 10af9c: 53 push %ebx 10af9d: e8 9e 2c 00 00 call 10dc40 <_Thread_Set_state> _ISR_Disable( level ); 10afa2: 9c pushf 10afa3: fa cli 10afa4: 5a pop %edx sync_state = _Event_Sync_state; 10afa5: a1 ec 55 12 00 mov 0x1255ec,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10afaa: c7 05 ec 55 12 00 00 movl $0x0,0x1255ec 10afb1: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10afb4: 83 c4 10 add $0x10,%esp 10afb7: 83 f8 01 cmp $0x1,%eax 10afba: 74 4c je 10b008 <_Event_Seize+0xe4> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10afbc: 89 55 10 mov %edx,0x10(%ebp) 10afbf: 89 5d 0c mov %ebx,0xc(%ebp) 10afc2: 89 45 08 mov %eax,0x8(%ebp) } 10afc5: 8d 65 f4 lea -0xc(%ebp),%esp 10afc8: 5b pop %ebx 10afc9: 5e pop %esi 10afca: 5f pop %edi 10afcb: 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 ); 10afcc: e9 b3 1e 00 00 jmp 10ce84 <_Thread_blocking_operation_Cancel> 10afd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10afd4: ff 75 e0 pushl -0x20(%ebp) 10afd7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10afd8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10afdf: 8b 55 e4 mov -0x1c(%ebp),%edx 10afe2: 89 17 mov %edx,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10afe4: 8d 65 f4 lea -0xc(%ebp),%esp 10afe7: 5b pop %ebx 10afe8: 5e pop %esi 10afe9: 5f pop %edi 10afea: c9 leave 10afeb: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10afec: 8b 45 e4 mov -0x1c(%ebp),%eax 10afef: f7 d0 not %eax 10aff1: 23 45 d4 and -0x2c(%ebp),%eax 10aff4: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10aff6: ff 75 e0 pushl -0x20(%ebp) 10aff9: 9d popf *event_out = seized_events; 10affa: 8b 45 e4 mov -0x1c(%ebp),%eax 10affd: 89 07 mov %eax,(%edi) * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10afff: 8d 65 f4 lea -0xc(%ebp),%esp 10b002: 5b pop %ebx 10b003: 5e pop %esi 10b004: 5f pop %edi 10b005: c9 leave 10b006: c3 ret 10b007: 90 nop <== NOT EXECUTED _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 10b008: 52 push %edx 10b009: 9d popf * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); } 10b00a: 8d 65 f4 lea -0xc(%ebp),%esp 10b00d: 5b pop %ebx 10b00e: 5e pop %esi 10b00f: 5f pop %edi 10b010: c9 leave 10b011: c3 ret 10b012: 66 90 xchg %ax,%ax <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b014: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b017: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b01e: c7 43 64 c8 b1 10 00 movl $0x10b1c8,0x64(%ebx) the_watchdog->id = id; 10b025: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b028: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b02f: 8b 45 dc mov -0x24(%ebp),%eax 10b032: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b035: 83 ec 08 sub $0x8,%esp 10b038: 8d 43 48 lea 0x48(%ebx),%eax 10b03b: 50 push %eax 10b03c: 68 18 54 12 00 push $0x125418 10b041: e8 4a 32 00 00 call 10e290 <_Watchdog_Insert> 10b046: 83 c4 10 add $0x10,%esp 10b049: e9 46 ff ff ff jmp 10af94 <_Event_Seize+0x70> <== ALWAYS TAKEN 0010b0a4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b0a4: 55 push %ebp 10b0a5: 89 e5 mov %esp,%ebp 10b0a7: 57 push %edi 10b0a8: 56 push %esi 10b0a9: 53 push %ebx 10b0aa: 83 ec 1c sub $0x1c,%esp 10b0ad: 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 ]; 10b0b0: 8b 8b f0 00 00 00 mov 0xf0(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b0b6: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b0b9: 9c pushf 10b0ba: fa cli 10b0bb: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b0be: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b0c0: 8b 43 24 mov 0x24(%ebx),%eax seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10b0c3: 89 c7 mov %eax,%edi 10b0c5: 21 d7 and %edx,%edi 10b0c7: 89 7d e0 mov %edi,-0x20(%ebp) 10b0ca: 74 74 je 10b140 <_Event_Surrender+0x9c> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b0cc: 8b 3d d4 53 12 00 mov 0x1253d4,%edi 10b0d2: 85 ff test %edi,%edi 10b0d4: 74 0c je 10b0e2 <_Event_Surrender+0x3e> 10b0d6: 3b 1d f8 53 12 00 cmp 0x1253f8,%ebx 10b0dc: 0f 84 96 00 00 00 je 10b178 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b0e2: f6 43 11 01 testb $0x1,0x11(%ebx) 10b0e6: 74 4c je 10b134 <_Event_Surrender+0x90> <== ALWAYS TAKEN if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b0e8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b0eb: 74 05 je 10b0f2 <_Event_Surrender+0x4e> 10b0ed: 83 e6 02 and $0x2,%esi 10b0f0: 74 42 je 10b134 <_Event_Surrender+0x90> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b0f2: 8b 45 e0 mov -0x20(%ebp),%eax 10b0f5: f7 d0 not %eax 10b0f7: 21 d0 and %edx,%eax 10b0f9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b0fb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b102: 8b 43 28 mov 0x28(%ebx),%eax 10b105: 8b 7d e0 mov -0x20(%ebp),%edi 10b108: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b10a: ff 75 e4 pushl -0x1c(%ebp) 10b10d: 9d popf 10b10e: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b10f: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b113: 74 37 je 10b14c <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b115: ff 75 e4 pushl -0x1c(%ebp) 10b118: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b119: 83 ec 08 sub $0x8,%esp 10b11c: 68 f8 ff 03 10 push $0x1003fff8 10b121: 53 push %ebx 10b122: e8 e9 1e 00 00 call 10d010 <_Thread_Clear_state> 10b127: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b12a: 8d 65 f4 lea -0xc(%ebp),%esp 10b12d: 5b pop %ebx 10b12e: 5e pop %esi 10b12f: 5f pop %edi 10b130: c9 leave 10b131: c3 ret 10b132: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b134: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10b137: 9d popf <== NOT EXECUTED } 10b138: 8d 65 f4 lea -0xc(%ebp),%esp 10b13b: 5b pop %ebx 10b13c: 5e pop %esi 10b13d: 5f pop %edi 10b13e: c9 leave 10b13f: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b140: ff 75 e4 pushl -0x1c(%ebp) 10b143: 9d popf } return; } } _ISR_Enable( level ); } 10b144: 8d 65 f4 lea -0xc(%ebp),%esp 10b147: 5b pop %ebx 10b148: 5e pop %esi 10b149: 5f pop %edi 10b14a: c9 leave 10b14b: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b14c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10b153: ff 75 e4 pushl -0x1c(%ebp) 10b156: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b157: 83 ec 0c sub $0xc,%esp 10b15a: 8d 43 48 lea 0x48(%ebx),%eax 10b15d: 50 push %eax 10b15e: e8 65 32 00 00 call 10e3c8 <_Watchdog_Remove> 10b163: 58 pop %eax 10b164: 5a pop %edx 10b165: 68 f8 ff 03 10 push $0x1003fff8 10b16a: 53 push %ebx 10b16b: e8 a0 1e 00 00 call 10d010 <_Thread_Clear_state> 10b170: 83 c4 10 add $0x10,%esp 10b173: eb c3 jmp 10b138 <_Event_Surrender+0x94> <== ALWAYS TAKEN 10b175: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10b178: 8b 3d ec 55 12 00 mov 0x1255ec,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b17e: 83 ff 02 cmp $0x2,%edi 10b181: 74 0d je 10b190 <_Event_Surrender+0xec> <== ALWAYS TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b183: 8b 3d ec 55 12 00 mov 0x1255ec,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b189: 4f dec %edi 10b18a: 0f 85 52 ff ff ff jne 10b0e2 <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b190: 3b 45 e0 cmp -0x20(%ebp),%eax 10b193: 74 05 je 10b19a <_Event_Surrender+0xf6> 10b195: 83 e6 02 and $0x2,%esi 10b198: 74 22 je 10b1bc <_Event_Surrender+0x118> <== ALWAYS TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b19a: 8b 45 e0 mov -0x20(%ebp),%eax 10b19d: f7 d0 not %eax 10b19f: 21 d0 and %edx,%eax 10b1a1: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b1a3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b1aa: 8b 43 28 mov 0x28(%ebx),%eax 10b1ad: 8b 55 e0 mov -0x20(%ebp),%edx 10b1b0: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b1b2: c7 05 ec 55 12 00 03 movl $0x3,0x1255ec 10b1b9: 00 00 00 } _ISR_Enable( level ); 10b1bc: ff 75 e4 pushl -0x1c(%ebp) 10b1bf: 9d popf return; 10b1c0: e9 73 ff ff ff jmp 10b138 <_Event_Surrender+0x94> <== ALWAYS TAKEN 0010b1c8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b1c8: 55 push %ebp 10b1c9: 89 e5 mov %esp,%ebp 10b1cb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b1ce: 8d 45 f4 lea -0xc(%ebp),%eax 10b1d1: 50 push %eax 10b1d2: ff 75 08 pushl 0x8(%ebp) 10b1d5: e8 02 22 00 00 call 10d3dc <_Thread_Get> switch ( location ) { 10b1da: 83 c4 10 add $0x10,%esp 10b1dd: 8b 55 f4 mov -0xc(%ebp),%edx 10b1e0: 85 d2 test %edx,%edx 10b1e2: 75 37 jne 10b21b <_Event_Timeout+0x53> <== 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 ); 10b1e4: 9c pushf 10b1e5: fa cli 10b1e6: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b1e7: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b1ee: 3b 05 f8 53 12 00 cmp 0x1253f8,%eax 10b1f4: 74 2a je 10b220 <_Event_Timeout+0x58> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10b1f6: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b1fd: 52 push %edx 10b1fe: 9d popf 10b1ff: 83 ec 08 sub $0x8,%esp 10b202: 68 f8 ff 03 10 push $0x1003fff8 10b207: 50 push %eax 10b208: e8 03 1e 00 00 call 10d010 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b20d: a1 38 53 12 00 mov 0x125338,%eax 10b212: 48 dec %eax 10b213: a3 38 53 12 00 mov %eax,0x125338 10b218: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b21b: c9 leave 10b21c: c3 ret 10b21d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10b220: 8b 0d ec 55 12 00 mov 0x1255ec,%ecx 10b226: 49 dec %ecx 10b227: 75 cd jne 10b1f6 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b229: c7 05 ec 55 12 00 02 movl $0x2,0x1255ec 10b230: 00 00 00 10b233: eb c1 jmp 10b1f6 <_Event_Timeout+0x2e> <== ALWAYS TAKEN 0011021c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 11021c: 55 push %ebp 11021d: 89 e5 mov %esp,%ebp 11021f: 57 push %edi 110220: 56 push %esi 110221: 53 push %ebx 110222: 83 ec 2c sub $0x2c,%esp 110225: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 110228: 8b 45 08 mov 0x8(%ebp),%eax 11022b: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 11022e: 8b 50 10 mov 0x10(%eax),%edx 110231: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110234: 89 f8 mov %edi,%eax 110236: 83 c0 04 add $0x4,%eax 110239: 89 45 e0 mov %eax,-0x20(%ebp) 11023c: 0f 82 5a 01 00 00 jb 11039c <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110242: 8b 75 14 mov 0x14(%ebp),%esi 110245: 85 f6 test %esi,%esi 110247: 0f 85 48 01 00 00 jne 110395 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 11024d: 39 4d 08 cmp %ecx,0x8(%ebp) 110250: 0f 84 50 01 00 00 je 1103a6 <_Heap_Allocate_aligned_with_boundary+0x18a> 110256: 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; 11025d: 8b 55 d4 mov -0x2c(%ebp),%edx 110260: 83 c2 07 add $0x7,%edx 110263: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110266: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 11026d: 29 7d d8 sub %edi,-0x28(%ebp) 110270: eb 19 jmp 11028b <_Heap_Allocate_aligned_with_boundary+0x6f> <== ALWAYS TAKEN 110272: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 110274: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 110277: 85 db test %ebx,%ebx 110279: 0f 85 e9 00 00 00 jne 110368 <_Heap_Allocate_aligned_with_boundary+0x14c> <== NEVER TAKEN break; } block = block->next; 11027f: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110282: 39 4d 08 cmp %ecx,0x8(%ebp) 110285: 0f 84 25 01 00 00 je 1103b0 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 11028b: 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 ) { 11028e: 8b 59 04 mov 0x4(%ecx),%ebx 110291: 39 5d e0 cmp %ebx,-0x20(%ebp) 110294: 73 e9 jae 11027f <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110296: 8b 55 10 mov 0x10(%ebp),%edx 110299: 85 d2 test %edx,%edx 11029b: 74 d7 je 110274 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 11029d: 8b 45 08 mov 0x8(%ebp),%eax 1102a0: 8b 40 14 mov 0x14(%eax),%eax 1102a3: 89 45 d0 mov %eax,-0x30(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 1102a6: 83 e3 fe and $0xfffffffe,%ebx 1102a9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 1102ac: 8d 51 08 lea 0x8(%ecx),%edx 1102af: 89 55 cc mov %edx,-0x34(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1102b2: 8b 75 c8 mov -0x38(%ebp),%esi 1102b5: 29 c6 sub %eax,%esi 1102b7: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1102b9: 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); 1102bc: 89 d8 mov %ebx,%eax 1102be: 31 d2 xor %edx,%edx 1102c0: f7 75 10 divl 0x10(%ebp) 1102c3: 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 ) { 1102c5: 39 de cmp %ebx,%esi 1102c7: 73 0b jae 1102d4 <_Heap_Allocate_aligned_with_boundary+0xb8> 1102c9: 89 f0 mov %esi,%eax 1102cb: 31 d2 xor %edx,%edx 1102cd: f7 75 10 divl 0x10(%ebp) 1102d0: 89 f3 mov %esi,%ebx 1102d2: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 1102d4: 8b 45 14 mov 0x14(%ebp),%eax 1102d7: 85 c0 test %eax,%eax 1102d9: 74 59 je 110334 <_Heap_Allocate_aligned_with_boundary+0x118> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 1102db: 8d 34 3b lea (%ebx,%edi,1),%esi 1102de: 89 f0 mov %esi,%eax 1102e0: 31 d2 xor %edx,%edx 1102e2: f7 75 14 divl 0x14(%ebp) 1102e5: 89 f0 mov %esi,%eax 1102e7: 29 d0 sub %edx,%eax 1102e9: 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 ) { 1102eb: 39 c3 cmp %eax,%ebx 1102ed: 73 45 jae 110334 <_Heap_Allocate_aligned_with_boundary+0x118> 1102ef: 39 c6 cmp %eax,%esi 1102f1: 76 41 jbe 110334 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 1102f3: 8b 45 cc mov -0x34(%ebp),%eax 1102f6: 01 f8 add %edi,%eax 1102f8: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 1102fb: 39 d0 cmp %edx,%eax 1102fd: 77 80 ja 11027f <_Heap_Allocate_aligned_with_boundary+0x63> 1102ff: 89 ce mov %ecx,%esi 110301: eb 0e jmp 110311 <_Heap_Allocate_aligned_with_boundary+0xf5> <== ALWAYS TAKEN 110303: 90 nop <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 110304: 39 c1 cmp %eax,%ecx 110306: 76 2a jbe 110332 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110308: 39 55 dc cmp %edx,-0x24(%ebp) 11030b: 0f 87 a3 00 00 00 ja 1103b4 <_Heap_Allocate_aligned_with_boundary+0x198> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110311: 89 d3 mov %edx,%ebx 110313: 29 fb sub %edi,%ebx 110315: 89 d8 mov %ebx,%eax 110317: 31 d2 xor %edx,%edx 110319: f7 75 10 divl 0x10(%ebp) 11031c: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 11031e: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110321: 89 c8 mov %ecx,%eax 110323: 31 d2 xor %edx,%edx 110325: f7 75 14 divl 0x14(%ebp) 110328: 89 c8 mov %ecx,%eax 11032a: 29 d0 sub %edx,%eax 11032c: 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 ) { 11032e: 39 c3 cmp %eax,%ebx 110330: 72 d2 jb 110304 <_Heap_Allocate_aligned_with_boundary+0xe8> 110332: 89 f1 mov %esi,%ecx boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 110334: 39 5d cc cmp %ebx,-0x34(%ebp) 110337: 0f 87 42 ff ff ff ja 11027f <_Heap_Allocate_aligned_with_boundary+0x63> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 11033d: be f8 ff ff ff mov $0xfffffff8,%esi 110342: 29 ce sub %ecx,%esi 110344: 01 de add %ebx,%esi 110346: 89 d8 mov %ebx,%eax 110348: 31 d2 xor %edx,%edx 11034a: f7 75 d4 divl -0x2c(%ebp) 11034d: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 11034f: 39 75 d0 cmp %esi,-0x30(%ebp) 110352: 0f 86 1f ff ff ff jbe 110277 <_Heap_Allocate_aligned_with_boundary+0x5b> 110358: 85 f6 test %esi,%esi 11035a: 0f 85 1f ff ff ff jne 11027f <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 110360: 85 db test %ebx,%ebx 110362: 0f 84 17 ff ff ff je 11027f <_Heap_Allocate_aligned_with_boundary+0x63> <== ALWAYS TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110368: 8b 55 e4 mov -0x1c(%ebp),%edx 11036b: 8b 45 08 mov 0x8(%ebp),%eax 11036e: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110371: 57 push %edi 110372: 53 push %ebx 110373: 51 push %ecx 110374: 50 push %eax 110375: e8 be c1 ff ff call 10c538 <_Heap_Block_allocate> <== ALWAYS TAKEN 11037a: 89 d8 mov %ebx,%eax 11037c: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 11037f: 8b 4d e4 mov -0x1c(%ebp),%ecx 110382: 8b 55 08 mov 0x8(%ebp),%edx 110385: 39 4a 44 cmp %ecx,0x44(%edx) 110388: 73 14 jae 11039e <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 11038a: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 11038d: 8d 65 f4 lea -0xc(%ebp),%esp 110390: 5b pop %ebx 110391: 5e pop %esi 110392: 5f pop %edi 110393: c9 leave 110394: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110395: 3b 7d 14 cmp 0x14(%ebp),%edi 110398: 76 21 jbe 1103bb <_Heap_Allocate_aligned_with_boundary+0x19f> 11039a: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 11039c: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 11039e: 8d 65 f4 lea -0xc(%ebp),%esp 1103a1: 5b pop %ebx 1103a2: 5e pop %esi 1103a3: 5f pop %edi 1103a4: c9 leave 1103a5: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1103a6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1103ad: 8d 76 00 lea 0x0(%esi),%esi 1103b0: 31 c0 xor %eax,%eax 1103b2: eb cb jmp 11037f <_Heap_Allocate_aligned_with_boundary+0x163> <== ALWAYS TAKEN 1103b4: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1103b6: e9 c4 fe ff ff jmp 11027f <_Heap_Allocate_aligned_with_boundary+0x63> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 1103bb: 8b 5d 10 mov 0x10(%ebp),%ebx 1103be: 85 db test %ebx,%ebx 1103c0: 0f 85 87 fe ff ff jne 11024d <_Heap_Allocate_aligned_with_boundary+0x31> 1103c6: 89 55 10 mov %edx,0x10(%ebp) 1103c9: e9 7f fe ff ff jmp 11024d <_Heap_Allocate_aligned_with_boundary+0x31> <== ALWAYS TAKEN 0010c538 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c538: 55 push %ebp 10c539: 89 e5 mov %esp,%ebp 10c53b: 57 push %edi 10c53c: 56 push %esi 10c53d: 53 push %ebx 10c53e: 83 ec 10 sub $0x10,%esp 10c541: 8b 75 08 mov 0x8(%ebp),%esi 10c544: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10c547: 89 5d ec mov %ebx,-0x14(%ebp) 10c54a: 8b 7d 10 mov 0x10(%ebp),%edi 10c54d: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10c550: 89 f8 mov %edi,%eax 10c552: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c554: 8b 53 04 mov 0x4(%ebx),%edx 10c557: 83 e2 fe and $0xfffffffe,%edx 10c55a: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c55f: 0f 85 8b 00 00 00 jne 10c5f0 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c565: 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; 10c568: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c56b: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c56e: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c571: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c574: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c577: 8b 53 04 mov 0x4(%ebx),%edx 10c57a: 83 e2 fe and $0xfffffffe,%edx 10c57d: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c580: 8b 56 10 mov 0x10(%esi),%edx 10c583: 89 55 e4 mov %edx,-0x1c(%ebp) 10c586: 39 d0 cmp %edx,%eax 10c588: 72 72 jb 10c5fc <_Heap_Block_allocate+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c58a: 8b 43 04 mov 0x4(%ebx),%eax 10c58d: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10c590: 8b 45 10 mov 0x10(%ebp),%eax 10c593: 31 d2 xor %edx,%edx 10c595: f7 75 e4 divl -0x1c(%ebp) 10c598: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10c59a: 89 f8 mov %edi,%eax 10c59c: 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; 10c59e: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c5a1: f6 43 04 01 testb $0x1,0x4(%ebx) 10c5a5: 75 69 jne 10c610 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10c5a7: 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; 10c5a9: 8b 53 04 mov 0x4(%ebx),%edx 10c5ac: 83 e2 fe and $0xfffffffe,%edx 10c5af: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c5b1: 89 c2 mov %eax,%edx 10c5b3: 83 ca 01 or $0x1,%edx 10c5b6: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c5b9: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c5bb: 8b 45 f0 mov -0x10(%ebp),%eax 10c5be: 83 e0 fe and $0xfffffffe,%eax 10c5c1: 03 45 ec add -0x14(%ebp),%eax 10c5c4: 29 f8 sub %edi,%eax 10c5c6: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c5c9: ff 75 14 pushl 0x14(%ebp) 10c5cc: 51 push %ecx 10c5cd: 57 push %edi 10c5ce: 56 push %esi 10c5cf: e8 80 fe ff ff call 10c454 <_Heap_Block_split> <== ALWAYS TAKEN 10c5d4: 89 fb mov %edi,%ebx 10c5d6: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c5d9: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c5dc: 39 46 34 cmp %eax,0x34(%esi) 10c5df: 76 03 jbe 10c5e4 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c5e1: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c5e4: 89 d8 mov %ebx,%eax 10c5e6: 8d 65 f4 lea -0xc(%ebp),%esp 10c5e9: 5b pop %ebx 10c5ea: 5e pop %esi 10c5eb: 5f pop %edi 10c5ec: c9 leave 10c5ed: c3 ret 10c5ee: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10c5f0: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c5f2: 8b 56 10 mov 0x10(%esi),%edx 10c5f5: 89 55 e4 mov %edx,-0x1c(%ebp) 10c5f8: 39 d0 cmp %edx,%eax 10c5fa: 73 8e jae 10c58a <_Heap_Block_allocate+0x52> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10c5fc: 03 45 14 add 0x14(%ebp),%eax 10c5ff: 50 push %eax 10c600: 51 push %ecx 10c601: 53 push %ebx 10c602: 56 push %esi 10c603: e8 4c fe ff ff call 10c454 <_Heap_Block_split> <== ALWAYS TAKEN 10c608: 83 c4 10 add $0x10,%esp 10c60b: eb cc jmp 10c5d9 <_Heap_Block_allocate+0xa1> <== ALWAYS TAKEN 10c60d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c610: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c613: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c616: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c619: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c61c: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c61f: ff 46 38 incl 0x38(%esi) 10c622: 89 d9 mov %ebx,%ecx 10c624: eb 8b jmp 10c5b1 <_Heap_Block_allocate+0x79> <== ALWAYS TAKEN 0010c454 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c454: 55 push %ebp 10c455: 89 e5 mov %esp,%ebp 10c457: 57 push %edi 10c458: 56 push %esi 10c459: 53 push %ebx 10c45a: 83 ec 14 sub $0x14,%esp 10c45d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c460: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c463: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c466: 8b 41 14 mov 0x14(%ecx),%eax 10c469: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10c46c: 8b 43 04 mov 0x4(%ebx),%eax 10c46f: 89 45 e4 mov %eax,-0x1c(%ebp) 10c472: 89 c6 mov %eax,%esi 10c474: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10c477: 8b 55 e8 mov -0x18(%ebp),%edx 10c47a: 83 ea 08 sub $0x8,%edx 10c47d: 8b 45 14 mov 0x14(%ebp),%eax 10c480: 39 d0 cmp %edx,%eax 10c482: 73 02 jae 10c486 <_Heap_Block_split+0x32> 10c484: 89 d0 mov %edx,%eax 10c486: 83 c0 08 add $0x8,%eax 10c489: 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; 10c48c: 31 d2 xor %edx,%edx 10c48e: f7 f7 div %edi if ( remainder != 0 ) { 10c490: 85 d2 test %edx,%edx 10c492: 75 70 jne 10c504 <_Heap_Block_split+0xb0> 10c494: 8b 7d f0 mov -0x10(%ebp),%edi 10c497: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c49a: 8d 04 33 lea (%ebx,%esi,1),%eax 10c49d: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10c4a0: 8d 56 04 lea 0x4(%esi),%edx 10c4a3: 2b 55 f0 sub -0x10(%ebp),%edx 10c4a6: 8b 7d e8 mov -0x18(%ebp),%edi 10c4a9: 83 c7 04 add $0x4,%edi 10c4ac: 39 fa cmp %edi,%edx 10c4ae: 72 60 jb 10c510 <_Heap_Block_split+0xbc> 10c4b0: 8b 55 ec mov -0x14(%ebp),%edx 10c4b3: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10c4b5: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10c4b8: 8b 7d e4 mov -0x1c(%ebp),%edi 10c4bb: 83 e7 01 and $0x1,%edi 10c4be: 0b 7d ec or -0x14(%ebp),%edi 10c4c1: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10c4c4: 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; 10c4c7: 8b 58 04 mov 0x4(%eax),%ebx 10c4ca: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c4cd: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c4d2: 75 4c jne 10c520 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10c4d4: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c4d7: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c4da: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c4dd: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c4e0: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c4e3: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10c4e6: 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); 10c4e8: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10c4eb: 89 f1 mov %esi,%ecx 10c4ed: 83 c9 01 or $0x1,%ecx 10c4f0: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c4f3: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c4f5: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c4f9: 83 c4 14 add $0x14,%esp 10c4fc: 5b pop %ebx 10c4fd: 5e pop %esi 10c4fe: 5f pop %edi 10c4ff: c9 leave 10c500: c3 ret 10c501: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c504: 03 7d f0 add -0x10(%ebp),%edi 10c507: 29 d7 sub %edx,%edi 10c509: 89 7d ec mov %edi,-0x14(%ebp) 10c50c: eb 8c jmp 10c49a <_Heap_Block_split+0x46> <== ALWAYS TAKEN 10c50e: 66 90 xchg %ax,%ax <== NOT EXECUTED free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10c510: 8b 45 e0 mov -0x20(%ebp),%eax 10c513: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c517: 83 c4 14 add $0x14,%esp 10c51a: 5b pop %ebx 10c51b: 5e pop %esi 10c51c: 5f pop %edi 10c51d: c9 leave 10c51e: c3 ret 10c51f: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10c520: 8b 7d 10 mov 0x10(%ebp),%edi 10c523: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c526: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c529: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c52c: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c52f: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10c532: ff 41 38 incl 0x38(%ecx) 10c535: eb b4 jmp 10c4eb <_Heap_Block_split+0x97> <== ALWAYS TAKEN 00113b1c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 113b1c: 55 push %ebp 113b1d: 89 e5 mov %esp,%ebp 113b1f: 56 push %esi 113b20: 53 push %ebx 113b21: 8b 4d 08 mov 0x8(%ebp),%ecx 113b24: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 113b27: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 113b2a: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 113b2d: 3b 41 18 cmp 0x18(%ecx),%eax 113b30: 73 3a jae 113b6c <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 113b32: 39 d0 cmp %edx,%eax 113b34: 74 0e je 113b44 <_Heap_Extend+0x28> 113b36: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113b3b: 8d 65 f8 lea -0x8(%ebp),%esp 113b3e: 5b pop %ebx 113b3f: 5e pop %esi 113b40: c9 leave 113b41: c3 ret 113b42: 66 90 xchg %ax,%ax <== NOT EXECUTED { 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; 113b44: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 113b47: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 113b4a: 29 d8 sub %ebx,%eax 113b4c: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 113b4f: 89 f0 mov %esi,%eax 113b51: 31 d2 xor %edx,%edx 113b53: f7 71 10 divl 0x10(%ecx) 113b56: 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; 113b58: 8b 45 14 mov 0x14(%ebp),%eax 113b5b: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 113b5d: 39 71 14 cmp %esi,0x14(%ecx) 113b60: 76 1a jbe 113b7c <_Heap_Extend+0x60> <== NEVER TAKEN 113b62: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113b64: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 113b67: 5b pop %ebx <== NOT EXECUTED 113b68: 5e pop %esi <== NOT EXECUTED 113b69: c9 leave <== NOT EXECUTED 113b6a: c3 ret <== NOT EXECUTED 113b6b: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 113b6c: 39 d0 cmp %edx,%eax 113b6e: 73 c2 jae 113b32 <_Heap_Extend+0x16> 113b70: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 113b75: 8d 65 f8 lea -0x8(%ebp),%esp 113b78: 5b pop %ebx 113b79: 5e pop %esi 113b7a: c9 leave 113b7b: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 113b7c: 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; 113b7f: 8b 43 04 mov 0x4(%ebx),%eax 113b82: 83 e0 01 and $0x1,%eax 113b85: 09 f0 or %esi,%eax 113b87: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 113b8a: 8b 41 20 mov 0x20(%ecx),%eax 113b8d: 29 d0 sub %edx,%eax 113b8f: 83 c8 01 or $0x1,%eax 113b92: 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; 113b95: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 113b98: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 113b9b: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 113b9e: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 113ba1: 83 ec 08 sub $0x8,%esp 113ba4: 83 c3 08 add $0x8,%ebx 113ba7: 53 push %ebx 113ba8: 51 push %ecx 113ba9: e8 56 b7 ff ff call 10f304 <_Heap_Free> <== ALWAYS TAKEN 113bae: 31 c0 xor %eax,%eax 113bb0: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 113bb3: 8d 65 f8 lea -0x8(%ebp),%esp 113bb6: 5b pop %ebx 113bb7: 5e pop %esi 113bb8: c9 leave 113bb9: c3 ret 001103d0 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 1103d0: 55 push %ebp 1103d1: 89 e5 mov %esp,%ebp 1103d3: 57 push %edi 1103d4: 56 push %esi 1103d5: 53 push %ebx 1103d6: 83 ec 18 sub $0x18,%esp 1103d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1103dc: 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 ) 1103df: 8d 48 f8 lea -0x8(%eax),%ecx 1103e2: 31 d2 xor %edx,%edx 1103e4: f7 73 10 divl 0x10(%ebx) 1103e7: 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; 1103e9: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1103ec: 39 c1 cmp %eax,%ecx 1103ee: 72 07 jb 1103f7 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 1103f0: 8b 73 24 mov 0x24(%ebx),%esi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1103f3: 39 f1 cmp %esi,%ecx 1103f5: 76 0d jbe 110404 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 1103f7: 31 c0 xor %eax,%eax } 1103f9: 83 c4 18 add $0x18,%esp 1103fc: 5b pop %ebx 1103fd: 5e pop %esi 1103fe: 5f pop %edi 1103ff: c9 leave 110400: c3 ret 110401: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 110404: 8b 51 04 mov 0x4(%ecx),%edx 110407: 89 55 f0 mov %edx,-0x10(%ebp) 11040a: 83 e2 fe and $0xfffffffe,%edx 11040d: 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); 110410: 01 ca add %ecx,%edx 110412: 89 55 dc mov %edx,-0x24(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 110415: 39 d0 cmp %edx,%eax 110417: 77 de ja 1103f7 <_Heap_Free+0x27> <== ALWAYS TAKEN 110419: 39 d6 cmp %edx,%esi 11041b: 72 da jb 1103f7 <_Heap_Free+0x27> <== 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; 11041d: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 110420: f7 c7 01 00 00 00 test $0x1,%edi 110426: 74 cf je 1103f7 <_Heap_Free+0x27> <== 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; 110428: 83 e7 fe and $0xfffffffe,%edi 11042b: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 11042e: 39 d6 cmp %edx,%esi 110430: 0f 84 e2 00 00 00 je 110518 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110436: 8b 55 dc mov -0x24(%ebp),%edx 110439: 8b 7d e8 mov -0x18(%ebp),%edi 11043c: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110440: 89 7d e0 mov %edi,-0x20(%ebp) 110443: 8a 55 e0 mov -0x20(%ebp),%dl 110446: 83 e2 01 and $0x1,%edx 110449: 88 55 e7 mov %dl,-0x19(%ebp) 11044c: 80 75 e7 01 xorb $0x1,-0x19(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 110450: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110454: 75 46 jne 11049c <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 110456: 8b 39 mov (%ecx),%edi 110458: 89 7d f0 mov %edi,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11045b: 29 f9 sub %edi,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11045d: 39 c8 cmp %ecx,%eax 11045f: 77 96 ja 1103f7 <_Heap_Free+0x27> <== ALWAYS TAKEN 110461: 39 ce cmp %ecx,%esi 110463: 72 92 jb 1103f7 <_Heap_Free+0x27> <== 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) ) { 110465: f6 41 04 01 testb $0x1,0x4(%ecx) 110469: 74 8c je 1103f7 <_Heap_Free+0x27> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 11046b: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 11046f: 0f 84 af 00 00 00 je 110524 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 110475: 8b 45 ec mov -0x14(%ebp),%eax 110478: 03 45 e8 add -0x18(%ebp),%eax 11047b: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11047d: 8b 55 dc mov -0x24(%ebp),%edx 110480: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 110483: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 110486: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 110489: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 11048c: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11048f: 89 c2 mov %eax,%edx 110491: 83 ca 01 or $0x1,%edx 110494: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 110497: 89 04 01 mov %eax,(%ecx,%eax,1) 11049a: eb 2c jmp 1104c8 <_Heap_Free+0xf8> <== ALWAYS TAKEN uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 11049c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 1104a0: 74 3e je 1104e0 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 1104a2: 8b 7d e8 mov -0x18(%ebp),%edi 1104a5: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 1104a8: 8b 75 dc mov -0x24(%ebp),%esi 1104ab: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 1104ae: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 1104b1: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 1104b4: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 1104b7: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 1104ba: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1104bd: 89 f8 mov %edi,%eax 1104bf: 83 c8 01 or $0x1,%eax 1104c2: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 1104c5: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 1104c8: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 1104cb: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 1104ce: 8b 55 ec mov -0x14(%ebp),%edx 1104d1: 01 53 30 add %edx,0x30(%ebx) 1104d4: b0 01 mov $0x1,%al return( true ); } 1104d6: 83 c4 18 add $0x18,%esp 1104d9: 5b pop %ebx 1104da: 5e pop %esi 1104db: 5f pop %edi 1104dc: c9 leave 1104dd: c3 ret 1104de: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 1104e0: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 1104e3: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 1104e6: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 1104e9: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 1104ec: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 1104ef: 8b 45 ec mov -0x14(%ebp),%eax 1104f2: 83 c8 01 or $0x1,%eax 1104f5: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1104f8: 8b 7d dc mov -0x24(%ebp),%edi 1104fb: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 1104ff: 8b 45 ec mov -0x14(%ebp),%eax 110502: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 110504: 8b 43 38 mov 0x38(%ebx),%eax 110507: 40 inc %eax 110508: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 11050b: 3b 43 3c cmp 0x3c(%ebx),%eax 11050e: 76 b8 jbe 1104c8 <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 110510: 89 43 3c mov %eax,0x3c(%ebx) 110513: eb b3 jmp 1104c8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 110515: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 110518: c6 45 e7 00 movb $0x0,-0x19(%ebp) 11051c: e9 2f ff ff ff jmp 110450 <_Heap_Free+0x80> <== ALWAYS TAKEN 110521: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 110524: 8b 45 ec mov -0x14(%ebp),%eax 110527: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11052a: 89 c6 mov %eax,%esi 11052c: 83 ce 01 or $0x1,%esi 11052f: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110532: 8b 55 dc mov -0x24(%ebp),%edx 110535: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110539: 89 02 mov %eax,(%edx) 11053b: eb 8b jmp 1104c8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 0012e1bc <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12e1bc: 55 push %ebp 12e1bd: 89 e5 mov %esp,%ebp 12e1bf: 57 push %edi 12e1c0: 56 push %esi 12e1c1: 53 push %ebx 12e1c2: 8b 7d 08 mov 0x8(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 12e1c5: 8b 45 0c mov 0xc(%ebp),%eax 12e1c8: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 12e1ce: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 12e1d5: 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; 12e1dc: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 12e1df: 39 d7 cmp %edx,%edi 12e1e1: 74 2c je 12e20f <_Heap_Get_free_information+0x53> <== ALWAYS TAKEN 12e1e3: 31 f6 xor %esi,%esi 12e1e5: b9 01 00 00 00 mov $0x1,%ecx 12e1ea: 31 db xor %ebx,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 12e1ec: 8b 42 04 mov 0x4(%edx),%eax 12e1ef: 83 e0 fe and $0xfffffffe,%eax /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 12e1f2: 01 c3 add %eax,%ebx 12e1f4: 39 c6 cmp %eax,%esi 12e1f6: 73 02 jae 12e1fa <_Heap_Get_free_information+0x3e> 12e1f8: 89 c6 mov %eax,%esi info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 12e1fa: 8b 52 08 mov 0x8(%edx),%edx 12e1fd: 89 c8 mov %ecx,%eax 12e1ff: 41 inc %ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 12e200: 39 d7 cmp %edx,%edi 12e202: 75 e8 jne 12e1ec <_Heap_Get_free_information+0x30> 12e204: 8b 55 0c mov 0xc(%ebp),%edx 12e207: 89 02 mov %eax,(%edx) 12e209: 89 5a 08 mov %ebx,0x8(%edx) 12e20c: 89 72 04 mov %esi,0x4(%edx) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 12e20f: 5b pop %ebx 12e210: 5e pop %esi 12e211: 5f pop %edi 12e212: c9 leave 12e213: c3 ret 0013c758 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13c758: 55 push %ebp 13c759: 89 e5 mov %esp,%ebp 13c75b: 57 push %edi 13c75c: 56 push %esi 13c75d: 53 push %ebx 13c75e: 83 ec 04 sub $0x4,%esp 13c761: 8b 45 08 mov 0x8(%ebp),%eax 13c764: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13c767: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13c76a: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 13c76d: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13c773: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13c77a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13c781: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13c788: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13c78f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13c796: 39 fb cmp %edi,%ebx 13c798: 74 45 je 13c7df <_Heap_Get_information+0x87> <== ALWAYS TAKEN 13c79a: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 13c79d: 8d 46 0c lea 0xc(%esi),%eax 13c7a0: 89 45 f0 mov %eax,-0x10(%ebp) 13c7a3: eb 16 jmp 13c7bb <_Heap_Get_information+0x63> <== ALWAYS TAKEN 13c7a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13c7a8: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13c7aa: ff 00 incl (%eax) info->total += the_size; 13c7ac: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13c7af: 39 50 04 cmp %edx,0x4(%eax) 13c7b2: 73 03 jae 13c7b7 <_Heap_Get_information+0x5f> info->largest = the_size; 13c7b4: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13c7b7: 39 df cmp %ebx,%edi 13c7b9: 74 15 je 13c7d0 <_Heap_Get_information+0x78> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 13c7bb: 89 ca mov %ecx,%edx 13c7bd: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 13c7c0: 01 d3 add %edx,%ebx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 13c7c2: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 13c7c5: f6 c1 01 test $0x1,%cl 13c7c8: 74 de je 13c7a8 <_Heap_Get_information+0x50> 13c7ca: 8b 45 f0 mov -0x10(%ebp),%eax 13c7cd: eb db jmp 13c7aa <_Heap_Get_information+0x52> <== ALWAYS TAKEN 13c7cf: 90 nop <== NOT EXECUTED the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13c7d0: 8b 46 14 mov 0x14(%esi),%eax 13c7d3: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 13c7d6: 89 46 14 mov %eax,0x14(%esi) } 13c7d9: 58 pop %eax 13c7da: 5b pop %ebx 13c7db: 5e pop %esi 13c7dc: 5f pop %edi 13c7dd: c9 leave 13c7de: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 13c7df: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13c7e4: eb f0 jmp 13c7d6 <_Heap_Get_information+0x7e> <== NOT EXECUTED 0010c304 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c304: 55 push %ebp 10c305: 89 e5 mov %esp,%ebp 10c307: 57 push %edi 10c308: 56 push %esi 10c309: 53 push %ebx 10c30a: 83 ec 10 sub $0x10,%esp 10c30d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c310: 8b 4d 14 mov 0x14(%ebp),%ecx uintptr_t min_block_size = 0; uintptr_t overhead = 0; Heap_Block *first_block = NULL; Heap_Block *last_block = NULL; if ( page_size == 0 ) { 10c313: 85 c9 test %ecx,%ecx 10c315: 0f 85 f5 00 00 00 jne 10c410 <_Heap_Initialize+0x10c> 10c31b: b1 04 mov $0x4,%cl 10c31d: c7 45 f0 10 00 00 00 movl $0x10,-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; 10c324: 8b 75 0c mov 0xc(%ebp),%esi 10c327: 83 c6 08 add $0x8,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c32a: 89 f0 mov %esi,%eax 10c32c: 31 d2 xor %edx,%edx 10c32e: f7 f1 div %ecx if ( remainder != 0 ) { 10c330: 85 d2 test %edx,%edx 10c332: 74 05 je 10c339 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c334: 8d 34 31 lea (%ecx,%esi,1),%esi 10c337: 29 d6 sub %edx,%esi 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; if ( 10c339: 8b 55 0c mov 0xc(%ebp),%edx 10c33c: 03 55 10 add 0x10(%ebp),%edx 10c33f: 89 55 ec mov %edx,-0x14(%ebp) 10c342: 0f 82 d9 00 00 00 jb 10c421 <_Heap_Initialize+0x11d> } 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); 10c348: 8d 7e f8 lea -0x8(%esi),%edi 10c34b: 2b 75 0c sub 0xc(%ebp),%esi 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 ( 10c34e: 39 75 10 cmp %esi,0x10(%ebp) 10c351: 0f 86 ca 00 00 00 jbe 10c421 <_Heap_Initialize+0x11d> 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; 10c357: 8b 45 10 mov 0x10(%ebp),%eax 10c35a: 29 f0 sub %esi,%eax 10c35c: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c35e: 31 d2 xor %edx,%edx 10c360: f7 f1 div %ecx 10c362: 29 d6 sub %edx,%esi 10c364: 89 75 e4 mov %esi,-0x1c(%ebp) first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE; if ( 10c367: 39 75 f0 cmp %esi,-0x10(%ebp) 10c36a: 0f 87 b1 00 00 00 ja 10c421 <_Heap_Initialize+0x11d> 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; 10c370: 89 f0 mov %esi,%eax 10c372: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c375: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c377: 89 f2 mov %esi,%edx 10c379: 83 ca 01 or $0x1,%edx 10c37c: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c37f: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c382: 89 5f 0c mov %ebx,0xc(%edi) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c385: 01 fe add %edi,%esi 10c387: 89 73 24 mov %esi,0x24(%ebx) * 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; 10c38a: 8b 55 e4 mov -0x1c(%ebp),%edx 10c38d: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c38f: 89 fa mov %edi,%edx 10c391: 29 f2 sub %esi,%edx 10c393: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c396: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c399: 8b 75 f0 mov -0x10(%ebp),%esi 10c39c: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c39f: 8b 55 0c mov 0xc(%ebp),%edx 10c3a2: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c3a5: 8b 75 ec mov -0x14(%ebp),%esi 10c3a8: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c3ab: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c3ae: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c3b1: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c3b4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c3b7: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c3ba: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c3bd: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c3c0: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c3c7: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c3ce: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c3d5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c3dc: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c3e3: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c3ea: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c3f1: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c3f8: 8b 15 60 4f 12 00 mov 0x124f60,%edx 10c3fe: 89 53 28 mov %edx,0x28(%ebx) 10c401: 42 inc %edx 10c402: 89 15 60 4f 12 00 mov %edx,0x124f60 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c408: 83 c4 10 add $0x10,%esp 10c40b: 5b pop %ebx 10c40c: 5e pop %esi 10c40d: 5f pop %edi 10c40e: c9 leave 10c40f: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c410: 89 c8 mov %ecx,%eax 10c412: 83 e0 03 and $0x3,%eax 10c415: 74 05 je 10c41c <_Heap_Initialize+0x118> return value - remainder + alignment; 10c417: 83 c1 04 add $0x4,%ecx 10c41a: 29 c1 sub %eax,%ecx if ( page_size == 0 ) { page_size = CPU_ALIGNMENT; } else { page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT ); if ( page_size < CPU_ALIGNMENT ) { 10c41c: 83 f9 03 cmp $0x3,%ecx 10c41f: 77 0b ja 10c42c <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c421: 31 c0 xor %eax,%eax } 10c423: 83 c4 10 add $0x10,%esp 10c426: 5b pop %ebx 10c427: 5e pop %esi 10c428: 5f pop %edi 10c429: c9 leave 10c42a: c3 ret 10c42b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c42c: b8 10 00 00 00 mov $0x10,%eax 10c431: 31 d2 xor %edx,%edx 10c433: f7 f1 div %ecx if ( remainder != 0 ) { 10c435: 85 d2 test %edx,%edx 10c437: 74 0d je 10c446 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c439: 8d 41 10 lea 0x10(%ecx),%eax 10c43c: 29 d0 sub %edx,%eax 10c43e: 89 45 f0 mov %eax,-0x10(%ebp) 10c441: e9 de fe ff ff jmp 10c324 <_Heap_Initialize+0x20> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c446: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c44d: e9 d2 fe ff ff jmp 10c324 <_Heap_Initialize+0x20> <== ALWAYS TAKEN 0011db50 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11db50: 55 push %ebp 11db51: 89 e5 mov %esp,%ebp 11db53: 57 push %edi 11db54: 56 push %esi 11db55: 53 push %ebx 11db56: 83 ec 2c sub $0x2c,%esp 11db59: 8b 5d 08 mov 0x8(%ebp),%ebx 11db5c: 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 ) 11db5f: 8d 4e f8 lea -0x8(%esi),%ecx 11db62: 89 f0 mov %esi,%eax 11db64: 31 d2 xor %edx,%edx 11db66: f7 73 10 divl 0x10(%ebx) 11db69: 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; 11db6b: 8b 45 14 mov 0x14(%ebp),%eax 11db6e: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11db74: 8b 55 18 mov 0x18(%ebp),%edx 11db77: 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 11db7d: 39 4b 20 cmp %ecx,0x20(%ebx) 11db80: 76 0e jbe 11db90 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 11db82: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11db87: 8d 65 f4 lea -0xc(%ebp),%esp 11db8a: 5b pop %ebx 11db8b: 5e pop %esi 11db8c: 5f pop %edi 11db8d: c9 leave 11db8e: c3 ret 11db8f: 90 nop <== NOT EXECUTED 11db90: 39 4b 24 cmp %ecx,0x24(%ebx) 11db93: 72 ed jb 11db82 <_Heap_Resize_block+0x32> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 11db95: 8b 41 04 mov 0x4(%ecx),%eax 11db98: 83 e0 fe and $0xfffffffe,%eax { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; 11db9b: 8d 3c 01 lea (%ecx,%eax,1),%edi 11db9e: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11dba1: 89 fa mov %edi,%edx 11dba3: 29 f2 sub %esi,%edx 11dba5: 83 c2 04 add $0x4,%edx 11dba8: 89 55 dc mov %edx,-0x24(%ebp) 11dbab: 8b 57 04 mov 0x4(%edi),%edx 11dbae: 83 e2 fe and $0xfffffffe,%edx 11dbb1: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11dbb4: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11dbb8: 83 e2 01 and $0x1,%edx 11dbbb: 89 55 e0 mov %edx,-0x20(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 11dbbe: 8b 55 dc mov -0x24(%ebp),%edx 11dbc1: 8b 7d 14 mov 0x14(%ebp),%edi 11dbc4: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11dbc6: 8a 55 e0 mov -0x20(%ebp),%dl 11dbc9: 80 f2 01 xor $0x1,%dl 11dbcc: 88 55 e0 mov %dl,-0x20(%ebp) 11dbcf: 75 17 jne 11dbe8 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11dbd1: 8b 55 dc mov -0x24(%ebp),%edx 11dbd4: 39 55 10 cmp %edx,0x10(%ebp) 11dbd7: 76 20 jbe 11dbf9 <_Heap_Resize_block+0xa9> 11dbd9: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dbde: 8d 65 f4 lea -0xc(%ebp),%esp 11dbe1: 5b pop %ebx 11dbe2: 5e pop %esi 11dbe3: 5f pop %edi 11dbe4: c9 leave 11dbe5: c3 ret 11dbe6: 66 90 xchg %ax,%ax <== NOT EXECUTED _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 11dbe8: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11dbeb: 8b 7d d0 mov -0x30(%ebp),%edi 11dbee: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11dbf1: 8b 55 dc mov -0x24(%ebp),%edx 11dbf4: 39 55 10 cmp %edx,0x10(%ebp) 11dbf7: 77 e0 ja 11dbd9 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11dbf9: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11dbfd: 74 31 je 11dc30 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11dbff: 8b 79 04 mov 0x4(%ecx),%edi 11dc02: 83 e7 01 and $0x1,%edi 11dc05: 09 c7 or %eax,%edi 11dc07: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 11dc0a: 8b 7d d4 mov -0x2c(%ebp),%edi 11dc0d: 8b 7f 08 mov 0x8(%edi),%edi 11dc10: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11dc13: 8b 55 d4 mov -0x2c(%ebp),%edx 11dc16: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11dc19: 8b 55 e4 mov -0x1c(%ebp),%edx 11dc1c: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11dc1f: 89 7a 0c mov %edi,0xc(%edx) _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 11dc22: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11dc27: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11dc2a: 8b 7d d0 mov -0x30(%ebp),%edi 11dc2d: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11dc30: ff 75 10 pushl 0x10(%ebp) 11dc33: 56 push %esi 11dc34: 51 push %ecx 11dc35: 53 push %ebx 11dc36: e8 fd e8 fe ff call 10c538 <_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; 11dc3b: 8b 50 04 mov 0x4(%eax),%edx 11dc3e: 83 e2 fe and $0xfffffffe,%edx 11dc41: 29 f0 sub %esi,%eax 11dc43: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11dc47: 8b 55 18 mov 0x18(%ebp),%edx 11dc4a: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11dc4c: ff 43 54 incl 0x54(%ebx) 11dc4f: 31 c0 xor %eax,%eax 11dc51: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11dc54: 8d 65 f4 lea -0xc(%ebp),%esp 11dc57: 5b pop %ebx 11dc58: 5e pop %esi 11dc59: 5f pop %edi 11dc5a: c9 leave 11dc5b: c3 ret 0011dc5c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11dc5c: 55 push %ebp 11dc5d: 89 e5 mov %esp,%ebp 11dc5f: 56 push %esi 11dc60: 53 push %ebx 11dc61: 8b 5d 08 mov 0x8(%ebp),%ebx 11dc64: 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 ) 11dc67: 8d 4e f8 lea -0x8(%esi),%ecx 11dc6a: 89 f0 mov %esi,%eax 11dc6c: 31 d2 xor %edx,%edx 11dc6e: f7 73 10 divl 0x10(%ebx) 11dc71: 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; 11dc73: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11dc76: 39 c1 cmp %eax,%ecx 11dc78: 72 07 jb 11dc81 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11dc7a: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11dc7d: 39 d1 cmp %edx,%ecx 11dc7f: 76 07 jbe 11dc88 <_Heap_Size_of_alloc_area+0x2c> <== NEVER TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11dc81: 31 c0 xor %eax,%eax } 11dc83: 5b pop %ebx 11dc84: 5e pop %esi 11dc85: c9 leave 11dc86: c3 ret 11dc87: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11dc88: 8b 59 04 mov 0x4(%ecx),%ebx 11dc8b: 83 e3 fe and $0xfffffffe,%ebx 11dc8e: 01 d9 add %ebx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11dc90: 39 c8 cmp %ecx,%eax 11dc92: 77 ed ja 11dc81 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN 11dc94: 39 ca cmp %ecx,%edx 11dc96: 72 e9 jb 11dc81 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11dc98: f6 41 04 01 testb $0x1,0x4(%ecx) 11dc9c: 74 e3 je 11dc81 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11dc9e: 29 f1 sub %esi,%ecx 11dca0: 8d 51 04 lea 0x4(%ecx),%edx 11dca3: 8b 45 10 mov 0x10(%ebp),%eax 11dca6: 89 10 mov %edx,(%eax) 11dca8: b0 01 mov $0x1,%al return true; } 11dcaa: 5b pop %ebx 11dcab: 5e pop %esi 11dcac: c9 leave 11dcad: c3 ret 0010d0a0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d0a0: 55 push %ebp 10d0a1: 89 e5 mov %esp,%ebp 10d0a3: 57 push %edi 10d0a4: 56 push %esi 10d0a5: 53 push %ebx 10d0a6: 83 ec 3c sub $0x3c,%esp 10d0a9: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d0ac: 8b 43 10 mov 0x10(%ebx),%eax 10d0af: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d0b2: 8b 53 14 mov 0x14(%ebx),%edx 10d0b5: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d0b8: 8b 43 24 mov 0x24(%ebx),%eax 10d0bb: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d0be: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d0c1: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d0c5: 75 1d jne 10d0e4 <_Heap_Walk+0x44> 10d0c7: c7 45 e4 98 d0 10 00 movl $0x10d098,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d0ce: 83 3d 20 86 12 00 03 cmpl $0x3,0x128620 10d0d5: 74 1d je 10d0f4 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d0d7: b0 01 mov $0x1,%al block = next_block; } return true; } 10d0d9: 8d 65 f4 lea -0xc(%ebp),%esp 10d0dc: 5b pop %ebx 10d0dd: 5e pop %esi 10d0de: 5f pop %edi 10d0df: c9 leave 10d0e0: c3 ret 10d0e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d0e4: c7 45 e4 68 d4 10 00 movl $0x10d468,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d0eb: 83 3d 20 86 12 00 03 cmpl $0x3,0x128620 10d0f2: 75 e3 jne 10d0d7 <_Heap_Walk+0x37> <== ALWAYS TAKEN Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d0f4: 52 push %edx 10d0f5: ff 73 0c pushl 0xc(%ebx) 10d0f8: ff 73 08 pushl 0x8(%ebx) 10d0fb: ff 75 d8 pushl -0x28(%ebp) 10d0fe: 56 push %esi 10d0ff: ff 73 1c pushl 0x1c(%ebx) 10d102: ff 73 18 pushl 0x18(%ebx) 10d105: ff 75 dc pushl -0x24(%ebp) 10d108: ff 75 e0 pushl -0x20(%ebp) 10d10b: 68 d0 09 12 00 push $0x1209d0 10d110: 6a 00 push $0x0 10d112: ff 75 0c pushl 0xc(%ebp) 10d115: 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 ) { 10d118: 83 c4 30 add $0x30,%esp 10d11b: 8b 45 e0 mov -0x20(%ebp),%eax 10d11e: 85 c0 test %eax,%eax 10d120: 0f 84 b2 00 00 00 je 10d1d8 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d126: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d12a: 0f 85 b0 00 00 00 jne 10d1e0 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d130: 8b 45 dc mov -0x24(%ebp),%eax 10d133: 31 d2 xor %edx,%edx 10d135: f7 75 e0 divl -0x20(%ebp) 10d138: 85 d2 test %edx,%edx 10d13a: 0f 85 ac 00 00 00 jne 10d1ec <_Heap_Walk+0x14c> ); return false; } if ( 10d140: 8d 46 08 lea 0x8(%esi),%eax 10d143: 31 d2 xor %edx,%edx 10d145: f7 75 e0 divl -0x20(%ebp) 10d148: 85 d2 test %edx,%edx 10d14a: 0f 85 a8 00 00 00 jne 10d1f8 <_Heap_Walk+0x158> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d150: 8b 56 04 mov 0x4(%esi),%edx 10d153: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d156: 83 e2 01 and $0x1,%edx 10d159: 0f 84 a1 00 00 00 je 10d200 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d15f: 8b 06 mov (%esi),%eax 10d161: 39 45 e0 cmp %eax,-0x20(%ebp) 10d164: 75 4e jne 10d1b4 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d166: 8b 55 d8 mov -0x28(%ebp),%edx 10d169: 8b 42 04 mov 0x4(%edx),%eax 10d16c: 83 e0 fe and $0xfffffffe,%eax 10d16f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d174: 0f 84 bd 02 00 00 je 10d437 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d17a: 8b 43 10 mov 0x10(%ebx),%eax 10d17d: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d180: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d183: 39 cb cmp %ecx,%ebx 10d185: 0f 84 08 01 00 00 je 10d293 <_Heap_Walk+0x1f3> 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; 10d18b: 8b 7b 20 mov 0x20(%ebx),%edi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d18e: 39 cf cmp %ecx,%edi 10d190: 76 76 jbe 10d208 <_Heap_Walk+0x168> <== NEVER TAKEN 10d192: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d194: 51 push %ecx 10d195: 68 18 0b 12 00 push $0x120b18 10d19a: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d19c: 6a 01 push $0x1 10d19e: ff 75 0c pushl 0xc(%ebp) 10d1a1: ff 55 e4 call *-0x1c(%ebp) 10d1a4: 31 c0 xor %eax,%eax 10d1a6: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d1a9: 8d 65 f4 lea -0xc(%ebp),%esp 10d1ac: 5b pop %ebx 10d1ad: 5e pop %esi 10d1ae: 5f pop %edi 10d1af: c9 leave 10d1b0: c3 ret 10d1b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d1b4: 83 ec 0c sub $0xc,%esp 10d1b7: ff 75 e0 pushl -0x20(%ebp) 10d1ba: 50 push %eax 10d1bb: 68 ec 0a 12 00 push $0x120aec return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d1c0: 6a 01 push $0x1 10d1c2: ff 75 0c pushl 0xc(%ebp) 10d1c5: ff 55 e4 call *-0x1c(%ebp) 10d1c8: 31 c0 xor %eax,%eax 10d1ca: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d1cd: 8d 65 f4 lea -0xc(%ebp),%esp 10d1d0: 5b pop %ebx 10d1d1: 5e pop %esi 10d1d2: 5f pop %edi 10d1d3: c9 leave 10d1d4: c3 ret 10d1d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10d1d8: 57 push %edi 10d1d9: 68 47 0d 12 00 push $0x120d47 10d1de: eb bc jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d1e0: ff 75 e0 pushl -0x20(%ebp) 10d1e3: 68 5a 0d 12 00 push $0x120d5a 10d1e8: eb b2 jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d1ea: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d1ec: ff 75 dc pushl -0x24(%ebp) 10d1ef: 68 64 0a 12 00 push $0x120a64 10d1f4: eb a6 jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d1f6: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d1f8: 56 push %esi 10d1f9: 68 88 0a 12 00 push $0x120a88 10d1fe: eb 9c jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d200: 56 push %esi 10d201: 68 bc 0a 12 00 push $0x120abc 10d206: eb 94 jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d208: 8b 53 24 mov 0x24(%ebx),%edx 10d20b: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10d20e: 39 ca cmp %ecx,%edx 10d210: 72 82 jb 10d194 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d212: 8d 41 08 lea 0x8(%ecx),%eax 10d215: 31 d2 xor %edx,%edx 10d217: f7 75 d4 divl -0x2c(%ebp) 10d21a: 85 d2 test %edx,%edx 10d21c: 0f 85 20 02 00 00 jne 10d442 <_Heap_Walk+0x3a2> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d222: 8b 41 04 mov 0x4(%ecx),%eax 10d225: 83 e0 fe and $0xfffffffe,%eax 10d228: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d22d: 0f 85 29 02 00 00 jne 10d45c <_Heap_Walk+0x3bc> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d233: 8b 41 0c mov 0xc(%ecx),%eax 10d236: 39 c3 cmp %eax,%ebx 10d238: 0f 85 0f 02 00 00 jne 10d44d <_Heap_Walk+0x3ad> <== ALWAYS TAKEN 10d23e: 89 75 c8 mov %esi,-0x38(%ebp) 10d241: 89 de mov %ebx,%esi 10d243: eb 40 jmp 10d285 <_Heap_Walk+0x1e5> <== ALWAYS TAKEN 10d245: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d248: 39 f9 cmp %edi,%ecx 10d24a: 0f 82 44 ff ff ff jb 10d194 <_Heap_Walk+0xf4> 10d250: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d253: 0f 82 3b ff ff ff jb 10d194 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d259: 8d 41 08 lea 0x8(%ecx),%eax 10d25c: 31 d2 xor %edx,%edx 10d25e: f7 75 d4 divl -0x2c(%ebp) 10d261: 85 d2 test %edx,%edx 10d263: 0f 85 d9 01 00 00 jne 10d442 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d269: 8b 41 04 mov 0x4(%ecx),%eax 10d26c: 83 e0 fe and $0xfffffffe,%eax 10d26f: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d274: 0f 85 e2 01 00 00 jne 10d45c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d27a: 8b 41 0c mov 0xc(%ecx),%eax 10d27d: 39 d8 cmp %ebx,%eax 10d27f: 0f 85 c8 01 00 00 jne 10d44d <_Heap_Walk+0x3ad> (*printer)( 10d285: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d287: 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 ) { 10d28a: 39 ce cmp %ecx,%esi 10d28c: 75 ba jne 10d248 <_Heap_Walk+0x1a8> 10d28e: 89 f3 mov %esi,%ebx 10d290: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d293: 39 75 d8 cmp %esi,-0x28(%ebp) 10d296: 0f 84 3b fe ff ff je 10d0d7 <_Heap_Walk+0x37> <== ALWAYS TAKEN 10d29c: 8b 45 cc mov -0x34(%ebp),%eax 10d29f: 90 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d2a0: 89 c1 mov %eax,%ecx 10d2a2: 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); 10d2a5: 8d 3c 31 lea (%ecx,%esi,1),%edi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10d2a8: a8 01 test $0x1,%al 10d2aa: 74 30 je 10d2dc <_Heap_Walk+0x23c> (*printer)( 10d2ac: 83 ec 0c sub $0xc,%esp 10d2af: 51 push %ecx 10d2b0: 56 push %esi 10d2b1: 68 a9 0d 12 00 push $0x120da9 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d2b6: 6a 00 push $0x0 10d2b8: ff 75 0c pushl 0xc(%ebp) 10d2bb: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d2be: ff 55 e4 call *-0x1c(%ebp) 10d2c1: 83 c4 20 add $0x20,%esp 10d2c4: 8b 4d c4 mov -0x3c(%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 10d2c7: 39 7b 20 cmp %edi,0x20(%ebx) 10d2ca: 76 20 jbe 10d2ec <_Heap_Walk+0x24c> <== NEVER TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d2cc: 83 ec 0c sub $0xc,%esp 10d2cf: 57 push %edi 10d2d0: 56 push %esi 10d2d1: 68 c4 0b 12 00 push $0x120bc4 10d2d6: e9 e5 fe ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d2db: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d2dc: 83 ec 08 sub $0x8,%esp 10d2df: ff 36 pushl (%esi) 10d2e1: 51 push %ecx 10d2e2: 56 push %esi 10d2e3: 68 9c 0b 12 00 push $0x120b9c 10d2e8: eb cc jmp 10d2b6 <_Heap_Walk+0x216> <== ALWAYS TAKEN 10d2ea: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d2ec: 39 7b 24 cmp %edi,0x24(%ebx) 10d2ef: 72 db jb 10d2cc <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d2f1: 89 c8 mov %ecx,%eax 10d2f3: 31 d2 xor %edx,%edx 10d2f5: f7 75 e0 divl -0x20(%ebp) 10d2f8: 85 d2 test %edx,%edx 10d2fa: 0f 85 02 01 00 00 jne 10d402 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d300: 39 4d dc cmp %ecx,-0x24(%ebp) 10d303: 0f 87 0b 01 00 00 ja 10d414 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d309: 39 fe cmp %edi,%esi 10d30b: 0f 83 17 01 00 00 jae 10d428 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d311: f6 47 04 01 testb $0x1,0x4(%edi) 10d315: 0f 85 91 00 00 00 jne 10d3ac <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d31b: 8b 4b 08 mov 0x8(%ebx),%ecx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d31e: 8b 46 04 mov 0x4(%esi),%eax 10d321: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10d324: 83 e0 fe and $0xfffffffe,%eax 10d327: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10d32a: 01 f0 add %esi,%eax 10d32c: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d32f: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d332: 39 53 0c cmp %edx,0xc(%ebx) 10d335: 0f 84 99 00 00 00 je 10d3d4 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d33b: 39 da cmp %ebx,%edx 10d33d: 0f 84 a9 00 00 00 je 10d3ec <_Heap_Walk+0x34c> 10d343: c7 45 c8 0f 09 12 00 movl $0x12090f,-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)( 10d34a: 8b 46 0c mov 0xc(%esi),%eax 10d34d: 39 c1 cmp %eax,%ecx 10d34f: 74 7b je 10d3cc <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10d351: 39 d8 cmp %ebx,%eax 10d353: 0f 84 9f 00 00 00 je 10d3f8 <_Heap_Walk+0x358> 10d359: b9 0f 09 12 00 mov $0x12090f,%ecx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d35e: ff 75 c8 pushl -0x38(%ebp) 10d361: 52 push %edx 10d362: 51 push %ecx 10d363: 50 push %eax 10d364: 56 push %esi 10d365: 68 84 0c 12 00 push $0x120c84 10d36a: 6a 00 push $0x0 10d36c: ff 75 0c pushl 0xc(%ebp) 10d36f: 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 ) { 10d372: 8b 55 d0 mov -0x30(%ebp),%edx 10d375: 8b 02 mov (%edx),%eax 10d377: 83 c4 20 add $0x20,%esp 10d37a: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d37d: 74 11 je 10d390 <_Heap_Walk+0x2f0> (*printer)( 10d37f: 51 push %ecx 10d380: 52 push %edx 10d381: 50 push %eax 10d382: ff 75 d4 pushl -0x2c(%ebp) 10d385: 56 push %esi 10d386: 68 b0 0c 12 00 push $0x120cb0 10d38b: e9 30 fe ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10d390: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d394: 74 4a je 10d3e0 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10d396: 8b 43 08 mov 0x8(%ebx),%eax ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 10d399: 39 d8 cmp %ebx,%eax 10d39b: 75 0a jne 10d3a7 <_Heap_Walk+0x307> <== NEVER TAKEN 10d39d: eb 21 jmp 10d3c0 <_Heap_Walk+0x320> <== NOT EXECUTED 10d39f: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d3a0: 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 ) { 10d3a3: 39 d8 cmp %ebx,%eax 10d3a5: 74 19 je 10d3c0 <_Heap_Walk+0x320> if ( free_block == block ) { 10d3a7: 39 f0 cmp %esi,%eax 10d3a9: 75 f5 jne 10d3a0 <_Heap_Walk+0x300> 10d3ab: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d3ac: 39 7d d8 cmp %edi,-0x28(%ebp) 10d3af: 0f 84 22 fd ff ff je 10d0d7 <_Heap_Walk+0x37> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10d3b5: 8b 47 04 mov 0x4(%edi),%eax 10d3b8: 89 fe mov %edi,%esi 10d3ba: e9 e1 fe ff ff jmp 10d2a0 <_Heap_Walk+0x200> <== ALWAYS TAKEN 10d3bf: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d3c0: 56 push %esi 10d3c1: 68 1c 0d 12 00 push $0x120d1c 10d3c6: e9 d1 fd ff ff jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d3cb: 90 nop <== NOT EXECUTED Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10d3cc: b9 d4 0d 12 00 mov $0x120dd4,%ecx 10d3d1: eb 8b jmp 10d35e <_Heap_Walk+0x2be> <== ALWAYS TAKEN 10d3d3: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d3d4: c7 45 c8 c0 0d 12 00 movl $0x120dc0,-0x38(%ebp) 10d3db: e9 6a ff ff ff jmp 10d34a <_Heap_Walk+0x2aa> <== ALWAYS TAKEN return false; } if ( !prev_used ) { (*printer)( 10d3e0: 56 push %esi 10d3e1: 68 ec 0c 12 00 push $0x120cec 10d3e6: e9 b1 fd ff ff jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d3eb: 90 nop <== NOT EXECUTED " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d3ec: c7 45 c8 ca 0d 12 00 movl $0x120dca,-0x38(%ebp) 10d3f3: e9 52 ff ff ff jmp 10d34a <_Heap_Walk+0x2aa> <== ALWAYS TAKEN "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)" : ""), 10d3f8: b9 df 0d 12 00 mov $0x120ddf,%ecx 10d3fd: e9 5c ff ff ff jmp 10d35e <_Heap_Walk+0x2be> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d402: 83 ec 0c sub $0xc,%esp 10d405: 51 push %ecx 10d406: 56 push %esi 10d407: 68 f4 0b 12 00 push $0x120bf4 10d40c: e9 af fd ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d411: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d414: 83 ec 08 sub $0x8,%esp 10d417: ff 75 dc pushl -0x24(%ebp) 10d41a: 51 push %ecx 10d41b: 56 push %esi 10d41c: 68 24 0c 12 00 push $0x120c24 10d421: e9 9a fd ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d426: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d428: 83 ec 0c sub $0xc,%esp 10d42b: 57 push %edi 10d42c: 56 push %esi 10d42d: 68 50 0c 12 00 push $0x120c50 10d432: e9 89 fd ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d437: 53 push %ebx 10d438: 68 78 0d 12 00 push $0x120d78 10d43d: e9 5a fd ff ff jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d442: 51 push %ecx 10d443: 68 38 0b 12 00 push $0x120b38 10d448: e9 4f fd ff ff jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d44d: 83 ec 0c sub $0xc,%esp 10d450: 50 push %eax 10d451: 51 push %ecx 10d452: 68 68 0b 12 00 push $0x120b68 10d457: e9 64 fd ff ff jmp 10d1c0 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d45c: 51 push %ecx 10d45d: 68 8d 0d 12 00 push $0x120d8d 10d462: e9 35 fd ff ff jmp 10d19c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 0010d468 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10d468: 55 push %ebp 10d469: 89 e5 mov %esp,%ebp 10d46b: 83 ec 08 sub $0x8,%esp 10d46e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10d471: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10d475: 75 25 jne 10d49c <_Heap_Walk_print+0x34> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 10d477: 83 ec 08 sub $0x8,%esp 10d47a: 50 push %eax 10d47b: 68 f4 0d 12 00 push $0x120df4 10d480: e8 0f c0 ff ff call 109494 10d485: 83 c4 10 add $0x10,%esp ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10d488: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10d48b: 83 ec 08 sub $0x8,%esp 10d48e: 50 push %eax 10d48f: ff 75 10 pushl 0x10(%ebp) 10d492: e8 9d dd ff ff call 10b234 10d497: 83 c4 10 add $0x10,%esp va_end( ap ); } 10d49a: c9 leave 10d49b: c3 ret static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 10d49c: 83 ec 08 sub $0x8,%esp 10d49f: 50 push %eax 10d4a0: 68 e9 0d 12 00 push $0x120de9 10d4a5: e8 ea bf ff ff call 109494 10d4aa: 83 c4 10 add $0x10,%esp 10d4ad: eb d9 jmp 10d488 <_Heap_Walk_print+0x20> <== ALWAYS TAKEN 0010bbac <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bbac: 55 push %ebp 10bbad: 89 e5 mov %esp,%ebp 10bbaf: 53 push %ebx 10bbb0: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbb3: 8b 15 80 56 12 00 mov 0x125680,%edx 10bbb9: 85 d2 test %edx,%edx 10bbbb: 74 1a je 10bbd7 <_IO_Initialize_all_drivers+0x2b> <== ALWAYS TAKEN 10bbbd: 31 db xor %ebx,%ebx 10bbbf: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bbc0: 50 push %eax 10bbc1: 6a 00 push $0x0 10bbc3: 6a 00 push $0x0 10bbc5: 53 push %ebx 10bbc6: e8 b5 43 00 00 call 10ff80 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbcb: 43 inc %ebx 10bbcc: 83 c4 10 add $0x10,%esp 10bbcf: 39 1d 80 56 12 00 cmp %ebx,0x125680 10bbd5: 77 e9 ja 10bbc0 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bbd7: 8b 5d fc mov -0x4(%ebp),%ebx 10bbda: c9 leave 10bbdb: c3 ret 0010bbdc <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bbdc: 55 push %ebp 10bbdd: 89 e5 mov %esp,%ebp 10bbdf: 57 push %edi 10bbe0: 56 push %esi 10bbe1: 53 push %ebx 10bbe2: 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; 10bbe5: 8b 1d 54 12 12 00 mov 0x121254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bbeb: a1 50 12 12 00 mov 0x121250,%eax 10bbf0: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bbf3: 8b 35 4c 12 12 00 mov 0x12124c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bbf9: 39 f0 cmp %esi,%eax 10bbfb: 72 17 jb 10bc14 <_IO_Manager_initialization+0x38> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10bbfd: 89 1d 84 56 12 00 mov %ebx,0x125684 _IO_Number_of_drivers = number_of_drivers; 10bc03: 8b 45 e4 mov -0x1c(%ebp),%eax 10bc06: a3 80 56 12 00 mov %eax,0x125680 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc0b: 8d 65 f4 lea -0xc(%ebp),%esp 10bc0e: 5b pop %ebx 10bc0f: 5e pop %esi 10bc10: 5f pop %edi 10bc11: c9 leave 10bc12: c3 ret 10bc13: 90 nop <== NOT EXECUTED /* * 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 *) 10bc14: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bc17: c1 e1 03 shl $0x3,%ecx 10bc1a: 83 ec 0c sub $0xc,%esp 10bc1d: 51 push %ecx 10bc1e: 89 4d dc mov %ecx,-0x24(%ebp) 10bc21: e8 7a 28 00 00 call 10e4a0 <_Workspace_Allocate_or_fatal_error> 10bc26: 89 c2 mov %eax,%edx 10bc28: a3 84 56 12 00 mov %eax,0x125684 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bc2d: 89 35 80 56 12 00 mov %esi,0x125680 memset( 10bc33: 31 c0 xor %eax,%eax 10bc35: 8b 4d dc mov -0x24(%ebp),%ecx 10bc38: 89 d7 mov %edx,%edi 10bc3a: f3 aa rep stos %al,%es:(%edi) _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 10bc3c: 83 c4 10 add $0x10,%esp 10bc3f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bc42: 85 c9 test %ecx,%ecx 10bc44: 74 c5 je 10bc0b <_IO_Manager_initialization+0x2f> <== ALWAYS TAKEN 10bc46: a1 84 56 12 00 mov 0x125684,%eax 10bc4b: 89 45 e0 mov %eax,-0x20(%ebp) 10bc4e: 31 c0 xor %eax,%eax 10bc50: 31 d2 xor %edx,%edx 10bc52: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bc54: 8b 7d e0 mov -0x20(%ebp),%edi 10bc57: 01 c7 add %eax,%edi 10bc59: 8d 34 03 lea (%ebx,%eax,1),%esi 10bc5c: b9 06 00 00 00 mov $0x6,%ecx 10bc61: 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++ ) 10bc63: 42 inc %edx 10bc64: 83 c0 18 add $0x18,%eax 10bc67: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bc6a: 77 e8 ja 10bc54 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc6c: 8d 65 f4 lea -0xc(%ebp),%esp 10bc6f: 5b pop %ebx 10bc70: 5e pop %esi 10bc71: 5f pop %edi 10bc72: c9 leave 10bc73: c3 ret 0010c668 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10c668: 55 push %ebp 10c669: 89 e5 mov %esp,%ebp 10c66b: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10c66e: c6 05 a8 54 12 00 00 movb $0x0,0x1254a8 _ISR_Nest_level = 0; 10c675: c7 05 d4 53 12 00 00 movl $0x0,0x1253d4 10c67c: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10c67f: a1 3c 12 12 00 mov 0x12123c,%eax 10c684: 3b 05 10 12 12 00 cmp 0x121210,%eax 10c68a: 72 25 jb 10c6b1 <_ISR_Handler_initialization+0x49> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10c68c: 83 ec 0c sub $0xc,%esp 10c68f: 50 push %eax 10c690: e8 0b 1e 00 00 call 10e4a0 <_Workspace_Allocate_or_fatal_error> 10c695: a3 48 53 12 00 mov %eax,0x125348 /* 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); 10c69a: 8b 15 3c 12 12 00 mov 0x12123c,%edx 10c6a0: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10c6a4: 83 e0 f0 and $0xfffffff0,%eax 10c6a7: a3 08 53 12 00 mov %eax,0x125308 10c6ac: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10c6af: c9 leave 10c6b0: c3 ret _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) _Internal_error_Occurred( 10c6b1: 50 push %eax 10c6b2: 6a 05 push $0x5 10c6b4: 6a 01 push $0x1 10c6b6: 6a 00 push $0x0 10c6b8: e8 6b ff ff ff call 10c628 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010c628 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c628: 55 push %ebp 10c629: 89 e5 mov %esp,%ebp 10c62b: 53 push %ebx 10c62c: 83 ec 08 sub $0x8,%esp 10c62f: 8b 45 08 mov 0x8(%ebp),%eax 10c632: 8b 55 0c mov 0xc(%ebp),%edx 10c635: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c638: a3 e0 53 12 00 mov %eax,0x1253e0 _Internal_errors_What_happened.is_internal = is_internal; 10c63d: 88 15 e4 53 12 00 mov %dl,0x1253e4 _Internal_errors_What_happened.the_error = the_error; 10c643: 89 1d e8 53 12 00 mov %ebx,0x1253e8 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c649: 53 push %ebx 10c64a: 0f b6 d2 movzbl %dl,%edx 10c64d: 52 push %edx 10c64e: 50 push %eax 10c64f: e8 e4 1a 00 00 call 10e138 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c654: c7 05 00 55 12 00 05 movl $0x5,0x125500 <== NOT EXECUTED 10c65b: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c65e: fa cli <== NOT EXECUTED 10c65f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c661: f4 hlt <== NOT EXECUTED 10c662: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c665: eb fe jmp 10c665 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 00110540 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110540: 55 push %ebp 110541: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 110543: 8b 45 08 mov 0x8(%ebp),%eax 110546: 48 dec %eax 110547: 83 f8 03 cmp $0x3,%eax 11054a: 77 0c ja 110558 <_Objects_API_maximum_class+0x18> 11054c: 8b 04 85 70 fe 11 00 mov 0x11fe70(,%eax,4),%eax 110553: c9 leave 110554: c3 ret 110555: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110558: 31 c0 xor %eax,%eax 11055a: c9 leave 11055b: c3 ret 0010c6c0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c6c0: 55 push %ebp 10c6c1: 89 e5 mov %esp,%ebp 10c6c3: 56 push %esi 10c6c4: 53 push %ebx 10c6c5: 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 ) 10c6c8: 8b 43 18 mov 0x18(%ebx),%eax 10c6cb: 85 c0 test %eax,%eax 10c6cd: 75 0d jne 10c6dc <_Objects_Allocate+0x1c> <== NEVER TAKEN 10c6cf: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c6d1: 89 c8 mov %ecx,%eax 10c6d3: 8d 65 f8 lea -0x8(%ebp),%esp 10c6d6: 5b pop %ebx 10c6d7: 5e pop %esi 10c6d8: c9 leave 10c6d9: c3 ret 10c6da: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c6dc: 8d 73 20 lea 0x20(%ebx),%esi 10c6df: 83 ec 0c sub $0xc,%esp 10c6e2: 56 push %esi 10c6e3: e8 68 f7 ff ff call 10be50 <_Chain_Get> <== ALWAYS TAKEN 10c6e8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c6ea: 83 c4 10 add $0x10,%esp 10c6ed: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c6f1: 74 de je 10c6d1 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c6f3: 85 c0 test %eax,%eax 10c6f5: 74 29 je 10c720 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c6f7: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c6fb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c6ff: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c701: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c705: 31 d2 xor %edx,%edx 10c707: f7 f6 div %esi 10c709: c1 e0 02 shl $0x2,%eax 10c70c: 03 43 30 add 0x30(%ebx),%eax 10c70f: ff 08 decl (%eax) information->inactive--; 10c711: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c715: 89 c8 mov %ecx,%eax 10c717: 8d 65 f8 lea -0x8(%ebp),%esp 10c71a: 5b pop %ebx 10c71b: 5e pop %esi 10c71c: c9 leave 10c71d: c3 ret 10c71e: 66 90 xchg %ax,%ax <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 10c720: 83 ec 0c sub $0xc,%esp 10c723: 53 push %ebx 10c724: e8 3b 00 00 00 call 10c764 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c729: 89 34 24 mov %esi,(%esp) 10c72c: e8 1f f7 ff ff call 10be50 <_Chain_Get> <== ALWAYS TAKEN 10c731: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c733: 83 c4 10 add $0x10,%esp 10c736: 85 c0 test %eax,%eax 10c738: 74 97 je 10c6d1 <_Objects_Allocate+0x11> 10c73a: eb bb jmp 10c6f7 <_Objects_Allocate+0x37> <== ALWAYS TAKEN 0010c73c <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10c73c: 55 push %ebp 10c73d: 89 e5 mov %esp,%ebp 10c73f: 53 push %ebx 10c740: 83 ec 04 sub $0x4,%esp 10c743: 8b 45 08 mov 0x8(%ebp),%eax 10c746: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c749: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10c74d: 8b 48 1c mov 0x1c(%eax),%ecx 10c750: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c757: 89 55 0c mov %edx,0xc(%ebp) } 10c75a: 58 pop %eax 10c75b: 5b pop %ebx 10c75c: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c75d: e9 56 05 00 00 jmp 10ccb8 <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010c764 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c764: 55 push %ebp 10c765: 89 e5 mov %esp,%ebp 10c767: 57 push %edi 10c768: 56 push %esi 10c769: 53 push %ebx 10c76a: 83 ec 4c sub $0x4c,%esp 10c76d: 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 ); 10c770: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c774: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c777: 8b 4b 34 mov 0x34(%ebx),%ecx 10c77a: 85 c9 test %ecx,%ecx 10c77c: 0f 84 72 02 00 00 je 10c9f4 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c782: 8b 7b 10 mov 0x10(%ebx),%edi 10c785: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c789: 8b 7b 14 mov 0x14(%ebx),%edi 10c78c: 31 d2 xor %edx,%edx 10c78e: 8b 45 d4 mov -0x2c(%ebp),%eax 10c791: 66 f7 f7 div %di 10c794: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c797: 85 f6 test %esi,%esi 10c799: 0f 84 6c 02 00 00 je 10ca0b <_Objects_Extend_information+0x2a7> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10c79f: 8b 01 mov (%ecx),%eax 10c7a1: 85 c0 test %eax,%eax 10c7a3: 0f 84 72 02 00 00 je 10ca1b <_Objects_Extend_information+0x2b7> <== ALWAYS TAKEN 10c7a9: 0f b7 ff movzwl %di,%edi 10c7ac: 8b 55 d0 mov -0x30(%ebp),%edx 10c7af: 89 55 cc mov %edx,-0x34(%ebp) 10c7b2: 31 d2 xor %edx,%edx 10c7b4: 8b 45 cc mov -0x34(%ebp),%eax 10c7b7: eb 09 jmp 10c7c2 <_Objects_Extend_information+0x5e> <== ALWAYS TAKEN 10c7b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c7bc: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c7c0: 74 07 je 10c7c9 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c7c2: 01 f8 add %edi,%eax if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10c7c4: 42 inc %edx 10c7c5: 39 d6 cmp %edx,%esi 10c7c7: 77 f3 ja 10c7bc <_Objects_Extend_information+0x58> 10c7c9: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c7cc: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c7d0: 01 f8 add %edi,%eax 10c7d2: 89 45 d4 mov %eax,-0x2c(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10c7d5: 3d ff ff 00 00 cmp $0xffff,%eax 10c7da: 0f 87 b1 01 00 00 ja 10c991 <_Objects_Extend_information+0x22d> <== 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; 10c7e0: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c7e4: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c7e8: 0f 85 ae 01 00 00 jne 10c99c <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10c7ee: 83 ec 0c sub $0xc,%esp 10c7f1: 57 push %edi 10c7f2: 89 55 b4 mov %edx,-0x4c(%ebp) 10c7f5: e8 a6 1c 00 00 call 10e4a0 <_Workspace_Allocate_or_fatal_error> 10c7fa: 89 45 c4 mov %eax,-0x3c(%ebp) 10c7fd: 83 c4 10 add $0x10,%esp 10c800: 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 ) { 10c803: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c807: 39 45 cc cmp %eax,-0x34(%ebp) 10c80a: 0f 82 fe 00 00 00 jb 10c90e <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c810: 8d 7e 01 lea 0x1(%esi),%edi * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 10c813: 83 ec 0c sub $0xc,%esp 10c816: 8d 04 7f lea (%edi,%edi,2),%eax 10c819: 03 45 d4 add -0x2c(%ebp),%eax 10c81c: 03 45 d0 add -0x30(%ebp),%eax 10c81f: c1 e0 02 shl $0x2,%eax 10c822: 50 push %eax 10c823: 89 55 b4 mov %edx,-0x4c(%ebp) 10c826: e8 a1 1c 00 00 call 10e4cc <_Workspace_Allocate> 10c82b: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c82e: 83 c4 10 add $0x10,%esp 10c831: 85 c0 test %eax,%eax 10c833: 8b 55 b4 mov -0x4c(%ebp),%edx 10c836: 0f 84 ef 01 00 00 je 10ca2b <_Objects_Extend_information+0x2c7> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c83c: 8b 45 c8 mov -0x38(%ebp),%eax 10c83f: 8d 04 b8 lea (%eax,%edi,4),%eax 10c842: 89 45 b8 mov %eax,-0x48(%ebp) 10c845: 8b 4d c8 mov -0x38(%ebp),%ecx 10c848: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c84b: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10c84e: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c852: 39 45 d0 cmp %eax,-0x30(%ebp) 10c855: 0f 82 60 01 00 00 jb 10c9bb <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c85b: 8b 45 d0 mov -0x30(%ebp),%eax 10c85e: 85 c0 test %eax,%eax 10c860: 74 16 je 10c878 <_Objects_Extend_information+0x114> <== ALWAYS TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10c862: 31 c0 xor %eax,%eax 10c864: 8b 4d bc mov -0x44(%ebp),%ecx 10c867: 8b 7d d0 mov -0x30(%ebp),%edi 10c86a: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10c86c: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c873: 40 inc %eax 10c874: 39 c7 cmp %eax,%edi 10c876: 77 f4 ja 10c86c <_Objects_Extend_information+0x108> <== ALWAYS TAKEN 10c878: c1 e6 02 shl $0x2,%esi 10c87b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c87e: 8b 45 c8 mov -0x38(%ebp),%eax 10c881: 8b 7d c0 mov -0x40(%ebp),%edi 10c884: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c88b: 8b 4d b8 mov -0x48(%ebp),%ecx 10c88e: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10c895: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c899: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10c89c: 39 75 cc cmp %esi,-0x34(%ebp) 10c89f: 73 19 jae 10c8ba <_Objects_Extend_information+0x156> <== ALWAYS TAKEN 10c8a1: 8b 7d cc mov -0x34(%ebp),%edi 10c8a4: 8b 45 bc mov -0x44(%ebp),%eax 10c8a7: 8d 0c b8 lea (%eax,%edi,4),%ecx 10c8aa: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10c8ac: 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++ ) { 10c8b2: 40 inc %eax 10c8b3: 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 ; 10c8b6: 39 c6 cmp %eax,%esi 10c8b8: 77 f2 ja 10c8ac <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10c8ba: 9c pushf 10c8bb: fa cli 10c8bc: 5f pop %edi old_tables = information->object_blocks; 10c8bd: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10c8c0: 8b 45 c8 mov -0x38(%ebp),%eax 10c8c3: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10c8c6: 8b 45 b8 mov -0x48(%ebp),%eax 10c8c9: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10c8cc: 8b 45 bc mov -0x44(%ebp),%eax 10c8cf: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10c8d2: 8b 45 d4 mov -0x2c(%ebp),%eax 10c8d5: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10c8d9: 8b 33 mov (%ebx),%esi 10c8db: c1 e6 18 shl $0x18,%esi 10c8de: 81 ce 00 00 01 00 or $0x10000,%esi 10c8e4: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10c8e8: c1 e0 1b shl $0x1b,%eax 10c8eb: 09 c6 or %eax,%esi 10c8ed: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c8f1: 09 c6 or %eax,%esi 10c8f3: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10c8f6: 57 push %edi 10c8f7: 9d popf if ( old_tables ) 10c8f8: 85 c9 test %ecx,%ecx 10c8fa: 74 12 je 10c90e <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10c8fc: 83 ec 0c sub $0xc,%esp 10c8ff: 51 push %ecx 10c900: 89 55 b4 mov %edx,-0x4c(%ebp) 10c903: e8 e0 1b 00 00 call 10e4e8 <_Workspace_Free> 10c908: 83 c4 10 add $0x10,%esp 10c90b: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10c90e: c1 e2 02 shl $0x2,%edx 10c911: 89 55 d0 mov %edx,-0x30(%ebp) 10c914: 8b 43 34 mov 0x34(%ebx),%eax 10c917: 8b 4d c4 mov -0x3c(%ebp),%ecx 10c91a: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10c91d: ff 73 18 pushl 0x18(%ebx) 10c920: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c924: 52 push %edx 10c925: 8b 7d d0 mov -0x30(%ebp),%edi 10c928: ff 34 38 pushl (%eax,%edi,1) 10c92b: 8d 7d dc lea -0x24(%ebp),%edi 10c92e: 57 push %edi 10c92f: e8 ac 36 00 00 call 10ffe0 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10c934: 8d 43 20 lea 0x20(%ebx),%eax 10c937: 89 45 d4 mov %eax,-0x2c(%ebp) 10c93a: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10c93d: 83 c4 10 add $0x10,%esp 10c940: eb 2b jmp 10c96d <_Objects_Extend_information+0x209> <== ALWAYS TAKEN 10c942: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10c944: 8b 13 mov (%ebx),%edx 10c946: c1 e2 18 shl $0x18,%edx 10c949: 81 ca 00 00 01 00 or $0x10000,%edx 10c94f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10c953: c1 e1 1b shl $0x1b,%ecx 10c956: 09 ca or %ecx,%edx 10c958: 09 f2 or %esi,%edx 10c95a: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10c95d: 83 ec 08 sub $0x8,%esp 10c960: 50 push %eax 10c961: ff 75 d4 pushl -0x2c(%ebp) 10c964: e8 c3 f4 ff ff call 10be2c <_Chain_Append> <== ALWAYS TAKEN index++; 10c969: 46 inc %esi 10c96a: 83 c4 10 add $0x10,%esp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10c96d: 83 ec 0c sub $0xc,%esp 10c970: 57 push %edi 10c971: e8 da f4 ff ff call 10be50 <_Chain_Get> <== ALWAYS TAKEN 10c976: 83 c4 10 add $0x10,%esp 10c979: 85 c0 test %eax,%eax 10c97b: 75 c7 jne 10c944 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10c97d: 8b 43 30 mov 0x30(%ebx),%eax 10c980: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c984: 8b 4d d0 mov -0x30(%ebp),%ecx 10c987: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10c98a: 8b 43 14 mov 0x14(%ebx),%eax 10c98d: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10c991: 8d 65 f4 lea -0xc(%ebp),%esp 10c994: 5b pop %ebx 10c995: 5e pop %esi 10c996: 5f pop %edi 10c997: c9 leave 10c998: c3 ret 10c999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10c99c: 83 ec 0c sub $0xc,%esp 10c99f: 57 push %edi 10c9a0: 89 55 b4 mov %edx,-0x4c(%ebp) 10c9a3: e8 24 1b 00 00 call 10e4cc <_Workspace_Allocate> 10c9a8: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10c9ab: 83 c4 10 add $0x10,%esp 10c9ae: 85 c0 test %eax,%eax 10c9b0: 8b 55 b4 mov -0x4c(%ebp),%edx 10c9b3: 0f 85 4a fe ff ff jne 10c803 <_Objects_Extend_information+0x9f> 10c9b9: eb d6 jmp 10c991 <_Objects_Extend_information+0x22d> <== ALWAYS TAKEN /* * 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, 10c9bb: c1 e6 02 shl $0x2,%esi 10c9be: 89 75 c0 mov %esi,-0x40(%ebp) 10c9c1: 8b 73 34 mov 0x34(%ebx),%esi 10c9c4: 8b 7d c8 mov -0x38(%ebp),%edi 10c9c7: 8b 4d c0 mov -0x40(%ebp),%ecx 10c9ca: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10c9cc: 8b 73 30 mov 0x30(%ebx),%esi 10c9cf: 8b 7d b8 mov -0x48(%ebp),%edi 10c9d2: 8b 4d c0 mov -0x40(%ebp),%ecx 10c9d5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10c9d7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c9db: 03 45 d0 add -0x30(%ebp),%eax 10c9de: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10c9e5: 8b 73 1c mov 0x1c(%ebx),%esi 10c9e8: 8b 7d bc mov -0x44(%ebp),%edi 10c9eb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10c9ed: e9 8c fe ff ff jmp 10c87e <_Objects_Extend_information+0x11a> <== ALWAYS TAKEN 10c9f2: 66 90 xchg %ax,%ax <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c9f4: 8b 53 10 mov 0x10(%ebx),%edx 10c9f7: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10c9fb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10c9ff: 89 45 cc mov %eax,-0x34(%ebp) 10ca02: 31 d2 xor %edx,%edx 10ca04: 31 f6 xor %esi,%esi 10ca06: e9 c1 fd ff ff jmp 10c7cc <_Objects_Extend_information+0x68> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10ca0b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10ca0e: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10ca11: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10ca14: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ca16: e9 b1 fd ff ff jmp 10c7cc <_Objects_Extend_information+0x68> <== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10ca1b: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10ca1e: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10ca21: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10ca24: 31 d2 xor %edx,%edx <== NOT EXECUTED 10ca26: e9 a1 fd ff ff jmp 10c7cc <_Objects_Extend_information+0x68> <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10ca2b: 83 ec 0c sub $0xc,%esp 10ca2e: ff 75 c4 pushl -0x3c(%ebp) 10ca31: e8 b2 1a 00 00 call 10e4e8 <_Workspace_Free> return; 10ca36: 83 c4 10 add $0x10,%esp 10ca39: e9 53 ff ff ff jmp 10c991 <_Objects_Extend_information+0x22d> <== ALWAYS TAKEN 0010ca40 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10ca40: 55 push %ebp 10ca41: 89 e5 mov %esp,%ebp 10ca43: 57 push %edi 10ca44: 56 push %esi 10ca45: 53 push %ebx 10ca46: 83 ec 14 sub $0x14,%esp 10ca49: 8b 5d 08 mov 0x8(%ebp),%ebx 10ca4c: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10ca4f: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10ca52: 56 push %esi 10ca53: 8d 43 20 lea 0x20(%ebx),%eax 10ca56: 50 push %eax 10ca57: e8 d0 f3 ff ff call 10be2c <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10ca5c: 83 c4 10 add $0x10,%esp 10ca5f: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10ca63: 74 33 je 10ca98 <_Objects_Free+0x58> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10ca65: 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 ) - 10ca68: 0f b7 46 08 movzwl 0x8(%esi),%eax 10ca6c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10ca70: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10ca72: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10ca76: 31 d2 xor %edx,%edx 10ca78: f7 f6 div %esi 10ca7a: c1 e0 02 shl $0x2,%eax 10ca7d: 03 43 30 add 0x30(%ebx),%eax 10ca80: ff 00 incl (%eax) information->inactive++; 10ca82: 8b 43 2c mov 0x2c(%ebx),%eax 10ca85: 40 inc %eax 10ca86: 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 ) ) ) { 10ca8a: 0f b7 c0 movzwl %ax,%eax 10ca8d: 89 ca mov %ecx,%edx 10ca8f: d1 ea shr %edx 10ca91: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10ca94: 39 c8 cmp %ecx,%eax 10ca96: 77 08 ja 10caa0 <_Objects_Free+0x60> _Objects_Shrink_information( information ); } } } 10ca98: 8d 65 f4 lea -0xc(%ebp),%esp 10ca9b: 5b pop %ebx 10ca9c: 5e pop %esi 10ca9d: 5f pop %edi 10ca9e: c9 leave 10ca9f: c3 ret * 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 ); 10caa0: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10caa3: 8d 65 f4 lea -0xc(%ebp),%esp 10caa6: 5b pop %ebx 10caa7: 5e pop %esi 10caa8: 5f pop %edi 10caa9: 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 ); 10caaa: e9 91 02 00 00 jmp 10cd40 <_Objects_Shrink_information> <== ALWAYS TAKEN 0010cb70 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cb70: 55 push %ebp 10cb71: 89 e5 mov %esp,%ebp 10cb73: 53 push %ebx 10cb74: 83 ec 14 sub $0x14,%esp 10cb77: 8b 55 08 mov 0x8(%ebp),%edx 10cb7a: 8b 5d 10 mov 0x10(%ebp),%ebx * always NULL. * * If the Id is valid but the object has not been created yet, then * the local_table entry will be NULL. */ index = id - information->minimum_id + 1; 10cb7d: b8 01 00 00 00 mov $0x1,%eax 10cb82: 2b 42 08 sub 0x8(%edx),%eax 10cb85: 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 ) { 10cb88: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cb8c: 39 c8 cmp %ecx,%eax 10cb8e: 77 24 ja 10cbb4 <_Objects_Get+0x44> 10cb90: 8b 0d 38 53 12 00 mov 0x125338,%ecx 10cb96: 41 inc %ecx 10cb97: 89 0d 38 53 12 00 mov %ecx,0x125338 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cb9d: 8b 52 1c mov 0x1c(%edx),%edx 10cba0: 8b 04 82 mov (%edx,%eax,4),%eax 10cba3: 85 c0 test %eax,%eax 10cba5: 74 1b je 10cbc2 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cba7: c7 03 00 00 00 00 movl $0x0,(%ebx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cbad: 83 c4 14 add $0x14,%esp 10cbb0: 5b pop %ebx 10cbb1: c9 leave 10cbb2: c3 ret 10cbb3: 90 nop <== NOT EXECUTED /* * Object Id is not within this API and Class on this node. So * it may be global in a multiprocessing system. But it is clearly * invalid on a single processor system. */ *location = OBJECTS_ERROR; 10cbb4: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cbba: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cbbc: 83 c4 14 add $0x14,%esp 10cbbf: 5b pop %ebx 10cbc0: c9 leave 10cbc1: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cbc2: 89 45 f4 mov %eax,-0xc(%ebp) 10cbc5: e8 ee 07 00 00 call 10d3b8 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10cbca: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cbd0: 8b 45 f4 mov -0xc(%ebp),%eax 10cbd3: eb d8 jmp 10cbad <_Objects_Get+0x3d> <== ALWAYS TAKEN 0010cad0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cad0: 55 push %ebp 10cad1: 89 e5 mov %esp,%ebp 10cad3: 56 push %esi 10cad4: 53 push %ebx 10cad5: 8b 75 08 mov 0x8(%ebp),%esi 10cad8: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cadb: 85 db test %ebx,%ebx 10cadd: 75 09 jne 10cae8 <_Objects_Get_information+0x18> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10cadf: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10cae1: 8d 65 f8 lea -0x8(%ebp),%esp 10cae4: 5b pop %ebx 10cae5: 5e pop %esi 10cae6: c9 leave 10cae7: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10cae8: 83 ec 0c sub $0xc,%esp 10caeb: 56 push %esi 10caec: e8 4f 3a 00 00 call 110540 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10caf1: 83 c4 10 add $0x10,%esp 10caf4: 85 c0 test %eax,%eax 10caf6: 74 e7 je 10cadf <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10caf8: 39 c3 cmp %eax,%ebx 10cafa: 77 e3 ja 10cadf <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cafc: 8b 04 b5 0c 53 12 00 mov 0x12530c(,%esi,4),%eax 10cb03: 85 c0 test %eax,%eax 10cb05: 74 d8 je 10cadf <_Objects_Get_information+0xf> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cb07: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10cb0a: 85 c0 test %eax,%eax 10cb0c: 74 d3 je 10cae1 <_Objects_Get_information+0x11> <== 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 ) 10cb0e: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cb13: 75 cc jne 10cae1 <_Objects_Get_information+0x11> 10cb15: eb c8 jmp 10cadf <_Objects_Get_information+0xf> <== ALWAYS TAKEN 0010cab0 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10cab0: 55 push %ebp 10cab1: 89 e5 mov %esp,%ebp 10cab3: 83 ec 10 sub $0x10,%esp 10cab6: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10cab9: 89 c2 mov %eax,%edx 10cabb: c1 ea 1b shr $0x1b,%edx 10cabe: 52 push %edx 10cabf: c1 e8 18 shr $0x18,%eax 10cac2: 83 e0 07 and $0x7,%eax 10cac5: 50 push %eax 10cac6: e8 05 00 00 00 call 10cad0 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10cacb: c9 leave 10cacc: c3 ret 0010cb18 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cb18: 55 push %ebp 10cb19: 89 e5 mov %esp,%ebp 10cb1b: 56 push %esi 10cb1c: 53 push %ebx 10cb1d: 8b 55 08 mov 0x8(%ebp),%edx 10cb20: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cb23: b8 01 00 00 00 mov $0x1,%eax 10cb28: 2b 42 08 sub 0x8(%edx),%eax 10cb2b: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cb2e: 9c pushf 10cb2f: fa cli 10cb30: 5e pop %esi if ( information->maximum >= index ) { 10cb31: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cb35: 39 c8 cmp %ecx,%eax 10cb37: 77 1b ja 10cb54 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cb39: 8b 52 1c mov 0x1c(%edx),%edx 10cb3c: 8b 04 82 mov (%edx,%eax,4),%eax 10cb3f: 85 c0 test %eax,%eax 10cb41: 74 21 je 10cb64 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cb43: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cb49: 8b 55 14 mov 0x14(%ebp),%edx 10cb4c: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cb4e: 5b pop %ebx 10cb4f: 5e pop %esi 10cb50: c9 leave 10cb51: c3 ret 10cb52: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cb54: 56 push %esi 10cb55: 9d popf *location = OBJECTS_ERROR; 10cb56: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cb5c: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cb5e: 5b pop %ebx 10cb5f: 5e pop %esi 10cb60: c9 leave 10cb61: c3 ret 10cb62: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 10cb64: 56 push %esi 10cb65: 9d popf *location = OBJECTS_ERROR; 10cb66: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cb6c: eb e0 jmp 10cb4e <_Objects_Get_isr_disable+0x36> <== ALWAYS TAKEN 00117d04 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 117d04: 55 push %ebp 117d05: 89 e5 mov %esp,%ebp 117d07: 57 push %edi 117d08: 56 push %esi 117d09: 53 push %ebx 117d0a: 83 ec 2c sub $0x2c,%esp 117d0d: 8b 7d 08 mov 0x8(%ebp),%edi 117d10: 8b 75 0c mov 0xc(%ebp),%esi 117d13: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 117d16: 85 f6 test %esi,%esi 117d18: 75 0e jne 117d28 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 117d1a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 117d1c: 89 d8 mov %ebx,%eax 117d1e: 8d 65 f4 lea -0xc(%ebp),%esp 117d21: 5b pop %ebx 117d22: 5e pop %esi 117d23: 5f pop %edi 117d24: c9 leave 117d25: c3 ret 117d26: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 117d28: 85 db test %ebx,%ebx 117d2a: 74 f0 je 117d1c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 117d2c: 85 ff test %edi,%edi 117d2e: 75 08 jne 117d38 <_Objects_Get_name_as_string+0x34> 117d30: a1 18 39 13 00 mov 0x133918,%eax 117d35: 8b 78 08 mov 0x8(%eax),%edi information = _Objects_Get_information_id( tmpId ); 117d38: 83 ec 0c sub $0xc,%esp 117d3b: 57 push %edi 117d3c: e8 6f 9a ff ff call 1117b0 <_Objects_Get_information_id> <== ALWAYS TAKEN if ( !information ) 117d41: 83 c4 10 add $0x10,%esp 117d44: 85 c0 test %eax,%eax 117d46: 74 d2 je 117d1a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 117d48: 51 push %ecx 117d49: 8d 55 e4 lea -0x1c(%ebp),%edx 117d4c: 52 push %edx 117d4d: 57 push %edi 117d4e: 50 push %eax 117d4f: e8 1c 9b ff ff call 111870 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 117d54: 83 c4 10 add $0x10,%esp 117d57: 8b 55 e4 mov -0x1c(%ebp),%edx 117d5a: 85 d2 test %edx,%edx 117d5c: 75 bc jne 117d1a <_Objects_Get_name_as_string+0x16> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 117d5e: 8b 50 0c mov 0xc(%eax),%edx lname[ 0 ] = (u32_name >> 24) & 0xff; 117d61: 89 d1 mov %edx,%ecx 117d63: c1 e9 18 shr $0x18,%ecx 117d66: 88 c8 mov %cl,%al 117d68: 88 4d df mov %cl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 117d6b: 89 d1 mov %edx,%ecx 117d6d: c1 e9 10 shr $0x10,%ecx 117d70: 88 4d e0 mov %cl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 117d73: 89 d1 mov %edx,%ecx 117d75: c1 e9 08 shr $0x8,%ecx 117d78: 88 4d e1 mov %cl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 117d7b: 88 55 e2 mov %dl,-0x1e(%ebp) lname[ 4 ] = '\0'; 117d7e: c6 45 e3 00 movb $0x0,-0x1d(%ebp) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117d82: 4e dec %esi 117d83: 89 75 d4 mov %esi,-0x2c(%ebp) 117d86: 74 3c je 117dc4 <_Objects_Get_name_as_string+0xc0> <== ALWAYS TAKEN 117d88: 84 c0 test %al,%al 117d8a: 74 38 je 117dc4 <_Objects_Get_name_as_string+0xc0> 117d8c: 89 d9 mov %ebx,%ecx 117d8e: 31 d2 xor %edx,%edx 117d90: eb 0a jmp 117d9c <_Objects_Get_name_as_string+0x98> <== ALWAYS TAKEN 117d92: 66 90 xchg %ax,%ax <== NOT EXECUTED 117d94: 8a 44 15 df mov -0x21(%ebp,%edx,1),%al 117d98: 84 c0 test %al,%al 117d9a: 74 1b je 117db7 <_Objects_Get_name_as_string+0xb3> *d = (isprint((unsigned char)*s)) ? *s : '*'; 117d9c: 0f b6 f0 movzbl %al,%esi 117d9f: 8b 3d b8 0e 13 00 mov 0x130eb8,%edi 117da5: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1) 117daa: 75 02 jne 117dae <_Objects_Get_name_as_string+0xaa> 117dac: b0 2a mov $0x2a,%al 117dae: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117db0: 42 inc %edx 117db1: 41 inc %ecx 117db2: 3b 55 d4 cmp -0x2c(%ebp),%edx 117db5: 72 dd jb 117d94 <_Objects_Get_name_as_string+0x90> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 117db7: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 117dba: e8 61 a3 ff ff call 112120 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; 117dbf: e9 58 ff ff ff jmp 117d1c <_Objects_Get_name_as_string+0x18> <== ALWAYS TAKEN s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 117dc4: 89 d9 mov %ebx,%ecx 117dc6: eb ef jmp 117db7 <_Objects_Get_name_as_string+0xb3> <== ALWAYS TAKEN 0011a338 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11a338: 55 push %ebp 11a339: 89 e5 mov %esp,%ebp 11a33b: 57 push %edi 11a33c: 56 push %esi 11a33d: 53 push %ebx 11a33e: 83 ec 0c sub $0xc,%esp 11a341: 8b 5d 08 mov 0x8(%ebp),%ebx 11a344: 8b 75 0c mov 0xc(%ebp),%esi 11a347: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11a34a: 85 db test %ebx,%ebx 11a34c: 75 0a jne 11a358 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11a34e: 31 c0 xor %eax,%eax } 11a350: 8d 65 f4 lea -0xc(%ebp),%esp 11a353: 5b pop %ebx 11a354: 5e pop %esi 11a355: 5f pop %edi 11a356: c9 leave 11a357: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11a358: 85 ff test %edi,%edi 11a35a: 74 f2 je 11a34e <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11a35c: 8b 45 14 mov 0x14(%ebp),%eax 11a35f: 85 c0 test %eax,%eax 11a361: 74 eb je 11a34e <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11a363: 66 85 f6 test %si,%si 11a366: 75 04 jne 11a36c <_Objects_Get_next+0x34> next_id = information->minimum_id; 11a368: 8b 73 08 mov 0x8(%ebx),%esi 11a36b: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11a36c: 66 39 73 10 cmp %si,0x10(%ebx) 11a370: 72 22 jb 11a394 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11a372: 51 push %ecx 11a373: 57 push %edi 11a374: 56 push %esi 11a375: 53 push %ebx 11a376: e8 f5 74 ff ff call 111870 <_Objects_Get> <== ALWAYS TAKEN next_id++; 11a37b: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11a37c: 83 c4 10 add $0x10,%esp 11a37f: 8b 17 mov (%edi),%edx 11a381: 85 d2 test %edx,%edx 11a383: 75 e7 jne 11a36c <_Objects_Get_next+0x34> *next_id_p = next_id; 11a385: 8b 55 14 mov 0x14(%ebp),%edx 11a388: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11a38a: 8d 65 f4 lea -0xc(%ebp),%esp 11a38d: 5b pop %ebx 11a38e: 5e pop %esi 11a38f: 5f pop %edi 11a390: c9 leave 11a391: c3 ret 11a392: 66 90 xchg %ax,%ax <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 11a394: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11a39a: 8b 45 14 mov 0x14(%ebp),%eax 11a39d: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11a3a3: 31 c0 xor %eax,%eax return 0; 11a3a5: eb a9 jmp 11a350 <_Objects_Get_next+0x18> <== ALWAYS TAKEN 0011aae8 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11aae8: 55 push %ebp 11aae9: 89 e5 mov %esp,%ebp 11aaeb: 53 push %ebx 11aaec: 8b 55 08 mov 0x8(%ebp),%edx 11aaef: 8b 5d 10 mov 0x10(%ebp),%ebx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 11aaf2: b8 01 00 00 00 mov $0x1,%eax 11aaf7: 2b 42 08 sub 0x8(%edx),%eax 11aafa: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11aafd: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11ab01: 39 c8 cmp %ecx,%eax 11ab03: 77 13 ja 11ab18 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11ab05: 8b 52 1c mov 0x1c(%edx),%edx 11ab08: 8b 04 82 mov (%edx,%eax,4),%eax 11ab0b: 85 c0 test %eax,%eax 11ab0d: 74 09 je 11ab18 <_Objects_Get_no_protection+0x30> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11ab0f: c7 03 00 00 00 00 movl $0x0,(%ebx) * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 11ab15: 5b pop %ebx 11ab16: c9 leave 11ab17: c3 ret /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 11ab18: c7 03 01 00 00 00 movl $0x1,(%ebx) 11ab1e: 31 c0 xor %eax,%eax return NULL; } 11ab20: 5b pop %ebx 11ab21: c9 leave 11ab22: c3 ret 001118d8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 1118d8: 55 push %ebp 1118d9: 89 e5 mov %esp,%ebp 1118db: 83 ec 18 sub $0x18,%esp 1118de: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1118e1: 85 d2 test %edx,%edx 1118e3: 75 08 jne 1118ed <_Objects_Id_to_name+0x15> 1118e5: a1 18 39 13 00 mov 0x133918,%eax 1118ea: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 1118ed: 89 d0 mov %edx,%eax 1118ef: c1 e8 18 shr $0x18,%eax 1118f2: 83 e0 07 and $0x7,%eax */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 1118f5: 8d 48 ff lea -0x1(%eax),%ecx 1118f8: 83 f9 03 cmp $0x3,%ecx 1118fb: 77 3b ja 111938 <_Objects_Id_to_name+0x60> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 1118fd: 8b 04 85 2c 38 13 00 mov 0x13382c(,%eax,4),%eax 111904: 85 c0 test %eax,%eax 111906: 74 30 je 111938 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 111908: 89 d1 mov %edx,%ecx 11190a: c1 e9 1b shr $0x1b,%ecx 11190d: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 111910: 85 c0 test %eax,%eax 111912: 74 24 je 111938 <_Objects_Id_to_name+0x60> <== 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 ); 111914: 51 push %ecx 111915: 8d 4d f4 lea -0xc(%ebp),%ecx 111918: 51 push %ecx 111919: 52 push %edx 11191a: 50 push %eax 11191b: e8 50 ff ff ff call 111870 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 111920: 83 c4 10 add $0x10,%esp 111923: 85 c0 test %eax,%eax 111925: 74 11 je 111938 <_Objects_Id_to_name+0x60> return OBJECTS_INVALID_ID; *name = the_object->name; 111927: 8b 50 0c mov 0xc(%eax),%edx 11192a: 8b 45 0c mov 0xc(%ebp),%eax 11192d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 11192f: e8 ec 07 00 00 call 112120 <_Thread_Enable_dispatch> 111934: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 111936: c9 leave 111937: c3 ret if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 111938: b8 03 00 00 00 mov $0x3,%eax } 11193d: c9 leave 11193e: c3 ret 0010cbd8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cbd8: 55 push %ebp 10cbd9: 89 e5 mov %esp,%ebp 10cbdb: 57 push %edi 10cbdc: 56 push %esi 10cbdd: 53 push %ebx 10cbde: 83 ec 0c sub $0xc,%esp 10cbe1: 8b 45 08 mov 0x8(%ebp),%eax 10cbe4: 8b 55 0c mov 0xc(%ebp),%edx 10cbe7: 8b 5d 10 mov 0x10(%ebp),%ebx 10cbea: 8b 75 20 mov 0x20(%ebp),%esi 10cbed: 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; 10cbf1: 89 10 mov %edx,(%eax) information->the_class = the_class; 10cbf3: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10cbf7: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10cbfa: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10cc01: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10cc08: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10cc0f: 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; 10cc15: 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; 10cc1b: 8b 3c 95 0c 53 12 00 mov 0x12530c(,%edx,4),%edi 10cc22: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10cc25: 8b 7d 14 mov 0x14(%ebp),%edi 10cc28: 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 = 10cc2b: 89 f9 mov %edi,%ecx 10cc2d: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cc30: 8b 4d 14 mov 0x14(%ebp),%ecx 10cc33: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cc39: 85 ff test %edi,%edi 10cc3b: 74 04 je 10cc41 <_Objects_Initialize_information+0x69> 10cc3d: 85 c9 test %ecx,%ecx 10cc3f: 74 6a je 10ccab <_Objects_Initialize_information+0xd3> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cc41: 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; 10cc45: c7 40 1c 64 4f 12 00 movl $0x124f64,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cc4c: c1 e2 18 shl $0x18,%edx 10cc4f: 81 ca 00 00 01 00 or $0x10000,%edx 10cc55: c1 e3 1b shl $0x1b,%ebx 10cc58: 09 da or %ebx,%edx 10cc5a: 31 db xor %ebx,%ebx 10cc5c: 85 c9 test %ecx,%ecx 10cc5e: 0f 95 c3 setne %bl 10cc61: 09 da or %ebx,%edx 10cc63: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cc66: f7 c6 03 00 00 00 test $0x3,%esi 10cc6c: 75 26 jne 10cc94 <_Objects_Initialize_information+0xbc> <== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cc6e: 66 89 70 38 mov %si,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10cc72: 8d 50 24 lea 0x24(%eax),%edx 10cc75: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10cc78: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10cc7f: 8d 50 20 lea 0x20(%eax),%edx 10cc82: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cc85: 85 c9 test %ecx,%ecx 10cc87: 75 13 jne 10cc9c <_Objects_Initialize_information+0xc4> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cc89: 8d 65 f4 lea -0xc(%ebp),%esp 10cc8c: 5b pop %ebx 10cc8d: 5e pop %esi 10cc8e: 5f pop %edi 10cc8f: c9 leave 10cc90: c3 ret 10cc91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10cc94: 83 c6 04 add $0x4,%esi <== NOT EXECUTED 10cc97: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED 10cc9a: eb d2 jmp 10cc6e <_Objects_Initialize_information+0x96> <== NOT EXECUTED /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10cc9c: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cc9f: 8d 65 f4 lea -0xc(%ebp),%esp 10cca2: 5b pop %ebx 10cca3: 5e pop %esi 10cca4: 5f pop %edi 10cca5: 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 ); 10cca6: e9 b9 fa ff ff jmp 10c764 <_Objects_Extend_information> <== ALWAYS TAKEN /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10ccab: 50 push %eax 10ccac: 6a 14 push $0x14 10ccae: 6a 01 push $0x1 10ccb0: 6a 00 push $0x0 10ccb2: e8 71 f9 ff ff call 10c628 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010ccc8 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10ccc8: 55 push %ebp 10ccc9: 89 e5 mov %esp,%ebp 10cccb: 57 push %edi 10cccc: 56 push %esi 10cccd: 53 push %ebx 10ccce: 8b 45 08 mov 0x8(%ebp),%eax 10ccd1: 8b 4d 0c mov 0xc(%ebp),%ecx 10ccd4: 8b 55 10 mov 0x10(%ebp),%edx 10ccd7: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ccda: 85 ff test %edi,%edi 10ccdc: 74 56 je 10cd34 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10ccde: 85 c9 test %ecx,%ecx 10cce0: 74 08 je 10ccea <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cce2: 8b 70 10 mov 0x10(%eax),%esi 10cce5: 66 85 f6 test %si,%si 10cce8: 75 0a jne 10ccf4 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10ccea: 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 } 10ccef: 5b pop %ebx 10ccf0: 5e pop %esi 10ccf1: 5f pop %edi 10ccf2: c9 leave 10ccf3: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ccf4: 85 d2 test %edx,%edx 10ccf6: 75 20 jne 10cd18 <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10ccf8: 0f b7 f6 movzwl %si,%esi 10ccfb: 8b 58 1c mov 0x1c(%eax),%ebx 10ccfe: b8 01 00 00 00 mov $0x1,%eax 10cd03: 90 nop the_object = information->local_table[ index ]; 10cd04: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10cd07: 85 d2 test %edx,%edx 10cd09: 74 05 je 10cd10 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10cd0b: 39 4a 0c cmp %ecx,0xc(%edx) 10cd0e: 74 18 je 10cd28 <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10cd10: 40 inc %eax 10cd11: 39 c6 cmp %eax,%esi 10cd13: 73 ef jae 10cd04 <_Objects_Name_to_id_u32+0x3c> 10cd15: eb d3 jmp 10ccea <_Objects_Name_to_id_u32+0x22> <== ALWAYS TAKEN 10cd17: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cd18: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10cd1e: 74 d8 je 10ccf8 <_Objects_Name_to_id_u32+0x30> 10cd20: 4a dec %edx 10cd21: 75 c7 jne 10ccea <_Objects_Name_to_id_u32+0x22> 10cd23: eb d3 jmp 10ccf8 <_Objects_Name_to_id_u32+0x30> <== ALWAYS TAKEN 10cd25: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 10cd28: 8b 42 08 mov 0x8(%edx),%eax 10cd2b: 89 07 mov %eax,(%edi) 10cd2d: 31 c0 xor %eax,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cd2f: 5b pop %ebx 10cd30: 5e pop %esi 10cd31: 5f pop %edi 10cd32: c9 leave 10cd33: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cd34: b8 02 00 00 00 mov $0x2,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10cd39: 5b pop %ebx 10cd3a: 5e pop %esi 10cd3b: 5f pop %edi 10cd3c: c9 leave 10cd3d: c3 ret 0010eab8 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10eab8: 55 push %ebp 10eab9: 89 e5 mov %esp,%ebp 10eabb: 53 push %ebx 10eabc: 83 ec 0c sub $0xc,%esp 10eabf: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10eac2: 8b 45 08 mov 0x8(%ebp),%eax 10eac5: 0f b7 40 38 movzwl 0x38(%eax),%eax 10eac9: 50 push %eax 10eaca: 53 push %ebx 10eacb: e8 20 66 00 00 call 1150f0 d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10ead0: 0f be 0b movsbl (%ebx),%ecx 10ead3: c1 e1 18 shl $0x18,%ecx 10ead6: 83 c4 10 add $0x10,%esp 10ead9: 83 f8 01 cmp $0x1,%eax 10eadc: 76 32 jbe 10eb10 <_Objects_Set_name+0x58> 10eade: 0f be 53 01 movsbl 0x1(%ebx),%edx 10eae2: c1 e2 10 shl $0x10,%edx 10eae5: 09 ca or %ecx,%edx 10eae7: 83 f8 02 cmp $0x2,%eax 10eaea: 74 2c je 10eb18 <_Objects_Set_name+0x60> 10eaec: 0f be 4b 02 movsbl 0x2(%ebx),%ecx 10eaf0: c1 e1 08 shl $0x8,%ecx 10eaf3: 09 d1 or %edx,%ecx 10eaf5: 83 f8 03 cmp $0x3,%eax 10eaf8: 74 37 je 10eb31 <_Objects_Set_name+0x79> 10eafa: 0f be 43 03 movsbl 0x3(%ebx),%eax 10eafe: 09 c1 or %eax,%ecx 10eb00: 8b 55 0c mov 0xc(%ebp),%edx 10eb03: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10eb06: b0 01 mov $0x1,%al 10eb08: 8b 5d fc mov -0x4(%ebp),%ebx 10eb0b: c9 leave 10eb0c: c3 ret 10eb0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eb10: 89 ca mov %ecx,%edx 10eb12: 81 ca 00 00 20 00 or $0x200000,%edx 10eb18: 89 d1 mov %edx,%ecx 10eb1a: 80 cd 20 or $0x20,%ch 10eb1d: b8 20 00 00 00 mov $0x20,%eax 10eb22: 09 c1 or %eax,%ecx 10eb24: 8b 55 0c mov 0xc(%ebp),%edx 10eb27: 89 4a 0c mov %ecx,0xc(%edx) ); } return true; } 10eb2a: b0 01 mov $0x1,%al 10eb2c: 8b 5d fc mov -0x4(%ebp),%ebx 10eb2f: c9 leave 10eb30: c3 ret d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10eb31: b0 20 mov $0x20,%al 10eb33: eb c9 jmp 10eafe <_Objects_Set_name+0x46> <== ALWAYS TAKEN 0010cd40 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10cd40: 55 push %ebp 10cd41: 89 e5 mov %esp,%ebp 10cd43: 57 push %edi 10cd44: 56 push %esi 10cd45: 53 push %ebx 10cd46: 83 ec 1c sub $0x1c,%esp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 10cd49: 8b 45 08 mov 0x8(%ebp),%eax 10cd4c: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10cd50: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10cd54: 0f b7 40 10 movzwl 0x10(%eax),%eax 10cd58: 29 d8 sub %ebx,%eax 10cd5a: 31 d2 xor %edx,%edx 10cd5c: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cd5e: 85 c0 test %eax,%eax 10cd60: 74 21 je 10cd83 <_Objects_Shrink_information+0x43> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 10cd62: 8b 55 08 mov 0x8(%ebp),%edx 10cd65: 8b 7a 30 mov 0x30(%edx),%edi 10cd68: 3b 0f cmp (%edi),%ecx 10cd6a: 74 1f je 10cd8b <_Objects_Shrink_information+0x4b> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10cd6c: 31 d2 xor %edx,%edx 10cd6e: eb 0e jmp 10cd7e <_Objects_Shrink_information+0x3e> <== ALWAYS TAKEN } index_base += information->allocation_size; 10cd70: 01 cb add %ecx,%ebx 10cd72: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cd79: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10cd7c: 74 12 je 10cd90 <_Objects_Shrink_information+0x50> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10cd7e: 42 inc %edx 10cd7f: 39 d0 cmp %edx,%eax 10cd81: 77 ed ja 10cd70 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10cd83: 8d 65 f4 lea -0xc(%ebp),%esp 10cd86: 5b pop %ebx 10cd87: 5e pop %esi 10cd88: 5f pop %edi 10cd89: c9 leave 10cd8a: c3 ret index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10cd8b: 31 f6 xor %esi,%esi <== NOT EXECUTED 10cd8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10cd90: 8b 55 08 mov 0x8(%ebp),%edx 10cd93: 8b 42 20 mov 0x20(%edx),%eax 10cd96: 89 75 e4 mov %esi,-0x1c(%ebp) 10cd99: eb 07 jmp 10cda2 <_Objects_Shrink_information+0x62> <== ALWAYS TAKEN 10cd9b: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10cd9c: 85 ff test %edi,%edi 10cd9e: 74 2c je 10cdcc <_Objects_Shrink_information+0x8c> 10cda0: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10cda2: 0f b7 50 08 movzwl 0x8(%eax),%edx /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 10cda6: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cda8: 39 da cmp %ebx,%edx 10cdaa: 72 f0 jb 10cd9c <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cdac: 8b 75 08 mov 0x8(%ebp),%esi 10cdaf: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10cdb3: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10cdb6: 39 ca cmp %ecx,%edx 10cdb8: 73 e2 jae 10cd9c <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10cdba: 83 ec 0c sub $0xc,%esp 10cdbd: 50 push %eax 10cdbe: e8 05 32 00 00 call 10ffc8 <_Chain_Extract> 10cdc3: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cdc6: 85 ff test %edi,%edi 10cdc8: 75 d6 jne 10cda0 <_Objects_Shrink_information+0x60> 10cdca: 66 90 xchg %ax,%ax 10cdcc: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cdcf: 83 ec 0c sub $0xc,%esp 10cdd2: 8b 55 08 mov 0x8(%ebp),%edx 10cdd5: 8b 42 34 mov 0x34(%edx),%eax 10cdd8: ff 34 30 pushl (%eax,%esi,1) 10cddb: e8 08 17 00 00 call 10e4e8 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cde0: 8b 55 08 mov 0x8(%ebp),%edx 10cde3: 8b 42 34 mov 0x34(%edx),%eax 10cde6: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cded: 8b 42 30 mov 0x30(%edx),%eax 10cdf0: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cdf7: 8b 42 14 mov 0x14(%edx),%eax 10cdfa: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cdfe: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10ce01: 8d 65 f4 lea -0xc(%ebp),%esp 10ce04: 5b pop %ebx 10ce05: 5e pop %esi 10ce06: 5f pop %edi 10ce07: c9 leave 10ce08: c3 ret 0012e390 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12e390: 55 push %ebp 12e391: 89 e5 mov %esp,%ebp 12e393: 56 push %esi 12e394: 53 push %ebx 12e395: 8b 5d 08 mov 0x8(%ebp),%ebx 12e398: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12e39b: 85 db test %ebx,%ebx 12e39d: 74 35 je 12e3d4 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12e39f: 85 f6 test %esi,%esi 12e3a1: 74 31 je 12e3d4 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12e3a3: 83 ec 0c sub $0xc,%esp 12e3a6: ff 35 30 d9 16 00 pushl 0x16d930 12e3ac: e8 1f 3a fe ff call 111dd0 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12e3b1: 5a pop %edx 12e3b2: 59 pop %ecx 12e3b3: 56 push %esi 12e3b4: 53 push %ebx 12e3b5: e8 9e e3 00 00 call 13c758 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12e3ba: 58 pop %eax 12e3bb: ff 35 30 d9 16 00 pushl 0x16d930 12e3c1: e8 52 3a fe ff call 111e18 <_API_Mutex_Unlock> 12e3c6: b0 01 mov $0x1,%al return true; 12e3c8: 83 c4 10 add $0x10,%esp } 12e3cb: 8d 65 f8 lea -0x8(%ebp),%esp 12e3ce: 5b pop %ebx 12e3cf: 5e pop %esi 12e3d0: c9 leave 12e3d1: c3 ret 12e3d2: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12e3d4: 31 c0 xor %eax,%eax } 12e3d6: 8d 65 f8 lea -0x8(%ebp),%esp 12e3d9: 5b pop %ebx 12e3da: 5e pop %esi 12e3db: c9 leave 12e3dc: c3 ret 0011065c <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 11065c: 55 push %ebp 11065d: 89 e5 mov %esp,%ebp 11065f: 56 push %esi 110660: 53 push %ebx 110661: 83 ec 10 sub $0x10,%esp 110664: 8b 5d 08 mov 0x8(%ebp),%ebx 110667: 8b 75 0c mov 0xc(%ebp),%esi 11066a: 8a 45 10 mov 0x10(%ebp),%al * then it is forbidden to lock a mutex. But since we are inside * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { 11066d: 8b 15 58 c9 12 00 mov 0x12c958,%edx 110673: 85 d2 test %edx,%edx 110675: 74 19 je 110690 <_Protected_heap_Walk+0x34> _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110677: 0f b6 c0 movzbl %al,%eax 11067a: 89 45 10 mov %eax,0x10(%ebp) 11067d: 89 75 0c mov %esi,0xc(%ebp) 110680: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110683: 8d 65 f8 lea -0x8(%ebp),%esp 110686: 5b pop %ebx 110687: 5e pop %esi 110688: c9 leave if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 110689: e9 1e f2 ff ff jmp 10f8ac <_Heap_Walk> 11068e: 66 90 xchg %ax,%ax <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( !_Thread_Dispatch_disable_level ) { _RTEMS_Lock_allocator(); 110690: 83 ec 0c sub $0xc,%esp 110693: ff 35 10 ca 12 00 pushl 0x12ca10 110699: 88 45 f4 mov %al,-0xc(%ebp) 11069c: e8 9b e4 ff ff call 10eb3c <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 1106a1: 83 c4 0c add $0xc,%esp 1106a4: 8a 45 f4 mov -0xc(%ebp),%al 1106a7: 0f b6 c0 movzbl %al,%eax 1106aa: 50 push %eax 1106ab: 56 push %esi 1106ac: 53 push %ebx 1106ad: e8 fa f1 ff ff call 10f8ac <_Heap_Walk> _RTEMS_Unlock_allocator(); 1106b2: 5a pop %edx 1106b3: ff 35 10 ca 12 00 pushl 0x12ca10 1106b9: 88 45 f4 mov %al,-0xc(%ebp) 1106bc: e8 c3 e4 ff ff call 10eb84 <_API_Mutex_Unlock> 1106c1: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 1106c4: 8a 45 f4 mov -0xc(%ebp),%al 1106c7: 8d 65 f8 lea -0x8(%ebp),%esp 1106ca: 5b pop %ebx 1106cb: 5e pop %esi 1106cc: c9 leave 1106cd: c3 ret 0010fefc <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 10fefc: 55 push %ebp 10fefd: 89 e5 mov %esp,%ebp 10feff: 56 push %esi 10ff00: 53 push %ebx 10ff01: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 10ff04: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 10ff07: 8b 55 08 mov 0x8(%ebp),%edx 10ff0a: 3b 15 f8 53 12 00 cmp 0x1253f8,%edx 10ff10: 74 1e je 10ff30 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x34> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; 10ff12: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 10ff15: 85 c0 test %eax,%eax 10ff17: 74 09 je 10ff22 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x26> (*dtor)(value); 10ff19: 83 ec 0c sub $0xc,%esp 10ff1c: 52 push %edx 10ff1d: ff d0 call *%eax 10ff1f: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 10ff22: 89 5d 08 mov %ebx,0x8(%ebp) } 10ff25: 8d 65 f8 lea -0x8(%ebp),%esp 10ff28: 5b pop %ebx 10ff29: 5e pop %esi 10ff2a: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 10ff2b: e9 b8 e5 ff ff jmp 10e4e8 <_Workspace_Free> void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; 10ff30: 8b 4b 04 mov 0x4(%ebx),%ecx 10ff33: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 10ff35: 8b 73 08 mov 0x8(%ebx),%esi 10ff38: 89 31 mov %esi,(%ecx) 10ff3a: eb d9 jmp 10ff15 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x19> <== ALWAYS TAKEN 0010fd08 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 10fd08: 55 push %ebp 10fd09: 89 e5 mov %esp,%ebp 10fd0b: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 10fd0e: a1 60 12 12 00 mov 0x121260,%eax 10fd13: 85 c0 test %eax,%eax 10fd15: 74 05 je 10fd1c <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 10fd17: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 10fd18: ff e0 jmp *%eax 10fd1a: 66 90 xchg %ax,%ax <== NOT EXECUTED } 10fd1c: c9 leave 10fd1d: c3 ret 0010b92c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10b92c: 55 push %ebp 10b92d: 89 e5 mov %esp,%ebp 10b92f: 57 push %edi 10b930: 56 push %esi 10b931: 53 push %ebx 10b932: 83 ec 1c sub $0x1c,%esp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 10b935: 8b 1d 0c 12 12 00 mov 0x12120c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10b93b: 8b 3d 08 12 12 00 mov 0x121208,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10b941: 85 db test %ebx,%ebx 10b943: 74 46 je 10b98b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10b945: 85 ff test %edi,%edi 10b947: 74 42 je 10b98b <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> <== ALWAYS TAKEN 10b949: 31 f6 xor %esi,%esi 10b94b: 90 nop return_value = rtems_task_create( 10b94c: 83 ec 08 sub $0x8,%esp 10b94f: 8d 45 e4 lea -0x1c(%ebp),%eax 10b952: 50 push %eax 10b953: ff 73 0c pushl 0xc(%ebx) 10b956: ff 73 14 pushl 0x14(%ebx) 10b959: ff 73 04 pushl 0x4(%ebx) 10b95c: ff 73 08 pushl 0x8(%ebx) 10b95f: ff 33 pushl (%ebx) 10b961: e8 96 fd ff ff call 10b6fc <== 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 ) ) 10b966: 83 c4 20 add $0x20,%esp 10b969: 85 c0 test %eax,%eax 10b96b: 75 26 jne 10b993 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10b96d: 51 push %ecx 10b96e: ff 73 18 pushl 0x18(%ebx) 10b971: ff 73 10 pushl 0x10(%ebx) 10b974: ff 75 e4 pushl -0x1c(%ebp) 10b977: e8 24 00 00 00 call 10b9a0 <== ALWAYS TAKEN id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10b97c: 83 c4 10 add $0x10,%esp 10b97f: 85 c0 test %eax,%eax 10b981: 75 10 jne 10b993 <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10b983: 46 inc %esi 10b984: 83 c3 1c add $0x1c,%ebx 10b987: 39 f7 cmp %esi,%edi 10b989: 77 c1 ja 10b94c <_RTEMS_tasks_Initialize_user_tasks_body+0x20> <== ALWAYS TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 10b98b: 8d 65 f4 lea -0xc(%ebp),%esp 10b98e: 5b pop %ebx 10b98f: 5e pop %esi 10b990: 5f pop %edi 10b991: c9 leave 10b992: c3 ret id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 10b993: 52 push %edx 10b994: 50 push %eax 10b995: 6a 01 push $0x1 10b997: 6a 01 push $0x1 10b999: e8 8a 0c 00 00 call 10c628 <_Internal_error_Occurred> 0010fd20 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 10fd20: 55 push %ebp 10fd21: 89 e5 mov %esp,%ebp 10fd23: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10fd26: 6a 04 push $0x4 10fd28: 6a 00 push $0x0 10fd2a: 68 04 01 00 00 push $0x104 10fd2f: ff 35 e0 11 12 00 pushl 0x1211e0 10fd35: 6a 01 push $0x1 10fd37: 6a 02 push $0x2 10fd39: 68 c0 52 12 00 push $0x1252c0 10fd3e: e8 95 ce ff ff call 10cbd8 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 10fd43: 83 c4 14 add $0x14,%esp 10fd46: 68 40 30 12 00 push $0x123040 10fd4b: e8 70 0c 00 00 call 1109c0 <_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 ); 10fd50: c7 04 24 20 30 12 00 movl $0x123020,(%esp) 10fd57: e8 e8 bf ff ff call 10bd44 <_API_extensions_Add> 10fd5c: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 10fd5f: c9 leave 10fd60: c3 ret 0010fd64 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10fd64: 55 push %ebp 10fd65: 89 e5 mov %esp,%ebp 10fd67: 57 push %edi 10fd68: 56 push %esi 10fd69: 53 push %ebx 10fd6a: 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 ]; 10fd6d: 8b 45 08 mov 0x8(%ebp),%eax 10fd70: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10fd76: 85 db test %ebx,%ebx 10fd78: 74 45 je 10fdbf <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10fd7a: 9c pushf 10fd7b: fa cli 10fd7c: 58 pop %eax signal_set = asr->signals_posted; 10fd7d: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 10fd80: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10fd87: 50 push %eax 10fd88: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10fd89: 85 f6 test %esi,%esi 10fd8b: 74 32 je 10fdbf <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN return; asr->nest_level += 1; 10fd8d: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fd90: 50 push %eax 10fd91: 8d 7d e4 lea -0x1c(%ebp),%edi 10fd94: 57 push %edi 10fd95: 68 ff ff 00 00 push $0xffff 10fd9a: ff 73 10 pushl 0x10(%ebx) 10fd9d: e8 52 1c 00 00 call 1119f4 (*asr->handler)( signal_set ); 10fda2: 89 34 24 mov %esi,(%esp) 10fda5: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10fda8: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10fdab: 83 c4 0c add $0xc,%esp 10fdae: 57 push %edi 10fdaf: 68 ff ff 00 00 push $0xffff 10fdb4: ff 75 e4 pushl -0x1c(%ebp) 10fdb7: e8 38 1c 00 00 call 1119f4 10fdbc: 83 c4 10 add $0x10,%esp } 10fdbf: 8d 65 f4 lea -0xc(%ebp),%esp 10fdc2: 5b pop %ebx 10fdc3: 5e pop %esi 10fdc4: 5f pop %edi 10fdc5: c9 leave 10fdc6: c3 ret 0010fcc0 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 10fcc0: 55 push %ebp 10fcc1: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 10fcc3: 8b 45 08 mov 0x8(%ebp),%eax 10fcc6: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10fccc: 85 c0 test %eax,%eax 10fcce: 74 13 je 10fce3 <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 10fcd0: 8b 50 04 mov 0x4(%eax),%edx 10fcd3: 8b 0a mov (%edx),%ecx 10fcd5: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 10fcd8: 8b 48 08 mov 0x8(%eax),%ecx 10fcdb: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10fcdd: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 10fcdf: 85 c0 test %eax,%eax 10fce1: 75 ed jne 10fcd0 <_RTEMS_tasks_Switch_extension+0x10> <== ALWAYS TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 10fce3: 8b 45 0c mov 0xc(%ebp),%eax 10fce6: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 10fcec: 85 c0 test %eax,%eax 10fcee: 74 13 je 10fd03 <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 10fcf0: 8b 50 04 mov 0x4(%eax),%edx 10fcf3: 8b 0a mov (%edx),%ecx 10fcf5: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 10fcf8: 8b 48 0c mov 0xc(%eax),%ecx 10fcfb: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 10fcfd: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 10fcff: 85 c0 test %eax,%eax 10fd01: 75 ed jne 10fcf0 <_RTEMS_tasks_Switch_extension+0x30> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 10fd03: c9 leave 10fd04: c3 ret 0013c1f4 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 13c1f4: 55 push %ebp 13c1f5: 89 e5 mov %esp,%ebp 13c1f7: 57 push %edi 13c1f8: 56 push %esi 13c1f9: 53 push %ebx 13c1fa: 83 ec 38 sub $0x38,%esp 13c1fd: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13c200: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13c203: 8d 75 e0 lea -0x20(%ebp),%esi 13c206: 56 push %esi 13c207: e8 a4 1b ff ff call 12ddb0 <_TOD_Get_uptime> _Timestamp_Subtract( 13c20c: 83 c4 0c add $0xc,%esp 13c20f: ff 75 0c pushl 0xc(%ebp) 13c212: 56 push %esi 13c213: 8d 43 4c lea 0x4c(%ebx),%eax 13c216: 50 push %eax 13c217: e8 18 82 fd ff call 114434 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13c21c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13c222: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13c228: 89 45 d8 mov %eax,-0x28(%ebp) 13c22b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13c22e: 83 c4 10 add $0x10,%esp 13c231: 3b 3d 38 d9 16 00 cmp 0x16d938,%edi 13c237: 74 0b je 13c244 <_Rate_monotonic_Get_status+0x50> 13c239: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13c23b: 8d 65 f4 lea -0xc(%ebp),%esp 13c23e: 5b pop %ebx 13c23f: 5e pop %esi 13c240: 5f pop %edi 13c241: c9 leave 13c242: c3 ret 13c243: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13c244: 57 push %edi 13c245: 8d 7d d0 lea -0x30(%ebp),%edi 13c248: 57 push %edi 13c249: 56 push %esi 13c24a: 68 40 d9 16 00 push $0x16d940 13c24f: e8 e0 81 fd ff call 114434 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13c254: 59 pop %ecx 13c255: 5e pop %esi 13c256: 57 push %edi 13c257: 8d 75 d8 lea -0x28(%ebp),%esi 13c25a: 56 push %esi 13c25b: e8 98 81 fd ff call 1143f8 <_Timespec_Add_to> /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 13c260: 83 c3 44 add $0x44,%ebx 13c263: 58 pop %eax 13c264: 5a pop %edx 13c265: 53 push %ebx 13c266: 56 push %esi 13c267: e8 c4 06 00 00 call 13c930 <_Timespec_Less_than> 13c26c: 83 c4 10 add $0x10,%esp 13c26f: 84 c0 test %al,%al 13c271: 74 05 je 13c278 <_Rate_monotonic_Get_status+0x84> 13c273: 31 c0 xor %eax,%eax 13c275: eb c4 jmp 13c23b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 13c277: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13c278: 57 push %edi 13c279: ff 75 10 pushl 0x10(%ebp) 13c27c: 56 push %esi 13c27d: 53 push %ebx 13c27e: e8 b1 81 fd ff call 114434 <_Timespec_Subtract> 13c283: b0 01 mov $0x1,%al 13c285: 83 c4 10 add $0x10,%esp 13c288: eb b1 jmp 13c23b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 0013c180 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13c180: 55 push %ebp 13c181: 89 e5 mov %esp,%ebp 13c183: 57 push %edi 13c184: 56 push %esi 13c185: 53 push %ebx 13c186: 83 ec 28 sub $0x28,%esp 13c189: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13c18c: 8b 73 40 mov 0x40(%ebx),%esi * If using nanosecond statistics, we need to obtain the uptime. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; _TOD_Get_uptime( &uptime ); 13c18f: 8d 7d e0 lea -0x20(%ebp),%edi 13c192: 57 push %edi 13c193: e8 18 1c ff ff call 12ddb0 <_TOD_Get_uptime> /* * Set the starting point and the CPU time used for the statistics. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ the_period->time_period_initiated = uptime; 13c198: 8b 45 e0 mov -0x20(%ebp),%eax 13c19b: 8b 55 e4 mov -0x1c(%ebp),%edx 13c19e: 89 43 4c mov %eax,0x4c(%ebx) 13c1a1: 89 53 50 mov %edx,0x50(%ebx) #else the_period->time_period_initiated = _Watchdog_Ticks_since_boot; #endif the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used; 13c1a4: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13c1aa: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13c1b0: 89 43 44 mov %eax,0x44(%ebx) 13c1b3: 89 53 48 mov %edx,0x48(%ebx) * routine is invoked from rtems_rate_monotonic_period, the owner will * be the executing thread. When this routine is invoked from * _Rate_monotonic_Timeout, it will not. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13c1b6: 83 c4 10 add $0x10,%esp 13c1b9: 3b 35 38 d9 16 00 cmp 0x16d938,%esi 13c1bf: 74 0b je 13c1cc <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13c1c1: 8d 65 f4 lea -0xc(%ebp),%esp 13c1c4: 5b pop %ebx 13c1c5: 5e pop %esi 13c1c6: 5f pop %edi 13c1c7: c9 leave 13c1c8: c3 ret 13c1c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 13c1cc: 51 push %ecx 13c1cd: 8d 75 d8 lea -0x28(%ebp),%esi 13c1d0: 56 push %esi 13c1d1: 57 push %edi 13c1d2: 68 40 d9 16 00 push $0x16d940 13c1d7: e8 58 82 fd ff call 114434 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13c1dc: 58 pop %eax 13c1dd: 5a pop %edx 13c1de: 56 push %esi 13c1df: 83 c3 44 add $0x44,%ebx 13c1e2: 53 push %ebx 13c1e3: e8 10 82 fd ff call 1143f8 <_Timespec_Add_to> 13c1e8: 83 c4 10 add $0x10,%esp } #endif } 13c1eb: 8d 65 f4 lea -0xc(%ebp),%esp 13c1ee: 5b pop %ebx 13c1ef: 5e pop %esi 13c1f0: 5f pop %edi 13c1f1: c9 leave 13c1f2: c3 ret 0013c52c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13c52c: 55 push %ebp 13c52d: 89 e5 mov %esp,%ebp 13c52f: 83 ec 2c sub $0x2c,%esp 13c532: 8d 45 f4 lea -0xc(%ebp),%eax 13c535: 50 push %eax 13c536: ff 75 08 pushl 0x8(%ebp) 13c539: 68 00 de 16 00 push $0x16de00 13c53e: e8 f1 69 fd ff call 112f34 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13c543: 83 c4 10 add $0x10,%esp 13c546: 8b 55 f4 mov -0xc(%ebp),%edx 13c549: 85 d2 test %edx,%edx 13c54b: 75 29 jne 13c576 <_Rate_monotonic_Timeout+0x4a> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13c54d: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13c550: f6 42 11 40 testb $0x40,0x11(%edx) 13c554: 74 08 je 13c55e <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13c556: 8b 4a 20 mov 0x20(%edx),%ecx 13c559: 3b 48 08 cmp 0x8(%eax),%ecx 13c55c: 74 4e je 13c5ac <_Rate_monotonic_Timeout+0x80> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13c55e: 83 78 38 01 cmpl $0x1,0x38(%eax) 13c562: 74 14 je 13c578 <_Rate_monotonic_Timeout+0x4c> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13c564: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13c56b: a1 78 d8 16 00 mov 0x16d878,%eax 13c570: 48 dec %eax 13c571: a3 78 d8 16 00 mov %eax,0x16d878 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13c576: c9 leave 13c577: c3 ret _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13c578: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13c57f: 83 ec 0c sub $0xc,%esp 13c582: 50 push %eax 13c583: 89 45 e4 mov %eax,-0x1c(%ebp) 13c586: e8 f5 fb ff ff call 13c180 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c58b: 8b 45 e4 mov -0x1c(%ebp),%eax 13c58e: 8b 50 3c mov 0x3c(%eax),%edx 13c591: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c594: 5a pop %edx 13c595: 59 pop %ecx 13c596: 83 c0 10 add $0x10,%eax 13c599: 50 push %eax 13c59a: 68 58 d9 16 00 push $0x16d958 13c59f: e8 60 81 fd ff call 114704 <_Watchdog_Insert> 13c5a4: 83 c4 10 add $0x10,%esp 13c5a7: eb c2 jmp 13c56b <_Rate_monotonic_Timeout+0x3f> <== ALWAYS TAKEN 13c5a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13c5ac: 83 ec 08 sub $0x8,%esp 13c5af: 68 f8 ff 03 10 push $0x1003fff8 13c5b4: 52 push %edx 13c5b5: 89 45 e4 mov %eax,-0x1c(%ebp) 13c5b8: e8 c7 6e fd ff call 113484 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13c5bd: 8b 45 e4 mov -0x1c(%ebp),%eax 13c5c0: 89 04 24 mov %eax,(%esp) 13c5c3: eb c1 jmp 13c586 <_Rate_monotonic_Timeout+0x5a> <== ALWAYS TAKEN 0013c28c <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13c28c: 55 push %ebp 13c28d: 89 e5 mov %esp,%ebp 13c28f: 57 push %edi 13c290: 56 push %esi 13c291: 53 push %ebx 13c292: 83 ec 1c sub $0x1c,%esp 13c295: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13c298: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13c29b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13c29f: 0f 84 bf 00 00 00 je 13c364 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13c2a5: 52 push %edx 13c2a6: 8d 7d e0 lea -0x20(%ebp),%edi 13c2a9: 57 push %edi 13c2aa: 8d 75 d8 lea -0x28(%ebp),%esi 13c2ad: 56 push %esi 13c2ae: 53 push %ebx 13c2af: e8 40 ff ff ff call 13c1f4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 13c2b4: 83 c4 10 add $0x10,%esp 13c2b7: 84 c0 test %al,%al 13c2b9: 75 09 jne 13c2c4 <_Rate_monotonic_Update_statistics+0x38> stats->min_wall_time = since_last_period; if ( since_last_period > stats->max_wall_time ) stats->max_wall_time = since_last_period; #endif } 13c2bb: 8d 65 f4 lea -0xc(%ebp),%esp 13c2be: 5b pop %ebx 13c2bf: 5e pop %esi 13c2c0: 5f pop %edi 13c2c1: c9 leave 13c2c2: c3 ret 13c2c3: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13c2c4: 83 ec 08 sub $0x8,%esp 13c2c7: 57 push %edi 13c2c8: 8d 43 6c lea 0x6c(%ebx),%eax 13c2cb: 50 push %eax 13c2cc: e8 27 81 fd ff call 1143f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13c2d1: 59 pop %ecx 13c2d2: 58 pop %eax 13c2d3: 8d 43 5c lea 0x5c(%ebx),%eax 13c2d6: 50 push %eax 13c2d7: 57 push %edi 13c2d8: e8 53 06 00 00 call 13c930 <_Timespec_Less_than> 13c2dd: 83 c4 10 add $0x10,%esp 13c2e0: 84 c0 test %al,%al 13c2e2: 74 0c je 13c2f0 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13c2e4: 8b 45 e0 mov -0x20(%ebp),%eax 13c2e7: 8b 55 e4 mov -0x1c(%ebp),%edx 13c2ea: 89 43 5c mov %eax,0x5c(%ebx) 13c2ed: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13c2f0: 83 ec 08 sub $0x8,%esp 13c2f3: 8d 43 64 lea 0x64(%ebx),%eax 13c2f6: 50 push %eax 13c2f7: 57 push %edi 13c2f8: e8 0f 06 00 00 call 13c90c <_Timespec_Greater_than> 13c2fd: 83 c4 10 add $0x10,%esp 13c300: 84 c0 test %al,%al 13c302: 74 0c je 13c310 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13c304: 8b 45 e0 mov -0x20(%ebp),%eax 13c307: 8b 55 e4 mov -0x1c(%ebp),%edx 13c30a: 89 43 64 mov %eax,0x64(%ebx) 13c30d: 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 ); 13c310: 83 ec 08 sub $0x8,%esp 13c313: 56 push %esi 13c314: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13c31a: 50 push %eax 13c31b: e8 d8 80 fd ff call 1143f8 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13c320: 58 pop %eax 13c321: 5a pop %edx 13c322: 8d 43 74 lea 0x74(%ebx),%eax 13c325: 50 push %eax 13c326: 56 push %esi 13c327: e8 04 06 00 00 call 13c930 <_Timespec_Less_than> 13c32c: 83 c4 10 add $0x10,%esp 13c32f: 84 c0 test %al,%al 13c331: 75 39 jne 13c36c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13c333: 83 ec 08 sub $0x8,%esp 13c336: 8d 43 7c lea 0x7c(%ebx),%eax 13c339: 50 push %eax 13c33a: 56 push %esi 13c33b: e8 cc 05 00 00 call 13c90c <_Timespec_Greater_than> 13c340: 83 c4 10 add $0x10,%esp 13c343: 84 c0 test %al,%al 13c345: 0f 84 70 ff ff ff je 13c2bb <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13c34b: 8b 45 d8 mov -0x28(%ebp),%eax 13c34e: 8b 55 dc mov -0x24(%ebp),%edx 13c351: 89 43 7c mov %eax,0x7c(%ebx) 13c354: 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 } 13c35a: 8d 65 f4 lea -0xc(%ebp),%esp 13c35d: 5b pop %ebx 13c35e: 5e pop %esi 13c35f: 5f pop %edi 13c360: c9 leave 13c361: c3 ret 13c362: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13c364: ff 43 58 incl 0x58(%ebx) 13c367: e9 39 ff ff ff jmp 13c2a5 <_Rate_monotonic_Update_statistics+0x19> <== ALWAYS TAKEN */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; 13c36c: 8b 45 d8 mov -0x28(%ebp),%eax 13c36f: 8b 55 dc mov -0x24(%ebp),%edx 13c372: 89 43 74 mov %eax,0x74(%ebx) 13c375: 89 53 78 mov %edx,0x78(%ebx) 13c378: eb b9 jmp 13c333 <_Rate_monotonic_Update_statistics+0xa7> <== ALWAYS TAKEN 0011e0c8 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11e0c8: 55 push %ebp 11e0c9: 89 e5 mov %esp,%ebp 11e0cb: 57 push %edi 11e0cc: 56 push %esi 11e0cd: 53 push %ebx 11e0ce: 83 ec 28 sub $0x28,%esp 11e0d1: 8b 75 08 mov 0x8(%ebp),%esi 11e0d4: a1 58 f7 13 00 mov 0x13f758,%eax 11e0d9: 40 inc %eax 11e0da: a3 58 f7 13 00 mov %eax,0x13f758 * 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(); 11e0df: ff 35 10 f8 13 00 pushl 0x13f810 11e0e5: e8 4e b2 ff ff call 119338 <_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 ); 11e0ea: 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 ); 11e0ed: 8d 46 68 lea 0x68(%esi),%eax 11e0f0: 89 45 e4 mov %eax,-0x1c(%ebp) 11e0f3: 83 c4 10 add $0x10,%esp 11e0f6: eb 32 jmp 11e12a <_Region_Process_queue+0x62> <== ALWAYS TAKEN 11e0f8: 6a 00 push $0x0 11e0fa: 6a 00 push $0x0 11e0fc: ff 70 24 pushl 0x24(%eax) 11e0ff: ff 75 e4 pushl -0x1c(%ebp) 11e102: e8 69 bb ff ff call 119c70 <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11e107: 83 c4 10 add $0x10,%esp 11e10a: 85 c0 test %eax,%eax 11e10c: 74 2e je 11e13c <_Region_Process_queue+0x74> break; *(void **)the_thread->Wait.return_argument = the_segment; 11e10e: 8b 53 28 mov 0x28(%ebx),%edx 11e111: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11e113: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11e116: 83 ec 08 sub $0x8,%esp 11e119: 53 push %ebx 11e11a: 57 push %edi 11e11b: e8 94 05 00 00 call 11e6b4 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11e120: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) } 11e127: 83 c4 10 add $0x10,%esp /* * 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 ); 11e12a: 83 ec 0c sub $0xc,%esp 11e12d: 57 push %edi 11e12e: e8 6d 06 00 00 call 11e7a0 <_Thread_queue_First> <== ALWAYS TAKEN 11e133: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11e135: 83 c4 10 add $0x10,%esp 11e138: 85 c0 test %eax,%eax 11e13a: 75 bc jne 11e0f8 <_Region_Process_queue+0x30> 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(); } 11e13c: 8d 65 f4 lea -0xc(%ebp),%esp 11e13f: 5b pop %ebx 11e140: 5e pop %esi 11e141: 5f pop %edi 11e142: 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(); 11e143: e9 8c d2 ff ff jmp 11b3d4 <_Thread_Enable_dispatch> 0010d7fc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d7fc: 55 push %ebp 10d7fd: 89 e5 mov %esp,%ebp 10d7ff: 53 push %ebx 10d800: 83 ec 04 sub $0x4,%esp 10d803: 8b 5d 08 mov 0x8(%ebp),%ebx 10d806: a1 78 01 13 00 mov 0x130178,%eax 10d80b: 40 inc %eax 10d80c: a3 78 01 13 00 mov %eax,0x130178 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d811: a1 0c 02 13 00 mov 0x13020c,%eax if ( time->tv_sec < seconds ) 10d816: 8b 13 mov (%ebx),%edx 10d818: 39 d0 cmp %edx,%eax 10d81a: 7f 34 jg 10d850 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d81c: 51 push %ecx 10d81d: 29 c2 sub %eax,%edx 10d81f: 52 push %edx 10d820: 6a 00 push $0x0 10d822: 68 4c 02 13 00 push $0x13024c 10d827: e8 1c 24 00 00 call 10fc48 <_Watchdog_Adjust> 10d82c: 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 ); 10d82f: 8b 03 mov (%ebx),%eax 10d831: a3 0c 02 13 00 mov %eax,0x13020c 10d836: 8b 43 04 mov 0x4(%ebx),%eax 10d839: a3 10 02 13 00 mov %eax,0x130210 _TOD_Is_set = true; 10d83e: c6 05 8c 01 13 00 01 movb $0x1,0x13018c _TOD_Activate(); _Thread_Enable_dispatch(); } 10d845: 8b 5d fc mov -0x4(%ebp),%ebx 10d848: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10d849: e9 76 12 00 00 jmp 10eac4 <_Thread_Enable_dispatch> 10d84e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d850: 51 push %ecx 10d851: 29 d0 sub %edx,%eax 10d853: 50 push %eax 10d854: 6a 01 push $0x1 10d856: 68 4c 02 13 00 push $0x13024c 10d85b: e8 e8 23 00 00 call 10fc48 <_Watchdog_Adjust> 10d860: 83 c4 10 add $0x10,%esp 10d863: eb ca jmp 10d82f <_TOD_Set+0x33> <== ALWAYS TAKEN 0010c288 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 10c288: 55 push %ebp 10c289: 89 e5 mov %esp,%ebp 10c28b: 53 push %ebx 10c28c: 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() ); 10c28f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 10c296: a1 2c 12 12 00 mov 0x12122c,%eax 10c29b: 8d 04 80 lea (%eax,%eax,4),%eax 10c29e: 8d 04 80 lea (%eax,%eax,4),%eax 10c2a1: 8d 04 80 lea (%eax,%eax,4),%eax 10c2a4: c1 e0 03 shl $0x3,%eax 10c2a7: 89 45 f4 mov %eax,-0xc(%ebp) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 10c2aa: a1 a4 54 12 00 mov 0x1254a4,%eax 10c2af: 40 inc %eax 10c2b0: a3 a4 54 12 00 mov %eax,0x1254a4 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 10c2b5: 8d 5d f0 lea -0x10(%ebp),%ebx 10c2b8: 53 push %ebx 10c2b9: 68 b8 53 12 00 push $0x1253b8 10c2be: e8 c1 1c 00 00 call 10df84 <_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 ); 10c2c3: 58 pop %eax 10c2c4: 5a pop %edx 10c2c5: 53 push %ebx 10c2c6: 68 cc 53 12 00 push $0x1253cc 10c2cb: e8 b4 1c 00 00 call 10df84 <_Timespec_Add_to> 10c2d0: 89 c3 mov %eax,%ebx while ( seconds ) { 10c2d2: 83 c4 10 add $0x10,%esp 10c2d5: 85 c0 test %eax,%eax 10c2d7: 74 16 je 10c2ef <_TOD_Tickle_ticks+0x67> 10c2d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 10c2dc: 83 ec 0c sub $0xc,%esp 10c2df: 68 0c 54 12 00 push $0x12540c 10c2e4: e8 4b 21 00 00 call 10e434 <_Watchdog_Tickle> 10c2e9: 83 c4 10 add $0x10,%esp 10c2ec: 4b dec %ebx 10c2ed: 75 ed jne 10c2dc <_TOD_Tickle_ticks+0x54> <== ALWAYS TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 10c2ef: 8b 5d fc mov -0x4(%ebp),%ebx 10c2f2: c9 leave 10c2f3: c3 ret 0010c01c <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c01c: 55 push %ebp 10c01d: 89 e5 mov %esp,%ebp 10c01f: 56 push %esi 10c020: 53 push %ebx 10c021: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c024: 8b 72 08 mov 0x8(%edx),%esi 10c027: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c028: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c02a: 89 c3 mov %eax,%ebx 10c02c: 83 e3 03 and $0x3,%ebx 10c02f: 74 67 je 10c098 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c031: 8b 4a 04 mov 0x4(%edx),%ecx 10c034: 0f b7 8c 09 a0 22 12 movzwl 0x1222a0(%ecx,%ecx,1),%ecx 10c03b: 00 10c03c: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c03f: 0f b7 8c 1b d4 22 12 movzwl 0x1222d4(%ebx,%ebx,1),%ecx 10c046: 00 10c047: 2d c4 07 00 00 sub $0x7c4,%eax 10c04c: c1 e8 02 shr $0x2,%eax 10c04f: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c052: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c055: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c058: 8d 04 98 lea (%eax,%ebx,4),%eax 10c05b: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c05d: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c05f: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c062: 8d 04 81 lea (%ecx,%eax,4),%eax 10c065: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c068: c1 e0 02 shl $0x2,%eax 10c06b: 29 c8 sub %ecx,%eax 10c06d: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c070: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c073: 8b 4a 0c mov 0xc(%edx),%ecx 10c076: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c079: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c07c: c1 e1 02 shl $0x2,%ecx 10c07f: 03 4a 10 add 0x10(%edx),%ecx 10c082: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c085: 8d 14 92 lea (%edx,%edx,4),%edx 10c088: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c08f: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c092: 5b pop %ebx 10c093: 5e pop %esi 10c094: c9 leave 10c095: c3 ret 10c096: 66 90 xchg %ax,%ax <== NOT EXECUTED time = the_tod->day - 1; year_mod_4 = the_tod->year & 3; if ( year_mod_4 == 0 ) time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; 10c098: 8b 4a 04 mov 0x4(%edx),%ecx 10c09b: 0f b7 8c 09 ba 22 12 movzwl 0x1222ba(%ecx,%ecx,1),%ecx 10c0a2: 00 10c0a3: 8d 34 31 lea (%ecx,%esi,1),%esi 10c0a6: eb 97 jmp 10c03f <_TOD_To_seconds+0x23> <== ALWAYS TAKEN 0010c0a8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c0a8: 55 push %ebp 10c0a9: 89 e5 mov %esp,%ebp 10c0ab: 53 push %ebx 10c0ac: 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(); 10c0af: 8b 1d 2c 42 12 00 mov 0x12422c,%ebx if ((!the_tod) || 10c0b5: 85 c9 test %ecx,%ecx 10c0b7: 74 53 je 10c10c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c0b9: b8 40 42 0f 00 mov $0xf4240,%eax 10c0be: 31 d2 xor %edx,%edx 10c0c0: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c0c2: 3b 41 18 cmp 0x18(%ecx),%eax 10c0c5: 76 45 jbe 10c10c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c0c7: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c0cb: 77 3f ja 10c10c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c0cd: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c0d1: 77 39 ja 10c10c <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c0d3: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c0d7: 77 33 ja 10c10c <_TOD_Validate+0x64> (the_tod->month == 0) || 10c0d9: 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) || 10c0dc: 85 c0 test %eax,%eax 10c0de: 74 2c je 10c10c <_TOD_Validate+0x64> <== ALWAYS TAKEN 10c0e0: 83 f8 0c cmp $0xc,%eax 10c0e3: 77 27 ja 10c10c <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c0e5: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c0e7: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c0ed: 76 1d jbe 10c10c <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c0ef: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c0f2: 85 c9 test %ecx,%ecx 10c0f4: 74 16 je 10c10c <_TOD_Validate+0x64> <== 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 ) 10c0f6: 83 e2 03 and $0x3,%edx 10c0f9: 75 16 jne 10c111 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c0fb: 8b 04 85 14 23 12 00 mov 0x122314(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c102: 39 c8 cmp %ecx,%eax 10c104: 0f 93 c0 setae %al 10c107: eb 05 jmp 10c10e <_TOD_Validate+0x66> <== ALWAYS TAKEN 10c109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c10c: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c10e: 5b pop %ebx 10c10f: c9 leave 10c110: c3 ret return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10c111: 8b 04 85 e0 22 12 00 mov 0x1222e0(,%eax,4),%eax 10c118: eb e8 jmp 10c102 <_TOD_Validate+0x5a> <== ALWAYS TAKEN 0010ced0 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10ced0: 55 push %ebp 10ced1: 89 e5 mov %esp,%ebp 10ced3: 57 push %edi 10ced4: 56 push %esi 10ced5: 53 push %ebx 10ced6: 83 ec 28 sub $0x28,%esp 10ced9: 8b 5d 08 mov 0x8(%ebp),%ebx 10cedc: 8b 75 0c mov 0xc(%ebp),%esi 10cedf: 8a 45 10 mov 0x10(%ebp),%al 10cee2: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10cee5: 8b 7b 10 mov 0x10(%ebx),%edi /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 10cee8: 53 push %ebx 10cee9: e8 2e 0e 00 00 call 10dd1c <_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 ) 10ceee: 83 c4 10 add $0x10,%esp 10cef1: 39 73 14 cmp %esi,0x14(%ebx) 10cef4: 74 0d je 10cf03 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10cef6: 83 ec 08 sub $0x8,%esp 10cef9: 56 push %esi 10cefa: 53 push %ebx 10cefb: e8 d4 0c 00 00 call 10dbd4 <_Thread_Set_priority> <== ALWAYS TAKEN 10cf00: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10cf03: 9c pushf 10cf04: fa cli 10cf05: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10cf06: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10cf09: 83 f8 04 cmp $0x4,%eax 10cf0c: 74 26 je 10cf34 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10cf0e: 83 e7 04 and $0x4,%edi 10cf11: 74 15 je 10cf28 <_Thread_Change_priority+0x58> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10cf13: 52 push %edx 10cf14: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10cf15: a9 e0 be 03 00 test $0x3bee0,%eax 10cf1a: 0f 85 bc 00 00 00 jne 10cfdc <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10cf20: 8d 65 f4 lea -0xc(%ebp),%esp 10cf23: 5b pop %ebx 10cf24: 5e pop %esi 10cf25: 5f pop %edi 10cf26: c9 leave 10cf27: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10cf28: 89 c1 mov %eax,%ecx 10cf2a: 83 e1 fb and $0xfffffffb,%ecx 10cf2d: 89 4b 10 mov %ecx,0x10(%ebx) 10cf30: eb e1 jmp 10cf13 <_Thread_Change_priority+0x43> <== ALWAYS TAKEN 10cf32: 66 90 xchg %ax,%ax <== NOT EXECUTED } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10cf34: 83 e7 04 and $0x4,%edi 10cf37: 75 45 jne 10cf7e <_Thread_Change_priority+0xae> <== 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 ); 10cf39: 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; 10cf40: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10cf46: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10cf4d: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10cf50: 66 a1 ec 53 12 00 mov 0x1253ec,%ax 10cf56: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10cf5c: 66 a3 ec 53 12 00 mov %ax,0x1253ec _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10cf62: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10cf66: 0f 84 88 00 00 00 je 10cff4 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10cf6c: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10cf72: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10cf75: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10cf77: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10cf79: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10cf7b: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10cf7e: 52 push %edx 10cf7f: 9d popf 10cf80: 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 ); 10cf81: 66 8b 1d ec 53 12 00 mov 0x1253ec,%bx 10cf88: 31 c0 xor %eax,%eax 10cf8a: 89 c1 mov %eax,%ecx 10cf8c: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10cf90: 0f b7 c9 movzwl %cx,%ecx 10cf93: 66 8b 9c 09 80 54 12 mov 0x125480(%ecx,%ecx,1),%bx 10cf9a: 00 10cf9b: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10cf9f: c1 e1 04 shl $0x4,%ecx 10cfa2: 0f b7 c0 movzwl %ax,%eax 10cfa5: 8d 04 01 lea (%ecx,%eax,1),%eax 10cfa8: 8d 0c 40 lea (%eax,%eax,2),%ecx 10cfab: a1 00 53 12 00 mov 0x125300,%eax 10cfb0: 8b 04 88 mov (%eax,%ecx,4),%eax 10cfb3: a3 c8 53 12 00 mov %eax,0x1253c8 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10cfb8: 8b 0d f8 53 12 00 mov 0x1253f8,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10cfbe: 39 c8 cmp %ecx,%eax 10cfc0: 74 0d je 10cfcf <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10cfc2: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10cfc6: 74 07 je 10cfcf <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10cfc8: c6 05 08 54 12 00 01 movb $0x1,0x125408 _ISR_Enable( level ); 10cfcf: 52 push %edx 10cfd0: 9d popf } 10cfd1: 8d 65 f4 lea -0xc(%ebp),%esp 10cfd4: 5b pop %ebx 10cfd5: 5e pop %esi 10cfd6: 5f pop %edi 10cfd7: c9 leave 10cfd8: c3 ret 10cfd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* 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 ); 10cfdc: 89 5d 0c mov %ebx,0xc(%ebp) 10cfdf: 8b 43 44 mov 0x44(%ebx),%eax 10cfe2: 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 ); } 10cfe5: 8d 65 f4 lea -0xc(%ebp),%esp 10cfe8: 5b pop %ebx 10cfe9: 5e pop %esi 10cfea: 5f pop %edi 10cfeb: 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 ); 10cfec: e9 4b 0b 00 00 jmp 10db3c <_Thread_queue_Requeue> 10cff1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10cff4: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10cffa: 8d 48 04 lea 0x4(%eax),%ecx 10cffd: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10cfff: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d002: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d005: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d007: 89 4b 04 mov %ecx,0x4(%ebx) 10d00a: e9 6f ff ff ff jmp 10cf7e <_Thread_Change_priority+0xae> <== ALWAYS TAKEN 0010d010 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d010: 55 push %ebp 10d011: 89 e5 mov %esp,%ebp 10d013: 53 push %ebx 10d014: 8b 45 08 mov 0x8(%ebp),%eax 10d017: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d01a: 9c pushf 10d01b: fa cli 10d01c: 5b pop %ebx current_state = the_thread->current_state; 10d01d: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d020: 85 ca test %ecx,%edx 10d022: 74 70 je 10d094 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d024: f7 d2 not %edx 10d026: 21 ca and %ecx,%edx current_state = 10d028: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d02b: 85 d2 test %edx,%edx 10d02d: 75 65 jne 10d094 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d02f: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d035: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d03c: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d03f: 66 8b 15 ec 53 12 00 mov 0x1253ec,%dx 10d046: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d04c: 66 89 15 ec 53 12 00 mov %dx,0x1253ec _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d053: 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); 10d059: 8d 4a 04 lea 0x4(%edx),%ecx 10d05c: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d05e: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d061: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d064: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d066: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d069: 53 push %ebx 10d06a: 9d popf 10d06b: 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 ) { 10d06c: 8b 50 14 mov 0x14(%eax),%edx 10d06f: 8b 0d c8 53 12 00 mov 0x1253c8,%ecx 10d075: 3b 51 14 cmp 0x14(%ecx),%edx 10d078: 73 1a jae 10d094 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d07a: a3 c8 53 12 00 mov %eax,0x1253c8 if ( _Thread_Executing->is_preemptible || 10d07f: a1 f8 53 12 00 mov 0x1253f8,%eax 10d084: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d088: 74 12 je 10d09c <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d08a: c6 05 08 54 12 00 01 movb $0x1,0x125408 10d091: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d094: 53 push %ebx 10d095: 9d popf } 10d096: 5b pop %ebx 10d097: c9 leave 10d098: c3 ret 10d099: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d09c: 85 d2 test %edx,%edx 10d09e: 74 ea je 10d08a <_Thread_Clear_state+0x7a> <== ALWAYS TAKEN 10d0a0: eb f2 jmp 10d094 <_Thread_Clear_state+0x84> <== ALWAYS TAKEN 0010d0a4 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d0a4: 55 push %ebp 10d0a5: 89 e5 mov %esp,%ebp 10d0a7: 56 push %esi 10d0a8: 53 push %ebx 10d0a9: 8b 75 08 mov 0x8(%ebp),%esi 10d0ac: 8b 5d 0c mov 0xc(%ebp),%ebx 10d0af: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d0b3: 8b 46 1c mov 0x1c(%esi),%eax 10d0b6: 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; 10d0bd: a1 38 53 12 00 mov 0x125338,%eax 10d0c2: 48 dec %eax 10d0c3: a3 38 53 12 00 mov %eax,0x125338 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d0c8: 83 ec 0c sub $0xc,%esp 10d0cb: 53 push %ebx 10d0cc: e8 ff 10 00 00 call 10e1d0 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d0d1: a1 38 53 12 00 mov 0x125338,%eax 10d0d6: 40 inc %eax 10d0d7: a3 38 53 12 00 mov %eax,0x125338 /* * 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 ); 10d0dc: 59 pop %ecx 10d0dd: 58 pop %eax 10d0de: 53 push %ebx 10d0df: 56 push %esi 10d0e0: e8 57 f6 ff ff call 10c73c <_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 ); 10d0e5: 58 pop %eax 10d0e6: 5a pop %edx 10d0e7: 6a 01 push $0x1 10d0e9: 53 push %ebx 10d0ea: e8 51 0b 00 00 call 10dc40 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d0ef: 89 1c 24 mov %ebx,(%esp) 10d0f2: e8 9d 09 00 00 call 10da94 <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10d0f7: 83 c4 10 add $0x10,%esp 10d0fa: 84 c0 test %al,%al 10d0fc: 75 06 jne 10d104 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d0fe: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d102: 74 68 je 10d16c <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d104: 3b 1d c0 53 12 00 cmp 0x1253c0,%ebx 10d10a: 74 74 je 10d180 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d10c: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10d113: 00 00 00 if ( the_thread->Start.fp_context ) 10d116: 8b 83 c8 00 00 00 mov 0xc8(%ebx),%eax 10d11c: 85 c0 test %eax,%eax 10d11e: 74 0c je 10d12c <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d120: 83 ec 0c sub $0xc,%esp 10d123: 50 push %eax 10d124: e8 bf 13 00 00 call 10e4e8 <_Workspace_Free> 10d129: 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 ); 10d12c: 83 ec 0c sub $0xc,%esp 10d12f: 53 push %ebx 10d130: e8 bf 0c 00 00 call 10ddf4 <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10d135: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 10d13c: 00 00 00 if ( the_thread->extensions ) 10d13f: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10d145: 83 c4 10 add $0x10,%esp 10d148: 85 c0 test %eax,%eax 10d14a: 74 0c je 10d158 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d14c: 83 ec 0c sub $0xc,%esp 10d14f: 50 push %eax 10d150: e8 93 13 00 00 call 10e4e8 <_Workspace_Free> 10d155: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d158: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d15f: 00 00 00 } 10d162: 8d 65 f8 lea -0x8(%ebp),%esp 10d165: 5b pop %ebx 10d166: 5e pop %esi 10d167: c9 leave 10d168: c3 ret 10d169: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10d16c: 83 ec 0c sub $0xc,%esp 10d16f: 8d 43 48 lea 0x48(%ebx),%eax 10d172: 50 push %eax 10d173: e8 50 12 00 00 call 10e3c8 <_Watchdog_Remove> 10d178: 83 c4 10 add $0x10,%esp 10d17b: eb 87 jmp 10d104 <_Thread_Close+0x60> <== ALWAYS TAKEN 10d17d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10d180: c7 05 c0 53 12 00 00 movl $0x0,0x1253c0 10d187: 00 00 00 10d18a: eb 80 jmp 10d10c <_Thread_Close+0x68> <== ALWAYS TAKEN 0010d18c <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10d18c: 55 push %ebp 10d18d: 89 e5 mov %esp,%ebp 10d18f: 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 ); 10d192: 68 c0 54 12 00 push $0x1254c0 10d197: e8 24 f5 ff ff call 10c6c0 <_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(); 10d19c: a3 08 55 12 00 mov %eax,0x125508 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d1a1: a1 38 53 12 00 mov 0x125338,%eax 10d1a6: 40 inc %eax 10d1a7: a3 38 53 12 00 mov %eax,0x125338 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10d1ac: 8b 15 38 12 12 00 mov 0x121238,%edx 10d1b2: 83 c4 0c add $0xc,%esp 10d1b5: 68 45 4c 44 49 push $0x49444c45 10d1ba: 6a 00 push $0x0 10d1bc: 6a 00 push $0x0 10d1be: 6a 00 push $0x0 10d1c0: 6a 01 push $0x1 10d1c2: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax 10d1c9: 50 push %eax 10d1ca: 6a 00 push $0x0 10d1cc: a1 10 12 12 00 mov 0x121210,%eax 10d1d1: 39 d0 cmp %edx,%eax 10d1d3: 73 02 jae 10d1d7 <_Thread_Create_idle+0x4b> 10d1d5: 89 d0 mov %edx,%eax 10d1d7: 50 push %eax 10d1d8: 6a 00 push $0x0 10d1da: ff 35 08 55 12 00 pushl 0x125508 10d1e0: 68 c0 54 12 00 push $0x1254c0 10d1e5: e8 6a 02 00 00 call 10d454 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d1ea: a1 38 53 12 00 mov 0x125338,%eax 10d1ef: 48 dec %eax 10d1f0: a3 38 53 12 00 mov %eax,0x125338 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10d1f5: a1 08 55 12 00 mov 0x125508,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10d1fa: a3 f8 53 12 00 mov %eax,0x1253f8 10d1ff: a3 c8 53 12 00 mov %eax,0x1253c8 _Thread_Executing = _Thread_Idle; _Thread_Start( 10d204: 83 c4 24 add $0x24,%esp 10d207: 6a 00 push $0x0 10d209: 6a 00 push $0x0 10d20b: ff 35 34 12 12 00 pushl 0x121234 10d211: 6a 00 push $0x0 10d213: 50 push %eax 10d214: e8 67 0c 00 00 call 10de80 <_Thread_Start> <== ALWAYS TAKEN 10d219: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10d21c: c9 leave 10d21d: c3 ret 0010d220 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d220: 55 push %ebp 10d221: 89 e5 mov %esp,%ebp 10d223: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d226: 8d 45 f4 lea -0xc(%ebp),%eax 10d229: 50 push %eax 10d22a: ff 75 08 pushl 0x8(%ebp) 10d22d: e8 aa 01 00 00 call 10d3dc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10d232: 83 c4 10 add $0x10,%esp 10d235: 8b 55 f4 mov -0xc(%ebp),%edx 10d238: 85 d2 test %edx,%edx 10d23a: 75 1c jne 10d258 <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d23c: 83 ec 08 sub $0x8,%esp 10d23f: 68 18 00 00 10 push $0x10000018 10d244: 50 push %eax 10d245: e8 c6 fd ff ff call 10d010 <_Thread_Clear_state> <== ALWAYS TAKEN 10d24a: a1 38 53 12 00 mov 0x125338,%eax 10d24f: 48 dec %eax 10d250: a3 38 53 12 00 mov %eax,0x125338 10d255: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d258: c9 leave 10d259: c3 ret 0010d25c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d25c: 55 push %ebp 10d25d: 89 e5 mov %esp,%ebp 10d25f: 57 push %edi 10d260: 56 push %esi 10d261: 53 push %ebx 10d262: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d265: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx _ISR_Disable( level ); 10d26b: 9c pushf 10d26c: fa cli 10d26d: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d26e: 8a 15 08 54 12 00 mov 0x125408,%dl 10d274: 84 d2 test %dl,%dl 10d276: 0f 84 10 01 00 00 je 10d38c <_Thread_Dispatch+0x130> 10d27c: 8d 7d d8 lea -0x28(%ebp),%edi 10d27f: e9 d1 00 00 00 jmp 10d355 <_Thread_Dispatch+0xf9> <== ALWAYS TAKEN executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10d284: 50 push %eax 10d285: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d286: 83 ec 0c sub $0xc,%esp 10d289: 8d 45 e0 lea -0x20(%ebp),%eax 10d28c: 50 push %eax 10d28d: e8 32 2f 00 00 call 1101c4 <_TOD_Get_uptime> _Timestamp_Subtract( 10d292: 83 c4 0c add $0xc,%esp 10d295: 57 push %edi 10d296: 8d 45 e0 lea -0x20(%ebp),%eax 10d299: 50 push %eax 10d29a: 68 00 54 12 00 push $0x125400 10d29f: e8 1c 0d 00 00 call 10dfc0 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d2a4: 5a pop %edx 10d2a5: 59 pop %ecx 10d2a6: 57 push %edi 10d2a7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d2ad: 50 push %eax 10d2ae: e8 d1 0c 00 00 call 10df84 <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10d2b3: 8b 45 e0 mov -0x20(%ebp),%eax 10d2b6: 8b 55 e4 mov -0x1c(%ebp),%edx 10d2b9: a3 00 54 12 00 mov %eax,0x125400 10d2be: 89 15 04 54 12 00 mov %edx,0x125404 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d2c4: a1 c4 53 12 00 mov 0x1253c4,%eax 10d2c9: 83 c4 10 add $0x10,%esp 10d2cc: 85 c0 test %eax,%eax 10d2ce: 74 10 je 10d2e0 <_Thread_Dispatch+0x84> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10d2d0: 8b 10 mov (%eax),%edx 10d2d2: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d2d8: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10d2de: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d2e0: 83 ec 08 sub $0x8,%esp 10d2e3: 56 push %esi 10d2e4: 53 push %ebx 10d2e5: e8 66 0f 00 00 call 10e250 <_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 ); 10d2ea: 59 pop %ecx 10d2eb: 58 pop %eax 10d2ec: 81 c6 d0 00 00 00 add $0xd0,%esi 10d2f2: 56 push %esi 10d2f3: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10d2f9: 50 push %eax 10d2fa: e8 51 12 00 00 call 10e550 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d2ff: 83 c4 10 add $0x10,%esp 10d302: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 10d308: 85 d2 test %edx,%edx 10d30a: 74 36 je 10d342 <_Thread_Dispatch+0xe6> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10d30c: a1 c0 53 12 00 mov 0x1253c0,%eax 10d311: 39 c3 cmp %eax,%ebx 10d313: 74 2d je 10d342 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d315: 85 c0 test %eax,%eax 10d317: 74 11 je 10d32a <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d319: 83 ec 0c sub $0xc,%esp 10d31c: 05 e8 00 00 00 add $0xe8,%eax 10d321: 50 push %eax 10d322: e8 5d 12 00 00 call 10e584 <_CPU_Context_save_fp> 10d327: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d32a: 83 ec 0c sub $0xc,%esp 10d32d: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10d333: 50 push %eax 10d334: e8 55 12 00 00 call 10e58e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d339: 89 1d c0 53 12 00 mov %ebx,0x1253c0 10d33f: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d342: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx _ISR_Disable( level ); 10d348: 9c pushf 10d349: fa cli 10d34a: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d34b: 8a 15 08 54 12 00 mov 0x125408,%dl 10d351: 84 d2 test %dl,%dl 10d353: 74 37 je 10d38c <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d355: 8b 35 c8 53 12 00 mov 0x1253c8,%esi _Thread_Dispatch_disable_level = 1; 10d35b: c7 05 38 53 12 00 01 movl $0x1,0x125338 10d362: 00 00 00 _Context_Switch_necessary = false; 10d365: c6 05 08 54 12 00 00 movb $0x0,0x125408 _Thread_Executing = heir; 10d36c: 89 35 f8 53 12 00 mov %esi,0x1253f8 #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 ) 10d372: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d376: 0f 85 08 ff ff ff jne 10d284 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d37c: 8b 15 04 53 12 00 mov 0x125304,%edx 10d382: 89 56 78 mov %edx,0x78(%esi) 10d385: e9 fa fe ff ff jmp 10d284 <_Thread_Dispatch+0x28> <== ALWAYS TAKEN 10d38a: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d38c: c7 05 38 53 12 00 00 movl $0x0,0x125338 10d393: 00 00 00 _ISR_Enable( level ); 10d396: 50 push %eax 10d397: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d398: a1 dc 53 12 00 mov 0x1253dc,%eax 10d39d: 85 c0 test %eax,%eax 10d39f: 75 06 jne 10d3a7 <_Thread_Dispatch+0x14b> <== ALWAYS TAKEN executing->do_post_task_switch_extension ) { 10d3a1: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d3a5: 74 09 je 10d3b0 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d3a7: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d3ab: e8 5c e9 ff ff call 10bd0c <_API_extensions_Run_postswitch> } } 10d3b0: 8d 65 f4 lea -0xc(%ebp),%esp 10d3b3: 5b pop %ebx 10d3b4: 5e pop %esi 10d3b5: 5f pop %edi 10d3b6: c9 leave 10d3b7: c3 ret 0010d3b8 <_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 ) { 10d3b8: 55 push %ebp 10d3b9: 89 e5 mov %esp,%ebp 10d3bb: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10d3be: a1 38 53 12 00 mov 0x125338,%eax 10d3c3: 48 dec %eax 10d3c4: a3 38 53 12 00 mov %eax,0x125338 10d3c9: a1 38 53 12 00 mov 0x125338,%eax 10d3ce: 85 c0 test %eax,%eax 10d3d0: 74 02 je 10d3d4 <_Thread_Enable_dispatch+0x1c> return; _Thread_Dispatch(); } 10d3d2: c9 leave 10d3d3: c3 ret 10d3d4: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10d3d5: e9 82 fe ff ff jmp 10d25c <_Thread_Dispatch> <== ALWAYS TAKEN 00111d98 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 111d98: 55 push %ebp 111d99: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 111d9b: a1 f8 53 12 00 mov 0x1253f8,%eax if ( !_States_Is_ready( executing->current_state ) || 111da0: 8b 50 10 mov 0x10(%eax),%edx 111da3: 85 d2 test %edx,%edx 111da5: 75 0e jne 111db5 <_Thread_Evaluate_mode+0x1d> <== ALWAYS TAKEN 111da7: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 111dad: 74 11 je 111dc0 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 111daf: 80 78 75 00 cmpb $0x0,0x75(%eax) 111db3: 74 0b je 111dc0 <_Thread_Evaluate_mode+0x28> <== ALWAYS TAKEN _Context_Switch_necessary = true; 111db5: c6 05 08 54 12 00 01 movb $0x1,0x125408 111dbc: b0 01 mov $0x1,%al return true; } return false; } 111dbe: c9 leave 111dbf: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 111dc0: 31 c0 xor %eax,%eax } return false; } 111dc2: c9 leave 111dc3: c3 ret 0010d3dc <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d3dc: 55 push %ebp 10d3dd: 89 e5 mov %esp,%ebp 10d3df: 53 push %ebx 10d3e0: 83 ec 04 sub $0x4,%esp 10d3e3: 8b 45 08 mov 0x8(%ebp),%eax 10d3e6: 8b 4d 0c mov 0xc(%ebp),%ecx uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 10d3e9: 85 c0 test %eax,%eax 10d3eb: 74 4b je 10d438 <_Thread_Get+0x5c> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10d3ed: 89 c2 mov %eax,%edx 10d3ef: c1 ea 18 shr $0x18,%edx 10d3f2: 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 ) 10d3f5: 8d 5a ff lea -0x1(%edx),%ebx 10d3f8: 83 fb 03 cmp $0x3,%ebx 10d3fb: 77 2b ja 10d428 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d3fd: 89 c3 mov %eax,%ebx 10d3ff: c1 eb 1b shr $0x1b,%ebx 10d402: 4b dec %ebx 10d403: 75 23 jne 10d428 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d405: 8b 14 95 0c 53 12 00 mov 0x12530c(,%edx,4),%edx if ( !api_information ) { 10d40c: 85 d2 test %edx,%edx 10d40e: 74 18 je 10d428 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d410: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d413: 85 d2 test %edx,%edx 10d415: 74 11 je 10d428 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d417: 53 push %ebx 10d418: 51 push %ecx 10d419: 50 push %eax 10d41a: 52 push %edx 10d41b: e8 50 f7 ff ff call 10cb70 <_Objects_Get> <== ALWAYS TAKEN 10d420: 83 c4 10 add $0x10,%esp done: return tp; } 10d423: 8b 5d fc mov -0x4(%ebp),%ebx 10d426: c9 leave 10d427: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d428: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d42e: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d430: 8b 5d fc mov -0x4(%ebp),%ebx 10d433: c9 leave 10d434: c3 ret 10d435: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d438: a1 38 53 12 00 mov 0x125338,%eax 10d43d: 40 inc %eax 10d43e: a3 38 53 12 00 mov %eax,0x125338 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 10d443: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d449: a1 f8 53 12 00 mov 0x1253f8,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d44e: 8b 5d fc mov -0x4(%ebp),%ebx 10d451: c9 leave 10d452: c3 ret 00111dc4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 111dc4: 55 push %ebp 111dc5: 89 e5 mov %esp,%ebp 111dc7: 53 push %ebx 111dc8: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 111dcb: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 111dd1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 111dd7: 85 c0 test %eax,%eax 111dd9: 74 79 je 111e54 <_Thread_Handler+0x90> 111ddb: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 111ddc: a0 70 4f 12 00 mov 0x124f70,%al 111de1: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 111de4: c6 05 70 4f 12 00 01 movb $0x1,0x124f70 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 111deb: 8b 93 e8 00 00 00 mov 0xe8(%ebx),%edx 111df1: 85 d2 test %edx,%edx 111df3: 74 24 je 111e19 <_Thread_Handler+0x55> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 111df5: a1 c0 53 12 00 mov 0x1253c0,%eax 111dfa: 39 c3 cmp %eax,%ebx 111dfc: 74 1b je 111e19 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 111dfe: 85 c0 test %eax,%eax 111e00: 74 11 je 111e13 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 111e02: 83 ec 0c sub $0xc,%esp 111e05: 05 e8 00 00 00 add $0xe8,%eax 111e0a: 50 push %eax 111e0b: e8 74 c7 ff ff call 10e584 <_CPU_Context_save_fp> 111e10: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 111e13: 89 1d c0 53 12 00 mov %ebx,0x1253c0 /* * 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 ); 111e19: 83 ec 0c sub $0xc,%esp 111e1c: 53 push %ebx 111e1d: e8 9e c2 ff ff call 10e0c0 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111e22: e8 91 b5 ff ff call 10d3b8 <_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) */ { 111e27: 83 c4 10 add $0x10,%esp 111e2a: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 111e2e: 74 28 je 111e58 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111e30: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 111e36: 85 c0 test %eax,%eax 111e38: 74 2d je 111e67 <_Thread_Handler+0xa3> <== NEVER TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 111e3a: 83 ec 0c sub $0xc,%esp 111e3d: 53 push %ebx 111e3e: e8 b9 c2 ff ff call 10e0fc <_User_extensions_Thread_exitted> _Internal_error_Occurred( 111e43: 83 c4 0c add $0xc,%esp 111e46: 6a 06 push $0x6 111e48: 6a 01 push $0x1 111e4a: 6a 00 push $0x0 111e4c: e8 d7 a7 ff ff call 10c628 <_Internal_error_Occurred> 111e51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 111e54: fb sti 111e55: eb 85 jmp 111ddc <_Thread_Handler+0x18> 111e57: 90 nop <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { INIT_NAME (); 111e58: e8 53 c0 00 00 call 11deb0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111e5d: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 111e63: 85 c0 test %eax,%eax 111e65: 75 d3 jne 111e3a <_Thread_Handler+0x76> <== ALWAYS TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 111e67: 83 ec 0c sub $0xc,%esp 111e6a: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 111e70: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 111e76: 89 43 28 mov %eax,0x28(%ebx) 111e79: 83 c4 10 add $0x10,%esp 111e7c: eb bc jmp 111e3a <_Thread_Handler+0x76> <== ALWAYS TAKEN 0010d694 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10d694: 55 push %ebp 10d695: 89 e5 mov %esp,%ebp 10d697: 53 push %ebx 10d698: 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; 10d69b: a1 30 12 12 00 mov 0x121230,%eax maximum_extensions = Configuration.maximum_extensions; 10d6a0: 8b 15 28 12 12 00 mov 0x121228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10d6a6: 8b 1d 44 12 12 00 mov 0x121244,%ebx 10d6ac: 85 db test %ebx,%ebx 10d6ae: 0f 94 c3 sete %bl 10d6b1: 8b 0d 40 12 12 00 mov 0x121240,%ecx 10d6b7: 85 c9 test %ecx,%ecx 10d6b9: 0f 94 c1 sete %cl 10d6bc: 38 cb cmp %cl,%bl 10d6be: 0f 85 9d 00 00 00 jne 10d761 <_Thread_Handler_initialization+0xcd> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10d6c4: c6 05 08 54 12 00 00 movb $0x0,0x125408 _Thread_Executing = NULL; 10d6cb: c7 05 f8 53 12 00 00 movl $0x0,0x1253f8 10d6d2: 00 00 00 _Thread_Heir = NULL; 10d6d5: c7 05 c8 53 12 00 00 movl $0x0,0x1253c8 10d6dc: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10d6df: c7 05 c0 53 12 00 00 movl $0x0,0x1253c0 10d6e6: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10d6e9: c7 05 dc 53 12 00 00 movl $0x0,0x1253dc 10d6f0: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10d6f3: 89 15 d8 53 12 00 mov %edx,0x1253d8 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10d6f9: a3 04 53 12 00 mov %eax,0x125304 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10d6fe: 83 ec 0c sub $0xc,%esp 10d701: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax 10d708: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10d70c: c1 e0 02 shl $0x2,%eax 10d70f: 50 push %eax 10d710: e8 8b 0d 00 00 call 10e4a0 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10d715: a3 00 53 12 00 mov %eax,0x125300 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10d71a: 0f b6 1d 14 12 12 00 movzbl 0x121214,%ebx 10d721: 31 d2 xor %edx,%edx 10d723: 83 c4 10 add $0x10,%esp 10d726: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d728: 8d 48 04 lea 0x4(%eax),%ecx 10d72b: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10d72d: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10d734: 89 40 08 mov %eax,0x8(%eax) 10d737: 42 inc %edx 10d738: 83 c0 0c add $0xc,%eax 10d73b: 39 da cmp %ebx,%edx 10d73d: 76 e9 jbe 10d728 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10d73f: 50 push %eax 10d740: 6a 08 push $0x8 10d742: 6a 00 push $0x0 10d744: 68 04 01 00 00 push $0x104 10d749: 6a 01 push $0x1 10d74b: 6a 01 push $0x1 10d74d: 6a 01 push $0x1 10d74f: 68 c0 54 12 00 push $0x1254c0 10d754: e8 7f f4 ff ff call 10cbd8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10d759: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10d75c: 8b 5d fc mov -0x4(%ebp),%ebx 10d75f: c9 leave 10d760: c3 ret * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 10d761: 52 push %edx 10d762: 6a 0f push $0xf 10d764: 6a 01 push $0x1 10d766: 6a 00 push $0x0 10d768: e8 bb ee ff ff call 10c628 <_Internal_error_Occurred> 0010d454 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d454: 55 push %ebp 10d455: 89 e5 mov %esp,%ebp 10d457: 57 push %edi 10d458: 56 push %esi 10d459: 53 push %ebx 10d45a: 83 ec 24 sub $0x24,%esp 10d45d: 8b 5d 0c mov 0xc(%ebp),%ebx 10d460: 8b 75 14 mov 0x14(%ebp),%esi 10d463: 0f b6 7d 18 movzbl 0x18(%ebp),%edi 10d467: 8a 45 20 mov 0x20(%ebp),%al 10d46a: 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; 10d46d: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d474: 00 00 00 10d477: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d47e: 00 00 00 10d481: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d488: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d48b: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d492: 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 ); 10d495: 56 push %esi 10d496: 53 push %ebx 10d497: e8 f4 08 00 00 call 10dd90 <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10d49c: 83 c4 10 add $0x10,%esp 10d49f: 85 c0 test %eax,%eax 10d4a1: 0f 84 65 01 00 00 je 10d60c <_Thread_Initialize+0x1b8> 10d4a7: 39 c6 cmp %eax,%esi 10d4a9: 0f 87 5d 01 00 00 ja 10d60c <_Thread_Initialize+0x1b8> <== ALWAYS TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d4af: 8b 93 cc 00 00 00 mov 0xcc(%ebx),%edx 10d4b5: 89 93 c4 00 00 00 mov %edx,0xc4(%ebx) the_stack->size = size; 10d4bb: 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 ) { 10d4c1: 89 f8 mov %edi,%eax 10d4c3: 84 c0 test %al,%al 10d4c5: 0f 85 59 01 00 00 jne 10d624 <_Thread_Initialize+0x1d0> 10d4cb: 31 c0 xor %eax,%eax 10d4cd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10d4d4: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10d4da: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d4e0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d4e7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d4ee: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d4f5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d4fc: a1 d8 53 12 00 mov 0x1253d8,%eax 10d501: 85 c0 test %eax,%eax 10d503: 0f 85 37 01 00 00 jne 10d640 <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d509: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d510: 00 00 00 10d513: 31 ff xor %edi,%edi /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d515: 8a 45 e7 mov -0x19(%ebp),%al 10d518: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d51e: 8b 45 24 mov 0x24(%ebp),%eax 10d521: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d527: 8b 45 28 mov 0x28(%ebp),%eax 10d52a: 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; 10d530: 8b 45 2c mov 0x2c(%ebp),%eax 10d533: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d539: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d540: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d547: 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; 10d54e: 8b 45 1c mov 0x1c(%ebp),%eax 10d551: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d554: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d55a: 83 ec 08 sub $0x8,%esp 10d55d: 50 push %eax 10d55e: 53 push %ebx 10d55f: e8 70 06 00 00 call 10dbd4 <_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 ); 10d564: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d56b: 00 00 00 10d56e: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d575: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d578: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d57c: 8b 45 08 mov 0x8(%ebp),%eax 10d57f: 8b 40 1c mov 0x1c(%eax),%eax 10d582: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d585: 8b 45 30 mov 0x30(%ebp),%eax 10d588: 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 ); 10d58b: 89 1c 24 mov %ebx,(%esp) 10d58e: e8 f5 0b 00 00 call 10e188 <_User_extensions_Thread_create> <== ALWAYS TAKEN if ( extension_status ) 10d593: 83 c4 10 add $0x10,%esp 10d596: 84 c0 test %al,%al 10d598: 75 7e jne 10d618 <_Thread_Initialize+0x1c4> return true; failed: if ( the_thread->libc_reent ) 10d59a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10d5a0: 85 c0 test %eax,%eax 10d5a2: 74 0c je 10d5b0 <_Thread_Initialize+0x15c> _Workspace_Free( the_thread->libc_reent ); 10d5a4: 83 ec 0c sub $0xc,%esp 10d5a7: 50 push %eax 10d5a8: e8 3b 0f 00 00 call 10e4e8 <_Workspace_Free> 10d5ad: 83 c4 10 add $0x10,%esp 10d5b0: 31 f6 xor %esi,%esi for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d5b2: 8b 84 b3 f0 00 00 00 mov 0xf0(%ebx,%esi,4),%eax 10d5b9: 85 c0 test %eax,%eax 10d5bb: 74 0c je 10d5c9 <_Thread_Initialize+0x175> _Workspace_Free( the_thread->API_Extensions[i] ); 10d5bd: 83 ec 0c sub $0xc,%esp 10d5c0: 50 push %eax 10d5c1: e8 22 0f 00 00 call 10e4e8 <_Workspace_Free> 10d5c6: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) 10d5c9: 46 inc %esi 10d5ca: 83 fe 03 cmp $0x3,%esi 10d5cd: 75 e3 jne 10d5b2 <_Thread_Initialize+0x15e> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10d5cf: 85 ff test %edi,%edi 10d5d1: 74 0c je 10d5df <_Thread_Initialize+0x18b> (void) _Workspace_Free( extensions_area ); 10d5d3: 83 ec 0c sub $0xc,%esp 10d5d6: 57 push %edi 10d5d7: e8 0c 0f 00 00 call 10e4e8 <_Workspace_Free> 10d5dc: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d5df: 8b 45 e0 mov -0x20(%ebp),%eax 10d5e2: 85 c0 test %eax,%eax 10d5e4: 74 0e je 10d5f4 <_Thread_Initialize+0x1a0> (void) _Workspace_Free( fp_area ); 10d5e6: 83 ec 0c sub $0xc,%esp 10d5e9: ff 75 e0 pushl -0x20(%ebp) 10d5ec: e8 f7 0e 00 00 call 10e4e8 <_Workspace_Free> 10d5f1: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d5f4: 83 ec 0c sub $0xc,%esp 10d5f7: 53 push %ebx 10d5f8: e8 f7 07 00 00 call 10ddf4 <_Thread_Stack_Free> 10d5fd: 31 c0 xor %eax,%eax return false; 10d5ff: 83 c4 10 add $0x10,%esp } 10d602: 8d 65 f4 lea -0xc(%ebp),%esp 10d605: 5b pop %ebx 10d606: 5e pop %esi 10d607: 5f pop %edi 10d608: c9 leave 10d609: c3 ret 10d60a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d60c: 31 c0 xor %eax,%eax } 10d60e: 8d 65 f4 lea -0xc(%ebp),%esp 10d611: 5b pop %ebx 10d612: 5e pop %esi 10d613: 5f pop %edi 10d614: c9 leave 10d615: c3 ret 10d616: 66 90 xchg %ax,%ax <== NOT EXECUTED * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10d618: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d61a: 8d 65 f4 lea -0xc(%ebp),%esp 10d61d: 5b pop %ebx 10d61e: 5e pop %esi 10d61f: 5f pop %edi 10d620: c9 leave 10d621: c3 ret 10d622: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10d624: 83 ec 0c sub $0xc,%esp 10d627: 6a 6c push $0x6c 10d629: e8 9e 0e 00 00 call 10e4cc <_Workspace_Allocate> 10d62e: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d631: 83 c4 10 add $0x10,%esp 10d634: 85 c0 test %eax,%eax 10d636: 74 55 je 10d68d <_Thread_Initialize+0x239> 10d638: 8b 45 e0 mov -0x20(%ebp),%eax 10d63b: e9 94 fe ff ff jmp 10d4d4 <_Thread_Initialize+0x80> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d640: 83 ec 0c sub $0xc,%esp 10d643: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d64a: 50 push %eax 10d64b: e8 7c 0e 00 00 call 10e4cc <_Workspace_Allocate> 10d650: 89 c7 mov %eax,%edi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d652: 83 c4 10 add $0x10,%esp 10d655: 85 c0 test %eax,%eax 10d657: 0f 84 3d ff ff ff je 10d59a <_Thread_Initialize+0x146> goto failed; } the_thread->extensions = (void **) extensions_area; 10d65d: 89 c1 mov %eax,%ecx 10d65f: 89 83 fc 00 00 00 mov %eax,0xfc(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d665: 8b 35 d8 53 12 00 mov 0x1253d8,%esi 10d66b: 31 d2 xor %edx,%edx 10d66d: 31 c0 xor %eax,%eax 10d66f: eb 09 jmp 10d67a <_Thread_Initialize+0x226> <== ALWAYS TAKEN 10d671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d674: 8b 8b fc 00 00 00 mov 0xfc(%ebx),%ecx the_thread->extensions[i] = NULL; 10d67a: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10d681: 40 inc %eax 10d682: 89 c2 mov %eax,%edx 10d684: 39 f0 cmp %esi,%eax 10d686: 76 ec jbe 10d674 <_Thread_Initialize+0x220> 10d688: e9 88 fe ff ff jmp 10d515 <_Thread_Initialize+0xc1> <== ALWAYS TAKEN * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10d68d: 31 ff xor %edi,%edi 10d68f: e9 06 ff ff ff jmp 10d59a <_Thread_Initialize+0x146> <== ALWAYS TAKEN 001114b8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 1114b8: 55 push %ebp 1114b9: 89 e5 mov %esp,%ebp 1114bb: 53 push %ebx 1114bc: 83 ec 10 sub $0x10,%esp 1114bf: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 1114c2: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 1114c9: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 1114cf: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 1114d2: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1114d8: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1114db: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1114e1: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1114e7: 8b 45 0c mov 0xc(%ebp),%eax 1114ea: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1114f0: 8b 45 10 mov 0x10(%ebp),%eax 1114f3: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1114f9: 53 push %ebx 1114fa: e8 6d d0 ff ff call 10e56c <_Thread_queue_Extract_with_proxy> 1114ff: 83 c4 10 add $0x10,%esp 111502: 84 c0 test %al,%al 111504: 75 06 jne 11150c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111506: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 11150a: 74 28 je 111534 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 11150c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111512: 39 43 14 cmp %eax,0x14(%ebx) 111515: 74 15 je 11152c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111517: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 11151a: 89 45 0c mov %eax,0xc(%ebp) 11151d: 89 5d 08 mov %ebx,0x8(%ebp) } } 111520: 8b 5d fc mov -0x4(%ebp),%ebx 111523: c9 leave (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111524: e9 0f d2 ff ff jmp 10e738 <_Thread_Set_priority> 111529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 11152c: 8b 5d fc mov -0x4(%ebp),%ebx 11152f: c9 leave 111530: c3 ret 111531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 111534: 83 ec 0c sub $0xc,%esp 111537: 8d 43 48 lea 0x48(%ebx),%eax 11153a: 50 push %eax 11153b: e8 2c da ff ff call 10ef6c <_Watchdog_Remove> 111540: 83 c4 10 add $0x10,%esp 111543: eb c7 jmp 11150c <_Thread_Reset+0x54> <== ALWAYS TAKEN 00110880 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 110880: 55 push %ebp 110881: 89 e5 mov %esp,%ebp 110883: 56 push %esi 110884: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 110885: a1 f8 53 12 00 mov 0x1253f8,%eax ready = executing->ready; 11088a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 110890: 9c pushf 110891: fa cli 110892: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 110893: 8b 1a mov (%edx),%ebx 110895: 3b 5a 08 cmp 0x8(%edx),%ebx 110898: 74 3e je 1108d8 <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11089a: 8b 30 mov (%eax),%esi previous = the_node->previous; 11089c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 11089f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 1108a2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1108a4: 8d 5a 04 lea 0x4(%edx),%ebx 1108a7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1108a9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1108ac: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1108af: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1108b1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 1108b4: 51 push %ecx 1108b5: 9d popf 1108b6: fa cli if ( _Thread_Is_heir( executing ) ) 1108b7: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 1108bd: 74 0d je 1108cc <_Thread_Reset_timeslice+0x4c> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 1108bf: c6 05 08 54 12 00 01 movb $0x1,0x125408 _ISR_Enable( level ); 1108c6: 51 push %ecx 1108c7: 9d popf } 1108c8: 5b pop %ebx 1108c9: 5e pop %esi 1108ca: c9 leave 1108cb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 1108cc: 8b 02 mov (%edx),%eax 1108ce: a3 c8 53 12 00 mov %eax,0x1253c8 1108d3: eb ea jmp 1108bf <_Thread_Reset_timeslice+0x3f> <== ALWAYS TAKEN 1108d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 1108d8: 51 push %ecx 1108d9: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 1108da: 5b pop %ebx 1108db: 5e pop %esi 1108dc: c9 leave 1108dd: c3 ret 0010e6ac <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e6ac: 55 push %ebp 10e6ad: 89 e5 mov %esp,%ebp 10e6af: 53 push %ebx 10e6b0: 83 ec 04 sub $0x4,%esp 10e6b3: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e6b6: f6 43 10 01 testb $0x1,0x10(%ebx) 10e6ba: 74 08 je 10e6c4 <_Thread_Restart+0x18> 10e6bc: 31 c0 xor %eax,%eax return true; } return false; } 10e6be: 8b 5d fc mov -0x4(%ebp),%ebx 10e6c1: c9 leave 10e6c2: c3 ret 10e6c3: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e6c4: 83 ec 0c sub $0xc,%esp 10e6c7: 53 push %ebx 10e6c8: e8 b3 01 00 00 call 10e880 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e6cd: 83 c4 0c add $0xc,%esp 10e6d0: ff 75 10 pushl 0x10(%ebp) 10e6d3: ff 75 0c pushl 0xc(%ebp) 10e6d6: 53 push %ebx 10e6d7: e8 dc 2d 00 00 call 1114b8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e6dc: 89 1c 24 mov %ebx,(%esp) 10e6df: e8 b0 2a 00 00 call 111194 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e6e4: 89 1c 24 mov %ebx,(%esp) 10e6e7: e8 28 2d 00 00 call 111414 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e6ec: 89 1c 24 mov %ebx,(%esp) 10e6ef: e8 80 06 00 00 call 10ed74 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10e6f4: 83 c4 10 add $0x10,%esp 10e6f7: 3b 1d 58 74 12 00 cmp 0x127458,%ebx 10e6fd: 74 07 je 10e706 <_Thread_Restart+0x5a> #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 ); 10e6ff: b0 01 mov $0x1,%al return true; } return false; } 10e701: 8b 5d fc mov -0x4(%ebp),%ebx 10e704: c9 leave 10e705: c3 ret */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 10e706: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10e70d: 74 18 je 10e727 <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e70f: 83 ec 0c sub $0xc,%esp 10e712: 81 c3 e8 00 00 00 add $0xe8,%ebx 10e718: 53 push %ebx 10e719: e8 20 0a 00 00 call 10f13e <_CPU_Context_restore_fp> 10e71e: 8b 1d 58 74 12 00 mov 0x127458,%ebx 10e724: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e727: 83 ec 0c sub $0xc,%esp 10e72a: 81 c3 d0 00 00 00 add $0xd0,%ebx 10e730: 53 push %ebx 10e731: e8 f7 09 00 00 call 10f12d <_CPU_Context_restore> <== ALWAYS TAKEN 00111508 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111508: 55 push %ebp 111509: 89 e5 mov %esp,%ebp 11150b: 53 push %ebx 11150c: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 11150f: 9c pushf 111510: fa cli 111511: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 111512: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 111515: f6 c2 02 test $0x2,%dl 111518: 74 6e je 111588 <_Thread_Resume+0x80> <== ALWAYS TAKEN 11151a: 83 e2 fd and $0xfffffffd,%edx current_state = 11151d: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111520: 85 d2 test %edx,%edx 111522: 75 64 jne 111588 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 111524: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 11152a: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111531: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 111534: 66 8b 15 ec a4 12 00 mov 0x12a4ec,%dx 11153b: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111541: 66 89 15 ec a4 12 00 mov %dx,0x12a4ec _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111548: 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); 11154e: 8d 5a 04 lea 0x4(%edx),%ebx 111551: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 111553: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 111556: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111559: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11155b: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 11155e: 51 push %ecx 11155f: 9d popf 111560: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111561: 8b 50 14 mov 0x14(%eax),%edx 111564: 8b 1d c8 a4 12 00 mov 0x12a4c8,%ebx 11156a: 3b 53 14 cmp 0x14(%ebx),%edx 11156d: 73 19 jae 111588 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 11156f: a3 c8 a4 12 00 mov %eax,0x12a4c8 if ( _Thread_Executing->is_preemptible || 111574: a1 f8 a4 12 00 mov 0x12a4f8,%eax 111579: 80 78 75 00 cmpb $0x0,0x75(%eax) 11157d: 74 11 je 111590 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 11157f: c6 05 08 a5 12 00 01 movb $0x1,0x12a508 111586: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 111588: 51 push %ecx 111589: 9d popf } 11158a: 5b pop %ebx 11158b: c9 leave 11158c: c3 ret 11158d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 111590: 85 d2 test %edx,%edx 111592: 74 eb je 11157f <_Thread_Resume+0x77> <== ALWAYS TAKEN 111594: eb f2 jmp 111588 <_Thread_Resume+0x80> <== ALWAYS TAKEN 0010dc40 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10dc40: 55 push %ebp 10dc41: 89 e5 mov %esp,%ebp 10dc43: 56 push %esi 10dc44: 53 push %ebx 10dc45: 8b 45 08 mov 0x8(%ebp),%eax 10dc48: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10dc4b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10dc51: 9c pushf 10dc52: fa cli 10dc53: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10dc54: 8b 58 10 mov 0x10(%eax),%ebx 10dc57: 85 db test %ebx,%ebx 10dc59: 75 2d jne 10dc88 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10dc5b: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dc5e: 8b 1a mov (%edx),%ebx 10dc60: 3b 5a 08 cmp 0x8(%edx),%ebx 10dc63: 74 3b je 10dca0 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dc65: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dc67: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dc6a: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dc6d: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10dc6f: 51 push %ecx 10dc70: 9d popf 10dc71: fa cli if ( _Thread_Is_heir( the_thread ) ) 10dc72: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 10dc78: 74 62 je 10dcdc <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10dc7a: 3b 05 f8 53 12 00 cmp 0x1253f8,%eax 10dc80: 74 12 je 10dc94 <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10dc82: 51 push %ecx 10dc83: 9d popf } 10dc84: 5b pop %ebx 10dc85: 5e pop %esi 10dc86: c9 leave 10dc87: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10dc88: 09 f3 or %esi,%ebx 10dc8a: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10dc8d: 51 push %ecx 10dc8e: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10dc8f: 5b pop %ebx 10dc90: 5e pop %esi 10dc91: c9 leave 10dc92: c3 ret 10dc93: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10dc94: c6 05 08 54 12 00 01 movb $0x1,0x125408 10dc9b: eb e5 jmp 10dc82 <_Thread_Set_state+0x42> <== ALWAYS TAKEN 10dc9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dca0: 8d 5a 04 lea 0x4(%edx),%ebx 10dca3: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10dca5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dcac: 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; 10dcaf: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dcb5: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10dcbc: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10dcbf: 66 83 3a 00 cmpw $0x0,(%edx) 10dcc3: 75 aa jne 10dc6f <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10dcc5: 66 8b 15 ec 53 12 00 mov 0x1253ec,%dx 10dccc: 23 90 98 00 00 00 and 0x98(%eax),%edx 10dcd2: 66 89 15 ec 53 12 00 mov %dx,0x1253ec 10dcd9: eb 94 jmp 10dc6f <_Thread_Set_state+0x2f> <== ALWAYS TAKEN 10dcdb: 90 nop <== NOT EXECUTED 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 ); 10dcdc: 66 8b 35 ec 53 12 00 mov 0x1253ec,%si 10dce3: 31 d2 xor %edx,%edx 10dce5: 89 d3 mov %edx,%ebx 10dce7: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10dceb: 0f b7 db movzwl %bx,%ebx 10dcee: 66 8b b4 1b 80 54 12 mov 0x125480(%ebx,%ebx,1),%si 10dcf5: 00 10dcf6: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10dcfa: c1 e3 04 shl $0x4,%ebx 10dcfd: 0f b7 d2 movzwl %dx,%edx 10dd00: 8d 14 13 lea (%ebx,%edx,1),%edx 10dd03: 8d 1c 52 lea (%edx,%edx,2),%ebx 10dd06: 8b 15 00 53 12 00 mov 0x125300,%edx 10dd0c: 8b 14 9a mov (%edx,%ebx,4),%edx 10dd0f: 89 15 c8 53 12 00 mov %edx,0x1253c8 10dd15: e9 60 ff ff ff jmp 10dc7a <_Thread_Set_state+0x3a> <== ALWAYS TAKEN 0010dd1c <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10dd1c: 55 push %ebp 10dd1d: 89 e5 mov %esp,%ebp 10dd1f: 56 push %esi 10dd20: 53 push %ebx 10dd21: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10dd24: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10dd2a: 9c pushf 10dd2b: fa cli 10dd2c: 5b pop %ebx old_state = the_thread->current_state; 10dd2d: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10dd30: 89 d6 mov %edx,%esi 10dd32: 83 ce 04 or $0x4,%esi 10dd35: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10dd38: 85 d2 test %edx,%edx 10dd3a: 75 11 jne 10dd4d <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10dd3c: 8b 11 mov (%ecx),%edx 10dd3e: 3b 51 08 cmp 0x8(%ecx),%edx 10dd41: 74 11 je 10dd54 <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dd43: 8b 10 mov (%eax),%edx previous = the_node->previous; 10dd45: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10dd48: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10dd4b: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10dd4d: 53 push %ebx 10dd4e: 9d popf } 10dd4f: 5b pop %ebx 10dd50: 5e pop %esi 10dd51: c9 leave 10dd52: c3 ret 10dd53: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dd54: 8d 51 04 lea 0x4(%ecx),%edx 10dd57: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10dd59: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10dd60: 89 49 08 mov %ecx,0x8(%ecx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10dd63: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dd69: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10dd70: 66 21 0a and %cx,(%edx) if ( _States_Is_ready( old_state ) ) { if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10dd73: 66 83 3a 00 cmpw $0x0,(%edx) 10dd77: 75 d4 jne 10dd4d <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10dd79: 66 8b 15 ec 53 12 00 mov 0x1253ec,%dx 10dd80: 23 90 98 00 00 00 and 0x98(%eax),%edx 10dd86: 66 89 15 ec 53 12 00 mov %dx,0x1253ec 10dd8d: eb be jmp 10dd4d <_Thread_Set_transient+0x31> <== ALWAYS TAKEN 0010dd90 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10dd90: 55 push %ebp 10dd91: 89 e5 mov %esp,%ebp 10dd93: 53 push %ebx 10dd94: 83 ec 04 sub $0x4,%esp 10dd97: a1 10 12 12 00 mov 0x121210,%eax 10dd9c: 8b 5d 0c mov 0xc(%ebp),%ebx 10dd9f: 39 c3 cmp %eax,%ebx 10dda1: 73 02 jae 10dda5 <_Thread_Stack_Allocate+0x15> 10dda3: 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 ) { 10dda5: a1 40 12 12 00 mov 0x121240,%eax 10ddaa: 85 c0 test %eax,%eax 10ddac: 74 32 je 10dde0 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10ddae: 83 ec 0c sub $0xc,%esp 10ddb1: 53 push %ebx 10ddb2: ff d0 call *%eax 10ddb4: 83 c4 10 add $0x10,%esp the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10ddb7: 85 c0 test %eax,%eax 10ddb9: 74 11 je 10ddcc <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10ddbb: 8b 55 08 mov 0x8(%ebp),%edx 10ddbe: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10ddc4: 89 d8 mov %ebx,%eax 10ddc6: 8b 5d fc mov -0x4(%ebp),%ebx 10ddc9: c9 leave 10ddca: c3 ret 10ddcb: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10ddcc: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10ddce: 8b 55 08 mov 0x8(%ebp),%edx 10ddd1: 89 82 cc 00 00 00 mov %eax,0xcc(%edx) return the_stack_size; } 10ddd7: 89 d8 mov %ebx,%eax 10ddd9: 8b 5d fc mov -0x4(%ebp),%ebx 10dddc: c9 leave 10dddd: c3 ret 10ddde: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10dde0: 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 ); 10dde3: 83 ec 0c sub $0xc,%esp 10dde6: 53 push %ebx 10dde7: e8 e0 06 00 00 call 10e4cc <_Workspace_Allocate> <== ALWAYS TAKEN 10ddec: 83 c4 10 add $0x10,%esp 10ddef: eb c6 jmp 10ddb7 <_Thread_Stack_Allocate+0x27> <== ALWAYS TAKEN 0010ddf4 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10ddf4: 55 push %ebp 10ddf5: 89 e5 mov %esp,%ebp 10ddf7: 83 ec 08 sub $0x8,%esp 10ddfa: 8b 55 08 mov 0x8(%ebp),%edx * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 10ddfd: a1 44 12 12 00 mov 0x121244,%eax 10de02: 85 c0 test %eax,%eax 10de04: 74 0e je 10de14 <_Thread_Stack_Free+0x20> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10de06: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 10de0c: 89 55 08 mov %edx,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10de0f: 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 ); 10de10: ff e0 jmp *%eax 10de12: 66 90 xchg %ax,%ax <== NOT EXECUTED else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10de14: 8b 82 c4 00 00 00 mov 0xc4(%edx),%eax 10de1a: 89 45 08 mov %eax,0x8(%ebp) } 10de1d: 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 ); 10de1e: e9 c5 06 00 00 jmp 10e4e8 <_Workspace_Free> <== ALWAYS TAKEN 0010de80 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10de80: 55 push %ebp 10de81: 89 e5 mov %esp,%ebp 10de83: 53 push %ebx 10de84: 83 ec 04 sub $0x4,%esp 10de87: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10de8a: f6 43 10 01 testb $0x1,0x10(%ebx) 10de8e: 75 08 jne 10de98 <_Thread_Start+0x18> 10de90: 31 c0 xor %eax,%eax return true; } return false; } 10de92: 8b 5d fc mov -0x4(%ebp),%ebx 10de95: c9 leave 10de96: c3 ret 10de97: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; 10de98: 8b 45 10 mov 0x10(%ebp),%eax 10de9b: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10dea1: 8b 45 0c mov 0xc(%ebp),%eax 10dea4: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10deaa: 8b 45 14 mov 0x14(%ebp),%eax 10dead: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10deb3: 8b 45 18 mov 0x18(%ebp),%eax 10deb6: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10debc: 83 ec 0c sub $0xc,%esp 10debf: 53 push %ebx 10dec0: e8 97 26 00 00 call 11055c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10dec5: 89 1c 24 mov %ebx,(%esp) 10dec8: e8 0f 29 00 00 call 1107dc <_Thread_Ready> <== ALWAYS TAKEN _User_extensions_Thread_start( the_thread ); 10decd: 89 1c 24 mov %ebx,(%esp) 10ded0: e8 3b 03 00 00 call 10e210 <_User_extensions_Thread_start> <== ALWAYS TAKEN 10ded5: b0 01 mov $0x1,%al return true; 10ded7: 83 c4 10 add $0x10,%esp } return false; } 10deda: 8b 5d fc mov -0x4(%ebp),%ebx 10dedd: c9 leave 10dede: c3 ret 0010de24 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10de24: 55 push %ebp 10de25: 89 e5 mov %esp,%ebp 10de27: 83 ec 08 sub $0x8,%esp 10de2a: c7 05 00 55 12 00 03 movl $0x3,0x125500 10de31: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10de34: c6 05 08 54 12 00 00 movb $0x0,0x125408 _Thread_Executing = _Thread_Heir; 10de3b: a1 c8 53 12 00 mov 0x1253c8,%eax 10de40: a3 f8 53 12 00 mov %eax,0x1253f8 #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 ) 10de45: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx 10de4b: 85 d2 test %edx,%edx 10de4d: 74 16 je 10de65 <_Thread_Start_multitasking+0x41> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10de4f: 83 ec 0c sub $0xc,%esp 10de52: 05 e8 00 00 00 add $0xe8,%eax 10de57: 50 push %eax 10de58: e8 31 07 00 00 call 10e58e <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10de5d: a1 c8 53 12 00 mov 0x1253c8,%eax 10de62: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10de65: 83 ec 08 sub $0x8,%esp 10de68: 05 d0 00 00 00 add $0xd0,%eax 10de6d: 50 push %eax 10de6e: 68 20 53 12 00 push $0x125320 10de73: e8 d8 06 00 00 call 10e550 <_CPU_Context_switch> <== ALWAYS TAKEN 10de78: 83 c4 10 add $0x10,%esp } 10de7b: c9 leave 10de7c: c3 ret 001108e0 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 1108e0: 55 push %ebp 1108e1: 89 e5 mov %esp,%ebp 1108e3: 56 push %esi 1108e4: 53 push %ebx 1108e5: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 1108e8: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1108ee: 9c pushf 1108ef: fa cli 1108f0: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 1108f1: 8b 58 10 mov 0x10(%eax),%ebx 1108f4: 85 db test %ebx,%ebx 1108f6: 75 34 jne 11092c <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 1108f8: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 1108ff: 8b 1a mov (%edx),%ebx 110901: 3b 5a 08 cmp 0x8(%edx),%ebx 110904: 74 3e je 110944 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 110906: 8b 18 mov (%eax),%ebx previous = the_node->previous; 110908: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11090b: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 11090e: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 110910: 51 push %ecx 110911: 9d popf 110912: fa cli if ( _Thread_Is_heir( the_thread ) ) 110913: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 110919: 74 65 je 110980 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 11091b: 3b 05 f8 53 12 00 cmp 0x1253f8,%eax 110921: 74 15 je 110938 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 110923: 51 push %ecx 110924: 9d popf } 110925: 5b pop %ebx 110926: 5e pop %esi 110927: c9 leave 110928: c3 ret 110929: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 11092c: 83 cb 02 or $0x2,%ebx 11092f: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 110932: 51 push %ecx 110933: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 110934: 5b pop %ebx 110935: 5e pop %esi 110936: c9 leave 110937: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 110938: c6 05 08 54 12 00 01 movb $0x1,0x125408 11093f: eb e2 jmp 110923 <_Thread_Suspend+0x43> <== ALWAYS TAKEN 110941: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 110944: 8d 5a 04 lea 0x4(%edx),%ebx 110947: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 110949: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 110950: 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; 110953: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 110959: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 110960: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 110963: 66 83 3a 00 cmpw $0x0,(%edx) 110967: 75 a7 jne 110910 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 110969: 66 8b 15 ec 53 12 00 mov 0x1253ec,%dx 110970: 23 90 98 00 00 00 and 0x98(%eax),%edx 110976: 66 89 15 ec 53 12 00 mov %dx,0x1253ec 11097d: eb 91 jmp 110910 <_Thread_Suspend+0x30> <== ALWAYS TAKEN 11097f: 90 nop <== NOT EXECUTED 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 ); 110980: 66 8b 35 ec 53 12 00 mov 0x1253ec,%si 110987: 31 d2 xor %edx,%edx 110989: 89 d3 mov %edx,%ebx 11098b: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 11098f: 0f b7 db movzwl %bx,%ebx 110992: 66 8b b4 1b 80 54 12 mov 0x125480(%ebx,%ebx,1),%si 110999: 00 11099a: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 11099e: c1 e3 04 shl $0x4,%ebx 1109a1: 0f b7 d2 movzwl %dx,%edx 1109a4: 8d 14 13 lea (%ebx,%edx,1),%edx 1109a7: 8d 1c 52 lea (%edx,%edx,2),%ebx 1109aa: 8b 15 00 53 12 00 mov 0x125300,%edx 1109b0: 8b 14 9a mov (%edx,%ebx,4),%edx 1109b3: 89 15 c8 53 12 00 mov %edx,0x1253c8 1109b9: e9 5d ff ff ff jmp 11091b <_Thread_Suspend+0x3b> <== ALWAYS TAKEN 0010dee0 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10dee0: 55 push %ebp 10dee1: 89 e5 mov %esp,%ebp 10dee3: 53 push %ebx 10dee4: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10dee7: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10deed: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10def1: 74 0d je 10df00 <_Thread_Tickle_timeslice+0x20> return; if ( !_States_Is_ready( executing->current_state ) ) 10def3: 8b 53 10 mov 0x10(%ebx),%edx 10def6: 85 d2 test %edx,%edx 10def8: 75 06 jne 10df00 <_Thread_Tickle_timeslice+0x20> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10defa: 83 7b 7c 01 cmpl $0x1,0x7c(%ebx) 10defe: 74 04 je 10df04 <_Thread_Tickle_timeslice+0x24> if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10df00: 58 pop %eax 10df01: 5b pop %ebx 10df02: c9 leave 10df03: c3 ret case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10df04: 8b 43 78 mov 0x78(%ebx),%eax 10df07: 48 dec %eax 10df08: 89 43 78 mov %eax,0x78(%ebx) 10df0b: 85 c0 test %eax,%eax 10df0d: 7f f1 jg 10df00 <_Thread_Tickle_timeslice+0x20> _Thread_Reset_timeslice(); 10df0f: e8 6c 29 00 00 call 110880 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10df14: a1 04 53 12 00 mov 0x125304,%eax 10df19: 89 43 78 mov %eax,0x78(%ebx) 10df1c: eb e2 jmp 10df00 <_Thread_Tickle_timeslice+0x20> <== ALWAYS TAKEN 0010df20 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10df20: 55 push %ebp 10df21: 89 e5 mov %esp,%ebp 10df23: 56 push %esi 10df24: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10df25: a1 f8 53 12 00 mov 0x1253f8,%eax ready = executing->ready; 10df2a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10df30: 9c pushf 10df31: fa cli 10df32: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10df33: 8b 1a mov (%edx),%ebx 10df35: 3b 5a 08 cmp 0x8(%edx),%ebx 10df38: 74 3e je 10df78 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10df3a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10df3c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10df3f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10df42: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10df44: 8d 5a 04 lea 0x4(%edx),%ebx 10df47: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10df49: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10df4c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10df4f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10df51: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10df54: 51 push %ecx 10df55: 9d popf 10df56: fa cli if ( _Thread_Is_heir( executing ) ) 10df57: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 10df5d: 74 0d je 10df6c <_Thread_Yield_processor+0x4c> <== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10df5f: c6 05 08 54 12 00 01 movb $0x1,0x125408 _ISR_Enable( level ); 10df66: 51 push %ecx 10df67: 9d popf } 10df68: 5b pop %ebx 10df69: 5e pop %esi 10df6a: c9 leave 10df6b: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10df6c: 8b 02 mov (%edx),%eax 10df6e: a3 c8 53 12 00 mov %eax,0x1253c8 10df73: eb ea jmp 10df5f <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10df75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10df78: 3b 05 c8 53 12 00 cmp 0x1253c8,%eax 10df7e: 75 df jne 10df5f <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10df80: eb e4 jmp 10df66 <_Thread_Yield_processor+0x46> <== ALWAYS TAKEN 0010ce84 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10ce84: 55 push %ebp 10ce85: 89 e5 mov %esp,%ebp 10ce87: 53 push %ebx 10ce88: 83 ec 04 sub $0x4,%esp 10ce8b: 8b 5d 0c mov 0xc(%ebp),%ebx 10ce8e: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10ce91: 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 ) ) { 10ce98: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10ce9c: 74 16 je 10ceb4 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10ce9e: 50 push %eax 10ce9f: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cea0: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10cea7: 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 } 10ceaa: 8b 5d fc mov -0x4(%ebp),%ebx 10cead: c9 leave 10ceae: e9 5d 01 00 00 jmp 10d010 <_Thread_Clear_state> <== ALWAYS TAKEN 10ceb3: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10ceb4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10cebb: 50 push %eax 10cebc: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10cebd: 83 ec 0c sub $0xc,%esp 10cec0: 8d 43 48 lea 0x48(%ebx),%eax 10cec3: 50 push %eax 10cec4: e8 ff 14 00 00 call 10e3c8 <_Watchdog_Remove> 10cec9: 83 c4 10 add $0x10,%esp 10cecc: eb d2 jmp 10cea0 <_Thread_blocking_operation_Cancel+0x1c> <== ALWAYS TAKEN 0010d770 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d770: 55 push %ebp 10d771: 89 e5 mov %esp,%ebp 10d773: 53 push %ebx 10d774: 83 ec 04 sub $0x4,%esp 10d777: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d77a: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d77e: 74 1c je 10d79c <_Thread_queue_Dequeue+0x2c> 10d780: b8 ec 05 11 00 mov $0x1105ec,%eax dequeue_p = _Thread_queue_Dequeue_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); 10d785: 83 ec 0c sub $0xc,%esp 10d788: 53 push %ebx 10d789: ff d0 call *%eax _ISR_Disable( level ); 10d78b: 9c pushf 10d78c: fa cli 10d78d: 5a pop %edx if ( !the_thread ) { 10d78e: 83 c4 10 add $0x10,%esp 10d791: 85 c0 test %eax,%eax 10d793: 74 0f je 10d7a4 <_Thread_queue_Dequeue+0x34> (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; the_thread = _Thread_Executing; } } _ISR_Enable( level ); 10d795: 52 push %edx 10d796: 9d popf return the_thread; } 10d797: 8b 5d fc mov -0x4(%ebp),%ebx 10d79a: c9 leave 10d79b: c3 ret Thread_Control *(*dequeue_p)( Thread_queue_Control * ); Thread_Control *the_thread; ISR_Level level; Thread_blocking_operation_States sync_state; if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d79c: b8 bc d7 10 00 mov $0x10d7bc,%eax 10d7a1: eb e2 jmp 10d785 <_Thread_queue_Dequeue+0x15> <== ALWAYS TAKEN 10d7a3: 90 nop <== NOT EXECUTED dequeue_p = _Thread_queue_Dequeue_fifo; the_thread = (*dequeue_p)( the_thread_queue ); _ISR_Disable( level ); if ( !the_thread ) { sync_state = the_thread_queue->sync_state; 10d7a4: 8b 4b 30 mov 0x30(%ebx),%ecx 10d7a7: 49 dec %ecx 10d7a8: 83 f9 01 cmp $0x1,%ecx 10d7ab: 77 e8 ja 10d795 <_Thread_queue_Dequeue+0x25> if ( (sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10d7ad: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d7b4: a1 f8 53 12 00 mov 0x1253f8,%eax 10d7b9: eb da jmp 10d795 <_Thread_queue_Dequeue+0x25> <== ALWAYS TAKEN 001105ec <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 1105ec: 55 push %ebp 1105ed: 89 e5 mov %esp,%ebp 1105ef: 53 push %ebx 1105f0: 83 ec 04 sub $0x4,%esp 1105f3: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 1105f6: 9c pushf 1105f7: fa cli 1105f8: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1105f9: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1105fb: 8d 50 04 lea 0x4(%eax),%edx 1105fe: 39 d3 cmp %edx,%ebx 110600: 74 5a je 11065c <_Thread_queue_Dequeue_fifo+0x70> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 110602: 8b 13 mov (%ebx),%edx the_chain->first = new_first; 110604: 89 10 mov %edx,(%eax) new_first->previous = _Chain_Head(the_chain); 110606: 89 42 04 mov %eax,0x4(%edx) 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; 110609: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110610: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110614: 74 1a je 110630 <_Thread_queue_Dequeue_fifo+0x44> _ISR_Enable( level ); 110616: 51 push %ecx 110617: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 110618: 83 ec 08 sub $0x8,%esp 11061b: 68 f8 ff 03 10 push $0x1003fff8 110620: 53 push %ebx 110621: e8 ea c9 ff ff call 10d010 <_Thread_Clear_state> 110626: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 110629: 89 d8 mov %ebx,%eax 11062b: 8b 5d fc mov -0x4(%ebp),%ebx 11062e: c9 leave 11062f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 110630: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 110637: 51 push %ecx 110638: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110639: 83 ec 0c sub $0xc,%esp 11063c: 8d 43 48 lea 0x48(%ebx),%eax 11063f: 50 push %eax 110640: e8 83 dd ff ff call 10e3c8 <_Watchdog_Remove> 110645: 58 pop %eax 110646: 5a pop %edx 110647: 68 f8 ff 03 10 push $0x1003fff8 11064c: 53 push %ebx 11064d: e8 be c9 ff ff call 10d010 <_Thread_Clear_state> 110652: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 110655: 89 d8 mov %ebx,%eax 110657: 8b 5d fc mov -0x4(%ebp),%ebx 11065a: c9 leave 11065b: c3 ret #endif return the_thread; } _ISR_Enable( level ); 11065c: 51 push %ecx 11065d: 9d popf 11065e: 31 db xor %ebx,%ebx return NULL; 110660: eb c7 jmp 110629 <_Thread_queue_Dequeue_fifo+0x3d> <== ALWAYS TAKEN 0010d7bc <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d7bc: 55 push %ebp 10d7bd: 89 e5 mov %esp,%ebp 10d7bf: 57 push %edi 10d7c0: 56 push %esi 10d7c1: 53 push %ebx 10d7c2: 83 ec 1c sub $0x1c,%esp 10d7c5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10d7c8: 9c pushf 10d7c9: fa cli 10d7ca: 58 pop %eax 10d7cb: 89 f2 mov %esi,%edx 10d7cd: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d7cf: 8d 5a 04 lea 0x4(%edx),%ebx 10d7d2: 39 1a cmp %ebx,(%edx) 10d7d4: 75 1a jne 10d7f0 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d7d6: 41 inc %ecx 10d7d7: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d7da: 83 f9 04 cmp $0x4,%ecx 10d7dd: 75 f0 jne 10d7cf <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d7df: 50 push %eax 10d7e0: 9d popf 10d7e1: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10d7e3: 89 d8 mov %ebx,%eax 10d7e5: 8d 65 f4 lea -0xc(%ebp),%esp 10d7e8: 5b pop %ebx 10d7e9: 5e pop %esi 10d7ea: 5f pop %edi 10d7eb: c9 leave 10d7ec: c3 ret 10d7ed: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 10d7f0: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d7f3: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d7f6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d7fd: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d800: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d802: 8b 73 04 mov 0x4(%ebx),%esi 10d805: 8d 7b 3c lea 0x3c(%ebx),%edi 10d808: 39 fa cmp %edi,%edx 10d80a: 74 76 je 10d882 <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10d80c: 8b 7b 40 mov 0x40(%ebx),%edi 10d80f: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d812: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10d814: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10d816: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d819: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d81b: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d81e: 8b 4b 38 mov 0x38(%ebx),%ecx 10d821: 3b 4b 40 cmp 0x40(%ebx),%ecx 10d824: 74 14 je 10d83a <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10d826: 8d 4a 38 lea 0x38(%edx),%ecx 10d829: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10d82c: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10d82f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d832: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d835: 83 c2 3c add $0x3c,%edx 10d838: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d83a: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d83e: 74 18 je 10d858 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10d840: 50 push %eax 10d841: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d842: 83 ec 08 sub $0x8,%esp 10d845: 68 f8 ff 03 10 push $0x1003fff8 10d84a: 53 push %ebx 10d84b: e8 c0 f7 ff ff call 10d010 <_Thread_Clear_state> <== ALWAYS TAKEN 10d850: 83 c4 10 add $0x10,%esp 10d853: eb 8e jmp 10d7e3 <_Thread_queue_Dequeue_priority+0x27> <== ALWAYS TAKEN 10d855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10d858: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d85f: 50 push %eax 10d860: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d861: 83 ec 0c sub $0xc,%esp 10d864: 8d 43 48 lea 0x48(%ebx),%eax 10d867: 50 push %eax 10d868: e8 5b 0b 00 00 call 10e3c8 <_Watchdog_Remove> <== ALWAYS TAKEN 10d86d: 58 pop %eax 10d86e: 5a pop %edx 10d86f: 68 f8 ff 03 10 push $0x1003fff8 10d874: 53 push %ebx 10d875: e8 96 f7 ff ff call 10d010 <_Thread_Clear_state> 10d87a: 83 c4 10 add $0x10,%esp 10d87d: e9 61 ff ff ff jmp 10d7e3 <_Thread_queue_Dequeue_priority+0x27> <== ALWAYS TAKEN new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10d882: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10d884: 89 71 04 mov %esi,0x4(%ecx) 10d887: eb b1 jmp 10d83a <_Thread_queue_Dequeue_priority+0x7e> <== ALWAYS TAKEN 00110664 <_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 ) { 110664: 55 push %ebp 110665: 89 e5 mov %esp,%ebp 110667: 56 push %esi 110668: 53 push %ebx 110669: 8b 55 08 mov 0x8(%ebp),%edx 11066c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 11066f: 9c pushf 110670: fa cli 110671: 59 pop %ecx sync_state = the_thread_queue->sync_state; 110672: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 110675: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 11067c: 83 f8 01 cmp $0x1,%eax 11067f: 74 0b je 11068c <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 110681: 8b 55 10 mov 0x10(%ebp),%edx 110684: 89 0a mov %ecx,(%edx) return sync_state; } 110686: 5b pop %ebx 110687: 5e pop %esi 110688: c9 leave 110689: c3 ret 11068a: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11068c: 8d 72 04 lea 0x4(%edx),%esi 11068f: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 110691: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 110694: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 110697: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 110699: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 11069c: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 11069f: 51 push %ecx 1106a0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 1106a1: 5b pop %ebx 1106a2: 5e pop %esi 1106a3: c9 leave 1106a4: c3 ret 0010d924 <_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 ) { 10d924: 55 push %ebp 10d925: 89 e5 mov %esp,%ebp 10d927: 57 push %edi 10d928: 56 push %esi 10d929: 53 push %ebx 10d92a: 83 ec 08 sub $0x8,%esp 10d92d: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d930: 8d 47 3c lea 0x3c(%edi),%eax 10d933: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10d936: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10d93d: 8d 47 38 lea 0x38(%edi),%eax 10d940: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10d943: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10d946: 89 d0 mov %edx,%eax 10d948: c1 e8 06 shr $0x6,%eax 10d94b: 8d 04 40 lea (%eax,%eax,2),%eax 10d94e: 8b 4d 08 mov 0x8(%ebp),%ecx 10d951: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10d954: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10d957: f6 c2 20 test $0x20,%dl 10d95a: 75 60 jne 10d9bc <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d95c: 8d 46 04 lea 0x4(%esi),%eax 10d95f: 89 75 f0 mov %esi,-0x10(%ebp) 10d962: 89 7d ec mov %edi,-0x14(%ebp) 10d965: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10d967: 9c pushf 10d968: fa cli 10d969: 5e pop %esi search_thread = (Thread_Control *) header->first; 10d96a: 8b 4d f0 mov -0x10(%ebp),%ecx 10d96d: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10d96f: 39 f8 cmp %edi,%eax 10d971: 75 17 jne 10d98a <_Thread_queue_Enqueue_priority+0x66> 10d973: e9 09 01 00 00 jmp 10da81 <_Thread_queue_Enqueue_priority+0x15d> <== ALWAYS TAKEN break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10d978: 56 push %esi 10d979: 9d popf 10d97a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10d97b: 85 58 10 test %ebx,0x10(%eax) 10d97e: 0f 84 a8 00 00 00 je 10da2c <_Thread_queue_Enqueue_priority+0x108> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10d984: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10d986: 39 f8 cmp %edi,%eax 10d988: 74 07 je 10d991 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10d98a: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10d98d: 39 ca cmp %ecx,%edx 10d98f: 77 e7 ja 10d978 <_Thread_queue_Enqueue_priority+0x54> 10d991: 89 4d f0 mov %ecx,-0x10(%ebp) 10d994: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10d997: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10d999: 8b 4d 08 mov 0x8(%ebp),%ecx 10d99c: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10d9a0: 0f 84 8e 00 00 00 je 10da34 <_Thread_queue_Enqueue_priority+0x110> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10d9a6: 8b 45 10 mov 0x10(%ebp),%eax 10d9a9: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10d9ab: 8b 55 08 mov 0x8(%ebp),%edx 10d9ae: 8b 42 30 mov 0x30(%edx),%eax } 10d9b1: 83 c4 08 add $0x8,%esp 10d9b4: 5b pop %ebx 10d9b5: 5e pop %esi 10d9b6: 5f pop %edi 10d9b7: c9 leave 10d9b8: c3 ret 10d9b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d9bc: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10d9bf: 0f b6 0d 14 12 12 00 movzbl 0x121214,%ecx 10d9c6: 41 inc %ecx _ISR_Disable( level ); 10d9c7: 9c pushf 10d9c8: fa cli 10d9c9: 5f pop %edi search_thread = (Thread_Control *) header->last; 10d9ca: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10d9cd: 39 f0 cmp %esi,%eax 10d9cf: 75 12 jne 10d9e3 <_Thread_queue_Enqueue_priority+0xbf> 10d9d1: eb 17 jmp 10d9ea <_Thread_queue_Enqueue_priority+0xc6> <== ALWAYS TAKEN 10d9d3: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10d9d4: 57 push %edi 10d9d5: 9d popf 10d9d6: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10d9d7: 85 58 10 test %ebx,0x10(%eax) 10d9da: 74 4c je 10da28 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10d9dc: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10d9df: 39 f0 cmp %esi,%eax 10d9e1: 74 07 je 10d9ea <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10d9e3: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10d9e6: 39 ca cmp %ecx,%edx 10d9e8: 72 ea jb 10d9d4 <_Thread_queue_Enqueue_priority+0xb0> 10d9ea: 89 fe mov %edi,%esi 10d9ec: 89 4d ec mov %ecx,-0x14(%ebp) 10d9ef: 8b 7d f0 mov -0x10(%ebp),%edi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10d9f2: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10d9f4: 8b 4d 08 mov 0x8(%ebp),%ecx 10d9f7: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10d9fb: 75 a9 jne 10d9a6 <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10d9fd: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10da04: 3b 55 ec cmp -0x14(%ebp),%edx 10da07: 74 56 je 10da5f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10da09: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10da0b: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10da0d: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10da10: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10da12: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10da15: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10da18: 56 push %esi 10da19: 9d popf 10da1a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10da1f: 83 c4 08 add $0x8,%esp 10da22: 5b pop %ebx 10da23: 5e pop %esi 10da24: 5f pop %edi 10da25: c9 leave 10da26: c3 ret 10da27: 90 nop <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10da28: 57 push %edi 10da29: 9d popf goto restart_reverse_search; 10da2a: eb 93 jmp 10d9bf <_Thread_queue_Enqueue_priority+0x9b> <== ALWAYS TAKEN if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10da2c: 56 push %esi <== NOT EXECUTED 10da2d: 9d popf <== NOT EXECUTED goto restart_forward_search; 10da2e: e9 34 ff ff ff jmp 10d967 <_Thread_queue_Enqueue_priority+0x43> <== NOT EXECUTED 10da33: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10da34: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10da3b: 3b 55 f0 cmp -0x10(%ebp),%edx 10da3e: 74 1f je 10da5f <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10da40: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10da43: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10da45: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10da48: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10da4a: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10da4d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10da50: 56 push %esi 10da51: 9d popf 10da52: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10da57: 83 c4 08 add $0x8,%esp 10da5a: 5b pop %ebx 10da5b: 5e pop %esi 10da5c: 5f pop %edi 10da5d: c9 leave 10da5e: c3 ret 10da5f: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10da62: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10da65: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10da67: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10da6a: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10da6c: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10da6f: 8b 45 08 mov 0x8(%ebp),%eax 10da72: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10da75: 53 push %ebx 10da76: 9d popf 10da77: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10da7c: e9 30 ff ff ff jmp 10d9b1 <_Thread_queue_Enqueue_priority+0x8d> <== ALWAYS TAKEN 10da81: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10da84: 89 f3 mov %esi,%ebx 10da86: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10da8d: e9 07 ff ff ff jmp 10d999 <_Thread_queue_Enqueue_priority+0x75> <== ALWAYS TAKEN 0010d88c <_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 ) { 10d88c: 55 push %ebp 10d88d: 89 e5 mov %esp,%ebp 10d88f: 57 push %edi 10d890: 56 push %esi 10d891: 53 push %ebx 10d892: 83 ec 24 sub $0x24,%esp 10d895: 8b 75 08 mov 0x8(%ebp),%esi 10d898: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10d89b: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10d8a1: ff 76 38 pushl 0x38(%esi) 10d8a4: 53 push %ebx 10d8a5: e8 96 03 00 00 call 10dc40 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10d8aa: 83 c4 10 add $0x10,%esp 10d8ad: 85 ff test %edi,%edi 10d8af: 75 33 jne 10d8e4 <_Thread_queue_Enqueue_with_handler+0x58> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10d8b1: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d8b5: 74 64 je 10d91b <_Thread_queue_Enqueue_with_handler+0x8f> 10d8b7: b8 64 06 11 00 mov $0x110664,%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 ); 10d8bc: 51 push %ecx 10d8bd: 8d 55 e4 lea -0x1c(%ebp),%edx 10d8c0: 52 push %edx 10d8c1: 53 push %ebx 10d8c2: 56 push %esi 10d8c3: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10d8c5: 83 c4 10 add $0x10,%esp 10d8c8: 83 f8 01 cmp $0x1,%eax 10d8cb: 74 0e je 10d8db <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10d8cd: 52 push %edx 10d8ce: ff 75 e4 pushl -0x1c(%ebp) 10d8d1: 53 push %ebx 10d8d2: 50 push %eax 10d8d3: e8 ac f5 ff ff call 10ce84 <_Thread_blocking_operation_Cancel> 10d8d8: 83 c4 10 add $0x10,%esp } 10d8db: 8d 65 f4 lea -0xc(%ebp),%esp 10d8de: 5b pop %ebx 10d8df: 5e pop %esi 10d8e0: 5f pop %edi 10d8e1: c9 leave 10d8e2: c3 ret 10d8e3: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10d8e4: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d8e7: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d8ee: 8b 55 10 mov 0x10(%ebp),%edx 10d8f1: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10d8f4: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10d8f7: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d8fe: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10d901: 83 ec 08 sub $0x8,%esp 10d904: 8d 43 48 lea 0x48(%ebx),%eax 10d907: 50 push %eax 10d908: 68 18 54 12 00 push $0x125418 10d90d: e8 7e 09 00 00 call 10e290 <_Watchdog_Insert> <== ALWAYS TAKEN 10d912: 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 ) 10d915: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d919: 75 9c jne 10d8b7 <_Thread_queue_Enqueue_with_handler+0x2b> 10d91b: b8 24 d9 10 00 mov $0x10d924,%eax 10d920: eb 9a jmp 10d8bc <_Thread_queue_Enqueue_with_handler+0x30> <== ALWAYS TAKEN 001106a8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 1106a8: 55 push %ebp 1106a9: 89 e5 mov %esp,%ebp 1106ab: 83 ec 08 sub $0x8,%esp 1106ae: 8b 45 08 mov 0x8(%ebp),%eax 1106b1: 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 ) 1106b4: 83 78 34 01 cmpl $0x1,0x34(%eax) 1106b8: 74 0e je 1106c8 <_Thread_queue_Extract+0x20> _Thread_queue_Extract_priority( the_thread_queue, the_thread ); else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 1106ba: 89 55 0c mov %edx,0xc(%ebp) 1106bd: 89 45 08 mov %eax,0x8(%ebp) } 1106c0: 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 ); 1106c1: e9 ba 17 00 00 jmp 111e80 <_Thread_queue_Extract_fifo> 1106c6: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Can not use indirect function pointer here since Extract priority * is a macro and the underlying methods do not have the same signature. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 1106c8: 51 push %ecx 1106c9: 6a 00 push $0x0 1106cb: 52 push %edx 1106cc: 50 push %eax 1106cd: e8 06 00 00 00 call 1106d8 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 1106d2: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 1106d5: c9 leave 1106d6: c3 ret 00111e80 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 111e80: 55 push %ebp 111e81: 89 e5 mov %esp,%ebp 111e83: 53 push %ebx 111e84: 83 ec 04 sub $0x4,%esp 111e87: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 111e8a: 9c pushf 111e8b: fa cli 111e8c: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 111e8d: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111e94: 74 2e je 111ec4 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111e96: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 111e98: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 111e9b: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 111e9e: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 111ea0: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111ea7: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111eab: 74 1f je 111ecc <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 111ead: 50 push %eax 111eae: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 111eaf: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111eb6: 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 } 111eb9: 8b 5d fc mov -0x4(%ebp),%ebx 111ebc: c9 leave 111ebd: e9 4e b1 ff ff jmp 10d010 <_Thread_Clear_state> 111ec2: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 111ec4: 50 push %eax 111ec5: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111ec6: 8b 5d fc mov -0x4(%ebp),%ebx 111ec9: c9 leave 111eca: c3 ret 111ecb: 90 nop <== NOT EXECUTED 111ecc: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 111ed3: 50 push %eax 111ed4: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111ed5: 83 ec 0c sub $0xc,%esp 111ed8: 8d 43 48 lea 0x48(%ebx),%eax 111edb: 50 push %eax 111edc: e8 e7 c4 ff ff call 10e3c8 <_Watchdog_Remove> 111ee1: 83 c4 10 add $0x10,%esp 111ee4: eb c9 jmp 111eaf <_Thread_queue_Extract_fifo+0x2f> <== ALWAYS TAKEN 001106d8 <_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 ) { 1106d8: 55 push %ebp 1106d9: 89 e5 mov %esp,%ebp 1106db: 57 push %edi 1106dc: 56 push %esi 1106dd: 53 push %ebx 1106de: 83 ec 1c sub $0x1c,%esp 1106e1: 8b 5d 0c mov 0xc(%ebp),%ebx 1106e4: 8a 45 10 mov 0x10(%ebp),%al 1106e7: 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 ); 1106ea: 9c pushf 1106eb: fa cli 1106ec: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 1106ef: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 1106f6: 74 6c je 110764 <_Thread_queue_Extract_priority_helper+0x8c> /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 1106f8: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 1106fa: 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)); 1106fd: 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; 110700: 8d 73 3c lea 0x3c(%ebx),%esi 110703: 39 f0 cmp %esi,%eax 110705: 74 69 je 110770 <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 110707: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 11070a: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 11070c: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 11070e: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 110711: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 110713: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 110716: 8b 53 38 mov 0x38(%ebx),%edx 110719: 3b 53 40 cmp 0x40(%ebx),%edx 11071c: 74 11 je 11072f <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 11071e: 8d 50 38 lea 0x38(%eax),%edx 110721: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 110724: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 110727: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 11072a: 83 c0 3c add $0x3c,%eax 11072d: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 11072f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 110733: 75 23 jne 110758 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 110735: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 110739: 74 3d je 110778 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11073b: ff 75 e4 pushl -0x1c(%ebp) 11073e: 9d popf 11073f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 110746: 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 } 110749: 8d 65 f4 lea -0xc(%ebp),%esp 11074c: 5b pop %ebx 11074d: 5e pop %esi 11074e: 5f pop %edi 11074f: c9 leave 110750: e9 bb c8 ff ff jmp 10d010 <_Thread_Clear_state> 110755: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 110758: ff 75 e4 pushl -0x1c(%ebp) 11075b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11075c: 8d 65 f4 lea -0xc(%ebp),%esp 11075f: 5b pop %ebx 110760: 5e pop %esi 110761: 5f pop %edi 110762: c9 leave 110763: c3 ret Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 110764: ff 75 e4 pushl -0x1c(%ebp) 110767: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 110768: 8d 65 f4 lea -0xc(%ebp),%esp 11076b: 5b pop %ebx 11076c: 5e pop %esi 11076d: 5f pop %edi 11076e: c9 leave 11076f: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 110770: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 110772: 89 4a 04 mov %ecx,0x4(%edx) 110775: eb b8 jmp 11072f <_Thread_queue_Extract_priority_helper+0x57> <== ALWAYS TAKEN 110777: 90 nop <== NOT EXECUTED 110778: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 11077f: ff 75 e4 pushl -0x1c(%ebp) 110782: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 110783: 83 ec 0c sub $0xc,%esp 110786: 8d 43 48 lea 0x48(%ebx),%eax 110789: 50 push %eax 11078a: e8 39 dc ff ff call 10e3c8 <_Watchdog_Remove> 11078f: 83 c4 10 add $0x10,%esp 110792: eb ab jmp 11073f <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN 0010da94 <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10da94: 55 push %ebp 10da95: 89 e5 mov %esp,%ebp 10da97: 83 ec 08 sub $0x8,%esp 10da9a: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10da9d: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10daa4: 75 06 jne 10daac <_Thread_queue_Extract_with_proxy+0x18> 10daa6: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10daa8: c9 leave 10daa9: c3 ret 10daaa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10daac: 83 ec 08 sub $0x8,%esp 10daaf: 50 push %eax 10dab0: ff 70 44 pushl 0x44(%eax) 10dab3: e8 f0 2b 00 00 call 1106a8 <_Thread_queue_Extract> 10dab8: b0 01 mov $0x1,%al return true; 10daba: 83 c4 10 add $0x10,%esp } return false; } 10dabd: c9 leave 10dabe: c3 ret 0011e7a0 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 11e7a0: 55 push %ebp 11e7a1: 89 e5 mov %esp,%ebp 11e7a3: 83 ec 08 sub $0x8,%esp 11e7a6: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11e7a9: 83 78 34 01 cmpl $0x1,0x34(%eax) 11e7ad: 74 0d je 11e7bc <_Thread_queue_First+0x1c> 11e7af: ba 1c fc 11 00 mov $0x11fc1c,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e7b4: 89 45 08 mov %eax,0x8(%ebp) } 11e7b7: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e7b8: ff e2 jmp *%edx 11e7ba: 66 90 xchg %ax,%ax <== NOT EXECUTED Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 11e7bc: ba c8 e7 11 00 mov $0x11e7c8,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e7c1: 89 45 08 mov %eax,0x8(%ebp) } 11e7c4: c9 leave if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11e7c5: ff e2 jmp *%edx 0011fc1c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 11fc1c: 55 push %ebp 11fc1d: 89 e5 mov %esp,%ebp 11fc1f: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11fc22: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11fc24: 83 c2 04 add $0x4,%edx 11fc27: 39 d0 cmp %edx,%eax 11fc29: 74 05 je 11fc30 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 11fc2b: c9 leave 11fc2c: c3 ret 11fc2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 11fc30: 31 c0 xor %eax,%eax 11fc32: c9 leave 11fc33: c3 ret 0010dac0 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dac0: 55 push %ebp 10dac1: 89 e5 mov %esp,%ebp 10dac3: 56 push %esi 10dac4: 53 push %ebx 10dac5: 8b 5d 08 mov 0x8(%ebp),%ebx 10dac8: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dacb: eb 06 jmp 10dad3 <_Thread_queue_Flush+0x13> <== ALWAYS TAKEN 10dacd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; 10dad0: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dad3: 83 ec 0c sub $0xc,%esp 10dad6: 53 push %ebx 10dad7: e8 94 fc ff ff call 10d770 <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10dadc: 83 c4 10 add $0x10,%esp 10dadf: 85 c0 test %eax,%eax 10dae1: 75 ed jne 10dad0 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dae3: 8d 65 f8 lea -0x8(%ebp),%esp 10dae6: 5b pop %ebx 10dae7: 5e pop %esi 10dae8: c9 leave 10dae9: c3 ret 0010daec <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10daec: 55 push %ebp 10daed: 89 e5 mov %esp,%ebp 10daef: 8b 45 08 mov 0x8(%ebp),%eax 10daf2: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10daf5: 8b 4d 10 mov 0x10(%ebp),%ecx 10daf8: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dafb: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dafe: 8b 4d 14 mov 0x14(%ebp),%ecx 10db01: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db04: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10db0b: 4a dec %edx 10db0c: 74 12 je 10db20 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10db0e: 8d 50 04 lea 0x4(%eax),%edx 10db11: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10db13: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10db1a: 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 ); } } 10db1d: c9 leave 10db1e: c3 ret 10db1f: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10db20: 8d 48 30 lea 0x30(%eax),%ecx */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10db23: 8d 50 04 lea 0x4(%eax),%edx 10db26: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10db28: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10db2f: 89 40 08 mov %eax,0x8(%eax) 10db32: 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 ; 10db35: 39 c8 cmp %ecx,%eax 10db37: 75 ea jne 10db23 <_Thread_queue_Initialize+0x37> _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 10db39: c9 leave 10db3a: c3 ret 00110794 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 110794: 55 push %ebp 110795: 89 e5 mov %esp,%ebp 110797: 83 ec 08 sub $0x8,%esp 11079a: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 11079d: 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 && 1107a0: 8b 4a 30 mov 0x30(%edx),%ecx 1107a3: 85 c9 test %ecx,%ecx 1107a5: 74 08 je 1107af <_Thread_queue_Process_timeout+0x1b> 1107a7: 3b 05 f8 53 12 00 cmp 0x1253f8,%eax 1107ad: 74 19 je 1107c8 <_Thread_queue_Process_timeout+0x34> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1107af: 8b 52 3c mov 0x3c(%edx),%edx 1107b2: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 1107b5: 83 ec 08 sub $0x8,%esp 1107b8: 50 push %eax 1107b9: ff 70 44 pushl 0x44(%eax) 1107bc: e8 e7 fe ff ff call 1106a8 <_Thread_queue_Extract> <== ALWAYS TAKEN 1107c1: 83 c4 10 add $0x10,%esp } } 1107c4: c9 leave 1107c5: c3 ret 1107c6: 66 90 xchg %ax,%ax <== NOT EXECUTED * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 1107c8: 83 f9 03 cmp $0x3,%ecx 1107cb: 74 f7 je 1107c4 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1107cd: 8b 4a 3c mov 0x3c(%edx),%ecx 1107d0: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 1107d3: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 1107da: c9 leave 1107db: c3 ret 0010db3c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10db3c: 55 push %ebp 10db3d: 89 e5 mov %esp,%ebp 10db3f: 57 push %edi 10db40: 56 push %esi 10db41: 53 push %ebx 10db42: 83 ec 1c sub $0x1c,%esp 10db45: 8b 75 08 mov 0x8(%ebp),%esi 10db48: 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 ) 10db4b: 85 f6 test %esi,%esi 10db4d: 74 06 je 10db55 <_Thread_queue_Requeue+0x19> <== 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 ) { 10db4f: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10db53: 74 0b je 10db60 <_Thread_queue_Requeue+0x24> <== NEVER TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 10db55: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10db58: 5b pop %ebx <== NOT EXECUTED 10db59: 5e pop %esi <== NOT EXECUTED 10db5a: 5f pop %edi <== NOT EXECUTED 10db5b: c9 leave <== NOT EXECUTED 10db5c: c3 ret <== NOT EXECUTED 10db5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10db60: 9c pushf 10db61: fa cli 10db62: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10db63: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10db6a: 75 0c jne 10db78 <_Thread_queue_Requeue+0x3c> <== NEVER TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 10db6c: 53 push %ebx 10db6d: 9d popf } } 10db6e: 8d 65 f4 lea -0xc(%ebp),%esp 10db71: 5b pop %ebx 10db72: 5e pop %esi 10db73: 5f pop %edi 10db74: c9 leave 10db75: c3 ret 10db76: 66 90 xchg %ax,%ax <== NOT EXECUTED 10db78: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10db7f: 50 push %eax 10db80: 6a 01 push $0x1 10db82: 57 push %edi 10db83: 56 push %esi 10db84: e8 4f 2b 00 00 call 1106d8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10db89: 83 c4 0c add $0xc,%esp 10db8c: 8d 45 e4 lea -0x1c(%ebp),%eax 10db8f: 50 push %eax 10db90: 57 push %edi 10db91: 56 push %esi 10db92: e8 8d fd ff ff call 10d924 <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10db97: 83 c4 10 add $0x10,%esp 10db9a: eb d0 jmp 10db6c <_Thread_queue_Requeue+0x30> <== ALWAYS TAKEN 0010db9c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10db9c: 55 push %ebp 10db9d: 89 e5 mov %esp,%ebp 10db9f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dba2: 8d 45 f4 lea -0xc(%ebp),%eax 10dba5: 50 push %eax 10dba6: ff 75 08 pushl 0x8(%ebp) 10dba9: e8 2e f8 ff ff call 10d3dc <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10dbae: 83 c4 10 add $0x10,%esp 10dbb1: 8b 55 f4 mov -0xc(%ebp),%edx 10dbb4: 85 d2 test %edx,%edx 10dbb6: 75 17 jne 10dbcf <_Thread_queue_Timeout+0x33> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10dbb8: 83 ec 0c sub $0xc,%esp 10dbbb: 50 push %eax 10dbbc: e8 d3 2b 00 00 call 110794 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10dbc1: a1 38 53 12 00 mov 0x125338,%eax 10dbc6: 48 dec %eax 10dbc7: a3 38 53 12 00 mov %eax,0x125338 10dbcc: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10dbcf: c9 leave 10dbd0: c3 ret 00118ac4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 118ac4: 55 push %ebp 118ac5: 89 e5 mov %esp,%ebp 118ac7: 57 push %edi 118ac8: 56 push %esi 118ac9: 53 push %ebx 118aca: 83 ec 4c sub $0x4c,%esp 118acd: 8b 5d 08 mov 0x8(%ebp),%ebx 118ad0: 8d 45 e0 lea -0x20(%ebp),%eax 118ad3: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118ad6: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 118ad9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 118ae0: 8d 4d dc lea -0x24(%ebp),%ecx 118ae3: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118ae6: 8d 7d d0 lea -0x30(%ebp),%edi 118ae9: 8d 45 d4 lea -0x2c(%ebp),%eax 118aec: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118aef: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 118af2: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 118af9: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118afc: 8d 73 30 lea 0x30(%ebx),%esi /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118aff: 8d 4b 68 lea 0x68(%ebx),%ecx 118b02: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118b05: 8d 43 08 lea 0x8(%ebx),%eax 118b08: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118b0b: 8d 53 40 lea 0x40(%ebx),%edx 118b0e: 89 55 c0 mov %edx,-0x40(%ebp) 118b11: 8d 76 00 lea 0x0(%esi),%esi { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 118b14: 8d 4d dc lea -0x24(%ebp),%ecx 118b17: 89 4b 78 mov %ecx,0x78(%ebx) 118b1a: 66 90 xchg %ax,%ax static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 118b1c: a1 c4 f8 13 00 mov 0x13f8c4,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 118b21: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 118b24: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118b27: 51 push %ecx 118b28: 57 push %edi 118b29: 29 d0 sub %edx,%eax 118b2b: 50 push %eax 118b2c: 56 push %esi 118b2d: e8 a2 3a 00 00 call 11c5d4 <_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(); 118b32: a1 ec f7 13 00 mov 0x13f7ec,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 118b37: 8b 53 74 mov 0x74(%ebx),%edx /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 118b3a: 83 c4 10 add $0x10,%esp 118b3d: 39 d0 cmp %edx,%eax 118b3f: 77 63 ja 118ba4 <_Timer_server_Body+0xe0> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 118b41: 72 7d jb 118bc0 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 118b43: 89 43 74 mov %eax,0x74(%ebx) 118b46: 66 90 xchg %ax,%ax } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 118b48: 8b 43 78 mov 0x78(%ebx),%eax 118b4b: 83 ec 0c sub $0xc,%esp 118b4e: 50 push %eax 118b4f: e8 38 08 00 00 call 11938c <_Chain_Get> <== ALWAYS TAKEN if ( timer == NULL ) { 118b54: 83 c4 10 add $0x10,%esp 118b57: 85 c0 test %eax,%eax 118b59: 74 35 je 118b90 <_Timer_server_Body+0xcc> <== NEVER TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118b5b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 118b5e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 118b61: 74 19 je 118b7c <_Timer_server_Body+0xb8> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118b63: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 118b66: 75 e0 jne 118b48 <_Timer_server_Body+0x84> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118b68: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118b6b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118b6e: 50 push %eax <== NOT EXECUTED 118b6f: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 118b72: e8 f5 3a 00 00 call 11c66c <_Watchdog_Insert> <== NOT EXECUTED 118b77: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118b7a: eb cc jmp 118b48 <_Timer_server_Body+0x84> <== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118b7c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 118b7f: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 118b82: 50 push %eax <== NOT EXECUTED 118b83: 56 push %esi <== NOT EXECUTED 118b84: e8 e3 3a 00 00 call 11c66c <_Watchdog_Insert> <== NOT EXECUTED 118b89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 118b8c: eb ba jmp 118b48 <_Timer_server_Body+0x84> <== NOT EXECUTED 118b8e: 66 90 xchg %ax,%ax <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 118b90: 9c pushf 118b91: fa cli 118b92: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 118b93: 8b 55 b4 mov -0x4c(%ebp),%edx 118b96: 3b 55 dc cmp -0x24(%ebp),%edx 118b99: 74 41 je 118bdc <_Timer_server_Body+0x118> <== NEVER TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118b9b: 50 push %eax <== NOT EXECUTED 118b9c: 9d popf <== NOT EXECUTED 118b9d: e9 7a ff ff ff jmp 118b1c <_Timer_server_Body+0x58> <== NOT EXECUTED 118ba2: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 118ba4: 51 push %ecx 118ba5: 57 push %edi 118ba6: 89 c1 mov %eax,%ecx 118ba8: 29 d1 sub %edx,%ecx 118baa: 51 push %ecx 118bab: ff 75 c4 pushl -0x3c(%ebp) 118bae: 89 45 b8 mov %eax,-0x48(%ebp) 118bb1: e8 1e 3a 00 00 call 11c5d4 <_Watchdog_Adjust_to_chain> 118bb6: 83 c4 10 add $0x10,%esp 118bb9: 8b 45 b8 mov -0x48(%ebp),%eax 118bbc: eb 85 jmp 118b43 <_Timer_server_Body+0x7f> <== ALWAYS TAKEN 118bbe: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 118bc0: 51 push %ecx 118bc1: 29 c2 sub %eax,%edx 118bc3: 52 push %edx 118bc4: 6a 01 push $0x1 118bc6: ff 75 c4 pushl -0x3c(%ebp) 118bc9: 89 45 b8 mov %eax,-0x48(%ebp) 118bcc: e8 8b 39 00 00 call 11c55c <_Watchdog_Adjust> 118bd1: 83 c4 10 add $0x10,%esp 118bd4: 8b 45 b8 mov -0x48(%ebp),%eax 118bd7: e9 67 ff ff ff jmp 118b43 <_Timer_server_Body+0x7f> <== ALWAYS TAKEN */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 118bdc: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 118be3: 50 push %eax 118be4: 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 ) ) { 118be5: 8b 4d b0 mov -0x50(%ebp),%ecx 118be8: 3b 4d d0 cmp -0x30(%ebp),%ecx 118beb: 75 23 jne 118c10 <_Timer_server_Body+0x14c> 118bed: eb 33 jmp 118c22 <_Timer_server_Body+0x15e> <== ALWAYS TAKEN 118bef: 90 nop <== NOT EXECUTED { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 118bf0: 8b 10 mov (%eax),%edx the_chain->first = new_first; 118bf2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 118bf5: 89 7a 04 mov %edi,0x4(%edx) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 118bf8: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 118bff: 51 push %ecx 118c00: 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 ); 118c01: 83 ec 08 sub $0x8,%esp 118c04: ff 70 24 pushl 0x24(%eax) 118c07: ff 70 20 pushl 0x20(%eax) 118c0a: ff 50 1c call *0x1c(%eax) } 118c0d: 83 c4 10 add $0x10,%esp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 118c10: 9c pushf 118c11: fa cli 118c12: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118c13: 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)) 118c16: 39 45 b0 cmp %eax,-0x50(%ebp) 118c19: 75 d5 jne 118bf0 <_Timer_server_Body+0x12c> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 118c1b: 51 push %ecx 118c1c: 9d popf 118c1d: e9 f2 fe ff ff jmp 118b14 <_Timer_server_Body+0x50> <== ALWAYS TAKEN * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 118c22: c6 43 7c 00 movb $0x0,0x7c(%ebx) 118c26: a1 58 f7 13 00 mov 0x13f758,%eax 118c2b: 40 inc %eax 118c2c: a3 58 f7 13 00 mov %eax,0x13f758 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 118c31: 83 ec 08 sub $0x8,%esp 118c34: 6a 08 push $0x8 118c36: ff 33 pushl (%ebx) 118c38: e8 67 31 00 00 call 11bda4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 118c3d: 89 d8 mov %ebx,%eax 118c3f: e8 e0 fd ff ff call 118a24 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 118c44: 89 d8 mov %ebx,%eax 118c46: e8 29 fe ff ff call 118a74 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 118c4b: e8 84 27 00 00 call 11b3d4 <_Thread_Enable_dispatch> ts->active = true; 118c50: 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 ); 118c54: 58 pop %eax 118c55: ff 75 bc pushl -0x44(%ebp) 118c58: e8 47 3b 00 00 call 11c7a4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118c5d: 59 pop %ecx 118c5e: ff 75 c0 pushl -0x40(%ebp) 118c61: e8 3e 3b 00 00 call 11c7a4 <_Watchdog_Remove> 118c66: 83 c4 10 add $0x10,%esp 118c69: e9 a6 fe ff ff jmp 118b14 <_Timer_server_Body+0x50> <== ALWAYS TAKEN 00118a24 <_Timer_server_Reset_interval_system_watchdog>: } static void _Timer_server_Reset_interval_system_watchdog( Timer_server_Control *ts ) { 118a24: 55 push %ebp 118a25: 89 e5 mov %esp,%ebp 118a27: 56 push %esi 118a28: 53 push %ebx 118a29: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 118a2b: 8d 70 08 lea 0x8(%eax),%esi 118a2e: 83 ec 0c sub $0xc,%esp 118a31: 56 push %esi 118a32: e8 6d 3d 00 00 call 11c7a4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_interval_system_watchdog( ts ); _ISR_Disable( level ); 118a37: 9c pushf 118a38: fa cli 118a39: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a3a: 8b 43 30 mov 0x30(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118a3d: 8d 53 34 lea 0x34(%ebx),%edx 118a40: 83 c4 10 add $0x10,%esp 118a43: 39 d0 cmp %edx,%eax 118a45: 74 21 je 118a68 <_Timer_server_Reset_interval_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->Interval_watchdogs.Chain )->delta_interval; 118a47: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a4a: 51 push %ecx 118a4b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a4c: 89 43 14 mov %eax,0x14(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118a4f: 83 ec 08 sub $0x8,%esp 118a52: 56 push %esi 118a53: 68 38 f8 13 00 push $0x13f838 118a58: e8 0f 3c 00 00 call 11c66c <_Watchdog_Insert> 118a5d: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118a60: 8d 65 f8 lea -0x8(%ebp),%esp 118a63: 5b pop %ebx 118a64: 5e pop %esi 118a65: c9 leave 118a66: c3 ret 118a67: 90 nop <== NOT EXECUTED _Watchdog_Insert_ticks( &ts->Interval_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118a68: 51 push %ecx 118a69: 9d popf } } 118a6a: 8d 65 f8 lea -0x8(%ebp),%esp 118a6d: 5b pop %ebx 118a6e: 5e pop %esi 118a6f: c9 leave 118a70: c3 ret 00118a74 <_Timer_server_Reset_tod_system_watchdog>: } static void _Timer_server_Reset_tod_system_watchdog( Timer_server_Control *ts ) { 118a74: 55 push %ebp 118a75: 89 e5 mov %esp,%ebp 118a77: 56 push %esi 118a78: 53 push %ebx 118a79: 89 c3 mov %eax,%ebx static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 118a7b: 8d 70 40 lea 0x40(%eax),%esi 118a7e: 83 ec 0c sub $0xc,%esp 118a81: 56 push %esi 118a82: e8 1d 3d 00 00 call 11c7a4 <_Watchdog_Remove> { ISR_Level level; _Timer_server_Stop_tod_system_watchdog( ts ); _ISR_Disable( level ); 118a87: 9c pushf 118a88: fa cli 118a89: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118a8a: 8b 43 68 mov 0x68(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 118a8d: 8d 53 6c lea 0x6c(%ebx),%edx 118a90: 83 c4 10 add $0x10,%esp 118a93: 39 d0 cmp %edx,%eax 118a95: 74 21 je 118ab8 <_Timer_server_Reset_tod_system_watchdog+0x44> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { Watchdog_Interval delta_interval = _Watchdog_First( &ts->TOD_watchdogs.Chain )->delta_interval; 118a97: 8b 40 10 mov 0x10(%eax),%eax _ISR_Enable( level ); 118a9a: 51 push %ecx 118a9b: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118a9c: 89 43 4c mov %eax,0x4c(%ebx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118a9f: 83 ec 08 sub $0x8,%esp 118aa2: 56 push %esi 118aa3: 68 2c f8 13 00 push $0x13f82c 118aa8: e8 bf 3b 00 00 call 11c66c <_Watchdog_Insert> 118aad: 83 c4 10 add $0x10,%esp delta_interval ); } else { _ISR_Enable( level ); } } 118ab0: 8d 65 f8 lea -0x8(%ebp),%esp 118ab3: 5b pop %ebx 118ab4: 5e pop %esi 118ab5: c9 leave 118ab6: c3 ret 118ab7: 90 nop <== NOT EXECUTED _Watchdog_Insert_seconds( &ts->TOD_watchdogs.System_watchdog, delta_interval ); } else { _ISR_Enable( level ); 118ab8: 51 push %ecx 118ab9: 9d popf } } 118aba: 8d 65 f8 lea -0x8(%ebp),%esp 118abd: 5b pop %ebx 118abe: 5e pop %esi 118abf: c9 leave 118ac0: c3 ret 00118c70 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 118c70: 55 push %ebp 118c71: 89 e5 mov %esp,%ebp 118c73: 57 push %edi 118c74: 56 push %esi 118c75: 53 push %ebx 118c76: 83 ec 2c sub $0x2c,%esp 118c79: 8b 5d 08 mov 0x8(%ebp),%ebx 118c7c: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 118c7f: 8b 53 78 mov 0x78(%ebx),%edx 118c82: 85 d2 test %edx,%edx 118c84: 74 16 je 118c9c <_Timer_server_Schedule_operation_method+0x2c> <== NEVER TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118c86: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 118c89: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 118c8c: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 118c8f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 118c92: 5b pop %ebx <== NOT EXECUTED 118c93: 5e pop %esi <== NOT EXECUTED 118c94: 5f pop %edi <== NOT EXECUTED 118c95: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118c96: e9 cd 06 00 00 jmp 119368 <_Chain_Append> <== NOT EXECUTED 118c9b: 90 nop <== NOT EXECUTED 118c9c: 8b 15 58 f7 13 00 mov 0x13f758,%edx 118ca2: 42 inc %edx 118ca3: 89 15 58 f7 13 00 mov %edx,0x13f758 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 118ca9: 8b 50 38 mov 0x38(%eax),%edx 118cac: 83 fa 01 cmp $0x1,%edx 118caf: 74 77 je 118d28 <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 118cb1: 83 fa 03 cmp $0x3,%edx 118cb4: 74 0e je 118cc4 <_Timer_server_Schedule_operation_method+0x54> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 118cb6: 8d 65 f4 lea -0xc(%ebp),%esp 118cb9: 5b pop %ebx 118cba: 5e pop %esi 118cbb: 5f pop %edi 118cbc: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 118cbd: e9 12 27 00 00 jmp 11b3d4 <_Thread_Enable_dispatch> 118cc2: 66 90 xchg %ax,%ax <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118cc4: 9c pushf 118cc5: fa cli 118cc6: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 118cc9: 8b 0d ec f7 13 00 mov 0x13f7ec,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 118ccf: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 118cd2: 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; 118cd5: 8d 7b 6c lea 0x6c(%ebx),%edi 118cd8: 39 fa cmp %edi,%edx 118cda: 74 22 je 118cfe <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 118cdc: 8b 7a 10 mov 0x10(%edx),%edi 118cdf: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 118ce2: 39 f1 cmp %esi,%ecx 118ce4: 0f 86 9e 00 00 00 jbe 118d88 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 118cea: 89 cf mov %ecx,%edi 118cec: 29 f7 sub %esi,%edi 118cee: 89 fe mov %edi,%esi if (delta_interval > delta) { 118cf0: 39 7d d4 cmp %edi,-0x2c(%ebp) 118cf3: 0f 87 9b 00 00 00 ja 118d94 <_Timer_server_Schedule_operation_method+0x124> <== NEVER TAKEN 118cf9: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 118cfb: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 118cfe: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 118d01: ff 75 e4 pushl -0x1c(%ebp) 118d04: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118d05: 83 ec 08 sub $0x8,%esp 118d08: 83 c0 10 add $0x10,%eax 118d0b: 50 push %eax 118d0c: 8d 43 68 lea 0x68(%ebx),%eax 118d0f: 50 push %eax 118d10: e8 57 39 00 00 call 11c66c <_Watchdog_Insert> if ( !ts->active ) { 118d15: 8a 43 7c mov 0x7c(%ebx),%al 118d18: 83 c4 10 add $0x10,%esp 118d1b: 84 c0 test %al,%al 118d1d: 75 97 jne 118cb6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 118d1f: 89 d8 mov %ebx,%eax 118d21: e8 4e fd ff ff call 118a74 <_Timer_server_Reset_tod_system_watchdog> <== ALWAYS TAKEN 118d26: eb 8e jmp 118cb6 <_Timer_server_Schedule_operation_method+0x46> <== ALWAYS TAKEN if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 118d28: 9c pushf 118d29: fa cli 118d2a: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 118d2d: 8b 0d c4 f8 13 00 mov 0x13f8c4,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 118d33: 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)); 118d36: 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; 118d39: 8d 7b 34 lea 0x34(%ebx),%edi 118d3c: 39 fa cmp %edi,%edx 118d3e: 74 12 je 118d52 <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 118d40: 89 cf mov %ecx,%edi 118d42: 29 f7 sub %esi,%edi 118d44: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 118d46: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 118d49: 39 fe cmp %edi,%esi 118d4b: 72 37 jb 118d84 <_Timer_server_Schedule_operation_method+0x114> 118d4d: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 118d4f: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 118d52: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 118d55: ff 75 e4 pushl -0x1c(%ebp) 118d58: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 118d59: 83 ec 08 sub $0x8,%esp 118d5c: 83 c0 10 add $0x10,%eax 118d5f: 50 push %eax 118d60: 8d 43 30 lea 0x30(%ebx),%eax 118d63: 50 push %eax 118d64: e8 03 39 00 00 call 11c66c <_Watchdog_Insert> if ( !ts->active ) { 118d69: 8a 43 7c mov 0x7c(%ebx),%al 118d6c: 83 c4 10 add $0x10,%esp 118d6f: 84 c0 test %al,%al 118d71: 0f 85 3f ff ff ff jne 118cb6 <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 118d77: 89 d8 mov %ebx,%eax 118d79: e8 a6 fc ff ff call 118a24 <_Timer_server_Reset_interval_system_watchdog> <== ALWAYS TAKEN 118d7e: e9 33 ff ff ff jmp 118cb6 <_Timer_server_Schedule_operation_method+0x46> <== ALWAYS TAKEN 118d83: 90 nop <== NOT EXECUTED */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 118d84: 29 f7 sub %esi,%edi 118d86: eb c7 jmp 118d4f <_Timer_server_Schedule_operation_method+0xdf> <== ALWAYS TAKEN } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 118d88: 8b 7d d4 mov -0x2c(%ebp),%edi 118d8b: 01 f7 add %esi,%edi delta_interval += delta; 118d8d: 29 cf sub %ecx,%edi 118d8f: e9 67 ff ff ff jmp 118cfb <_Timer_server_Schedule_operation_method+0x8b> <== ALWAYS TAKEN /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 118d94: 8b 7d d4 mov -0x2c(%ebp),%edi 118d97: 29 f7 sub %esi,%edi 118d99: e9 5d ff ff ff jmp 118cfb <_Timer_server_Schedule_operation_method+0x8b> <== ALWAYS TAKEN 0010df84 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 10df84: 55 push %ebp 10df85: 89 e5 mov %esp,%ebp 10df87: 53 push %ebx 10df88: 8b 5d 08 mov 0x8(%ebp),%ebx 10df8b: 8b 55 0c mov 0xc(%ebp),%edx uint32_t seconds = add->tv_sec; 10df8e: 8b 02 mov (%edx),%eax /* Add the basics */ time->tv_sec += add->tv_sec; 10df90: 01 03 add %eax,(%ebx) time->tv_nsec += add->tv_nsec; 10df92: 8b 52 04 mov 0x4(%edx),%edx 10df95: 03 53 04 add 0x4(%ebx),%edx 10df98: 89 53 04 mov %edx,0x4(%ebx) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10df9b: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10dfa1: 76 1a jbe 10dfbd <_Timespec_Add_to+0x39> 10dfa3: 8b 0b mov (%ebx),%ecx 10dfa5: 8d 76 00 lea 0x0(%esi),%esi time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10dfa8: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx * * This routines adds two timespecs. The second argument is added * to the first. */ uint32_t _Timespec_Add_to( 10dfae: 41 inc %ecx /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; seconds++; 10dfaf: 40 inc %eax /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10dfb0: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx 10dfb6: 77 f0 ja 10dfa8 <_Timespec_Add_to+0x24> <== ALWAYS TAKEN 10dfb8: 89 53 04 mov %edx,0x4(%ebx) 10dfbb: 89 0b mov %ecx,(%ebx) time->tv_sec++; seconds++; } return seconds; } 10dfbd: 5b pop %ebx 10dfbe: c9 leave 10dfbf: c3 ret 0010f868 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10f868: 55 push %ebp 10f869: 89 e5 mov %esp,%ebp 10f86b: 57 push %edi 10f86c: 56 push %esi 10f86d: 53 push %ebx 10f86e: 83 ec 2c sub $0x2c,%esp 10f871: 8b 45 08 mov 0x8(%ebp),%eax 10f874: 8b 5d 0c mov 0xc(%ebp),%ebx /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10f877: 8b 10 mov (%eax),%edx 10f879: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10f87c: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10f87f: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10f884: 8b 03 mov (%ebx),%eax 10f886: f7 e9 imul %ecx 10f888: 89 45 d0 mov %eax,-0x30(%ebp) 10f88b: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10f88e: 8b 5b 04 mov 0x4(%ebx),%ebx 10f891: 89 de mov %ebx,%esi 10f893: c1 fe 1f sar $0x1f,%esi 10f896: 01 5d d0 add %ebx,-0x30(%ebp) 10f899: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10f89c: 8b 55 d4 mov -0x2c(%ebp),%edx 10f89f: 0b 55 d0 or -0x30(%ebp),%edx 10f8a2: 74 7c je 10f920 <_Timespec_Divide+0xb8> <== 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; 10f8a4: 8b 45 e0 mov -0x20(%ebp),%eax 10f8a7: f7 e9 imul %ecx 10f8a9: 89 45 e0 mov %eax,-0x20(%ebp) 10f8ac: 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; 10f8af: 89 fb mov %edi,%ebx 10f8b1: c1 fb 1f sar $0x1f,%ebx 10f8b4: 01 7d e0 add %edi,-0x20(%ebp) 10f8b7: 11 5d e4 adc %ebx,-0x1c(%ebp) 10f8ba: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10f8c1: b9 a0 86 01 00 mov $0x186a0,%ecx 10f8c6: 8b 45 e0 mov -0x20(%ebp),%eax 10f8c9: f7 e1 mul %ecx 10f8cb: 89 45 e0 mov %eax,-0x20(%ebp) 10f8ce: 01 da add %ebx,%edx 10f8d0: 89 55 e4 mov %edx,-0x1c(%ebp) 10f8d3: ff 75 d4 pushl -0x2c(%ebp) 10f8d6: ff 75 d0 pushl -0x30(%ebp) 10f8d9: ff 75 e4 pushl -0x1c(%ebp) 10f8dc: ff 75 e0 pushl -0x20(%ebp) 10f8df: e8 b8 fb 00 00 call 11f49c <__udivdi3> 10f8e4: 83 c4 10 add $0x10,%esp 10f8e7: 89 c3 mov %eax,%ebx 10f8e9: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10f8eb: 6a 00 push $0x0 10f8ed: 68 e8 03 00 00 push $0x3e8 10f8f2: 52 push %edx 10f8f3: 50 push %eax 10f8f4: e8 a3 fb 00 00 call 11f49c <__udivdi3> 10f8f9: 83 c4 10 add $0x10,%esp 10f8fc: 8b 55 10 mov 0x10(%ebp),%edx 10f8ff: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10f901: 6a 00 push $0x0 10f903: 68 e8 03 00 00 push $0x3e8 10f908: 56 push %esi 10f909: 53 push %ebx 10f90a: e8 9d fc 00 00 call 11f5ac <__umoddi3> 10f90f: 83 c4 10 add $0x10,%esp 10f912: 8b 55 14 mov 0x14(%ebp),%edx 10f915: 89 02 mov %eax,(%edx) } 10f917: 8d 65 f4 lea -0xc(%ebp),%esp 10f91a: 5b pop %ebx 10f91b: 5e pop %esi 10f91c: 5f pop %edi 10f91d: c9 leave 10f91e: c3 ret 10f91f: 90 nop <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 10f920: 8b 45 10 mov 0x10(%ebp),%eax 10f923: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10f929: 8b 55 14 mov 0x14(%ebp),%edx 10f92c: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10f932: 8d 65 f4 lea -0xc(%ebp),%esp 10f935: 5b pop %ebx 10f936: 5e pop %esi 10f937: 5f pop %edi 10f938: c9 leave 10f939: c3 ret 0013c90c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 13c90c: 55 push %ebp 13c90d: 89 e5 mov %esp,%ebp 13c90f: 8b 55 08 mov 0x8(%ebp),%edx 13c912: 8b 45 0c mov 0xc(%ebp),%eax if ( lhs->tv_sec > rhs->tv_sec ) 13c915: 8b 08 mov (%eax),%ecx 13c917: 39 0a cmp %ecx,(%edx) 13c919: 7f 11 jg 13c92c <_Timespec_Greater_than+0x20> return true; if ( lhs->tv_sec < rhs->tv_sec ) 13c91b: 7c 0b jl 13c928 <_Timespec_Greater_than+0x1c> <== ALWAYS TAKEN #include #include #include bool _Timespec_Greater_than( 13c91d: 8b 52 04 mov 0x4(%edx),%edx 13c920: 3b 50 04 cmp 0x4(%eax),%edx 13c923: 0f 9f c0 setg %al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 13c926: c9 leave 13c927: c3 ret ) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) 13c928: 31 c0 xor %eax,%eax <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 13c92a: c9 leave <== NOT EXECUTED 13c92b: c3 ret <== NOT EXECUTED bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 13c92c: b0 01 mov $0x1,%al /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 13c92e: c9 leave 13c92f: c3 ret 00127c84 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 127c84: 55 push %ebp 127c85: 89 e5 mov %esp,%ebp 127c87: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 127c8a: 85 c0 test %eax,%eax 127c8c: 74 1a je 127ca8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 127c8e: 8b 10 mov (%eax),%edx 127c90: 85 d2 test %edx,%edx 127c92: 78 14 js 127ca8 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 127c94: 8b 40 04 mov 0x4(%eax),%eax 127c97: 85 c0 test %eax,%eax 127c99: 78 0d js 127ca8 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 127c9b: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 127ca0: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 127ca3: c9 leave 127ca4: c3 ret 127ca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 127ca8: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 127caa: c9 leave 127cab: c3 ret 00127cac <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 127cac: 55 push %ebp 127cad: 89 e5 mov %esp,%ebp 127caf: 56 push %esi 127cb0: 53 push %ebx 127cb1: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 127cb4: 8b 33 mov (%ebx),%esi 127cb6: 85 f6 test %esi,%esi 127cb8: 75 07 jne 127cc1 <_Timespec_To_ticks+0x15> 127cba: 8b 43 04 mov 0x4(%ebx),%eax 127cbd: 85 c0 test %eax,%eax 127cbf: 74 37 je 127cf8 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 127cc1: e8 da 00 00 00 call 127da0 127cc6: 89 c1 mov %eax,%ecx 127cc8: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 127ccb: a1 4c ee 12 00 mov 0x12ee4c,%eax 127cd0: 8d 04 80 lea (%eax,%eax,4),%eax 127cd3: 8d 04 80 lea (%eax,%eax,4),%eax 127cd6: 8d 34 80 lea (%eax,%eax,4),%esi 127cd9: c1 e6 03 shl $0x3,%esi 127cdc: 8b 43 04 mov 0x4(%ebx),%eax 127cdf: 31 d2 xor %edx,%edx 127ce1: f7 f6 div %esi if (ticks) 127ce3: 01 c8 add %ecx,%eax 127ce5: 74 05 je 127cec <_Timespec_To_ticks+0x40> return ticks; return 1; } 127ce7: 5b pop %ebx 127ce8: 5e pop %esi 127ce9: c9 leave 127cea: c3 ret 127ceb: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 127cec: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 127cf1: 5b pop %ebx 127cf2: 5e pop %esi 127cf3: c9 leave 127cf4: c3 ret 127cf5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 127cf8: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 127cfa: 5b pop %ebx 127cfb: 5e pop %esi 127cfc: c9 leave 127cfd: c3 ret 0010e138 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e138: 55 push %ebp 10e139: 89 e5 mov %esp,%ebp 10e13b: 57 push %edi 10e13c: 56 push %esi 10e13d: 53 push %ebx 10e13e: 83 ec 1c sub $0x1c,%esp 10e141: 8b 75 08 mov 0x8(%ebp),%esi 10e144: 8b 7d 10 mov 0x10(%ebp),%edi 10e147: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e14a: 8b 1d 94 55 12 00 mov 0x125594,%ebx 10e150: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e156: 74 25 je 10e17d <_User_extensions_Fatal+0x45> <== ALWAYS TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e158: 0f b6 c0 movzbl %al,%eax 10e15b: 89 45 e4 mov %eax,-0x1c(%ebp) 10e15e: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 10e160: 8b 43 30 mov 0x30(%ebx),%eax 10e163: 85 c0 test %eax,%eax 10e165: 74 0b je 10e172 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e167: 52 push %edx 10e168: 57 push %edi 10e169: ff 75 e4 pushl -0x1c(%ebp) 10e16c: 56 push %esi 10e16d: ff d0 call *%eax 10e16f: 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 ) { 10e172: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e175: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e17b: 75 e3 jne 10e160 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10e17d: 8d 65 f4 lea -0xc(%ebp),%esp 10e180: 5b pop %ebx 10e181: 5e pop %esi 10e182: 5f pop %edi 10e183: c9 leave 10e184: c3 ret 0010dffc <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10dffc: 55 push %ebp 10dffd: 89 e5 mov %esp,%ebp 10dfff: 57 push %edi 10e000: 56 push %esi 10e001: 53 push %ebx 10e002: 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; 10e005: a1 58 12 12 00 mov 0x121258,%eax 10e00a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e00d: 8b 35 5c 12 12 00 mov 0x12125c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e013: c7 05 8c 55 12 00 90 movl $0x125590,0x12558c 10e01a: 55 12 00 the_chain->permanent_null = NULL; 10e01d: c7 05 90 55 12 00 00 movl $0x0,0x125590 10e024: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e027: c7 05 94 55 12 00 8c movl $0x12558c,0x125594 10e02e: 55 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e031: c7 05 3c 53 12 00 40 movl $0x125340,0x12533c 10e038: 53 12 00 the_chain->permanent_null = NULL; 10e03b: c7 05 40 53 12 00 00 movl $0x0,0x125340 10e042: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e045: c7 05 44 53 12 00 3c movl $0x12533c,0x125344 10e04c: 53 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e04f: 85 f6 test %esi,%esi 10e051: 74 64 je 10e0b7 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e053: 89 c2 mov %eax,%edx 10e055: 8d 04 40 lea (%eax,%eax,2),%eax 10e058: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e05b: c1 e1 02 shl $0x2,%ecx 10e05e: 83 ec 0c sub $0xc,%esp 10e061: 51 push %ecx 10e062: 89 4d d8 mov %ecx,-0x28(%ebp) 10e065: e8 36 04 00 00 call 10e4a0 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10e06a: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e06c: 31 c0 xor %eax,%eax 10e06e: 8b 4d d8 mov -0x28(%ebp),%ecx 10e071: 89 df mov %ebx,%edi 10e073: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e075: 83 c4 10 add $0x10,%esp 10e078: 8b 45 dc mov -0x24(%ebp),%eax 10e07b: 85 c0 test %eax,%eax 10e07d: 74 38 je 10e0b7 <_User_extensions_Handler_initialization+0xbb> <== ALWAYS TAKEN 10e07f: 89 75 e4 mov %esi,-0x1c(%ebp) 10e082: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e089: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10e08c: 8d 7b 14 lea 0x14(%ebx),%edi 10e08f: 8b 75 e4 mov -0x1c(%ebp),%esi 10e092: b9 08 00 00 00 mov $0x8,%ecx 10e097: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e099: 83 ec 0c sub $0xc,%esp 10e09c: 53 push %ebx 10e09d: e8 1e 29 00 00 call 1109c0 <_User_extensions_Add_set> <== ALWAYS TAKEN _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e0a2: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e0a5: ff 45 e0 incl -0x20(%ebp) 10e0a8: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e0ac: 83 c4 10 add $0x10,%esp 10e0af: 8b 45 e0 mov -0x20(%ebp),%eax 10e0b2: 39 45 dc cmp %eax,-0x24(%ebp) 10e0b5: 77 d5 ja 10e08c <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e0b7: 8d 65 f4 lea -0xc(%ebp),%esp 10e0ba: 5b pop %ebx 10e0bb: 5e pop %esi 10e0bc: 5f pop %edi 10e0bd: c9 leave 10e0be: c3 ret 00112e90 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 112e90: 55 push %ebp 112e91: 89 e5 mov %esp,%ebp 112e93: 53 push %ebx 112e94: 83 ec 10 sub $0x10,%esp 112e97: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 112e9a: 53 push %ebx 112e9b: e8 74 47 00 00 call 117614 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 112ea0: 83 c4 10 add $0x10,%esp 112ea3: 8b 43 24 mov 0x24(%ebx),%eax 112ea6: 85 c0 test %eax,%eax 112ea8: 74 12 je 112ebc <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 112eaa: 83 c3 08 add $0x8,%ebx 112ead: 89 5d 08 mov %ebx,0x8(%ebp) } 112eb0: 8b 5d fc mov -0x4(%ebp),%ebx 112eb3: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 112eb4: e9 5b 47 00 00 jmp 117614 <_Chain_Extract> 112eb9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 112ebc: 8b 5d fc mov -0x4(%ebp),%ebx 112ebf: c9 leave 112ec0: c3 ret 0010e0c0 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e0c0: 55 push %ebp 10e0c1: 89 e5 mov %esp,%ebp 10e0c3: 56 push %esi 10e0c4: 53 push %ebx 10e0c5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e0c8: 8b 1d 8c 55 12 00 mov 0x12558c,%ebx 10e0ce: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e0d4: 74 1c je 10e0f2 <_User_extensions_Thread_begin+0x32> <== ALWAYS TAKEN 10e0d6: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 10e0d8: 8b 43 28 mov 0x28(%ebx),%eax 10e0db: 85 c0 test %eax,%eax 10e0dd: 74 09 je 10e0e8 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e0df: 83 ec 0c sub $0xc,%esp 10e0e2: 56 push %esi 10e0e3: ff d0 call *%eax 10e0e5: 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 ) { 10e0e8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e0ea: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e0f0: 75 e6 jne 10e0d8 <_User_extensions_Thread_begin+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 10e0f2: 8d 65 f8 lea -0x8(%ebp),%esp 10e0f5: 5b pop %ebx 10e0f6: 5e pop %esi 10e0f7: c9 leave 10e0f8: c3 ret 0010e188 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e188: 55 push %ebp 10e189: 89 e5 mov %esp,%ebp 10e18b: 56 push %esi 10e18c: 53 push %ebx 10e18d: 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 ; 10e190: 8b 1d 8c 55 12 00 mov 0x12558c,%ebx 10e196: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e19c: 74 26 je 10e1c4 <_User_extensions_Thread_create+0x3c> <== ALWAYS TAKEN 10e19e: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 10e1a0: 8b 43 14 mov 0x14(%ebx),%eax 10e1a3: 85 c0 test %eax,%eax 10e1a5: 74 13 je 10e1ba <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e1a7: 83 ec 08 sub $0x8,%esp 10e1aa: 56 push %esi 10e1ab: ff 35 f8 53 12 00 pushl 0x1253f8 10e1b1: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e1b3: 83 c4 10 add $0x10,%esp 10e1b6: 84 c0 test %al,%al 10e1b8: 74 0c je 10e1c6 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10e1ba: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e1bc: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e1c2: 75 dc jne 10e1a0 <_User_extensions_Thread_create+0x18> 10e1c4: b0 01 mov $0x1,%al return false; } } return true; } 10e1c6: 8d 65 f8 lea -0x8(%ebp),%esp 10e1c9: 5b pop %ebx 10e1ca: 5e pop %esi 10e1cb: c9 leave 10e1cc: c3 ret 0010e1d0 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e1d0: 55 push %ebp 10e1d1: 89 e5 mov %esp,%ebp 10e1d3: 56 push %esi 10e1d4: 53 push %ebx 10e1d5: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e1d8: 8b 1d 94 55 12 00 mov 0x125594,%ebx 10e1de: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e1e4: 74 23 je 10e209 <_User_extensions_Thread_delete+0x39> <== ALWAYS TAKEN 10e1e6: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 10e1e8: 8b 43 20 mov 0x20(%ebx),%eax 10e1eb: 85 c0 test %eax,%eax 10e1ed: 74 0f je 10e1fe <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e1ef: 83 ec 08 sub $0x8,%esp 10e1f2: 56 push %esi 10e1f3: ff 35 f8 53 12 00 pushl 0x1253f8 10e1f9: ff d0 call *%eax 10e1fb: 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 ) { 10e1fe: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e201: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e207: 75 df jne 10e1e8 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e209: 8d 65 f8 lea -0x8(%ebp),%esp 10e20c: 5b pop %ebx 10e20d: 5e pop %esi 10e20e: c9 leave 10e20f: c3 ret 0010e0fc <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e0fc: 55 push %ebp 10e0fd: 89 e5 mov %esp,%ebp 10e0ff: 56 push %esi 10e100: 53 push %ebx 10e101: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e104: 8b 1d 94 55 12 00 mov 0x125594,%ebx 10e10a: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e110: 74 1d je 10e12f <_User_extensions_Thread_exitted+0x33> <== ALWAYS TAKEN 10e112: 66 90 xchg %ax,%ax !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 10e114: 8b 43 2c mov 0x2c(%ebx),%eax 10e117: 85 c0 test %eax,%eax 10e119: 74 09 je 10e124 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e11b: 83 ec 0c sub $0xc,%esp 10e11e: 56 push %esi 10e11f: ff d0 call *%eax 10e121: 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 ) { 10e124: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e127: 81 fb 8c 55 12 00 cmp $0x12558c,%ebx 10e12d: 75 e5 jne 10e114 <_User_extensions_Thread_exitted+0x18> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10e12f: 8d 65 f8 lea -0x8(%ebp),%esp 10e132: 5b pop %ebx 10e133: 5e pop %esi 10e134: c9 leave 10e135: c3 ret 0010ed74 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10ed74: 55 push %ebp 10ed75: 89 e5 mov %esp,%ebp 10ed77: 56 push %esi 10ed78: 53 push %ebx 10ed79: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ed7c: 8b 1d ec 75 12 00 mov 0x1275ec,%ebx 10ed82: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10ed88: 74 22 je 10edac <_User_extensions_Thread_restart+0x38> <== ALWAYS TAKEN 10ed8a: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 10ed8c: 8b 43 1c mov 0x1c(%ebx),%eax 10ed8f: 85 c0 test %eax,%eax 10ed91: 74 0f je 10eda2 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10ed93: 83 ec 08 sub $0x8,%esp 10ed96: 56 push %esi 10ed97: ff 35 58 74 12 00 pushl 0x127458 10ed9d: ff d0 call *%eax 10ed9f: 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 ) { 10eda2: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eda4: 81 fb f0 75 12 00 cmp $0x1275f0,%ebx 10edaa: 75 e0 jne 10ed8c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10edac: 8d 65 f8 lea -0x8(%ebp),%esp 10edaf: 5b pop %ebx 10edb0: 5e pop %esi 10edb1: c9 leave 10edb2: c3 ret 0010e210 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e210: 55 push %ebp 10e211: 89 e5 mov %esp,%ebp 10e213: 56 push %esi 10e214: 53 push %ebx 10e215: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e218: 8b 1d 8c 55 12 00 mov 0x12558c,%ebx 10e21e: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e224: 74 22 je 10e248 <_User_extensions_Thread_start+0x38> <== ALWAYS TAKEN 10e226: 66 90 xchg %ax,%ax !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 10e228: 8b 43 18 mov 0x18(%ebx),%eax 10e22b: 85 c0 test %eax,%eax 10e22d: 74 0f je 10e23e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e22f: 83 ec 08 sub $0x8,%esp 10e232: 56 push %esi 10e233: ff 35 f8 53 12 00 pushl 0x1253f8 10e239: ff d0 call *%eax 10e23b: 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 ) { 10e23e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e240: 81 fb 90 55 12 00 cmp $0x125590,%ebx 10e246: 75 e0 jne 10e228 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e248: 8d 65 f8 lea -0x8(%ebp),%esp 10e24b: 5b pop %ebx 10e24c: 5e pop %esi 10e24d: c9 leave 10e24e: c3 ret 0010e250 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e250: 55 push %ebp 10e251: 89 e5 mov %esp,%ebp 10e253: 57 push %edi 10e254: 56 push %esi 10e255: 53 push %ebx 10e256: 83 ec 0c sub $0xc,%esp 10e259: 8b 7d 08 mov 0x8(%ebp),%edi 10e25c: 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 ; 10e25f: 8b 1d 3c 53 12 00 mov 0x12533c,%ebx 10e265: 81 fb 40 53 12 00 cmp $0x125340,%ebx 10e26b: 74 18 je 10e285 <_User_extensions_Thread_switch+0x35> <== ALWAYS TAKEN 10e26d: 8d 76 00 lea 0x0(%esi),%esi !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 10e270: 83 ec 08 sub $0x8,%esp 10e273: 56 push %esi 10e274: 57 push %edi 10e275: 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 ) { 10e278: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e27a: 83 c4 10 add $0x10,%esp 10e27d: 81 fb 40 53 12 00 cmp $0x125340,%ebx 10e283: 75 eb jne 10e270 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e285: 8d 65 f4 lea -0xc(%ebp),%esp 10e288: 5b pop %ebx 10e289: 5e pop %esi 10e28a: 5f pop %edi 10e28b: c9 leave 10e28c: c3 ret 0010fc48 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fc48: 55 push %ebp 10fc49: 89 e5 mov %esp,%ebp 10fc4b: 57 push %edi 10fc4c: 56 push %esi 10fc4d: 53 push %ebx 10fc4e: 83 ec 1c sub $0x1c,%esp 10fc51: 8b 75 08 mov 0x8(%ebp),%esi 10fc54: 8b 4d 0c mov 0xc(%ebp),%ecx 10fc57: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fc5a: 9c pushf 10fc5b: fa cli 10fc5c: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fc5d: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fc5f: 8d 7e 04 lea 0x4(%esi),%edi 10fc62: 89 7d e4 mov %edi,-0x1c(%ebp) * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10fc65: 39 fa cmp %edi,%edx 10fc67: 74 3d je 10fca6 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fc69: 85 c9 test %ecx,%ecx 10fc6b: 75 43 jne 10fcb0 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fc6d: 85 db test %ebx,%ebx 10fc6f: 74 35 je 10fca6 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fc71: 8b 7a 10 mov 0x10(%edx),%edi 10fc74: 39 fb cmp %edi,%ebx 10fc76: 73 0f jae 10fc87 <_Watchdog_Adjust+0x3f> <== NEVER TAKEN 10fc78: eb 3e jmp 10fcb8 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fc7a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fc7c: 29 fb sub %edi,%ebx 10fc7e: 74 26 je 10fca6 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fc80: 8b 7a 10 mov 0x10(%edx),%edi 10fc83: 39 df cmp %ebx,%edi 10fc85: 77 31 ja 10fcb8 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fc87: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fc8e: 50 push %eax 10fc8f: 9d popf _Watchdog_Tickle( header ); 10fc90: 83 ec 0c sub $0xc,%esp 10fc93: 56 push %esi 10fc94: e8 cb 01 00 00 call 10fe64 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10fc99: 9c pushf 10fc9a: fa cli 10fc9b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fc9c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fc9e: 83 c4 10 add $0x10,%esp 10fca1: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fca4: 75 d6 jne 10fc7c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fca6: 50 push %eax 10fca7: 9d popf } 10fca8: 8d 65 f4 lea -0xc(%ebp),%esp 10fcab: 5b pop %ebx 10fcac: 5e pop %esi 10fcad: 5f pop %edi 10fcae: c9 leave 10fcaf: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fcb0: 49 dec %ecx 10fcb1: 75 f3 jne 10fca6 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fcb3: 01 5a 10 add %ebx,0x10(%edx) break; 10fcb6: eb ee jmp 10fca6 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fcb8: 29 df sub %ebx,%edi 10fcba: 89 7a 10 mov %edi,0x10(%edx) break; 10fcbd: eb e7 jmp 10fca6 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN 0011c5d4 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11c5d4: 55 push %ebp 11c5d5: 89 e5 mov %esp,%ebp 11c5d7: 57 push %edi 11c5d8: 56 push %esi 11c5d9: 53 push %ebx 11c5da: 83 ec 0c sub $0xc,%esp 11c5dd: 8b 75 08 mov 0x8(%ebp),%esi 11c5e0: 8b 55 0c mov 0xc(%ebp),%edx 11c5e3: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11c5e6: 85 d2 test %edx,%edx 11c5e8: 74 63 je 11c64d <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11c5ea: 9c pushf 11c5eb: fa cli 11c5ec: 8f 45 ec popl -0x14(%ebp) 11c5ef: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c5f1: 8d 4e 04 lea 0x4(%esi),%ecx 11c5f4: 89 4d f0 mov %ecx,-0x10(%ebp) 11c5f7: 8d 7b 04 lea 0x4(%ebx),%edi 11c5fa: 89 55 e8 mov %edx,-0x18(%ebp) 11c5fd: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11c600: 39 45 f0 cmp %eax,-0x10(%ebp) 11c603: 74 44 je 11c649 <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11c605: 8b 50 10 mov 0x10(%eax),%edx 11c608: 3b 55 e8 cmp -0x18(%ebp),%edx 11c60b: 77 57 ja 11c664 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11c60d: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11c610: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11c617: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11c618: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11c61a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11c61d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11c620: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11c622: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11c624: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11c627: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11c62a: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11c62c: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11c62f: ff 75 ec pushl -0x14(%ebp) 11c632: 9d popf 11c633: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11c634: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11c636: 39 45 f0 cmp %eax,-0x10(%ebp) 11c639: 74 1d je 11c658 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11c63b: 8b 50 10 mov 0x10(%eax),%edx 11c63e: 85 d2 test %edx,%edx 11c640: 74 d6 je 11c618 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c642: 8b 4d e8 mov -0x18(%ebp),%ecx 11c645: 85 c9 test %ecx,%ecx 11c647: 75 b7 jne 11c600 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11c649: ff 75 ec pushl -0x14(%ebp) 11c64c: 9d popf } 11c64d: 83 c4 0c add $0xc,%esp 11c650: 5b pop %ebx 11c651: 5e pop %esi 11c652: 5f pop %edi 11c653: c9 leave 11c654: c3 ret 11c655: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c658: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c65b: 8b 4d e8 mov -0x18(%ebp),%ecx 11c65e: 85 c9 test %ecx,%ecx 11c660: 75 9e jne 11c600 <_Watchdog_Adjust_to_chain+0x2c> 11c662: eb e5 jmp 11c649 <_Watchdog_Adjust_to_chain+0x75> <== ALWAYS TAKEN /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11c664: 2b 55 e8 sub -0x18(%ebp),%edx 11c667: 89 50 10 mov %edx,0x10(%eax) break; 11c66a: eb dd jmp 11c649 <_Watchdog_Adjust_to_chain+0x75> <== ALWAYS TAKEN 0010e290 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e290: 55 push %ebp 10e291: 89 e5 mov %esp,%ebp 10e293: 57 push %edi 10e294: 56 push %esi 10e295: 53 push %ebx 10e296: 83 ec 04 sub $0x4,%esp 10e299: 8b 5d 0c mov 0xc(%ebp),%ebx Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 10e29c: 8b 3d d4 53 12 00 mov 0x1253d4,%edi _ISR_Disable( level ); 10e2a2: 9c pushf 10e2a3: fa cli 10e2a4: 8f 45 f0 popl -0x10(%ebp) /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 10e2a7: 8b 43 08 mov 0x8(%ebx),%eax 10e2aa: 85 c0 test %eax,%eax 10e2ac: 0f 85 9e 00 00 00 jne 10e350 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e2b2: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e2b9: a1 a0 54 12 00 mov 0x1254a0,%eax 10e2be: 40 inc %eax 10e2bf: a3 a0 54 12 00 mov %eax,0x1254a0 restart: delta_interval = the_watchdog->initial; 10e2c4: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10e2c7: 8b 4d 08 mov 0x8(%ebp),%ecx 10e2ca: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e2cc: 85 c0 test %eax,%eax 10e2ce: 74 5d je 10e32d <_Watchdog_Insert+0x9d> 10e2d0: 8b 32 mov (%edx),%esi 10e2d2: 85 f6 test %esi,%esi 10e2d4: 74 57 je 10e32d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e2d6: 8b 4a 10 mov 0x10(%edx),%ecx 10e2d9: 39 c8 cmp %ecx,%eax 10e2db: 73 22 jae 10e2ff <_Watchdog_Insert+0x6f> 10e2dd: eb 49 jmp 10e328 <_Watchdog_Insert+0x98> <== ALWAYS TAKEN 10e2df: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e2e0: 8b 35 f4 53 12 00 mov 0x1253f4,%esi 10e2e6: 39 f7 cmp %esi,%edi 10e2e8: 72 72 jb 10e35c <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e2ea: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e2ec: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e2ee: 85 c0 test %eax,%eax 10e2f0: 74 3b je 10e32d <_Watchdog_Insert+0x9d> 10e2f2: 8b 0a mov (%edx),%ecx 10e2f4: 85 c9 test %ecx,%ecx 10e2f6: 74 35 je 10e32d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e2f8: 8b 4a 10 mov 0x10(%edx),%ecx 10e2fb: 39 c1 cmp %eax,%ecx 10e2fd: 77 29 ja 10e328 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10e2ff: ff 75 f0 pushl -0x10(%ebp) 10e302: 9d popf 10e303: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e304: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e308: 74 d6 je 10e2e0 <_Watchdog_Insert+0x50> _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 10e30a: 89 3d f4 53 12 00 mov %edi,0x1253f4 _Watchdog_Sync_count--; 10e310: a1 a0 54 12 00 mov 0x1254a0,%eax 10e315: 48 dec %eax 10e316: a3 a0 54 12 00 mov %eax,0x1254a0 _ISR_Enable( level ); 10e31b: ff 75 f0 pushl -0x10(%ebp) 10e31e: 9d popf } 10e31f: 58 pop %eax 10e320: 5b pop %ebx 10e321: 5e pop %esi 10e322: 5f pop %edi 10e323: c9 leave 10e324: c3 ret 10e325: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 10e328: 29 c1 sub %eax,%ecx 10e32a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e32d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e334: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e337: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e33a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e33d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e33f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e341: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e343: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e346: a1 a4 54 12 00 mov 0x1254a4,%eax 10e34b: 89 43 14 mov %eax,0x14(%ebx) 10e34e: eb ba jmp 10e30a <_Watchdog_Insert+0x7a> <== ALWAYS TAKEN * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 10e350: ff 75 f0 pushl -0x10(%ebp) 10e353: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e354: 58 pop %eax 10e355: 5b pop %ebx 10e356: 5e pop %esi 10e357: 5f pop %edi 10e358: c9 leave 10e359: c3 ret 10e35a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 10e35c: 89 3d f4 53 12 00 mov %edi,0x1253f4 goto restart; 10e362: e9 5d ff ff ff jmp 10e2c4 <_Watchdog_Insert+0x34> <== ALWAYS TAKEN 0010e3c8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e3c8: 55 push %ebp 10e3c9: 89 e5 mov %esp,%ebp 10e3cb: 56 push %esi 10e3cc: 53 push %ebx 10e3cd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e3d0: 9c pushf 10e3d1: fa cli 10e3d2: 59 pop %ecx previous_state = the_watchdog->state; 10e3d3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e3d6: 83 f8 01 cmp $0x1,%eax 10e3d9: 74 4d je 10e428 <_Watchdog_Remove+0x60> 10e3db: 73 0f jae 10e3ec <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e3dd: 8b 1d a4 54 12 00 mov 0x1254a4,%ebx 10e3e3: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e3e6: 51 push %ecx 10e3e7: 9d popf return( previous_state ); } 10e3e8: 5b pop %ebx 10e3e9: 5e pop %esi 10e3ea: c9 leave 10e3eb: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e3ec: 83 f8 03 cmp $0x3,%eax 10e3ef: 77 ec ja 10e3dd <_Watchdog_Remove+0x15> <== ALWAYS TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e3f1: 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 ); 10e3f8: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e3fa: 8b 33 mov (%ebx),%esi 10e3fc: 85 f6 test %esi,%esi 10e3fe: 74 06 je 10e406 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e400: 8b 72 10 mov 0x10(%edx),%esi 10e403: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e406: 8b 35 a0 54 12 00 mov 0x1254a0,%esi 10e40c: 85 f6 test %esi,%esi 10e40e: 74 0c je 10e41c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e410: 8b 35 d4 53 12 00 mov 0x1253d4,%esi 10e416: 89 35 f4 53 12 00 mov %esi,0x1253f4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e41c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e41f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e422: 89 1e mov %ebx,(%esi) 10e424: eb b7 jmp 10e3dd <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 10e426: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 10e428: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e42f: eb ac jmp 10e3dd <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 0010f85c <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10f85c: 55 push %ebp 10f85d: 89 e5 mov %esp,%ebp 10f85f: 57 push %edi 10f860: 56 push %esi 10f861: 53 push %ebx 10f862: 83 ec 2c sub $0x2c,%esp 10f865: 8b 55 08 mov 0x8(%ebp),%edx 10f868: 8b 45 0c mov 0xc(%ebp),%eax printk( 10f86b: 8b 78 24 mov 0x24(%eax),%edi 10f86e: 8b 70 20 mov 0x20(%eax),%esi 10f871: 8b 58 1c mov 0x1c(%eax),%ebx 10f874: 8b 48 0c mov 0xc(%eax),%ecx 10f877: 89 4d d4 mov %ecx,-0x2c(%ebp) 10f87a: 8b 48 10 mov 0x10(%eax),%ecx 10f87d: 89 4d e0 mov %ecx,-0x20(%ebp) 10f880: 85 d2 test %edx,%edx 10f882: 74 2c je 10f8b0 <_Watchdog_Report+0x54> 10f884: b9 c3 15 12 00 mov $0x1215c3,%ecx 10f889: 83 ec 0c sub $0xc,%esp 10f88c: 57 push %edi 10f88d: 56 push %esi 10f88e: 53 push %ebx 10f88f: 50 push %eax 10f890: ff 75 d4 pushl -0x2c(%ebp) 10f893: ff 75 e0 pushl -0x20(%ebp) 10f896: 51 push %ecx 10f897: 52 push %edx 10f898: 68 c6 1e 12 00 push $0x121ec6 10f89d: e8 f2 9f ff ff call 109894 10f8a2: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10f8a5: 8d 65 f4 lea -0xc(%ebp),%esp 10f8a8: 5b pop %ebx 10f8a9: 5e pop %esi 10f8aa: 5f pop %edi 10f8ab: c9 leave 10f8ac: c3 ret 10f8ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10f8b0: b9 27 1d 12 00 mov $0x121d27,%ecx 10f8b5: 89 ca mov %ecx,%edx 10f8b7: eb d0 jmp 10f889 <_Watchdog_Report+0x2d> <== ALWAYS TAKEN 0010f7ec <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10f7ec: 55 push %ebp 10f7ed: 89 e5 mov %esp,%ebp 10f7ef: 57 push %edi 10f7f0: 56 push %esi 10f7f1: 53 push %ebx 10f7f2: 83 ec 20 sub $0x20,%esp 10f7f5: 8b 7d 08 mov 0x8(%ebp),%edi 10f7f8: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10f7fb: 9c pushf 10f7fc: fa cli 10f7fd: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10f800: 56 push %esi 10f801: 57 push %edi 10f802: 68 90 1e 12 00 push $0x121e90 10f807: e8 88 a0 ff ff call 109894 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f80c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f80e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10f811: 83 c4 10 add $0x10,%esp 10f814: 39 f3 cmp %esi,%ebx 10f816: 74 31 je 10f849 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10f818: 83 ec 08 sub $0x8,%esp 10f81b: 53 push %ebx 10f81c: 6a 00 push $0x0 10f81e: e8 39 00 00 00 call 10f85c <_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 ) 10f823: 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 ; 10f825: 83 c4 10 add $0x10,%esp 10f828: 39 f3 cmp %esi,%ebx 10f82a: 75 ec jne 10f818 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10f82c: 83 ec 08 sub $0x8,%esp 10f82f: 57 push %edi 10f830: 68 a7 1e 12 00 push $0x121ea7 10f835: e8 5a a0 ff ff call 109894 10f83a: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10f83d: ff 75 e4 pushl -0x1c(%ebp) 10f840: 9d popf } 10f841: 8d 65 f4 lea -0xc(%ebp),%esp 10f844: 5b pop %ebx 10f845: 5e pop %esi 10f846: 5f pop %edi 10f847: c9 leave 10f848: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10f849: 83 ec 0c sub $0xc,%esp 10f84c: 68 b6 1e 12 00 push $0x121eb6 10f851: e8 3e a0 ff ff call 109894 10f856: 83 c4 10 add $0x10,%esp 10f859: eb e2 jmp 10f83d <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN 0010e434 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e434: 55 push %ebp 10e435: 89 e5 mov %esp,%ebp 10e437: 57 push %edi 10e438: 56 push %esi 10e439: 53 push %ebx 10e43a: 83 ec 1c sub $0x1c,%esp 10e43d: 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 ); 10e440: 9c pushf 10e441: fa cli 10e442: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e443: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e445: 8d 47 04 lea 0x4(%edi),%eax 10e448: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e44b: 39 c3 cmp %eax,%ebx 10e44d: 74 11 je 10e460 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10e44f: 8b 43 10 mov 0x10(%ebx),%eax 10e452: 85 c0 test %eax,%eax 10e454: 74 34 je 10e48a <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e456: 48 dec %eax 10e457: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e45a: 85 c0 test %eax,%eax 10e45c: 74 2c je 10e48a <_Watchdog_Tickle+0x56> 10e45e: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e460: 56 push %esi 10e461: 9d popf } 10e462: 8d 65 f4 lea -0xc(%ebp),%esp 10e465: 5b pop %ebx 10e466: 5e pop %esi 10e467: 5f pop %edi 10e468: c9 leave 10e469: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e46a: 83 ec 08 sub $0x8,%esp 10e46d: ff 73 24 pushl 0x24(%ebx) 10e470: ff 73 20 pushl 0x20(%ebx) 10e473: ff 53 1c call *0x1c(%ebx) 10e476: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e479: 9c pushf 10e47a: fa cli 10e47b: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e47c: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e47e: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e481: 74 dd je 10e460 <_Watchdog_Tickle+0x2c> 10e483: 8b 43 10 mov 0x10(%ebx),%eax 10e486: 85 c0 test %eax,%eax 10e488: 75 d6 jne 10e460 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e48a: 83 ec 0c sub $0xc,%esp 10e48d: 53 push %ebx 10e48e: e8 35 ff ff ff call 10e3c8 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10e493: 56 push %esi 10e494: 9d popf switch( watchdog_state ) { 10e495: 83 c4 10 add $0x10,%esp 10e498: 83 f8 02 cmp $0x2,%eax 10e49b: 75 dc jne 10e479 <_Watchdog_Tickle+0x45> 10e49d: eb cb jmp 10e46a <_Watchdog_Tickle+0x36> <== ALWAYS TAKEN 0010e500 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e500: 55 push %ebp 10e501: 89 e5 mov %esp,%ebp 10e503: 57 push %edi 10e504: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e505: 8b 1d 20 12 12 00 mov 0x121220,%ebx uintptr_t size = Configuration.work_space_size; 10e50b: 8b 15 24 12 12 00 mov 0x121224,%edx if ( Configuration.do_zero_of_workspace ) 10e511: 80 3d 48 12 12 00 00 cmpb $0x0,0x121248 10e518: 75 1e jne 10e538 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e51a: 6a 04 push $0x4 10e51c: 52 push %edx 10e51d: 53 push %ebx 10e51e: 68 60 53 12 00 push $0x125360 10e523: e8 dc dd ff ff call 10c304 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e528: 83 c4 10 add $0x10,%esp 10e52b: 85 c0 test %eax,%eax 10e52d: 74 13 je 10e542 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e52f: 8d 65 f8 lea -0x8(%ebp),%esp 10e532: 5b pop %ebx 10e533: 5f pop %edi 10e534: c9 leave 10e535: c3 ret 10e536: 66 90 xchg %ax,%ax <== NOT EXECUTED uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace ) memset( starting_address, 0, size ); 10e538: 31 c0 xor %eax,%eax 10e53a: 89 df mov %ebx,%edi 10e53c: 89 d1 mov %edx,%ecx 10e53e: f3 aa rep stos %al,%es:(%edi) 10e540: eb d8 jmp 10e51a <_Workspace_Handler_initialization+0x1a> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e542: 52 push %edx 10e543: 6a 03 push $0x3 10e545: 6a 01 push $0x1 10e547: 6a 00 push $0x0 10e549: e8 da e0 ff ff call 10c628 <_Internal_error_Occurred> 001117dc : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1117dc: 55 push %ebp 1117dd: 89 e5 mov %esp,%ebp 1117df: 57 push %edi 1117e0: 56 push %esi 1117e1: 53 push %ebx 1117e2: 83 ec 2c sub $0x2c,%esp 1117e5: 8b 5d 08 mov 0x8(%ebp),%ebx 1117e8: 8b 7d 0c mov 0xc(%ebp),%edi 1117eb: 8b 45 10 mov 0x10(%ebp),%eax 1117ee: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1117f1: 85 db test %ebx,%ebx 1117f3: 0f 84 87 00 00 00 je 111880 return RTEMS_INVALID_NAME; if ( !id ) 1117f9: 85 f6 test %esi,%esi 1117fb: 0f 84 bb 00 00 00 je 1118bc return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 111801: f7 c7 10 00 00 00 test $0x10,%edi 111807: 0f 84 83 00 00 00 je 111890 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11180d: 85 c0 test %eax,%eax 11180f: 0f 84 87 00 00 00 je 11189c if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 111815: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 11181c: 89 45 e4 mov %eax,-0x1c(%ebp) 11181f: a1 38 53 12 00 mov 0x125338,%eax 111824: 40 inc %eax 111825: a3 38 53 12 00 mov %eax,0x125338 * 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 ); 11182a: 83 ec 0c sub $0xc,%esp 11182d: 68 a0 56 12 00 push $0x1256a0 111832: e8 89 ae ff ff call 10c6c0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 111837: 83 c4 10 add $0x10,%esp 11183a: 85 c0 test %eax,%eax 11183c: 74 6a je 1118a8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 11183e: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 111841: 83 ec 08 sub $0x8,%esp 111844: 8d 55 e0 lea -0x20(%ebp),%edx 111847: 52 push %edx 111848: 8d 50 14 lea 0x14(%eax),%edx 11184b: 52 push %edx 11184c: 89 45 d4 mov %eax,-0x2c(%ebp) 11184f: e8 5c 04 00 00 call 111cb0 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111854: 8b 45 d4 mov -0x2c(%ebp),%eax 111857: 8b 50 08 mov 0x8(%eax),%edx 11185a: 0f b7 fa movzwl %dx,%edi 11185d: 8b 0d bc 56 12 00 mov 0x1256bc,%ecx 111863: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 111866: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 111869: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11186b: e8 48 bb ff ff call 10d3b8 <_Thread_Enable_dispatch> 111870: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111872: 83 c4 10 add $0x10,%esp } 111875: 8d 65 f4 lea -0xc(%ebp),%esp 111878: 5b pop %ebx 111879: 5e pop %esi 11187a: 5f pop %edi 11187b: c9 leave 11187c: c3 ret 11187d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111880: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111885: 8d 65 f4 lea -0xc(%ebp),%esp 111888: 5b pop %ebx 111889: 5e pop %esi 11188a: 5f pop %edi 11188b: c9 leave 11188c: c3 ret 11188d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 111890: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 111897: eb 83 jmp 11181c <== ALWAYS TAKEN 111899: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11189c: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11189e: 8d 65 f4 lea -0xc(%ebp),%esp 1118a1: 5b pop %ebx 1118a2: 5e pop %esi 1118a3: 5f pop %edi 1118a4: c9 leave 1118a5: c3 ret 1118a6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1118a8: e8 0b bb ff ff call 10d3b8 <_Thread_Enable_dispatch> 1118ad: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1118b2: 8d 65 f4 lea -0xc(%ebp),%esp 1118b5: 5b pop %ebx 1118b6: 5e pop %esi 1118b7: 5f pop %edi 1118b8: c9 leave 1118b9: c3 ret 1118ba: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1118bc: b8 09 00 00 00 mov $0x9,%eax 1118c1: eb b2 jmp 111875 <== ALWAYS TAKEN 001118c4 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 1118c4: 55 push %ebp 1118c5: 89 e5 mov %esp,%ebp 1118c7: 53 push %ebx 1118c8: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 1118cb: 8d 45 f4 lea -0xc(%ebp),%eax 1118ce: 50 push %eax 1118cf: ff 75 08 pushl 0x8(%ebp) 1118d2: 68 a0 56 12 00 push $0x1256a0 1118d7: e8 94 b2 ff ff call 10cb70 <_Objects_Get> 1118dc: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1118de: 83 c4 10 add $0x10,%esp 1118e1: 8b 4d f4 mov -0xc(%ebp),%ecx 1118e4: 85 c9 test %ecx,%ecx 1118e6: 75 38 jne 111920 case OBJECTS_LOCAL: _CORE_barrier_Flush( 1118e8: 52 push %edx 1118e9: 6a 02 push $0x2 1118eb: 6a 00 push $0x0 1118ed: 8d 40 14 lea 0x14(%eax),%eax 1118f0: 50 push %eax 1118f1: e8 ca c1 ff ff call 10dac0 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 1118f6: 59 pop %ecx 1118f7: 58 pop %eax 1118f8: 53 push %ebx 1118f9: 68 a0 56 12 00 push $0x1256a0 1118fe: e8 39 ae ff ff call 10c73c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 111903: 58 pop %eax 111904: 5a pop %edx 111905: 53 push %ebx 111906: 68 a0 56 12 00 push $0x1256a0 11190b: e8 30 b1 ff ff call 10ca40 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 111910: e8 a3 ba ff ff call 10d3b8 <_Thread_Enable_dispatch> 111915: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111917: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11191a: 8b 5d fc mov -0x4(%ebp),%ebx 11191d: c9 leave 11191e: c3 ret 11191f: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 111920: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111925: 8b 5d fc mov -0x4(%ebp),%ebx 111928: c9 leave 111929: c3 ret 00111990 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 111990: 55 push %ebp 111991: 89 e5 mov %esp,%ebp 111993: 53 push %ebx 111994: 83 ec 18 sub $0x18,%esp 111997: 8b 5d 08 mov 0x8(%ebp),%ebx 11199a: 8d 45 f4 lea -0xc(%ebp),%eax 11199d: 50 push %eax 11199e: 53 push %ebx 11199f: 68 a0 56 12 00 push $0x1256a0 1119a4: e8 c7 b1 ff ff call 10cb70 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1119a9: 83 c4 10 add $0x10,%esp 1119ac: 8b 55 f4 mov -0xc(%ebp),%edx 1119af: 85 d2 test %edx,%edx 1119b1: 75 35 jne 1119e8 <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 1119b3: 83 ec 0c sub $0xc,%esp 1119b6: 6a 00 push $0x0 1119b8: ff 75 0c pushl 0xc(%ebp) 1119bb: 6a 01 push $0x1 1119bd: 53 push %ebx 1119be: 83 c0 14 add $0x14,%eax 1119c1: 50 push %eax 1119c2: e8 4d 03 00 00 call 111d14 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 1119c7: 83 c4 20 add $0x20,%esp 1119ca: e8 e9 b9 ff ff call 10d3b8 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 1119cf: 83 ec 0c sub $0xc,%esp 1119d2: a1 f8 53 12 00 mov 0x1253f8,%eax 1119d7: ff 70 34 pushl 0x34(%eax) 1119da: e8 41 09 00 00 call 112320 <_Barrier_Translate_core_barrier_return_code> 1119df: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1119e2: 8b 5d fc mov -0x4(%ebp),%ebx 1119e5: c9 leave 1119e6: c3 ret 1119e7: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1119e8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1119ed: 8b 5d fc mov -0x4(%ebp),%ebx 1119f0: c9 leave 1119f1: c3 ret 00110ad4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 110ad4: 55 push %ebp 110ad5: 89 e5 mov %esp,%ebp 110ad7: 53 push %ebx 110ad8: 83 ec 04 sub $0x4,%esp 110adb: 8b 45 08 mov 0x8(%ebp),%eax 110ade: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 110ae1: 85 db test %ebx,%ebx 110ae3: 74 3b je 110b20 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 110ae5: 85 c0 test %eax,%eax 110ae7: 74 2b je 110b14 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 110ae9: 83 f8 01 cmp $0x1,%eax 110aec: 74 3e je 110b2c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 110aee: 83 f8 02 cmp $0x2,%eax 110af1: 74 45 je 110b38 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 110af3: 83 f8 03 cmp $0x3,%eax 110af6: 74 4c je 110b44 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 110af8: 83 f8 04 cmp $0x4,%eax 110afb: 74 0b je 110b08 110afd: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110b02: 5a pop %edx 110b03: 5b pop %ebx 110b04: c9 leave 110b05: c3 ret 110b06: 66 90 xchg %ax,%ax <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 110b08: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 110b0b: 59 pop %ecx 110b0c: 5b pop %ebx 110b0d: 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 ); 110b0e: e9 49 01 00 00 jmp 110c5c <== ALWAYS TAKEN 110b13: 90 nop <== NOT EXECUTED { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 110b14: 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; } 110b17: 58 pop %eax 110b18: 5b pop %ebx 110b19: 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 ); 110b1a: e9 7d 00 00 00 jmp 110b9c <== ALWAYS TAKEN 110b1f: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 110b20: b8 09 00 00 00 mov $0x9,%eax if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 110b25: 5a pop %edx 110b26: 5b pop %ebx 110b27: c9 leave 110b28: c3 ret 110b29: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 110b2c: 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; } 110b2f: 5b pop %ebx 110b30: 5b pop %ebx 110b31: 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); 110b32: e9 19 00 00 00 jmp 110b50 <== ALWAYS TAKEN 110b37: 90 nop <== NOT EXECUTED if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 110b38: e8 53 00 00 00 call 110b90 <== ALWAYS TAKEN 110b3d: 89 03 mov %eax,(%ebx) 110b3f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110b41: eb bf jmp 110b02 <== ALWAYS TAKEN 110b43: 90 nop <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 110b44: e8 33 00 00 00 call 110b7c <== ALWAYS TAKEN 110b49: 89 03 mov %eax,(%ebx) 110b4b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110b4d: eb b3 jmp 110b02 <== ALWAYS TAKEN 0010be34 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { 10be34: 55 push %ebp 10be35: 89 e5 mov %esp,%ebp 10be37: 8b 45 08 mov 0x8(%ebp),%eax if ( !the_interval ) 10be3a: 85 c0 test %eax,%eax 10be3c: 74 1e je 10be5c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be3e: 80 3d 8c 01 13 00 00 cmpb $0x0,0x13018c 10be45: 74 0d je 10be54 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10be47: 8b 15 0c 02 13 00 mov 0x13020c,%edx 10be4d: 89 10 mov %edx,(%eax) 10be4f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10be51: c9 leave 10be52: c3 ret 10be53: 90 nop <== NOT EXECUTED ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be54: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be59: c9 leave 10be5a: c3 ret 10be5b: 90 nop <== NOT EXECUTED rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) 10be5c: b0 09 mov $0x9,%al if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } 10be5e: c9 leave 10be5f: c3 ret 0010be80 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10be80: 55 push %ebp 10be81: 89 e5 mov %esp,%ebp 10be83: 56 push %esi 10be84: 53 push %ebx 10be85: 83 ec 50 sub $0x50,%esp 10be88: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10be8b: 85 db test %ebx,%ebx 10be8d: 0f 84 a1 00 00 00 je 10bf34 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10be93: 80 3d 8c 01 13 00 00 cmpb $0x0,0x13018c 10be9a: 75 0c jne 10bea8 10be9c: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10bea1: 8d 65 f8 lea -0x8(%ebp),%esp 10bea4: 5b pop %ebx 10bea5: 5e pop %esi 10bea6: c9 leave 10bea7: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10bea8: 9c pushf 10bea9: fa cli 10beaa: 5e pop %esi _TOD_Get( &now ); 10beab: 83 ec 0c sub $0xc,%esp 10beae: 8d 45 e8 lea -0x18(%ebp),%eax 10beb1: 50 push %eax 10beb2: e8 61 18 00 00 call 10d718 <_TOD_Get> _ISR_Enable(level); 10beb7: 56 push %esi 10beb8: 9d popf useconds = (suseconds_t)now.tv_nsec; 10beb9: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10bebc: 8b 45 e8 mov -0x18(%ebp),%eax 10bebf: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10bec2: be d3 4d 62 10 mov $0x10624dd3,%esi 10bec7: 89 c8 mov %ecx,%eax 10bec9: f7 ee imul %esi 10becb: 89 45 b0 mov %eax,-0x50(%ebp) 10bece: 89 55 b4 mov %edx,-0x4c(%ebp) 10bed1: 8b 75 b4 mov -0x4c(%ebp),%esi 10bed4: c1 fe 06 sar $0x6,%esi 10bed7: 89 c8 mov %ecx,%eax 10bed9: 99 cltd 10beda: 29 d6 sub %edx,%esi 10bedc: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10bedf: 58 pop %eax 10bee0: 5a pop %edx 10bee1: 8d 45 c4 lea -0x3c(%ebp),%eax 10bee4: 50 push %eax 10bee5: 8d 45 f0 lea -0x10(%ebp),%eax 10bee8: 50 push %eax 10bee9: e8 aa 83 00 00 call 114298 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10beee: 8b 45 d8 mov -0x28(%ebp),%eax 10bef1: 05 6c 07 00 00 add $0x76c,%eax 10bef6: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10bef8: 8b 45 d4 mov -0x2c(%ebp),%eax 10befb: 40 inc %eax 10befc: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10beff: 8b 45 d0 mov -0x30(%ebp),%eax 10bf02: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10bf05: 8b 45 cc mov -0x34(%ebp),%eax 10bf08: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10bf0b: 8b 45 c8 mov -0x38(%ebp),%eax 10bf0e: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10bf11: 8b 45 c4 mov -0x3c(%ebp),%eax 10bf14: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10bf17: 8b 45 f4 mov -0xc(%ebp),%eax 10bf1a: 31 d2 xor %edx,%edx 10bf1c: f7 35 2c 42 12 00 divl 0x12422c 10bf22: 89 43 18 mov %eax,0x18(%ebx) 10bf25: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10bf27: 83 c4 10 add $0x10,%esp } 10bf2a: 8d 65 f8 lea -0x8(%ebp),%esp 10bf2d: 5b pop %ebx 10bf2e: 5e pop %esi 10bf2f: c9 leave 10bf30: c3 ret 10bf31: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10bf34: b8 09 00 00 00 mov $0x9,%eax 10bf39: e9 63 ff ff ff jmp 10bea1 <== ALWAYS TAKEN 00110c5c : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 110c5c: 55 push %ebp 110c5d: 89 e5 mov %esp,%ebp 110c5f: 56 push %esi 110c60: 53 push %ebx 110c61: 83 ec 20 sub $0x20,%esp 110c64: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 110c67: 85 db test %ebx,%ebx 110c69: 74 59 je 110cc4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 110c6b: 80 3d 8c d8 16 00 00 cmpb $0x0,0x16d88c 110c72: 75 0c jne 110c80 110c74: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 110c79: 8d 65 f8 lea -0x8(%ebp),%esp 110c7c: 5b pop %ebx 110c7d: 5e pop %esi 110c7e: c9 leave 110c7f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 110c80: 9c pushf 110c81: fa cli 110c82: 5e pop %esi _TOD_Get( &now ); 110c83: 83 ec 0c sub $0xc,%esp 110c86: 8d 45 f0 lea -0x10(%ebp),%eax 110c89: 50 push %eax 110c8a: e8 05 18 00 00 call 112494 <_TOD_Get> _ISR_Enable(level); 110c8f: 56 push %esi 110c90: 9d popf useconds = (suseconds_t)now.tv_nsec; 110c91: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 110c94: 8b 45 f0 mov -0x10(%ebp),%eax 110c97: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 110c99: be d3 4d 62 10 mov $0x10624dd3,%esi 110c9e: 89 c8 mov %ecx,%eax 110ca0: f7 ee imul %esi 110ca2: 89 45 e0 mov %eax,-0x20(%ebp) 110ca5: 89 55 e4 mov %edx,-0x1c(%ebp) 110ca8: 8b 75 e4 mov -0x1c(%ebp),%esi 110cab: c1 fe 06 sar $0x6,%esi 110cae: 89 c8 mov %ecx,%eax 110cb0: 99 cltd 110cb1: 29 d6 sub %edx,%esi 110cb3: 89 73 04 mov %esi,0x4(%ebx) 110cb6: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 110cb8: 83 c4 10 add $0x10,%esp } 110cbb: 8d 65 f8 lea -0x8(%ebp),%esp 110cbe: 5b pop %ebx 110cbf: 5e pop %esi 110cc0: c9 leave 110cc1: c3 ret 110cc2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 110cc4: b8 09 00 00 00 mov $0x9,%eax 110cc9: eb ae jmp 110c79 <== ALWAYS TAKEN 0012ce78 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12ce78: 55 push %ebp 12ce79: 89 e5 mov %esp,%ebp 12ce7b: 83 ec 08 sub $0x8,%esp 12ce7e: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12ce81: 85 c0 test %eax,%eax 12ce83: 74 13 je 12ce98 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12ce85: 83 ec 0c sub $0xc,%esp 12ce88: 50 push %eax 12ce89: e8 7a 0f 00 00 call 12de08 <_TOD_Get_uptime_as_timespec> 12ce8e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12ce90: 83 c4 10 add $0x10,%esp } 12ce93: c9 leave 12ce94: c3 ret 12ce95: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12ce98: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12ce9a: c9 leave 12ce9b: c3 ret 0010bf58 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10bf58: 55 push %ebp 10bf59: 89 e5 mov %esp,%ebp 10bf5b: 53 push %ebx 10bf5c: 83 ec 14 sub $0x14,%esp 10bf5f: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10bf62: 85 db test %ebx,%ebx 10bf64: 74 66 je 10bfcc return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10bf66: 83 ec 0c sub $0xc,%esp 10bf69: 53 push %ebx 10bf6a: e8 39 01 00 00 call 10c0a8 <_TOD_Validate> <== ALWAYS TAKEN 10bf6f: 83 c4 10 add $0x10,%esp 10bf72: 84 c0 test %al,%al 10bf74: 75 0a jne 10bf80 10bf76: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bf7b: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7e: c9 leave 10bf7f: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10bf80: 83 ec 0c sub $0xc,%esp 10bf83: 53 push %ebx 10bf84: e8 93 00 00 00 call 10c01c <_TOD_To_seconds> <== ALWAYS TAKEN 10bf89: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10bf8c: 8b 43 18 mov 0x18(%ebx),%eax 10bf8f: 0f af 05 2c 42 12 00 imul 0x12422c,%eax 10bf96: 8d 04 80 lea (%eax,%eax,4),%eax 10bf99: 8d 04 80 lea (%eax,%eax,4),%eax 10bf9c: 8d 04 80 lea (%eax,%eax,4),%eax 10bf9f: c1 e0 03 shl $0x3,%eax 10bfa2: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bfa5: a1 78 01 13 00 mov 0x130178,%eax 10bfaa: 40 inc %eax 10bfab: a3 78 01 13 00 mov %eax,0x130178 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10bfb0: 8d 45 f0 lea -0x10(%ebp),%eax 10bfb3: 89 04 24 mov %eax,(%esp) 10bfb6: e8 41 18 00 00 call 10d7fc <_TOD_Set> _Thread_Enable_dispatch(); 10bfbb: e8 04 2b 00 00 call 10eac4 <_Thread_Enable_dispatch> 10bfc0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bfc2: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10bfc5: 8b 5d fc mov -0x4(%ebp),%ebx 10bfc8: c9 leave 10bfc9: c3 ret 10bfca: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10bfcc: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10bfd1: 8b 5d fc mov -0x4(%ebp),%ebx 10bfd4: c9 leave 10bfd5: c3 ret 0010ae70 : * error code - if unsuccessful */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { 10ae70: 55 push %ebp 10ae71: 89 e5 mov %esp,%ebp 10ae73: 8b 45 08 mov 0x8(%ebp),%eax if ( !routine ) 10ae76: 85 c0 test %eax,%eax 10ae78: 74 0a je 10ae84 return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; 10ae7a: a3 04 55 12 00 mov %eax,0x125504 10ae7f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10ae81: c9 leave 10ae82: c3 ret 10ae83: 90 nop <== NOT EXECUTED */ rtems_status_code rtems_clock_set_nanoseconds_extension( rtems_nanoseconds_extension_routine routine ) { if ( !routine ) 10ae84: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _Watchdog_Nanoseconds_since_tick_handler = routine; return RTEMS_SUCCESSFUL; } 10ae86: c9 leave 10ae87: c3 ret 0010ae88 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10ae88: 55 push %ebp 10ae89: 89 e5 mov %esp,%ebp 10ae8b: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10ae8e: e8 f5 13 00 00 call 10c288 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10ae93: 83 ec 0c sub $0xc,%esp 10ae96: 68 18 54 12 00 push $0x125418 10ae9b: e8 94 35 00 00 call 10e434 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10aea0: e8 3b 30 00 00 call 10dee0 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10aea5: a0 08 54 12 00 mov 0x125408,%al if ( _Thread_Is_context_switch_necessary() && 10aeaa: 83 c4 10 add $0x10,%esp 10aead: 84 c0 test %al,%al 10aeaf: 74 09 je 10aeba * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10aeb1: a1 38 53 12 00 mov 0x125338,%eax 10aeb6: 85 c0 test %eax,%eax 10aeb8: 74 06 je 10aec0 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10aeba: 31 c0 xor %eax,%eax 10aebc: c9 leave 10aebd: c3 ret 10aebe: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10aec0: e8 97 23 00 00 call 10d25c <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10aec5: 31 c0 xor %eax,%eax 10aec7: c9 leave 10aec8: c3 ret 0010aecc : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10aecc: 55 push %ebp 10aecd: 89 e5 mov %esp,%ebp 10aecf: 83 ec 08 sub $0x8,%esp 10aed2: 8b 55 08 mov 0x8(%ebp),%edx 10aed5: 8b 45 14 mov 0x14(%ebp),%eax RTEMS_API_Control *api; if ( !event_out ) 10aed8: 85 c0 test %eax,%eax 10aeda: 74 44 je 10af20 return RTEMS_INVALID_ADDRESS; api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; 10aedc: 8b 0d f8 53 12 00 mov 0x1253f8,%ecx 10aee2: 8b 89 f0 00 00 00 mov 0xf0(%ecx),%ecx if ( _Event_sets_Is_empty( event_in ) ) { 10aee8: 85 d2 test %edx,%edx 10aeea: 75 08 jne 10aef4 *event_out = api->pending_events; 10aeec: 8b 11 mov (%ecx),%edx 10aeee: 89 10 mov %edx,(%eax) 10aef0: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 10aef2: c9 leave 10aef3: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10aef4: 8b 0d 38 53 12 00 mov 0x125338,%ecx 10aefa: 41 inc %ecx 10aefb: 89 0d 38 53 12 00 mov %ecx,0x125338 *event_out = api->pending_events; return RTEMS_SUCCESSFUL; } _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); 10af01: 50 push %eax 10af02: ff 75 10 pushl 0x10(%ebp) 10af05: ff 75 0c pushl 0xc(%ebp) 10af08: 52 push %edx 10af09: e8 16 00 00 00 call 10af24 <_Event_Seize> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10af0e: e8 a5 24 00 00 call 10d3b8 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 10af13: a1 f8 53 12 00 mov 0x1253f8,%eax 10af18: 8b 40 34 mov 0x34(%eax),%eax 10af1b: 83 c4 10 add $0x10,%esp } 10af1e: c9 leave 10af1f: c3 ret rtems_event_set *event_out ) { RTEMS_API_Control *api; if ( !event_out ) 10af20: b0 09 mov $0x9,%al _Thread_Disable_dispatch(); _Event_Seize( event_in, option_set, ticks, event_out ); _Thread_Enable_dispatch(); return( _Thread_Executing->Wait.return_code ); } 10af22: c9 leave 10af23: c3 ret 0010b050 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b050: 55 push %ebp 10b051: 89 e5 mov %esp,%ebp 10b053: 53 push %ebx 10b054: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b057: 8d 45 f4 lea -0xc(%ebp),%eax 10b05a: 50 push %eax 10b05b: ff 75 08 pushl 0x8(%ebp) 10b05e: e8 79 23 00 00 call 10d3dc <_Thread_Get> switch ( location ) { 10b063: 83 c4 10 add $0x10,%esp 10b066: 8b 55 f4 mov -0xc(%ebp),%edx 10b069: 85 d2 test %edx,%edx 10b06b: 75 2b jne 10b098 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b06d: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b073: 9c pushf 10b074: fa cli 10b075: 59 pop %ecx *the_event_set |= the_new_events; 10b076: 8b 5d 0c mov 0xc(%ebp),%ebx 10b079: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b07b: 51 push %ecx 10b07c: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b07d: 83 ec 0c sub $0xc,%esp 10b080: 50 push %eax 10b081: e8 1e 00 00 00 call 10b0a4 <_Event_Surrender> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b086: e8 2d 23 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b08b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b08d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b090: 8b 5d fc mov -0x4(%ebp),%ebx 10b093: c9 leave 10b094: c3 ret 10b095: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b098: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b09d: 8b 5d fc mov -0x4(%ebp),%ebx 10b0a0: c9 leave 10b0a1: c3 ret 00110764 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110764: 55 push %ebp 110765: 89 e5 mov %esp,%ebp 110767: 57 push %edi 110768: 56 push %esi 110769: 53 push %ebx 11076a: 83 ec 1c sub $0x1c,%esp 11076d: 8b 75 0c mov 0xc(%ebp),%esi 110770: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110773: 85 db test %ebx,%ebx 110775: 0f 84 85 00 00 00 je 110800 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 11077b: 8b 45 08 mov 0x8(%ebp),%eax 11077e: 85 c0 test %eax,%eax 110780: 75 0e jne 110790 110782: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 110787: 8d 65 f4 lea -0xc(%ebp),%esp 11078a: 5b pop %ebx 11078b: 5e pop %esi 11078c: 5f pop %edi 11078d: c9 leave 11078e: c3 ret 11078f: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110790: a1 58 38 13 00 mov 0x133858,%eax 110795: 40 inc %eax 110796: a3 58 38 13 00 mov %eax,0x133858 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 11079b: 83 ec 0c sub $0xc,%esp 11079e: 68 e0 3a 13 00 push $0x133ae0 1107a3: e8 18 0c 00 00 call 1113c0 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 1107a8: 83 c4 10 add $0x10,%esp 1107ab: 85 c0 test %eax,%eax 1107ad: 74 45 je 1107f4 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 1107af: 8d 78 24 lea 0x24(%eax),%edi 1107b2: b9 08 00 00 00 mov $0x8,%ecx 1107b7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 1107b9: 83 ec 0c sub $0xc,%esp 1107bc: 8d 50 10 lea 0x10(%eax),%edx 1107bf: 52 push %edx 1107c0: 89 45 e4 mov %eax,-0x1c(%ebp) 1107c3: e8 c8 25 00 00 call 112d90 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1107c8: 8b 45 e4 mov -0x1c(%ebp),%eax 1107cb: 8b 50 08 mov 0x8(%eax),%edx 1107ce: 0f b7 f2 movzwl %dx,%esi 1107d1: 8b 0d fc 3a 13 00 mov 0x133afc,%ecx 1107d7: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1107da: 8b 4d 08 mov 0x8(%ebp),%ecx 1107dd: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 1107e0: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1107e2: e8 39 19 00 00 call 112120 <_Thread_Enable_dispatch> 1107e7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1107e9: 83 c4 10 add $0x10,%esp } 1107ec: 8d 65 f4 lea -0xc(%ebp),%esp 1107ef: 5b pop %ebx 1107f0: 5e pop %esi 1107f1: 5f pop %edi 1107f2: c9 leave 1107f3: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 1107f4: e8 27 19 00 00 call 112120 <_Thread_Enable_dispatch> 1107f9: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1107fe: eb 87 jmp 110787 <== ALWAYS TAKEN rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110800: b8 09 00 00 00 mov $0x9,%eax 110805: eb 80 jmp 110787 <== ALWAYS TAKEN 00110808 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 110808: 55 push %ebp 110809: 89 e5 mov %esp,%ebp 11080b: 53 push %ebx 11080c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 11080f: 8d 45 f4 lea -0xc(%ebp),%eax 110812: 50 push %eax 110813: ff 75 08 pushl 0x8(%ebp) 110816: 68 e0 3a 13 00 push $0x133ae0 11081b: e8 50 10 00 00 call 111870 <_Objects_Get> 110820: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110822: 83 c4 10 add $0x10,%esp 110825: 8b 55 f4 mov -0xc(%ebp),%edx 110828: 85 d2 test %edx,%edx 11082a: 75 38 jne 110864 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 11082c: 83 ec 0c sub $0xc,%esp 11082f: 8d 40 10 lea 0x10(%eax),%eax 110832: 50 push %eax 110833: e8 58 26 00 00 call 112e90 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 110838: 59 pop %ecx 110839: 58 pop %eax 11083a: 53 push %ebx 11083b: 68 e0 3a 13 00 push $0x133ae0 110840: e8 f7 0b 00 00 call 11143c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110845: 58 pop %eax 110846: 5a pop %edx 110847: 53 push %ebx 110848: 68 e0 3a 13 00 push $0x133ae0 11084d: e8 ee 0e 00 00 call 111740 <_Objects_Free> <== ALWAYS TAKEN _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110852: e8 c9 18 00 00 call 112120 <_Thread_Enable_dispatch> 110857: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 110859: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11085c: 8b 5d fc mov -0x4(%ebp),%ebx 11085f: c9 leave 110860: c3 ret 110861: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110864: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110869: 8b 5d fc mov -0x4(%ebp),%ebx 11086c: c9 leave 11086d: c3 ret 0010bac8 : #endif Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) { 10bac8: 55 push %ebp 10bac9: 89 e5 mov %esp,%ebp 10bacb: 83 ec 08 sub $0x8,%esp 10bace: c7 05 00 55 12 00 00 movl $0x0,0x125500 10bad5: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10bad8: e8 43 2c 00 00 call 10e720 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10badd: e8 5a 44 00 00 call 10ff3c <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10bae2: e8 d5 01 00 00 call 10bcbc <_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; 10bae7: c7 05 38 53 12 00 01 movl $0x1,0x125338 10baee: 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(); 10baf1: e8 0a 2a 00 00 call 10e500 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10baf6: e8 01 25 00 00 call 10dffc <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10bafb: e8 68 0b 00 00 call 10c668 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10bb00: c7 05 10 53 12 00 50 movl $0x125350,0x125310 10bb07: 53 12 00 _API_Mutex_Initialization( 1 ); 10bb0a: 83 ec 0c sub $0xc,%esp 10bb0d: 6a 01 push $0x1 10bb0f: e8 c4 02 00 00 call 10bdd8 <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10bb14: c7 04 24 f0 53 12 00 movl $0x1253f0,(%esp) 10bb1b: e8 3c 02 00 00 call 10bd5c <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10bb20: 66 c7 05 ec 53 12 00 movw $0x0,0x1253ec 10bb27: 00 00 10bb29: 31 c0 xor %eax,%eax 10bb2b: 83 c4 10 add $0x10,%esp 10bb2e: 66 90 xchg %ax,%ax for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 10bb30: 66 c7 84 00 80 54 12 movw $0x0,0x125480(%eax,%eax,1) 10bb37: 00 00 00 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 10bb3a: 40 inc %eax 10bb3b: 83 f8 10 cmp $0x10,%eax 10bb3e: 75 f0 jne 10bb30 _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 10bb40: e8 23 28 00 00 call 10e368 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10bb45: e8 0a 07 00 00 call 10c254 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10bb4a: e8 45 1b 00 00 call 10d694 <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10bb4f: e8 20 01 00 00 call 10bc74 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10bb54: e8 17 00 00 00 call 10bb70 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10bb59: e8 7e 00 00 00 call 10bbdc <_IO_Manager_initialization> <== ALWAYS TAKEN 10bb5e: c7 05 00 55 12 00 01 movl $0x1,0x125500 10bb65: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10bb68: 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(); 10bb69: e9 1e 16 00 00 jmp 10d18c <_Thread_Create_idle> 0010bab4 : _API_extensions_Run_predriver(); #endif } void rtems_initialize_device_drivers(void) { 10bab4: 55 push %ebp 10bab5: 89 e5 mov %esp,%ebp 10bab7: 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(); 10baba: e8 ed 00 00 00 call 10bbac <_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(); } 10babf: c9 leave /* * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 10bac0: e9 1b 02 00 00 jmp 10bce0 <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 00111b34 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111b34: 55 push %ebp 111b35: 89 e5 mov %esp,%ebp 111b37: 56 push %esi 111b38: 53 push %ebx 111b39: 8b 45 08 mov 0x8(%ebp),%eax 111b3c: 8b 4d 0c mov 0xc(%ebp),%ecx 111b3f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b42: 39 05 80 56 12 00 cmp %eax,0x125680 111b48: 76 22 jbe 111b6c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 111b4a: 8d 34 40 lea (%eax,%eax,2),%esi 111b4d: 8b 15 84 56 12 00 mov 0x125684,%edx 111b53: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b57: 85 d2 test %edx,%edx 111b59: 74 1d je 111b78 111b5b: 89 5d 10 mov %ebx,0x10(%ebp) 111b5e: 89 4d 0c mov %ecx,0xc(%ebp) 111b61: 89 45 08 mov %eax,0x8(%ebp) } 111b64: 5b pop %ebx 111b65: 5e pop %esi 111b66: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b67: ff e2 jmp *%edx 111b69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b6c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111b71: 5b pop %ebx 111b72: 5e pop %esi 111b73: c9 leave 111b74: c3 ret 111b75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111b78: 31 c0 xor %eax,%eax } 111b7a: 5b pop %ebx 111b7b: 5e pop %esi 111b7c: c9 leave 111b7d: c3 ret 00111b80 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111b80: 55 push %ebp 111b81: 89 e5 mov %esp,%ebp 111b83: 56 push %esi 111b84: 53 push %ebx 111b85: 8b 45 08 mov 0x8(%ebp),%eax 111b88: 8b 4d 0c mov 0xc(%ebp),%ecx 111b8b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111b8e: 39 05 80 56 12 00 cmp %eax,0x125680 111b94: 76 22 jbe 111bb8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 111b96: 8d 34 40 lea (%eax,%eax,2),%esi 111b99: 8b 15 84 56 12 00 mov 0x125684,%edx 111b9f: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111ba3: 85 d2 test %edx,%edx 111ba5: 74 1d je 111bc4 111ba7: 89 5d 10 mov %ebx,0x10(%ebp) 111baa: 89 4d 0c mov %ecx,0xc(%ebp) 111bad: 89 45 08 mov %eax,0x8(%ebp) } 111bb0: 5b pop %ebx 111bb1: 5e pop %esi 111bb2: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bb3: ff e2 jmp *%edx 111bb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111bb8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111bbd: 5b pop %ebx 111bbe: 5e pop %esi 111bbf: c9 leave 111bc0: c3 ret 111bc1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bc4: 31 c0 xor %eax,%eax } 111bc6: 5b pop %ebx 111bc7: 5e pop %esi 111bc8: c9 leave 111bc9: c3 ret 0010ff80 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 10ff80: 55 push %ebp 10ff81: 89 e5 mov %esp,%ebp 10ff83: 56 push %esi 10ff84: 53 push %ebx 10ff85: 8b 45 08 mov 0x8(%ebp),%eax 10ff88: 8b 4d 0c mov 0xc(%ebp),%ecx 10ff8b: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 10ff8e: 39 05 80 56 12 00 cmp %eax,0x125680 10ff94: 76 1e jbe 10ffb4 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 10ff96: 8d 34 40 lea (%eax,%eax,2),%esi 10ff99: 8b 15 84 56 12 00 mov 0x125684,%edx 10ff9f: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 10ffa2: 85 d2 test %edx,%edx 10ffa4: 74 1a je 10ffc0 10ffa6: 89 5d 10 mov %ebx,0x10(%ebp) 10ffa9: 89 4d 0c mov %ecx,0xc(%ebp) 10ffac: 89 45 08 mov %eax,0x8(%ebp) } 10ffaf: 5b pop %ebx 10ffb0: 5e pop %esi 10ffb1: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 10ffb2: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 10ffb4: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 10ffb9: 5b pop %ebx 10ffba: 5e pop %esi 10ffbb: c9 leave 10ffbc: c3 ret 10ffbd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 10ffc0: 31 c0 xor %eax,%eax } 10ffc2: 5b pop %ebx 10ffc3: 5e pop %esi 10ffc4: c9 leave 10ffc5: c3 ret 00111bcc : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111bcc: 55 push %ebp 111bcd: 89 e5 mov %esp,%ebp 111bcf: 56 push %esi 111bd0: 53 push %ebx 111bd1: 8b 45 08 mov 0x8(%ebp),%eax 111bd4: 8b 4d 0c mov 0xc(%ebp),%ecx 111bd7: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111bda: 39 05 80 56 12 00 cmp %eax,0x125680 111be0: 76 22 jbe 111c04 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 111be2: 8d 34 40 lea (%eax,%eax,2),%esi 111be5: 8b 15 84 56 12 00 mov 0x125684,%edx 111beb: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bef: 85 d2 test %edx,%edx 111bf1: 74 1d je 111c10 111bf3: 89 5d 10 mov %ebx,0x10(%ebp) 111bf6: 89 4d 0c mov %ecx,0xc(%ebp) 111bf9: 89 45 08 mov %eax,0x8(%ebp) } 111bfc: 5b pop %ebx 111bfd: 5e pop %esi 111bfe: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111bff: ff e2 jmp *%edx 111c01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c04: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111c09: 5b pop %ebx 111c0a: 5e pop %esi 111c0b: c9 leave 111c0c: c3 ret 111c0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c10: 31 c0 xor %eax,%eax } 111c12: 5b pop %ebx 111c13: 5e pop %esi 111c14: c9 leave 111c15: c3 ret 00111c18 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111c18: 55 push %ebp 111c19: 89 e5 mov %esp,%ebp 111c1b: 56 push %esi 111c1c: 53 push %ebx 111c1d: 8b 45 08 mov 0x8(%ebp),%eax 111c20: 8b 4d 0c mov 0xc(%ebp),%ecx 111c23: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c26: 39 05 80 56 12 00 cmp %eax,0x125680 111c2c: 76 22 jbe 111c50 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 111c2e: 8d 34 40 lea (%eax,%eax,2),%esi 111c31: 8b 15 84 56 12 00 mov 0x125684,%edx 111c37: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c3b: 85 d2 test %edx,%edx 111c3d: 74 1d je 111c5c 111c3f: 89 5d 10 mov %ebx,0x10(%ebp) 111c42: 89 4d 0c mov %ecx,0xc(%ebp) 111c45: 89 45 08 mov %eax,0x8(%ebp) } 111c48: 5b pop %ebx 111c49: 5e pop %esi 111c4a: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c4b: ff e2 jmp *%edx 111c4d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c50: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111c55: 5b pop %ebx 111c56: 5e pop %esi 111c57: c9 leave 111c58: c3 ret 111c59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c5c: 31 c0 xor %eax,%eax } 111c5e: 5b pop %ebx 111c5f: 5e pop %esi 111c60: c9 leave 111c61: c3 ret 0010d38c : 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 ) { 10d38c: 55 push %ebp 10d38d: 89 e5 mov %esp,%ebp 10d38f: 57 push %edi 10d390: 56 push %esi 10d391: 53 push %ebx 10d392: 83 ec 0c sub $0xc,%esp 10d395: 8b 5d 08 mov 0x8(%ebp),%ebx 10d398: 8b 75 0c mov 0xc(%ebp),%esi 10d39b: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d39e: a1 a0 b8 12 00 mov 0x12b8a0,%eax if ( rtems_interrupt_is_in_progress() ) 10d3a3: 8b 0d 94 b5 12 00 mov 0x12b594,%ecx 10d3a9: 85 c9 test %ecx,%ecx 10d3ab: 0f 85 ab 00 00 00 jne 10d45c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d3b1: 85 d2 test %edx,%edx 10d3b3: 0f 84 e3 00 00 00 je 10d49c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d3b9: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d3bb: 85 f6 test %esi,%esi 10d3bd: 0f 84 d9 00 00 00 je 10d49c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d3c3: 8b 3e mov (%esi),%edi 10d3c5: 85 ff test %edi,%edi 10d3c7: 0f 84 c3 00 00 00 je 10d490 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d3cd: 39 d8 cmp %ebx,%eax 10d3cf: 76 7b jbe 10d44c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d3d1: a1 f8 b4 12 00 mov 0x12b4f8,%eax 10d3d6: 40 inc %eax 10d3d7: a3 f8 b4 12 00 mov %eax,0x12b4f8 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d3dc: 85 db test %ebx,%ebx 10d3de: 0f 85 88 00 00 00 jne 10d46c static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d3e4: 8b 0d a0 b8 12 00 mov 0x12b8a0,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d3ea: 85 c9 test %ecx,%ecx 10d3ec: 0f 84 b7 00 00 00 je 10d4a9 <== ALWAYS TAKEN 10d3f2: 8b 3d a4 b8 12 00 mov 0x12b8a4,%edi 10d3f8: 89 f8 mov %edi,%eax 10d3fa: eb 08 jmp 10d404 <== ALWAYS TAKEN 10d3fc: 43 inc %ebx 10d3fd: 83 c0 18 add $0x18,%eax 10d400: 39 d9 cmp %ebx,%ecx 10d402: 76 0b jbe 10d40f static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d404: 83 38 00 cmpl $0x0,(%eax) 10d407: 75 f3 jne 10d3fc 10d409: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d40d: 75 ed jne 10d3fc if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d40f: 89 1a mov %ebx,(%edx) if ( m != n ) 10d411: 39 d9 cmp %ebx,%ecx 10d413: 0f 84 97 00 00 00 je 10d4b0 10d419: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d41c: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d41f: b9 06 00 00 00 mov $0x6,%ecx 10d424: 89 c7 mov %eax,%edi 10d426: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d428: e8 37 19 00 00 call 10ed64 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d42d: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d434: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d43b: 89 5d 08 mov %ebx,0x8(%ebp) } 10d43e: 83 c4 0c add $0xc,%esp 10d441: 5b pop %ebx 10d442: 5e pop %esi 10d443: 5f pop %edi 10d444: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d445: e9 ee 7a 00 00 jmp 114f38 <== ALWAYS TAKEN 10d44a: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d44c: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d451: 83 c4 0c add $0xc,%esp 10d454: 5b pop %ebx 10d455: 5e pop %esi 10d456: 5f pop %edi 10d457: c9 leave 10d458: c3 ret 10d459: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d45c: b8 12 00 00 00 mov $0x12,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d461: 83 c4 0c add $0xc,%esp 10d464: 5b pop %ebx 10d465: 5e pop %esi 10d466: 5f pop %edi 10d467: c9 leave 10d468: c3 ret 10d469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10d46c: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d46f: c1 e0 03 shl $0x3,%eax 10d472: 03 05 a4 b8 12 00 add 0x12b8a4,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d478: 8b 38 mov (%eax),%edi 10d47a: 85 ff test %edi,%edi 10d47c: 74 3e je 10d4bc major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 10d47e: e8 e1 18 00 00 call 10ed64 <_Thread_Enable_dispatch> 10d483: b8 0c 00 00 00 mov $0xc,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10d488: 83 c4 0c add $0xc,%esp 10d48b: 5b pop %ebx 10d48c: 5e pop %esi 10d48d: 5f pop %edi 10d48e: c9 leave 10d48f: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d490: 8b 4e 04 mov 0x4(%esi),%ecx 10d493: 85 c9 test %ecx,%ecx 10d495: 0f 85 32 ff ff ff jne 10d3cd 10d49b: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d49c: b8 09 00 00 00 mov $0x9,%eax } 10d4a1: 83 c4 0c add $0xc,%esp 10d4a4: 5b pop %ebx 10d4a5: 5e pop %esi 10d4a6: 5f pop %edi 10d4a7: c9 leave 10d4a8: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4a9: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d4af: 90 nop <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10d4b0: e8 af 18 00 00 call 10ed64 <_Thread_Enable_dispatch> 10d4b5: b8 05 00 00 00 mov $0x5,%eax return sc; 10d4ba: eb 95 jmp 10d451 <== 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; 10d4bc: 8b 48 04 mov 0x4(%eax),%ecx 10d4bf: 85 c9 test %ecx,%ecx 10d4c1: 75 bb jne 10d47e if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d4c3: 89 1a mov %ebx,(%edx) 10d4c5: e9 55 ff ff ff jmp 10d41f <== ALWAYS TAKEN 0010d4cc : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d4cc: 55 push %ebp 10d4cd: 89 e5 mov %esp,%ebp 10d4cf: 57 push %edi 10d4d0: 83 ec 04 sub $0x4,%esp 10d4d3: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d4d6: 8b 15 94 b5 12 00 mov 0x12b594,%edx 10d4dc: 85 d2 test %edx,%edx 10d4de: 75 44 jne 10d524 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d4e0: 39 05 a0 b8 12 00 cmp %eax,0x12b8a0 10d4e6: 77 0c ja 10d4f4 10d4e8: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d4ed: 5a pop %edx 10d4ee: 5f pop %edi 10d4ef: c9 leave 10d4f0: c3 ret 10d4f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d4f4: 8b 15 f8 b4 12 00 mov 0x12b4f8,%edx 10d4fa: 42 inc %edx 10d4fb: 89 15 f8 b4 12 00 mov %edx,0x12b4f8 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d501: 8d 14 40 lea (%eax,%eax,2),%edx 10d504: c1 e2 03 shl $0x3,%edx 10d507: 03 15 a4 b8 12 00 add 0x12b8a4,%edx 10d50d: b9 18 00 00 00 mov $0x18,%ecx 10d512: 31 c0 xor %eax,%eax 10d514: 89 d7 mov %edx,%edi 10d516: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d518: e8 47 18 00 00 call 10ed64 <_Thread_Enable_dispatch> 10d51d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d51f: 5a pop %edx 10d520: 5f pop %edi 10d521: c9 leave 10d522: c3 ret 10d523: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d524: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d529: 5a pop %edx 10d52a: 5f pop %edi 10d52b: c9 leave 10d52c: c3 ret 00111c64 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111c64: 55 push %ebp 111c65: 89 e5 mov %esp,%ebp 111c67: 56 push %esi 111c68: 53 push %ebx 111c69: 8b 45 08 mov 0x8(%ebp),%eax 111c6c: 8b 4d 0c mov 0xc(%ebp),%ecx 111c6f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c72: 39 05 80 56 12 00 cmp %eax,0x125680 111c78: 76 22 jbe 111c9c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 111c7a: 8d 34 40 lea (%eax,%eax,2),%esi 111c7d: 8b 15 84 56 12 00 mov 0x125684,%edx 111c83: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c87: 85 d2 test %edx,%edx 111c89: 74 1d je 111ca8 111c8b: 89 5d 10 mov %ebx,0x10(%ebp) 111c8e: 89 4d 0c mov %ecx,0xc(%ebp) 111c91: 89 45 08 mov %eax,0x8(%ebp) } 111c94: 5b pop %ebx 111c95: 5e pop %esi 111c96: c9 leave if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111c97: ff e2 jmp *%edx 111c99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111c9c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111ca1: 5b pop %ebx 111ca2: 5e pop %esi 111ca3: c9 leave 111ca4: c3 ret 111ca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( major >= _IO_Number_of_drivers ) return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111ca8: 31 c0 xor %eax,%eax } 111caa: 5b pop %ebx 111cab: 5e pop %esi 111cac: c9 leave 111cad: c3 ret 0010dca0 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10dca0: 55 push %ebp 10dca1: 89 e5 mov %esp,%ebp 10dca3: 57 push %edi 10dca4: 56 push %esi 10dca5: 53 push %ebx 10dca6: 83 ec 1c sub $0x1c,%esp 10dca9: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10dcac: 85 ff test %edi,%edi 10dcae: 74 4d je 10dcfd <== ALWAYS TAKEN 10dcb0: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10dcb7: 8b 55 e4 mov -0x1c(%ebp),%edx 10dcba: 8b 04 95 4c 01 13 00 mov 0x13014c(,%edx,4),%eax 10dcc1: 85 c0 test %eax,%eax 10dcc3: 74 2f je 10dcf4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10dcc5: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10dcc8: 85 f6 test %esi,%esi 10dcca: 74 28 je 10dcf4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dccc: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dcd1: 74 21 je 10dcf4 <== ALWAYS TAKEN 10dcd3: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dcd8: 8b 46 1c mov 0x1c(%esi),%eax 10dcdb: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10dcde: 85 c0 test %eax,%eax 10dce0: 74 09 je 10dceb <== ALWAYS TAKEN continue; (*routine)(the_thread); 10dce2: 83 ec 0c sub $0xc,%esp 10dce5: 50 push %eax 10dce6: ff d7 call *%edi 10dce8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dceb: 43 inc %ebx 10dcec: 0f b7 46 10 movzwl 0x10(%esi),%eax 10dcf0: 39 d8 cmp %ebx,%eax 10dcf2: 73 e4 jae 10dcd8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10dcf4: ff 45 e4 incl -0x1c(%ebp) 10dcf7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10dcfb: 75 ba jne 10dcb7 (*routine)(the_thread); } } } 10dcfd: 8d 65 f4 lea -0xc(%ebp),%esp 10dd00: 5b pop %ebx 10dd01: 5e pop %esi 10dd02: 5f pop %edi 10dd03: c9 leave 10dd04: c3 ret 00115f10 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 115f10: 55 push %ebp 115f11: 89 e5 mov %esp,%ebp 115f13: 57 push %edi 115f14: 56 push %esi 115f15: 53 push %ebx 115f16: 83 ec 1c sub $0x1c,%esp 115f19: 8b 7d 08 mov 0x8(%ebp),%edi 115f1c: 8b 5d 0c mov 0xc(%ebp),%ebx 115f1f: 8b 75 14 mov 0x14(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 115f22: 85 db test %ebx,%ebx 115f24: 74 62 je 115f88 return RTEMS_INVALID_ADDRESS; if ( !count ) 115f26: 85 f6 test %esi,%esi 115f28: 74 5e je 115f88 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 115f2a: 51 push %ecx 115f2b: 8d 45 e4 lea -0x1c(%ebp),%eax 115f2e: 50 push %eax 115f2f: 57 push %edi 115f30: 68 20 fa 13 00 push $0x13fa20 115f35: e8 ea 4b 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 115f3a: 83 c4 10 add $0x10,%esp 115f3d: 8b 55 e4 mov -0x1c(%ebp),%edx 115f40: 85 d2 test %edx,%edx 115f42: 74 10 je 115f54 115f44: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f49: 8d 65 f4 lea -0xc(%ebp),%esp 115f4c: 5b pop %ebx 115f4d: 5e pop %esi 115f4e: 5f pop %edi 115f4f: c9 leave 115f50: c3 ret 115f51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 115f54: 83 ec 08 sub $0x8,%esp 115f57: 56 push %esi 115f58: 6a 00 push $0x0 115f5a: 57 push %edi 115f5b: ff 75 10 pushl 0x10(%ebp) 115f5e: 53 push %ebx 115f5f: 83 c0 14 add $0x14,%eax 115f62: 50 push %eax 115f63: e8 88 34 00 00 call 1193f0 <_CORE_message_queue_Broadcast> 115f68: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 115f6a: 83 c4 20 add $0x20,%esp 115f6d: e8 62 54 00 00 call 11b3d4 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 115f72: 83 ec 0c sub $0xc,%esp 115f75: 53 push %ebx 115f76: e8 69 03 00 00 call 1162e4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN #endif count ); _Thread_Enable_dispatch(); return 115f7b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f7e: 8d 65 f4 lea -0xc(%ebp),%esp 115f81: 5b pop %ebx 115f82: 5e pop %esi 115f83: 5f pop %edi 115f84: c9 leave 115f85: c3 ret 115f86: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif count ); _Thread_Enable_dispatch(); return 115f88: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115f8d: 8d 65 f4 lea -0xc(%ebp),%esp 115f90: 5b pop %ebx 115f91: 5e pop %esi 115f92: 5f pop %edi 115f93: c9 leave 115f94: c3 ret 00113ab8 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 113ab8: 55 push %ebp 113ab9: 89 e5 mov %esp,%ebp 113abb: 57 push %edi 113abc: 56 push %esi 113abd: 53 push %ebx 113abe: 83 ec 2c sub $0x2c,%esp 113ac1: 8b 5d 08 mov 0x8(%ebp),%ebx 113ac4: 8b 75 0c mov 0xc(%ebp),%esi 113ac7: 8b 4d 10 mov 0x10(%ebp),%ecx 113aca: 8b 7d 18 mov 0x18(%ebp),%edi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113acd: 85 db test %ebx,%ebx 113acf: 74 2f je 113b00 return RTEMS_INVALID_NAME; if ( !id ) 113ad1: 85 ff test %edi,%edi 113ad3: 0f 84 a3 00 00 00 je 113b7c <== ALWAYS TAKEN if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113ad9: 85 f6 test %esi,%esi 113adb: 74 13 je 113af0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 113add: 85 c9 test %ecx,%ecx 113adf: 75 2f jne 113b10 113ae1: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113ae6: 8d 65 f4 lea -0xc(%ebp),%esp 113ae9: 5b pop %ebx 113aea: 5e pop %esi 113aeb: 5f pop %edi 113aec: c9 leave 113aed: c3 ret 113aee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 113af0: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113af5: 8d 65 f4 lea -0xc(%ebp),%esp 113af8: 5b pop %ebx 113af9: 5e pop %esi 113afa: 5f pop %edi 113afb: c9 leave 113afc: c3 ret 113afd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 113b00: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 113b05: 8d 65 f4 lea -0xc(%ebp),%esp 113b08: 5b pop %ebx 113b09: 5e pop %esi 113b0a: 5f pop %edi 113b0b: c9 leave 113b0c: c3 ret 113b0d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113b10: a1 b8 f9 12 00 mov 0x12f9b8,%eax 113b15: 40 inc %eax 113b16: a3 b8 f9 12 00 mov %eax,0x12f9b8 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113b1b: 89 4d d4 mov %ecx,-0x2c(%ebp) 113b1e: e8 35 50 00 00 call 118b58 <_Message_queue_Allocate> 113b23: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 113b25: 85 c0 test %eax,%eax 113b27: 8b 4d d4 mov -0x2c(%ebp),%ecx 113b2a: 74 7c je 113ba8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 113b2c: 8b 45 14 mov 0x14(%ebp),%eax 113b2f: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 113b32: a8 04 test $0x4,%al 113b34: 0f 95 c0 setne %al 113b37: 0f b6 c0 movzbl %al,%eax 113b3a: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 113b3d: 51 push %ecx 113b3e: 56 push %esi 113b3f: 8d 45 e4 lea -0x1c(%ebp),%eax 113b42: 50 push %eax 113b43: 8d 42 14 lea 0x14(%edx),%eax 113b46: 50 push %eax 113b47: 89 55 d4 mov %edx,-0x2c(%ebp) 113b4a: e8 a5 10 00 00 call 114bf4 <_CORE_message_queue_Initialize> 113b4f: 83 c4 10 add $0x10,%esp 113b52: 84 c0 test %al,%al 113b54: 8b 55 d4 mov -0x2c(%ebp),%edx 113b57: 75 2f jne 113b88 */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 113b59: 83 ec 08 sub $0x8,%esp 113b5c: 52 push %edx 113b5d: 68 80 fc 12 00 push $0x12fc80 113b62: e8 e1 1d 00 00 call 115948 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 113b67: e8 d4 27 00 00 call 116340 <_Thread_Enable_dispatch> 113b6c: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 113b71: 83 c4 10 add $0x10,%esp 113b74: e9 6d ff ff ff jmp 113ae6 113b79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113b7c: b8 09 00 00 00 mov $0x9,%eax 113b81: e9 60 ff ff ff jmp 113ae6 113b86: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113b88: 8b 42 08 mov 0x8(%edx),%eax 113b8b: 0f b7 f0 movzwl %ax,%esi 113b8e: 8b 0d 9c fc 12 00 mov 0x12fc9c,%ecx 113b94: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 113b97: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 113b9a: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 113b9c: e8 9f 27 00 00 call 116340 <_Thread_Enable_dispatch> 113ba1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 113ba3: e9 3e ff ff ff jmp 113ae6 <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 113ba8: e8 93 27 00 00 call 116340 <_Thread_Enable_dispatch> 113bad: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113bb2: e9 2f ff ff ff jmp 113ae6 0011711c : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 11711c: 55 push %ebp 11711d: 89 e5 mov %esp,%ebp 11711f: 53 push %ebx 117120: 83 ec 18 sub $0x18,%esp 117123: 8d 45 f4 lea -0xc(%ebp),%eax 117126: 50 push %eax 117127: ff 75 08 pushl 0x8(%ebp) 11712a: 68 80 3b 13 00 push $0x133b80 11712f: e8 3c a7 ff ff call 111870 <_Objects_Get> 117134: 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 ) { 117136: 83 c4 10 add $0x10,%esp 117139: 8b 4d f4 mov -0xc(%ebp),%ecx 11713c: 85 c9 test %ecx,%ecx 11713e: 75 3c jne 11717c case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117140: 83 ec 08 sub $0x8,%esp 117143: 50 push %eax 117144: 68 80 3b 13 00 push $0x133b80 117149: e8 ee a2 ff ff call 11143c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 11714e: 83 c4 0c add $0xc,%esp 117151: 6a 05 push $0x5 117153: 6a 00 push $0x0 117155: 8d 43 14 lea 0x14(%ebx),%eax 117158: 50 push %eax 117159: e8 0e 05 00 00 call 11766c <_CORE_message_queue_Close> */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11715e: 58 pop %eax 11715f: 5a pop %edx 117160: 53 push %ebx 117161: 68 80 3b 13 00 push $0x133b80 117166: e8 d5 a5 ff ff call 111740 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 11716b: e8 b0 af ff ff call 112120 <_Thread_Enable_dispatch> 117170: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117172: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117175: 8b 5d fc mov -0x4(%ebp),%ebx 117178: c9 leave 117179: c3 ret 11717a: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11717c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117181: 8b 5d fc mov -0x4(%ebp),%ebx 117184: c9 leave 117185: c3 ret 00116104 : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116104: 55 push %ebp 116105: 89 e5 mov %esp,%ebp 116107: 53 push %ebx 116108: 83 ec 14 sub $0x14,%esp 11610b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11610e: 85 db test %ebx,%ebx 116110: 74 46 je 116158 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116112: 51 push %ecx 116113: 8d 45 f4 lea -0xc(%ebp),%eax 116116: 50 push %eax 116117: ff 75 08 pushl 0x8(%ebp) 11611a: 68 20 fa 13 00 push $0x13fa20 11611f: e8 00 4a 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116124: 83 c4 10 add $0x10,%esp 116127: 8b 55 f4 mov -0xc(%ebp),%edx 11612a: 85 d2 test %edx,%edx 11612c: 74 0a je 116138 11612e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116133: 8b 5d fc mov -0x4(%ebp),%ebx 116136: c9 leave 116137: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 116138: 83 ec 0c sub $0xc,%esp 11613b: 83 c0 14 add $0x14,%eax 11613e: 50 push %eax 11613f: e8 6c 33 00 00 call 1194b0 <_CORE_message_queue_Flush> 116144: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116146: e8 89 52 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11614b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11614d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116150: 8b 5d fc mov -0x4(%ebp),%ebx 116153: c9 leave 116154: c3 ret 116155: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116158: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11615d: 8b 5d fc mov -0x4(%ebp),%ebx 116160: c9 leave 116161: c3 ret 00116164 : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116164: 55 push %ebp 116165: 89 e5 mov %esp,%ebp 116167: 53 push %ebx 116168: 83 ec 14 sub $0x14,%esp 11616b: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 11616e: 85 db test %ebx,%ebx 116170: 74 3a je 1161ac 116172: 51 push %ecx 116173: 8d 45 f4 lea -0xc(%ebp),%eax 116176: 50 push %eax 116177: ff 75 08 pushl 0x8(%ebp) 11617a: 68 20 fa 13 00 push $0x13fa20 11617f: e8 a0 49 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116184: 83 c4 10 add $0x10,%esp 116187: 8b 55 f4 mov -0xc(%ebp),%edx 11618a: 85 d2 test %edx,%edx 11618c: 74 0a je 116198 11618e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116193: 8b 5d fc mov -0x4(%ebp),%ebx 116196: c9 leave 116197: c3 ret the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 116198: 8b 40 5c mov 0x5c(%eax),%eax 11619b: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 11619d: e8 32 52 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1161a2: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161a4: 8b 5d fc mov -0x4(%ebp),%ebx 1161a7: c9 leave 1161a8: c3 ret 1161a9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 1161ac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1161b1: 8b 5d fc mov -0x4(%ebp),%ebx 1161b4: c9 leave 1161b5: c3 ret 00113bdc : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 113bdc: 55 push %ebp 113bdd: 89 e5 mov %esp,%ebp 113bdf: 56 push %esi 113be0: 53 push %ebx 113be1: 83 ec 10 sub $0x10,%esp 113be4: 8b 5d 0c mov 0xc(%ebp),%ebx 113be7: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 113bea: 85 db test %ebx,%ebx 113bec: 74 6e je 113c5c return RTEMS_INVALID_ADDRESS; if ( !size ) 113bee: 85 f6 test %esi,%esi 113bf0: 74 6a je 113c5c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 113bf2: 51 push %ecx 113bf3: 8d 45 f4 lea -0xc(%ebp),%eax 113bf6: 50 push %eax 113bf7: ff 75 08 pushl 0x8(%ebp) 113bfa: 68 80 fc 12 00 push $0x12fc80 113bff: e8 74 1e 00 00 call 115a78 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113c04: 83 c4 10 add $0x10,%esp 113c07: 8b 55 f4 mov -0xc(%ebp),%edx 113c0a: 85 d2 test %edx,%edx 113c0c: 75 42 jne 113c50 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 113c0e: 83 ec 08 sub $0x8,%esp 113c11: ff 75 18 pushl 0x18(%ebp) 113c14: 8b 55 14 mov 0x14(%ebp),%edx 113c17: 83 e2 01 and $0x1,%edx 113c1a: 83 f2 01 xor $0x1,%edx 113c1d: 52 push %edx 113c1e: 56 push %esi 113c1f: 53 push %ebx 113c20: ff 70 08 pushl 0x8(%eax) 113c23: 83 c0 14 add $0x14,%eax 113c26: 50 push %eax 113c27: e8 78 10 00 00 call 114ca4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113c2c: 83 c4 20 add $0x20,%esp 113c2f: e8 0c 27 00 00 call 116340 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113c34: 83 ec 0c sub $0xc,%esp 113c37: a1 78 fa 12 00 mov 0x12fa78,%eax 113c3c: ff 70 34 pushl 0x34(%eax) 113c3f: e8 a0 00 00 00 call 113ce4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 113c44: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c47: 8d 65 f8 lea -0x8(%ebp),%esp 113c4a: 5b pop %ebx 113c4b: 5e pop %esi 113c4c: c9 leave 113c4d: c3 ret 113c4e: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 113c50: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c55: 8d 65 f8 lea -0x8(%ebp),%esp 113c58: 5b pop %ebx 113c59: 5e pop %esi 113c5a: c9 leave 113c5b: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 113c5c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 113c61: 8d 65 f8 lea -0x8(%ebp),%esp 113c64: 5b pop %ebx 113c65: 5e pop %esi 113c66: c9 leave 113c67: c3 ret 0010b25c : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b25c: 55 push %ebp 10b25d: 89 e5 mov %esp,%ebp 10b25f: 56 push %esi 10b260: 53 push %ebx 10b261: 83 ec 10 sub $0x10,%esp 10b264: 8b 75 08 mov 0x8(%ebp),%esi 10b267: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b26a: 85 db test %ebx,%ebx 10b26c: 74 5e je 10b2cc RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b26e: 51 push %ecx 10b26f: 8d 45 f4 lea -0xc(%ebp),%eax 10b272: 50 push %eax 10b273: 56 push %esi 10b274: 68 00 56 12 00 push $0x125600 10b279: e8 f2 18 00 00 call 10cb70 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b27e: 83 c4 10 add $0x10,%esp 10b281: 8b 55 f4 mov -0xc(%ebp),%edx 10b284: 85 d2 test %edx,%edx 10b286: 74 0c je 10b294 10b288: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b28d: 8d 65 f8 lea -0x8(%ebp),%esp 10b290: 5b pop %ebx 10b291: 5e pop %esi 10b292: c9 leave 10b293: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b294: 6a 00 push $0x0 10b296: 6a 00 push $0x0 10b298: 68 ff ff ff 7f push $0x7fffffff 10b29d: 6a 00 push $0x0 10b29f: 56 push %esi 10b2a0: ff 75 10 pushl 0x10(%ebp) 10b2a3: 53 push %ebx 10b2a4: 83 c0 14 add $0x14,%eax 10b2a7: 50 push %eax 10b2a8: e8 c7 0b 00 00 call 10be74 <_CORE_message_queue_Submit> 10b2ad: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b2af: 83 c4 20 add $0x20,%esp 10b2b2: e8 01 21 00 00 call 10d3b8 <_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); 10b2b7: 83 ec 0c sub $0xc,%esp 10b2ba: 53 push %ebx 10b2bb: e8 18 00 00 00 call 10b2d8 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10b2c0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2c3: 8d 65 f8 lea -0x8(%ebp),%esp 10b2c6: 5b pop %ebx 10b2c7: 5e pop %esi 10b2c8: c9 leave 10b2c9: c3 ret 10b2ca: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b2cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b2d1: 8d 65 f8 lea -0x8(%ebp),%esp 10b2d4: 5b pop %ebx 10b2d5: 5e pop %esi 10b2d6: c9 leave 10b2d7: c3 ret 001162f4 : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 1162f4: 55 push %ebp 1162f5: 89 e5 mov %esp,%ebp 1162f7: 56 push %esi 1162f8: 53 push %ebx 1162f9: 83 ec 10 sub $0x10,%esp 1162fc: 8b 75 08 mov 0x8(%ebp),%esi 1162ff: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116302: 85 db test %ebx,%ebx 116304: 74 5e je 116364 116306: 51 push %ecx 116307: 8d 45 f4 lea -0xc(%ebp),%eax 11630a: 50 push %eax 11630b: 56 push %esi 11630c: 68 20 fa 13 00 push $0x13fa20 116311: e8 0e 48 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116316: 83 c4 10 add $0x10,%esp 116319: 8b 55 f4 mov -0xc(%ebp),%edx 11631c: 85 d2 test %edx,%edx 11631e: 74 0c je 11632c 116320: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116325: 8d 65 f8 lea -0x8(%ebp),%esp 116328: 5b pop %ebx 116329: 5e pop %esi 11632a: c9 leave 11632b: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 11632c: 6a 00 push $0x0 11632e: 6a 00 push $0x0 116330: 68 00 00 00 80 push $0x80000000 116335: 6a 00 push $0x0 116337: 56 push %esi 116338: ff 75 10 pushl 0x10(%ebp) 11633b: 53 push %ebx 11633c: 83 c0 14 add $0x14,%eax 11633f: 50 push %eax 116340: e8 5b 33 00 00 call 1196a0 <_CORE_message_queue_Submit> 116345: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 116347: 83 c4 20 add $0x20,%esp 11634a: e8 85 50 00 00 call 11b3d4 <_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); 11634f: 83 ec 0c sub $0xc,%esp 116352: 53 push %ebx 116353: e8 8c ff ff ff call 1162e4 <_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 116358: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11635b: 8d 65 f8 lea -0x8(%ebp),%esp 11635e: 5b pop %ebx 11635f: 5e pop %esi 116360: c9 leave 116361: c3 ret 116362: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 116364: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116369: 8d 65 f8 lea -0x8(%ebp),%esp 11636c: 5b pop %ebx 11636d: 5e pop %esi 11636e: c9 leave 11636f: c3 ret 0010cc7c : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10cc7c: 55 push %ebp 10cc7d: 89 e5 mov %esp,%ebp 10cc7f: 83 ec 08 sub $0x8,%esp 10cc82: 8b 45 08 mov 0x8(%ebp),%eax const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10cc85: 83 f8 01 cmp $0x1,%eax 10cc88: 74 2a je 10ccb4 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10cc8a: 83 f8 02 cmp $0x2,%eax 10cc8d: 74 09 je 10cc98 10cc8f: b8 19 2c 12 00 mov $0x122c19,%eax return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 10cc94: c9 leave 10cc95: c3 ret 10cc96: 66 90 xchg %ax,%ax <== NOT EXECUTED const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10cc98: b8 40 70 12 00 mov $0x127040,%eax else if ( the_api == OBJECTS_ITRON_API ) api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 10cc9d: 83 ec 08 sub $0x8,%esp 10cca0: ff 75 0c pushl 0xc(%ebp) 10cca3: 50 push %eax 10cca4: e8 9b 48 00 00 call 111544 if ( class_assoc ) 10cca9: 83 c4 10 add $0x10,%esp 10ccac: 85 c0 test %eax,%eax 10ccae: 74 0c je 10ccbc return class_assoc->name; 10ccb0: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10ccb2: c9 leave 10ccb3: c3 ret ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10ccb4: b8 20 70 12 00 mov $0x127020,%eax 10ccb9: eb e2 jmp 10cc9d <== ALWAYS TAKEN 10ccbb: 90 nop <== NOT EXECUTED api_assoc = rtems_object_api_itron_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 10ccbc: b8 21 2c 12 00 mov $0x122c21,%eax return class_assoc->name; return "BAD CLASS"; } 10ccc1: c9 leave 10ccc2: c3 ret 0010ccc4 : }; const char *rtems_object_get_api_name( int api ) { 10ccc4: 55 push %ebp 10ccc5: 89 e5 mov %esp,%ebp 10ccc7: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10ccca: ff 75 08 pushl 0x8(%ebp) 10cccd: 68 c0 70 12 00 push $0x1270c0 10ccd2: e8 6d 48 00 00 call 111544 if ( api_assoc ) 10ccd7: 83 c4 10 add $0x10,%esp 10ccda: 85 c0 test %eax,%eax 10ccdc: 74 06 je 10cce4 return api_assoc->name; 10ccde: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10cce0: c9 leave 10cce1: c3 ret 10cce2: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); if ( api_assoc ) 10cce4: b8 21 2c 12 00 mov $0x122c21,%eax return api_assoc->name; return "BAD CLASS"; } 10cce9: c9 leave 10ccea: c3 ret 0010cd2c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cd2c: 55 push %ebp 10cd2d: 89 e5 mov %esp,%ebp 10cd2f: 57 push %edi 10cd30: 56 push %esi 10cd31: 53 push %ebx 10cd32: 83 ec 0c sub $0xc,%esp 10cd35: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd38: 85 db test %ebx,%ebx 10cd3a: 74 5c je 10cd98 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cd3c: 83 ec 08 sub $0x8,%esp 10cd3f: ff 75 0c pushl 0xc(%ebp) 10cd42: ff 75 08 pushl 0x8(%ebp) 10cd45: e8 d2 19 00 00 call 10e71c <_Objects_Get_information> if ( !obj_info ) 10cd4a: 83 c4 10 add $0x10,%esp 10cd4d: 85 c0 test %eax,%eax 10cd4f: 74 57 je 10cda8 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cd51: 8b 50 08 mov 0x8(%eax),%edx 10cd54: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cd56: 8b 50 0c mov 0xc(%eax),%edx 10cd59: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cd5c: 8a 50 12 mov 0x12(%eax),%dl 10cd5f: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cd62: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cd66: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cd69: 85 f6 test %esi,%esi 10cd6b: 74 3f je 10cdac <== ALWAYS TAKEN 10cd6d: 8b 78 1c mov 0x1c(%eax),%edi 10cd70: b9 01 00 00 00 mov $0x1,%ecx 10cd75: b8 01 00 00 00 mov $0x1,%eax 10cd7a: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cd7c: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cd80: 83 d2 00 adc $0x0,%edx info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cd83: 40 inc %eax 10cd84: 89 c1 mov %eax,%ecx 10cd86: 39 c6 cmp %eax,%esi 10cd88: 73 f2 jae 10cd7c if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cd8a: 89 53 10 mov %edx,0x10(%ebx) 10cd8d: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10cd8f: 8d 65 f4 lea -0xc(%ebp),%esp 10cd92: 5b pop %ebx 10cd93: 5e pop %esi 10cd94: 5f pop %edi 10cd95: c9 leave 10cd96: c3 ret 10cd97: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd98: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cd9d: 8d 65 f4 lea -0xc(%ebp),%esp 10cda0: 5b pop %ebx 10cda1: 5e pop %esi 10cda2: 5f pop %edi 10cda3: c9 leave 10cda4: c3 ret 10cda5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) 10cda8: b0 0a mov $0xa,%al 10cdaa: eb e3 jmp 10cd8f <== ALWAYS TAKEN 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++ ) 10cdac: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cdae: eb da jmp 10cd8a <== NOT EXECUTED 0010fca0 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10fca0: 55 push %ebp 10fca1: 89 e5 mov %esp,%ebp 10fca3: 53 push %ebx 10fca4: 83 ec 14 sub $0x14,%esp 10fca7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcaa: 85 db test %ebx,%ebx 10fcac: 74 26 je 10fcd4 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10fcae: 83 ec 08 sub $0x8,%esp 10fcb1: 8d 45 f4 lea -0xc(%ebp),%eax 10fcb4: 50 push %eax 10fcb5: ff 75 08 pushl 0x8(%ebp) 10fcb8: e8 1b 1c 00 00 call 1118d8 <_Objects_Id_to_name> *name = name_u.name_u32; 10fcbd: 8b 55 f4 mov -0xc(%ebp),%edx 10fcc0: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10fcc2: 8b 04 85 ac aa 12 00 mov 0x12aaac(,%eax,4),%eax 10fcc9: 83 c4 10 add $0x10,%esp } 10fccc: 8b 5d fc mov -0x4(%ebp),%ebx 10fccf: c9 leave 10fcd0: c3 ret 10fcd1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10fcd4: b8 09 00 00 00 mov $0x9,%eax status = _Objects_Id_to_name( id, &name_u ); *name = name_u.name_u32; return _Status_Object_name_errors_to_status[ status ]; } 10fcd9: 8b 5d fc mov -0x4(%ebp),%ebx 10fcdc: c9 leave 10fcdd: c3 ret 0010ce08 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10ce08: 55 push %ebp 10ce09: 89 e5 mov %esp,%ebp 10ce0b: 57 push %edi 10ce0c: 56 push %esi 10ce0d: 53 push %ebx 10ce0e: 83 ec 1c sub $0x1c,%esp 10ce11: 8b 75 08 mov 0x8(%ebp),%esi 10ce14: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10ce17: 85 ff test %edi,%edi 10ce19: 74 61 je 10ce7c return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ce1b: 85 f6 test %esi,%esi 10ce1d: 74 35 je 10ce54 information = _Objects_Get_information_id( tmpId ); 10ce1f: 83 ec 0c sub $0xc,%esp 10ce22: 56 push %esi 10ce23: e8 d4 18 00 00 call 10e6fc <_Objects_Get_information_id> 10ce28: 89 c3 mov %eax,%ebx if ( !information ) 10ce2a: 83 c4 10 add $0x10,%esp 10ce2d: 85 c0 test %eax,%eax 10ce2f: 74 16 je 10ce47 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10ce31: 50 push %eax 10ce32: 8d 45 e4 lea -0x1c(%ebp),%eax 10ce35: 50 push %eax 10ce36: 56 push %esi 10ce37: 53 push %ebx 10ce38: e8 43 1a 00 00 call 10e880 <_Objects_Get> switch ( location ) { 10ce3d: 83 c4 10 add $0x10,%esp 10ce40: 8b 4d e4 mov -0x1c(%ebp),%ecx 10ce43: 85 c9 test %ecx,%ecx 10ce45: 74 19 je 10ce60 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ce47: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ce4c: 8d 65 f4 lea -0xc(%ebp),%esp 10ce4f: 5b pop %ebx 10ce50: 5e pop %esi 10ce51: 5f pop %edi 10ce52: c9 leave 10ce53: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ce54: a1 18 95 12 00 mov 0x129518,%eax 10ce59: 8b 70 08 mov 0x8(%eax),%esi 10ce5c: eb c1 jmp 10ce1f <== ALWAYS TAKEN 10ce5e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10ce60: 52 push %edx 10ce61: 57 push %edi 10ce62: 50 push %eax 10ce63: 53 push %ebx 10ce64: e8 4f 1c 00 00 call 10eab8 <_Objects_Set_name> _Thread_Enable_dispatch(); 10ce69: e8 42 23 00 00 call 10f1b0 <_Thread_Enable_dispatch> 10ce6e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10ce70: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ce73: 8d 65 f4 lea -0xc(%ebp),%esp 10ce76: 5b pop %ebx 10ce77: 5e pop %esi 10ce78: 5f pop %edi 10ce79: c9 leave 10ce7a: c3 ret 10ce7b: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10ce7c: b8 09 00 00 00 mov $0x9,%eax 10ce81: eb c9 jmp 10ce4c <== ALWAYS TAKEN 00116370 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 116370: 55 push %ebp 116371: 89 e5 mov %esp,%ebp 116373: 57 push %edi 116374: 56 push %esi 116375: 53 push %ebx 116376: 83 ec 1c sub $0x1c,%esp 116379: 8b 5d 08 mov 0x8(%ebp),%ebx 11637c: 8b 75 0c mov 0xc(%ebp),%esi 11637f: 8b 55 10 mov 0x10(%ebp),%edx 116382: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 116385: 85 db test %ebx,%ebx 116387: 74 47 je 1163d0 return RTEMS_INVALID_NAME; if ( !starting_address ) 116389: 85 f6 test %esi,%esi 11638b: 74 23 je 1163b0 return RTEMS_INVALID_ADDRESS; if ( !id ) 11638d: 8b 45 1c mov 0x1c(%ebp),%eax 116390: 85 c0 test %eax,%eax 116392: 74 1c je 1163b0 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 116394: 85 d2 test %edx,%edx 116396: 74 28 je 1163c0 116398: 85 ff test %edi,%edi 11639a: 74 24 je 1163c0 11639c: 39 fa cmp %edi,%edx 11639e: 72 20 jb 1163c0 1163a0: f7 c7 03 00 00 00 test $0x3,%edi 1163a6: 75 18 jne 1163c0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 1163a8: f7 c6 03 00 00 00 test $0x3,%esi 1163ae: 74 30 je 1163e0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163b0: b8 09 00 00 00 mov $0x9,%eax } 1163b5: 8d 65 f4 lea -0xc(%ebp),%esp 1163b8: 5b pop %ebx 1163b9: 5e pop %esi 1163ba: 5f pop %edi 1163bb: c9 leave 1163bc: c3 ret 1163bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1163c0: b8 08 00 00 00 mov $0x8,%eax } 1163c5: 8d 65 f4 lea -0xc(%ebp),%esp 1163c8: 5b pop %ebx 1163c9: 5e pop %esi 1163ca: 5f pop %edi 1163cb: c9 leave 1163cc: c3 ret 1163cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1163d0: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1163d5: 8d 65 f4 lea -0xc(%ebp),%esp 1163d8: 5b pop %ebx 1163d9: 5e pop %esi 1163da: 5f pop %edi 1163db: c9 leave 1163dc: c3 ret 1163dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1163e0: a1 58 f7 13 00 mov 0x13f758,%eax 1163e5: 40 inc %eax 1163e6: a3 58 f7 13 00 mov %eax,0x13f758 * 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 ); 1163eb: 83 ec 0c sub $0xc,%esp 1163ee: 68 e0 f5 13 00 push $0x13f5e0 1163f3: 89 55 e0 mov %edx,-0x20(%ebp) 1163f6: e8 3d 42 00 00 call 11a638 <_Objects_Allocate> 1163fb: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1163fe: 83 c4 10 add $0x10,%esp 116401: 85 c0 test %eax,%eax 116403: 8b 55 e0 mov -0x20(%ebp),%edx 116406: 74 58 je 116460 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 116408: 8b 45 e4 mov -0x1c(%ebp),%eax 11640b: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11640e: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 116411: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 116414: 8b 4d 18 mov 0x18(%ebp),%ecx 116417: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 11641a: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 116421: 57 push %edi 116422: 89 d0 mov %edx,%eax 116424: 31 d2 xor %edx,%edx 116426: f7 f7 div %edi 116428: 50 push %eax 116429: 56 push %esi 11642a: 8b 45 e4 mov -0x1c(%ebp),%eax 11642d: 83 c0 24 add $0x24,%eax 116430: 50 push %eax 116431: e8 7a 2f 00 00 call 1193b0 <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116436: 8b 7d e4 mov -0x1c(%ebp),%edi 116439: 8b 47 08 mov 0x8(%edi),%eax 11643c: 0f b7 f0 movzwl %ax,%esi 11643f: 8b 15 fc f5 13 00 mov 0x13f5fc,%edx 116445: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116448: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 11644b: 8b 55 1c mov 0x1c(%ebp),%edx 11644e: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 116450: e8 7f 4f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 116455: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116457: 83 c4 10 add $0x10,%esp 11645a: e9 66 ff ff ff jmp 1163c5 <== ALWAYS TAKEN 11645f: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 116460: e8 6f 4f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 116465: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 11646a: e9 56 ff ff ff jmp 1163c5 <== ALWAYS TAKEN 00116470 : */ rtems_status_code rtems_partition_delete( rtems_id id ) { 116470: 55 push %ebp 116471: 89 e5 mov %esp,%ebp 116473: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 116476: 8d 45 f4 lea -0xc(%ebp),%eax 116479: 50 push %eax 11647a: ff 75 08 pushl 0x8(%ebp) 11647d: 68 e0 f5 13 00 push $0x13f5e0 116482: e8 9d 46 00 00 call 11ab24 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116487: 83 c4 10 add $0x10,%esp 11648a: 8b 55 f4 mov -0xc(%ebp),%edx 11648d: 85 d2 test %edx,%edx 11648f: 74 07 je 116498 116491: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116496: c9 leave 116497: c3 ret the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 116498: 8b 48 20 mov 0x20(%eax),%ecx 11649b: 85 c9 test %ecx,%ecx 11649d: 74 0d je 1164ac #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11649f: e8 30 4f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1164a4: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164a9: c9 leave 1164aa: c3 ret 1164ab: 90 nop <== NOT EXECUTED the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); 1164ac: 83 ec 08 sub $0x8,%esp 1164af: 50 push %eax 1164b0: 68 e0 f5 13 00 push $0x13f5e0 1164b5: 89 45 e4 mov %eax,-0x1c(%ebp) 1164b8: e8 f7 41 00 00 call 11a6b4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 1164bd: 58 pop %eax 1164be: 5a pop %edx 1164bf: 8b 45 e4 mov -0x1c(%ebp),%eax 1164c2: 50 push %eax 1164c3: 68 e0 f5 13 00 push $0x13f5e0 1164c8: e8 eb 44 00 00 call 11a9b8 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 1164cd: e8 02 4f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1164d2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1164d4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1164d7: c9 leave 1164d8: c3 ret 001164dc : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 1164dc: 55 push %ebp 1164dd: 89 e5 mov %esp,%ebp 1164df: 56 push %esi 1164e0: 53 push %ebx 1164e1: 83 ec 20 sub $0x20,%esp 1164e4: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1164e7: 85 db test %ebx,%ebx 1164e9: 74 59 je 116544 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1164eb: 52 push %edx 1164ec: 8d 45 f4 lea -0xc(%ebp),%eax 1164ef: 50 push %eax 1164f0: ff 75 08 pushl 0x8(%ebp) 1164f3: 68 e0 f5 13 00 push $0x13f5e0 1164f8: e8 27 46 00 00 call 11ab24 <_Objects_Get> 1164fd: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1164ff: 83 c4 10 add $0x10,%esp 116502: 8b 45 f4 mov -0xc(%ebp),%eax 116505: 85 c0 test %eax,%eax 116507: 75 2f jne 116538 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 116509: 83 ec 0c sub $0xc,%esp 11650c: 8d 46 24 lea 0x24(%esi),%eax 11650f: 50 push %eax 116510: e8 77 2e 00 00 call 11938c <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 116515: 83 c4 10 add $0x10,%esp 116518: 85 c0 test %eax,%eax 11651a: 74 34 je 116550 the_partition->number_of_used_blocks += 1; 11651c: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 11651f: 89 45 e4 mov %eax,-0x1c(%ebp) 116522: e8 ad 4e 00 00 call 11b3d4 <_Thread_Enable_dispatch> *buffer = the_buffer; 116527: 8b 45 e4 mov -0x1c(%ebp),%eax 11652a: 89 03 mov %eax,(%ebx) 11652c: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11652e: 8d 65 f8 lea -0x8(%ebp),%esp 116531: 5b pop %ebx 116532: 5e pop %esi 116533: c9 leave 116534: c3 ret 116535: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 116538: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11653d: 8d 65 f8 lea -0x8(%ebp),%esp 116540: 5b pop %ebx 116541: 5e pop %esi 116542: c9 leave 116543: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 116544: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116549: 8d 65 f8 lea -0x8(%ebp),%esp 11654c: 5b pop %ebx 11654d: 5e pop %esi 11654e: c9 leave 11654f: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 116550: e8 7f 4e 00 00 call 11b3d4 <_Thread_Enable_dispatch> 116555: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 11655a: eb e1 jmp 11653d <== ALWAYS TAKEN 00116580 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 116580: 55 push %ebp 116581: 89 e5 mov %esp,%ebp 116583: 56 push %esi 116584: 53 push %ebx 116585: 83 ec 14 sub $0x14,%esp 116588: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 11658b: 8d 45 f4 lea -0xc(%ebp),%eax 11658e: 50 push %eax 11658f: ff 75 08 pushl 0x8(%ebp) 116592: 68 e0 f5 13 00 push $0x13f5e0 116597: e8 88 45 00 00 call 11ab24 <_Objects_Get> 11659c: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 11659e: 83 c4 10 add $0x10,%esp 1165a1: 8b 45 f4 mov -0xc(%ebp),%eax 1165a4: 85 c0 test %eax,%eax 1165a6: 74 0c je 1165b4 1165a8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ad: 8d 65 f8 lea -0x8(%ebp),%esp 1165b0: 5b pop %ebx 1165b1: 5e pop %esi 1165b2: c9 leave 1165b3: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 1165b4: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 1165b7: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 1165ba: 39 c6 cmp %eax,%esi 1165bc: 72 3a jb 1165f8 1165be: 8d 14 10 lea (%eax,%edx,1),%edx 1165c1: 39 d6 cmp %edx,%esi 1165c3: 77 33 ja 1165f8 <== ALWAYS TAKEN return ( 1165c5: 89 f2 mov %esi,%edx 1165c7: 29 c2 sub %eax,%edx 1165c9: 89 d0 mov %edx,%eax 1165cb: 31 d2 xor %edx,%edx 1165cd: f7 73 18 divl 0x18(%ebx) 1165d0: 85 d2 test %edx,%edx 1165d2: 75 24 jne 1165f8 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 1165d4: 83 ec 08 sub $0x8,%esp 1165d7: 56 push %esi 1165d8: 8d 43 24 lea 0x24(%ebx),%eax 1165db: 50 push %eax 1165dc: e8 87 2d 00 00 call 119368 <_Chain_Append> <== ALWAYS TAKEN switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 1165e1: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 1165e4: e8 eb 4d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1165e9: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1165eb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1165ee: 8d 65 f8 lea -0x8(%ebp),%esp 1165f1: 5b pop %ebx 1165f2: 5e pop %esi 1165f3: c9 leave 1165f4: c3 ret 1165f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1165f8: e8 d7 4d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1165fd: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116602: 8d 65 f8 lea -0x8(%ebp),%esp 116605: 5b pop %ebx 116606: 5e pop %esi 116607: c9 leave 116608: c3 ret 001159a8 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 1159a8: 55 push %ebp 1159a9: 89 e5 mov %esp,%ebp 1159ab: 57 push %edi 1159ac: 56 push %esi 1159ad: 53 push %ebx 1159ae: 83 ec 1c sub $0x1c,%esp 1159b1: 8b 5d 08 mov 0x8(%ebp),%ebx 1159b4: 8b 55 0c mov 0xc(%ebp),%edx 1159b7: 8b 7d 10 mov 0x10(%ebp),%edi 1159ba: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159bd: 85 db test %ebx,%ebx 1159bf: 74 1b je 1159dc return RTEMS_INVALID_NAME; if ( !id ) 1159c1: 85 f6 test %esi,%esi 1159c3: 74 08 je 1159cd return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 1159c5: 89 f8 mov %edi,%eax 1159c7: 09 d0 or %edx,%eax 1159c9: a8 03 test $0x3,%al 1159cb: 74 1f je 1159ec (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1159cd: b8 09 00 00 00 mov $0x9,%eax } 1159d2: 8d 65 f4 lea -0xc(%ebp),%esp 1159d5: 5b pop %ebx 1159d6: 5e pop %esi 1159d7: 5f pop %edi 1159d8: c9 leave 1159d9: c3 ret 1159da: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 1159dc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1159e1: 8d 65 f4 lea -0xc(%ebp),%esp 1159e4: 5b pop %ebx 1159e5: 5e pop %esi 1159e6: 5f pop %edi 1159e7: c9 leave 1159e8: c3 ret 1159e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1159ec: a1 58 f7 13 00 mov 0x13f758,%eax 1159f1: 40 inc %eax 1159f2: a3 58 f7 13 00 mov %eax,0x13f758 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 1159f7: 83 ec 0c sub $0xc,%esp 1159fa: 68 a0 f5 13 00 push $0x13f5a0 1159ff: 89 55 e4 mov %edx,-0x1c(%ebp) 115a02: e8 31 4c 00 00 call 11a638 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 115a07: 83 c4 10 add $0x10,%esp 115a0a: 85 c0 test %eax,%eax 115a0c: 8b 55 e4 mov -0x1c(%ebp),%edx 115a0f: 74 33 je 115a44 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 115a11: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 115a14: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 115a17: 8b 55 14 mov 0x14(%ebp),%edx 115a1a: 4a dec %edx 115a1b: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115a1e: 8b 50 08 mov 0x8(%eax),%edx 115a21: 0f b7 fa movzwl %dx,%edi 115a24: 8b 0d bc f5 13 00 mov 0x13f5bc,%ecx 115a2a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 115a2d: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 115a30: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 115a32: e8 9d 59 00 00 call 11b3d4 <_Thread_Enable_dispatch> 115a37: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 115a39: 8d 65 f4 lea -0xc(%ebp),%esp 115a3c: 5b pop %ebx 115a3d: 5e pop %esi 115a3e: 5f pop %edi 115a3f: c9 leave 115a40: c3 ret 115a41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); 115a44: e8 8b 59 00 00 call 11b3d4 <_Thread_Enable_dispatch> 115a49: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 115a4e: eb 82 jmp 1159d2 <== ALWAYS TAKEN 00115a50 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 115a50: 55 push %ebp 115a51: 89 e5 mov %esp,%ebp 115a53: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115a56: 8d 45 f4 lea -0xc(%ebp),%eax 115a59: 50 push %eax 115a5a: ff 75 08 pushl 0x8(%ebp) 115a5d: 68 a0 f5 13 00 push $0x13f5a0 115a62: e8 bd 50 00 00 call 11ab24 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115a67: 83 c4 10 add $0x10,%esp 115a6a: 8b 4d f4 mov -0xc(%ebp),%ecx 115a6d: 85 c9 test %ecx,%ecx 115a6f: 75 2f jne 115aa0 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 115a71: 83 ec 08 sub $0x8,%esp 115a74: 50 push %eax 115a75: 68 a0 f5 13 00 push $0x13f5a0 115a7a: 89 45 e4 mov %eax,-0x1c(%ebp) 115a7d: e8 32 4c 00 00 call 11a6b4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 115a82: 58 pop %eax 115a83: 5a pop %edx 115a84: 8b 45 e4 mov -0x1c(%ebp),%eax 115a87: 50 push %eax 115a88: 68 a0 f5 13 00 push $0x13f5a0 115a8d: e8 26 4f 00 00 call 11a9b8 <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115a92: e8 3d 59 00 00 call 11b3d4 <_Thread_Enable_dispatch> 115a97: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 115a99: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115a9c: c9 leave 115a9d: c3 ret 115a9e: 66 90 xchg %ax,%ax <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115aa0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115aa5: c9 leave 115aa6: c3 ret 00115aa8 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 115aa8: 55 push %ebp 115aa9: 89 e5 mov %esp,%ebp 115aab: 56 push %esi 115aac: 53 push %ebx 115aad: 83 ec 10 sub $0x10,%esp 115ab0: 8b 75 0c mov 0xc(%ebp),%esi 115ab3: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115ab6: 85 db test %ebx,%ebx 115ab8: 74 4e je 115b08 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 115aba: 51 push %ecx 115abb: 8d 45 f4 lea -0xc(%ebp),%eax 115abe: 50 push %eax 115abf: ff 75 08 pushl 0x8(%ebp) 115ac2: 68 a0 f5 13 00 push $0x13f5a0 115ac7: e8 58 50 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115acc: 83 c4 10 add $0x10,%esp 115acf: 8b 55 f4 mov -0xc(%ebp),%edx 115ad2: 85 d2 test %edx,%edx 115ad4: 74 0e je 115ae4 115ad6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115adb: 8d 65 f8 lea -0x8(%ebp),%esp 115ade: 5b pop %ebx 115adf: 5e pop %esi 115ae0: c9 leave 115ae1: c3 ret 115ae2: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 115ae4: 89 f2 mov %esi,%edx 115ae6: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 115ae9: 3b 50 18 cmp 0x18(%eax),%edx 115aec: 77 16 ja 115b04 *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 115aee: 03 50 10 add 0x10(%eax),%edx 115af1: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115af3: e8 dc 58 00 00 call 11b3d4 <_Thread_Enable_dispatch> 115af8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115afa: 8d 65 f8 lea -0x8(%ebp),%esp 115afd: 5b pop %ebx 115afe: 5e pop %esi 115aff: c9 leave 115b00: c3 ret 115b01: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) *internal = external; 115b04: 89 33 mov %esi,(%ebx) 115b06: eb eb jmp 115af3 <== ALWAYS TAKEN { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 115b08: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b0d: 8d 65 f8 lea -0x8(%ebp),%esp 115b10: 5b pop %ebx 115b11: 5e pop %esi 115b12: c9 leave 115b13: c3 ret 00115b38 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 115b38: 55 push %ebp 115b39: 89 e5 mov %esp,%ebp 115b3b: 56 push %esi 115b3c: 53 push %ebx 115b3d: 83 ec 10 sub $0x10,%esp 115b40: 8b 75 0c mov 0xc(%ebp),%esi 115b43: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b46: 85 db test %ebx,%ebx 115b48: 74 4e je 115b98 115b4a: 51 push %ecx 115b4b: 8d 45 f4 lea -0xc(%ebp),%eax 115b4e: 50 push %eax 115b4f: ff 75 08 pushl 0x8(%ebp) 115b52: 68 a0 f5 13 00 push $0x13f5a0 115b57: e8 c8 4f 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 115b5c: 83 c4 10 add $0x10,%esp 115b5f: 8b 55 f4 mov -0xc(%ebp),%edx 115b62: 85 d2 test %edx,%edx 115b64: 74 0e je 115b74 115b66: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b6b: 8d 65 f8 lea -0x8(%ebp),%esp 115b6e: 5b pop %ebx 115b6f: 5e pop %esi 115b70: c9 leave 115b71: c3 ret 115b72: 66 90 xchg %ax,%ax <== NOT EXECUTED the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 115b74: 89 f2 mov %esi,%edx 115b76: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 115b79: 3b 50 18 cmp 0x18(%eax),%edx 115b7c: 77 16 ja 115b94 *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 115b7e: 03 50 14 add 0x14(%eax),%edx 115b81: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 115b83: e8 4c 58 00 00 call 11b3d4 <_Thread_Enable_dispatch> 115b88: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b8a: 8d 65 f8 lea -0x8(%ebp),%esp 115b8d: 5b pop %ebx 115b8e: 5e pop %esi 115b8f: c9 leave 115b90: c3 ret 115b91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) *external = internal; 115b94: 89 33 mov %esi,(%ebx) 115b96: eb eb jmp 115b83 <== ALWAYS TAKEN { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 115b98: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115b9d: 8d 65 f8 lea -0x8(%ebp),%esp 115ba0: 5b pop %ebx 115ba1: 5e pop %esi 115ba2: c9 leave 115ba3: c3 ret 0011660c : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 11660c: 55 push %ebp 11660d: 89 e5 mov %esp,%ebp 11660f: 53 push %ebx 116610: 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 *) 116613: 8d 45 f4 lea -0xc(%ebp),%eax 116616: 50 push %eax 116617: ff 75 08 pushl 0x8(%ebp) 11661a: 68 20 f6 13 00 push $0x13f620 11661f: e8 00 45 00 00 call 11ab24 <_Objects_Get> 116624: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 116626: 83 c4 10 add $0x10,%esp 116629: 8b 45 f4 mov -0xc(%ebp),%eax 11662c: 85 c0 test %eax,%eax 11662e: 74 0c je 11663c 116630: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116635: 8b 5d fc mov -0x4(%ebp),%ebx 116638: c9 leave 116639: c3 ret 11663a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 11663c: 8b 43 40 mov 0x40(%ebx),%eax 11663f: 3b 05 18 f8 13 00 cmp 0x13f818,%eax 116645: 74 11 je 116658 _Thread_Enable_dispatch(); 116647: e8 88 4d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11664c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116651: 8b 5d fc mov -0x4(%ebp),%ebx 116654: c9 leave 116655: c3 ret 116656: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); 116658: 83 ec 0c sub $0xc,%esp 11665b: 8d 43 10 lea 0x10(%ebx),%eax 11665e: 50 push %eax 11665f: e8 40 61 00 00 call 11c7a4 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 116664: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 11666b: e8 64 4d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 116670: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116672: 83 c4 10 add $0x10,%esp 116675: eb be jmp 116635 <== ALWAYS TAKEN 0010c1a8 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c1a8: 55 push %ebp 10c1a9: 89 e5 mov %esp,%ebp 10c1ab: 57 push %edi 10c1ac: 56 push %esi 10c1ad: 53 push %ebx 10c1ae: 83 ec 1c sub $0x1c,%esp 10c1b1: 8b 5d 08 mov 0x8(%ebp),%ebx 10c1b4: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c1b7: 85 db test %ebx,%ebx 10c1b9: 0f 84 a9 00 00 00 je 10c268 return RTEMS_INVALID_NAME; if ( !id ) 10c1bf: 85 f6 test %esi,%esi 10c1c1: 0f 84 c5 00 00 00 je 10c28c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c1c7: a1 58 84 12 00 mov 0x128458,%eax 10c1cc: 40 inc %eax 10c1cd: a3 58 84 12 00 mov %eax,0x128458 * 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 *) 10c1d2: 83 ec 0c sub $0xc,%esp 10c1d5: 68 60 83 12 00 push $0x128360 10c1da: e8 81 1d 00 00 call 10df60 <_Objects_Allocate> 10c1df: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c1e1: 83 c4 10 add $0x10,%esp 10c1e4: 85 c0 test %eax,%eax 10c1e6: 0f 84 8c 00 00 00 je 10c278 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c1ec: a1 18 85 12 00 mov 0x128518,%eax 10c1f1: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c1f4: 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; 10c1fb: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c202: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c209: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c210: 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 ); 10c217: 8d 42 54 lea 0x54(%edx),%eax 10c21a: 89 45 e4 mov %eax,-0x1c(%ebp) 10c21d: b9 38 00 00 00 mov $0x38,%ecx 10c222: 31 c0 xor %eax,%eax 10c224: 8b 7d e4 mov -0x1c(%ebp),%edi 10c227: f3 aa rep stos %al,%es:(%edi) 10c229: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c230: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c237: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c23e: 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; 10c245: 8b 42 08 mov 0x8(%edx),%eax 10c248: 0f b7 f8 movzwl %ax,%edi 10c24b: 8b 0d 7c 83 12 00 mov 0x12837c,%ecx 10c251: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c254: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c257: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c259: e8 be 2a 00 00 call 10ed1c <_Thread_Enable_dispatch> 10c25e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c260: 8d 65 f4 lea -0xc(%ebp),%esp 10c263: 5b pop %ebx 10c264: 5e pop %esi 10c265: 5f pop %edi 10c266: c9 leave 10c267: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c268: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c26d: 8d 65 f4 lea -0xc(%ebp),%esp 10c270: 5b pop %ebx 10c271: 5e pop %esi 10c272: 5f pop %edi 10c273: c9 leave 10c274: c3 ret 10c275: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10c278: e8 9f 2a 00 00 call 10ed1c <_Thread_Enable_dispatch> 10c27d: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c282: 8d 65 f4 lea -0xc(%ebp),%esp 10c285: 5b pop %ebx 10c286: 5e pop %esi 10c287: 5f pop %edi 10c288: c9 leave 10c289: c3 ret 10c28a: 66 90 xchg %ax,%ax <== NOT EXECUTED Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c28c: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c291: 8d 65 f4 lea -0xc(%ebp),%esp 10c294: 5b pop %ebx 10c295: 5e pop %esi 10c296: 5f pop %edi 10c297: c9 leave 10c298: c3 ret 0013c0c0 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13c0c0: 55 push %ebp 13c0c1: 89 e5 mov %esp,%ebp 13c0c3: 53 push %ebx 13c0c4: 83 ec 24 sub $0x24,%esp 13c0c7: 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 ) 13c0ca: 85 db test %ebx,%ebx 13c0cc: 0f 84 92 00 00 00 je 13c164 13c0d2: 50 push %eax 13c0d3: 8d 45 f4 lea -0xc(%ebp),%eax 13c0d6: 50 push %eax 13c0d7: ff 75 08 pushl 0x8(%ebp) 13c0da: 68 00 de 16 00 push $0x16de00 13c0df: e8 50 6e fd ff call 112f34 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13c0e4: 83 c4 10 add $0x10,%esp 13c0e7: 8b 4d f4 mov -0xc(%ebp),%ecx 13c0ea: 85 c9 test %ecx,%ecx 13c0ec: 74 0a je 13c0f8 13c0ee: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c0f3: 8b 5d fc mov -0x4(%ebp),%ebx 13c0f6: c9 leave 13c0f7: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13c0f8: 8b 50 40 mov 0x40(%eax),%edx 13c0fb: 8b 52 08 mov 0x8(%edx),%edx 13c0fe: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13c100: 8b 50 38 mov 0x38(%eax),%edx 13c103: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13c106: 85 d2 test %edx,%edx 13c108: 75 2a jne 13c134 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13c10a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13c111: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13c118: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13c11f: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 13c126: e8 01 77 fd ff call 11382c <_Thread_Enable_dispatch> 13c12b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c12d: 8b 5d fc mov -0x4(%ebp),%ebx 13c130: c9 leave 13c131: c3 ret 13c132: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13c134: 52 push %edx 13c135: 8d 55 ec lea -0x14(%ebp),%edx 13c138: 52 push %edx 13c139: 8d 55 e4 lea -0x1c(%ebp),%edx 13c13c: 52 push %edx 13c13d: 50 push %eax 13c13e: e8 b1 00 00 00 call 13c1f4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 13c143: 83 c4 10 add $0x10,%esp 13c146: 84 c0 test %al,%al 13c148: 74 26 je 13c170 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13c14a: 8b 45 e4 mov -0x1c(%ebp),%eax 13c14d: 8b 55 e8 mov -0x18(%ebp),%edx 13c150: 89 43 08 mov %eax,0x8(%ebx) 13c153: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13c156: 8b 45 ec mov -0x14(%ebp),%eax 13c159: 8b 55 f0 mov -0x10(%ebp),%edx 13c15c: 89 43 10 mov %eax,0x10(%ebx) 13c15f: 89 53 14 mov %edx,0x14(%ebx) 13c162: eb c2 jmp 13c126 <== ALWAYS TAKEN Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13c164: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c169: 8b 5d fc mov -0x4(%ebp),%ebx 13c16c: c9 leave 13c16d: c3 ret 13c16e: 66 90 xchg %ax,%ax <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 13c170: e8 b7 76 fd ff call 11382c <_Thread_Enable_dispatch> 13c175: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13c17a: e9 74 ff ff ff jmp 13c0f3 <== ALWAYS TAKEN 0013c37c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13c37c: 55 push %ebp 13c37d: 89 e5 mov %esp,%ebp 13c37f: 57 push %edi 13c380: 56 push %esi 13c381: 53 push %ebx 13c382: 83 ec 30 sub $0x30,%esp 13c385: 8b 5d 08 mov 0x8(%ebp),%ebx 13c388: 8b 75 0c mov 0xc(%ebp),%esi 13c38b: 8d 45 e4 lea -0x1c(%ebp),%eax 13c38e: 50 push %eax 13c38f: 53 push %ebx 13c390: 68 00 de 16 00 push $0x16de00 13c395: e8 9a 6b fd ff call 112f34 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13c39a: 83 c4 10 add $0x10,%esp 13c39d: 8b 7d e4 mov -0x1c(%ebp),%edi 13c3a0: 85 ff test %edi,%edi 13c3a2: 74 10 je 13c3b4 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13c3a4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c3a9: 8d 65 f4 lea -0xc(%ebp),%esp 13c3ac: 5b pop %ebx 13c3ad: 5e pop %esi 13c3ae: 5f pop %edi 13c3af: c9 leave 13c3b0: c3 ret 13c3b1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 13c3b4: 8b 50 40 mov 0x40(%eax),%edx 13c3b7: 3b 15 38 d9 16 00 cmp 0x16d938,%edx 13c3bd: 74 15 je 13c3d4 _Thread_Enable_dispatch(); 13c3bf: e8 68 74 fd ff call 11382c <_Thread_Enable_dispatch> 13c3c4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13c3c9: 8d 65 f4 lea -0xc(%ebp),%esp 13c3cc: 5b pop %ebx 13c3cd: 5e pop %esi 13c3ce: 5f pop %edi 13c3cf: c9 leave 13c3d0: c3 ret 13c3d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 13c3d4: 85 f6 test %esi,%esi 13c3d6: 0f 84 b0 00 00 00 je 13c48c } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13c3dc: 9c pushf 13c3dd: fa cli 13c3de: 5f pop %edi switch ( the_period->state ) { 13c3df: 8b 50 38 mov 0x38(%eax),%edx 13c3e2: 83 fa 02 cmp $0x2,%edx 13c3e5: 0f 84 bd 00 00 00 je 13c4a8 13c3eb: 83 fa 04 cmp $0x4,%edx 13c3ee: 74 5c je 13c44c 13c3f0: 85 d2 test %edx,%edx 13c3f2: 75 b0 jne 13c3a4 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13c3f4: 57 push %edi 13c3f5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13c3f6: 83 ec 0c sub $0xc,%esp 13c3f9: 50 push %eax 13c3fa: 89 45 d4 mov %eax,-0x2c(%ebp) 13c3fd: e8 7e fd ff ff call 13c180 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 13c402: 8b 45 d4 mov -0x2c(%ebp),%eax 13c405: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 13c40c: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13c413: c7 40 2c 2c c5 13 00 movl $0x13c52c,0x2c(%eax) the_watchdog->id = id; 13c41a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13c41d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13c424: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c427: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c42a: 5a pop %edx 13c42b: 59 pop %ecx 13c42c: 83 c0 10 add $0x10,%eax 13c42f: 50 push %eax 13c430: 68 58 d9 16 00 push $0x16d958 13c435: e8 ca 82 fd ff call 114704 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13c43a: e8 ed 73 fd ff call 11382c <_Thread_Enable_dispatch> 13c43f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13c441: 83 c4 10 add $0x10,%esp 13c444: e9 60 ff ff ff jmp 13c3a9 <== ALWAYS TAKEN 13c449: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 13c44c: 83 ec 0c sub $0xc,%esp 13c44f: 50 push %eax 13c450: 89 45 d4 mov %eax,-0x2c(%ebp) 13c453: e8 34 fe ff ff call 13c28c <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 13c458: 57 push %edi 13c459: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13c45a: 8b 45 d4 mov -0x2c(%ebp),%eax 13c45d: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13c464: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13c467: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13c46a: 59 pop %ecx 13c46b: 5b pop %ebx 13c46c: 83 c0 10 add $0x10,%eax 13c46f: 50 push %eax 13c470: 68 58 d9 16 00 push $0x16d958 13c475: e8 8a 82 fd ff call 114704 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13c47a: e8 ad 73 fd ff call 11382c <_Thread_Enable_dispatch> 13c47f: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13c484: 83 c4 10 add $0x10,%esp 13c487: e9 1d ff ff ff jmp 13c3a9 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13c48c: 8b 40 38 mov 0x38(%eax),%eax 13c48f: 83 f8 04 cmp $0x4,%eax 13c492: 76 74 jbe 13c508 <== NEVER TAKEN 13c494: 31 c0 xor %eax,%eax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 13c496: 89 45 d4 mov %eax,-0x2c(%ebp) 13c499: e8 8e 73 fd ff call 11382c <_Thread_Enable_dispatch> return( return_value ); 13c49e: 8b 45 d4 mov -0x2c(%ebp),%eax 13c4a1: e9 03 ff ff ff jmp 13c3a9 <== ALWAYS TAKEN 13c4a6: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13c4a8: 83 ec 0c sub $0xc,%esp 13c4ab: 50 push %eax 13c4ac: 89 45 d4 mov %eax,-0x2c(%ebp) 13c4af: e8 d8 fd ff ff call 13c28c <_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; 13c4b4: 8b 45 d4 mov -0x2c(%ebp),%eax 13c4b7: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13c4be: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13c4c1: 57 push %edi 13c4c2: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13c4c3: 8b 15 38 d9 16 00 mov 0x16d938,%edx 13c4c9: 8b 48 08 mov 0x8(%eax),%ecx 13c4cc: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13c4cf: 5e pop %esi 13c4d0: 5f pop %edi 13c4d1: 68 00 40 00 00 push $0x4000 13c4d6: 52 push %edx 13c4d7: 89 45 d4 mov %eax,-0x2c(%ebp) 13c4da: e8 d5 7b fd ff call 1140b4 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13c4df: 9c pushf 13c4e0: fa cli 13c4e1: 59 pop %ecx local_state = the_period->state; 13c4e2: 8b 45 d4 mov -0x2c(%ebp),%eax 13c4e5: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13c4e8: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13c4ef: 51 push %ecx 13c4f0: 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 ) 13c4f1: 83 c4 10 add $0x10,%esp 13c4f4: 83 fa 03 cmp $0x3,%edx 13c4f7: 74 18 je 13c511 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13c4f9: e8 2e 73 fd ff call 11382c <_Thread_Enable_dispatch> 13c4fe: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13c500: e9 a4 fe ff ff jmp 13c3a9 <== ALWAYS TAKEN 13c505: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13c508: 8b 04 85 14 22 16 00 mov 0x162214(,%eax,4),%eax 13c50f: eb 85 jmp 13c496 <== ALWAYS TAKEN /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13c511: 83 ec 08 sub $0x8,%esp 13c514: 68 00 40 00 00 push $0x4000 13c519: ff 35 38 d9 16 00 pushl 0x16d938 13c51f: e8 60 6f fd ff call 113484 <_Thread_Clear_state> 13c524: 83 c4 10 add $0x10,%esp 13c527: eb d0 jmp 13c4f9 <== ALWAYS TAKEN 0012d2c4 : } } } void rtems_rate_monotonic_report_statistics( void ) { 12d2c4: 55 push %ebp 12d2c5: 89 e5 mov %esp,%ebp 12d2c7: 83 ec 10 sub $0x10,%esp rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 12d2ca: 68 c8 df 10 00 push $0x10dfc8 12d2cf: 6a 00 push $0x0 12d2d1: e8 0a fe ff ff call 12d0e0 <== ALWAYS TAKEN 12d2d6: 83 c4 10 add $0x10,%esp } 12d2d9: c9 leave 12d2da: c3 ret 0012d0e0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12d0e0: 55 push %ebp 12d0e1: 89 e5 mov %esp,%ebp 12d0e3: 57 push %edi 12d0e4: 56 push %esi 12d0e5: 53 push %ebx 12d0e6: 83 ec 7c sub $0x7c,%esp 12d0e9: 8b 7d 08 mov 0x8(%ebp),%edi 12d0ec: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 12d0ef: 85 f6 test %esi,%esi 12d0f1: 0f 84 bd 00 00 00 je 12d1b4 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 12d0f7: 83 ec 08 sub $0x8,%esp 12d0fa: 68 28 e9 15 00 push $0x15e928 12d0ff: 57 push %edi 12d100: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12d102: 59 pop %ecx 12d103: 5b pop %ebx 12d104: 68 60 e9 15 00 push $0x15e960 12d109: 57 push %edi 12d10a: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12d10c: 58 pop %eax 12d10d: 5a pop %edx 12d10e: 68 84 e9 15 00 push $0x15e984 12d113: 57 push %edi 12d114: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12d116: 59 pop %ecx 12d117: 5b pop %ebx 12d118: 68 a8 e9 15 00 push $0x15e9a8 12d11d: 57 push %edi 12d11e: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12d120: 58 pop %eax 12d121: 5a pop %edx 12d122: 68 f4 e9 15 00 push $0x15e9f4 12d127: 57 push %edi 12d128: ff d6 call *%esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12d12a: 8b 1d 08 de 16 00 mov 0x16de08,%ebx 12d130: 83 c4 10 add $0x10,%esp 12d133: 3b 1d 0c de 16 00 cmp 0x16de0c,%ebx 12d139: 77 79 ja 12d1b4 <== ALWAYS TAKEN struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 12d13b: 89 75 84 mov %esi,-0x7c(%ebp) 12d13e: eb 09 jmp 12d149 <== ALWAYS TAKEN * 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++ ) { 12d140: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12d141: 39 1d 0c de 16 00 cmp %ebx,0x16de0c 12d147: 72 6b jb 12d1b4 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12d149: 83 ec 08 sub $0x8,%esp 12d14c: 8d 45 88 lea -0x78(%ebp),%eax 12d14f: 50 push %eax 12d150: 53 push %ebx 12d151: e8 be ee 00 00 call 13c014 if ( status != RTEMS_SUCCESSFUL ) 12d156: 83 c4 10 add $0x10,%esp 12d159: 85 c0 test %eax,%eax 12d15b: 75 e3 jne 12d140 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12d15d: 83 ec 08 sub $0x8,%esp 12d160: 8d 55 c0 lea -0x40(%ebp),%edx 12d163: 52 push %edx 12d164: 53 push %ebx 12d165: e8 56 ef 00 00 call 13c0c0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12d16a: 83 c4 0c add $0xc,%esp 12d16d: 8d 45 e3 lea -0x1d(%ebp),%eax 12d170: 50 push %eax 12d171: 6a 05 push $0x5 12d173: ff 75 c0 pushl -0x40(%ebp) 12d176: e8 c1 41 fe ff call 11133c <== ALWAYS TAKEN /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12d17b: 59 pop %ecx 12d17c: 5e pop %esi 12d17d: ff 75 8c pushl -0x74(%ebp) 12d180: ff 75 88 pushl -0x78(%ebp) 12d183: 8d 55 e3 lea -0x1d(%ebp),%edx 12d186: 52 push %edx 12d187: 53 push %ebx 12d188: 68 46 e9 15 00 push $0x15e946 12d18d: 57 push %edi 12d18e: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12d191: 8b 45 88 mov -0x78(%ebp),%eax 12d194: 83 c4 20 add $0x20,%esp 12d197: 85 c0 test %eax,%eax 12d199: 75 21 jne 12d1bc (*print)( context, "\n" ); 12d19b: 83 ec 08 sub $0x8,%esp 12d19e: 68 21 07 16 00 push $0x160721 12d1a3: 57 push %edi 12d1a4: ff 55 84 call *-0x7c(%ebp) continue; 12d1a7: 83 c4 10 add $0x10,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 12d1aa: 43 inc %ebx /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12d1ab: 39 1d 0c de 16 00 cmp %ebx,0x16de0c 12d1b1: 73 96 jae 12d149 <== NEVER TAKEN 12d1b3: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12d1b4: 8d 65 f4 lea -0xc(%ebp),%esp 12d1b7: 5b pop %ebx 12d1b8: 5e pop %esi 12d1b9: 5f pop %edi 12d1ba: c9 leave 12d1bb: c3 ret struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 12d1bc: 52 push %edx 12d1bd: 8d 55 d8 lea -0x28(%ebp),%edx 12d1c0: 52 push %edx 12d1c1: 50 push %eax 12d1c2: 8d 45 a0 lea -0x60(%ebp),%eax 12d1c5: 50 push %eax 12d1c6: e8 a5 16 00 00 call 12e870 <_Timespec_Divide_by_integer> (*print)( context, 12d1cb: 8b 4d dc mov -0x24(%ebp),%ecx 12d1ce: be d3 4d 62 10 mov $0x10624dd3,%esi 12d1d3: 89 c8 mov %ecx,%eax 12d1d5: f7 ee imul %esi 12d1d7: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d1dd: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d1e3: c1 f8 06 sar $0x6,%eax 12d1e6: c1 f9 1f sar $0x1f,%ecx 12d1e9: 29 c8 sub %ecx,%eax 12d1eb: 50 push %eax 12d1ec: ff 75 d8 pushl -0x28(%ebp) 12d1ef: 8b 4d 9c mov -0x64(%ebp),%ecx 12d1f2: 89 c8 mov %ecx,%eax 12d1f4: f7 ee imul %esi 12d1f6: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d1fc: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d202: c1 f8 06 sar $0x6,%eax 12d205: c1 f9 1f sar $0x1f,%ecx 12d208: 29 c8 sub %ecx,%eax 12d20a: 50 push %eax 12d20b: ff 75 98 pushl -0x68(%ebp) 12d20e: 8b 4d 94 mov -0x6c(%ebp),%ecx 12d211: 89 c8 mov %ecx,%eax 12d213: f7 ee imul %esi 12d215: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12d21b: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d221: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d227: c1 f8 06 sar $0x6,%eax 12d22a: c1 f9 1f sar $0x1f,%ecx 12d22d: 29 c8 sub %ecx,%eax 12d22f: 50 push %eax 12d230: ff 75 90 pushl -0x70(%ebp) 12d233: 68 40 ea 15 00 push $0x15ea40 12d238: 57 push %edi 12d239: ff 55 84 call *-0x7c(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 12d23c: 83 c4 2c add $0x2c,%esp 12d23f: 8d 55 d8 lea -0x28(%ebp),%edx 12d242: 52 push %edx 12d243: ff 75 88 pushl -0x78(%ebp) 12d246: 8d 45 b8 lea -0x48(%ebp),%eax 12d249: 50 push %eax 12d24a: e8 21 16 00 00 call 12e870 <_Timespec_Divide_by_integer> (*print)( context, 12d24f: 8b 4d dc mov -0x24(%ebp),%ecx 12d252: 89 c8 mov %ecx,%eax 12d254: f7 ee imul %esi 12d256: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d25c: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d262: c1 f8 06 sar $0x6,%eax 12d265: c1 f9 1f sar $0x1f,%ecx 12d268: 29 c8 sub %ecx,%eax 12d26a: 50 push %eax 12d26b: ff 75 d8 pushl -0x28(%ebp) 12d26e: 8b 4d b4 mov -0x4c(%ebp),%ecx 12d271: 89 c8 mov %ecx,%eax 12d273: f7 ee imul %esi 12d275: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d27b: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12d281: c1 f8 06 sar $0x6,%eax 12d284: c1 f9 1f sar $0x1f,%ecx 12d287: 29 c8 sub %ecx,%eax 12d289: 50 push %eax 12d28a: ff 75 b0 pushl -0x50(%ebp) 12d28d: 8b 4d ac mov -0x54(%ebp),%ecx 12d290: 89 c8 mov %ecx,%eax 12d292: f7 ee imul %esi 12d294: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12d29a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12d2a0: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12d2a6: c1 fe 06 sar $0x6,%esi 12d2a9: 89 c8 mov %ecx,%eax 12d2ab: 99 cltd 12d2ac: 29 d6 sub %edx,%esi 12d2ae: 56 push %esi 12d2af: ff 75 a8 pushl -0x58(%ebp) 12d2b2: 68 60 ea 15 00 push $0x15ea60 12d2b7: 57 push %edi 12d2b8: ff 55 84 call *-0x7c(%ebp) 12d2bb: 83 c4 30 add $0x30,%esp 12d2be: e9 7d fe ff ff jmp 12d140 <== ALWAYS TAKEN 0012d2dc : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 12d2dc: 55 push %ebp 12d2dd: 89 e5 mov %esp,%ebp 12d2df: 53 push %ebx 12d2e0: 83 ec 04 sub $0x4,%esp 12d2e3: a1 78 d8 16 00 mov 0x16d878,%eax 12d2e8: 40 inc %eax 12d2e9: a3 78 d8 16 00 mov %eax,0x16d878 /* * 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 ; 12d2ee: 8b 1d 08 de 16 00 mov 0x16de08,%ebx 12d2f4: 3b 1d 0c de 16 00 cmp 0x16de0c,%ebx 12d2fa: 77 15 ja 12d311 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 12d2fc: 83 ec 0c sub $0xc,%esp 12d2ff: 53 push %ebx 12d300: e8 17 00 00 00 call 12d31c <== 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++ ) { 12d305: 43 inc %ebx /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 12d306: 83 c4 10 add $0x10,%esp 12d309: 39 1d 0c de 16 00 cmp %ebx,0x16de0c 12d30f: 73 eb jae 12d2fc /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 12d311: 8b 5d fc mov -0x4(%ebp),%ebx 12d314: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 12d315: e9 12 65 fe ff jmp 11382c <_Thread_Enable_dispatch> 0012d31c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12d31c: 55 push %ebp 12d31d: 89 e5 mov %esp,%ebp 12d31f: 57 push %edi 12d320: 53 push %ebx 12d321: 83 ec 14 sub $0x14,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 12d324: 8d 45 f4 lea -0xc(%ebp),%eax 12d327: 50 push %eax 12d328: ff 75 08 pushl 0x8(%ebp) 12d32b: 68 00 de 16 00 push $0x16de00 12d330: e8 ff 5b fe ff call 112f34 <_Objects_Get> 12d335: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12d337: 83 c4 10 add $0x10,%esp 12d33a: 8b 45 f4 mov -0xc(%ebp),%eax 12d33d: 85 c0 test %eax,%eax 12d33f: 75 3b jne 12d37c case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12d341: 8d 5a 54 lea 0x54(%edx),%ebx 12d344: b9 38 00 00 00 mov $0x38,%ecx 12d349: 31 c0 xor %eax,%eax 12d34b: 89 df mov %ebx,%edi 12d34d: f3 aa rep stos %al,%es:(%edi) 12d34f: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12d356: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12d35d: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12d364: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12d36b: e8 bc 64 fe ff call 11382c <_Thread_Enable_dispatch> 12d370: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d372: 8d 65 f8 lea -0x8(%ebp),%esp 12d375: 5b pop %ebx 12d376: 5f pop %edi 12d377: c9 leave 12d378: c3 ret 12d379: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12d37c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d381: 8d 65 f8 lea -0x8(%ebp),%esp 12d384: 5b pop %ebx 12d385: 5f pop %edi 12d386: c9 leave 12d387: c3 ret 00116db0 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 116db0: 55 push %ebp 116db1: 89 e5 mov %esp,%ebp 116db3: 57 push %edi 116db4: 56 push %esi 116db5: 53 push %ebx 116db6: 83 ec 1c sub $0x1c,%esp 116db9: 8b 75 08 mov 0x8(%ebp),%esi 116dbc: 8b 5d 0c mov 0xc(%ebp),%ebx 116dbf: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116dc2: 85 f6 test %esi,%esi 116dc4: 0f 84 92 00 00 00 je 116e5c return RTEMS_INVALID_NAME; if ( !starting_address ) 116dca: 85 db test %ebx,%ebx 116dcc: 74 09 je 116dd7 return RTEMS_INVALID_ADDRESS; if ( !id ) 116dce: 85 ff test %edi,%edi 116dd0: 74 05 je 116dd7 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 116dd2: f6 c3 03 test $0x3,%bl 116dd5: 74 0d je 116de4 return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 116dd7: b8 09 00 00 00 mov $0x9,%eax } 116ddc: 8d 65 f4 lea -0xc(%ebp),%esp 116ddf: 5b pop %ebx 116de0: 5e pop %esi 116de1: 5f pop %edi 116de2: c9 leave 116de3: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116de4: 83 ec 0c sub $0xc,%esp 116de7: ff 35 10 f8 13 00 pushl 0x13f810 116ded: e8 fe 24 00 00 call 1192f0 <_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 ); 116df2: c7 04 24 60 f6 13 00 movl $0x13f660,(%esp) 116df9: e8 3a 38 00 00 call 11a638 <_Objects_Allocate> 116dfe: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 116e00: 83 c4 10 add $0x10,%esp 116e03: 85 c0 test %eax,%eax 116e05: 74 65 je 116e6c return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 116e07: ff 75 14 pushl 0x14(%ebp) 116e0a: ff 75 10 pushl 0x10(%ebp) 116e0d: 53 push %ebx 116e0e: 8d 40 68 lea 0x68(%eax),%eax 116e11: 50 push %eax 116e12: 89 55 e4 mov %edx,-0x1c(%ebp) 116e15: e8 02 33 00 00 call 11a11c <_Heap_Initialize> 116e1a: 8b 55 e4 mov -0x1c(%ebp),%edx 116e1d: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 116e20: 83 c4 10 add $0x10,%esp 116e23: 85 c0 test %eax,%eax 116e25: 75 4d jne 116e74 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116e27: 83 ec 08 sub $0x8,%esp 116e2a: 52 push %edx 116e2b: 68 60 f6 13 00 push $0x13f660 116e30: e8 83 3b 00 00 call 11a9b8 <_Objects_Free> 116e35: b8 08 00 00 00 mov $0x8,%eax 116e3a: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 116e3d: 83 ec 0c sub $0xc,%esp 116e40: ff 35 10 f8 13 00 pushl 0x13f810 116e46: 89 45 e4 mov %eax,-0x1c(%ebp) 116e49: e8 ea 24 00 00 call 119338 <_API_Mutex_Unlock> <== ALWAYS TAKEN return return_status; 116e4e: 83 c4 10 add $0x10,%esp 116e51: 8b 45 e4 mov -0x1c(%ebp),%eax } 116e54: 8d 65 f4 lea -0xc(%ebp),%esp 116e57: 5b pop %ebx 116e58: 5e pop %esi 116e59: 5f pop %edi 116e5a: c9 leave 116e5b: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 116e5c: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 116e61: 8d 65 f4 lea -0xc(%ebp),%esp 116e64: 5b pop %ebx 116e65: 5e pop %esi 116e66: 5f pop %edi 116e67: c9 leave 116e68: c3 ret 116e69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 116e6c: b8 05 00 00 00 mov $0x5,%eax 116e71: eb ca jmp 116e3d <== ALWAYS TAKEN 116e73: 90 nop <== NOT EXECUTED return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 116e74: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 116e77: 8b 45 10 mov 0x10(%ebp),%eax 116e7a: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 116e7d: 8b 45 14 mov 0x14(%ebp),%eax 116e80: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 116e83: 8b 45 18 mov 0x18(%ebp),%eax 116e86: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 116e89: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 116e90: 6a 06 push $0x6 116e92: 6a 40 push $0x40 116e94: 8b 45 18 mov 0x18(%ebp),%eax 116e97: c1 e8 02 shr $0x2,%eax 116e9a: 83 e0 01 and $0x1,%eax 116e9d: 50 push %eax 116e9e: 8d 42 10 lea 0x10(%edx),%eax 116ea1: 50 push %eax 116ea2: 89 55 e4 mov %edx,-0x1c(%ebp) 116ea5: e8 8a 4c 00 00 call 11bb34 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116eaa: 8b 55 e4 mov -0x1c(%ebp),%edx 116ead: 8b 42 08 mov 0x8(%edx),%eax 116eb0: 0f b7 d8 movzwl %ax,%ebx 116eb3: 8b 0d 7c f6 13 00 mov 0x13f67c,%ecx 116eb9: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116ebc: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 116ebf: 89 07 mov %eax,(%edi) 116ec1: 31 c0 xor %eax,%eax 116ec3: 83 c4 10 add $0x10,%esp 116ec6: e9 72 ff ff ff jmp 116e3d <== ALWAYS TAKEN 00116ecc : */ rtems_status_code rtems_region_delete( rtems_id id ) { 116ecc: 55 push %ebp 116ecd: 89 e5 mov %esp,%ebp 116ecf: 53 push %ebx 116ed0: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 116ed3: ff 35 10 f8 13 00 pushl 0x13f810 116ed9: e8 12 24 00 00 call 1192f0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116ede: 83 c4 0c add $0xc,%esp 116ee1: 8d 45 f4 lea -0xc(%ebp),%eax 116ee4: 50 push %eax 116ee5: ff 75 08 pushl 0x8(%ebp) 116ee8: 68 60 f6 13 00 push $0x13f660 116eed: e8 f6 3b 00 00 call 11aae8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 116ef2: 83 c4 10 add $0x10,%esp 116ef5: 8b 5d f4 mov -0xc(%ebp),%ebx 116ef8: 85 db test %ebx,%ebx 116efa: 74 1c je 116f18 116efc: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f01: 83 ec 0c sub $0xc,%esp 116f04: ff 35 10 f8 13 00 pushl 0x13f810 116f0a: e8 29 24 00 00 call 119338 <_API_Mutex_Unlock> return return_status; } 116f0f: 89 d8 mov %ebx,%eax 116f11: 8b 5d fc mov -0x4(%ebp),%ebx 116f14: c9 leave 116f15: c3 ret 116f16: 66 90 xchg %ax,%ax <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks != 0 ) 116f18: 8b 48 64 mov 0x64(%eax),%ecx 116f1b: 85 c9 test %ecx,%ecx 116f1d: 74 09 je 116f28 116f1f: bb 0c 00 00 00 mov $0xc,%ebx 116f24: eb db jmp 116f01 <== ALWAYS TAKEN 116f26: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 116f28: 83 ec 08 sub $0x8,%esp 116f2b: 50 push %eax 116f2c: 68 60 f6 13 00 push $0x13f660 116f31: 89 45 e4 mov %eax,-0x1c(%ebp) 116f34: e8 7b 37 00 00 call 11a6b4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 116f39: 58 pop %eax 116f3a: 5a pop %edx 116f3b: 8b 45 e4 mov -0x1c(%ebp),%eax 116f3e: 50 push %eax 116f3f: 68 60 f6 13 00 push $0x13f660 116f44: e8 6f 3a 00 00 call 11a9b8 <_Objects_Free> 116f49: 31 db xor %ebx,%ebx 116f4b: 83 c4 10 add $0x10,%esp 116f4e: eb b1 jmp 116f01 <== ALWAYS TAKEN 00116f50 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 116f50: 55 push %ebp 116f51: 89 e5 mov %esp,%ebp 116f53: 56 push %esi 116f54: 53 push %ebx 116f55: 83 ec 10 sub $0x10,%esp 116f58: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116f5b: 85 db test %ebx,%ebx 116f5d: 74 71 je 116fd0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 116f5f: 83 ec 0c sub $0xc,%esp 116f62: ff 35 10 f8 13 00 pushl 0x13f810 116f68: e8 83 23 00 00 call 1192f0 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 116f6d: 83 c4 0c add $0xc,%esp 116f70: 8d 45 f0 lea -0x10(%ebp),%eax 116f73: 50 push %eax 116f74: ff 75 08 pushl 0x8(%ebp) 116f77: 68 60 f6 13 00 push $0x13f660 116f7c: e8 67 3b 00 00 call 11aae8 <_Objects_Get_no_protection> 116f81: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 116f83: 83 c4 10 add $0x10,%esp 116f86: 8b 45 f0 mov -0x10(%ebp),%eax 116f89: 85 c0 test %eax,%eax 116f8b: 74 1f je 116fac 116f8d: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 116f92: 83 ec 0c sub $0xc,%esp 116f95: ff 35 10 f8 13 00 pushl 0x13f810 116f9b: e8 98 23 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 116fa0: 83 c4 10 add $0x10,%esp } 116fa3: 89 d8 mov %ebx,%eax 116fa5: 8d 65 f8 lea -0x8(%ebp),%esp 116fa8: 5b pop %ebx 116fa9: 5e pop %esi 116faa: c9 leave 116fab: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 116fac: 8d 45 f4 lea -0xc(%ebp),%eax 116faf: 50 push %eax 116fb0: ff 75 10 pushl 0x10(%ebp) 116fb3: 53 push %ebx 116fb4: 8d 46 68 lea 0x68(%esi),%eax 116fb7: 50 push %eax 116fb8: e8 67 2e 00 00 call 119e24 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 116fbd: 83 c4 10 add $0x10,%esp 116fc0: 85 c0 test %eax,%eax 116fc2: 74 18 je 116fdc the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 116fc4: 48 dec %eax 116fc5: 74 25 je 116fec 116fc7: bb 18 00 00 00 mov $0x18,%ebx 116fcc: eb c4 jmp 116f92 <== ALWAYS TAKEN 116fce: 66 90 xchg %ax,%ax <== NOT EXECUTED Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 116fd0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 116fd2: 89 d8 mov %ebx,%eax 116fd4: 8d 65 f8 lea -0x8(%ebp),%esp 116fd7: 5b pop %ebx 116fd8: 5e pop %esi 116fd9: c9 leave 116fda: c3 ret 116fdb: 90 nop <== NOT EXECUTED length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 116fdc: 8b 45 f4 mov -0xc(%ebp),%eax 116fdf: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 116fe2: 01 46 5c add %eax,0x5c(%esi) 116fe5: 31 db xor %ebx,%ebx 116fe7: eb a9 jmp 116f92 <== ALWAYS TAKEN 116fe9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 116fec: bb 09 00 00 00 mov $0x9,%ebx 116ff1: eb 9f jmp 116f92 <== ALWAYS TAKEN 00116ff4 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 116ff4: 55 push %ebp 116ff5: 89 e5 mov %esp,%ebp 116ff7: 53 push %ebx 116ff8: 83 ec 14 sub $0x14,%esp 116ffb: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 116ffe: 85 db test %ebx,%ebx 117000: 74 76 je 117078 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117002: 83 ec 0c sub $0xc,%esp 117005: ff 35 10 f8 13 00 pushl 0x13f810 11700b: e8 e0 22 00 00 call 1192f0 <_API_Mutex_Lock> 117010: 83 c4 0c add $0xc,%esp 117013: 8d 45 f4 lea -0xc(%ebp),%eax 117016: 50 push %eax 117017: ff 75 08 pushl 0x8(%ebp) 11701a: 68 60 f6 13 00 push $0x13f660 11701f: e8 c4 3a 00 00 call 11aae8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117024: 83 c4 10 add $0x10,%esp 117027: 8b 55 f4 mov -0xc(%ebp),%edx 11702a: 85 d2 test %edx,%edx 11702c: 74 1e je 11704c 11702e: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117033: 83 ec 0c sub $0xc,%esp 117036: ff 35 10 f8 13 00 pushl 0x13f810 11703c: e8 f7 22 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 117041: 83 c4 10 add $0x10,%esp } 117044: 89 d8 mov %ebx,%eax 117046: 8b 5d fc mov -0x4(%ebp),%ebx 117049: c9 leave 11704a: c3 ret 11704b: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 11704c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117053: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 11705a: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117061: 83 ec 08 sub $0x8,%esp 117064: 53 push %ebx 117065: 83 c0 68 add $0x68,%eax 117068: 50 push %eax 117069: e8 c6 2f 00 00 call 11a034 <_Heap_Get_free_information> 11706e: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117070: 83 c4 10 add $0x10,%esp 117073: eb be jmp 117033 <== ALWAYS TAKEN 117075: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117078: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 11707a: 89 d8 mov %ebx,%eax 11707c: 8b 5d fc mov -0x4(%ebp),%ebx 11707f: c9 leave 117080: c3 ret 00117084 : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { 117084: 55 push %ebp 117085: 89 e5 mov %esp,%ebp 117087: 53 push %ebx 117088: 83 ec 14 sub $0x14,%esp 11708b: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 11708e: 85 db test %ebx,%ebx 117090: 74 5e je 1170f0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117092: 83 ec 0c sub $0xc,%esp 117095: ff 35 10 f8 13 00 pushl 0x13f810 11709b: e8 50 22 00 00 call 1192f0 <_API_Mutex_Lock> 1170a0: 83 c4 0c add $0xc,%esp 1170a3: 8d 45 f4 lea -0xc(%ebp),%eax 1170a6: 50 push %eax 1170a7: ff 75 08 pushl 0x8(%ebp) 1170aa: 68 60 f6 13 00 push $0x13f660 1170af: e8 34 3a 00 00 call 11aae8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 1170b4: 83 c4 10 add $0x10,%esp 1170b7: 8b 55 f4 mov -0xc(%ebp),%edx 1170ba: 85 d2 test %edx,%edx 1170bc: 74 1e je 1170dc 1170be: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1170c3: 83 ec 0c sub $0xc,%esp 1170c6: ff 35 10 f8 13 00 pushl 0x13f810 1170cc: e8 67 22 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 1170d1: 83 c4 10 add $0x10,%esp } 1170d4: 89 d8 mov %ebx,%eax 1170d6: 8b 5d fc mov -0x4(%ebp),%ebx 1170d9: c9 leave 1170da: c3 ret 1170db: 90 nop <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); 1170dc: 83 ec 08 sub $0x8,%esp 1170df: 53 push %ebx 1170e0: 83 c0 68 add $0x68,%eax 1170e3: 50 push %eax 1170e4: e8 a3 2f 00 00 call 11a08c <_Heap_Get_information> 1170e9: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 1170eb: 83 c4 10 add $0x10,%esp 1170ee: eb d3 jmp 1170c3 <== ALWAYS TAKEN { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 1170f0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 1170f2: 89 d8 mov %ebx,%eax 1170f4: 8b 5d fc mov -0x4(%ebp),%ebx 1170f7: c9 leave 1170f8: c3 ret 001170fc : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 1170fc: 55 push %ebp 1170fd: 89 e5 mov %esp,%ebp 1170ff: 57 push %edi 117100: 56 push %esi 117101: 53 push %ebx 117102: 83 ec 2c sub $0x2c,%esp 117105: 8b 75 0c mov 0xc(%ebp),%esi 117108: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 11710b: 85 db test %ebx,%ebx 11710d: 0f 84 a1 00 00 00 je 1171b4 return RTEMS_INVALID_ADDRESS; *segment = NULL; 117113: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117119: 85 f6 test %esi,%esi 11711b: 75 0f jne 11712c 11711d: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117122: 8d 65 f4 lea -0xc(%ebp),%esp 117125: 5b pop %ebx 117126: 5e pop %esi 117127: 5f pop %edi 117128: c9 leave 117129: c3 ret 11712a: 66 90 xchg %ax,%ax <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 11712c: 83 ec 0c sub $0xc,%esp 11712f: ff 35 10 f8 13 00 pushl 0x13f810 117135: e8 b6 21 00 00 call 1192f0 <_API_Mutex_Lock> executing = _Thread_Executing; 11713a: a1 18 f8 13 00 mov 0x13f818,%eax 11713f: 89 45 d4 mov %eax,-0x2c(%ebp) 117142: 83 c4 0c add $0xc,%esp 117145: 8d 45 e4 lea -0x1c(%ebp),%eax 117148: 50 push %eax 117149: ff 75 08 pushl 0x8(%ebp) 11714c: 68 60 f6 13 00 push $0x13f660 117151: e8 92 39 00 00 call 11aae8 <_Objects_Get_no_protection> 117156: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117158: 83 c4 10 add $0x10,%esp 11715b: 8b 45 e4 mov -0x1c(%ebp),%eax 11715e: 85 c0 test %eax,%eax 117160: 75 2a jne 11718c case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117162: 3b 77 5c cmp 0x5c(%edi),%esi 117165: 76 2d jbe 117194 117167: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11716c: 83 ec 0c sub $0xc,%esp 11716f: ff 35 10 f8 13 00 pushl 0x13f810 117175: 89 45 d0 mov %eax,-0x30(%ebp) 117178: e8 bb 21 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 11717d: 83 c4 10 add $0x10,%esp 117180: 8b 45 d0 mov -0x30(%ebp),%eax } 117183: 8d 65 f4 lea -0xc(%ebp),%esp 117186: 5b pop %ebx 117187: 5e pop %esi 117188: 5f pop %edi 117189: c9 leave 11718a: c3 ret 11718b: 90 nop <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 11718c: b8 04 00 00 00 mov $0x4,%eax 117191: eb d9 jmp 11716c <== ALWAYS TAKEN 117193: 90 nop <== NOT EXECUTED * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 117194: 6a 00 push $0x0 117196: 6a 00 push $0x0 117198: 56 push %esi 117199: 8d 47 68 lea 0x68(%edi),%eax 11719c: 50 push %eax 11719d: e8 ce 2a 00 00 call 119c70 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 1171a2: 83 c4 10 add $0x10,%esp 1171a5: 85 c0 test %eax,%eax 1171a7: 74 17 je 1171c0 the_region->number_of_used_blocks += 1; 1171a9: ff 47 64 incl 0x64(%edi) *segment = the_segment; 1171ac: 89 03 mov %eax,(%ebx) 1171ae: 31 c0 xor %eax,%eax 1171b0: eb ba jmp 11716c <== ALWAYS TAKEN 1171b2: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 1171b4: b8 09 00 00 00 mov $0x9,%eax 1171b9: e9 64 ff ff ff jmp 117122 <== ALWAYS TAKEN 1171be: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_segment ) { the_region->number_of_used_blocks += 1; *segment = the_segment; return_status = RTEMS_SUCCESSFUL; } else if ( _Options_Is_no_wait( option_set ) ) { 1171c0: f6 45 10 01 testb $0x1,0x10(%ebp) 1171c4: 74 07 je 1171cd 1171c6: b8 0d 00 00 00 mov $0xd,%eax 1171cb: eb 9f jmp 11716c <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1171cd: a1 58 f7 13 00 mov 0x13f758,%eax 1171d2: 40 inc %eax 1171d3: a3 58 f7 13 00 mov %eax,0x13f758 * 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(); 1171d8: 83 ec 0c sub $0xc,%esp 1171db: ff 35 10 f8 13 00 pushl 0x13f810 1171e1: e8 52 21 00 00 call 119338 <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 1171e6: 8d 47 10 lea 0x10(%edi),%eax 1171e9: 8b 55 d4 mov -0x2c(%ebp),%edx 1171ec: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1171ef: 8b 4d 08 mov 0x8(%ebp),%ecx 1171f2: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 1171f5: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 1171f8: 89 5a 28 mov %ebx,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 1171fb: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi) _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 117202: 83 c4 0c add $0xc,%esp 117205: 68 e4 bb 11 00 push $0x11bbe4 11720a: ff 75 14 pushl 0x14(%ebp) 11720d: 50 push %eax 11720e: e8 c1 46 00 00 call 11b8d4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117213: e8 bc 41 00 00 call 11b3d4 <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117218: 8b 55 d4 mov -0x2c(%ebp),%edx 11721b: 8b 42 34 mov 0x34(%edx),%eax 11721e: 83 c4 10 add $0x10,%esp 117221: e9 fc fe ff ff jmp 117122 <== ALWAYS TAKEN 00117228 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117228: 55 push %ebp 117229: 89 e5 mov %esp,%ebp 11722b: 56 push %esi 11722c: 53 push %ebx 11722d: 83 ec 20 sub $0x20,%esp 117230: 8b 5d 0c mov 0xc(%ebp),%ebx 117233: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117236: 85 db test %ebx,%ebx 117238: 74 72 je 1172ac return RTEMS_INVALID_ADDRESS; if ( !size ) 11723a: 85 f6 test %esi,%esi 11723c: 74 6e je 1172ac return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11723e: 83 ec 0c sub $0xc,%esp 117241: ff 35 10 f8 13 00 pushl 0x13f810 117247: e8 a4 20 00 00 call 1192f0 <_API_Mutex_Lock> 11724c: 83 c4 0c add $0xc,%esp 11724f: 8d 45 f4 lea -0xc(%ebp),%eax 117252: 50 push %eax 117253: ff 75 08 pushl 0x8(%ebp) 117256: 68 60 f6 13 00 push $0x13f660 11725b: e8 88 38 00 00 call 11aae8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117260: 83 c4 10 add $0x10,%esp 117263: 8b 55 f4 mov -0xc(%ebp),%edx 117266: 85 d2 test %edx,%edx 117268: 75 36 jne 1172a0 case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 11726a: 52 push %edx 11726b: 56 push %esi 11726c: 53 push %ebx 11726d: 83 c0 68 add $0x68,%eax 117270: 50 push %eax 117271: e8 d6 32 00 00 call 11a54c <_Heap_Size_of_alloc_area> 117276: 83 c4 10 add $0x10,%esp 117279: 84 c0 test %al,%al 11727b: 74 3b je 1172b8 <== ALWAYS TAKEN 11727d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11727f: 83 ec 0c sub $0xc,%esp 117282: ff 35 10 f8 13 00 pushl 0x13f810 117288: 89 45 e4 mov %eax,-0x1c(%ebp) 11728b: e8 a8 20 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 117290: 83 c4 10 add $0x10,%esp 117293: 8b 45 e4 mov -0x1c(%ebp),%eax } 117296: 8d 65 f8 lea -0x8(%ebp),%esp 117299: 5b pop %ebx 11729a: 5e pop %esi 11729b: c9 leave 11729c: c3 ret 11729d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 1172a0: 4a dec %edx 1172a1: 75 da jne 11727d <== ALWAYS TAKEN 1172a3: b8 04 00 00 00 mov $0x4,%eax 1172a8: eb d5 jmp 11727f <== ALWAYS TAKEN 1172aa: 66 90 xchg %ax,%ax <== NOT EXECUTED return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1172ac: b8 09 00 00 00 mov $0x9,%eax } 1172b1: 8d 65 f8 lea -0x8(%ebp),%esp 1172b4: 5b pop %ebx 1172b5: 5e pop %esi 1172b6: c9 leave 1172b7: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 1172b8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 1172bd: eb c0 jmp 11727f <== NOT EXECUTED 001172e4 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 1172e4: 55 push %ebp 1172e5: 89 e5 mov %esp,%ebp 1172e7: 56 push %esi 1172e8: 53 push %ebx 1172e9: 83 ec 20 sub $0x20,%esp 1172ec: 8b 5d 14 mov 0x14(%ebp),%ebx uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 1172ef: 85 db test %ebx,%ebx 1172f1: 0f 84 a5 00 00 00 je 11739c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1172f7: 83 ec 0c sub $0xc,%esp 1172fa: ff 35 10 f8 13 00 pushl 0x13f810 117300: e8 eb 1f 00 00 call 1192f0 <_API_Mutex_Lock> 117305: 83 c4 0c add $0xc,%esp 117308: 8d 45 f0 lea -0x10(%ebp),%eax 11730b: 50 push %eax 11730c: ff 75 08 pushl 0x8(%ebp) 11730f: 68 60 f6 13 00 push $0x13f660 117314: e8 cf 37 00 00 call 11aae8 <_Objects_Get_no_protection> 117319: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 11731b: 83 c4 10 add $0x10,%esp 11731e: 8b 45 f0 mov -0x10(%ebp),%eax 117321: 85 c0 test %eax,%eax 117323: 74 1f je 117344 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117325: 83 ec 0c sub $0xc,%esp 117328: ff 35 10 f8 13 00 pushl 0x13f810 11732e: e8 05 20 00 00 call 119338 <_API_Mutex_Unlock> 117333: b8 04 00 00 00 mov $0x4,%eax return return_status; 117338: 83 c4 10 add $0x10,%esp } 11733b: 8d 65 f8 lea -0x8(%ebp),%esp 11733e: 5b pop %ebx 11733f: 5e pop %esi 117340: c9 leave 117341: c3 ret 117342: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 117344: 83 ec 0c sub $0xc,%esp 117347: 8d 45 f4 lea -0xc(%ebp),%eax 11734a: 50 push %eax 11734b: 8d 45 ec lea -0x14(%ebp),%eax 11734e: 50 push %eax 11734f: ff 75 10 pushl 0x10(%ebp) 117352: ff 75 0c pushl 0xc(%ebp) 117355: 8d 46 68 lea 0x68(%esi),%eax 117358: 50 push %eax 117359: e8 e2 30 00 00 call 11a440 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11735e: 8b 55 ec mov -0x14(%ebp),%edx 117361: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 117363: 83 c4 20 add $0x20,%esp 117366: 85 c0 test %eax,%eax 117368: 75 16 jne 117380 _Region_Process_queue( the_region ); /* unlocks allocator */ 11736a: 83 ec 0c sub $0xc,%esp 11736d: 56 push %esi 11736e: e8 55 6d 00 00 call 11e0c8 <_Region_Process_queue> 117373: 31 c0 xor %eax,%eax 117375: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 117378: 8d 65 f8 lea -0x8(%ebp),%esp 11737b: 5b pop %ebx 11737c: 5e pop %esi 11737d: c9 leave 11737e: c3 ret 11737f: 90 nop <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 117380: 83 ec 0c sub $0xc,%esp 117383: ff 35 10 f8 13 00 pushl 0x13f810 117389: 89 45 e4 mov %eax,-0x1c(%ebp) 11738c: e8 a7 1f 00 00 call 119338 <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 117391: 83 c4 10 add $0x10,%esp 117394: 8b 45 e4 mov -0x1c(%ebp),%eax 117397: 83 f8 01 cmp $0x1,%eax 11739a: 74 0c je 1173a8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 11739c: b8 09 00 00 00 mov $0x9,%eax } 1173a1: 8d 65 f8 lea -0x8(%ebp),%esp 1173a4: 5b pop %ebx 1173a5: 5e pop %esi 1173a6: c9 leave 1173a7: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1173a8: b0 0d mov $0xd,%al 1173aa: eb 8f jmp 11733b <== ALWAYS TAKEN 001173ac : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 1173ac: 55 push %ebp 1173ad: 89 e5 mov %esp,%ebp 1173af: 53 push %ebx 1173b0: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 1173b3: ff 35 10 f8 13 00 pushl 0x13f810 1173b9: e8 32 1f 00 00 call 1192f0 <_API_Mutex_Lock> 1173be: 83 c4 0c add $0xc,%esp 1173c1: 8d 45 f4 lea -0xc(%ebp),%eax 1173c4: 50 push %eax 1173c5: ff 75 08 pushl 0x8(%ebp) 1173c8: 68 60 f6 13 00 push $0x13f660 1173cd: e8 16 37 00 00 call 11aae8 <_Objects_Get_no_protection> 1173d2: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 1173d4: 83 c4 10 add $0x10,%esp 1173d7: 8b 45 f4 mov -0xc(%ebp),%eax 1173da: 85 c0 test %eax,%eax 1173dc: 74 1e je 1173fc 1173de: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1173e3: 83 ec 0c sub $0xc,%esp 1173e6: ff 35 10 f8 13 00 pushl 0x13f810 1173ec: e8 47 1f 00 00 call 119338 <_API_Mutex_Unlock> return return_status; 1173f1: 83 c4 10 add $0x10,%esp } 1173f4: 89 d8 mov %ebx,%eax 1173f6: 8b 5d fc mov -0x4(%ebp),%ebx 1173f9: c9 leave 1173fa: c3 ret 1173fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 1173fc: 83 ec 08 sub $0x8,%esp 1173ff: ff 75 0c pushl 0xc(%ebp) 117402: 8d 43 68 lea 0x68(%ebx),%eax 117405: 50 push %eax 117406: e8 b9 2a 00 00 call 119ec4 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 11740b: 83 c4 10 add $0x10,%esp 11740e: 84 c0 test %al,%al 117410: 75 0a jne 11741c else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 117412: bb 09 00 00 00 mov $0x9,%ebx 117417: eb ca jmp 1173e3 <== ALWAYS TAKEN 117419: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; 11741c: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 11741f: 83 ec 0c sub $0xc,%esp 117422: 53 push %ebx 117423: e8 a0 6c 00 00 call 11e0c8 <_Region_Process_queue> 117428: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 11742a: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 11742d: 89 d8 mov %ebx,%eax 11742f: 8b 5d fc mov -0x4(%ebp),%ebx 117432: c9 leave 117433: c3 ret 0010b2e8 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10b2e8: 55 push %ebp 10b2e9: 89 e5 mov %esp,%ebp 10b2eb: 57 push %edi 10b2ec: 56 push %esi 10b2ed: 53 push %ebx 10b2ee: 83 ec 3c sub $0x3c,%esp 10b2f1: 8b 75 08 mov 0x8(%ebp),%esi 10b2f4: 8b 5d 10 mov 0x10(%ebp),%ebx 10b2f7: 8b 7d 18 mov 0x18(%ebp),%edi register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) 10b2fa: 85 f6 test %esi,%esi 10b2fc: 74 4a je 10b348 return RTEMS_INVALID_NAME; if ( !id ) 10b2fe: 85 ff test %edi,%edi 10b300: 0f 84 f6 00 00 00 je 10b3fc return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10b306: 89 da mov %ebx,%edx 10b308: 81 e2 c0 00 00 00 and $0xc0,%edx 10b30e: 74 48 je 10b358 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b310: 89 d8 mov %ebx,%eax 10b312: 83 e0 30 and $0x30,%eax 10b315: 83 f8 10 cmp $0x10,%eax 10b318: 74 0e je 10b328 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b31a: b8 0b 00 00 00 mov $0xb,%eax } 10b31f: 8d 65 f4 lea -0xc(%ebp),%esp 10b322: 5b pop %ebx 10b323: 5e pop %esi 10b324: 5f pop %edi 10b325: c9 leave 10b326: c3 ret 10b327: 90 nop <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10b328: f6 c3 04 test $0x4,%bl 10b32b: 74 ed je 10b31a _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10b32d: 81 fa c0 00 00 00 cmp $0xc0,%edx 10b333: 74 e5 je 10b31a 10b335: b9 10 00 00 00 mov $0x10,%ecx _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b33a: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b33e: 76 1f jbe 10b35f 10b340: b8 0a 00 00 00 mov $0xa,%eax 10b345: eb d8 jmp 10b31f <== ALWAYS TAKEN 10b347: 90 nop <== NOT EXECUTED 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 ) ) 10b348: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10b34d: 8d 65 f4 lea -0xc(%ebp),%esp 10b350: 5b pop %ebx 10b351: 5e pop %esi 10b352: 5f pop %edi 10b353: c9 leave 10b354: c3 ret 10b355: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 10b358: 89 d9 mov %ebx,%ecx 10b35a: 83 e1 30 and $0x30,%ecx 10b35d: 75 db jne 10b33a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b35f: a1 38 53 12 00 mov 0x125338,%eax 10b364: 40 inc %eax 10b365: a3 38 53 12 00 mov %eax,0x125338 * 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 ); 10b36a: 83 ec 0c sub $0xc,%esp 10b36d: 68 80 52 12 00 push $0x125280 10b372: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b375: e8 46 13 00 00 call 10c6c0 <_Objects_Allocate> 10b37a: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10b37c: 83 c4 10 add $0x10,%esp 10b37f: 85 c0 test %eax,%eax 10b381: 8b 4d c4 mov -0x3c(%ebp),%ecx 10b384: 0f 84 ba 00 00 00 je 10b444 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10b38a: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10b38d: 85 c9 test %ecx,%ecx 10b38f: 74 77 je 10b408 /* * 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; 10b391: 31 c0 xor %eax,%eax 10b393: f6 c3 04 test $0x4,%bl 10b396: 0f 95 c0 setne %al 10b399: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10b39c: 83 f9 10 cmp $0x10,%ecx 10b39f: 0f 84 ae 00 00 00 je 10b453 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 10b3a5: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b3ac: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10b3b0: 50 push %eax 10b3b1: 31 c0 xor %eax,%eax 10b3b3: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10b3b7: 0f 94 c0 sete %al 10b3ba: 50 push %eax 10b3bb: 8d 45 d0 lea -0x30(%ebp),%eax 10b3be: 50 push %eax 10b3bf: 8d 42 14 lea 0x14(%edx),%eax 10b3c2: 50 push %eax 10b3c3: 89 55 c4 mov %edx,-0x3c(%ebp) 10b3c6: e8 65 0b 00 00 call 10bf30 <_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 ) { 10b3cb: 83 c4 10 add $0x10,%esp 10b3ce: 83 f8 06 cmp $0x6,%eax 10b3d1: 8b 55 c4 mov -0x3c(%ebp),%edx 10b3d4: 0f 84 a9 00 00 00 je 10b483 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b3da: 8b 42 08 mov 0x8(%edx),%eax 10b3dd: 0f b7 d8 movzwl %ax,%ebx 10b3e0: 8b 0d 9c 52 12 00 mov 0x12529c,%ecx 10b3e6: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10b3e9: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10b3ec: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10b3ee: e8 c5 1f 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b3f3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b3f5: e9 25 ff ff ff jmp 10b31f <== ALWAYS TAKEN 10b3fa: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10b3fc: b8 09 00 00 00 mov $0x9,%eax 10b401: e9 19 ff ff ff jmp 10b31f <== ALWAYS TAKEN 10b406: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10b408: 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; 10b40f: 31 c0 xor %eax,%eax 10b411: f6 c3 04 test $0x4,%bl 10b414: 0f 95 c0 setne %al 10b417: 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; 10b41a: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10b421: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10b428: 51 push %ecx 10b429: ff 75 0c pushl 0xc(%ebp) 10b42c: 8d 45 e0 lea -0x20(%ebp),%eax 10b42f: 50 push %eax 10b430: 8d 42 14 lea 0x14(%edx),%eax 10b433: 50 push %eax 10b434: 89 55 c4 mov %edx,-0x3c(%ebp) 10b437: e8 98 0d 00 00 call 10c1d4 <_CORE_semaphore_Initialize> 10b43c: 83 c4 10 add $0x10,%esp 10b43f: 8b 55 c4 mov -0x3c(%ebp),%edx 10b442: eb 96 jmp 10b3da <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10b444: e8 6f 1f 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b449: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b44e: e9 cc fe ff ff jmp 10b31f <== ALWAYS TAKEN the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; 10b453: 8b 45 14 mov 0x14(%ebp),%eax 10b456: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10b459: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10b460: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10b464: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10b468: 0f 85 42 ff ff ff jne 10b3b0 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10b46e: f6 c3 40 test $0x40,%bl 10b471: 74 30 je 10b4a3 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10b473: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b47a: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b47e: e9 2d ff ff ff jmp 10b3b0 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b483: 83 ec 08 sub $0x8,%esp 10b486: 52 push %edx 10b487: 68 80 52 12 00 push $0x125280 10b48c: e8 af 15 00 00 call 10ca40 <_Objects_Free> (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 10b491: e8 22 1f 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b496: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10b49b: 83 c4 10 add $0x10,%esp 10b49e: e9 7c fe ff ff jmp 10b31f <== ALWAYS TAKEN if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { 10b4a3: 84 db test %bl,%bl 10b4a5: 0f 89 05 ff ff ff jns 10b3b0 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10b4ab: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10b4b2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10b4b6: e9 f5 fe ff ff jmp 10b3b0 <== ALWAYS TAKEN 0010b4bc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10b4bc: 55 push %ebp 10b4bd: 89 e5 mov %esp,%ebp 10b4bf: 53 push %ebx 10b4c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b4c3: 8d 45 f4 lea -0xc(%ebp),%eax 10b4c6: 50 push %eax 10b4c7: ff 75 08 pushl 0x8(%ebp) 10b4ca: 68 80 52 12 00 push $0x125280 10b4cf: e8 9c 16 00 00 call 10cb70 <_Objects_Get> 10b4d4: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b4d6: 83 c4 10 add $0x10,%esp 10b4d9: 8b 4d f4 mov -0xc(%ebp),%ecx 10b4dc: 85 c9 test %ecx,%ecx 10b4de: 74 0c je 10b4ec 10b4e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b4e5: 8b 5d fc mov -0x4(%ebp),%ebx 10b4e8: c9 leave 10b4e9: c3 ret 10b4ea: 66 90 xchg %ax,%ax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 10b4ec: 8b 40 10 mov 0x10(%eax),%eax the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b4ef: 83 e0 30 and $0x30,%eax 10b4f2: 74 58 je 10b54c if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10b4f4: 8b 53 64 mov 0x64(%ebx),%edx 10b4f7: 85 d2 test %edx,%edx 10b4f9: 75 15 jne 10b510 10b4fb: 83 f8 20 cmp $0x20,%eax 10b4fe: 74 10 je 10b510 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10b500: e8 b3 1e 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b505: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b50a: 8b 5d fc mov -0x4(%ebp),%ebx 10b50d: c9 leave 10b50e: c3 ret 10b50f: 90 nop <== NOT EXECUTED !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10b510: 50 push %eax 10b511: 6a 04 push $0x4 10b513: 6a 00 push $0x0 10b515: 8d 43 14 lea 0x14(%ebx),%eax 10b518: 50 push %eax 10b519: e8 06 0a 00 00 call 10bf24 <_CORE_mutex_Flush> <== ALWAYS TAKEN 10b51e: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10b521: 83 ec 08 sub $0x8,%esp 10b524: 53 push %ebx 10b525: 68 80 52 12 00 push $0x125280 10b52a: e8 0d 12 00 00 call 10c73c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10b52f: 58 pop %eax 10b530: 5a pop %edx 10b531: 53 push %ebx 10b532: 68 80 52 12 00 push $0x125280 10b537: e8 04 15 00 00 call 10ca40 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b53c: e8 77 1e 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b541: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b543: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b546: 8b 5d fc mov -0x4(%ebp),%ebx 10b549: c9 leave 10b54a: c3 ret 10b54b: 90 nop <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10b54c: 51 push %ecx 10b54d: 6a 02 push $0x2 10b54f: 6a 00 push $0x0 10b551: 8d 43 14 lea 0x14(%ebx),%eax 10b554: 50 push %eax 10b555: e8 6e 0c 00 00 call 10c1c8 <_CORE_semaphore_Flush> 10b55a: 83 c4 10 add $0x10,%esp 10b55d: eb c2 jmp 10b521 <== ALWAYS TAKEN 00114a88 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 114a88: 55 push %ebp 114a89: 89 e5 mov %esp,%ebp 114a8b: 83 ec 1c sub $0x1c,%esp 114a8e: 8d 45 f4 lea -0xc(%ebp),%eax 114a91: 50 push %eax 114a92: ff 75 08 pushl 0x8(%ebp) 114a95: 68 40 b4 12 00 push $0x12b440 114a9a: e8 fd 99 ff ff call 10e49c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 114a9f: 83 c4 10 add $0x10,%esp 114aa2: 8b 55 f4 mov -0xc(%ebp),%edx 114aa5: 85 d2 test %edx,%edx 114aa7: 74 07 je 114ab0 114aa9: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114aae: c9 leave 114aaf: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 114ab0: f6 40 10 30 testb $0x30,0x10(%eax) 114ab4: 75 1a jne 114ad0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 114ab6: 52 push %edx 114ab7: 6a 01 push $0x1 114ab9: 6a 00 push $0x0 114abb: 83 c0 14 add $0x14,%eax 114abe: 50 push %eax 114abf: e8 d8 8f ff ff call 10da9c <_CORE_semaphore_Flush> 114ac4: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 114ac7: e8 98 a2 ff ff call 10ed64 <_Thread_Enable_dispatch> 114acc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114ace: c9 leave 114acf: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 114ad0: 51 push %ecx 114ad1: 6a 01 push $0x1 114ad3: 6a 00 push $0x0 114ad5: 83 c0 14 add $0x14,%eax 114ad8: 50 push %eax 114ad9: e8 1a 8d ff ff call 10d7f8 <_CORE_mutex_Flush> <== ALWAYS TAKEN 114ade: 83 c4 10 add $0x10,%esp 114ae1: eb e4 jmp 114ac7 <== ALWAYS TAKEN 0010b560 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10b560: 55 push %ebp 10b561: 89 e5 mov %esp,%ebp 10b563: 57 push %edi 10b564: 56 push %esi 10b565: 53 push %ebx 10b566: 83 ec 1c sub $0x1c,%esp 10b569: 8b 5d 08 mov 0x8(%ebp),%ebx 10b56c: 8b 75 0c mov 0xc(%ebp),%esi 10b56f: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10b572: 8d 45 e0 lea -0x20(%ebp),%eax 10b575: 50 push %eax 10b576: 8d 45 e4 lea -0x1c(%ebp),%eax 10b579: 50 push %eax 10b57a: 53 push %ebx 10b57b: 68 80 52 12 00 push $0x125280 10b580: e8 93 15 00 00 call 10cb18 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10b585: 83 c4 10 add $0x10,%esp 10b588: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b58b: 85 c9 test %ecx,%ecx 10b58d: 74 0d je 10b59c 10b58f: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10b594: 8d 65 f4 lea -0xc(%ebp),%esp 10b597: 5b pop %ebx 10b598: 5e pop %esi 10b599: 5f pop %edi 10b59a: c9 leave 10b59b: c3 ret the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b59c: f6 40 10 30 testb $0x30,0x10(%eax) 10b5a0: 74 36 je 10b5d8 _CORE_mutex_Seize( 10b5a2: 83 ec 0c sub $0xc,%esp 10b5a5: ff 75 e0 pushl -0x20(%ebp) 10b5a8: 57 push %edi 10b5a9: 83 e6 01 and $0x1,%esi 10b5ac: 83 f6 01 xor $0x1,%esi 10b5af: 56 push %esi 10b5b0: 53 push %ebx 10b5b1: 83 c0 14 add $0x14,%eax 10b5b4: 50 push %eax 10b5b5: e8 6e 0a 00 00 call 10c028 <_CORE_mutex_Seize> <== ALWAYS TAKEN id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10b5ba: 83 c4 14 add $0x14,%esp 10b5bd: a1 f8 53 12 00 mov 0x1253f8,%eax 10b5c2: ff 70 34 pushl 0x34(%eax) 10b5c5: e8 12 01 00 00 call 10b6dc <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10b5ca: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b5cd: 8d 65 f4 lea -0xc(%ebp),%esp 10b5d0: 5b pop %ebx 10b5d1: 5e pop %esi 10b5d2: 5f pop %edi 10b5d3: c9 leave 10b5d4: c3 ret 10b5d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10b5d8: 8b 15 f8 53 12 00 mov 0x1253f8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10b5de: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10b5e5: 8b 48 5c mov 0x5c(%eax),%ecx 10b5e8: 85 c9 test %ecx,%ecx 10b5ea: 75 2c jne 10b618 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10b5ec: 83 e6 01 and $0x1,%esi 10b5ef: 74 33 je 10b624 _ISR_Enable( *level_p ); 10b5f1: ff 75 e0 pushl -0x20(%ebp) 10b5f4: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10b5f5: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 10b5fc: 83 ec 0c sub $0xc,%esp 10b5ff: a1 f8 53 12 00 mov 0x1253f8,%eax 10b604: ff 70 34 pushl 0x34(%eax) 10b607: e8 e0 00 00 00 call 10b6ec <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN 10b60c: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10b60f: 8d 65 f4 lea -0xc(%ebp),%esp 10b612: 5b pop %ebx 10b613: 5e pop %esi 10b614: 5f pop %edi 10b615: c9 leave 10b616: c3 ret 10b617: 90 nop <== NOT EXECUTED /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 10b618: 49 dec %ecx 10b619: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10b61c: ff 75 e0 pushl -0x20(%ebp) 10b61f: 9d popf 10b620: eb da jmp 10b5fc <== ALWAYS TAKEN 10b622: 66 90 xchg %ax,%ax <== NOT EXECUTED 10b624: 8b 0d 38 53 12 00 mov 0x125338,%ecx 10b62a: 41 inc %ecx 10b62b: 89 0d 38 53 12 00 mov %ecx,0x125338 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; 10b631: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 10b638: 83 c0 14 add $0x14,%eax 10b63b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10b63e: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10b641: ff 75 e0 pushl -0x20(%ebp) 10b644: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10b645: 52 push %edx 10b646: 68 9c db 10 00 push $0x10db9c 10b64b: 57 push %edi 10b64c: 50 push %eax 10b64d: e8 3a 22 00 00 call 10d88c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b652: e8 61 1d 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b657: 83 c4 10 add $0x10,%esp 10b65a: eb a0 jmp 10b5fc <== ALWAYS TAKEN 0010b65c : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10b65c: 55 push %ebp 10b65d: 89 e5 mov %esp,%ebp 10b65f: 53 push %ebx 10b660: 83 ec 18 sub $0x18,%esp 10b663: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10b666: 8d 45 f4 lea -0xc(%ebp),%eax 10b669: 50 push %eax 10b66a: 53 push %ebx 10b66b: 68 80 52 12 00 push $0x125280 10b670: e8 fb 14 00 00 call 10cb70 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10b675: 83 c4 10 add $0x10,%esp 10b678: 8b 55 f4 mov -0xc(%ebp),%edx 10b67b: 85 d2 test %edx,%edx 10b67d: 74 0d je 10b68c 10b67f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b684: 8b 5d fc mov -0x4(%ebp),%ebx 10b687: c9 leave 10b688: c3 ret 10b689: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 10b68c: f6 40 10 30 testb $0x30,0x10(%eax) 10b690: 75 26 jne 10b6b8 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10b692: 52 push %edx 10b693: 6a 00 push $0x0 10b695: 53 push %ebx 10b696: 83 c0 14 add $0x14,%eax 10b699: 50 push %eax 10b69a: e8 75 0b 00 00 call 10c214 <_CORE_semaphore_Surrender> 10b69f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6a1: e8 12 1d 00 00 call 10d3b8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10b6a6: 89 1c 24 mov %ebx,(%esp) 10b6a9: e8 3e 00 00 00 call 10b6ec <_Semaphore_Translate_core_semaphore_return_code> <== ALWAYS TAKEN &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10b6ae: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6b1: 8b 5d fc mov -0x4(%ebp),%ebx 10b6b4: c9 leave 10b6b5: c3 ret 10b6b6: 66 90 xchg %ax,%ax <== NOT EXECUTED the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { mutex_status = _CORE_mutex_Surrender( 10b6b8: 51 push %ecx 10b6b9: 6a 00 push $0x0 10b6bb: 53 push %ebx 10b6bc: 83 c0 14 add $0x14,%eax 10b6bf: 50 push %eax 10b6c0: e8 03 0a 00 00 call 10c0c8 <_CORE_mutex_Surrender> <== ALWAYS TAKEN 10b6c5: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6c7: e8 ec 1c 00 00 call 10d3b8 <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10b6cc: 89 1c 24 mov %ebx,(%esp) 10b6cf: e8 08 00 00 00 call 10b6dc <_Semaphore_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10b6d4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b6d7: 8b 5d fc mov -0x4(%ebp),%ebx 10b6da: c9 leave 10b6db: c3 ret 0010c5ec : rtems_status_code rtems_signal_catch( rtems_asr_entry asr_handler, rtems_mode mode_set ) { 10c5ec: 55 push %ebp 10c5ed: 89 e5 mov %esp,%ebp 10c5ef: 83 ec 08 sub $0x8,%esp 10c5f2: 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 ]; 10c5f5: a1 98 85 12 00 mov 0x128598,%eax 10c5fa: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10c600: 8b 0d d8 84 12 00 mov 0x1284d8,%ecx 10c606: 41 inc %ecx 10c607: 89 0d d8 84 12 00 mov %ecx,0x1284d8 asr = &api->Signal; _Thread_Disable_dispatch(); /* cannot reschedule while */ /* the thread is inconsistent */ if ( !_ASR_Is_null_handler( asr_handler ) ) { 10c60d: 85 d2 test %edx,%edx 10c60f: 74 13 je 10c624 asr->mode_set = mode_set; 10c611: 8b 4d 0c mov 0xc(%ebp),%ecx 10c614: 89 48 10 mov %ecx,0x10(%eax) asr->handler = asr_handler; 10c617: 89 50 0c mov %edx,0xc(%eax) } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c61a: e8 45 20 00 00 call 10e664 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c61f: 31 c0 xor %eax,%eax 10c621: c9 leave 10c622: c3 ret 10c623: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 10c624: c6 40 08 00 movb $0x0,0x8(%eax) information->handler = NULL; 10c628: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) information->mode_set = RTEMS_DEFAULT_MODES; 10c62f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) information->signals_posted = 0; 10c636: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) information->signals_pending = 0; 10c63d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) information->nest_level = 0; 10c644: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) asr->mode_set = mode_set; asr->handler = asr_handler; } else _ASR_Initialize( asr ); _Thread_Enable_dispatch(); 10c64b: e8 14 20 00 00 call 10e664 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10c650: 31 c0 xor %eax,%eax 10c652: c9 leave 10c653: c3 ret 00117908 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 117908: 55 push %ebp 117909: 89 e5 mov %esp,%ebp 11790b: 53 push %ebx 11790c: 83 ec 14 sub $0x14,%esp 11790f: 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 ) 117912: 85 db test %ebx,%ebx 117914: 75 0a jne 117920 117916: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11791b: 8b 5d fc mov -0x4(%ebp),%ebx 11791e: c9 leave 11791f: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 117920: 83 ec 08 sub $0x8,%esp 117923: 8d 45 f4 lea -0xc(%ebp),%eax 117926: 50 push %eax 117927: ff 75 08 pushl 0x8(%ebp) 11792a: e8 f5 3a 00 00 call 11b424 <_Thread_Get> switch ( location ) { 11792f: 83 c4 10 add $0x10,%esp 117932: 8b 55 f4 mov -0xc(%ebp),%edx 117935: 85 d2 test %edx,%edx 117937: 74 0b je 117944 117939: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11793e: 8b 5d fc mov -0x4(%ebp),%ebx 117941: c9 leave 117942: c3 ret 117943: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 117944: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx asr = &api->Signal; 11794a: 8b 4a 0c mov 0xc(%edx),%ecx 11794d: 85 c9 test %ecx,%ecx 11794f: 74 43 je 117994 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 117951: 80 7a 08 00 cmpb $0x0,0x8(%edx) 117955: 74 29 je 117980 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117957: 9c pushf 117958: fa cli 117959: 59 pop %ecx *signal_set |= signals; 11795a: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 11795d: 51 push %ecx 11795e: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 11795f: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 117963: 8b 15 f4 f7 13 00 mov 0x13f7f4,%edx 117969: 85 d2 test %edx,%edx 11796b: 74 1b je 117988 11796d: 3b 05 18 f8 13 00 cmp 0x13f818,%eax 117973: 75 13 jne 117988 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 117975: c6 05 c8 f8 13 00 01 movb $0x1,0x13f8c8 11797c: eb 0a jmp 117988 <== ALWAYS TAKEN 11797e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 117980: 9c pushf 117981: fa cli 117982: 58 pop %eax *signal_set |= signals; 117983: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 117986: 50 push %eax 117987: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 117988: e8 47 3a 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11798d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11798f: 8b 5d fc mov -0x4(%ebp),%ebx 117992: c9 leave 117993: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117994: e8 3b 3a 00 00 call 11b3d4 <_Thread_Enable_dispatch> 117999: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 11799e: e9 78 ff ff ff jmp 11791b <== ALWAYS TAKEN 0010b6fc : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10b6fc: 55 push %ebp 10b6fd: 89 e5 mov %esp,%ebp 10b6ff: 57 push %edi 10b700: 56 push %esi 10b701: 53 push %ebx 10b702: 83 ec 1c sub $0x1c,%esp 10b705: 8b 5d 08 mov 0x8(%ebp),%ebx 10b708: 8b 4d 0c mov 0xc(%ebp),%ecx 10b70b: 8b 7d 18 mov 0x18(%ebp),%edi 10b70e: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b711: 85 f6 test %esi,%esi 10b713: 0f 84 37 01 00 00 je 10b850 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b719: 85 db test %ebx,%ebx 10b71b: 0f 84 cb 00 00 00 je 10b7ec /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10b721: 66 85 ff test %di,%di 10b724: 78 1d js 10b743 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10b726: 85 c9 test %ecx,%ecx 10b728: 75 0e jne 10b738 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10b72a: b8 13 00 00 00 mov $0x13,%eax } 10b72f: 8d 65 f4 lea -0xc(%ebp),%esp 10b732: 5b pop %ebx 10b733: 5e pop %esi 10b734: 5f pop %edi 10b735: c9 leave 10b736: c3 ret 10b737: 90 nop <== NOT EXECUTED 10b738: 0f b6 05 14 12 12 00 movzbl 0x121214,%eax 10b73f: 39 c1 cmp %eax,%ecx 10b741: 77 e7 ja 10b72a */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b743: 83 ec 0c sub $0xc,%esp 10b746: ff 35 f0 53 12 00 pushl 0x1253f0 10b74c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b74f: e8 60 06 00 00 call 10bdb4 <_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 ); 10b754: c7 04 24 c0 52 12 00 movl $0x1252c0,(%esp) 10b75b: e8 60 0f 00 00 call 10c6c0 <_Objects_Allocate> <== ALWAYS TAKEN 10b760: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10b762: 83 c4 10 add $0x10,%esp 10b765: 85 c0 test %eax,%eax 10b767: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b76a: 0f 84 c0 00 00 00 je 10b830 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10b770: 50 push %eax 10b771: 53 push %ebx 10b772: 8b 45 14 mov 0x14(%ebp),%eax 10b775: 83 e0 01 and $0x1,%eax 10b778: 50 push %eax 10b779: 6a 00 push $0x0 10b77b: 8b 45 14 mov 0x14(%ebp),%eax 10b77e: c1 e8 09 shr $0x9,%eax 10b781: 83 e0 01 and $0x1,%eax 10b784: 50 push %eax 10b785: 8b 45 14 mov 0x14(%ebp),%eax 10b788: c1 e8 08 shr $0x8,%eax 10b78b: 83 f0 01 xor $0x1,%eax 10b78e: 83 e0 01 and $0x1,%eax 10b791: 50 push %eax 10b792: 51 push %ecx 10b793: 83 e7 01 and $0x1,%edi 10b796: 57 push %edi 10b797: ff 75 10 pushl 0x10(%ebp) 10b79a: 6a 00 push $0x0 10b79c: 52 push %edx 10b79d: 68 c0 52 12 00 push $0x1252c0 10b7a2: 89 55 e4 mov %edx,-0x1c(%ebp) 10b7a5: e8 aa 1c 00 00 call 10d454 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10b7aa: 83 c4 30 add $0x30,%esp 10b7ad: 84 c0 test %al,%al 10b7af: 8b 55 e4 mov -0x1c(%ebp),%edx 10b7b2: 74 48 je 10b7fc } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10b7b4: 8b 8a f0 00 00 00 mov 0xf0(%edx),%ecx 10b7ba: 8b 45 14 mov 0x14(%ebp),%eax 10b7bd: c1 e8 0a shr $0xa,%eax 10b7c0: 83 f0 01 xor $0x1,%eax 10b7c3: 83 e0 01 and $0x1,%eax 10b7c6: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10b7c9: 8b 42 08 mov 0x8(%edx),%eax 10b7cc: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10b7ce: 83 ec 0c sub $0xc,%esp 10b7d1: ff 35 f0 53 12 00 pushl 0x1253f0 10b7d7: e8 20 06 00 00 call 10bdfc <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b7dc: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7de: 83 c4 10 add $0x10,%esp } 10b7e1: 8d 65 f4 lea -0xc(%ebp),%esp 10b7e4: 5b pop %ebx 10b7e5: 5e pop %esi 10b7e6: 5f pop %edi 10b7e7: c9 leave 10b7e8: c3 ret 10b7e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10b7ec: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b7f1: 8d 65 f4 lea -0xc(%ebp),%esp 10b7f4: 5b pop %ebx 10b7f5: 5e pop %esi 10b7f6: 5f pop %edi 10b7f7: c9 leave 10b7f8: c3 ret 10b7f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10b7fc: 83 ec 0c sub $0xc,%esp 10b7ff: ff 72 08 pushl 0x8(%edx) 10b802: e8 a9 12 00 00 call 10cab0 <_Objects_Get_information_id> 10b807: 5a pop %edx 10b808: 59 pop %ecx 10b809: 8b 55 e4 mov -0x1c(%ebp),%edx 10b80c: 52 push %edx 10b80d: 50 push %eax 10b80e: e8 2d 12 00 00 call 10ca40 <_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(); 10b813: 58 pop %eax 10b814: ff 35 f0 53 12 00 pushl 0x1253f0 10b81a: e8 dd 05 00 00 call 10bdfc <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b81f: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10b824: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b827: 8d 65 f4 lea -0xc(%ebp),%esp 10b82a: 5b pop %ebx 10b82b: 5e pop %esi 10b82c: 5f pop %edi 10b82d: c9 leave 10b82e: c3 ret 10b82f: 90 nop <== NOT EXECUTED */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b830: 83 ec 0c sub $0xc,%esp 10b833: ff 35 f0 53 12 00 pushl 0x1253f0 10b839: e8 be 05 00 00 call 10bdfc <_API_Mutex_Unlock> <== ALWAYS TAKEN 10b83e: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10b843: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10b846: 8d 65 f4 lea -0xc(%ebp),%esp 10b849: 5b pop %ebx 10b84a: 5e pop %esi 10b84b: 5f pop %edi 10b84c: c9 leave 10b84d: c3 ret 10b84e: 66 90 xchg %ax,%ax <== NOT EXECUTED Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10b850: b8 09 00 00 00 mov $0x9,%eax 10b855: e9 d5 fe ff ff jmp 10b72f <== ALWAYS TAKEN 0010b85c : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10b85c: 55 push %ebp 10b85d: 89 e5 mov %esp,%ebp 10b85f: 53 push %ebx 10b860: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10b863: ff 35 f0 53 12 00 pushl 0x1253f0 10b869: e8 46 05 00 00 call 10bdb4 <_API_Mutex_Lock> <== ALWAYS TAKEN the_thread = _Thread_Get( id, &location ); 10b86e: 5a pop %edx 10b86f: 59 pop %ecx 10b870: 8d 45 f4 lea -0xc(%ebp),%eax 10b873: 50 push %eax 10b874: ff 75 08 pushl 0x8(%ebp) 10b877: e8 60 1b 00 00 call 10d3dc <_Thread_Get> 10b87c: 89 c3 mov %eax,%ebx switch ( location ) { 10b87e: 83 c4 10 add $0x10,%esp 10b881: 8b 45 f4 mov -0xc(%ebp),%eax 10b884: 85 c0 test %eax,%eax 10b886: 75 44 jne 10b8cc case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10b888: 83 ec 0c sub $0xc,%esp 10b88b: ff 73 08 pushl 0x8(%ebx) 10b88e: e8 1d 12 00 00 call 10cab0 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10b893: 5a pop %edx 10b894: 59 pop %ecx 10b895: 53 push %ebx 10b896: 50 push %eax 10b897: e8 08 18 00 00 call 10d0a4 <_Thread_Close> 10b89c: 58 pop %eax 10b89d: ff 73 08 pushl 0x8(%ebx) 10b8a0: e8 0b 12 00 00 call 10cab0 <_Objects_Get_information_id> 10b8a5: 5a pop %edx 10b8a6: 59 pop %ecx 10b8a7: 53 push %ebx 10b8a8: 50 push %eax 10b8a9: e8 92 11 00 00 call 10ca40 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ae: 58 pop %eax 10b8af: ff 35 f0 53 12 00 pushl 0x1253f0 10b8b5: e8 42 05 00 00 call 10bdfc <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b8ba: e8 f9 1a 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b8bf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b8c1: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10b8c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b8c7: c9 leave 10b8c8: c3 ret 10b8c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10b8cc: 83 ec 0c sub $0xc,%esp 10b8cf: ff 35 f0 53 12 00 pushl 0x1253f0 10b8d5: e8 22 05 00 00 call 10bdfc <_API_Mutex_Unlock> 10b8da: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10b8df: 83 c4 10 add $0x10,%esp } 10b8e2: 8b 5d fc mov -0x4(%ebp),%ebx 10b8e5: c9 leave 10b8e6: c3 ret 0010d2a8 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10d2a8: 55 push %ebp 10d2a9: 89 e5 mov %esp,%ebp 10d2ab: 56 push %esi 10d2ac: 53 push %ebx 10d2ad: 83 ec 10 sub $0x10,%esp 10d2b0: 8b 45 08 mov 0x8(%ebp),%eax 10d2b3: 8b 75 0c mov 0xc(%ebp),%esi 10d2b6: 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() ) 10d2b9: 80 3d 84 56 12 00 00 cmpb $0x0,0x125684 10d2c0: 74 6e je 10d330 return RTEMS_NOT_CONFIGURED; if ( !note ) 10d2c2: 85 db test %ebx,%ebx 10d2c4: 74 7e je 10d344 /* * 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 ) 10d2c6: 83 fe 0f cmp $0xf,%esi 10d2c9: 77 3d ja 10d308 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d2cb: 85 c0 test %eax,%eax 10d2cd: 74 45 je 10d314 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d2cf: 8b 15 78 9b 12 00 mov 0x129b78,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d2d5: 3b 42 08 cmp 0x8(%edx),%eax 10d2d8: 74 40 je 10d31a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d2da: 83 ec 08 sub $0x8,%esp 10d2dd: 8d 55 f4 lea -0xc(%ebp),%edx 10d2e0: 52 push %edx 10d2e1: 50 push %eax 10d2e2: e8 49 1e 00 00 call 10f130 <_Thread_Get> switch ( location ) { 10d2e7: 83 c4 10 add $0x10,%esp 10d2ea: 8b 55 f4 mov -0xc(%ebp),%edx 10d2ed: 85 d2 test %edx,%edx 10d2ef: 75 4b jne 10d33c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d2f1: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d2f7: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d2fb: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d2fd: e8 0a 1e 00 00 call 10f10c <_Thread_Enable_dispatch> 10d302: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d304: eb 07 jmp 10d30d <== ALWAYS TAKEN 10d306: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d308: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d30d: 8d 65 f8 lea -0x8(%ebp),%esp 10d310: 5b pop %ebx 10d311: 5e pop %esi 10d312: c9 leave 10d313: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d314: 8b 15 78 9b 12 00 mov 0x129b78,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10d31a: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d320: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d324: 89 03 mov %eax,(%ebx) 10d326: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d328: 8d 65 f8 lea -0x8(%ebp),%esp 10d32b: 5b pop %ebx 10d32c: 5e pop %esi 10d32d: c9 leave 10d32e: c3 ret 10d32f: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d330: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d335: 8d 65 f8 lea -0x8(%ebp),%esp 10d338: 5b pop %ebx 10d339: 5e pop %esi 10d33a: c9 leave 10d33b: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d33c: b8 04 00 00 00 mov $0x4,%eax 10d341: eb ca jmp 10d30d <== ALWAYS TAKEN 10d343: 90 nop <== NOT EXECUTED RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10d344: b8 09 00 00 00 mov $0x9,%eax 10d349: eb c2 jmp 10d30d <== ALWAYS TAKEN 0010b8e8 : rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { 10b8e8: 55 push %ebp 10b8e9: 89 e5 mov %esp,%ebp 10b8eb: 83 ec 08 sub $0x8,%esp 10b8ee: 8b 55 08 mov 0x8(%ebp),%edx 10b8f1: 8b 45 10 mov 0x10(%ebp),%eax Objects_Name_or_id_lookup_errors status; if ( !id ) 10b8f4: 85 c0 test %eax,%eax 10b8f6: 74 30 je 10b928 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { 10b8f8: 85 d2 test %edx,%edx 10b8fa: 75 10 jne 10b90c *id = _Thread_Executing->Object.id; 10b8fc: 8b 15 f8 53 12 00 mov 0x1253f8,%edx 10b902: 8b 52 08 mov 0x8(%edx),%edx 10b905: 89 10 mov %edx,(%eax) 10b907: 31 c0 xor %eax,%eax } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b909: c9 leave 10b90a: c3 ret 10b90b: 90 nop <== NOT EXECUTED if ( name == OBJECTS_ID_OF_SELF ) { *id = _Thread_Executing->Object.id; return RTEMS_SUCCESSFUL; } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); 10b90c: 50 push %eax 10b90d: ff 75 0c pushl 0xc(%ebp) 10b910: 52 push %edx 10b911: 68 c0 52 12 00 push $0x1252c0 10b916: e8 ad 13 00 00 call 10ccc8 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b91b: 8b 04 85 0c f9 11 00 mov 0x11f90c(,%eax,4),%eax 10b922: 83 c4 10 add $0x10,%esp } 10b925: c9 leave 10b926: c3 ret 10b927: 90 nop <== NOT EXECUTED rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) 10b928: b0 09 mov $0x9,%al } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } 10b92a: c9 leave 10b92b: c3 ret 00117cec : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 117cec: 55 push %ebp 117ced: 89 e5 mov %esp,%ebp 117cef: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 117cf2: 8d 45 f4 lea -0xc(%ebp),%eax 117cf5: 50 push %eax 117cf6: ff 75 08 pushl 0x8(%ebp) 117cf9: e8 26 37 00 00 call 11b424 <_Thread_Get> switch ( location ) { 117cfe: 83 c4 10 add $0x10,%esp 117d01: 8b 55 f4 mov -0xc(%ebp),%edx 117d04: 85 d2 test %edx,%edx 117d06: 74 08 je 117d10 117d08: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d0d: c9 leave 117d0e: c3 ret 117d0f: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 117d10: f6 40 10 02 testb $0x2,0x10(%eax) 117d14: 74 0e je 117d24 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 117d16: e8 b9 36 00 00 call 11b3d4 <_Thread_Enable_dispatch> 117d1b: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d20: c9 leave 117d21: c3 ret 117d22: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); 117d24: e8 ab 36 00 00 call 11b3d4 <_Thread_Enable_dispatch> 117d29: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d2b: c9 leave 117d2c: c3 ret 001119f4 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 1119f4: 55 push %ebp 1119f5: 89 e5 mov %esp,%ebp 1119f7: 57 push %edi 1119f8: 56 push %esi 1119f9: 53 push %ebx 1119fa: 83 ec 1c sub $0x1c,%esp 1119fd: 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 ) 111a00: 85 c9 test %ecx,%ecx 111a02: 0f 84 1c 01 00 00 je 111b24 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 111a08: 8b 1d f8 53 12 00 mov 0x1253f8,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111a0e: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 111a14: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 111a18: 19 f6 sbb %esi,%esi 111a1a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 111a20: 8b 53 7c mov 0x7c(%ebx),%edx 111a23: 85 d2 test %edx,%edx 111a25: 0f 85 b5 00 00 00 jne 111ae0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111a2b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 111a2f: 19 d2 sbb %edx,%edx 111a31: 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(); 111a37: 89 55 e4 mov %edx,-0x1c(%ebp) 111a3a: 89 4d e0 mov %ecx,-0x20(%ebp) 111a3d: e8 fa cc ff ff call 10e73c <_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; 111a42: 8b 55 e4 mov -0x1c(%ebp),%edx 111a45: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 111a47: 09 f0 or %esi,%eax 111a49: 8b 4d e0 mov -0x20(%ebp),%ecx 111a4c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 111a4e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 111a55: 74 0f je 111a66 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 111a57: 8b 45 08 mov 0x8(%ebp),%eax 111a5a: c1 e8 08 shr $0x8,%eax 111a5d: 83 f0 01 xor $0x1,%eax 111a60: 83 e0 01 and $0x1,%eax 111a63: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 111a66: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 111a6d: 74 18 je 111a87 if ( _Modes_Is_timeslice(mode_set) ) { 111a6f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 111a76: 74 74 je 111aec executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111a78: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 111a7f: a1 04 53 12 00 mov 0x125304,%eax 111a84: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111a87: f6 45 0c 01 testb $0x1,0xc(%ebp) 111a8b: 74 07 je 111a94 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 111a8d: f6 45 08 01 testb $0x1,0x8(%ebp) 111a91: 74 69 je 111afc 111a93: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 111a94: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 111a9b: 74 2c je 111ac9 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 111a9d: 8b 45 08 mov 0x8(%ebp),%eax 111aa0: c1 e8 0a shr $0xa,%eax 111aa3: 83 f0 01 xor $0x1,%eax 111aa6: 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; 111aa9: 38 47 08 cmp %al,0x8(%edi) 111aac: 74 1b je 111ac9 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; 111aae: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 111ab1: 9c pushf 111ab2: fa cli 111ab3: 58 pop %eax _signals = information->signals_pending; 111ab4: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 111ab7: 8b 4f 14 mov 0x14(%edi),%ecx 111aba: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 111abd: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 111ac0: 50 push %eax 111ac1: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 111ac2: 8b 47 14 mov 0x14(%edi),%eax 111ac5: 85 c0 test %eax,%eax 111ac7: 75 53 jne 111b1c 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; 111ac9: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 111acb: 83 3d 00 55 12 00 03 cmpl $0x3,0x125500 111ad2: 74 2c je 111b00 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 111ad4: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111ad6: 83 c4 1c add $0x1c,%esp 111ad9: 5b pop %ebx 111ada: 5e pop %esi 111adb: 5f pop %edi 111adc: c9 leave 111add: c3 ret 111ade: 66 90 xchg %ax,%ax <== NOT EXECUTED old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 111ae0: 81 ce 00 02 00 00 or $0x200,%esi 111ae6: e9 40 ff ff ff jmp 111a2b <== ALWAYS TAKEN 111aeb: 90 nop <== NOT EXECUTED if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111aec: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 111af3: f6 45 0c 01 testb $0x1,0xc(%ebp) 111af7: 74 9b je 111a94 111af9: eb 92 jmp 111a8d <== ALWAYS TAKEN 111afb: 90 nop <== NOT EXECUTED 111afc: fb sti 111afd: eb 95 jmp 111a94 111aff: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 111b00: e8 93 02 00 00 call 111d98 <_Thread_Evaluate_mode> <== ALWAYS TAKEN 111b05: 84 c0 test %al,%al 111b07: 75 04 jne 111b0d 111b09: 84 db test %bl,%bl 111b0b: 74 c7 je 111ad4 _Thread_Dispatch(); 111b0d: e8 4a b7 ff ff call 10d25c <_Thread_Dispatch> 111b12: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111b14: 83 c4 1c add $0x1c,%esp 111b17: 5b pop %ebx 111b18: 5e pop %esi 111b19: 5f pop %edi 111b1a: c9 leave 111b1b: c3 ret if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 111b1c: c6 43 74 01 movb $0x1,0x74(%ebx) 111b20: b3 01 mov $0x1,%bl 111b22: eb a7 jmp 111acb <== ALWAYS TAKEN ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 111b24: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 111b29: 83 c4 1c add $0x1c,%esp 111b2c: 5b pop %ebx 111b2d: 5e pop %esi 111b2e: 5f pop %edi 111b2f: c9 leave 111b30: c3 ret 0010c36c : rtems_status_code rtems_task_restart( rtems_id id, uint32_t argument ) { 10c36c: 55 push %ebp 10c36d: 89 e5 mov %esp,%ebp 10c36f: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c372: 8d 45 f4 lea -0xc(%ebp),%eax 10c375: 50 push %eax 10c376: ff 75 08 pushl 0x8(%ebp) 10c379: e8 36 1b 00 00 call 10deb4 <_Thread_Get> switch ( location ) { 10c37e: 83 c4 10 add $0x10,%esp 10c381: 8b 4d f4 mov -0xc(%ebp),%ecx 10c384: 85 c9 test %ecx,%ecx 10c386: 75 20 jne 10c3a8 case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 10c388: 52 push %edx 10c389: ff 75 0c pushl 0xc(%ebp) 10c38c: 6a 00 push $0x0 10c38e: 50 push %eax 10c38f: e8 18 23 00 00 call 10e6ac <_Thread_Restart> 10c394: 83 c4 10 add $0x10,%esp 10c397: 84 c0 test %al,%al 10c399: 75 15 jne 10c3b0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c39b: e8 f0 1a 00 00 call 10de90 <_Thread_Enable_dispatch> 10c3a0: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3a5: c9 leave 10c3a6: c3 ret 10c3a7: 90 nop <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c3a8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3ad: c9 leave 10c3ae: c3 ret 10c3af: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { _Thread_Enable_dispatch(); 10c3b0: e8 db 1a 00 00 call 10de90 <_Thread_Enable_dispatch> 10c3b5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c3b7: c9 leave 10c3b8: c3 ret 0010f0e8 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f0e8: 55 push %ebp 10f0e9: 89 e5 mov %esp,%ebp 10f0eb: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f0ee: 8d 45 f4 lea -0xc(%ebp),%eax 10f0f1: 50 push %eax 10f0f2: ff 75 08 pushl 0x8(%ebp) 10f0f5: e8 16 1c 00 00 call 110d10 <_Thread_Get> switch ( location ) { 10f0fa: 83 c4 10 add $0x10,%esp 10f0fd: 8b 55 f4 mov -0xc(%ebp),%edx 10f100: 85 d2 test %edx,%edx 10f102: 74 08 je 10f10c 10f104: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f109: c9 leave 10f10a: c3 ret 10f10b: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f10c: f6 40 10 02 testb $0x2,0x10(%eax) 10f110: 75 0e jne 10f120 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f112: e8 a9 1b 00 00 call 110cc0 <_Thread_Enable_dispatch> 10f117: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f11c: c9 leave 10f11d: c3 ret 10f11e: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, true ); 10f120: 83 ec 08 sub $0x8,%esp 10f123: 6a 01 push $0x1 10f125: 50 push %eax 10f126: e8 dd 23 00 00 call 111508 <_Thread_Resume> _Thread_Enable_dispatch(); 10f12b: e8 90 1b 00 00 call 110cc0 <_Thread_Enable_dispatch> 10f130: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f132: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f135: c9 leave 10f136: c3 ret 0010d420 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10d420: 55 push %ebp 10d421: 89 e5 mov %esp,%ebp 10d423: 56 push %esi 10d424: 53 push %ebx 10d425: 83 ec 10 sub $0x10,%esp 10d428: 8b 45 08 mov 0x8(%ebp),%eax 10d42b: 8b 5d 0c mov 0xc(%ebp),%ebx 10d42e: 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() ) 10d431: 80 3d 84 56 12 00 00 cmpb $0x0,0x125684 10d438: 74 66 je 10d4a0 /* * 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 ) 10d43a: 83 fb 0f cmp $0xf,%ebx 10d43d: 77 39 ja 10d478 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d43f: 85 c0 test %eax,%eax 10d441: 74 41 je 10d484 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10d443: 8b 15 78 9b 12 00 mov 0x129b78,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d449: 3b 42 08 cmp 0x8(%edx),%eax 10d44c: 74 3c je 10d48a api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10d44e: 83 ec 08 sub $0x8,%esp 10d451: 8d 55 f4 lea -0xc(%ebp),%edx 10d454: 52 push %edx 10d455: 50 push %eax 10d456: e8 d5 1c 00 00 call 10f130 <_Thread_Get> switch ( location ) { 10d45b: 83 c4 10 add $0x10,%esp 10d45e: 8b 55 f4 mov -0xc(%ebp),%edx 10d461: 85 d2 test %edx,%edx 10d463: 75 47 jne 10d4ac case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d465: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10d46b: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d46f: e8 98 1c 00 00 call 10f10c <_Thread_Enable_dispatch> 10d474: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d476: eb 05 jmp 10d47d <== ALWAYS TAKEN /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 10d478: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d47d: 8d 65 f8 lea -0x8(%ebp),%esp 10d480: 5b pop %ebx 10d481: 5e pop %esi 10d482: c9 leave 10d483: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10d484: 8b 15 78 9b 12 00 mov 0x129b78,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10d48a: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax 10d490: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10d494: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d496: 8d 65 f8 lea -0x8(%ebp),%esp 10d499: 5b pop %ebx 10d49a: 5e pop %esi 10d49b: c9 leave 10d49c: c3 ret 10d49d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10d4a0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4a5: 8d 65 f8 lea -0x8(%ebp),%esp 10d4a8: 5b pop %ebx 10d4a9: 5e pop %esi 10d4aa: c9 leave 10d4ab: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10d4ac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d4b1: 8d 65 f8 lea -0x8(%ebp),%esp 10d4b4: 5b pop %ebx 10d4b5: 5e pop %esi 10d4b6: c9 leave 10d4b7: c3 ret 0010fe6c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10fe6c: 55 push %ebp 10fe6d: 89 e5 mov %esp,%ebp 10fe6f: 56 push %esi 10fe70: 53 push %ebx 10fe71: 83 ec 10 sub $0x10,%esp 10fe74: 8b 5d 0c mov 0xc(%ebp),%ebx 10fe77: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10fe7a: 85 db test %ebx,%ebx 10fe7c: 74 0b je 10fe89 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10fe7e: 0f b6 05 f4 76 12 00 movzbl 0x1276f4,%eax 10fe85: 39 c3 cmp %eax,%ebx 10fe87: 77 5f ja 10fee8 <== ALWAYS TAKEN !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fe89: 85 f6 test %esi,%esi 10fe8b: 74 67 je 10fef4 <== ALWAYS TAKEN return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10fe8d: 83 ec 08 sub $0x8,%esp 10fe90: 8d 45 f4 lea -0xc(%ebp),%eax 10fe93: 50 push %eax 10fe94: ff 75 08 pushl 0x8(%ebp) 10fe97: e8 6c 1d 00 00 call 111c08 <_Thread_Get> switch ( location ) { 10fe9c: 83 c4 10 add $0x10,%esp 10fe9f: 8b 55 f4 mov -0xc(%ebp),%edx 10fea2: 85 d2 test %edx,%edx 10fea4: 75 36 jne 10fedc case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10fea6: 8b 50 14 mov 0x14(%eax),%edx 10fea9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10feab: 85 db test %ebx,%ebx 10fead: 74 1c je 10fecb the_thread->real_priority = new_priority; 10feaf: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10feb2: 8b 48 1c mov 0x1c(%eax),%ecx 10feb5: 85 c9 test %ecx,%ecx 10feb7: 74 05 je 10febe the_thread->current_priority > new_priority ) 10feb9: 3b 58 14 cmp 0x14(%eax),%ebx 10febc: 73 0d jae 10fecb <== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10febe: 52 push %edx 10febf: 6a 00 push $0x0 10fec1: 53 push %ebx 10fec2: 50 push %eax 10fec3: e8 08 18 00 00 call 1116d0 <_Thread_Change_priority> 10fec8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fecb: e8 e8 1c 00 00 call 111bb8 <_Thread_Enable_dispatch> 10fed0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fed2: 8d 65 f8 lea -0x8(%ebp),%esp 10fed5: 5b pop %ebx 10fed6: 5e pop %esi 10fed7: c9 leave 10fed8: c3 ret 10fed9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10fedc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fee1: 8d 65 f8 lea -0x8(%ebp),%esp 10fee4: 5b pop %ebx 10fee5: 5e pop %esi 10fee6: c9 leave 10fee7: c3 ret 10fee8: b8 13 00 00 00 mov $0x13,%eax 10feed: 8d 65 f8 lea -0x8(%ebp),%esp 10fef0: 5b pop %ebx 10fef1: 5e pop %esi 10fef2: c9 leave 10fef3: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10fef4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fef9: 8d 65 f8 lea -0x8(%ebp),%esp 10fefc: 5b pop %ebx 10fefd: 5e pop %esi 10fefe: c9 leave 10feff: c3 ret 0010b9a0 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10b9a0: 55 push %ebp 10b9a1: 89 e5 mov %esp,%ebp 10b9a3: 53 push %ebx 10b9a4: 83 ec 14 sub $0x14,%esp 10b9a7: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9aa: 85 db test %ebx,%ebx 10b9ac: 74 4e je 10b9fc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10b9ae: 83 ec 08 sub $0x8,%esp 10b9b1: 8d 45 f4 lea -0xc(%ebp),%eax 10b9b4: 50 push %eax 10b9b5: ff 75 08 pushl 0x8(%ebp) 10b9b8: e8 1f 1a 00 00 call 10d3dc <_Thread_Get> switch ( location ) { 10b9bd: 83 c4 10 add $0x10,%esp 10b9c0: 8b 55 f4 mov -0xc(%ebp),%edx 10b9c3: 85 d2 test %edx,%edx 10b9c5: 75 29 jne 10b9f0 case OBJECTS_LOCAL: if ( _Thread_Start( 10b9c7: 83 ec 0c sub $0xc,%esp 10b9ca: ff 75 10 pushl 0x10(%ebp) 10b9cd: 6a 00 push $0x0 10b9cf: 53 push %ebx 10b9d0: 6a 00 push $0x0 10b9d2: 50 push %eax 10b9d3: e8 a8 24 00 00 call 10de80 <_Thread_Start> 10b9d8: 83 c4 20 add $0x20,%esp 10b9db: 84 c0 test %al,%al 10b9dd: 75 29 jne 10ba08 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10b9df: e8 d4 19 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10b9e4: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9e9: 8b 5d fc mov -0x4(%ebp),%ebx 10b9ec: c9 leave 10b9ed: c3 ret 10b9ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b9f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9f5: 8b 5d fc mov -0x4(%ebp),%ebx 10b9f8: c9 leave 10b9f9: c3 ret 10b9fa: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10b9fc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba01: 8b 5d fc mov -0x4(%ebp),%ebx 10ba04: c9 leave 10ba05: c3 ret 10ba06: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); 10ba08: e8 ab 19 00 00 call 10d3b8 <_Thread_Enable_dispatch> 10ba0d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba0f: 8b 5d fc mov -0x4(%ebp),%ebx 10ba12: c9 leave 10ba13: c3 ret 0010feac : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 10feac: 55 push %ebp 10fead: 89 e5 mov %esp,%ebp 10feaf: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10feb2: 8d 45 f4 lea -0xc(%ebp),%eax 10feb5: 50 push %eax 10feb6: ff 75 08 pushl 0x8(%ebp) 10feb9: e8 1e d5 ff ff call 10d3dc <_Thread_Get> switch ( location ) { 10febe: 83 c4 10 add $0x10,%esp 10fec1: 8b 55 f4 mov -0xc(%ebp),%edx 10fec4: 85 d2 test %edx,%edx 10fec6: 74 08 je 10fed0 10fec8: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fecd: c9 leave 10fece: c3 ret 10fecf: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 10fed0: f6 40 10 02 testb $0x2,0x10(%eax) 10fed4: 74 0e je 10fee4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10fed6: e8 dd d4 ff ff call 10d3b8 <_Thread_Enable_dispatch> 10fedb: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fee0: c9 leave 10fee1: c3 ret 10fee2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 10fee4: 83 ec 0c sub $0xc,%esp 10fee7: 50 push %eax 10fee8: e8 f3 09 00 00 call 1108e0 <_Thread_Suspend> _Thread_Enable_dispatch(); 10feed: e8 c6 d4 ff ff call 10d3b8 <_Thread_Enable_dispatch> 10fef2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10fef4: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10fef7: c9 leave 10fef8: c3 ret 0012d850 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12d850: 55 push %ebp 12d851: 89 e5 mov %esp,%ebp 12d853: 57 push %edi 12d854: 56 push %esi 12d855: 53 push %ebx 12d856: 83 ec 1c sub $0x1c,%esp 12d859: 8b 5d 0c mov 0xc(%ebp),%ebx 12d85c: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12d85f: 85 db test %ebx,%ebx 12d861: 0f 84 9d 00 00 00 je 12d904 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12d867: 83 ec 08 sub $0x8,%esp 12d86a: 8d 45 e4 lea -0x1c(%ebp),%eax 12d86d: 50 push %eax 12d86e: ff 75 08 pushl 0x8(%ebp) 12d871: e8 da 5f fe ff call 113850 <_Thread_Get> 12d876: 89 c6 mov %eax,%esi switch (location) { 12d878: 83 c4 10 add $0x10,%esp 12d87b: 8b 45 e4 mov -0x1c(%ebp),%eax 12d87e: 85 c0 test %eax,%eax 12d880: 74 0e je 12d890 12d882: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d887: 8d 65 f4 lea -0xc(%ebp),%esp 12d88a: 5b pop %ebx 12d88b: 5e pop %esi 12d88c: 5f pop %edi 12d88d: c9 leave 12d88e: c3 ret 12d88f: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12d890: 8b 86 00 01 00 00 mov 0x100(%esi),%eax while (tvp) { 12d896: 85 c0 test %eax,%eax 12d898: 75 44 jne 12d8de 12d89a: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12d89c: 83 ec 0c sub $0xc,%esp 12d89f: 6a 14 push $0x14 12d8a1: e8 9a 70 fe ff call 114940 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12d8a6: 83 c4 10 add $0x10,%esp 12d8a9: 85 c0 test %eax,%eax 12d8ab: 74 4b je 12d8f8 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12d8ad: 8b 13 mov (%ebx),%edx 12d8af: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12d8b2: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12d8b5: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12d8b8: 8b 96 00 01 00 00 mov 0x100(%esi),%edx 12d8be: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12d8c0: 89 86 00 01 00 00 mov %eax,0x100(%esi) _Thread_Enable_dispatch(); 12d8c6: e8 61 5f fe ff call 11382c <_Thread_Enable_dispatch> 12d8cb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d8cd: 8d 65 f4 lea -0xc(%ebp),%esp 12d8d0: 5b pop %ebx 12d8d1: 5e pop %esi 12d8d2: 5f pop %edi 12d8d3: c9 leave 12d8d4: c3 ret 12d8d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12d8d8: 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) { 12d8da: 85 c0 test %eax,%eax 12d8dc: 74 be je 12d89c if (tvp->ptr == ptr) { 12d8de: 39 58 04 cmp %ebx,0x4(%eax) 12d8e1: 75 f5 jne 12d8d8 tvp->dtor = dtor; 12d8e3: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12d8e6: e8 41 5f fe ff call 11382c <_Thread_Enable_dispatch> 12d8eb: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d8ed: 8d 65 f4 lea -0xc(%ebp),%esp 12d8f0: 5b pop %ebx 12d8f1: 5e pop %esi 12d8f2: 5f pop %edi 12d8f3: c9 leave 12d8f4: c3 ret 12d8f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); 12d8f8: e8 2f 5f fe ff call 11382c <_Thread_Enable_dispatch> 12d8fd: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12d902: eb 83 jmp 12d887 <== ALWAYS TAKEN { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12d904: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d909: 8d 65 f4 lea -0xc(%ebp),%esp 12d90c: 5b pop %ebx 12d90d: 5e pop %esi 12d90e: 5f pop %edi 12d90f: c9 leave 12d910: c3 ret 0012d914 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12d914: 55 push %ebp 12d915: 89 e5 mov %esp,%ebp 12d917: 53 push %ebx 12d918: 83 ec 14 sub $0x14,%esp 12d91b: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12d91e: 85 db test %ebx,%ebx 12d920: 74 4c je 12d96e return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12d922: 83 ec 08 sub $0x8,%esp 12d925: 8d 45 f4 lea -0xc(%ebp),%eax 12d928: 50 push %eax 12d929: ff 75 08 pushl 0x8(%ebp) 12d92c: e8 1f 5f fe ff call 113850 <_Thread_Get> switch (location) { 12d931: 83 c4 10 add $0x10,%esp 12d934: 8b 55 f4 mov -0xc(%ebp),%edx 12d937: 85 d2 test %edx,%edx 12d939: 74 0d je 12d948 12d93b: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d940: 8b 5d fc mov -0x4(%ebp),%ebx 12d943: c9 leave 12d944: c3 ret 12d945: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 12d948: 8b 90 00 01 00 00 mov 0x100(%eax),%edx while (tvp) { 12d94e: 85 d2 test %edx,%edx 12d950: 74 17 je 12d969 if (tvp->ptr == ptr) { 12d952: 39 5a 04 cmp %ebx,0x4(%edx) 12d955: 75 0a jne 12d961 12d957: eb 3c jmp 12d995 <== ALWAYS TAKEN 12d959: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12d95c: 39 5a 04 cmp %ebx,0x4(%edx) 12d95f: 74 17 je 12d978 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 12d961: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12d963: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12d965: 85 d2 test %edx,%edx 12d967: 75 f3 jne 12d95c <== NEVER TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12d969: e8 be 5e fe ff call 11382c <_Thread_Enable_dispatch> 12d96e: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d973: 8b 5d fc mov -0x4(%ebp),%ebx 12d976: c9 leave 12d977: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12d978: 8b 1a mov (%edx),%ebx 12d97a: 89 19 mov %ebx,(%ecx) else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 12d97c: 83 ec 08 sub $0x8,%esp 12d97f: 52 push %edx 12d980: 50 push %eax 12d981: e8 a2 00 00 00 call 12da28 <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 12d986: e8 a1 5e fe ff call 11382c <_Thread_Enable_dispatch> 12d98b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12d98d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d990: 8b 5d fc mov -0x4(%ebp),%ebx 12d993: c9 leave 12d994: c3 ret while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 12d995: 8b 0a mov (%edx),%ecx 12d997: 89 88 00 01 00 00 mov %ecx,0x100(%eax) 12d99d: eb dd jmp 12d97c <== ALWAYS TAKEN 0012d9a0 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12d9a0: 55 push %ebp 12d9a1: 89 e5 mov %esp,%ebp 12d9a3: 56 push %esi 12d9a4: 53 push %ebx 12d9a5: 83 ec 10 sub $0x10,%esp 12d9a8: 8b 5d 0c mov 0xc(%ebp),%ebx 12d9ab: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12d9ae: 85 db test %ebx,%ebx 12d9b0: 74 56 je 12da08 return RTEMS_INVALID_ADDRESS; if ( !result ) 12d9b2: 85 f6 test %esi,%esi 12d9b4: 74 52 je 12da08 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12d9b6: 83 ec 08 sub $0x8,%esp 12d9b9: 8d 45 f4 lea -0xc(%ebp),%eax 12d9bc: 50 push %eax 12d9bd: ff 75 08 pushl 0x8(%ebp) 12d9c0: e8 8b 5e fe ff call 113850 <_Thread_Get> switch (location) { 12d9c5: 83 c4 10 add $0x10,%esp 12d9c8: 8b 55 f4 mov -0xc(%ebp),%edx 12d9cb: 85 d2 test %edx,%edx 12d9cd: 75 2d jne 12d9fc case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12d9cf: 8b 80 00 01 00 00 mov 0x100(%eax),%eax while (tvp) { 12d9d5: 85 c0 test %eax,%eax 12d9d7: 75 09 jne 12d9e2 12d9d9: eb 39 jmp 12da14 <== ALWAYS TAKEN 12d9db: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12d9dc: 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) { 12d9de: 85 c0 test %eax,%eax 12d9e0: 74 32 je 12da14 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 12d9e2: 39 58 04 cmp %ebx,0x4(%eax) 12d9e5: 75 f5 jne 12d9dc /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12d9e7: 8b 40 0c mov 0xc(%eax),%eax 12d9ea: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12d9ec: e8 3b 5e fe ff call 11382c <_Thread_Enable_dispatch> 12d9f1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12d9f3: 8d 65 f8 lea -0x8(%ebp),%esp 12d9f6: 5b pop %ebx 12d9f7: 5e pop %esi 12d9f8: c9 leave 12d9f9: c3 ret 12d9fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12d9fc: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da01: 8d 65 f8 lea -0x8(%ebp),%esp 12da04: 5b pop %ebx 12da05: 5e pop %esi 12da06: c9 leave 12da07: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12da08: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da0d: 8d 65 f8 lea -0x8(%ebp),%esp 12da10: 5b pop %ebx 12da11: 5e pop %esi 12da12: c9 leave 12da13: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12da14: e8 13 5e fe ff call 11382c <_Thread_Enable_dispatch> 12da19: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12da1e: 8d 65 f8 lea -0x8(%ebp),%esp 12da21: 5b pop %ebx 12da22: 5e pop %esi 12da23: c9 leave 12da24: c3 ret 0010ba14 : */ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { 10ba14: 55 push %ebp 10ba15: 89 e5 mov %esp,%ebp 10ba17: 53 push %ebx 10ba18: 83 ec 04 sub $0x4,%esp 10ba1b: 8b 5d 08 mov 0x8(%ebp),%ebx 10ba1e: a1 38 53 12 00 mov 0x125338,%eax 10ba23: 40 inc %eax 10ba24: a3 38 53 12 00 mov %eax,0x125338 _Thread_Disable_dispatch(); if ( ticks == 0 ) { 10ba29: 85 db test %ebx,%ebx 10ba2b: 74 53 je 10ba80 _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); 10ba2d: 83 ec 08 sub $0x8,%esp 10ba30: 6a 08 push $0x8 10ba32: ff 35 f8 53 12 00 pushl 0x1253f8 10ba38: e8 03 22 00 00 call 10dc40 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ba3d: a1 f8 53 12 00 mov 0x1253f8,%eax _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( 10ba42: 8b 50 08 mov 0x8(%eax),%edx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ba45: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_watchdog->routine = routine; 10ba4c: c7 40 64 20 d2 10 00 movl $0x10d220,0x64(%eax) the_watchdog->id = id; 10ba53: 89 50 68 mov %edx,0x68(%eax) the_watchdog->user_data = user_data; 10ba56: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ba5d: 89 58 54 mov %ebx,0x54(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ba60: 5a pop %edx 10ba61: 59 pop %ecx 10ba62: 83 c0 48 add $0x48,%eax 10ba65: 50 push %eax 10ba66: 68 18 54 12 00 push $0x125418 10ba6b: e8 20 28 00 00 call 10e290 <_Watchdog_Insert> 10ba70: 83 c4 10 add $0x10,%esp _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10ba73: e8 40 19 00 00 call 10d3b8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10ba78: 31 c0 xor %eax,%eax 10ba7a: 8b 5d fc mov -0x4(%ebp),%ebx 10ba7d: c9 leave 10ba7e: c3 ret 10ba7f: 90 nop <== NOT EXECUTED rtems_interval ticks ) { _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Thread_Yield_processor(); 10ba80: e8 9b 24 00 00 call 10df20 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10ba85: e8 2e 19 00 00 call 10d3b8 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } 10ba8a: 31 c0 xor %eax,%eax 10ba8c: 8b 5d fc mov -0x4(%ebp),%ebx 10ba8f: c9 leave 10ba90: c3 ret 0010c800 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10c800: 55 push %ebp 10c801: 89 e5 mov %esp,%ebp 10c803: 53 push %ebx 10c804: 83 ec 14 sub $0x14,%esp 10c807: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c80a: 80 3d ec 86 12 00 00 cmpb $0x0,0x1286ec 10c811: 0f 84 a9 00 00 00 je 10c8c0 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c817: 85 db test %ebx,%ebx 10c819: 0f 84 ad 00 00 00 je 10c8cc return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10c81f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10c826: 83 ec 0c sub $0xc,%esp 10c829: 53 push %ebx 10c82a: e8 d9 f3 ff ff call 10bc08 <_TOD_Validate> 10c82f: 83 c4 10 add $0x10,%esp 10c832: 84 c0 test %al,%al 10c834: 75 0a jne 10c840 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10c836: b8 14 00 00 00 mov $0x14,%eax } 10c83b: 8b 5d fc mov -0x4(%ebp),%ebx 10c83e: c9 leave 10c83f: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10c840: 83 ec 0c sub $0xc,%esp 10c843: 53 push %ebx 10c844: e8 33 f3 ff ff call 10bb7c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10c849: 83 c4 10 add $0x10,%esp 10c84c: 3b 05 6c 87 12 00 cmp 0x12876c,%eax 10c852: 76 e2 jbe 10c836 10c854: 8b 15 d8 86 12 00 mov 0x1286d8,%edx 10c85a: 42 inc %edx 10c85b: 89 15 d8 86 12 00 mov %edx,0x1286d8 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10c861: 83 ec 08 sub $0x8,%esp 10c864: 6a 10 push $0x10 10c866: ff 35 98 87 12 00 pushl 0x128798 10c86c: 89 45 f4 mov %eax,-0xc(%ebp) 10c86f: e8 fc 22 00 00 call 10eb70 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c874: 8b 15 98 87 12 00 mov 0x128798,%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( 10c87a: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c87d: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10c884: c7 42 64 50 e1 10 00 movl $0x10e150,0x64(%edx) the_watchdog->id = id; 10c88b: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10c88e: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c895: 8b 45 f4 mov -0xc(%ebp),%eax 10c898: 2b 05 6c 87 12 00 sub 0x12876c,%eax 10c89e: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10c8a1: 58 pop %eax 10c8a2: 59 pop %ecx 10c8a3: 83 c2 48 add $0x48,%edx 10c8a6: 52 push %edx 10c8a7: 68 ac 87 12 00 push $0x1287ac 10c8ac: e8 87 29 00 00 call 10f238 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c8b1: e8 32 1a 00 00 call 10e2e8 <_Thread_Enable_dispatch> 10c8b6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c8b8: 83 c4 10 add $0x10,%esp 10c8bb: e9 7b ff ff ff jmp 10c83b <== ALWAYS TAKEN rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10c8c0: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c8c5: 8b 5d fc mov -0x4(%ebp),%ebx 10c8c8: c9 leave 10c8c9: c3 ret 10c8ca: 66 90 xchg %ax,%ax <== NOT EXECUTED Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10c8cc: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c8d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c8d4: c9 leave 10c8d5: c3 ret 00118258 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118258: 55 push %ebp 118259: 89 e5 mov %esp,%ebp 11825b: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11825e: 8d 45 f4 lea -0xc(%ebp),%eax 118261: 50 push %eax 118262: ff 75 08 pushl 0x8(%ebp) 118265: 68 60 fa 13 00 push $0x13fa60 11826a: e8 b5 28 00 00 call 11ab24 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11826f: 83 c4 10 add $0x10,%esp 118272: 8b 55 f4 mov -0xc(%ebp),%edx 118275: 85 d2 test %edx,%edx 118277: 74 07 je 118280 118279: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11827e: c9 leave 11827f: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118280: 83 78 38 04 cmpl $0x4,0x38(%eax) 118284: 74 0f je 118295 <== ALWAYS TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118286: 83 ec 0c sub $0xc,%esp 118289: 83 c0 10 add $0x10,%eax 11828c: 50 push %eax 11828d: e8 12 45 00 00 call 11c7a4 <_Watchdog_Remove> 118292: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118295: e8 3a 31 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11829a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829c: c9 leave 11829d: c3 ret 001182a0 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 1182a0: 55 push %ebp 1182a1: 89 e5 mov %esp,%ebp 1182a3: 57 push %edi 1182a4: 56 push %esi 1182a5: 53 push %ebx 1182a6: 83 ec 0c sub $0xc,%esp 1182a9: 8b 5d 08 mov 0x8(%ebp),%ebx 1182ac: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 1182af: 85 db test %ebx,%ebx 1182b1: 74 6d je 118320 return RTEMS_INVALID_NAME; if ( !id ) 1182b3: 85 f6 test %esi,%esi 1182b5: 0f 84 89 00 00 00 je 118344 1182bb: a1 58 f7 13 00 mov 0x13f758,%eax 1182c0: 40 inc %eax 1182c1: a3 58 f7 13 00 mov %eax,0x13f758 * 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 ); 1182c6: 83 ec 0c sub $0xc,%esp 1182c9: 68 60 fa 13 00 push $0x13fa60 1182ce: e8 65 23 00 00 call 11a638 <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 1182d3: 83 c4 10 add $0x10,%esp 1182d6: 85 c0 test %eax,%eax 1182d8: 74 56 je 118330 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 1182da: 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; 1182e1: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 1182e8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 1182ef: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 1182f6: 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; 1182fd: 8b 50 08 mov 0x8(%eax),%edx 118300: 0f b7 fa movzwl %dx,%edi 118303: 8b 0d 7c fa 13 00 mov 0x13fa7c,%ecx 118309: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11830c: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 11830f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 118311: e8 be 30 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118316: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 118318: 8d 65 f4 lea -0xc(%ebp),%esp 11831b: 5b pop %ebx 11831c: 5e pop %esi 11831d: 5f pop %edi 11831e: c9 leave 11831f: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 118320: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 118325: 8d 65 f4 lea -0xc(%ebp),%esp 118328: 5b pop %ebx 118329: 5e pop %esi 11832a: 5f pop %edi 11832b: c9 leave 11832c: c3 ret 11832d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 118330: e8 9f 30 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118335: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11833a: 8d 65 f4 lea -0xc(%ebp),%esp 11833d: 5b pop %ebx 11833e: 5e pop %esi 11833f: 5f pop %edi 118340: c9 leave 118341: c3 ret 118342: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 118344: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 118349: 8d 65 f4 lea -0xc(%ebp),%esp 11834c: 5b pop %ebx 11834d: 5e pop %esi 11834e: 5f pop %edi 11834f: c9 leave 118350: c3 ret 00118354 : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 118354: 55 push %ebp 118355: 89 e5 mov %esp,%ebp 118357: 53 push %ebx 118358: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 11835b: 8d 45 f4 lea -0xc(%ebp),%eax 11835e: 50 push %eax 11835f: ff 75 08 pushl 0x8(%ebp) 118362: 68 60 fa 13 00 push $0x13fa60 118367: e8 b8 27 00 00 call 11ab24 <_Objects_Get> 11836c: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11836e: 83 c4 10 add $0x10,%esp 118371: 8b 4d f4 mov -0xc(%ebp),%ecx 118374: 85 c9 test %ecx,%ecx 118376: 75 38 jne 1183b0 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 118378: 83 ec 08 sub $0x8,%esp 11837b: 50 push %eax 11837c: 68 60 fa 13 00 push $0x13fa60 118381: e8 2e 23 00 00 call 11a6b4 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 118386: 8d 43 10 lea 0x10(%ebx),%eax 118389: 89 04 24 mov %eax,(%esp) 11838c: e8 13 44 00 00 call 11c7a4 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 118391: 58 pop %eax 118392: 5a pop %edx 118393: 53 push %ebx 118394: 68 60 fa 13 00 push $0x13fa60 118399: e8 1a 26 00 00 call 11a9b8 <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11839e: e8 31 30 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1183a3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1183a5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183a8: 8b 5d fc mov -0x4(%ebp),%ebx 1183ab: c9 leave 1183ac: c3 ret 1183ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183b0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183b5: 8b 5d fc mov -0x4(%ebp),%ebx 1183b8: c9 leave 1183b9: c3 ret 001183bc : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1183bc: 55 push %ebp 1183bd: 89 e5 mov %esp,%ebp 1183bf: 57 push %edi 1183c0: 56 push %esi 1183c1: 53 push %ebx 1183c2: 83 ec 2c sub $0x2c,%esp 1183c5: 8b 5d 0c mov 0xc(%ebp),%ebx 1183c8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 1183cb: 85 db test %ebx,%ebx 1183cd: 0f 84 99 00 00 00 je 11846c return RTEMS_INVALID_NUMBER; if ( !routine ) 1183d3: 85 f6 test %esi,%esi 1183d5: 0f 84 b1 00 00 00 je 11848c RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 1183db: 57 push %edi 1183dc: 8d 45 e4 lea -0x1c(%ebp),%eax 1183df: 50 push %eax 1183e0: ff 75 08 pushl 0x8(%ebp) 1183e3: 68 60 fa 13 00 push $0x13fa60 1183e8: e8 37 27 00 00 call 11ab24 <_Objects_Get> 1183ed: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1183ef: 83 c4 10 add $0x10,%esp 1183f2: 8b 4d e4 mov -0x1c(%ebp),%ecx 1183f5: 85 c9 test %ecx,%ecx 1183f7: 74 0f je 118408 1183f9: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1183fe: 8d 65 f4 lea -0xc(%ebp),%esp 118401: 5b pop %ebx 118402: 5e pop %esi 118403: 5f pop %edi 118404: c9 leave 118405: c3 ret 118406: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118408: 8d 50 10 lea 0x10(%eax),%edx 11840b: 83 ec 0c sub $0xc,%esp 11840e: 52 push %edx 11840f: 89 55 d4 mov %edx,-0x2c(%ebp) 118412: e8 8d 43 00 00 call 11c7a4 <_Watchdog_Remove> _ISR_Disable( level ); 118417: 9c pushf 118418: fa cli 118419: 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 ) { 11841a: 83 c4 10 add $0x10,%esp 11841d: 8b 57 18 mov 0x18(%edi),%edx 118420: 85 d2 test %edx,%edx 118422: 8b 55 d4 mov -0x2c(%ebp),%edx 118425: 75 55 jne 11847c /* * 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; 118427: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11842e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 118435: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 118438: 8b 4d 08 mov 0x8(%ebp),%ecx 11843b: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 11843e: 8b 4d 14 mov 0x14(%ebp),%ecx 118441: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 118444: 50 push %eax 118445: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118446: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 118449: 83 ec 08 sub $0x8,%esp 11844c: 52 push %edx 11844d: 68 38 f8 13 00 push $0x13f838 118452: e8 15 42 00 00 call 11c66c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 118457: e8 78 2f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11845c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11845e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118461: 8d 65 f4 lea -0xc(%ebp),%esp 118464: 5b pop %ebx 118465: 5e pop %esi 118466: 5f pop %edi 118467: c9 leave 118468: c3 ret 118469: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 11846c: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118471: 8d 65 f4 lea -0xc(%ebp),%esp 118474: 5b pop %ebx 118475: 5e pop %esi 118476: 5f pop %edi 118477: c9 leave 118478: c3 ret 118479: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 11847c: 50 push %eax 11847d: 9d popf _Thread_Enable_dispatch(); 11847e: e8 51 2f 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118483: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118485: e9 74 ff ff ff jmp 1183fe <== ALWAYS TAKEN 11848a: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 11848c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118491: 8d 65 f4 lea -0xc(%ebp),%esp 118494: 5b pop %ebx 118495: 5e pop %esi 118496: 5f pop %edi 118497: c9 leave 118498: c3 ret 0011849c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 11849c: 55 push %ebp 11849d: 89 e5 mov %esp,%ebp 11849f: 57 push %edi 1184a0: 56 push %esi 1184a1: 53 push %ebx 1184a2: 83 ec 2c sub $0x2c,%esp 1184a5: 8b 75 08 mov 0x8(%ebp),%esi 1184a8: 8b 7d 0c mov 0xc(%ebp),%edi 1184ab: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 1184ae: 80 3d 6c f7 13 00 00 cmpb $0x0,0x13f76c 1184b5: 75 0d jne 1184c4 1184b7: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184bc: 8d 65 f4 lea -0xc(%ebp),%esp 1184bf: 5b pop %ebx 1184c0: 5e pop %esi 1184c1: 5f pop %edi 1184c2: c9 leave 1184c3: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 1184c4: 83 ec 0c sub $0xc,%esp 1184c7: 57 push %edi 1184c8: e8 67 d4 ff ff call 115934 <_TOD_Validate> <== ALWAYS TAKEN 1184cd: 83 c4 10 add $0x10,%esp 1184d0: 84 c0 test %al,%al 1184d2: 74 1e je 1184f2 return RTEMS_INVALID_CLOCK; if ( !routine ) 1184d4: 85 db test %ebx,%ebx 1184d6: 0f 84 a4 00 00 00 je 118580 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 1184dc: 83 ec 0c sub $0xc,%esp 1184df: 57 push %edi 1184e0: e8 c3 d3 ff ff call 1158a8 <_TOD_To_seconds> 1184e5: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1184e7: 83 c4 10 add $0x10,%esp 1184ea: 3b 05 ec f7 13 00 cmp 0x13f7ec,%eax 1184f0: 77 0e ja 118500 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1184f2: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1184f7: 8d 65 f4 lea -0xc(%ebp),%esp 1184fa: 5b pop %ebx 1184fb: 5e pop %esi 1184fc: 5f pop %edi 1184fd: c9 leave 1184fe: c3 ret 1184ff: 90 nop <== NOT EXECUTED 118500: 50 push %eax 118501: 8d 45 e4 lea -0x1c(%ebp),%eax 118504: 50 push %eax 118505: 56 push %esi 118506: 68 60 fa 13 00 push $0x13fa60 11850b: e8 14 26 00 00 call 11ab24 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118510: 83 c4 10 add $0x10,%esp 118513: 8b 4d e4 mov -0x1c(%ebp),%ecx 118516: 85 c9 test %ecx,%ecx 118518: 75 5a jne 118574 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11851a: 8d 48 10 lea 0x10(%eax),%ecx 11851d: 83 ec 0c sub $0xc,%esp 118520: 51 push %ecx 118521: 89 45 d4 mov %eax,-0x2c(%ebp) 118524: 89 4d d0 mov %ecx,-0x30(%ebp) 118527: e8 78 42 00 00 call 11c7a4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 11852c: 8b 55 d4 mov -0x2c(%ebp),%edx 11852f: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118536: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11853d: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 118540: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 118543: 8b 45 14 mov 0x14(%ebp),%eax 118546: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 118549: 2b 3d ec f7 13 00 sub 0x13f7ec,%edi 11854f: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 118552: 58 pop %eax 118553: 5a pop %edx 118554: 8b 4d d0 mov -0x30(%ebp),%ecx 118557: 51 push %ecx 118558: 68 2c f8 13 00 push $0x13f82c 11855d: e8 0a 41 00 00 call 11c66c <_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(); 118562: e8 6d 2e 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118567: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118569: 83 c4 10 add $0x10,%esp 11856c: e9 4b ff ff ff jmp 1184bc <== ALWAYS TAKEN 118571: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118574: b8 04 00 00 00 mov $0x4,%eax 118579: e9 3e ff ff ff jmp 1184bc <== ALWAYS TAKEN 11857e: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 118580: b8 09 00 00 00 mov $0x9,%eax 118585: e9 32 ff ff ff jmp 1184bc <== ALWAYS TAKEN 0011858c : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { 11858c: 55 push %ebp 11858d: 89 e5 mov %esp,%ebp 11858f: 53 push %ebx 118590: 83 ec 14 sub $0x14,%esp 118593: 8b 5d 0c mov 0xc(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 118596: 85 db test %ebx,%ebx 118598: 74 4a je 1185e4 11859a: 51 push %ecx 11859b: 8d 45 f4 lea -0xc(%ebp),%eax 11859e: 50 push %eax 11859f: ff 75 08 pushl 0x8(%ebp) 1185a2: 68 60 fa 13 00 push $0x13fa60 1185a7: e8 78 25 00 00 call 11ab24 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1185ac: 83 c4 10 add $0x10,%esp 1185af: 8b 55 f4 mov -0xc(%ebp),%edx 1185b2: 85 d2 test %edx,%edx 1185b4: 74 0a je 1185c0 1185b6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185bb: 8b 5d fc mov -0x4(%ebp),%ebx 1185be: c9 leave 1185bf: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 1185c0: 8b 50 38 mov 0x38(%eax),%edx 1185c3: 89 13 mov %edx,(%ebx) the_info->initial = the_timer->Ticker.initial; 1185c5: 8b 50 1c mov 0x1c(%eax),%edx 1185c8: 89 53 04 mov %edx,0x4(%ebx) the_info->start_time = the_timer->Ticker.start_time; 1185cb: 8b 50 24 mov 0x24(%eax),%edx 1185ce: 89 53 08 mov %edx,0x8(%ebx) the_info->stop_time = the_timer->Ticker.stop_time; 1185d1: 8b 40 28 mov 0x28(%eax),%eax 1185d4: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 1185d7: e8 f8 2d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 1185dc: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185de: 8b 5d fc mov -0x4(%ebp),%ebx 1185e1: c9 leave 1185e2: c3 ret 1185e3: 90 nop <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 1185e4: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1185e9: 8b 5d fc mov -0x4(%ebp),%ebx 1185ec: c9 leave 1185ed: c3 ret 0011889c : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 11889c: 55 push %ebp 11889d: 89 e5 mov %esp,%ebp 11889f: 56 push %esi 1188a0: 53 push %ebx 1188a1: 83 ec 10 sub $0x10,%esp 1188a4: 8b 45 08 mov 0x8(%ebp),%eax 1188a7: 85 c0 test %eax,%eax 1188a9: 75 0d jne 1188b8 if (status) { initialized = false; } #endif return status; 1188ab: b8 13 00 00 00 mov $0x13,%eax } 1188b0: 8d 65 f8 lea -0x8(%ebp),%esp 1188b3: 5b pop %ebx 1188b4: 5e pop %esi 1188b5: c9 leave 1188b6: c3 ret 1188b7: 90 nop <== NOT EXECUTED 1188b8: 0f b6 15 14 72 13 00 movzbl 0x137214,%edx 1188bf: 39 d0 cmp %edx,%eax 1188c1: 76 35 jbe 1188f8 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 1188c3: 40 inc %eax 1188c4: 75 e5 jne 1188ab 1188c6: 31 f6 xor %esi,%esi 1188c8: 8b 15 58 f7 13 00 mov 0x13f758,%edx 1188ce: 42 inc %edx 1188cf: 89 15 58 f7 13 00 mov %edx,0x13f758 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1188d5: 8a 1d c0 af 13 00 mov 0x13afc0,%bl initialized = true; 1188db: c6 05 c0 af 13 00 01 movb $0x1,0x13afc0 _Thread_Enable_dispatch(); 1188e2: e8 ed 2a 00 00 call 11b3d4 <_Thread_Enable_dispatch> if ( tmpInitialized ) 1188e7: 84 db test %bl,%bl 1188e9: 74 11 je 1188fc 1188eb: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 1188f0: 8d 65 f8 lea -0x8(%ebp),%esp 1188f3: 5b pop %ebx 1188f4: 5e pop %esi 1188f5: c9 leave 1188f6: c3 ret 1188f7: 90 nop <== NOT EXECUTED 1188f8: 89 c6 mov %eax,%esi 1188fa: eb cc jmp 1188c8 <== ALWAYS TAKEN * 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( 1188fc: 83 ec 08 sub $0x8,%esp 1188ff: 8d 45 f4 lea -0xc(%ebp),%eax 118902: 50 push %eax 118903: 8b 45 10 mov 0x10(%ebp),%eax 118906: 80 cc 80 or $0x80,%ah 118909: 50 push %eax 11890a: 68 00 01 00 00 push $0x100 11890f: ff 75 0c pushl 0xc(%ebp) 118912: 56 push %esi 118913: 68 45 4d 49 54 push $0x54494d45 118918: e8 87 f0 ff ff call 1179a4 <== 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) { 11891d: 83 c4 20 add $0x20,%esp 118920: 85 c0 test %eax,%eax 118922: 74 10 je 118934 initialized = false; 118924: c6 05 c0 af 13 00 00 movb $0x0,0x13afc0 initialized = false; } #endif return status; } 11892b: 8d 65 f8 lea -0x8(%ebp),%esp 11892e: 5b pop %ebx 11892f: 5e pop %esi 118930: c9 leave 118931: c3 ret 118932: 66 90 xchg %ax,%ax <== NOT EXECUTED * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 118934: 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( 118937: 0f b7 c8 movzwl %ax,%ecx 11893a: 8b 15 fc f6 13 00 mov 0x13f6fc,%edx 118940: 8b 14 8a mov (%edx,%ecx,4),%edx 118943: 89 15 e0 af 13 00 mov %edx,0x13afe0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118949: c7 05 10 b0 13 00 14 movl $0x13b014,0x13b010 118950: b0 13 00 the_chain->permanent_null = NULL; 118953: c7 05 14 b0 13 00 00 movl $0x0,0x13b014 11895a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11895d: c7 05 18 b0 13 00 10 movl $0x13b010,0x13b018 118964: b0 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118967: c7 05 48 b0 13 00 4c movl $0x13b04c,0x13b048 11896e: b0 13 00 the_chain->permanent_null = NULL; 118971: c7 05 4c b0 13 00 00 movl $0x0,0x13b04c 118978: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11897b: c7 05 50 b0 13 00 48 movl $0x13b048,0x13b050 118982: b0 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118985: c7 05 f0 af 13 00 00 movl $0x0,0x13aff0 11898c: 00 00 00 the_watchdog->routine = routine; 11898f: c7 05 04 b0 13 00 3c movl $0x11b23c,0x13b004 118996: b2 11 00 the_watchdog->id = id; 118999: a3 08 b0 13 00 mov %eax,0x13b008 the_watchdog->user_data = user_data; 11899e: c7 05 0c b0 13 00 00 movl $0x0,0x13b00c 1189a5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189a8: c7 05 28 b0 13 00 00 movl $0x0,0x13b028 1189af: 00 00 00 the_watchdog->routine = routine; 1189b2: c7 05 3c b0 13 00 3c movl $0x11b23c,0x13b03c 1189b9: b2 11 00 the_watchdog->id = id; 1189bc: a3 40 b0 13 00 mov %eax,0x13b040 the_watchdog->user_data = user_data; 1189c1: c7 05 44 b0 13 00 00 movl $0x0,0x13b044 1189c8: 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; 1189cb: c7 05 e4 af 13 00 70 movl $0x118c70,0x13afe4 1189d2: 8c 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1189d5: 8b 15 c4 f8 13 00 mov 0x13f8c4,%edx 1189db: 89 15 1c b0 13 00 mov %edx,0x13b01c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1189e1: 8b 15 ec f7 13 00 mov 0x13f7ec,%edx 1189e7: 89 15 54 b0 13 00 mov %edx,0x13b054 ts->insert_chain = NULL; 1189ed: c7 05 58 b0 13 00 00 movl $0x0,0x13b058 1189f4: 00 00 00 ts->active = false; 1189f7: c6 05 5c b0 13 00 00 movb $0x0,0x13b05c /* * The default timer server is now available. */ _Timer_server = ts; 1189fe: c7 05 a0 fa 13 00 e0 movl $0x13afe0,0x13faa0 118a05: af 13 00 /* * Start the timer server */ status = rtems_task_start( 118a08: 52 push %edx 118a09: 68 e0 af 13 00 push $0x13afe0 118a0e: 68 c4 8a 11 00 push $0x118ac4 118a13: 50 push %eax 118a14: e8 23 f6 ff ff call 11803c <== ALWAYS TAKEN if (status) { initialized = false; } #endif return status; 118a19: 83 c4 10 add $0x10,%esp 118a1c: e9 8f fe ff ff jmp 1188b0 <== ALWAYS TAKEN 00118614 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 118614: 55 push %ebp 118615: 89 e5 mov %esp,%ebp 118617: 56 push %esi 118618: 53 push %ebx 118619: 83 ec 24 sub $0x24,%esp 11861c: 8d 45 f4 lea -0xc(%ebp),%eax 11861f: 50 push %eax 118620: ff 75 08 pushl 0x8(%ebp) 118623: 68 60 fa 13 00 push $0x13fa60 118628: e8 f7 24 00 00 call 11ab24 <_Objects_Get> 11862d: 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 ) { 11862f: 83 c4 10 add $0x10,%esp 118632: 8b 45 f4 mov -0xc(%ebp),%eax 118635: 85 c0 test %eax,%eax 118637: 74 0f je 118648 118639: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11863e: 8d 65 f8 lea -0x8(%ebp),%esp 118641: 5b pop %ebx 118642: 5e pop %esi 118643: c9 leave 118644: c3 ret 118645: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 118648: 8b 43 38 mov 0x38(%ebx),%eax 11864b: 85 c0 test %eax,%eax 11864d: 74 1d je 11866c _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 11864f: 48 dec %eax 118650: 74 3a je 11868c 118652: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 118657: 89 45 e4 mov %eax,-0x1c(%ebp) 11865a: e8 75 2d 00 00 call 11b3d4 <_Thread_Enable_dispatch> 11865f: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118662: 8d 65 f8 lea -0x8(%ebp),%esp 118665: 5b pop %ebx 118666: 5e pop %esi 118667: c9 leave 118668: c3 ret 118669: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 11866c: 83 c3 10 add $0x10,%ebx 11866f: 83 ec 0c sub $0xc,%esp 118672: 53 push %ebx 118673: e8 2c 41 00 00 call 11c7a4 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118678: 59 pop %ecx 118679: 5e pop %esi 11867a: 53 push %ebx 11867b: 68 38 f8 13 00 push $0x13f838 118680: e8 e7 3f 00 00 call 11c66c <_Watchdog_Insert> 118685: 31 c0 xor %eax,%eax 118687: 83 c4 10 add $0x10,%esp 11868a: eb cb jmp 118657 <== ALWAYS TAKEN } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 11868c: 8b 35 a0 fa 13 00 mov 0x13faa0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 118692: 83 ec 0c sub $0xc,%esp 118695: 8d 43 10 lea 0x10(%ebx),%eax 118698: 50 push %eax 118699: e8 06 41 00 00 call 11c7a4 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 11869e: 58 pop %eax 11869f: 5a pop %edx 1186a0: 53 push %ebx 1186a1: 56 push %esi 1186a2: ff 56 04 call *0x4(%esi) 1186a5: 31 c0 xor %eax,%eax 1186a7: 83 c4 10 add $0x10,%esp 1186aa: eb ab jmp 118657 <== ALWAYS TAKEN 001186ac : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 1186ac: 55 push %ebp 1186ad: 89 e5 mov %esp,%ebp 1186af: 57 push %edi 1186b0: 56 push %esi 1186b1: 53 push %ebx 1186b2: 83 ec 2c sub $0x2c,%esp 1186b5: 8b 7d 0c mov 0xc(%ebp),%edi 1186b8: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 1186bb: 8b 1d a0 fa 13 00 mov 0x13faa0,%ebx if ( !timer_server ) 1186c1: 85 db test %ebx,%ebx 1186c3: 0f 84 9f 00 00 00 je 118768 return RTEMS_INCORRECT_STATE; if ( !routine ) 1186c9: 85 f6 test %esi,%esi 1186cb: 0f 84 a3 00 00 00 je 118774 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 1186d1: 85 ff test %edi,%edi 1186d3: 75 0f jne 1186e4 1186d5: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186da: 8d 65 f4 lea -0xc(%ebp),%esp 1186dd: 5b pop %ebx 1186de: 5e pop %esi 1186df: 5f pop %edi 1186e0: c9 leave 1186e1: c3 ret 1186e2: 66 90 xchg %ax,%ax <== NOT EXECUTED 1186e4: 52 push %edx 1186e5: 8d 45 e4 lea -0x1c(%ebp),%eax 1186e8: 50 push %eax 1186e9: ff 75 08 pushl 0x8(%ebp) 1186ec: 68 60 fa 13 00 push $0x13fa60 1186f1: e8 2e 24 00 00 call 11ab24 <_Objects_Get> 1186f6: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1186f8: 83 c4 10 add $0x10,%esp 1186fb: 8b 45 e4 mov -0x1c(%ebp),%eax 1186fe: 85 c0 test %eax,%eax 118700: 75 56 jne 118758 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118702: 83 ec 0c sub $0xc,%esp 118705: 8d 42 10 lea 0x10(%edx),%eax 118708: 50 push %eax 118709: 89 55 d4 mov %edx,-0x2c(%ebp) 11870c: e8 93 40 00 00 call 11c7a4 <_Watchdog_Remove> _ISR_Disable( level ); 118711: 9c pushf 118712: fa cli 118713: 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 ) { 118714: 83 c4 10 add $0x10,%esp 118717: 8b 55 d4 mov -0x2c(%ebp),%edx 11871a: 8b 4a 18 mov 0x18(%edx),%ecx 11871d: 85 c9 test %ecx,%ecx 11871f: 75 5f jne 118780 /* * 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; 118721: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118728: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11872f: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118732: 8b 4d 08 mov 0x8(%ebp),%ecx 118735: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 118738: 8b 4d 14 mov 0x14(%ebp),%ecx 11873b: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 11873e: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 118741: 50 push %eax 118742: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 118743: 83 ec 08 sub $0x8,%esp 118746: 52 push %edx 118747: 53 push %ebx 118748: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 11874b: e8 84 2c 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118750: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118752: 83 c4 10 add $0x10,%esp 118755: eb 83 jmp 1186da <== ALWAYS TAKEN 118757: 90 nop <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118758: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11875d: 8d 65 f4 lea -0xc(%ebp),%esp 118760: 5b pop %ebx 118761: 5e pop %esi 118762: 5f pop %edi 118763: c9 leave 118764: c3 ret 118765: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 118768: b8 0e 00 00 00 mov $0xe,%eax 11876d: e9 68 ff ff ff jmp 1186da <== ALWAYS TAKEN 118772: 66 90 xchg %ax,%ax <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !routine ) 118774: b8 09 00 00 00 mov $0x9,%eax 118779: e9 5c ff ff ff jmp 1186da <== ALWAYS TAKEN 11877e: 66 90 xchg %ax,%ax <== NOT EXECUTED * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 118780: 50 push %eax 118781: 9d popf _Thread_Enable_dispatch(); 118782: e8 4d 2c 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118787: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 118789: e9 4c ff ff ff jmp 1186da <== ALWAYS TAKEN 00118790 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 118790: 55 push %ebp 118791: 89 e5 mov %esp,%ebp 118793: 57 push %edi 118794: 56 push %esi 118795: 53 push %ebx 118796: 83 ec 2c sub $0x2c,%esp 118799: 8b 7d 0c mov 0xc(%ebp),%edi 11879c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 11879f: 8b 1d a0 fa 13 00 mov 0x13faa0,%ebx if ( !timer_server ) 1187a5: 85 db test %ebx,%ebx 1187a7: 0f 84 d7 00 00 00 je 118884 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1187ad: 80 3d 6c f7 13 00 00 cmpb $0x0,0x13f76c 1187b4: 0f 84 aa 00 00 00 je 118864 <== ALWAYS TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 1187ba: 85 f6 test %esi,%esi 1187bc: 0f 84 b2 00 00 00 je 118874 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 1187c2: 83 ec 0c sub $0xc,%esp 1187c5: 57 push %edi 1187c6: e8 69 d1 ff ff call 115934 <_TOD_Validate> 1187cb: 83 c4 10 add $0x10,%esp 1187ce: 84 c0 test %al,%al 1187d0: 75 0e jne 1187e0 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 1187d2: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1187d7: 8d 65 f4 lea -0xc(%ebp),%esp 1187da: 5b pop %ebx 1187db: 5e pop %esi 1187dc: 5f pop %edi 1187dd: c9 leave 1187de: c3 ret 1187df: 90 nop <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1187e0: 83 ec 0c sub $0xc,%esp 1187e3: 57 push %edi 1187e4: e8 bf d0 ff ff call 1158a8 <_TOD_To_seconds> 1187e9: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1187eb: 83 c4 10 add $0x10,%esp 1187ee: 3b 05 ec f7 13 00 cmp 0x13f7ec,%eax 1187f4: 76 dc jbe 1187d2 1187f6: 52 push %edx 1187f7: 8d 45 e4 lea -0x1c(%ebp),%eax 1187fa: 50 push %eax 1187fb: ff 75 08 pushl 0x8(%ebp) 1187fe: 68 60 fa 13 00 push $0x13fa60 118803: e8 1c 23 00 00 call 11ab24 <_Objects_Get> 118808: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 11880a: 83 c4 10 add $0x10,%esp 11880d: 8b 45 e4 mov -0x1c(%ebp),%eax 118810: 85 c0 test %eax,%eax 118812: 75 7c jne 118890 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 118814: 83 ec 0c sub $0xc,%esp 118817: 8d 42 10 lea 0x10(%edx),%eax 11881a: 50 push %eax 11881b: 89 55 d4 mov %edx,-0x2c(%ebp) 11881e: e8 81 3f 00 00 call 11c7a4 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 118823: 8b 55 d4 mov -0x2c(%ebp),%edx 118826: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11882d: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 118834: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 118837: 8b 45 08 mov 0x8(%ebp),%eax 11883a: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 11883d: 8b 45 14 mov 0x14(%ebp),%eax 118840: 89 42 34 mov %eax,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 118843: 2b 3d ec f7 13 00 sub 0x13f7ec,%edi 118849: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 11884c: 58 pop %eax 11884d: 59 pop %ecx 11884e: 52 push %edx 11884f: 53 push %ebx 118850: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 118853: e8 7c 2b 00 00 call 11b3d4 <_Thread_Enable_dispatch> 118858: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11885a: 83 c4 10 add $0x10,%esp 11885d: e9 75 ff ff ff jmp 1187d7 <== ALWAYS TAKEN 118862: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 118864: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118869: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11886c: 5b pop %ebx <== NOT EXECUTED 11886d: 5e pop %esi <== NOT EXECUTED 11886e: 5f pop %edi <== NOT EXECUTED 11886f: c9 leave <== NOT EXECUTED 118870: c3 ret <== NOT EXECUTED 118871: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 118874: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118879: 8d 65 f4 lea -0xc(%ebp),%esp 11887c: 5b pop %ebx 11887d: 5e pop %esi 11887e: 5f pop %edi 11887f: c9 leave 118880: c3 ret 118881: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 118884: b8 0e 00 00 00 mov $0xe,%eax 118889: e9 49 ff ff ff jmp 1187d7 <== ALWAYS TAKEN 11888e: 66 90 xchg %ax,%ax <== NOT EXECUTED seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118890: b8 04 00 00 00 mov $0x4,%eax 118895: e9 3d ff ff ff jmp 1187d7 <== ALWAYS TAKEN