0010bda8 <_API_Mutex_Allocate>: #include void _API_Mutex_Allocate( API_Mutex_Control **the_mutex ) { 10bda8: 55 push %ebp 10bda9: 89 e5 mov %esp,%ebp 10bdab: 57 push %edi 10bdac: 56 push %esi 10bdad: 83 ec 1c sub $0x1c,%esp CORE_mutex_Attributes attr = { CORE_MUTEX_NESTING_IS_ERROR, false, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, 0 }; 10bdb0: 8d 7d e8 lea -0x18(%ebp),%edi 10bdb3: be 80 0d 12 00 mov $0x120d80,%esi 10bdb8: b9 04 00 00 00 mov $0x4,%ecx 10bdbd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); 10bdbf: 68 e0 74 12 00 push $0x1274e0 10bdc4: e8 c7 09 00 00 call 10c790 <_Objects_Allocate> <== ALWAYS TAKEN 10bdc9: 89 c6 mov %eax,%esi _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); 10bdcb: 83 c4 0c add $0xc,%esp 10bdce: 6a 01 push $0x1 10bdd0: 8d 45 e8 lea -0x18(%ebp),%eax 10bdd3: 50 push %eax 10bdd4: 8d 46 10 lea 0x10(%esi),%eax 10bdd7: 50 push %eax 10bdd8: e8 23 02 00 00 call 10c000 <_CORE_mutex_Initialize> <== ALWAYS TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bddd: 0f b7 56 08 movzwl 0x8(%esi),%edx 10bde1: a1 fc 74 12 00 mov 0x1274fc,%eax 10bde6: 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; 10bde9: c7 46 0c 01 00 00 00 movl $0x1,0xc(%esi) _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); *the_mutex = mutex; 10bdf0: 8b 45 08 mov 0x8(%ebp),%eax 10bdf3: 89 30 mov %esi,(%eax) 10bdf5: 83 c4 10 add $0x10,%esp } 10bdf8: 8d 65 f8 lea -0x8(%ebp),%esp 10bdfb: 5e pop %esi 10bdfc: 5f pop %edi 10bdfd: c9 leave 10bdfe: c3 ret 0010be24 <_API_Mutex_Initialization>: #include void _API_Mutex_Initialization( uint32_t maximum_mutexes ) { 10be24: 55 push %ebp 10be25: 89 e5 mov %esp,%ebp 10be27: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 10be2a: 6a 00 push $0x0 10be2c: 6a 00 push $0x0 10be2e: 6a 74 push $0x74 10be30: ff 75 08 pushl 0x8(%ebp) 10be33: 6a 02 push $0x2 10be35: 6a 01 push $0x1 10be37: 68 e0 74 12 00 push $0x1274e0 10be3c: e8 67 0e 00 00 call 10cca8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10be41: 83 c4 20 add $0x20,%esp , true, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10be44: c9 leave 10be45: c3 ret 0010be00 <_API_Mutex_Lock>: #include void _API_Mutex_Lock( API_Mutex_Control *the_mutex ) { 10be00: 55 push %ebp 10be01: 89 e5 mov %esp,%ebp 10be03: 83 ec 14 sub $0x14,%esp 10be06: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10be09: 9c pushf 10be0a: fa cli 10be0b: 5a pop %edx _CORE_mutex_Seize( 10be0c: 52 push %edx 10be0d: 6a 00 push $0x0 10be0f: 6a 01 push $0x1 10be11: ff 70 08 pushl 0x8(%eax) 10be14: 83 c0 10 add $0x10,%eax 10be17: 50 push %eax 10be18: e8 db 02 00 00 call 10c0f8 <_CORE_mutex_Seize> <== ALWAYS TAKEN 10be1d: 83 c4 20 add $0x20,%esp the_mutex->Object.id, true, 0, level ); } 10be20: c9 leave 10be21: c3 ret 0010be48 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 10be48: 55 push %ebp 10be49: 89 e5 mov %esp,%ebp 10be4b: 83 ec 0c sub $0xc,%esp 10be4e: 8b 45 08 mov 0x8(%ebp),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10be51: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 10be57: 42 inc %edx 10be58: 89 15 d8 73 12 00 mov %edx,0x1273d8 _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 10be5e: 6a 00 push $0x0 10be60: ff 70 08 pushl 0x8(%eax) 10be63: 83 c0 10 add $0x10,%eax 10be66: 50 push %eax 10be67: e8 2c 03 00 00 call 10c198 <_CORE_mutex_Surrender> <== ALWAYS TAKEN &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be6c: 83 c4 10 add $0x10,%esp } 10be6f: c9 leave _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10be70: e9 3f 16 00 00 jmp 10d4b4 <_Thread_Enable_dispatch> 0010bd90 <_API_extensions_Add>: */ void _API_extensions_Add( API_extensions_Control *the_extension ) { 10bd90: 55 push %ebp 10bd91: 89 e5 mov %esp,%ebp 10bd93: 83 ec 10 sub $0x10,%esp _Chain_Append( &_API_extensions_List, &the_extension->Node ); 10bd96: ff 75 08 pushl 0x8(%ebp) 10bd99: 68 38 76 12 00 push $0x127638 10bd9e: e8 d5 00 00 00 call 10be78 <_Chain_Append> <== ALWAYS TAKEN 10bda3: 83 c4 10 add $0x10,%esp } 10bda6: c9 leave 10bda7: c3 ret 0010bd2c <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10bd2c: 55 push %ebp 10bd2d: 89 e5 mov %esp,%ebp 10bd2f: 53 push %ebx 10bd30: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd33: 8b 1d 38 76 12 00 mov 0x127638,%ebx 10bd39: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd3f: 74 10 je 10bd51 <_API_extensions_Run_postdriver+0x25> <== ALWAYS TAKEN 10bd41: 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)(); 10bd44: 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 ) { 10bd47: 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 ; 10bd49: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd4f: 75 f3 jne 10bd44 <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10bd51: 58 pop %eax 10bd52: 5b pop %ebx 10bd53: c9 leave 10bd54: c3 ret 0010bd58 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10bd58: 55 push %ebp 10bd59: 89 e5 mov %esp,%ebp 10bd5b: 53 push %ebx 10bd5c: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10bd5f: 8b 1d 38 76 12 00 mov 0x127638,%ebx 10bd65: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd6b: 74 1c je 10bd89 <_API_extensions_Run_postswitch+0x31> <== ALWAYS TAKEN 10bd6d: 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 ); 10bd70: 83 ec 0c sub $0xc,%esp 10bd73: ff 35 98 74 12 00 pushl 0x127498 10bd79: 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 ) { 10bd7c: 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 ; 10bd7e: 83 c4 10 add $0x10,%esp 10bd81: 81 fb 3c 76 12 00 cmp $0x12763c,%ebx 10bd87: 75 e7 jne 10bd70 <_API_extensions_Run_postswitch+0x18> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10bd89: 8b 5d fc mov -0x4(%ebp),%ebx 10bd8c: c9 leave 10bd8d: c3 ret 0010dfc4 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10dfc4: 55 push %ebp 10dfc5: 89 e5 mov %esp,%ebp 10dfc7: 57 push %edi 10dfc8: 56 push %esi 10dfc9: 53 push %ebx 10dfca: 83 ec 1c sub $0x1c,%esp 10dfcd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dfd0: 8b 7d 0c mov 0xc(%ebp),%edi 10dfd3: 8b 4d 14 mov 0x14(%ebp),%ecx 10dfd6: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10dfd9: 8b 35 38 a2 12 00 mov 0x12a238,%esi * If unlocked, then OK to read. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10dfdf: 9c pushf 10dfe0: fa cli 10dfe1: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10dfe4: 8b 43 44 mov 0x44(%ebx),%eax 10dfe7: 85 c0 test %eax,%eax 10dfe9: 75 1d jne 10e008 <_CORE_RWLock_Obtain_for_reading+0x44> <== ALWAYS TAKEN case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10dfeb: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10dff2: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10dff5: ff 75 e4 pushl -0x1c(%ebp) 10dff8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10dff9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e000: 8d 65 f4 lea -0xc(%ebp),%esp 10e003: 5b pop %ebx 10e004: 5e pop %esi 10e005: 5f pop %edi 10e006: c9 leave 10e007: c3 ret * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { 10e008: 48 dec %eax 10e009: 74 51 je 10e05c <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e00b: 84 d2 test %dl,%dl 10e00d: 75 15 jne 10e024 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e00f: ff 75 e4 pushl -0x1c(%ebp) 10e012: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e013: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e01a: 8d 65 f4 lea -0xc(%ebp),%esp 10e01d: 5b pop %ebx 10e01e: 5e pop %esi 10e01f: 5f pop %edi 10e020: c9 leave 10e021: c3 ret 10e022: 66 90 xchg %ax,%ax <== NOT EXECUTED 10e024: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10e02b: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e02e: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e031: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e038: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e03f: ff 75 e4 pushl -0x1c(%ebp) 10e042: 9d popf _Thread_queue_Enqueue_with_handler( 10e043: c7 45 10 c8 e1 10 00 movl $0x10e1c8,0x10(%ebp) 10e04a: 89 4d 0c mov %ecx,0xc(%ebp) 10e04d: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e050: 8d 65 f4 lea -0xc(%ebp),%esp 10e053: 5b pop %ebx 10e054: 5e pop %esi 10e055: 5f pop %edi 10e056: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10e057: e9 4c 19 00 00 jmp 10f9a8 <_Thread_queue_Enqueue_with_handler> executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; return; case CORE_RWLOCK_LOCKED_FOR_READING: { Thread_Control *waiter; waiter = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e05c: 83 ec 0c sub $0xc,%esp 10e05f: 53 push %ebx 10e060: 88 55 e0 mov %dl,-0x20(%ebp) 10e063: 89 4d dc mov %ecx,-0x24(%ebp) 10e066: e8 5d 1c 00 00 call 10fcc8 <_Thread_queue_First> if ( !waiter ) { 10e06b: 83 c4 10 add $0x10,%esp 10e06e: 85 c0 test %eax,%eax 10e070: 8a 55 e0 mov -0x20(%ebp),%dl 10e073: 8b 4d dc mov -0x24(%ebp),%ecx 10e076: 75 93 jne 10e00b <_CORE_RWLock_Obtain_for_reading+0x47> <== ALWAYS TAKEN the_rwlock->number_of_readers += 1; 10e078: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e07b: ff 75 e4 pushl -0x1c(%ebp) 10e07e: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e07f: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e086: e9 75 ff ff ff jmp 10e000 <_CORE_RWLock_Obtain_for_reading+0x3c> <== ALWAYS TAKEN 0010e08c <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e08c: 55 push %ebp 10e08d: 89 e5 mov %esp,%ebp 10e08f: 57 push %edi 10e090: 56 push %esi 10e091: 53 push %ebx 10e092: 83 ec 0c sub $0xc,%esp 10e095: 8b 45 08 mov 0x8(%ebp),%eax 10e098: 8b 7d 0c mov 0xc(%ebp),%edi 10e09b: 8b 75 14 mov 0x14(%ebp),%esi 10e09e: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e0a1: 8b 15 38 a2 12 00 mov 0x12a238,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e0a7: 9c pushf 10e0a8: fa cli 10e0a9: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e0aa: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e0ae: 75 18 jne 10e0c8 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e0b0: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e0b7: 51 push %ecx 10e0b8: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0b9: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e0c0: 83 c4 0c add $0xc,%esp 10e0c3: 5b pop %ebx 10e0c4: 5e pop %esi 10e0c5: 5f pop %edi 10e0c6: c9 leave 10e0c7: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e0c8: 84 db test %bl,%bl 10e0ca: 75 14 jne 10e0e0 <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e0cc: 51 push %ecx 10e0cd: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e0ce: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e0d5: 83 c4 0c add $0xc,%esp 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: 5f pop %edi 10e0db: c9 leave 10e0dc: c3 ret 10e0dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10e0e0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 10e0e7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e0ea: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e0ed: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e0f4: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e0fb: 51 push %ecx 10e0fc: 9d popf _Thread_queue_Enqueue_with_handler( 10e0fd: c7 45 10 c8 e1 10 00 movl $0x10e1c8,0x10(%ebp) 10e104: 89 75 0c mov %esi,0xc(%ebp) 10e107: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e10a: 83 c4 0c add $0xc,%esp 10e10d: 5b pop %ebx 10e10e: 5e pop %esi 10e10f: 5f pop %edi 10e110: c9 leave executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 10e111: e9 92 18 00 00 jmp 10f9a8 <_Thread_queue_Enqueue_with_handler> 0010e118 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e118: 55 push %ebp 10e119: 89 e5 mov %esp,%ebp 10e11b: 53 push %ebx 10e11c: 83 ec 04 sub $0x4,%esp 10e11f: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e122: 8b 0d 38 a2 12 00 mov 0x12a238,%ecx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10e128: 9c pushf 10e129: fa cli 10e12a: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e12b: 8b 43 44 mov 0x44(%ebx),%eax 10e12e: 85 c0 test %eax,%eax 10e130: 74 7a je 10e1ac <_CORE_RWLock_Release+0x94> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10e132: 48 dec %eax 10e133: 74 63 je 10e198 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e135: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10e13c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e143: 52 push %edx 10e144: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e145: 83 ec 0c sub $0xc,%esp 10e148: 53 push %ebx 10e149: e8 3e 17 00 00 call 10f88c <_Thread_queue_Dequeue> if ( next ) { 10e14e: 83 c4 10 add $0x10,%esp 10e151: 85 c0 test %eax,%eax 10e153: 74 39 je 10e18e <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e155: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e159: 74 61 je 10e1bc <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e15b: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e15e: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e165: eb 17 jmp 10e17e <_CORE_RWLock_Release+0x66> <== ALWAYS TAKEN 10e167: 90 nop <== NOT EXECUTED * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10e168: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e16c: 74 20 je 10e18e <_CORE_RWLock_Release+0x76> <== ALWAYS TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e16e: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e171: 83 ec 08 sub $0x8,%esp 10e174: 50 push %eax 10e175: 53 push %ebx 10e176: e8 35 1a 00 00 call 10fbb0 <_Thread_queue_Extract> } 10e17b: 83 c4 10 add $0x10,%esp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10e17e: 83 ec 0c sub $0xc,%esp 10e181: 53 push %ebx 10e182: e8 41 1b 00 00 call 10fcc8 <_Thread_queue_First> if ( !next || 10e187: 83 c4 10 add $0x10,%esp 10e18a: 85 c0 test %eax,%eax 10e18c: 75 da jne 10e168 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e18e: 31 c0 xor %eax,%eax 10e190: 8b 5d fc mov -0x4(%ebp),%ebx 10e193: c9 leave 10e194: c3 ret 10e195: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 10e198: 8b 43 48 mov 0x48(%ebx),%eax 10e19b: 48 dec %eax 10e19c: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e19f: 85 c0 test %eax,%eax 10e1a1: 74 92 je 10e135 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e1a3: 52 push %edx 10e1a4: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e1a5: 31 c0 xor %eax,%eax 10e1a7: 8b 5d fc mov -0x4(%ebp),%ebx 10e1aa: c9 leave 10e1ab: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e1ac: 52 push %edx 10e1ad: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e1ae: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e1b5: 31 c0 xor %eax,%eax 10e1b7: 8b 5d fc mov -0x4(%ebp),%ebx 10e1ba: c9 leave 10e1bb: c3 ret next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e1bc: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e1c3: eb c9 jmp 10e18e <_CORE_RWLock_Release+0x76> <== ALWAYS TAKEN 0010e1c8 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e1c8: 55 push %ebp 10e1c9: 89 e5 mov %esp,%ebp 10e1cb: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e1ce: 8d 45 f4 lea -0xc(%ebp),%eax 10e1d1: 50 push %eax 10e1d2: ff 75 08 pushl 0x8(%ebp) 10e1d5: e8 e2 12 00 00 call 10f4bc <_Thread_Get> switch ( location ) { 10e1da: 83 c4 10 add $0x10,%esp 10e1dd: 8b 55 f4 mov -0xc(%ebp),%edx 10e1e0: 85 d2 test %edx,%edx 10e1e2: 75 17 jne 10e1fb <_CORE_RWLock_Timeout+0x33> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10e1e4: 83 ec 0c sub $0xc,%esp 10e1e7: 50 push %eax 10e1e8: e8 ab 1b 00 00 call 10fd98 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e1ed: a1 78 a1 12 00 mov 0x12a178,%eax 10e1f2: 48 dec %eax 10e1f3: a3 78 a1 12 00 mov %eax,0x12a178 10e1f8: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e1fb: c9 leave 10e1fc: c3 ret 00112c34 <_CORE_barrier_Release>: #else Objects_Id id __attribute__((unused)), CORE_barrier_API_mp_support_callout api_barrier_mp_support __attribute__((unused)) #endif ) { 112c34: 55 push %ebp 112c35: 89 e5 mov %esp,%ebp 112c37: 56 push %esi 112c38: 53 push %ebx 112c39: 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)) ) { 112c3c: 31 db xor %ebx,%ebx 112c3e: eb 01 jmp 112c41 <_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++; 112c40: 43 inc %ebx { Thread_Control *the_thread; uint32_t count; count = 0; while ( (the_thread = _Thread_queue_Dequeue(&the_barrier->Wait_queue)) ) { 112c41: 83 ec 0c sub $0xc,%esp 112c44: 56 push %esi 112c45: e8 5e ac ff ff call 10d8a8 <_Thread_queue_Dequeue> 112c4a: 83 c4 10 add $0x10,%esp 112c4d: 85 c0 test %eax,%eax 112c4f: 75 ef jne 112c40 <_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; 112c51: c7 46 48 00 00 00 00 movl $0x0,0x48(%esi) return count; } 112c58: 89 d8 mov %ebx,%eax 112c5a: 8d 65 f8 lea -0x8(%ebp),%esp 112c5d: 5b pop %ebx 112c5e: 5e pop %esi 112c5f: c9 leave 112c60: c3 ret 00112c64 <_CORE_barrier_Wait>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 112c64: 55 push %ebp 112c65: 89 e5 mov %esp,%ebp 112c67: 57 push %edi 112c68: 56 push %esi 112c69: 53 push %ebx 112c6a: 83 ec 1c sub $0x1c,%esp 112c6d: 8b 45 08 mov 0x8(%ebp),%eax 112c70: 8b 5d 0c mov 0xc(%ebp),%ebx 112c73: 8b 75 14 mov 0x14(%ebp),%esi 112c76: 8b 7d 18 mov 0x18(%ebp),%edi Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 112c79: 8b 15 98 74 12 00 mov 0x127498,%edx executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 112c7f: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 112c86: 9c pushf 112c87: fa cli 112c88: 8f 45 e4 popl -0x1c(%ebp) the_barrier->number_of_waiting_threads++; 112c8b: 8b 48 48 mov 0x48(%eax),%ecx 112c8e: 41 inc %ecx 112c8f: 89 48 48 mov %ecx,0x48(%eax) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 112c92: 83 78 40 00 cmpl $0x0,0x40(%eax) 112c96: 75 05 jne 112c9d <_CORE_barrier_Wait+0x39> if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { 112c98: 3b 48 44 cmp 0x44(%eax),%ecx 112c9b: 74 2b je 112cc8 <_CORE_barrier_Wait+0x64> 112c9d: 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; 112ca4: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 112ca7: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( level ); 112caa: ff 75 e4 pushl -0x1c(%ebp) 112cad: 9d popf _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 112cae: c7 45 10 d4 dc 10 00 movl $0x10dcd4,0x10(%ebp) 112cb5: 89 75 0c mov %esi,0xc(%ebp) 112cb8: 89 45 08 mov %eax,0x8(%ebp) } 112cbb: 83 c4 1c add $0x1c,%esp 112cbe: 5b pop %ebx 112cbf: 5e pop %esi 112cc0: 5f pop %edi 112cc1: 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 ); 112cc2: e9 fd ac ff ff jmp 10d9c4 <_Thread_queue_Enqueue_with_handler> 112cc7: 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; 112cc8: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _ISR_Enable( level ); 112ccf: ff 75 e4 pushl -0x1c(%ebp) 112cd2: 9d popf _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 112cd3: 89 7d 10 mov %edi,0x10(%ebp) 112cd6: 89 5d 0c mov %ebx,0xc(%ebp) 112cd9: 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 ); } 112cdc: 83 c4 1c add $0x1c,%esp 112cdf: 5b pop %ebx 112ce0: 5e pop %esi 112ce1: 5f pop %edi 112ce2: 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 ); 112ce3: e9 4c ff ff ff jmp 112c34 <_CORE_barrier_Release> <== ALWAYS TAKEN 0011943c <_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 ) { 11943c: 55 push %ebp 11943d: 89 e5 mov %esp,%ebp 11943f: 57 push %edi 119440: 56 push %esi 119441: 53 push %ebx 119442: 83 ec 1c sub $0x1c,%esp 119445: 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 ) { 119448: 8b 45 10 mov 0x10(%ebp),%eax 11944b: 39 43 4c cmp %eax,0x4c(%ebx) 11944e: 72 60 jb 1194b0 <_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 ) { 119450: 8b 43 48 mov 0x48(%ebx),%eax 119453: 85 c0 test %eax,%eax 119455: 75 45 jne 11949c <_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))) { 119457: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11945e: eb 18 jmp 119478 <_CORE_message_queue_Broadcast+0x3c> <== ALWAYS TAKEN waitp = &the_thread->Wait; number_broadcasted += 1; 119460: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 119463: 8b 42 2c mov 0x2c(%edx),%eax 119466: 89 c7 mov %eax,%edi 119468: 8b 75 0c mov 0xc(%ebp),%esi 11946b: 8b 4d 10 mov 0x10(%ebp),%ecx 11946e: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 119470: 8b 42 28 mov 0x28(%edx),%eax 119473: 8b 55 10 mov 0x10(%ebp),%edx 119476: 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))) { 119478: 83 ec 0c sub $0xc,%esp 11947b: 53 push %ebx 11947c: e8 db 24 00 00 call 11b95c <_Thread_queue_Dequeue> 119481: 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 = 119483: 83 c4 10 add $0x10,%esp 119486: 85 c0 test %eax,%eax 119488: 75 d6 jne 119460 <_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; 11948a: 8b 55 e4 mov -0x1c(%ebp),%edx 11948d: 8b 45 1c mov 0x1c(%ebp),%eax 119490: 89 10 mov %edx,(%eax) 119492: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 119494: 8d 65 f4 lea -0xc(%ebp),%esp 119497: 5b pop %ebx 119498: 5e pop %esi 119499: 5f pop %edi 11949a: c9 leave 11949b: 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; 11949c: 8b 55 1c mov 0x1c(%ebp),%edx 11949f: c7 02 00 00 00 00 movl $0x0,(%edx) 1194a5: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194a7: 8d 65 f4 lea -0xc(%ebp),%esp 1194aa: 5b pop %ebx 1194ab: 5e pop %esi 1194ac: 5f pop %edi 1194ad: c9 leave 1194ae: c3 ret 1194af: 90 nop <== NOT EXECUTED { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1194b0: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 1194b5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1194b8: 5b pop %ebx <== NOT EXECUTED 1194b9: 5e pop %esi <== NOT EXECUTED 1194ba: 5f pop %edi <== NOT EXECUTED 1194bb: c9 leave <== NOT EXECUTED 1194bc: c3 ret <== NOT EXECUTED 00118030 <_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 ) { 118030: 55 push %ebp 118031: 89 e5 mov %esp,%ebp 118033: 53 push %ebx 118034: 83 ec 08 sub $0x8,%esp 118037: 8b 5d 08 mov 0x8(%ebp),%ebx /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 11803a: ff 75 10 pushl 0x10(%ebp) 11803d: ff 75 0c pushl 0xc(%ebp) 118040: 53 push %ebx 118041: e8 4e a9 ff ff call 112994 <_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 ) 118046: 83 c4 10 add $0x10,%esp 118049: 8b 43 48 mov 0x48(%ebx),%eax 11804c: 85 c0 test %eax,%eax 11804e: 74 0c je 11805c <_CORE_message_queue_Close+0x2c> (void) _CORE_message_queue_Flush_support( the_message_queue ); 118050: 83 ec 0c sub $0xc,%esp 118053: 53 push %ebx 118054: e8 13 00 00 00 call 11806c <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 118059: 83 c4 10 add $0x10,%esp (void) _Workspace_Free( the_message_queue->message_buffers ); 11805c: 8b 43 5c mov 0x5c(%ebx),%eax 11805f: 89 45 08 mov %eax,0x8(%ebp) } 118062: 8b 5d fc mov -0x4(%ebp),%ebx 118065: 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 ); 118066: e9 f9 b3 ff ff jmp 113464 <_Workspace_Free> 001194fc <_CORE_message_queue_Flush>: */ uint32_t _CORE_message_queue_Flush( CORE_message_queue_Control *the_message_queue ) { 1194fc: 55 push %ebp 1194fd: 89 e5 mov %esp,%ebp 1194ff: 83 ec 08 sub $0x8,%esp 119502: 8b 45 08 mov 0x8(%ebp),%eax if ( the_message_queue->number_of_pending_messages != 0 ) 119505: 8b 50 48 mov 0x48(%eax),%edx 119508: 85 d2 test %edx,%edx 11950a: 75 04 jne 119510 <_CORE_message_queue_Flush+0x14> return _CORE_message_queue_Flush_support( the_message_queue ); else return 0; } 11950c: 31 c0 xor %eax,%eax 11950e: c9 leave 11950f: 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 ); 119510: 89 45 08 mov %eax,0x8(%ebp) else return 0; } 119513: 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 ); 119514: e9 03 00 00 00 jmp 11951c <_CORE_message_queue_Flush_support> <== ALWAYS TAKEN 00114c40 <_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 ) { 114c40: 55 push %ebp 114c41: 89 e5 mov %esp,%ebp 114c43: 57 push %edi 114c44: 56 push %esi 114c45: 53 push %ebx 114c46: 83 ec 0c sub $0xc,%esp 114c49: 8b 5d 08 mov 0x8(%ebp),%ebx 114c4c: 8b 75 10 mov 0x10(%ebp),%esi 114c4f: 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; 114c52: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 114c55: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 114c5c: 89 43 4c mov %eax,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 114c5f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 114c66: c7 43 64 00 00 00 00 movl $0x0,0x64(%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)) { 114c6d: a8 03 test $0x3,%al 114c6f: 75 1b jne 114c8c <_CORE_message_queue_Initialize+0x4c> 114c71: 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)); 114c73: 8d 7a 14 lea 0x14(%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 * 114c76: 89 f8 mov %edi,%eax 114c78: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c7b: 39 d0 cmp %edx,%eax 114c7d: 73 25 jae 114ca4 <_CORE_message_queue_Initialize+0x64> <== NEVER TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114c7f: 31 c0 xor %eax,%eax } 114c81: 8d 65 f4 lea -0xc(%ebp),%esp 114c84: 5b pop %ebx 114c85: 5e pop %esi 114c86: 5f pop %edi 114c87: c9 leave 114c88: c3 ret 114c89: 8d 76 00 lea 0x0(%esi),%esi <== 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); 114c8c: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 114c8f: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 114c92: 39 d0 cmp %edx,%eax 114c94: 77 e9 ja 114c7f <_CORE_message_queue_Initialize+0x3f> <== 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)); 114c96: 8d 7a 14 lea 0x14(%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 * 114c99: 89 f8 mov %edi,%eax 114c9b: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 114c9e: 39 d0 cmp %edx,%eax 114ca0: 72 dd jb 114c7f <_CORE_message_queue_Initialize+0x3f> <== ALWAYS TAKEN 114ca2: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 114ca4: 83 ec 0c sub $0xc,%esp 114ca7: 50 push %eax 114ca8: e8 a7 29 00 00 call 117654 <_Workspace_Allocate> 114cad: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 114cb0: 83 c4 10 add $0x10,%esp 114cb3: 85 c0 test %eax,%eax 114cb5: 74 c8 je 114c7f <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 114cb7: 57 push %edi 114cb8: 56 push %esi 114cb9: 50 push %eax 114cba: 8d 43 68 lea 0x68(%ebx),%eax 114cbd: 50 push %eax 114cbe: e8 c5 4c 00 00 call 119988 <_Chain_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 114cc3: 8d 43 54 lea 0x54(%ebx),%eax 114cc6: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 114cc9: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 114cd0: 8d 43 50 lea 0x50(%ebx),%eax 114cd3: 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( 114cd6: 6a 06 push $0x6 114cd8: 68 80 00 00 00 push $0x80 114cdd: 8b 45 0c mov 0xc(%ebp),%eax 114ce0: 83 38 01 cmpl $0x1,(%eax) 114ce3: 0f 94 c0 sete %al 114ce6: 0f b6 c0 movzbl %al,%eax 114ce9: 50 push %eax 114cea: 53 push %ebx 114ceb: e8 4c 1f 00 00 call 116c3c <_Thread_queue_Initialize> 114cf0: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 114cf2: 83 c4 20 add $0x20,%esp } 114cf5: 8d 65 f4 lea -0xc(%ebp),%esp 114cf8: 5b pop %ebx 114cf9: 5e pop %esi 114cfa: 5f pop %edi 114cfb: c9 leave 114cfc: c3 ret 001109e8 <_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 ) { 1109e8: 55 push %ebp 1109e9: 89 e5 mov %esp,%ebp 1109eb: 56 push %esi 1109ec: 53 push %ebx 1109ed: 8b 45 08 mov 0x8(%ebp),%eax 1109f0: 8b 55 0c mov 0xc(%ebp),%edx 1109f3: 8b 4d 10 mov 0x10(%ebp),%ecx 1109f6: 89 4a 08 mov %ecx,0x8(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 1109f9: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 1109ff: 74 53 je 110a54 <_CORE_message_queue_Insert_message+0x6c> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 110a01: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 110a07: 74 6f je 110a78 <_CORE_message_queue_Insert_message+0x90> Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 110a09: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110a0c: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 110a0f: 39 f3 cmp %esi,%ebx 110a11: 74 05 je 110a18 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 110a13: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a16: 7d 2c jge 110a44 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 110a18: 9c pushf 110a19: fa cli 110a1a: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a1b: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 110a1e: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110a21: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110a24: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 110a26: 89 11 mov %edx,(%ecx) the_node->next = before_node; 110a28: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 110a2a: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 110a2d: 56 push %esi 110a2e: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 110a2f: 8b 50 60 mov 0x60(%eax),%edx 110a32: 85 d2 test %edx,%edx 110a34: 74 3d je 110a73 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 110a36: 8b 40 64 mov 0x64(%eax),%eax 110a39: 89 45 08 mov %eax,0x8(%ebp) #endif } 110a3c: 5b pop %ebx 110a3d: 5e pop %esi 110a3e: c9 leave * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * 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); 110a3f: ff e2 jmp *%edx 110a41: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { the_node = the_node->next; 110a44: 8b 1b mov (%ebx),%ebx int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 110a46: 39 f3 cmp %esi,%ebx 110a48: 74 ce je 110a18 <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 110a4a: 3b 4b 08 cmp 0x8(%ebx),%ecx 110a4d: 7c c9 jl 110a18 <_CORE_message_queue_Insert_message+0x30> 110a4f: eb f3 jmp 110a44 <_CORE_message_queue_Insert_message+0x5c> <== ALWAYS TAKEN 110a51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 110a54: 9c pushf 110a55: fa cli 110a56: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a57: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 110a5a: 8d 48 54 lea 0x54(%eax),%ecx 110a5d: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 110a5f: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 110a62: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 110a65: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 110a67: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a6a: 53 push %ebx 110a6b: 9d popf /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 110a6c: 8b 50 60 mov 0x60(%eax),%edx 110a6f: 85 d2 test %edx,%edx 110a71: 75 c3 jne 110a36 <_CORE_message_queue_Insert_message+0x4e> <== ALWAYS TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 110a73: 5b pop %ebx 110a74: 5e pop %esi 110a75: c9 leave 110a76: c3 ret 110a77: 90 nop <== NOT EXECUTED SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 110a78: 9c pushf 110a79: fa cli 110a7a: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 110a7b: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 110a7e: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 110a81: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 110a84: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 110a87: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 110a8a: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 110a8c: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 110a8f: 53 push %ebx 110a90: 9d popf 110a91: eb 9c jmp 110a2f <_CORE_message_queue_Insert_message+0x47> <== ALWAYS TAKEN 00114d00 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 114d00: 55 push %ebp 114d01: 89 e5 mov %esp,%ebp 114d03: 57 push %edi 114d04: 56 push %esi 114d05: 53 push %ebx 114d06: 83 ec 2c sub $0x2c,%esp 114d09: 8b 55 08 mov 0x8(%ebp),%edx 114d0c: 8b 45 0c mov 0xc(%ebp),%eax 114d0f: 89 45 dc mov %eax,-0x24(%ebp) 114d12: 8b 4d 10 mov 0x10(%ebp),%ecx 114d15: 89 4d e0 mov %ecx,-0x20(%ebp) 114d18: 8b 45 14 mov 0x14(%ebp),%eax 114d1b: 8b 5d 1c mov 0x1c(%ebp),%ebx 114d1e: 89 5d d8 mov %ebx,-0x28(%ebp) 114d21: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 114d25: 8b 0d b8 11 13 00 mov 0x1311b8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 114d2b: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 114d32: 9c pushf 114d33: fa cli 114d34: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114d37: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114d3a: 8d 72 54 lea 0x54(%edx),%esi 114d3d: 39 f3 cmp %esi,%ebx 114d3f: 74 7b je 114dbc <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114d41: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 114d43: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 114d46: 8d 72 50 lea 0x50(%edx),%esi 114d49: 89 71 04 mov %esi,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; 114d4c: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 114d4f: ff 75 e4 pushl -0x1c(%ebp) 114d52: 9d popf *size_p = the_message->Contents.size; 114d53: 8b 4b 0c mov 0xc(%ebx),%ecx 114d56: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 114d58: 8b 73 08 mov 0x8(%ebx),%esi 114d5b: 8b 0d b8 11 13 00 mov 0x1311b8,%ecx 114d61: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 114d64: 8d 4b 10 lea 0x10(%ebx),%ecx 114d67: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d6a: 8b 08 mov (%eax),%ecx 114d6c: 8b 7d e0 mov -0x20(%ebp),%edi 114d6f: 8b 75 e4 mov -0x1c(%ebp),%esi 114d72: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 114d74: 83 ec 0c sub $0xc,%esp 114d77: 52 push %edx 114d78: 89 55 d4 mov %edx,-0x2c(%ebp) 114d7b: e8 40 1b 00 00 call 1168c0 <_Thread_queue_Dequeue> if ( !the_thread ) { 114d80: 83 c4 10 add $0x10,%esp 114d83: 85 c0 test %eax,%eax 114d85: 8b 55 d4 mov -0x2c(%ebp),%edx 114d88: 0f 84 86 00 00 00 je 114e14 <_CORE_message_queue_Seize+0x114> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 114d8e: 8b 48 24 mov 0x24(%eax),%ecx 114d91: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 114d94: 8b 48 30 mov 0x30(%eax),%ecx 114d97: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 114d9a: 8b 70 2c mov 0x2c(%eax),%esi 114d9d: 8b 7d e4 mov -0x1c(%ebp),%edi 114da0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114da2: 8b 43 08 mov 0x8(%ebx),%eax 114da5: 89 45 10 mov %eax,0x10(%ebp) 114da8: 89 5d 0c mov %ebx,0xc(%ebp) 114dab: 89 55 08 mov %edx,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 ); } 114dae: 8d 65 f4 lea -0xc(%ebp),%esp 114db1: 5b pop %ebx 114db2: 5e pop %esi 114db3: 5f pop %edi 114db4: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 114db5: e9 0e 4c 00 00 jmp 1199c8 <_CORE_message_queue_Insert_message> 114dba: 66 90 xchg %ax,%ax <== NOT EXECUTED return; } #endif } if ( !wait ) { 114dbc: 89 fb mov %edi,%ebx 114dbe: 84 db test %bl,%bl 114dc0: 75 16 jne 114dd8 <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 114dc2: ff 75 e4 pushl -0x1c(%ebp) 114dc5: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 114dc6: 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 ); } 114dcd: 8d 65 f4 lea -0xc(%ebp),%esp 114dd0: 5b pop %ebx 114dd1: 5e pop %esi 114dd2: 5f pop %edi 114dd3: c9 leave 114dd4: c3 ret 114dd5: 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; 114dd8: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) 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; 114ddf: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 114de2: 8b 5d dc mov -0x24(%ebp),%ebx 114de5: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 114de8: 8b 5d e0 mov -0x20(%ebp),%ebx 114deb: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 114dee: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 114df1: ff 75 e4 pushl -0x1c(%ebp) 114df4: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 114df5: c7 45 10 ec 6c 11 00 movl $0x116cec,0x10(%ebp) 114dfc: 8b 45 d8 mov -0x28(%ebp),%eax 114dff: 89 45 0c mov %eax,0xc(%ebp) 114e02: 89 55 08 mov %edx,0x8(%ebp) } 114e05: 8d 65 f4 lea -0xc(%ebp),%esp 114e08: 5b pop %ebx 114e09: 5e pop %esi 114e0a: 5f pop %edi 114e0b: 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 ); 114e0c: e9 cb 1b 00 00 jmp 1169dc <_Thread_queue_Enqueue_with_handler> 114e11: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 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 ); 114e14: 89 5d 0c mov %ebx,0xc(%ebp) 114e17: 83 c2 68 add $0x68,%edx 114e1a: 89 55 08 mov %edx,0x8(%ebp) } 114e1d: 8d 65 f4 lea -0xc(%ebp),%esp 114e20: 5b pop %ebx 114e21: 5e pop %esi 114e22: 5f pop %edi 114e23: c9 leave 114e24: e9 97 fd ff ff jmp 114bc0 <_Chain_Append> <== ALWAYS TAKEN 0010bec0 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10bec0: 55 push %ebp 10bec1: 89 e5 mov %esp,%ebp 10bec3: 57 push %edi 10bec4: 56 push %esi 10bec5: 53 push %ebx 10bec6: 83 ec 1c sub $0x1c,%esp 10bec9: 8b 5d 08 mov 0x8(%ebp),%ebx 10becc: 8b 75 0c mov 0xc(%ebp),%esi 10becf: 8a 4d 20 mov 0x20(%ebp),%cl CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bed2: 8b 45 10 mov 0x10(%ebp),%eax 10bed5: 39 43 4c cmp %eax,0x4c(%ebx) 10bed8: 72 2e jb 10bf08 <_CORE_message_queue_Submit+0x48> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10beda: 8b 43 48 mov 0x48(%ebx),%eax 10bedd: 85 c0 test %eax,%eax 10bedf: 74 37 je 10bf18 <_CORE_message_queue_Submit+0x58> /* * 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 ) { 10bee1: 39 43 44 cmp %eax,0x44(%ebx) 10bee4: 0f 87 b6 00 00 00 ja 10bfa0 <_CORE_message_queue_Submit+0xe0> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10beea: 84 c9 test %cl,%cl 10beec: 0f 84 ea 00 00 00 je 10bfdc <_CORE_message_queue_Submit+0x11c> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10bef2: a1 74 74 12 00 mov 0x127474,%eax 10bef7: 85 c0 test %eax,%eax 10bef9: 74 5d je 10bf58 <_CORE_message_queue_Submit+0x98> 10befb: b8 03 00 00 00 mov $0x3,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf00: 8d 65 f4 lea -0xc(%ebp),%esp 10bf03: 5b pop %ebx 10bf04: 5e pop %esi 10bf05: 5f pop %edi 10bf06: c9 leave 10bf07: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10bf08: 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 } 10bf0d: 8d 65 f4 lea -0xc(%ebp),%esp 10bf10: 5b pop %ebx 10bf11: 5e pop %esi 10bf12: 5f pop %edi 10bf13: c9 leave 10bf14: c3 ret 10bf15: 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 ); 10bf18: 83 ec 0c sub $0xc,%esp 10bf1b: 53 push %ebx 10bf1c: 88 4d e4 mov %cl,-0x1c(%ebp) 10bf1f: e8 84 19 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10bf24: 89 c2 mov %eax,%edx if ( the_thread ) { 10bf26: 83 c4 10 add $0x10,%esp 10bf29: 85 c0 test %eax,%eax 10bf2b: 8a 4d e4 mov -0x1c(%ebp),%cl 10bf2e: 0f 84 b8 00 00 00 je 10bfec <_CORE_message_queue_Submit+0x12c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bf34: 8b 40 2c mov 0x2c(%eax),%eax 10bf37: 89 c7 mov %eax,%edi 10bf39: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf3c: 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; 10bf3e: 8b 42 28 mov 0x28(%edx),%eax 10bf41: 8b 4d 10 mov 0x10(%ebp),%ecx 10bf44: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10bf46: 8b 45 1c mov 0x1c(%ebp),%eax 10bf49: 89 42 24 mov %eax,0x24(%edx) 10bf4c: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10bf4e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf51: 5b pop %ebx 10bf52: 5e pop %esi 10bf53: 5f pop %edi 10bf54: c9 leave 10bf55: c3 ret 10bf56: 66 90 xchg %ax,%ax <== NOT EXECUTED * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 10bf58: a1 98 74 12 00 mov 0x127498,%eax ISR_Level level; _ISR_Disable( level ); 10bf5d: 9c pushf 10bf5e: fa cli 10bf5f: 59 pop %ecx 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; 10bf60: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 10bf67: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10bf6a: 8b 55 14 mov 0x14(%ebp),%edx 10bf6d: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10bf70: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10bf73: 8b 55 10 mov 0x10(%ebp),%edx 10bf76: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10bf79: 8b 55 1c mov 0x1c(%ebp),%edx 10bf7c: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10bf7f: 51 push %ecx 10bf80: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10bf81: 50 push %eax 10bf82: 68 d4 dc 10 00 push $0x10dcd4 10bf87: ff 75 24 pushl 0x24(%ebp) 10bf8a: 53 push %ebx 10bf8b: e8 34 1a 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> 10bf90: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10bf95: 83 c4 10 add $0x10,%esp #endif } 10bf98: 8d 65 f4 lea -0xc(%ebp),%esp 10bf9b: 5b pop %ebx 10bf9c: 5e pop %esi 10bf9d: 5f pop %edi 10bf9e: c9 leave 10bf9f: 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 *) 10bfa0: 83 ec 0c sub $0xc,%esp 10bfa3: 8d 43 68 lea 0x68(%ebx),%eax 10bfa6: 50 push %eax 10bfa7: e8 f0 fe ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10bfac: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10bfae: 8d 40 10 lea 0x10(%eax),%eax 10bfb1: 89 c7 mov %eax,%edi 10bfb3: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfb6: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10bfb8: 8b 4d 10 mov 0x10(%ebp),%ecx 10bfbb: 89 4a 0c mov %ecx,0xc(%edx) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 10bfbe: 8b 45 1c mov 0x1c(%ebp),%eax 10bfc1: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10bfc4: 83 c4 0c add $0xc,%esp 10bfc7: 50 push %eax 10bfc8: 52 push %edx 10bfc9: 53 push %ebx 10bfca: e8 19 4a 00 00 call 1109e8 <_CORE_message_queue_Insert_message> 10bfcf: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10bfd1: 83 c4 10 add $0x10,%esp 10bfd4: e9 34 ff ff ff jmp 10bf0d <_CORE_message_queue_Submit+0x4d> <== ALWAYS TAKEN 10bfd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10bfdc: 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 } 10bfe1: 8d 65 f4 lea -0xc(%ebp),%esp 10bfe4: 5b pop %ebx 10bfe5: 5e pop %esi 10bfe6: 5f pop %edi 10bfe7: c9 leave 10bfe8: c3 ret 10bfe9: 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 ); if ( the_thread ) { 10bfec: 8b 43 48 mov 0x48(%ebx),%eax 10bfef: e9 ed fe ff ff jmp 10bee1 <_CORE_message_queue_Submit+0x21> <== ALWAYS TAKEN 0010c000 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c000: 55 push %ebp 10c001: 89 e5 mov %esp,%ebp 10c003: 57 push %edi 10c004: 56 push %esi 10c005: 53 push %ebx 10c006: 83 ec 0c sub $0xc,%esp 10c009: 8b 45 08 mov 0x8(%ebp),%eax 10c00c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c00f: 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; 10c012: 8d 78 40 lea 0x40(%eax),%edi 10c015: b9 04 00 00 00 mov $0x4,%ecx 10c01a: 89 de mov %ebx,%esi 10c01c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c01e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c021: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c028: 85 d2 test %edx,%edx 10c02a: 75 30 jne 10c05c <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c02c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c033: 8b 15 98 74 12 00 mov 0x127498,%edx 10c039: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c03c: 8b 4a 08 mov 0x8(%edx),%ecx 10c03f: 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; 10c042: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c045: 83 f9 02 cmp $0x2,%ecx 10c048: 74 05 je 10c04f <_CORE_mutex_Initialize+0x4f> 10c04a: 83 f9 03 cmp $0x3,%ecx 10c04d: 75 22 jne 10c071 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c04f: 8b 4a 14 mov 0x14(%edx),%ecx 10c052: 3b 48 4c cmp 0x4c(%eax),%ecx 10c055: 72 41 jb 10c098 <_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++; 10c057: ff 42 1c incl 0x1c(%edx) 10c05a: eb 15 jmp 10c071 <_CORE_mutex_Initialize+0x71> <== ALWAYS TAKEN } } else { the_mutex->nest_count = 0; 10c05c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c063: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c06a: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c071: 6a 05 push $0x5 10c073: 68 00 04 00 00 push $0x400 10c078: 31 d2 xor %edx,%edx 10c07a: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c07e: 0f 95 c2 setne %dl 10c081: 52 push %edx 10c082: 50 push %eax 10c083: e8 9c 1b 00 00 call 10dc24 <_Thread_queue_Initialize> 10c088: 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; 10c08a: 83 c4 10 add $0x10,%esp } 10c08d: 8d 65 f4 lea -0xc(%ebp),%esp 10c090: 5b pop %ebx 10c091: 5e pop %esi 10c092: 5f pop %edi 10c093: c9 leave 10c094: c3 ret 10c095: 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 ) 10c098: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c09d: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a0: 5b pop %ebx 10c0a1: 5e pop %esi 10c0a2: 5f pop %edi 10c0a3: c9 leave 10c0a4: c3 ret 0010c0f8 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c0f8: 55 push %ebp 10c0f9: 89 e5 mov %esp,%ebp 10c0fb: 53 push %ebx 10c0fc: 83 ec 14 sub $0x14,%esp 10c0ff: 8b 5d 08 mov 0x8(%ebp),%ebx 10c102: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c105: a1 d8 73 12 00 mov 0x1273d8,%eax 10c10a: 85 c0 test %eax,%eax 10c10c: 74 04 je 10c112 <_CORE_mutex_Seize+0x1a> 10c10e: 84 d2 test %dl,%dl 10c110: 75 36 jne 10c148 <_CORE_mutex_Seize+0x50> <== NEVER TAKEN 10c112: 83 ec 08 sub $0x8,%esp 10c115: 8d 45 18 lea 0x18(%ebp),%eax 10c118: 50 push %eax 10c119: 53 push %ebx 10c11a: 88 55 f4 mov %dl,-0xc(%ebp) 10c11d: e8 72 49 00 00 call 110a94 <_CORE_mutex_Seize_interrupt_trylock> 10c122: 83 c4 10 add $0x10,%esp 10c125: 85 c0 test %eax,%eax 10c127: 8a 55 f4 mov -0xc(%ebp),%dl 10c12a: 74 14 je 10c140 <_CORE_mutex_Seize+0x48> 10c12c: 84 d2 test %dl,%dl 10c12e: 75 30 jne 10c160 <_CORE_mutex_Seize+0x68> 10c130: ff 75 18 pushl 0x18(%ebp) 10c133: 9d popf 10c134: a1 98 74 12 00 mov 0x127498,%eax 10c139: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c140: 8b 5d fc mov -0x4(%ebp),%ebx 10c143: c9 leave 10c144: c3 ret 10c145: 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 ); 10c148: 83 3d a0 75 12 00 01 cmpl $0x1,0x1275a0 10c14f: 76 c1 jbe 10c112 <_CORE_mutex_Seize+0x1a> 10c151: 53 push %ebx 10c152: 6a 13 push $0x13 10c154: 6a 00 push $0x0 10c156: 6a 00 push $0x0 10c158: e8 9b 05 00 00 call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 10c15d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c160: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c167: a1 98 74 12 00 mov 0x127498,%eax 10c16c: 89 58 44 mov %ebx,0x44(%eax) 10c16f: 8b 55 0c mov 0xc(%ebp),%edx 10c172: 89 50 20 mov %edx,0x20(%eax) 10c175: a1 d8 73 12 00 mov 0x1273d8,%eax 10c17a: 40 inc %eax 10c17b: a3 d8 73 12 00 mov %eax,0x1273d8 10c180: ff 75 18 pushl 0x18(%ebp) 10c183: 9d popf 10c184: 83 ec 08 sub $0x8,%esp 10c187: ff 75 14 pushl 0x14(%ebp) 10c18a: 53 push %ebx 10c18b: e8 18 ff ff ff call 10c0a8 <_CORE_mutex_Seize_interrupt_blocking> <== ALWAYS TAKEN 10c190: 83 c4 10 add $0x10,%esp } 10c193: 8b 5d fc mov -0x4(%ebp),%ebx 10c196: c9 leave 10c197: c3 ret 0010c0a8 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 10c0a8: 55 push %ebp 10c0a9: 89 e5 mov %esp,%ebp 10c0ab: 56 push %esi 10c0ac: 53 push %ebx 10c0ad: 8b 5d 08 mov 0x8(%ebp),%ebx 10c0b0: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *executing; executing = _Thread_Executing; 10c0b3: a1 98 74 12 00 mov 0x127498,%eax if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 10c0b8: 83 7b 48 02 cmpl $0x2,0x48(%ebx) 10c0bc: 74 1e je 10c0dc <_CORE_mutex_Seize_interrupt_blocking+0x34> false ); } } the_mutex->blocked_count++; 10c0be: ff 43 58 incl 0x58(%ebx) _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 10c0c1: 50 push %eax 10c0c2: 68 d4 dc 10 00 push $0x10dcd4 10c0c7: 56 push %esi 10c0c8: 53 push %ebx 10c0c9: e8 f6 18 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c0ce: 83 c4 10 add $0x10,%esp } 10c0d1: 8d 65 f8 lea -0x8(%ebp),%esp 10c0d4: 5b pop %ebx 10c0d5: 5e pop %esi 10c0d6: c9 leave } the_mutex->blocked_count++; _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); _Thread_Enable_dispatch(); 10c0d7: e9 d8 13 00 00 jmp 10d4b4 <_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 ) { 10c0dc: 8b 53 5c mov 0x5c(%ebx),%edx 10c0df: 8b 40 14 mov 0x14(%eax),%eax 10c0e2: 39 42 14 cmp %eax,0x14(%edx) 10c0e5: 76 d7 jbe 10c0be <_CORE_mutex_Seize_interrupt_blocking+0x16> _Thread_Change_priority( 10c0e7: 51 push %ecx 10c0e8: 6a 00 push $0x0 10c0ea: 50 push %eax 10c0eb: 52 push %edx 10c0ec: e8 db 0e 00 00 call 10cfcc <_Thread_Change_priority> 10c0f1: 83 c4 10 add $0x10,%esp 10c0f4: eb c8 jmp 10c0be <_CORE_mutex_Seize_interrupt_blocking+0x16> <== ALWAYS TAKEN 00110a94 <_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 ) { 110a94: 55 push %ebp 110a95: 89 e5 mov %esp,%ebp 110a97: 56 push %esi 110a98: 53 push %ebx 110a99: 8b 45 08 mov 0x8(%ebp),%eax 110a9c: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 110a9f: 8b 15 98 74 12 00 mov 0x127498,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 110aa5: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 110aac: 8b 58 50 mov 0x50(%eax),%ebx 110aaf: 85 db test %ebx,%ebx 110ab1: 74 31 je 110ae4 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 110ab3: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 110aba: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 110abd: 8b 5a 08 mov 0x8(%edx),%ebx 110ac0: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 110ac3: 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; 110aca: 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 ) || 110acd: 83 fb 02 cmp $0x2,%ebx 110ad0: 74 26 je 110af8 <_CORE_mutex_Seize_interrupt_trylock+0x64> 110ad2: 83 fb 03 cmp $0x3,%ebx 110ad5: 74 3d je 110b14 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 110ad7: ff 31 pushl (%ecx) 110ad9: 9d popf 110ada: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 110adc: 8d 65 f8 lea -0x8(%ebp),%esp 110adf: 5b pop %ebx 110ae0: 5e pop %esi 110ae1: c9 leave 110ae2: c3 ret 110ae3: 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 ) ) { 110ae4: 3b 50 5c cmp 0x5c(%eax),%edx 110ae7: 74 17 je 110b00 <_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 ); 110ae9: b8 01 00 00 00 mov $0x1,%eax 110aee: 8d 65 f8 lea -0x8(%ebp),%esp 110af1: 5b pop %ebx 110af2: 5e pop %esi 110af3: c9 leave 110af4: c3 ret 110af5: 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++; 110af8: ff 42 1c incl 0x1c(%edx) 110afb: eb da jmp 110ad7 <_CORE_mutex_Seize_interrupt_trylock+0x43> <== ALWAYS TAKEN 110afd: 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 ) { 110b00: 8b 58 40 mov 0x40(%eax),%ebx 110b03: 85 db test %ebx,%ebx 110b05: 75 45 jne 110b4c <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 110b07: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 110b0a: ff 31 pushl (%ecx) 110b0c: 9d popf 110b0d: 31 c0 xor %eax,%eax 110b0f: eb dd jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b11: 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++; 110b14: 8b 5a 1c mov 0x1c(%edx),%ebx 110b17: 8d 73 01 lea 0x1(%ebx),%esi 110b1a: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 110b1d: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 110b20: 39 70 4c cmp %esi,0x4c(%eax) 110b23: 74 6b je 110b90 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 110b25: 72 39 jb 110b60 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 110b27: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 110b2e: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 110b35: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 110b3c: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 110b3f: ff 31 pushl (%ecx) 110b41: 9d popf 110b42: 31 c0 xor %eax,%eax 110b44: 8d 65 f8 lea -0x8(%ebp),%esp 110b47: 5b pop %ebx 110b48: 5e pop %esi 110b49: c9 leave 110b4a: c3 ret 110b4b: 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 ) { 110b4c: 4b dec %ebx 110b4d: 75 9a jne 110ae9 <_CORE_mutex_Seize_interrupt_trylock+0x55> 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; 110b4f: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 110b56: ff 31 pushl (%ecx) 110b58: 9d popf 110b59: 31 c0 xor %eax,%eax 110b5b: eb 91 jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110b60: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 110b66: 42 inc %edx 110b67: 89 15 d8 73 12 00 mov %edx,0x1273d8 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 110b6d: ff 31 pushl (%ecx) 110b6f: 9d popf _Thread_Change_priority( 110b70: 52 push %edx 110b71: 6a 00 push $0x0 110b73: ff 70 4c pushl 0x4c(%eax) 110b76: ff 70 5c pushl 0x5c(%eax) 110b79: e8 4e c4 ff ff call 10cfcc <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 110b7e: e8 31 c9 ff ff call 10d4b4 <_Thread_Enable_dispatch> 110b83: 31 c0 xor %eax,%eax 110b85: 83 c4 10 add $0x10,%esp 110b88: e9 61 ff ff ff jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 110b8d: 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 ); 110b90: ff 31 pushl (%ecx) 110b92: 9d popf 110b93: 31 c0 xor %eax,%eax 110b95: e9 54 ff ff ff jmp 110aee <_CORE_mutex_Seize_interrupt_trylock+0x5a> <== ALWAYS TAKEN 0010c198 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c198: 55 push %ebp 10c199: 89 e5 mov %esp,%ebp 10c19b: 53 push %ebx 10c19c: 83 ec 04 sub $0x4,%esp 10c19f: 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; 10c1a2: 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 ) { 10c1a5: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c1a9: 74 15 je 10c1c0 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c1ab: 3b 05 98 74 12 00 cmp 0x127498,%eax 10c1b1: 74 0d je 10c1c0 <_CORE_mutex_Surrender+0x28> 10c1b3: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c1b8: 8b 5d fc mov -0x4(%ebp),%ebx 10c1bb: c9 leave 10c1bc: c3 ret 10c1bd: 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 ) 10c1c0: 8b 53 54 mov 0x54(%ebx),%edx 10c1c3: 85 d2 test %edx,%edx 10c1c5: 74 65 je 10c22c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c1c7: 4a dec %edx 10c1c8: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c1cb: 85 d2 test %edx,%edx 10c1cd: 75 5d jne 10c22c <_CORE_mutex_Surrender+0x94> 10c1cf: 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 ) || 10c1d2: 83 fa 02 cmp $0x2,%edx 10c1d5: 0f 84 99 00 00 00 je 10c274 <_CORE_mutex_Surrender+0xdc> 10c1db: 83 fa 03 cmp $0x3,%edx 10c1de: 0f 84 90 00 00 00 je 10c274 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c1e4: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c1eb: 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 ) || 10c1f2: 83 fa 02 cmp $0x2,%edx 10c1f5: 74 5d je 10c254 <_CORE_mutex_Surrender+0xbc> 10c1f7: 83 fa 03 cmp $0x3,%edx 10c1fa: 74 58 je 10c254 <_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 ) ) ) { 10c1fc: 83 ec 0c sub $0xc,%esp 10c1ff: 53 push %ebx 10c200: e8 a3 16 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10c205: 83 c4 10 add $0x10,%esp 10c208: 85 c0 test %eax,%eax 10c20a: 74 7c je 10c288 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c20c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c20f: 8b 50 08 mov 0x8(%eax),%edx 10c212: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c215: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c21c: 8b 53 48 mov 0x48(%ebx),%edx 10c21f: 83 fa 02 cmp $0x2,%edx 10c222: 74 58 je 10c27c <_CORE_mutex_Surrender+0xe4> 10c224: 83 fa 03 cmp $0x3,%edx 10c227: 74 0b je 10c234 <_CORE_mutex_Surrender+0x9c> 10c229: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c22c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c22e: 8b 5d fc mov -0x4(%ebp),%ebx 10c231: c9 leave 10c232: c3 ret 10c233: 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++; 10c234: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c237: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c23a: 3b 50 14 cmp 0x14(%eax),%edx 10c23d: 73 ed jae 10c22c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c23f: 51 push %ecx 10c240: 6a 00 push $0x0 10c242: 52 push %edx 10c243: 50 push %eax 10c244: e8 83 0d 00 00 call 10cfcc <_Thread_Change_priority> <== ALWAYS TAKEN 10c249: 31 c0 xor %eax,%eax 10c24b: 83 c4 10 add $0x10,%esp 10c24e: e9 65 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c253: 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 && 10c254: 8b 50 1c mov 0x1c(%eax),%edx 10c257: 85 d2 test %edx,%edx 10c259: 75 a1 jne 10c1fc <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c25b: 8b 50 18 mov 0x18(%eax),%edx 10c25e: 3b 50 14 cmp 0x14(%eax),%edx 10c261: 74 99 je 10c1fc <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c263: 51 push %ecx 10c264: 6a 01 push $0x1 10c266: 52 push %edx 10c267: 50 push %eax 10c268: e8 5f 0d 00 00 call 10cfcc <_Thread_Change_priority> <== ALWAYS TAKEN 10c26d: 83 c4 10 add $0x10,%esp 10c270: eb 8a jmp 10c1fc <_CORE_mutex_Surrender+0x64> <== ALWAYS TAKEN 10c272: 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--; 10c274: ff 48 1c decl 0x1c(%eax) 10c277: e9 68 ff ff ff jmp 10c1e4 <_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++; 10c27c: ff 40 1c incl 0x1c(%eax) 10c27f: 31 c0 xor %eax,%eax break; 10c281: e9 32 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 10c286: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c288: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c28f: 31 c0 xor %eax,%eax 10c291: e9 22 ff ff ff jmp 10c1b8 <_CORE_mutex_Surrender+0x20> <== ALWAYS TAKEN 00114868 <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 114868: 55 push %ebp 114869: 89 e5 mov %esp,%ebp 11486b: 57 push %edi 11486c: 56 push %esi 11486d: 53 push %ebx 11486e: 83 ec 1c sub $0x1c,%esp 114871: 8b 45 08 mov 0x8(%ebp),%eax 114874: 8b 7d 0c mov 0xc(%ebp),%edi 114877: 8b 75 14 mov 0x14(%ebp),%esi 11487a: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 11487d: 8b 15 d8 d0 12 00 mov 0x12d0d8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 114883: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 11488a: 9c pushf 11488b: fa cli 11488c: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 11488f: 8b 48 48 mov 0x48(%eax),%ecx 114892: 85 c9 test %ecx,%ecx 114894: 75 46 jne 1148dc <_CORE_semaphore_Seize+0x74> /* * If the semaphore was not available and the caller was not willing * to block, then return immediately with a status indicating that * the semaphore was not available and the caller never blocked. */ if ( !wait ) { 114896: 84 db test %bl,%bl 114898: 75 16 jne 1148b0 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11489a: ff 75 e4 pushl -0x1c(%ebp) 11489d: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 11489e: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx) _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 1148a5: 83 c4 1c add $0x1c,%esp 1148a8: 5b pop %ebx 1148a9: 5e pop %esi 1148aa: 5f pop %edi 1148ab: c9 leave 1148ac: c3 ret 1148ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 1148b0: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) /* * If the semaphore is not available and the caller is willing to * block, then we now block the caller with optional timeout. */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 1148b7: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 1148ba: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 1148bd: ff 75 e4 pushl -0x1c(%ebp) 1148c0: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1148c1: c7 45 10 dc 13 11 00 movl $0x1113dc,0x10(%ebp) 1148c8: 89 75 0c mov %esi,0xc(%ebp) 1148cb: 89 45 08 mov %eax,0x8(%ebp) } 1148ce: 83 c4 1c add $0x1c,%esp 1148d1: 5b pop %ebx 1148d2: 5e pop %esi 1148d3: 5f pop %edi 1148d4: c9 leave */ _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 1148d5: e9 f2 c7 ff ff jmp 1110cc <_Thread_queue_Enqueue_with_handler> 1148da: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; _ISR_Disable( level ); if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 1148dc: 49 dec %ecx 1148dd: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 1148e0: ff 75 e4 pushl -0x1c(%ebp) 1148e3: 9d popf _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); } 1148e4: 83 c4 1c add $0x1c,%esp 1148e7: 5b pop %ebx 1148e8: 5e pop %esi 1148e9: 5f pop %edi 1148ea: c9 leave 1148eb: c3 ret 0010c2e4 <_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 ) { 10c2e4: 55 push %ebp 10c2e5: 89 e5 mov %esp,%ebp 10c2e7: 53 push %ebx 10c2e8: 83 ec 10 sub $0x10,%esp 10c2eb: 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)) ) { 10c2ee: 53 push %ebx 10c2ef: e8 b4 15 00 00 call 10d8a8 <_Thread_queue_Dequeue> 10c2f4: 83 c4 10 add $0x10,%esp 10c2f7: 85 c0 test %eax,%eax 10c2f9: 74 09 je 10c304 <_CORE_semaphore_Surrender+0x20> 10c2fb: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10c2fd: 8b 5d fc mov -0x4(%ebp),%ebx 10c300: c9 leave 10c301: c3 ret 10c302: 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 ); 10c304: 9c pushf 10c305: fa cli 10c306: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10c307: 8b 43 48 mov 0x48(%ebx),%eax 10c30a: 3b 43 40 cmp 0x40(%ebx),%eax 10c30d: 72 0d jb 10c31c <_CORE_semaphore_Surrender+0x38> <== NEVER TAKEN 10c30f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10c314: 52 push %edx 10c315: 9d popf } return status; } 10c316: 8b 5d fc mov -0x4(%ebp),%ebx 10c319: c9 leave 10c31a: c3 ret 10c31b: 90 nop <== NOT EXECUTED #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10c31c: 40 inc %eax 10c31d: 89 43 48 mov %eax,0x48(%ebx) 10c320: 31 c0 xor %eax,%eax 10c322: eb f0 jmp 10c314 <_CORE_semaphore_Surrender+0x30> <== ALWAYS TAKEN 0010cc84 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 10cc84: 55 push %ebp 10cc85: 89 e5 mov %esp,%ebp 10cc87: 53 push %ebx 10cc88: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; _ISR_Disable( level ); 10cc8b: 9c pushf 10cc8c: fa cli 10cc8d: 59 pop %ecx /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cc8e: 8b 50 04 mov 0x4(%eax),%edx 10cc91: 85 d2 test %edx,%edx 10cc93: 75 0b jne 10cca0 <_CORE_spinlock_Release+0x1c> _ISR_Enable( level ); 10cc95: 51 push %ecx 10cc96: 9d popf 10cc97: b8 06 00 00 00 mov $0x6,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10cc9c: 5b pop %ebx 10cc9d: c9 leave 10cc9e: c3 ret 10cc9f: 90 nop <== NOT EXECUTED } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 10cca0: 8b 58 0c mov 0xc(%eax),%ebx 10cca3: 8b 15 58 87 12 00 mov 0x128758,%edx 10cca9: 3b 5a 08 cmp 0x8(%edx),%ebx 10ccac: 74 0a je 10ccb8 <_CORE_spinlock_Release+0x34> _ISR_Enable( level ); 10ccae: 51 push %ecx 10ccaf: 9d popf 10ccb0: b8 02 00 00 00 mov $0x2,%eax the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; the_spinlock->holder = 0; _ISR_Enable( level ); return CORE_SPINLOCK_SUCCESSFUL; } 10ccb5: 5b pop %ebx 10ccb6: c9 leave 10ccb7: c3 ret } /* * Let it be unlocked. */ the_spinlock->users -= 1; 10ccb8: 8b 50 08 mov 0x8(%eax),%edx 10ccbb: 4a dec %edx 10ccbc: 89 50 08 mov %edx,0x8(%eax) the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 10ccbf: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_spinlock->holder = 0; 10ccc6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _ISR_Enable( level ); 10cccd: 51 push %ecx 10ccce: 9d popf 10cccf: 31 c0 xor %eax,%eax return CORE_SPINLOCK_SUCCESSFUL; 10ccd1: eb c9 jmp 10cc9c <_CORE_spinlock_Release+0x18> <== ALWAYS TAKEN 0010ccd4 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10ccd4: 55 push %ebp 10ccd5: 89 e5 mov %esp,%ebp 10ccd7: 56 push %esi 10ccd8: 53 push %ebx 10ccd9: 8b 5d 08 mov 0x8(%ebp),%ebx 10ccdc: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10ccdf: 9c pushf 10cce0: fa cli 10cce1: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10cce2: 8b 53 04 mov 0x4(%ebx),%edx 10cce5: 4a dec %edx 10cce6: 74 60 je 10cd48 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10cce8: 8b 53 08 mov 0x8(%ebx),%edx 10cceb: 42 inc %edx 10ccec: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10ccef: 8b 53 04 mov 0x4(%ebx),%edx 10ccf2: 85 d2 test %edx,%edx 10ccf4: 74 22 je 10cd18 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10ccf6: 84 c9 test %cl,%cl 10ccf8: 74 39 je 10cd33 <_CORE_spinlock_Wait+0x5f> 10ccfa: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10ccfc: 50 push %eax 10ccfd: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10ccfe: e8 ed 11 00 00 call 10def0 <_Thread_Enable_dispatch> 10cd03: a1 98 86 12 00 mov 0x128698,%eax 10cd08: 40 inc %eax 10cd09: a3 98 86 12 00 mov %eax,0x128698 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10cd0e: 9c pushf 10cd0f: fa cli 10cd10: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10cd11: 8b 53 04 mov 0x4(%ebx),%edx 10cd14: 85 d2 test %edx,%edx 10cd16: 75 e4 jne 10ccfc <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10cd18: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10cd1f: 8b 15 58 87 12 00 mov 0x128758,%edx 10cd25: 8b 52 08 mov 0x8(%edx),%edx 10cd28: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10cd2b: 50 push %eax 10cd2c: 9d popf 10cd2d: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd2f: 5b pop %ebx 10cd30: 5e pop %esi 10cd31: c9 leave 10cd32: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10cd33: 8b 53 08 mov 0x8(%ebx),%edx 10cd36: 4a dec %edx 10cd37: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10cd3a: 50 push %eax 10cd3b: 9d popf 10cd3c: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10cd41: 5b pop %ebx 10cd42: 5e pop %esi 10cd43: c9 leave 10cd44: c3 ret 10cd45: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10cd48: 8b 73 0c mov 0xc(%ebx),%esi 10cd4b: 8b 15 58 87 12 00 mov 0x128758,%edx 10cd51: 3b 72 08 cmp 0x8(%edx),%esi 10cd54: 75 92 jne 10cce8 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10cd56: 50 push %eax 10cd57: 9d popf 10cd58: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10cd5d: eb d0 jmp 10cd2f <_CORE_spinlock_Wait+0x5b> <== ALWAYS TAKEN 0010be9c <_Chain_Get>: */ Chain_Node *_Chain_Get( Chain_Control *the_chain ) { 10be9c: 55 push %ebp 10be9d: 89 e5 mov %esp,%ebp 10be9f: 53 push %ebx 10bea0: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Chain_Node *return_node; return_node = NULL; _ISR_Disable( level ); 10bea3: 9c pushf 10bea4: fa cli 10bea5: 5b pop %ebx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10bea6: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bea8: 8d 4a 04 lea 0x4(%edx),%ecx 10beab: 39 c8 cmp %ecx,%eax 10bead: 74 0d je 10bebc <_Chain_Get+0x20> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 10beaf: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 10beb1: 89 0a mov %ecx,(%edx) new_first->previous = _Chain_Head(the_chain); 10beb3: 89 51 04 mov %edx,0x4(%ecx) if ( !_Chain_Is_empty( the_chain ) ) return_node = _Chain_Get_first_unprotected( the_chain ); _ISR_Enable( level ); 10beb6: 53 push %ebx 10beb7: 9d popf return return_node; } 10beb8: 5b pop %ebx 10beb9: c9 leave 10beba: c3 ret 10bebb: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10bebc: 31 c0 xor %eax,%eax 10bebe: eb f6 jmp 10beb6 <_Chain_Get+0x1a> <== ALWAYS TAKEN 001109a8 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 1109a8: 55 push %ebp 1109a9: 89 e5 mov %esp,%ebp 1109ab: 57 push %edi 1109ac: 56 push %esi 1109ad: 53 push %ebx 1109ae: 8b 7d 08 mov 0x8(%ebp),%edi 1109b1: 8b 4d 10 mov 0x10(%ebp),%ecx 1109b4: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 1109b7: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 1109b9: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 1109c0: 85 c9 test %ecx,%ecx 1109c2: 74 17 je 1109db <_Chain_Initialize+0x33> <== ALWAYS TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 1109c4: 8b 45 0c mov 0xc(%ebp),%eax 1109c7: eb 05 jmp 1109ce <_Chain_Initialize+0x26> <== ALWAYS TAKEN 1109c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED while ( count-- ) { 1109cc: 89 d8 mov %ebx,%eax current->next = next; 1109ce: 89 02 mov %eax,(%edx) next->previous = current; 1109d0: 89 50 04 mov %edx,0x4(%eax) 1109d3: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 1109d6: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 1109d8: 49 dec %ecx 1109d9: 75 f1 jne 1109cc <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 1109db: 8d 47 04 lea 0x4(%edi),%eax 1109de: 89 02 mov %eax,(%edx) the_chain->last = current; 1109e0: 89 57 08 mov %edx,0x8(%edi) } 1109e3: 5b pop %ebx 1109e4: 5e pop %esi 1109e5: 5f pop %edi 1109e6: c9 leave 1109e7: 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 98 74 12 00 mov 0x127498,%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 f4 00 00 00 mov 0xf4(%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 68 7d 12 00 01 movl $0x1,0x127d68 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 d6 2d 00 00 call 10dd78 <_Thread_Set_state> _ISR_Disable( level ); 10afa2: 9c pushf 10afa3: fa cli 10afa4: 5a pop %edx sync_state = _Event_Sync_state; 10afa5: a1 68 7d 12 00 mov 0x127d68,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10afaa: c7 05 68 7d 12 00 00 movl $0x0,0x127d68 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 af 1f 00 00 jmp 10cf80 <_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 b8 74 12 00 push $0x1274b8 10b041: e8 ba 33 00 00 call 10e400 <_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 f4 00 00 00 mov 0xf4(%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 74 74 12 00 mov 0x127474,%edi 10b0d2: 85 ff test %edi,%edi 10b0d4: 74 0c je 10b0e2 <_Event_Surrender+0x3e> 10b0d6: 3b 1d 98 74 12 00 cmp 0x127498,%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 e5 1f 00 00 call 10d10c <_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 d5 33 00 00 call 10e538 <_Watchdog_Remove> 10b163: 58 pop %eax 10b164: 5a pop %edx 10b165: 68 f8 ff 03 10 push $0x1003fff8 10b16a: 53 push %ebx 10b16b: e8 9c 1f 00 00 call 10d10c <_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 68 7d 12 00 mov 0x127d68,%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 68 7d 12 00 mov 0x127d68,%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 68 7d 12 00 03 movl $0x3,0x127d68 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 fe 22 00 00 call 10d4d8 <_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 98 74 12 00 cmp 0x127498,%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 ff 1e 00 00 call 10d10c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b20d: a1 d8 73 12 00 mov 0x1273d8,%eax 10b212: 48 dec %eax 10b213: a3 d8 73 12 00 mov %eax,0x1273d8 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 68 7d 12 00 mov 0x127d68,%ecx 10b226: 49 dec %ecx 10b227: 75 cd jne 10b1f6 <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b229: c7 05 68 7d 12 00 02 movl $0x2,0x127d68 10b230: 00 00 00 10b233: eb c1 jmp 10b1f6 <_Event_Timeout+0x2e> <== ALWAYS TAKEN 00110c4c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 110c4c: 55 push %ebp 110c4d: 89 e5 mov %esp,%ebp 110c4f: 57 push %edi 110c50: 56 push %esi 110c51: 53 push %ebx 110c52: 83 ec 2c sub $0x2c,%esp 110c55: 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; 110c58: 8b 45 08 mov 0x8(%ebp),%eax 110c5b: 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; 110c5e: 8b 50 10 mov 0x10(%eax),%edx 110c61: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 110c64: 89 f8 mov %edi,%eax 110c66: 83 c0 04 add $0x4,%eax 110c69: 89 45 e0 mov %eax,-0x20(%ebp) 110c6c: 0f 82 5a 01 00 00 jb 110dcc <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 110c72: 8b 75 14 mov 0x14(%ebp),%esi 110c75: 85 f6 test %esi,%esi 110c77: 0f 85 48 01 00 00 jne 110dc5 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110c7d: 39 4d 08 cmp %ecx,0x8(%ebp) 110c80: 0f 84 50 01 00 00 je 110dd6 <_Heap_Allocate_aligned_with_boundary+0x18a> 110c86: 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; 110c8d: 8b 55 d4 mov -0x2c(%ebp),%edx 110c90: 83 c2 07 add $0x7,%edx 110c93: 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; 110c96: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 110c9d: 29 7d d8 sub %edi,-0x28(%ebp) 110ca0: eb 19 jmp 110cbb <_Heap_Allocate_aligned_with_boundary+0x6f> <== ALWAYS TAKEN 110ca2: 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; 110ca4: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 110ca7: 85 db test %ebx,%ebx 110ca9: 0f 85 e9 00 00 00 jne 110d98 <_Heap_Allocate_aligned_with_boundary+0x14c> <== NEVER TAKEN break; } block = block->next; 110caf: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110cb2: 39 4d 08 cmp %ecx,0x8(%ebp) 110cb5: 0f 84 25 01 00 00 je 110de0 <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 110cbb: 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 ) { 110cbe: 8b 59 04 mov 0x4(%ecx),%ebx 110cc1: 39 5d e0 cmp %ebx,-0x20(%ebp) 110cc4: 73 e9 jae 110caf <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 110cc6: 8b 55 10 mov 0x10(%ebp),%edx 110cc9: 85 d2 test %edx,%edx 110ccb: 74 d7 je 110ca4 <_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; 110ccd: 8b 45 08 mov 0x8(%ebp),%eax 110cd0: 8b 40 14 mov 0x14(%eax),%eax 110cd3: 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; 110cd6: 83 e3 fe and $0xfffffffe,%ebx 110cd9: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 110cdc: 8d 51 08 lea 0x8(%ecx),%edx 110cdf: 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; 110ce2: 8b 75 c8 mov -0x38(%ebp),%esi 110ce5: 29 c6 sub %eax,%esi 110ce7: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 110ce9: 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); 110cec: 89 d8 mov %ebx,%eax 110cee: 31 d2 xor %edx,%edx 110cf0: f7 75 10 divl 0x10(%ebp) 110cf3: 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 ) { 110cf5: 39 de cmp %ebx,%esi 110cf7: 73 0b jae 110d04 <_Heap_Allocate_aligned_with_boundary+0xb8> 110cf9: 89 f0 mov %esi,%eax 110cfb: 31 d2 xor %edx,%edx 110cfd: f7 75 10 divl 0x10(%ebp) 110d00: 89 f3 mov %esi,%ebx 110d02: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 110d04: 8b 45 14 mov 0x14(%ebp),%eax 110d07: 85 c0 test %eax,%eax 110d09: 74 59 je 110d64 <_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; 110d0b: 8d 34 3b lea (%ebx,%edi,1),%esi 110d0e: 89 f0 mov %esi,%eax 110d10: 31 d2 xor %edx,%edx 110d12: f7 75 14 divl 0x14(%ebp) 110d15: 89 f0 mov %esi,%eax 110d17: 29 d0 sub %edx,%eax 110d19: 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 ) { 110d1b: 39 c3 cmp %eax,%ebx 110d1d: 73 45 jae 110d64 <_Heap_Allocate_aligned_with_boundary+0x118> 110d1f: 39 c6 cmp %eax,%esi 110d21: 76 41 jbe 110d64 <_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; 110d23: 8b 45 cc mov -0x34(%ebp),%eax 110d26: 01 f8 add %edi,%eax 110d28: 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 ) { 110d2b: 39 d0 cmp %edx,%eax 110d2d: 77 80 ja 110caf <_Heap_Allocate_aligned_with_boundary+0x63> 110d2f: 89 ce mov %ecx,%esi 110d31: eb 0e jmp 110d41 <_Heap_Allocate_aligned_with_boundary+0xf5> <== ALWAYS TAKEN 110d33: 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 ) { 110d34: 39 c1 cmp %eax,%ecx 110d36: 76 2a jbe 110d62 <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 110d38: 39 55 dc cmp %edx,-0x24(%ebp) 110d3b: 0f 87 a3 00 00 00 ja 110de4 <_Heap_Allocate_aligned_with_boundary+0x198> <== ALWAYS TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 110d41: 89 d3 mov %edx,%ebx 110d43: 29 fb sub %edi,%ebx 110d45: 89 d8 mov %ebx,%eax 110d47: 31 d2 xor %edx,%edx 110d49: f7 75 10 divl 0x10(%ebp) 110d4c: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 110d4e: 8d 0c 3b lea (%ebx,%edi,1),%ecx 110d51: 89 c8 mov %ecx,%eax 110d53: 31 d2 xor %edx,%edx 110d55: f7 75 14 divl 0x14(%ebp) 110d58: 89 c8 mov %ecx,%eax 110d5a: 29 d0 sub %edx,%eax 110d5c: 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 ) { 110d5e: 39 c3 cmp %eax,%ebx 110d60: 72 d2 jb 110d34 <_Heap_Allocate_aligned_with_boundary+0xe8> 110d62: 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 ) { 110d64: 39 5d cc cmp %ebx,-0x34(%ebp) 110d67: 0f 87 42 ff ff ff ja 110caf <_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; 110d6d: be f8 ff ff ff mov $0xfffffff8,%esi 110d72: 29 ce sub %ecx,%esi 110d74: 01 de add %ebx,%esi 110d76: 89 d8 mov %ebx,%eax 110d78: 31 d2 xor %edx,%edx 110d7a: f7 75 d4 divl -0x2c(%ebp) 110d7d: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 110d7f: 39 75 d0 cmp %esi,-0x30(%ebp) 110d82: 0f 86 1f ff ff ff jbe 110ca7 <_Heap_Allocate_aligned_with_boundary+0x5b> 110d88: 85 f6 test %esi,%esi 110d8a: 0f 85 1f ff ff ff jne 110caf <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 110d90: 85 db test %ebx,%ebx 110d92: 0f 84 17 ff ff ff je 110caf <_Heap_Allocate_aligned_with_boundary+0x63> <== ALWAYS TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 110d98: 8b 55 e4 mov -0x1c(%ebp),%edx 110d9b: 8b 45 08 mov 0x8(%ebp),%eax 110d9e: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 110da1: 57 push %edi 110da2: 53 push %ebx 110da3: 51 push %ecx 110da4: 50 push %eax 110da5: e8 5e b8 ff ff call 10c608 <_Heap_Block_allocate> <== ALWAYS TAKEN 110daa: 89 d8 mov %ebx,%eax 110dac: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 110daf: 8b 4d e4 mov -0x1c(%ebp),%ecx 110db2: 8b 55 08 mov 0x8(%ebp),%edx 110db5: 39 4a 44 cmp %ecx,0x44(%edx) 110db8: 73 14 jae 110dce <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110dba: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 110dbd: 8d 65 f4 lea -0xc(%ebp),%esp 110dc0: 5b pop %ebx 110dc1: 5e pop %esi 110dc2: 5f pop %edi 110dc3: c9 leave 110dc4: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 110dc5: 3b 7d 14 cmp 0x14(%ebp),%edi 110dc8: 76 21 jbe 110deb <_Heap_Allocate_aligned_with_boundary+0x19f> 110dca: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 110dcc: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 110dce: 8d 65 f4 lea -0xc(%ebp),%esp 110dd1: 5b pop %ebx 110dd2: 5e pop %esi 110dd3: 5f pop %edi 110dd4: c9 leave 110dd5: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 110dd6: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 110ddd: 8d 76 00 lea 0x0(%esi),%esi 110de0: 31 c0 xor %eax,%eax 110de2: eb cb jmp 110daf <_Heap_Allocate_aligned_with_boundary+0x163> <== ALWAYS TAKEN 110de4: 89 f1 mov %esi,%ecx <== NOT EXECUTED 110de6: e9 c4 fe ff ff jmp 110caf <_Heap_Allocate_aligned_with_boundary+0x63> <== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 110deb: 8b 5d 10 mov 0x10(%ebp),%ebx 110dee: 85 db test %ebx,%ebx 110df0: 0f 85 87 fe ff ff jne 110c7d <_Heap_Allocate_aligned_with_boundary+0x31> 110df6: 89 55 10 mov %edx,0x10(%ebp) 110df9: e9 7f fe ff ff jmp 110c7d <_Heap_Allocate_aligned_with_boundary+0x31> <== ALWAYS TAKEN 0010c608 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10c608: 55 push %ebp 10c609: 89 e5 mov %esp,%ebp 10c60b: 57 push %edi 10c60c: 56 push %esi 10c60d: 53 push %ebx 10c60e: 83 ec 10 sub $0x10,%esp 10c611: 8b 75 08 mov 0x8(%ebp),%esi 10c614: 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; 10c617: 89 5d ec mov %ebx,-0x14(%ebp) 10c61a: 8b 7d 10 mov 0x10(%ebp),%edi 10c61d: 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; 10c620: 89 f8 mov %edi,%eax 10c622: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10c624: 8b 53 04 mov 0x4(%ebx),%edx 10c627: 83 e2 fe and $0xfffffffe,%edx 10c62a: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10c62f: 0f 85 8b 00 00 00 jne 10c6c0 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10c635: 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; 10c638: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10c63b: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10c63e: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10c641: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10c644: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10c647: 8b 53 04 mov 0x4(%ebx),%edx 10c64a: 83 e2 fe and $0xfffffffe,%edx 10c64d: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10c650: 8b 56 10 mov 0x10(%esi),%edx 10c653: 89 55 e4 mov %edx,-0x1c(%ebp) 10c656: 39 d0 cmp %edx,%eax 10c658: 72 72 jb 10c6cc <_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; 10c65a: 8b 43 04 mov 0x4(%ebx),%eax 10c65d: 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 ) 10c660: 8b 45 10 mov 0x10(%ebp),%eax 10c663: 31 d2 xor %edx,%edx 10c665: f7 75 e4 divl -0x1c(%ebp) 10c668: 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; 10c66a: 89 f8 mov %edi,%eax 10c66c: 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; 10c66e: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10c671: f6 43 04 01 testb $0x1,0x4(%ebx) 10c675: 75 69 jne 10c6e0 <_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); 10c677: 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; 10c679: 8b 53 04 mov 0x4(%ebx),%edx 10c67c: 83 e2 fe and $0xfffffffe,%edx 10c67f: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10c681: 89 c2 mov %eax,%edx 10c683: 83 ca 01 or $0x1,%edx 10c686: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10c689: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10c68b: 8b 45 f0 mov -0x10(%ebp),%eax 10c68e: 83 e0 fe and $0xfffffffe,%eax 10c691: 03 45 ec add -0x14(%ebp),%eax 10c694: 29 f8 sub %edi,%eax 10c696: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10c699: ff 75 14 pushl 0x14(%ebp) 10c69c: 51 push %ecx 10c69d: 57 push %edi 10c69e: 56 push %esi 10c69f: e8 80 fe ff ff call 10c524 <_Heap_Block_split> <== ALWAYS TAKEN 10c6a4: 89 fb mov %edi,%ebx 10c6a6: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10c6a9: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10c6ac: 39 46 34 cmp %eax,0x34(%esi) 10c6af: 76 03 jbe 10c6b4 <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10c6b1: 89 46 34 mov %eax,0x34(%esi) } return block; } 10c6b4: 89 d8 mov %ebx,%eax 10c6b6: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b9: 5b pop %ebx 10c6ba: 5e pop %esi 10c6bb: 5f pop %edi 10c6bc: c9 leave 10c6bd: c3 ret 10c6be: 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 ); 10c6c0: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10c6c2: 8b 56 10 mov 0x10(%esi),%edx 10c6c5: 89 55 e4 mov %edx,-0x1c(%ebp) 10c6c8: 39 d0 cmp %edx,%eax 10c6ca: 73 8e jae 10c65a <_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 ); 10c6cc: 03 45 14 add 0x14(%ebp),%eax 10c6cf: 50 push %eax 10c6d0: 51 push %ecx 10c6d1: 53 push %ebx 10c6d2: 56 push %esi 10c6d3: e8 4c fe ff ff call 10c524 <_Heap_Block_split> <== ALWAYS TAKEN 10c6d8: 83 c4 10 add $0x10,%esp 10c6db: eb cc jmp 10c6a9 <_Heap_Block_allocate+0xa1> <== ALWAYS TAKEN 10c6dd: 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; 10c6e0: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10c6e3: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10c6e6: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10c6e9: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10c6ec: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10c6ef: ff 46 38 incl 0x38(%esi) 10c6f2: 89 d9 mov %ebx,%ecx 10c6f4: eb 8b jmp 10c681 <_Heap_Block_allocate+0x79> <== ALWAYS TAKEN 0010c524 <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10c524: 55 push %ebp 10c525: 89 e5 mov %esp,%ebp 10c527: 57 push %edi 10c528: 56 push %esi 10c529: 53 push %ebx 10c52a: 83 ec 14 sub $0x14,%esp 10c52d: 8b 4d 08 mov 0x8(%ebp),%ecx 10c530: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10c533: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10c536: 8b 41 14 mov 0x14(%ecx),%eax 10c539: 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; 10c53c: 8b 43 04 mov 0x4(%ebx),%eax 10c53f: 89 45 e4 mov %eax,-0x1c(%ebp) 10c542: 89 c6 mov %eax,%esi 10c544: 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; 10c547: 8b 55 e8 mov -0x18(%ebp),%edx 10c54a: 83 ea 08 sub $0x8,%edx 10c54d: 8b 45 14 mov 0x14(%ebp),%eax 10c550: 39 d0 cmp %edx,%eax 10c552: 73 02 jae 10c556 <_Heap_Block_split+0x32> 10c554: 89 d0 mov %edx,%eax 10c556: 83 c0 08 add $0x8,%eax 10c559: 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; 10c55c: 31 d2 xor %edx,%edx 10c55e: f7 f7 div %edi if ( remainder != 0 ) { 10c560: 85 d2 test %edx,%edx 10c562: 75 70 jne 10c5d4 <_Heap_Block_split+0xb0> 10c564: 8b 7d f0 mov -0x10(%ebp),%edi 10c567: 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); 10c56a: 8d 04 33 lea (%ebx,%esi,1),%eax 10c56d: 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 ) { 10c570: 8d 56 04 lea 0x4(%esi),%edx 10c573: 2b 55 f0 sub -0x10(%ebp),%edx 10c576: 8b 7d e8 mov -0x18(%ebp),%edi 10c579: 83 c7 04 add $0x4,%edi 10c57c: 39 fa cmp %edi,%edx 10c57e: 72 60 jb 10c5e0 <_Heap_Block_split+0xbc> 10c580: 8b 55 ec mov -0x14(%ebp),%edx 10c583: 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; 10c585: 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; 10c588: 8b 7d e4 mov -0x1c(%ebp),%edi 10c58b: 83 e7 01 and $0x1,%edi 10c58e: 0b 7d ec or -0x14(%ebp),%edi 10c591: 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; 10c594: 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; 10c597: 8b 58 04 mov 0x4(%eax),%ebx 10c59a: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10c59d: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10c5a2: 75 4c jne 10c5f0 <_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; 10c5a4: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10c5a7: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10c5aa: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10c5ad: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10c5b0: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10c5b3: 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; 10c5b6: 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); 10c5b8: 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; 10c5bb: 89 f1 mov %esi,%ecx 10c5bd: 83 c9 01 or $0x1,%ecx 10c5c0: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10c5c3: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10c5c5: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10c5c9: 83 c4 14 add $0x14,%esp 10c5cc: 5b pop %ebx 10c5cd: 5e pop %esi 10c5ce: 5f pop %edi 10c5cf: c9 leave 10c5d0: c3 ret 10c5d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10c5d4: 03 7d f0 add -0x10(%ebp),%edi 10c5d7: 29 d7 sub %edx,%edi 10c5d9: 89 7d ec mov %edi,-0x14(%ebp) 10c5dc: eb 8c jmp 10c56a <_Heap_Block_split+0x46> <== ALWAYS TAKEN 10c5de: 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; 10c5e0: 8b 45 e0 mov -0x20(%ebp),%eax 10c5e3: 83 48 04 01 orl $0x1,0x4(%eax) } } 10c5e7: 83 c4 14 add $0x14,%esp 10c5ea: 5b pop %ebx 10c5eb: 5e pop %esi 10c5ec: 5f pop %edi 10c5ed: c9 leave 10c5ee: c3 ret 10c5ef: 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; 10c5f0: 8b 7d 10 mov 0x10(%ebp),%edi 10c5f3: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10c5f6: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10c5f9: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10c5fc: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10c5ff: 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; 10c602: ff 41 38 incl 0x38(%ecx) 10c605: eb b4 jmp 10c5bb <_Heap_Block_split+0x97> <== ALWAYS TAKEN 0011454c <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 11454c: 55 push %ebp 11454d: 89 e5 mov %esp,%ebp 11454f: 56 push %esi 114550: 53 push %ebx 114551: 8b 4d 08 mov 0x8(%ebp),%ecx 114554: 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; 114557: 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; 11455a: 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; 11455d: 3b 41 18 cmp 0x18(%ecx),%eax 114560: 73 3a jae 11459c <_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 ) { 114562: 39 d0 cmp %edx,%eax 114564: 74 0e je 114574 <_Heap_Extend+0x28> 114566: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 11456b: 8d 65 f8 lea -0x8(%ebp),%esp 11456e: 5b pop %ebx 11456f: 5e pop %esi 114570: c9 leave 114571: c3 ret 114572: 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; 114574: 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; 114577: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 11457a: 29 d8 sub %ebx,%eax 11457c: 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); 11457f: 89 f0 mov %esi,%eax 114581: 31 d2 xor %edx,%edx 114583: f7 71 10 divl 0x10(%ecx) 114586: 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; 114588: 8b 45 14 mov 0x14(%ebp),%eax 11458b: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 11458d: 39 71 14 cmp %esi,0x14(%ecx) 114590: 76 1a jbe 1145ac <_Heap_Extend+0x60> <== NEVER TAKEN 114592: 31 c0 xor %eax,%eax <== NOT EXECUTED _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 114594: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 114597: 5b pop %ebx <== NOT EXECUTED 114598: 5e pop %esi <== NOT EXECUTED 114599: c9 leave <== NOT EXECUTED 11459a: c3 ret <== NOT EXECUTED 11459b: 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 ) { 11459c: 39 d0 cmp %edx,%eax 11459e: 73 c2 jae 114562 <_Heap_Extend+0x16> 1145a0: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 1145a5: 8d 65 f8 lea -0x8(%ebp),%esp 1145a8: 5b pop %ebx 1145a9: 5e pop %esi 1145aa: c9 leave 1145ab: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 1145ac: 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; 1145af: 8b 43 04 mov 0x4(%ebx),%eax 1145b2: 83 e0 01 and $0x1,%eax 1145b5: 09 f0 or %esi,%eax 1145b7: 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 = 1145ba: 8b 41 20 mov 0x20(%ecx),%eax 1145bd: 29 d0 sub %edx,%eax 1145bf: 83 c8 01 or $0x1,%eax 1145c2: 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; 1145c5: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 1145c8: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 1145cb: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 1145ce: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 1145d1: 83 ec 08 sub $0x8,%esp 1145d4: 83 c3 08 add $0x8,%ebx 1145d7: 53 push %ebx 1145d8: 51 push %ecx 1145d9: e8 f6 ad ff ff call 10f3d4 <_Heap_Free> <== ALWAYS TAKEN 1145de: 31 c0 xor %eax,%eax 1145e0: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 1145e3: 8d 65 f8 lea -0x8(%ebp),%esp 1145e6: 5b pop %ebx 1145e7: 5e pop %esi 1145e8: c9 leave 1145e9: c3 ret 00110e00 <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 110e00: 55 push %ebp 110e01: 89 e5 mov %esp,%ebp 110e03: 57 push %edi 110e04: 56 push %esi 110e05: 53 push %ebx 110e06: 83 ec 18 sub $0x18,%esp 110e09: 8b 5d 08 mov 0x8(%ebp),%ebx 110e0c: 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 ) 110e0f: 8d 48 f8 lea -0x8(%eax),%ecx 110e12: 31 d2 xor %edx,%edx 110e14: f7 73 10 divl 0x10(%ebx) 110e17: 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; 110e19: 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 110e1c: 39 c1 cmp %eax,%ecx 110e1e: 72 07 jb 110e27 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 110e20: 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 110e23: 39 f1 cmp %esi,%ecx 110e25: 76 0d jbe 110e34 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 110e27: 31 c0 xor %eax,%eax } 110e29: 83 c4 18 add $0x18,%esp 110e2c: 5b pop %ebx 110e2d: 5e pop %esi 110e2e: 5f pop %edi 110e2f: c9 leave 110e30: c3 ret 110e31: 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; 110e34: 8b 51 04 mov 0x4(%ecx),%edx 110e37: 89 55 f0 mov %edx,-0x10(%ebp) 110e3a: 83 e2 fe and $0xfffffffe,%edx 110e3d: 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); 110e40: 01 ca add %ecx,%edx 110e42: 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 110e45: 39 d0 cmp %edx,%eax 110e47: 77 de ja 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN 110e49: 39 d6 cmp %edx,%esi 110e4b: 72 da jb 110e27 <_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; 110e4d: 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 ) ) { 110e50: f7 c7 01 00 00 00 test $0x1,%edi 110e56: 74 cf je 110e27 <_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; 110e58: 83 e7 fe and $0xfffffffe,%edi 110e5b: 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 110e5e: 39 d6 cmp %edx,%esi 110e60: 0f 84 e2 00 00 00 je 110f48 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 110e66: 8b 55 dc mov -0x24(%ebp),%edx 110e69: 8b 7d e8 mov -0x18(%ebp),%edi 110e6c: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 110e70: 89 7d e0 mov %edi,-0x20(%ebp) 110e73: 8a 55 e0 mov -0x20(%ebp),%dl 110e76: 83 e2 01 and $0x1,%edx 110e79: 88 55 e7 mov %dl,-0x19(%ebp) 110e7c: 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 ) ) { 110e80: f6 45 f0 01 testb $0x1,-0x10(%ebp) 110e84: 75 46 jne 110ecc <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 110e86: 8b 39 mov (%ecx),%edi 110e88: 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); 110e8b: 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 110e8d: 39 c8 cmp %ecx,%eax 110e8f: 77 96 ja 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN 110e91: 39 ce cmp %ecx,%esi 110e93: 72 92 jb 110e27 <_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) ) { 110e95: f6 41 04 01 testb $0x1,0x4(%ecx) 110e99: 74 8c je 110e27 <_Heap_Free+0x27> <== ALWAYS TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 110e9b: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110e9f: 0f 84 af 00 00 00 je 110f54 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 110ea5: 8b 45 ec mov -0x14(%ebp),%eax 110ea8: 03 45 e8 add -0x18(%ebp),%eax 110eab: 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; 110ead: 8b 55 dc mov -0x24(%ebp),%edx 110eb0: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 110eb3: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 110eb6: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 110eb9: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 110ebc: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110ebf: 89 c2 mov %eax,%edx 110ec1: 83 ca 01 or $0x1,%edx 110ec4: 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; 110ec7: 89 04 01 mov %eax,(%ecx,%eax,1) 110eca: eb 2c jmp 110ef8 <_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 */ 110ecc: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110ed0: 74 3e je 110f10 <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 110ed2: 8b 7d e8 mov -0x18(%ebp),%edi 110ed5: 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; 110ed8: 8b 75 dc mov -0x24(%ebp),%esi 110edb: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 110ede: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 110ee1: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 110ee4: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 110ee7: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 110eea: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110eed: 89 f8 mov %edi,%eax 110eef: 83 c8 01 or $0x1,%eax 110ef2: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 110ef5: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 110ef8: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 110efb: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 110efe: 8b 55 ec mov -0x14(%ebp),%edx 110f01: 01 53 30 add %edx,0x30(%ebx) 110f04: b0 01 mov $0x1,%al return( true ); } 110f06: 83 c4 18 add $0x18,%esp 110f09: 5b pop %ebx 110f0a: 5e pop %esi 110f0b: 5f pop %edi 110f0c: c9 leave 110f0d: c3 ret 110f0e: 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; 110f10: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 110f13: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 110f16: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 110f19: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 110f1c: 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; 110f1f: 8b 45 ec mov -0x14(%ebp),%eax 110f22: 83 c8 01 or $0x1,%eax 110f25: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110f28: 8b 7d dc mov -0x24(%ebp),%edi 110f2b: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 110f2f: 8b 45 ec mov -0x14(%ebp),%eax 110f32: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 110f34: 8b 43 38 mov 0x38(%ebx),%eax 110f37: 40 inc %eax 110f38: 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; 110f3b: 3b 43 3c cmp 0x3c(%ebx),%eax 110f3e: 76 b8 jbe 110ef8 <_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; 110f40: 89 43 3c mov %eax,0x3c(%ebx) 110f43: eb b3 jmp 110ef8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 110f45: 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 110f48: c6 45 e7 00 movb $0x0,-0x19(%ebp) 110f4c: e9 2f ff ff ff jmp 110e80 <_Heap_Free+0x80> <== ALWAYS TAKEN 110f51: 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; 110f54: 8b 45 ec mov -0x14(%ebp),%eax 110f57: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 110f5a: 89 c6 mov %eax,%esi 110f5c: 83 ce 01 or $0x1,%esi 110f5f: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 110f62: 8b 55 dc mov -0x24(%ebp),%edx 110f65: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 110f69: 89 02 mov %eax,(%edx) 110f6b: eb 8b jmp 110ef8 <_Heap_Free+0xf8> <== ALWAYS TAKEN 0012ed18 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 12ed18: 55 push %ebp 12ed19: 89 e5 mov %esp,%ebp 12ed1b: 57 push %edi 12ed1c: 56 push %esi 12ed1d: 53 push %ebx 12ed1e: 8b 7d 08 mov 0x8(%ebp),%edi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 12ed21: 8b 45 0c mov 0xc(%ebp),%eax 12ed24: c7 00 00 00 00 00 movl $0x0,(%eax) info->largest = 0; 12ed2a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) info->total = 0; 12ed31: 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; 12ed38: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 12ed3b: 39 d7 cmp %edx,%edi 12ed3d: 74 2c je 12ed6b <_Heap_Get_free_information+0x53> <== ALWAYS TAKEN 12ed3f: 31 f6 xor %esi,%esi 12ed41: b9 01 00 00 00 mov $0x1,%ecx 12ed46: 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; 12ed48: 8b 42 04 mov 0x4(%edx),%eax 12ed4b: 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; 12ed4e: 01 c3 add %eax,%ebx 12ed50: 39 c6 cmp %eax,%esi 12ed52: 73 02 jae 12ed56 <_Heap_Get_free_information+0x3e> 12ed54: 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) 12ed56: 8b 52 08 mov 0x8(%edx),%edx 12ed59: 89 c8 mov %ecx,%eax 12ed5b: 41 inc %ecx info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 12ed5c: 39 d7 cmp %edx,%edi 12ed5e: 75 e8 jne 12ed48 <_Heap_Get_free_information+0x30> 12ed60: 8b 55 0c mov 0xc(%ebp),%edx 12ed63: 89 02 mov %eax,(%edx) 12ed65: 89 5a 08 mov %ebx,0x8(%edx) 12ed68: 89 72 04 mov %esi,0x4(%edx) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 12ed6b: 5b pop %ebx 12ed6c: 5e pop %esi 12ed6d: 5f pop %edi 12ed6e: c9 leave 12ed6f: c3 ret 0013db48 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 13db48: 55 push %ebp 13db49: 89 e5 mov %esp,%ebp 13db4b: 57 push %edi 13db4c: 56 push %esi 13db4d: 53 push %ebx 13db4e: 83 ec 04 sub $0x4,%esp 13db51: 8b 45 08 mov 0x8(%ebp),%eax 13db54: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 13db57: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 13db5a: 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; 13db5d: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 13db63: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 13db6a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 13db71: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 13db78: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 13db7f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 13db86: 39 fb cmp %edi,%ebx 13db88: 74 45 je 13dbcf <_Heap_Get_information+0x87> <== ALWAYS TAKEN 13db8a: 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; 13db8d: 8d 46 0c lea 0xc(%esi),%eax 13db90: 89 45 f0 mov %eax,-0x10(%ebp) 13db93: eb 16 jmp 13dbab <_Heap_Get_information+0x63> <== ALWAYS TAKEN 13db95: 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) ) 13db98: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 13db9a: ff 00 incl (%eax) info->total += the_size; 13db9c: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 13db9f: 39 50 04 cmp %edx,0x4(%eax) 13dba2: 73 03 jae 13dba7 <_Heap_Get_information+0x5f> info->largest = the_size; 13dba4: 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 ) { 13dba7: 39 df cmp %ebx,%edi 13dba9: 74 15 je 13dbc0 <_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; 13dbab: 89 ca mov %ecx,%edx 13dbad: 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); 13dbb0: 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; 13dbb2: 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) ) 13dbb5: f6 c1 01 test $0x1,%cl 13dbb8: 74 de je 13db98 <_Heap_Get_information+0x50> 13dbba: 8b 45 f0 mov -0x10(%ebp),%eax 13dbbd: eb db jmp 13db9a <_Heap_Get_information+0x52> <== ALWAYS TAKEN 13dbbf: 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 ) { 13dbc0: 8b 46 14 mov 0x14(%esi),%eax 13dbc3: 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; 13dbc6: 89 46 14 mov %eax,0x14(%esi) } 13dbc9: 58 pop %eax 13dbca: 5b pop %ebx 13dbcb: 5e pop %esi 13dbcc: 5f pop %edi 13dbcd: c9 leave 13dbce: 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 ) { 13dbcf: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 13dbd4: eb f0 jmp 13dbc6 <_Heap_Get_information+0x7e> <== NOT EXECUTED 0010c3d4 <_Heap_Initialize>: Heap_Control *heap, void *heap_area_begin_ptr, uintptr_t heap_area_size, uintptr_t page_size ) { 10c3d4: 55 push %ebp 10c3d5: 89 e5 mov %esp,%ebp 10c3d7: 57 push %edi 10c3d8: 56 push %esi 10c3d9: 53 push %ebx 10c3da: 83 ec 10 sub $0x10,%esp 10c3dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c3e0: 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 ) { 10c3e3: 85 c9 test %ecx,%ecx 10c3e5: 0f 85 f5 00 00 00 jne 10c4e0 <_Heap_Initialize+0x10c> 10c3eb: b1 04 mov $0x4,%cl 10c3ed: 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; 10c3f4: 8b 75 0c mov 0xc(%ebp),%esi 10c3f7: 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; 10c3fa: 89 f0 mov %esi,%eax 10c3fc: 31 d2 xor %edx,%edx 10c3fe: f7 f1 div %ecx if ( remainder != 0 ) { 10c400: 85 d2 test %edx,%edx 10c402: 74 05 je 10c409 <_Heap_Initialize+0x35> return value - remainder + alignment; 10c404: 8d 34 31 lea (%ecx,%esi,1),%esi 10c407: 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 ( 10c409: 8b 55 0c mov 0xc(%ebp),%edx 10c40c: 03 55 10 add 0x10(%ebp),%edx 10c40f: 89 55 ec mov %edx,-0x14(%ebp) 10c412: 0f 82 d9 00 00 00 jb 10c4f1 <_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); 10c418: 8d 7e f8 lea -0x8(%esi),%edi 10c41b: 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 ( 10c41e: 39 75 10 cmp %esi,0x10(%ebp) 10c421: 0f 86 ca 00 00 00 jbe 10c4f1 <_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; 10c427: 8b 45 10 mov 0x10(%ebp),%eax 10c42a: 29 f0 sub %esi,%eax 10c42c: 89 c6 mov %eax,%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10c42e: 31 d2 xor %edx,%edx 10c430: f7 f1 div %ecx 10c432: 29 d6 sub %edx,%esi 10c434: 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 ( 10c437: 39 75 f0 cmp %esi,-0x10(%ebp) 10c43a: 0f 87 b1 00 00 00 ja 10c4f1 <_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; 10c440: 89 f0 mov %esi,%eax 10c442: 83 e8 08 sub $0x8,%eax return 0; } /* First block */ first_block = (Heap_Block *) first_block_begin; first_block->prev_size = page_size; 10c445: 89 0f mov %ecx,(%edi) first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED; 10c447: 89 f2 mov %esi,%edx 10c449: 83 ca 01 or $0x1,%edx 10c44c: 89 57 04 mov %edx,0x4(%edi) first_block->next = _Heap_Free_list_tail( heap ); 10c44f: 89 5f 08 mov %ebx,0x8(%edi) first_block->prev = _Heap_Free_list_head( heap ); 10c452: 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); 10c455: 01 fe add %edi,%esi 10c457: 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; 10c45a: 8b 55 e4 mov -0x1c(%ebp),%edx 10c45d: 89 16 mov %edx,(%esi) last_block->size_and_flag = first_block_begin - (uintptr_t) last_block; 10c45f: 89 fa mov %edi,%edx 10c461: 29 f2 sub %esi,%edx 10c463: 89 56 04 mov %edx,0x4(%esi) /* Heap control */ heap->page_size = page_size; 10c466: 89 4b 10 mov %ecx,0x10(%ebx) heap->min_block_size = min_block_size; 10c469: 8b 75 f0 mov -0x10(%ebp),%esi 10c46c: 89 73 14 mov %esi,0x14(%ebx) heap->area_begin = heap_area_begin; 10c46f: 8b 55 0c mov 0xc(%ebp),%edx 10c472: 89 53 18 mov %edx,0x18(%ebx) heap->area_end = heap_area_end; 10c475: 8b 75 ec mov -0x14(%ebp),%esi 10c478: 89 73 1c mov %esi,0x1c(%ebx) heap->first_block = first_block; 10c47b: 89 7b 20 mov %edi,0x20(%ebx) heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; 10c47e: 89 7b 08 mov %edi,0x8(%ebx) _Heap_Free_list_tail( heap )->prev = first_block; 10c481: 89 7b 0c mov %edi,0xc(%ebx) /* Statistics */ stats->size = first_block_size; 10c484: 8b 55 e4 mov -0x1c(%ebp),%edx 10c487: 89 53 2c mov %edx,0x2c(%ebx) stats->free_size = first_block_size; 10c48a: 89 53 30 mov %edx,0x30(%ebx) stats->min_free_size = first_block_size; 10c48d: 89 53 34 mov %edx,0x34(%ebx) stats->free_blocks = 1; 10c490: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) stats->max_free_blocks = 1; 10c497: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) stats->used_blocks = 0; 10c49e: c7 43 40 00 00 00 00 movl $0x0,0x40(%ebx) stats->max_search = 0; 10c4a5: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) stats->allocs = 0; 10c4ac: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) stats->searches = 0; 10c4b3: c7 43 4c 00 00 00 00 movl $0x0,0x4c(%ebx) stats->frees = 0; 10c4ba: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) stats->resizes = 0; 10c4c1: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) stats->instance = instance++; 10c4c8: 8b 15 00 70 12 00 mov 0x127000,%edx 10c4ce: 89 53 28 mov %edx,0x28(%ebx) 10c4d1: 42 inc %edx 10c4d2: 89 15 00 70 12 00 mov %edx,0x127000 _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; } 10c4d8: 83 c4 10 add $0x10,%esp 10c4db: 5b pop %ebx 10c4dc: 5e pop %esi 10c4dd: 5f pop %edi 10c4de: c9 leave 10c4df: c3 ret uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c4e0: 89 c8 mov %ecx,%eax 10c4e2: 83 e0 03 and $0x3,%eax 10c4e5: 74 05 je 10c4ec <_Heap_Initialize+0x118> return value - remainder + alignment; 10c4e7: 83 c1 04 add $0x4,%ecx 10c4ea: 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 ) { 10c4ec: 83 f9 03 cmp $0x3,%ecx 10c4ef: 77 0b ja 10c4fc <_Heap_Initialize+0x128> ); _HAssert( _Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size ) ); return alloc_area_size; 10c4f1: 31 c0 xor %eax,%eax } 10c4f3: 83 c4 10 add $0x10,%esp 10c4f6: 5b pop %ebx 10c4f7: 5e pop %esi 10c4f8: 5f pop %edi 10c4f9: c9 leave 10c4fa: c3 ret 10c4fb: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10c4fc: b8 10 00 00 00 mov $0x10,%eax 10c501: 31 d2 xor %edx,%edx 10c503: f7 f1 div %ecx if ( remainder != 0 ) { 10c505: 85 d2 test %edx,%edx 10c507: 74 0d je 10c516 <_Heap_Initialize+0x142> return value - remainder + alignment; 10c509: 8d 41 10 lea 0x10(%ecx),%eax 10c50c: 29 d0 sub %edx,%eax 10c50e: 89 45 f0 mov %eax,-0x10(%ebp) 10c511: e9 de fe ff ff jmp 10c3f4 <_Heap_Initialize+0x20> <== ALWAYS TAKEN uintptr_t alignment ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { 10c516: c7 45 f0 10 00 00 00 movl $0x10,-0x10(%ebp) 10c51d: e9 d2 fe ff ff jmp 10c3f4 <_Heap_Initialize+0x20> <== ALWAYS TAKEN 0011efc0 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 11efc0: 55 push %ebp 11efc1: 89 e5 mov %esp,%ebp 11efc3: 57 push %edi 11efc4: 56 push %esi 11efc5: 53 push %ebx 11efc6: 83 ec 2c sub $0x2c,%esp 11efc9: 8b 5d 08 mov 0x8(%ebp),%ebx 11efcc: 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 ) 11efcf: 8d 4e f8 lea -0x8(%esi),%ecx 11efd2: 89 f0 mov %esi,%eax 11efd4: 31 d2 xor %edx,%edx 11efd6: f7 73 10 divl 0x10(%ebx) 11efd9: 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; 11efdb: 8b 45 14 mov 0x14(%ebp),%eax 11efde: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 11efe4: 8b 55 18 mov 0x18(%ebp),%edx 11efe7: 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 11efed: 39 4b 20 cmp %ecx,0x20(%ebx) 11eff0: 76 0e jbe 11f000 <_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; 11eff2: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11eff7: 8d 65 f4 lea -0xc(%ebp),%esp 11effa: 5b pop %ebx 11effb: 5e pop %esi 11effc: 5f pop %edi 11effd: c9 leave 11effe: c3 ret 11efff: 90 nop <== NOT EXECUTED 11f000: 39 4b 24 cmp %ecx,0x24(%ebx) 11f003: 72 ed jb 11eff2 <_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; 11f005: 8b 41 04 mov 0x4(%ecx),%eax 11f008: 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; 11f00b: 8d 3c 01 lea (%ecx,%eax,1),%edi 11f00e: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 11f011: 89 fa mov %edi,%edx 11f013: 29 f2 sub %esi,%edx 11f015: 83 c2 04 add $0x4,%edx 11f018: 89 55 dc mov %edx,-0x24(%ebp) 11f01b: 8b 57 04 mov 0x4(%edi),%edx 11f01e: 83 e2 fe and $0xfffffffe,%edx 11f021: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 11f024: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 11f028: 83 e2 01 and $0x1,%edx 11f02b: 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; 11f02e: 8b 55 dc mov -0x24(%ebp),%edx 11f031: 8b 7d 14 mov 0x14(%ebp),%edi 11f034: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 11f036: 8a 55 e0 mov -0x20(%ebp),%dl 11f039: 80 f2 01 xor $0x1,%dl 11f03c: 88 55 e0 mov %dl,-0x20(%ebp) 11f03f: 75 17 jne 11f058 <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 11f041: 8b 55 dc mov -0x24(%ebp),%edx 11f044: 39 55 10 cmp %edx,0x10(%ebp) 11f047: 76 20 jbe 11f069 <_Heap_Resize_block+0xa9> 11f049: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f04e: 8d 65 f4 lea -0xc(%ebp),%esp 11f051: 5b pop %ebx 11f052: 5e pop %esi 11f053: 5f pop %edi 11f054: c9 leave 11f055: c3 ret 11f056: 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; 11f058: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 11f05b: 8b 7d d0 mov -0x30(%ebp),%edi 11f05e: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 11f061: 8b 55 dc mov -0x24(%ebp),%edx 11f064: 39 55 10 cmp %edx,0x10(%ebp) 11f067: 77 e0 ja 11f049 <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 11f069: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 11f06d: 74 31 je 11f0a0 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 11f06f: 8b 79 04 mov 0x4(%ecx),%edi 11f072: 83 e7 01 and $0x1,%edi 11f075: 09 c7 or %eax,%edi 11f077: 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; 11f07a: 8b 7d d4 mov -0x2c(%ebp),%edi 11f07d: 8b 7f 08 mov 0x8(%edi),%edi 11f080: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 11f083: 8b 55 d4 mov -0x2c(%ebp),%edx 11f086: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 11f089: 8b 55 e4 mov -0x1c(%ebp),%edx 11f08c: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 11f08f: 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; 11f092: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 11f097: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 11f09a: 8b 7d d0 mov -0x30(%ebp),%edi 11f09d: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 11f0a0: ff 75 10 pushl 0x10(%ebp) 11f0a3: 56 push %esi 11f0a4: 51 push %ecx 11f0a5: 53 push %ebx 11f0a6: e8 5d d5 fe ff call 10c608 <_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; 11f0ab: 8b 50 04 mov 0x4(%eax),%edx 11f0ae: 83 e2 fe and $0xfffffffe,%edx 11f0b1: 29 f0 sub %esi,%eax 11f0b3: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 11f0b7: 8b 55 18 mov 0x18(%ebp),%edx 11f0ba: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 11f0bc: ff 43 54 incl 0x54(%ebx) 11f0bf: 31 c0 xor %eax,%eax 11f0c1: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 11f0c4: 8d 65 f4 lea -0xc(%ebp),%esp 11f0c7: 5b pop %ebx 11f0c8: 5e pop %esi 11f0c9: 5f pop %edi 11f0ca: c9 leave 11f0cb: c3 ret 0011f0cc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11f0cc: 55 push %ebp 11f0cd: 89 e5 mov %esp,%ebp 11f0cf: 56 push %esi 11f0d0: 53 push %ebx 11f0d1: 8b 5d 08 mov 0x8(%ebp),%ebx 11f0d4: 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 ) 11f0d7: 8d 4e f8 lea -0x8(%esi),%ecx 11f0da: 89 f0 mov %esi,%eax 11f0dc: 31 d2 xor %edx,%edx 11f0de: f7 73 10 divl 0x10(%ebx) 11f0e1: 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; 11f0e3: 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 11f0e6: 39 c1 cmp %eax,%ecx 11f0e8: 72 07 jb 11f0f1 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11f0ea: 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 11f0ed: 39 d1 cmp %edx,%ecx 11f0ef: 76 07 jbe 11f0f8 <_Heap_Size_of_alloc_area+0x2c> <== NEVER TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 11f0f1: 31 c0 xor %eax,%eax } 11f0f3: 5b pop %ebx 11f0f4: 5e pop %esi 11f0f5: c9 leave 11f0f6: c3 ret 11f0f7: 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); 11f0f8: 8b 59 04 mov 0x4(%ecx),%ebx 11f0fb: 83 e3 fe and $0xfffffffe,%ebx 11f0fe: 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 11f100: 39 c8 cmp %ecx,%eax 11f102: 77 ed ja 11f0f1 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN 11f104: 39 ca cmp %ecx,%edx 11f106: 72 e9 jb 11f0f1 <_Heap_Size_of_alloc_area+0x25> <== ALWAYS TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11f108: f6 41 04 01 testb $0x1,0x4(%ecx) 11f10c: 74 e3 je 11f0f1 <_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; 11f10e: 29 f1 sub %esi,%ecx 11f110: 8d 51 04 lea 0x4(%ecx),%edx 11f113: 8b 45 10 mov 0x10(%ebp),%eax 11f116: 89 10 mov %edx,(%eax) 11f118: b0 01 mov $0x1,%al return true; } 11f11a: 5b pop %ebx 11f11b: 5e pop %esi 11f11c: c9 leave 11f11d: c3 ret 0010d170 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d170: 55 push %ebp 10d171: 89 e5 mov %esp,%ebp 10d173: 57 push %edi 10d174: 56 push %esi 10d175: 53 push %ebx 10d176: 83 ec 3c sub $0x3c,%esp 10d179: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d17c: 8b 43 10 mov 0x10(%ebx),%eax 10d17f: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d182: 8b 53 14 mov 0x14(%ebx),%edx 10d185: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d188: 8b 43 24 mov 0x24(%ebx),%eax 10d18b: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d18e: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d191: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d195: 75 1d jne 10d1b4 <_Heap_Walk+0x44> 10d197: c7 45 e4 68 d1 10 00 movl $0x10d168,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d19e: 83 3d 00 9d 12 00 03 cmpl $0x3,0x129d00 10d1a5: 74 1d je 10d1c4 <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d1a7: b0 01 mov $0x1,%al 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 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; 10d1b4: c7 45 e4 38 d5 10 00 movl $0x10d538,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d1bb: 83 3d 00 9d 12 00 03 cmpl $0x3,0x129d00 10d1c2: 75 e3 jne 10d1a7 <_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)( 10d1c4: 52 push %edx 10d1c5: ff 73 0c pushl 0xc(%ebx) 10d1c8: ff 73 08 pushl 0x8(%ebx) 10d1cb: ff 75 d8 pushl -0x28(%ebp) 10d1ce: 56 push %esi 10d1cf: ff 73 1c pushl 0x1c(%ebx) 10d1d2: ff 73 18 pushl 0x18(%ebx) 10d1d5: ff 75 dc pushl -0x24(%ebp) 10d1d8: ff 75 e0 pushl -0x20(%ebp) 10d1db: 68 30 1e 12 00 push $0x121e30 10d1e0: 6a 00 push $0x0 10d1e2: ff 75 0c pushl 0xc(%ebp) 10d1e5: 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 ) { 10d1e8: 83 c4 30 add $0x30,%esp 10d1eb: 8b 45 e0 mov -0x20(%ebp),%eax 10d1ee: 85 c0 test %eax,%eax 10d1f0: 0f 84 b2 00 00 00 je 10d2a8 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d1f6: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d1fa: 0f 85 b0 00 00 00 jne 10d2b0 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d200: 8b 45 dc mov -0x24(%ebp),%eax 10d203: 31 d2 xor %edx,%edx 10d205: f7 75 e0 divl -0x20(%ebp) 10d208: 85 d2 test %edx,%edx 10d20a: 0f 85 ac 00 00 00 jne 10d2bc <_Heap_Walk+0x14c> ); return false; } if ( 10d210: 8d 46 08 lea 0x8(%esi),%eax 10d213: 31 d2 xor %edx,%edx 10d215: f7 75 e0 divl -0x20(%ebp) 10d218: 85 d2 test %edx,%edx 10d21a: 0f 85 a8 00 00 00 jne 10d2c8 <_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; 10d220: 8b 56 04 mov 0x4(%esi),%edx 10d223: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d226: 83 e2 01 and $0x1,%edx 10d229: 0f 84 a1 00 00 00 je 10d2d0 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d22f: 8b 06 mov (%esi),%eax 10d231: 39 45 e0 cmp %eax,-0x20(%ebp) 10d234: 75 4e jne 10d284 <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d236: 8b 55 d8 mov -0x28(%ebp),%edx 10d239: 8b 42 04 mov 0x4(%edx),%eax 10d23c: 83 e0 fe and $0xfffffffe,%eax 10d23f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d244: 0f 84 bd 02 00 00 je 10d507 <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10d24a: 8b 43 10 mov 0x10(%ebx),%eax 10d24d: 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; 10d250: 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 ) { 10d253: 39 cb cmp %ecx,%ebx 10d255: 0f 84 08 01 00 00 je 10d363 <_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; 10d25b: 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 10d25e: 39 cf cmp %ecx,%edi 10d260: 76 76 jbe 10d2d8 <_Heap_Walk+0x168> <== NEVER TAKEN 10d262: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10d264: 51 push %ecx 10d265: 68 78 1f 12 00 push $0x121f78 10d26a: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10d26c: 6a 01 push $0x1 10d26e: ff 75 0c pushl 0xc(%ebp) 10d271: ff 55 e4 call *-0x1c(%ebp) 10d274: 31 c0 xor %eax,%eax 10d276: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10d279: 8d 65 f4 lea -0xc(%ebp),%esp 10d27c: 5b pop %ebx 10d27d: 5e pop %esi 10d27e: 5f pop %edi 10d27f: c9 leave 10d280: c3 ret 10d281: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10d284: 83 ec 0c sub $0xc,%esp 10d287: ff 75 e0 pushl -0x20(%ebp) 10d28a: 50 push %eax 10d28b: 68 4c 1f 12 00 push $0x121f4c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d290: 6a 01 push $0x1 10d292: ff 75 0c pushl 0xc(%ebp) 10d295: ff 55 e4 call *-0x1c(%ebp) 10d298: 31 c0 xor %eax,%eax 10d29a: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10d29d: 8d 65 f4 lea -0xc(%ebp),%esp 10d2a0: 5b pop %ebx 10d2a1: 5e pop %esi 10d2a2: 5f pop %edi 10d2a3: c9 leave 10d2a4: c3 ret 10d2a5: 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" ); 10d2a8: 57 push %edi 10d2a9: 68 a7 21 12 00 push $0x1221a7 10d2ae: eb bc jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10d2b0: ff 75 e0 pushl -0x20(%ebp) 10d2b3: 68 ba 21 12 00 push $0x1221ba 10d2b8: eb b2 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d2ba: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10d2bc: ff 75 dc pushl -0x24(%ebp) 10d2bf: 68 c4 1e 12 00 push $0x121ec4 10d2c4: eb a6 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d2c6: 66 90 xchg %ax,%ax <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10d2c8: 56 push %esi 10d2c9: 68 e8 1e 12 00 push $0x121ee8 10d2ce: eb 9c jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10d2d0: 56 push %esi 10d2d1: 68 1c 1f 12 00 push $0x121f1c 10d2d6: eb 94 jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN && (uintptr_t) block <= (uintptr_t) heap->last_block; 10d2d8: 8b 53 24 mov 0x24(%ebx),%edx 10d2db: 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 10d2de: 39 ca cmp %ecx,%edx 10d2e0: 72 82 jb 10d264 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d2e2: 8d 41 08 lea 0x8(%ecx),%eax 10d2e5: 31 d2 xor %edx,%edx 10d2e7: f7 75 d4 divl -0x2c(%ebp) 10d2ea: 85 d2 test %edx,%edx 10d2ec: 0f 85 20 02 00 00 jne 10d512 <_Heap_Walk+0x3a2> <== ALWAYS TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d2f2: 8b 41 04 mov 0x4(%ecx),%eax 10d2f5: 83 e0 fe and $0xfffffffe,%eax 10d2f8: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d2fd: 0f 85 29 02 00 00 jne 10d52c <_Heap_Walk+0x3bc> <== ALWAYS TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10d303: 8b 41 0c mov 0xc(%ecx),%eax 10d306: 39 c3 cmp %eax,%ebx 10d308: 0f 85 0f 02 00 00 jne 10d51d <_Heap_Walk+0x3ad> <== ALWAYS TAKEN 10d30e: 89 75 c8 mov %esi,-0x38(%ebp) 10d311: 89 de mov %ebx,%esi 10d313: eb 40 jmp 10d355 <_Heap_Walk+0x1e5> <== ALWAYS TAKEN 10d315: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d318: 39 f9 cmp %edi,%ecx 10d31a: 0f 82 44 ff ff ff jb 10d264 <_Heap_Walk+0xf4> 10d320: 39 4d d0 cmp %ecx,-0x30(%ebp) 10d323: 0f 82 3b ff ff ff jb 10d264 <_Heap_Walk+0xf4> <== ALWAYS TAKEN ); return false; } if ( 10d329: 8d 41 08 lea 0x8(%ecx),%eax 10d32c: 31 d2 xor %edx,%edx 10d32e: f7 75 d4 divl -0x2c(%ebp) 10d331: 85 d2 test %edx,%edx 10d333: 0f 85 d9 01 00 00 jne 10d512 <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10d339: 8b 41 04 mov 0x4(%ecx),%eax 10d33c: 83 e0 fe and $0xfffffffe,%eax 10d33f: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10d344: 0f 85 e2 01 00 00 jne 10d52c <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10d34a: 8b 41 0c mov 0xc(%ecx),%eax 10d34d: 39 d8 cmp %ebx,%eax 10d34f: 0f 85 c8 01 00 00 jne 10d51d <_Heap_Walk+0x3ad> (*printer)( 10d355: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10d357: 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 ) { 10d35a: 39 ce cmp %ecx,%esi 10d35c: 75 ba jne 10d318 <_Heap_Walk+0x1a8> 10d35e: 89 f3 mov %esi,%ebx 10d360: 8b 75 c8 mov -0x38(%ebp),%esi if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d363: 39 75 d8 cmp %esi,-0x28(%ebp) 10d366: 0f 84 3b fe ff ff je 10d1a7 <_Heap_Walk+0x37> <== ALWAYS TAKEN 10d36c: 8b 45 cc mov -0x34(%ebp),%eax 10d36f: 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; 10d370: 89 c1 mov %eax,%ecx 10d372: 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); 10d375: 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 ) { 10d378: a8 01 test $0x1,%al 10d37a: 74 30 je 10d3ac <_Heap_Walk+0x23c> (*printer)( 10d37c: 83 ec 0c sub $0xc,%esp 10d37f: 51 push %ecx 10d380: 56 push %esi 10d381: 68 09 22 12 00 push $0x122209 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d386: 6a 00 push $0x0 10d388: ff 75 0c pushl 0xc(%ebp) 10d38b: 89 4d c4 mov %ecx,-0x3c(%ebp) 10d38e: ff 55 e4 call *-0x1c(%ebp) 10d391: 83 c4 20 add $0x20,%esp 10d394: 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 10d397: 39 7b 20 cmp %edi,0x20(%ebx) 10d39a: 76 20 jbe 10d3bc <_Heap_Walk+0x24c> <== NEVER TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10d39c: 83 ec 0c sub $0xc,%esp 10d39f: 57 push %edi 10d3a0: 56 push %esi 10d3a1: 68 24 20 12 00 push $0x122024 10d3a6: e9 e5 fe ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d3ab: 90 nop <== NOT EXECUTED "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10d3ac: 83 ec 08 sub $0x8,%esp 10d3af: ff 36 pushl (%esi) 10d3b1: 51 push %ecx 10d3b2: 56 push %esi 10d3b3: 68 fc 1f 12 00 push $0x121ffc 10d3b8: eb cc jmp 10d386 <_Heap_Walk+0x216> <== ALWAYS TAKEN 10d3ba: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d3bc: 39 7b 24 cmp %edi,0x24(%ebx) 10d3bf: 72 db jb 10d39c <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10d3c1: 89 c8 mov %ecx,%eax 10d3c3: 31 d2 xor %edx,%edx 10d3c5: f7 75 e0 divl -0x20(%ebp) 10d3c8: 85 d2 test %edx,%edx 10d3ca: 0f 85 02 01 00 00 jne 10d4d2 <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10d3d0: 39 4d dc cmp %ecx,-0x24(%ebp) 10d3d3: 0f 87 0b 01 00 00 ja 10d4e4 <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10d3d9: 39 fe cmp %edi,%esi 10d3db: 0f 83 17 01 00 00 jae 10d4f8 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10d3e1: f6 47 04 01 testb $0x1,0x4(%edi) 10d3e5: 0f 85 91 00 00 00 jne 10d47c <_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; 10d3eb: 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; 10d3ee: 8b 46 04 mov 0x4(%esi),%eax 10d3f1: 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; 10d3f4: 83 e0 fe and $0xfffffffe,%eax 10d3f7: 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); 10d3fa: 01 f0 add %esi,%eax 10d3fc: 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)( 10d3ff: 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; 10d402: 39 53 0c cmp %edx,0xc(%ebx) 10d405: 0f 84 99 00 00 00 je 10d4a4 <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10d40b: 39 da cmp %ebx,%edx 10d40d: 0f 84 a9 00 00 00 je 10d4bc <_Heap_Walk+0x34c> 10d413: c7 45 c8 6f 1d 12 00 movl $0x121d6f,-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)( 10d41a: 8b 46 0c mov 0xc(%esi),%eax 10d41d: 39 c1 cmp %eax,%ecx 10d41f: 74 7b je 10d49c <_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)" : ""), 10d421: 39 d8 cmp %ebx,%eax 10d423: 0f 84 9f 00 00 00 je 10d4c8 <_Heap_Walk+0x358> 10d429: b9 6f 1d 12 00 mov $0x121d6f,%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)( 10d42e: ff 75 c8 pushl -0x38(%ebp) 10d431: 52 push %edx 10d432: 51 push %ecx 10d433: 50 push %eax 10d434: 56 push %esi 10d435: 68 e4 20 12 00 push $0x1220e4 10d43a: 6a 00 push $0x0 10d43c: ff 75 0c pushl 0xc(%ebp) 10d43f: 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 ) { 10d442: 8b 55 d0 mov -0x30(%ebp),%edx 10d445: 8b 02 mov (%edx),%eax 10d447: 83 c4 20 add $0x20,%esp 10d44a: 39 45 d4 cmp %eax,-0x2c(%ebp) 10d44d: 74 11 je 10d460 <_Heap_Walk+0x2f0> (*printer)( 10d44f: 51 push %ecx 10d450: 52 push %edx 10d451: 50 push %eax 10d452: ff 75 d4 pushl -0x2c(%ebp) 10d455: 56 push %esi 10d456: 68 10 21 12 00 push $0x122110 10d45b: e9 30 fe ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN ); return false; } if ( !prev_used ) { 10d460: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10d464: 74 4a je 10d4b0 <_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; 10d466: 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 ) { 10d469: 39 d8 cmp %ebx,%eax 10d46b: 75 0a jne 10d477 <_Heap_Walk+0x307> <== NEVER TAKEN 10d46d: eb 21 jmp 10d490 <_Heap_Walk+0x320> <== NOT EXECUTED 10d46f: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10d470: 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 ) { 10d473: 39 d8 cmp %ebx,%eax 10d475: 74 19 je 10d490 <_Heap_Walk+0x320> if ( free_block == block ) { 10d477: 39 f0 cmp %esi,%eax 10d479: 75 f5 jne 10d470 <_Heap_Walk+0x300> 10d47b: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d47c: 39 7d d8 cmp %edi,-0x28(%ebp) 10d47f: 0f 84 22 fd ff ff je 10d1a7 <_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 ) { 10d485: 8b 47 04 mov 0x4(%edi),%eax 10d488: 89 fe mov %edi,%esi 10d48a: e9 e1 fe ff ff jmp 10d370 <_Heap_Walk+0x200> <== ALWAYS TAKEN 10d48f: 90 nop <== NOT EXECUTED return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10d490: 56 push %esi 10d491: 68 7c 21 12 00 push $0x12217c 10d496: e9 d1 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d49b: 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)( 10d49c: b9 34 22 12 00 mov $0x122234,%ecx 10d4a1: eb 8b jmp 10d42e <_Heap_Walk+0x2be> <== ALWAYS TAKEN 10d4a3: 90 nop <== NOT EXECUTED } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10d4a4: c7 45 c8 20 22 12 00 movl $0x122220,-0x38(%ebp) 10d4ab: e9 6a ff ff ff jmp 10d41a <_Heap_Walk+0x2aa> <== ALWAYS TAKEN return false; } if ( !prev_used ) { (*printer)( 10d4b0: 56 push %esi 10d4b1: 68 4c 21 12 00 push $0x12214c 10d4b6: e9 b1 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 10d4bb: 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)" : "") 10d4bc: c7 45 c8 2a 22 12 00 movl $0x12222a,-0x38(%ebp) 10d4c3: e9 52 ff ff ff jmp 10d41a <_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)" : ""), 10d4c8: b9 3f 22 12 00 mov $0x12223f,%ecx 10d4cd: e9 5c ff ff ff jmp 10d42e <_Heap_Walk+0x2be> <== ALWAYS TAKEN return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10d4d2: 83 ec 0c sub $0xc,%esp 10d4d5: 51 push %ecx 10d4d6: 56 push %esi 10d4d7: 68 54 20 12 00 push $0x122054 10d4dc: e9 af fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d4e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return false; } if ( block_size < min_block_size ) { (*printer)( 10d4e4: 83 ec 08 sub $0x8,%esp 10d4e7: ff 75 dc pushl -0x24(%ebp) 10d4ea: 51 push %ecx 10d4eb: 56 push %esi 10d4ec: 68 84 20 12 00 push $0x122084 10d4f1: e9 9a fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN 10d4f6: 66 90 xchg %ax,%ax <== NOT EXECUTED return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10d4f8: 83 ec 0c sub $0xc,%esp 10d4fb: 57 push %edi 10d4fc: 56 push %esi 10d4fd: 68 b0 20 12 00 push $0x1220b0 10d502: e9 89 fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10d507: 53 push %ebx 10d508: 68 d8 21 12 00 push $0x1221d8 10d50d: e9 5a fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10d512: 51 push %ecx 10d513: 68 98 1f 12 00 push $0x121f98 10d518: e9 4f fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN return false; } if ( free_block->prev != prev_block ) { (*printer)( 10d51d: 83 ec 0c sub $0xc,%esp 10d520: 50 push %eax 10d521: 51 push %ecx 10d522: 68 c8 1f 12 00 push $0x121fc8 10d527: e9 64 fd ff ff jmp 10d290 <_Heap_Walk+0x120> <== ALWAYS TAKEN return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10d52c: 51 push %ecx 10d52d: 68 ed 21 12 00 push $0x1221ed 10d532: e9 35 fd ff ff jmp 10d26c <_Heap_Walk+0xfc> <== ALWAYS TAKEN 0010d538 <_Heap_Walk_print>: { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { 10d538: 55 push %ebp 10d539: 89 e5 mov %esp,%ebp 10d53b: 83 ec 08 sub $0x8,%esp 10d53e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; if ( error ) { 10d541: 80 7d 0c 00 cmpb $0x0,0xc(%ebp) 10d545: 75 25 jne 10d56c <_Heap_Walk_print+0x34> printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); 10d547: 83 ec 08 sub $0x8,%esp 10d54a: 50 push %eax 10d54b: 68 54 22 12 00 push $0x122254 10d550: e8 3f bf ff ff call 109494 10d555: 83 c4 10 add $0x10,%esp ) { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) 10d558: 8d 45 14 lea 0x14(%ebp),%eax } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); vprintk( fmt, ap ); 10d55b: 83 ec 08 sub $0x8,%esp 10d55e: 50 push %eax 10d55f: ff 75 10 pushl 0x10(%ebp) 10d562: e8 cd dc ff ff call 10b234 10d567: 83 c4 10 add $0x10,%esp va_end( ap ); } 10d56a: c9 leave 10d56b: c3 ret static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); 10d56c: 83 ec 08 sub $0x8,%esp 10d56f: 50 push %eax 10d570: 68 49 22 12 00 push $0x122249 10d575: e8 1a bf ff ff call 109494 10d57a: 83 c4 10 add $0x10,%esp 10d57d: eb d9 jmp 10d558 <_Heap_Walk_print+0x20> <== ALWAYS TAKEN 0010bbb0 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10bbb0: 55 push %ebp 10bbb1: 89 e5 mov %esp,%ebp 10bbb3: 53 push %ebx 10bbb4: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbb7: 8b 15 00 7e 12 00 mov 0x127e00,%edx 10bbbd: 85 d2 test %edx,%edx 10bbbf: 74 1a je 10bbdb <_IO_Initialize_all_drivers+0x2b> <== ALWAYS TAKEN 10bbc1: 31 db xor %ebx,%ebx 10bbc3: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10bbc4: 50 push %eax 10bbc5: 6a 00 push $0x0 10bbc7: 6a 00 push $0x0 10bbc9: 53 push %ebx 10bbca: e8 79 4d 00 00 call 110948 <== ALWAYS TAKEN void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10bbcf: 43 inc %ebx 10bbd0: 83 c4 10 add $0x10,%esp 10bbd3: 39 1d 00 7e 12 00 cmp %ebx,0x127e00 10bbd9: 77 e9 ja 10bbc4 <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10bbdb: 8b 5d fc mov -0x4(%ebp),%ebx 10bbde: c9 leave 10bbdf: c3 ret 0010bbe0 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10bbe0: 55 push %ebp 10bbe1: 89 e5 mov %esp,%ebp 10bbe3: 57 push %edi 10bbe4: 56 push %esi 10bbe5: 53 push %ebx 10bbe6: 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; 10bbe9: 8b 1d 54 32 12 00 mov 0x123254,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10bbef: a1 50 32 12 00 mov 0x123250,%eax 10bbf4: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10bbf7: 8b 35 4c 32 12 00 mov 0x12324c,%esi /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 10bbfd: 39 f0 cmp %esi,%eax 10bbff: 72 17 jb 10bc18 <_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; 10bc01: 89 1d 04 7e 12 00 mov %ebx,0x127e04 _IO_Number_of_drivers = number_of_drivers; 10bc07: 8b 45 e4 mov -0x1c(%ebp),%eax 10bc0a: a3 00 7e 12 00 mov %eax,0x127e00 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc0f: 8d 65 f4 lea -0xc(%ebp),%esp 10bc12: 5b pop %ebx 10bc13: 5e pop %esi 10bc14: 5f pop %edi 10bc15: c9 leave 10bc16: c3 ret 10bc17: 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 *) 10bc18: 8d 0c 76 lea (%esi,%esi,2),%ecx 10bc1b: c1 e1 03 shl $0x3,%ecx 10bc1e: 83 ec 0c sub $0xc,%esp 10bc21: 51 push %ecx 10bc22: 89 4d dc mov %ecx,-0x24(%ebp) 10bc25: e8 e6 29 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10bc2a: 89 c2 mov %eax,%edx 10bc2c: a3 04 7e 12 00 mov %eax,0x127e04 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10bc31: 89 35 00 7e 12 00 mov %esi,0x127e00 memset( 10bc37: 31 c0 xor %eax,%eax 10bc39: 8b 4d dc mov -0x24(%ebp),%ecx 10bc3c: 89 d7 mov %edx,%edi 10bc3e: 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++ ) 10bc40: 83 c4 10 add $0x10,%esp 10bc43: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bc46: 85 c9 test %ecx,%ecx 10bc48: 74 c5 je 10bc0f <_IO_Manager_initialization+0x2f> <== ALWAYS TAKEN 10bc4a: a1 04 7e 12 00 mov 0x127e04,%eax 10bc4f: 89 45 e0 mov %eax,-0x20(%ebp) 10bc52: 31 c0 xor %eax,%eax 10bc54: 31 d2 xor %edx,%edx 10bc56: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10bc58: 8b 7d e0 mov -0x20(%ebp),%edi 10bc5b: 01 c7 add %eax,%edi 10bc5d: 8d 34 03 lea (%ebx,%eax,1),%esi 10bc60: b9 06 00 00 00 mov $0x6,%ecx 10bc65: 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++ ) 10bc67: 42 inc %edx 10bc68: 83 c0 18 add $0x18,%eax 10bc6b: 39 55 e4 cmp %edx,-0x1c(%ebp) 10bc6e: 77 e8 ja 10bc58 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10bc70: 8d 65 f4 lea -0xc(%ebp),%esp 10bc73: 5b pop %ebx 10bc74: 5e pop %esi 10bc75: 5f pop %edi 10bc76: c9 leave 10bc77: c3 ret 0010c738 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10c738: 55 push %ebp 10c739: 89 e5 mov %esp,%ebp 10c73b: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10c73e: c6 05 48 75 12 00 00 movb $0x0,0x127548 _ISR_Nest_level = 0; 10c745: c7 05 74 74 12 00 00 movl $0x0,0x127474 10c74c: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10c74f: a1 3c 32 12 00 mov 0x12323c,%eax 10c754: 3b 05 10 32 12 00 cmp 0x123210,%eax 10c75a: 72 25 jb 10c781 <_ISR_Handler_initialization+0x49> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10c75c: 83 ec 0c sub $0xc,%esp 10c75f: 50 push %eax 10c760: e8 ab 1e 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10c765: a3 e8 73 12 00 mov %eax,0x1273e8 /* 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); 10c76a: 8b 15 3c 32 12 00 mov 0x12323c,%edx 10c770: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10c774: 83 e0 f0 and $0xfffffff0,%eax 10c777: a3 a8 73 12 00 mov %eax,0x1273a8 10c77c: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10c77f: c9 leave 10c780: c3 ret _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) _Internal_error_Occurred( 10c781: 50 push %eax 10c782: 6a 05 push $0x5 10c784: 6a 01 push $0x1 10c786: 6a 00 push $0x0 10c788: e8 6b ff ff ff call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 0010c6f8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10c6f8: 55 push %ebp 10c6f9: 89 e5 mov %esp,%ebp 10c6fb: 53 push %ebx 10c6fc: 83 ec 08 sub $0x8,%esp 10c6ff: 8b 45 08 mov 0x8(%ebp),%eax 10c702: 8b 55 0c mov 0xc(%ebp),%edx 10c705: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10c708: a3 80 74 12 00 mov %eax,0x127480 _Internal_errors_What_happened.is_internal = is_internal; 10c70d: 88 15 84 74 12 00 mov %dl,0x127484 _Internal_errors_What_happened.the_error = the_error; 10c713: 89 1d 88 74 12 00 mov %ebx,0x127488 _User_extensions_Fatal( the_source, is_internal, the_error ); 10c719: 53 push %ebx 10c71a: 0f b6 d2 movzbl %dl,%edx 10c71d: 52 push %edx 10c71e: 50 push %eax 10c71f: e8 84 1b 00 00 call 10e2a8 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10c724: c7 05 a0 75 12 00 05 movl $0x5,0x1275a0 <== NOT EXECUTED 10c72b: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10c72e: fa cli <== NOT EXECUTED 10c72f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10c731: f4 hlt <== NOT EXECUTED 10c732: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c735: eb fe jmp 10c735 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 00110f70 <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 110f70: 55 push %ebp 110f71: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 110f73: 8b 45 08 mov 0x8(%ebp),%eax 110f76: 48 dec %eax 110f77: 83 f8 03 cmp $0x3,%eax 110f7a: 77 0c ja 110f88 <_Objects_API_maximum_class+0x18> 110f7c: 8b 04 85 98 14 12 00 mov 0x121498(,%eax,4),%eax 110f83: c9 leave 110f84: c3 ret 110f85: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 110f88: 31 c0 xor %eax,%eax 110f8a: c9 leave 110f8b: c3 ret 0010c790 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10c790: 55 push %ebp 10c791: 89 e5 mov %esp,%ebp 10c793: 56 push %esi 10c794: 53 push %ebx 10c795: 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 ) 10c798: 8b 43 18 mov 0x18(%ebx),%eax 10c79b: 85 c0 test %eax,%eax 10c79d: 75 0d jne 10c7ac <_Objects_Allocate+0x1c> <== NEVER TAKEN 10c79f: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10c7a1: 89 c8 mov %ecx,%eax 10c7a3: 8d 65 f8 lea -0x8(%ebp),%esp 10c7a6: 5b pop %ebx 10c7a7: 5e pop %esi 10c7a8: c9 leave 10c7a9: c3 ret 10c7aa: 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 ); 10c7ac: 8d 73 20 lea 0x20(%ebx),%esi 10c7af: 83 ec 0c sub $0xc,%esp 10c7b2: 56 push %esi 10c7b3: e8 e4 f6 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10c7b8: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10c7ba: 83 c4 10 add $0x10,%esp 10c7bd: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c7c1: 74 de je 10c7a1 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10c7c3: 85 c0 test %eax,%eax 10c7c5: 74 29 je 10c7f0 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10c7c7: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10c7cb: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c7cf: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10c7d1: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c7d5: 31 d2 xor %edx,%edx 10c7d7: f7 f6 div %esi 10c7d9: c1 e0 02 shl $0x2,%eax 10c7dc: 03 43 30 add 0x30(%ebx),%eax 10c7df: ff 08 decl (%eax) information->inactive--; 10c7e1: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10c7e5: 89 c8 mov %ecx,%eax 10c7e7: 8d 65 f8 lea -0x8(%ebp),%esp 10c7ea: 5b pop %ebx 10c7eb: 5e pop %esi 10c7ec: c9 leave 10c7ed: c3 ret 10c7ee: 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 ); 10c7f0: 83 ec 0c sub $0xc,%esp 10c7f3: 53 push %ebx 10c7f4: e8 3b 00 00 00 call 10c834 <_Objects_Extend_information> <== ALWAYS TAKEN the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10c7f9: 89 34 24 mov %esi,(%esp) 10c7fc: e8 9b f6 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10c801: 89 c1 mov %eax,%ecx } if ( the_object ) { 10c803: 83 c4 10 add $0x10,%esp 10c806: 85 c0 test %eax,%eax 10c808: 74 97 je 10c7a1 <_Objects_Allocate+0x11> 10c80a: eb bb jmp 10c7c7 <_Objects_Allocate+0x37> <== ALWAYS TAKEN 0010c80c <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 53 push %ebx 10c810: 83 ec 04 sub $0x4,%esp 10c813: 8b 45 08 mov 0x8(%ebp),%eax 10c816: 8b 55 0c mov 0xc(%ebp),%edx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c819: 0f b7 5a 08 movzwl 0x8(%edx),%ebx 10c81d: 8b 48 1c mov 0x1c(%eax),%ecx 10c820: c7 04 99 00 00 00 00 movl $0x0,(%ecx,%ebx,4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c827: 89 55 0c mov %edx,0xc(%ebp) } 10c82a: 58 pop %eax 10c82b: 5b pop %ebx 10c82c: c9 leave Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 10c82d: e9 5e 05 00 00 jmp 10cd90 <_Objects_Namespace_remove> <== ALWAYS TAKEN 0010c834 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10c834: 55 push %ebp 10c835: 89 e5 mov %esp,%ebp 10c837: 57 push %edi 10c838: 56 push %esi 10c839: 53 push %ebx 10c83a: 83 ec 4c sub $0x4c,%esp 10c83d: 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 ); 10c840: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10c844: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10c847: 8b 4b 34 mov 0x34(%ebx),%ecx 10c84a: 85 c9 test %ecx,%ecx 10c84c: 0f 84 72 02 00 00 je 10cac4 <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10c852: 8b 7b 10 mov 0x10(%ebx),%edi 10c855: 66 89 7d d4 mov %di,-0x2c(%ebp) 10c859: 8b 7b 14 mov 0x14(%ebx),%edi 10c85c: 31 d2 xor %edx,%edx 10c85e: 8b 45 d4 mov -0x2c(%ebp),%eax 10c861: 66 f7 f7 div %di 10c864: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10c867: 85 f6 test %esi,%esi 10c869: 0f 84 6c 02 00 00 je 10cadb <_Objects_Extend_information+0x2a7> <== ALWAYS TAKEN if ( information->object_blocks[ block ] == NULL ) 10c86f: 8b 01 mov (%ecx),%eax 10c871: 85 c0 test %eax,%eax 10c873: 0f 84 72 02 00 00 je 10caeb <_Objects_Extend_information+0x2b7> <== ALWAYS TAKEN 10c879: 0f b7 ff movzwl %di,%edi 10c87c: 8b 55 d0 mov -0x30(%ebp),%edx 10c87f: 89 55 cc mov %edx,-0x34(%ebp) 10c882: 31 d2 xor %edx,%edx 10c884: 8b 45 cc mov -0x34(%ebp),%eax 10c887: eb 09 jmp 10c892 <_Objects_Extend_information+0x5e> <== ALWAYS TAKEN 10c889: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c88c: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10c890: 74 07 je 10c899 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10c892: 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++ ) { 10c894: 42 inc %edx 10c895: 39 d6 cmp %edx,%esi 10c897: 77 f3 ja 10c88c <_Objects_Extend_information+0x58> 10c899: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10c89c: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c8a0: 01 f8 add %edi,%eax 10c8a2: 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 ) { 10c8a5: 3d ff ff 00 00 cmp $0xffff,%eax 10c8aa: 0f 87 b1 01 00 00 ja 10ca61 <_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; 10c8b0: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10c8b4: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10c8b8: 0f 85 ae 01 00 00 jne 10ca6c <_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 ); 10c8be: 83 ec 0c sub $0xc,%esp 10c8c1: 57 push %edi 10c8c2: 89 55 b4 mov %edx,-0x4c(%ebp) 10c8c5: e8 46 1d 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> 10c8ca: 89 45 c4 mov %eax,-0x3c(%ebp) 10c8cd: 83 c4 10 add $0x10,%esp 10c8d0: 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 ) { 10c8d3: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c8d7: 39 45 cc cmp %eax,-0x34(%ebp) 10c8da: 0f 82 fe 00 00 00 jb 10c9de <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10c8e0: 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 ); 10c8e3: 83 ec 0c sub $0xc,%esp 10c8e6: 8d 04 7f lea (%edi,%edi,2),%eax 10c8e9: 03 45 d4 add -0x2c(%ebp),%eax 10c8ec: 03 45 d0 add -0x30(%ebp),%eax 10c8ef: c1 e0 02 shl $0x2,%eax 10c8f2: 50 push %eax 10c8f3: 89 55 b4 mov %edx,-0x4c(%ebp) 10c8f6: e8 41 1d 00 00 call 10e63c <_Workspace_Allocate> 10c8fb: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10c8fe: 83 c4 10 add $0x10,%esp 10c901: 85 c0 test %eax,%eax 10c903: 8b 55 b4 mov -0x4c(%ebp),%edx 10c906: 0f 84 ef 01 00 00 je 10cafb <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10c90c: 8b 45 c8 mov -0x38(%ebp),%eax 10c90f: 8d 04 b8 lea (%eax,%edi,4),%eax 10c912: 89 45 b8 mov %eax,-0x48(%ebp) 10c915: 8b 4d c8 mov -0x38(%ebp),%ecx 10c918: 8d 3c f9 lea (%ecx,%edi,8),%edi 10c91b: 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 ) { 10c91e: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10c922: 39 45 d0 cmp %eax,-0x30(%ebp) 10c925: 0f 82 60 01 00 00 jb 10ca8b <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10c92b: 8b 45 d0 mov -0x30(%ebp),%eax 10c92e: 85 c0 test %eax,%eax 10c930: 74 16 je 10c948 <_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, 10c932: 31 c0 xor %eax,%eax 10c934: 8b 4d bc mov -0x44(%ebp),%ecx 10c937: 8b 7d d0 mov -0x30(%ebp),%edi 10c93a: 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; 10c93c: 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++ ) { 10c943: 40 inc %eax 10c944: 39 c7 cmp %eax,%edi 10c946: 77 f4 ja 10c93c <_Objects_Extend_information+0x108> <== ALWAYS TAKEN 10c948: c1 e6 02 shl $0x2,%esi 10c94b: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10c94e: 8b 45 c8 mov -0x38(%ebp),%eax 10c951: 8b 7d c0 mov -0x40(%ebp),%edi 10c954: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10c95b: 8b 4d b8 mov -0x48(%ebp),%ecx 10c95e: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10c965: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10c969: 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 ; 10c96c: 39 75 cc cmp %esi,-0x34(%ebp) 10c96f: 73 19 jae 10c98a <_Objects_Extend_information+0x156> <== ALWAYS TAKEN 10c971: 8b 7d cc mov -0x34(%ebp),%edi 10c974: 8b 45 bc mov -0x44(%ebp),%eax 10c977: 8d 0c b8 lea (%eax,%edi,4),%ecx 10c97a: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10c97c: 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++ ) { 10c982: 40 inc %eax 10c983: 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 ; 10c986: 39 f0 cmp %esi,%eax 10c988: 72 f2 jb 10c97c <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10c98a: 9c pushf 10c98b: fa cli 10c98c: 5f pop %edi old_tables = information->object_blocks; 10c98d: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10c990: 8b 45 c8 mov -0x38(%ebp),%eax 10c993: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10c996: 8b 45 b8 mov -0x48(%ebp),%eax 10c999: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10c99c: 8b 45 bc mov -0x44(%ebp),%eax 10c99f: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10c9a2: 8b 45 d4 mov -0x2c(%ebp),%eax 10c9a5: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10c9a9: 8b 33 mov (%ebx),%esi 10c9ab: c1 e6 18 shl $0x18,%esi 10c9ae: 81 ce 00 00 01 00 or $0x10000,%esi 10c9b4: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10c9b8: c1 e0 1b shl $0x1b,%eax 10c9bb: 09 c6 or %eax,%esi 10c9bd: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10c9c1: 09 c6 or %eax,%esi 10c9c3: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10c9c6: 57 push %edi 10c9c7: 9d popf if ( old_tables ) 10c9c8: 85 c9 test %ecx,%ecx 10c9ca: 74 12 je 10c9de <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10c9cc: 83 ec 0c sub $0xc,%esp 10c9cf: 51 push %ecx 10c9d0: 89 55 b4 mov %edx,-0x4c(%ebp) 10c9d3: e8 80 1c 00 00 call 10e658 <_Workspace_Free> 10c9d8: 83 c4 10 add $0x10,%esp 10c9db: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10c9de: c1 e2 02 shl $0x2,%edx 10c9e1: 89 55 d0 mov %edx,-0x30(%ebp) 10c9e4: 8b 43 34 mov 0x34(%ebx),%eax 10c9e7: 8b 4d c4 mov -0x3c(%ebp),%ecx 10c9ea: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10c9ed: ff 73 18 pushl 0x18(%ebx) 10c9f0: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10c9f4: 52 push %edx 10c9f5: 8b 7d d0 mov -0x30(%ebp),%edi 10c9f8: ff 34 38 pushl (%eax,%edi,1) 10c9fb: 8d 7d dc lea -0x24(%ebp),%edi 10c9fe: 57 push %edi 10c9ff: e8 a4 3f 00 00 call 1109a8 <_Chain_Initialize> <== ALWAYS TAKEN information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca04: 8d 43 20 lea 0x20(%ebx),%eax 10ca07: 89 45 d4 mov %eax,-0x2c(%ebp) 10ca0a: 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 ) { 10ca0d: 83 c4 10 add $0x10,%esp 10ca10: eb 2b jmp 10ca3d <_Objects_Extend_information+0x209> <== ALWAYS TAKEN 10ca12: 66 90 xchg %ax,%ax <== NOT EXECUTED the_object->id = _Objects_Build_id( 10ca14: 8b 13 mov (%ebx),%edx 10ca16: c1 e2 18 shl $0x18,%edx 10ca19: 81 ca 00 00 01 00 or $0x10000,%edx 10ca1f: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10ca23: c1 e1 1b shl $0x1b,%ecx 10ca26: 09 ca or %ecx,%edx 10ca28: 09 f2 or %esi,%edx 10ca2a: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10ca2d: 83 ec 08 sub $0x8,%esp 10ca30: 50 push %eax 10ca31: ff 75 d4 pushl -0x2c(%ebp) 10ca34: e8 3f f4 ff ff call 10be78 <_Chain_Append> <== ALWAYS TAKEN index++; 10ca39: 46 inc %esi 10ca3a: 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 ) { 10ca3d: 83 ec 0c sub $0xc,%esp 10ca40: 57 push %edi 10ca41: e8 56 f4 ff ff call 10be9c <_Chain_Get> <== ALWAYS TAKEN 10ca46: 83 c4 10 add $0x10,%esp 10ca49: 85 c0 test %eax,%eax 10ca4b: 75 c7 jne 10ca14 <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10ca4d: 8b 43 30 mov 0x30(%ebx),%eax 10ca50: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10ca54: 8b 4d d0 mov -0x30(%ebp),%ecx 10ca57: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10ca5a: 8b 43 14 mov 0x14(%ebx),%eax 10ca5d: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10ca61: 8d 65 f4 lea -0xc(%ebp),%esp 10ca64: 5b pop %ebx 10ca65: 5e pop %esi 10ca66: 5f pop %edi 10ca67: c9 leave 10ca68: c3 ret 10ca69: 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 ); 10ca6c: 83 ec 0c sub $0xc,%esp 10ca6f: 57 push %edi 10ca70: 89 55 b4 mov %edx,-0x4c(%ebp) 10ca73: e8 c4 1b 00 00 call 10e63c <_Workspace_Allocate> 10ca78: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10ca7b: 83 c4 10 add $0x10,%esp 10ca7e: 85 c0 test %eax,%eax 10ca80: 8b 55 b4 mov -0x4c(%ebp),%edx 10ca83: 0f 85 4a fe ff ff jne 10c8d3 <_Objects_Extend_information+0x9f> 10ca89: eb d6 jmp 10ca61 <_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, 10ca8b: c1 e6 02 shl $0x2,%esi 10ca8e: 89 75 c0 mov %esi,-0x40(%ebp) 10ca91: 8b 73 34 mov 0x34(%ebx),%esi 10ca94: 8b 7d c8 mov -0x38(%ebp),%edi 10ca97: 8b 4d c0 mov -0x40(%ebp),%ecx 10ca9a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10ca9c: 8b 73 30 mov 0x30(%ebx),%esi 10ca9f: 8b 7d b8 mov -0x48(%ebp),%edi 10caa2: 8b 4d c0 mov -0x40(%ebp),%ecx 10caa5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10caa7: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10caab: 03 45 d0 add -0x30(%ebp),%eax 10caae: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10cab5: 8b 73 1c mov 0x1c(%ebx),%esi 10cab8: 8b 7d bc mov -0x44(%ebp),%edi 10cabb: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10cabd: e9 8c fe ff ff jmp 10c94e <_Objects_Extend_information+0x11a> <== ALWAYS TAKEN 10cac2: 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 ) 10cac4: 8b 53 10 mov 0x10(%ebx),%edx 10cac7: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10cacb: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10cacf: 89 45 cc mov %eax,-0x34(%ebp) 10cad2: 31 d2 xor %edx,%edx 10cad4: 31 f6 xor %esi,%esi 10cad6: e9 c1 fd ff ff jmp 10c89c <_Objects_Extend_information+0x68> <== ALWAYS TAKEN block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10cadb: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10cade: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10cae1: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10cae4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cae6: e9 b1 fd ff ff jmp 10c89c <_Objects_Extend_information+0x68> <== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10caeb: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10caee: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10caf1: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10caf4: 31 d2 xor %edx,%edx <== NOT EXECUTED 10caf6: e9 a1 fd ff ff jmp 10c89c <_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 ); 10cafb: 83 ec 0c sub $0xc,%esp 10cafe: ff 75 c4 pushl -0x3c(%ebp) 10cb01: e8 52 1b 00 00 call 10e658 <_Workspace_Free> return; 10cb06: 83 c4 10 add $0x10,%esp 10cb09: e9 53 ff ff ff jmp 10ca61 <_Objects_Extend_information+0x22d> <== ALWAYS TAKEN 0010cb10 <_Objects_Free>: void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { 10cb10: 55 push %ebp 10cb11: 89 e5 mov %esp,%ebp 10cb13: 57 push %edi 10cb14: 56 push %esi 10cb15: 53 push %ebx 10cb16: 83 ec 14 sub $0x14,%esp 10cb19: 8b 5d 08 mov 0x8(%ebp),%ebx 10cb1c: 8b 75 0c mov 0xc(%ebp),%esi uint32_t allocation_size = information->allocation_size; 10cb1f: 8b 7b 14 mov 0x14(%ebx),%edi _Chain_Append( &information->Inactive, &the_object->Node ); 10cb22: 56 push %esi 10cb23: 8d 43 20 lea 0x20(%ebx),%eax 10cb26: 50 push %eax 10cb27: e8 4c f3 ff ff call 10be78 <_Chain_Append> <== ALWAYS TAKEN if ( information->auto_extend ) { 10cb2c: 83 c4 10 add $0x10,%esp 10cb2f: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cb33: 74 33 je 10cb68 <_Objects_Free+0x58> void _Objects_Free( Objects_Information *information, Objects_Control *the_object ) { uint32_t allocation_size = information->allocation_size; 10cb35: 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 ) - 10cb38: 0f b7 46 08 movzwl 0x8(%esi),%eax 10cb3c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10cb40: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id )); block /= information->allocation_size; information->inactive_per_block[ block ]++; 10cb42: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cb46: 31 d2 xor %edx,%edx 10cb48: f7 f6 div %esi 10cb4a: c1 e0 02 shl $0x2,%eax 10cb4d: 03 43 30 add 0x30(%ebx),%eax 10cb50: ff 00 incl (%eax) information->inactive++; 10cb52: 8b 43 2c mov 0x2c(%ebx),%eax 10cb55: 40 inc %eax 10cb56: 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 ) ) ) { 10cb5a: 0f b7 c0 movzwl %ax,%eax 10cb5d: 89 ca mov %ecx,%edx 10cb5f: d1 ea shr %edx 10cb61: 8d 0c 0a lea (%edx,%ecx,1),%ecx 10cb64: 39 c8 cmp %ecx,%eax 10cb66: 77 08 ja 10cb70 <_Objects_Free+0x60> _Objects_Shrink_information( information ); } } } 10cb68: 8d 65 f4 lea -0xc(%ebp),%esp 10cb6b: 5b pop %ebx 10cb6c: 5e pop %esi 10cb6d: 5f pop %edi 10cb6e: c9 leave 10cb6f: 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 ); 10cb70: 89 5d 08 mov %ebx,0x8(%ebp) } } } 10cb73: 8d 65 f4 lea -0xc(%ebp),%esp 10cb76: 5b pop %ebx 10cb77: 5e pop %esi 10cb78: 5f pop %edi 10cb79: 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 ); 10cb7a: e9 bd 02 00 00 jmp 10ce3c <_Objects_Shrink_information> <== ALWAYS TAKEN 0010cc40 <_Objects_Get>: Objects_Control *_Objects_Get( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 10cc40: 55 push %ebp 10cc41: 89 e5 mov %esp,%ebp 10cc43: 53 push %ebx 10cc44: 83 ec 14 sub $0x14,%esp 10cc47: 8b 55 08 mov 0x8(%ebp),%edx 10cc4a: 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; 10cc4d: b8 01 00 00 00 mov $0x1,%eax 10cc52: 2b 42 08 sub 0x8(%edx),%eax 10cc55: 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 ) { 10cc58: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc5c: 39 c8 cmp %ecx,%eax 10cc5e: 77 24 ja 10cc84 <_Objects_Get+0x44> 10cc60: 8b 0d d8 73 12 00 mov 0x1273d8,%ecx 10cc66: 41 inc %ecx 10cc67: 89 0d d8 73 12 00 mov %ecx,0x1273d8 _Thread_Disable_dispatch(); if ( (the_object = information->local_table[ index ]) != NULL ) { 10cc6d: 8b 52 1c mov 0x1c(%edx),%edx 10cc70: 8b 04 82 mov (%edx,%eax,4),%eax 10cc73: 85 c0 test %eax,%eax 10cc75: 74 1b je 10cc92 <_Objects_Get+0x52> *location = OBJECTS_LOCAL; 10cc77: 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 } 10cc7d: 83 c4 14 add $0x14,%esp 10cc80: 5b pop %ebx 10cc81: c9 leave 10cc82: c3 ret 10cc83: 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; 10cc84: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cc8a: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc8c: 83 c4 14 add $0x14,%esp 10cc8f: 5b pop %ebx 10cc90: c9 leave 10cc91: c3 ret /* * Valid Id for this API, Class and Node but the object has not * been allocated yet. */ _Thread_Enable_dispatch(); 10cc92: 89 45 f4 mov %eax,-0xc(%ebp) 10cc95: e8 1a 08 00 00 call 10d4b4 <_Thread_Enable_dispatch> <== ALWAYS TAKEN *location = OBJECTS_ERROR; 10cc9a: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cca0: 8b 45 f4 mov -0xc(%ebp),%eax 10cca3: eb d8 jmp 10cc7d <_Objects_Get+0x3d> <== ALWAYS TAKEN 0010cba0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10cba0: 55 push %ebp 10cba1: 89 e5 mov %esp,%ebp 10cba3: 56 push %esi 10cba4: 53 push %ebx 10cba5: 8b 75 08 mov 0x8(%ebp),%esi 10cba8: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10cbab: 85 db test %ebx,%ebx 10cbad: 75 09 jne 10cbb8 <_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 ) 10cbaf: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10cbb1: 8d 65 f8 lea -0x8(%ebp),%esp 10cbb4: 5b pop %ebx 10cbb5: 5e pop %esi 10cbb6: c9 leave 10cbb7: 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 ); 10cbb8: 83 ec 0c sub $0xc,%esp 10cbbb: 56 push %esi 10cbbc: e8 af 43 00 00 call 110f70 <_Objects_API_maximum_class> <== ALWAYS TAKEN if ( the_class_api_maximum == 0 ) 10cbc1: 83 c4 10 add $0x10,%esp 10cbc4: 85 c0 test %eax,%eax 10cbc6: 74 e7 je 10cbaf <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10cbc8: 39 c3 cmp %eax,%ebx 10cbca: 77 e3 ja 10cbaf <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10cbcc: 8b 04 b5 ac 73 12 00 mov 0x1273ac(,%esi,4),%eax 10cbd3: 85 c0 test %eax,%eax 10cbd5: 74 d8 je 10cbaf <_Objects_Get_information+0xf> <== ALWAYS TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10cbd7: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10cbda: 85 c0 test %eax,%eax 10cbdc: 74 d3 je 10cbb1 <_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 ) 10cbde: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10cbe3: 75 cc jne 10cbb1 <_Objects_Get_information+0x11> 10cbe5: eb c8 jmp 10cbaf <_Objects_Get_information+0xf> <== ALWAYS TAKEN 0010cb80 <_Objects_Get_information_id>: #include Objects_Information *_Objects_Get_information_id( Objects_Id id ) { 10cb80: 55 push %ebp 10cb81: 89 e5 mov %esp,%ebp 10cb83: 83 ec 10 sub $0x10,%esp 10cb86: 8b 45 08 mov 0x8(%ebp),%eax return _Objects_Get_information( 10cb89: 89 c2 mov %eax,%edx 10cb8b: c1 ea 1b shr $0x1b,%edx 10cb8e: 52 push %edx 10cb8f: c1 e8 18 shr $0x18,%eax 10cb92: 83 e0 07 and $0x7,%eax 10cb95: 50 push %eax 10cb96: e8 05 00 00 00 call 10cba0 <_Objects_Get_information> <== ALWAYS TAKEN _Objects_Get_API( id ), _Objects_Get_class( id ) ); } 10cb9b: c9 leave 10cb9c: c3 ret 0010cbe8 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10cbe8: 55 push %ebp 10cbe9: 89 e5 mov %esp,%ebp 10cbeb: 56 push %esi 10cbec: 53 push %ebx 10cbed: 8b 55 08 mov 0x8(%ebp),%edx 10cbf0: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10cbf3: b8 01 00 00 00 mov $0x1,%eax 10cbf8: 2b 42 08 sub 0x8(%edx),%eax 10cbfb: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10cbfe: 9c pushf 10cbff: fa cli 10cc00: 5e pop %esi if ( information->maximum >= index ) { 10cc01: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10cc05: 39 c8 cmp %ecx,%eax 10cc07: 77 1b ja 10cc24 <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10cc09: 8b 52 1c mov 0x1c(%edx),%edx 10cc0c: 8b 04 82 mov (%edx,%eax,4),%eax 10cc0f: 85 c0 test %eax,%eax 10cc11: 74 21 je 10cc34 <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10cc13: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10cc19: 8b 55 14 mov 0x14(%ebp),%edx 10cc1c: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc1e: 5b pop %ebx 10cc1f: 5e pop %esi 10cc20: c9 leave 10cc21: c3 ret 10cc22: 66 90 xchg %ax,%ax <== NOT EXECUTED } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10cc24: 56 push %esi 10cc25: 9d popf *location = OBJECTS_ERROR; 10cc26: c7 03 01 00 00 00 movl $0x1,(%ebx) 10cc2c: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10cc2e: 5b pop %ebx 10cc2f: 5e pop %esi 10cc30: c9 leave 10cc31: c3 ret 10cc32: 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 ); 10cc34: 56 push %esi 10cc35: 9d popf *location = OBJECTS_ERROR; 10cc36: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10cc3c: eb e0 jmp 10cc1e <_Objects_Get_isr_disable+0x36> <== ALWAYS TAKEN 00118784 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 118784: 55 push %ebp 118785: 89 e5 mov %esp,%ebp 118787: 57 push %edi 118788: 56 push %esi 118789: 53 push %ebx 11878a: 83 ec 2c sub $0x2c,%esp 11878d: 8b 55 08 mov 0x8(%ebp),%edx 118790: 8b 75 0c mov 0xc(%ebp),%esi 118793: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 118796: 85 f6 test %esi,%esi 118798: 75 0e jne 1187a8 <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 11879a: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 11879c: 89 d8 mov %ebx,%eax 11879e: 8d 65 f4 lea -0xc(%ebp),%esp 1187a1: 5b pop %ebx 1187a2: 5e pop %esi 1187a3: 5f pop %edi 1187a4: c9 leave 1187a5: c3 ret 1187a6: 66 90 xchg %ax,%ax <== NOT EXECUTED Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 1187a8: 85 db test %ebx,%ebx 1187aa: 74 f0 je 11879c <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1187ac: 85 d2 test %edx,%edx 1187ae: 75 08 jne 1187b8 <_Objects_Get_name_as_string+0x34> 1187b0: a1 b8 50 13 00 mov 0x1350b8,%eax 1187b5: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 1187b8: 83 ec 0c sub $0xc,%esp 1187bb: 52 push %edx 1187bc: 89 55 cc mov %edx,-0x34(%ebp) 1187bf: e8 bc 90 ff ff call 111880 <_Objects_Get_information_id> <== ALWAYS TAKEN 1187c4: 89 c7 mov %eax,%edi if ( !information ) 1187c6: 83 c4 10 add $0x10,%esp 1187c9: 85 c0 test %eax,%eax 1187cb: 8b 55 cc mov -0x34(%ebp),%edx 1187ce: 74 ca je 11879a <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 1187d0: 51 push %ecx 1187d1: 8d 45 e4 lea -0x1c(%ebp),%eax 1187d4: 50 push %eax 1187d5: 52 push %edx 1187d6: 57 push %edi 1187d7: e8 64 91 ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN switch ( location ) { 1187dc: 83 c4 10 add $0x10,%esp 1187df: 8b 55 e4 mov -0x1c(%ebp),%edx 1187e2: 85 d2 test %edx,%edx 1187e4: 75 b4 jne 11879a <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 1187e6: 80 7f 38 00 cmpb $0x0,0x38(%edi) 1187ea: 74 4e je 11883a <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 1187ec: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 1187ef: 85 ff test %edi,%edi 1187f1: 74 6e je 118861 <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1187f3: 4e dec %esi 1187f4: 89 75 d4 mov %esi,-0x2c(%ebp) 1187f7: 74 68 je 118861 <_Objects_Get_name_as_string+0xdd> <== ALWAYS TAKEN 1187f9: 8a 07 mov (%edi),%al 1187fb: 84 c0 test %al,%al 1187fd: 74 62 je 118861 <_Objects_Get_name_as_string+0xdd> 1187ff: 89 d9 mov %ebx,%ecx 118801: 31 d2 xor %edx,%edx 118803: 89 5d d0 mov %ebx,-0x30(%ebp) 118806: eb 07 jmp 11880f <_Objects_Get_name_as_string+0x8b> <== ALWAYS TAKEN 118808: 8a 04 17 mov (%edi,%edx,1),%al 11880b: 84 c0 test %al,%al 11880d: 74 1b je 11882a <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 11880f: 0f b6 d8 movzbl %al,%ebx 118812: 8b 35 f8 25 13 00 mov 0x1325f8,%esi 118818: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 11881d: 75 02 jne 118821 <_Objects_Get_name_as_string+0x9d> 11881f: b0 2a mov $0x2a,%al 118821: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 118823: 42 inc %edx 118824: 41 inc %ecx 118825: 3b 55 d4 cmp -0x2c(%ebp),%edx 118828: 72 de jb 118808 <_Objects_Get_name_as_string+0x84> 11882a: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 11882d: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 118830: e8 ef 99 ff ff call 112224 <_Thread_Enable_dispatch> <== ALWAYS TAKEN return name; 118835: e9 62 ff ff ff jmp 11879c <_Objects_Get_name_as_string+0x18> <== ALWAYS TAKEN if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 11883a: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 11883d: 89 c2 mov %eax,%edx 11883f: c1 ea 18 shr $0x18,%edx 118842: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 118845: 89 c2 mov %eax,%edx 118847: c1 ea 10 shr $0x10,%edx 11884a: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 11884d: 89 c2 mov %eax,%edx 11884f: c1 ea 08 shr $0x8,%edx 118852: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 118855: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 118858: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 11885c: 8d 7d df lea -0x21(%ebp),%edi 11885f: eb 92 jmp 1187f3 <_Objects_Get_name_as_string+0x6f> <== ALWAYS TAKEN s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 118861: 89 d9 mov %ebx,%ecx 118863: eb c8 jmp 11882d <_Objects_Get_name_as_string+0xa9> <== ALWAYS TAKEN 0011b314 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 11b314: 55 push %ebp 11b315: 89 e5 mov %esp,%ebp 11b317: 57 push %edi 11b318: 56 push %esi 11b319: 53 push %ebx 11b31a: 83 ec 0c sub $0xc,%esp 11b31d: 8b 5d 08 mov 0x8(%ebp),%ebx 11b320: 8b 75 0c mov 0xc(%ebp),%esi 11b323: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 11b326: 85 db test %ebx,%ebx 11b328: 75 0a jne 11b334 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 11b32a: 31 c0 xor %eax,%eax } 11b32c: 8d 65 f4 lea -0xc(%ebp),%esp 11b32f: 5b pop %ebx 11b330: 5e pop %esi 11b331: 5f pop %edi 11b332: c9 leave 11b333: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 11b334: 85 ff test %edi,%edi 11b336: 74 f2 je 11b32a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 11b338: 8b 45 14 mov 0x14(%ebp),%eax 11b33b: 85 c0 test %eax,%eax 11b33d: 74 eb je 11b32a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 11b33f: 66 85 f6 test %si,%si 11b342: 75 04 jne 11b348 <_Objects_Get_next+0x34> next_id = information->minimum_id; 11b344: 8b 73 08 mov 0x8(%ebx),%esi 11b347: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 11b348: 66 39 73 10 cmp %si,0x10(%ebx) 11b34c: 72 22 jb 11b370 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 11b34e: 51 push %ecx 11b34f: 57 push %edi 11b350: 56 push %esi 11b351: 53 push %ebx 11b352: e8 e9 65 ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN next_id++; 11b357: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 11b358: 83 c4 10 add $0x10,%esp 11b35b: 8b 17 mov (%edi),%edx 11b35d: 85 d2 test %edx,%edx 11b35f: 75 e7 jne 11b348 <_Objects_Get_next+0x34> *next_id_p = next_id; 11b361: 8b 55 14 mov 0x14(%ebp),%edx 11b364: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 11b366: 8d 65 f4 lea -0xc(%ebp),%esp 11b369: 5b pop %ebx 11b36a: 5e pop %esi 11b36b: 5f pop %edi 11b36c: c9 leave 11b36d: c3 ret 11b36e: 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; 11b370: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 11b376: 8b 45 14 mov 0x14(%ebp),%eax 11b379: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 11b37f: 31 c0 xor %eax,%eax return 0; 11b381: eb a9 jmp 11b32c <_Objects_Get_next+0x18> <== ALWAYS TAKEN 0011ac1c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11ac1c: 55 push %ebp 11ac1d: 89 e5 mov %esp,%ebp 11ac1f: 53 push %ebx 11ac20: 8b 55 08 mov 0x8(%ebp),%edx 11ac23: 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; 11ac26: b8 01 00 00 00 mov $0x1,%eax 11ac2b: 2b 42 08 sub 0x8(%edx),%eax 11ac2e: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11ac31: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11ac35: 39 c8 cmp %ecx,%eax 11ac37: 77 13 ja 11ac4c <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11ac39: 8b 52 1c mov 0x1c(%edx),%edx 11ac3c: 8b 04 82 mov (%edx,%eax,4),%eax 11ac3f: 85 c0 test %eax,%eax 11ac41: 74 09 je 11ac4c <_Objects_Get_no_protection+0x30> <== ALWAYS TAKEN *location = OBJECTS_LOCAL; 11ac43: 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; } 11ac49: 5b pop %ebx 11ac4a: c9 leave 11ac4b: 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; 11ac4c: c7 03 01 00 00 00 movl $0x1,(%ebx) 11ac52: 31 c0 xor %eax,%eax return NULL; } 11ac54: 5b pop %ebx 11ac55: c9 leave 11ac56: c3 ret 001119a8 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 1119a8: 55 push %ebp 1119a9: 89 e5 mov %esp,%ebp 1119ab: 83 ec 18 sub $0x18,%esp 1119ae: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 1119b1: 85 d2 test %edx,%edx 1119b3: 75 08 jne 1119bd <_Objects_Id_to_name+0x15> 1119b5: a1 b8 50 13 00 mov 0x1350b8,%eax 1119ba: 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); 1119bd: 89 d0 mov %edx,%eax 1119bf: c1 e8 18 shr $0x18,%eax 1119c2: 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 ) 1119c5: 8d 48 ff lea -0x1(%eax),%ecx 1119c8: 83 f9 03 cmp $0x3,%ecx 1119cb: 77 1d ja 1119ea <_Objects_Id_to_name+0x42> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 1119cd: 8b 04 85 cc 4f 13 00 mov 0x134fcc(,%eax,4),%eax 1119d4: 85 c0 test %eax,%eax 1119d6: 74 12 je 1119ea <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 1119d8: 89 d1 mov %edx,%ecx 1119da: c1 e9 1b shr $0x1b,%ecx 1119dd: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 1119e0: 85 c0 test %eax,%eax 1119e2: 74 06 je 1119ea <_Objects_Id_to_name+0x42> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 1119e4: 80 78 38 00 cmpb $0x0,0x38(%eax) 1119e8: 74 0a je 1119f4 <_Objects_Id_to_name+0x4c> <== NEVER TAKEN if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 1119ea: b8 03 00 00 00 mov $0x3,%eax } 1119ef: c9 leave 1119f0: c3 ret 1119f1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #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 ); 1119f4: 51 push %ecx 1119f5: 8d 4d f4 lea -0xc(%ebp),%ecx 1119f8: 51 push %ecx 1119f9: 52 push %edx 1119fa: 50 push %eax 1119fb: e8 40 ff ff ff call 111940 <_Objects_Get> <== ALWAYS TAKEN if ( !the_object ) 111a00: 83 c4 10 add $0x10,%esp 111a03: 85 c0 test %eax,%eax 111a05: 74 e3 je 1119ea <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 111a07: 8b 50 0c mov 0xc(%eax),%edx 111a0a: 8b 45 0c mov 0xc(%ebp),%eax 111a0d: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 111a0f: e8 10 08 00 00 call 112224 <_Thread_Enable_dispatch> 111a14: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 111a16: c9 leave 111a17: c3 ret 0010cca8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10cca8: 55 push %ebp 10cca9: 89 e5 mov %esp,%ebp 10ccab: 57 push %edi 10ccac: 56 push %esi 10ccad: 53 push %ebx 10ccae: 83 ec 0c sub $0xc,%esp 10ccb1: 8b 45 08 mov 0x8(%ebp),%eax 10ccb4: 8b 55 0c mov 0xc(%ebp),%edx 10ccb7: 8b 5d 10 mov 0x10(%ebp),%ebx 10ccba: 8b 75 20 mov 0x20(%ebp),%esi 10ccbd: 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; 10ccc1: 89 10 mov %edx,(%eax) information->the_class = the_class; 10ccc3: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10ccc7: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10ccca: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10ccd1: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10ccd8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10ccdf: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10cce5: 8b 7d 1c mov 0x1c(%ebp),%edi 10cce8: 89 f9 mov %edi,%ecx 10ccea: 88 48 38 mov %cl,0x38(%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; 10cced: 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; 10ccf3: 8b 3c 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edi 10ccfa: 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; 10ccfd: 8b 7d 14 mov 0x14(%ebp),%edi 10cd00: 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 = 10cd03: 89 f9 mov %edi,%ecx 10cd05: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10cd08: 8b 4d 14 mov 0x14(%ebp),%ecx 10cd0b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10cd11: 85 ff test %edi,%edi 10cd13: 74 04 je 10cd19 <_Objects_Initialize_information+0x71> 10cd15: 85 c9 test %ecx,%ecx 10cd17: 74 6a je 10cd83 <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10cd19: 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; 10cd1d: c7 40 1c 04 70 12 00 movl $0x127004,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10cd24: c1 e2 18 shl $0x18,%edx 10cd27: 81 ca 00 00 01 00 or $0x10000,%edx 10cd2d: c1 e3 1b shl $0x1b,%ebx 10cd30: 09 da or %ebx,%edx 10cd32: 31 db xor %ebx,%ebx 10cd34: 85 c9 test %ecx,%ecx 10cd36: 0f 95 c3 setne %bl 10cd39: 09 da or %ebx,%edx 10cd3b: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10cd3e: f7 c6 03 00 00 00 test $0x3,%esi 10cd44: 75 26 jne 10cd6c <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10cd46: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10cd4a: 8d 50 24 lea 0x24(%eax),%edx 10cd4d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10cd50: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10cd57: 8d 50 20 lea 0x20(%eax),%edx 10cd5a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10cd5d: 85 c9 test %ecx,%ecx 10cd5f: 75 13 jne 10cd74 <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cd61: 8d 65 f4 lea -0xc(%ebp),%esp 10cd64: 5b pop %ebx 10cd65: 5e pop %esi 10cd66: 5f pop %edi 10cd67: c9 leave 10cd68: c3 ret 10cd69: 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) & 10cd6c: 83 c6 04 add $0x4,%esi 10cd6f: 83 e6 fc and $0xfffffffc,%esi 10cd72: eb d2 jmp 10cd46 <_Objects_Initialize_information+0x9e> <== ALWAYS TAKEN /* * 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 ); 10cd74: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10cd77: 8d 65 f4 lea -0xc(%ebp),%esp 10cd7a: 5b pop %ebx 10cd7b: 5e pop %esi 10cd7c: 5f pop %edi 10cd7d: 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 ); 10cd7e: e9 b1 fa ff ff jmp 10c834 <_Objects_Extend_information> <== ALWAYS TAKEN /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10cd83: 50 push %eax 10cd84: 6a 14 push $0x14 10cd86: 6a 01 push $0x1 10cd88: 6a 00 push $0x0 10cd8a: e8 69 f9 ff ff call 10c6f8 <_Internal_error_Occurred> <== ALWAYS TAKEN 00117088 <_Objects_Name_to_id_string>: Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string( Objects_Information *information, const char *name, Objects_Id *id ) { 117088: 55 push %ebp 117089: 89 e5 mov %esp,%ebp 11708b: 57 push %edi 11708c: 56 push %esi 11708d: 53 push %ebx 11708e: 83 ec 1c sub $0x1c,%esp 117091: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117094: 8b 5d 10 mov 0x10(%ebp),%ebx 117097: 85 db test %ebx,%ebx 117099: 74 75 je 117110 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 11709b: 8b 4d 0c mov 0xc(%ebp),%ecx 11709e: 85 c9 test %ecx,%ecx 1170a0: 74 4b je 1170ed <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 1170a2: 8b 47 10 mov 0x10(%edi),%eax 1170a5: 66 85 c0 test %ax,%ax 1170a8: 74 43 je 1170ed <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1170aa: 0f b7 c0 movzwl %ax,%eax 1170ad: 89 45 e4 mov %eax,-0x1c(%ebp) 1170b0: 8b 47 1c mov 0x1c(%edi),%eax 1170b3: bb 01 00 00 00 mov $0x1,%ebx 1170b8: 89 7d e0 mov %edi,-0x20(%ebp) 1170bb: 89 c7 mov %eax,%edi 1170bd: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 1170c0: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1170c3: 85 f6 test %esi,%esi 1170c5: 74 20 je 1170e7 <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 1170c7: 8b 46 0c mov 0xc(%esi),%eax 1170ca: 85 c0 test %eax,%eax 1170cc: 74 19 je 1170e7 <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1170ce: 52 push %edx 1170cf: 8b 4d e0 mov -0x20(%ebp),%ecx 1170d2: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 1170d6: 52 push %edx 1170d7: 50 push %eax 1170d8: ff 75 0c pushl 0xc(%ebp) 1170db: e8 a0 39 00 00 call 11aa80 1170e0: 83 c4 10 add $0x10,%esp 1170e3: 85 c0 test %eax,%eax 1170e5: 74 15 je 1170fc <_Objects_Name_to_id_string+0x74> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1170e7: 43 inc %ebx 1170e8: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1170eb: 76 d3 jbe 1170c0 <_Objects_Name_to_id_string+0x38> 1170ed: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 1170f2: 8d 65 f4 lea -0xc(%ebp),%esp 1170f5: 5b pop %ebx 1170f6: 5e pop %esi 1170f7: 5f pop %edi 1170f8: c9 leave 1170f9: c3 ret 1170fa: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 1170fc: 8b 46 08 mov 0x8(%esi),%eax 1170ff: 8b 55 10 mov 0x10(%ebp),%edx 117102: 89 02 mov %eax,(%edx) 117104: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 117106: 8d 65 f4 lea -0xc(%ebp),%esp 117109: 5b pop %ebx 11710a: 5e pop %esi 11710b: 5f pop %edi 11710c: c9 leave 11710d: c3 ret 11710e: 66 90 xchg %ax,%ax <== NOT EXECUTED uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 117110: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 117115: 8d 65 f4 lea -0xc(%ebp),%esp 117118: 5b pop %ebx 117119: 5e pop %esi 11711a: 5f pop %edi 11711b: c9 leave 11711c: c3 ret 0010cdc4 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10cdc4: 55 push %ebp 10cdc5: 89 e5 mov %esp,%ebp 10cdc7: 57 push %edi 10cdc8: 56 push %esi 10cdc9: 53 push %ebx 10cdca: 8b 45 08 mov 0x8(%ebp),%eax 10cdcd: 8b 4d 0c mov 0xc(%ebp),%ecx 10cdd0: 8b 55 10 mov 0x10(%ebp),%edx 10cdd3: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10cdd6: 85 ff test %edi,%edi 10cdd8: 74 56 je 10ce30 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10cdda: 85 c9 test %ecx,%ecx 10cddc: 74 08 je 10cde6 <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cdde: 8b 70 10 mov 0x10(%eax),%esi 10cde1: 66 85 f6 test %si,%si 10cde4: 75 0a jne 10cdf0 <_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++ ) { 10cde6: 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 } 10cdeb: 5b pop %ebx 10cdec: 5e pop %esi 10cded: 5f pop %edi 10cdee: c9 leave 10cdef: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10cdf0: 85 d2 test %edx,%edx 10cdf2: 75 20 jne 10ce14 <_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++ ) { 10cdf4: 0f b7 f6 movzwl %si,%esi 10cdf7: 8b 58 1c mov 0x1c(%eax),%ebx 10cdfa: b8 01 00 00 00 mov $0x1,%eax 10cdff: 90 nop the_object = information->local_table[ index ]; 10ce00: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10ce03: 85 d2 test %edx,%edx 10ce05: 74 05 je 10ce0c <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10ce07: 39 4a 0c cmp %ecx,0xc(%edx) 10ce0a: 74 18 je 10ce24 <_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++ ) { 10ce0c: 40 inc %eax 10ce0d: 39 c6 cmp %eax,%esi 10ce0f: 73 ef jae 10ce00 <_Objects_Name_to_id_u32+0x3c> 10ce11: eb d3 jmp 10cde6 <_Objects_Name_to_id_u32+0x22> <== ALWAYS TAKEN 10ce13: 90 nop <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10ce14: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10ce1a: 74 d8 je 10cdf4 <_Objects_Name_to_id_u32+0x30> 10ce1c: 4a dec %edx 10ce1d: 75 c7 jne 10cde6 <_Objects_Name_to_id_u32+0x22> 10ce1f: eb d3 jmp 10cdf4 <_Objects_Name_to_id_u32+0x30> <== ALWAYS TAKEN 10ce21: 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; 10ce24: 8b 42 08 mov 0x8(%edx),%eax 10ce27: 89 07 mov %eax,(%edi) 10ce29: 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 } 10ce2b: 5b pop %ebx 10ce2c: 5e pop %esi 10ce2d: 5f pop %edi 10ce2e: c9 leave 10ce2f: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10ce30: 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 } 10ce35: 5b pop %ebx 10ce36: 5e pop %esi 10ce37: 5f pop %edi 10ce38: c9 leave 10ce39: c3 ret 0010d484 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10d484: 55 push %ebp 10d485: 89 e5 mov %esp,%ebp 10d487: 57 push %edi 10d488: 56 push %esi 10d489: 53 push %ebx 10d48a: 83 ec 14 sub $0x14,%esp 10d48d: 8b 7d 08 mov 0x8(%ebp),%edi 10d490: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10d493: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10d497: 50 push %eax 10d498: 53 push %ebx 10d499: e8 de 7d 00 00 call 11527c 10d49e: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10d4a0: 83 c4 10 add $0x10,%esp 10d4a3: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10d4a7: 75 53 jne 10d4fc <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d4a9: 0f be 13 movsbl (%ebx),%edx 10d4ac: c1 e2 18 shl $0x18,%edx 10d4af: 83 f8 01 cmp $0x1,%eax 10d4b2: 76 34 jbe 10d4e8 <_Objects_Set_name+0x64> 10d4b4: 0f be 43 01 movsbl 0x1(%ebx),%eax 10d4b8: c1 e0 10 shl $0x10,%eax 10d4bb: 09 d0 or %edx,%eax 10d4bd: 83 fe 02 cmp $0x2,%esi 10d4c0: 74 2d je 10d4ef <_Objects_Set_name+0x6b> 10d4c2: 0f be 53 02 movsbl 0x2(%ebx),%edx 10d4c6: c1 e2 08 shl $0x8,%edx 10d4c9: 09 c2 or %eax,%edx 10d4cb: 83 fe 03 cmp $0x3,%esi 10d4ce: 74 24 je 10d4f4 <_Objects_Set_name+0x70> 10d4d0: 0f be 43 03 movsbl 0x3(%ebx),%eax 10d4d4: 09 c2 or %eax,%edx 10d4d6: 8b 45 0c mov 0xc(%ebp),%eax 10d4d9: 89 50 0c mov %edx,0xc(%eax) 10d4dc: b0 01 mov $0x1,%al ); } return true; } 10d4de: 8d 65 f4 lea -0xc(%ebp),%esp 10d4e1: 5b pop %ebx 10d4e2: 5e pop %esi 10d4e3: 5f pop %edi 10d4e4: c9 leave 10d4e5: c3 ret 10d4e6: 66 90 xchg %ax,%ax <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10d4e8: 89 d0 mov %edx,%eax 10d4ea: 0d 00 00 20 00 or $0x200000,%eax 10d4ef: 89 c2 mov %eax,%edx 10d4f1: 80 ce 20 or $0x20,%dh 10d4f4: b8 20 00 00 00 mov $0x20,%eax 10d4f9: eb d9 jmp 10d4d4 <_Objects_Set_name+0x50> <== ALWAYS TAKEN 10d4fb: 90 nop <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10d4fc: 83 ec 0c sub $0xc,%esp 10d4ff: 8d 40 01 lea 0x1(%eax),%eax 10d502: 50 push %eax 10d503: e8 50 18 00 00 call 10ed58 <_Workspace_Allocate> 10d508: 89 c7 mov %eax,%edi if ( !d ) 10d50a: 83 c4 10 add $0x10,%esp 10d50d: 85 c0 test %eax,%eax 10d50f: 74 43 je 10d554 <_Objects_Set_name+0xd0> <== ALWAYS TAKEN return false; if ( the_object->name.name_p ) { 10d511: 8b 55 0c mov 0xc(%ebp),%edx 10d514: 8b 42 0c mov 0xc(%edx),%eax 10d517: 85 c0 test %eax,%eax 10d519: 74 16 je 10d531 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10d51b: 83 ec 0c sub $0xc,%esp 10d51e: 50 push %eax 10d51f: e8 50 18 00 00 call 10ed74 <_Workspace_Free> the_object->name.name_p = NULL; 10d524: 8b 45 0c mov 0xc(%ebp),%eax 10d527: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10d52e: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10d531: 50 push %eax 10d532: 56 push %esi 10d533: 53 push %ebx 10d534: 57 push %edi 10d535: e8 c6 7c 00 00 call 115200 d[length] = '\0'; 10d53a: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10d53e: 8b 55 0c mov 0xc(%ebp),%edx 10d541: 89 7a 0c mov %edi,0xc(%edx) 10d544: b0 01 mov $0x1,%al 10d546: 83 c4 10 add $0x10,%esp ); } return true; } 10d549: 8d 65 f4 lea -0xc(%ebp),%esp 10d54c: 5b pop %ebx 10d54d: 5e pop %esi 10d54e: 5f pop %edi 10d54f: c9 leave 10d550: c3 ret 10d551: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 10d554: 31 c0 xor %eax,%eax <== NOT EXECUTED 10d556: eb 86 jmp 10d4de <_Objects_Set_name+0x5a> <== NOT EXECUTED 0010ce3c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10ce3c: 55 push %ebp 10ce3d: 89 e5 mov %esp,%ebp 10ce3f: 57 push %edi 10ce40: 56 push %esi 10ce41: 53 push %ebx 10ce42: 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 ); 10ce45: 8b 45 08 mov 0x8(%ebp),%eax 10ce48: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10ce4c: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10ce50: 0f b7 40 10 movzwl 0x10(%eax),%eax 10ce54: 29 d8 sub %ebx,%eax 10ce56: 31 d2 xor %edx,%edx 10ce58: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10ce5a: 85 c0 test %eax,%eax 10ce5c: 74 21 je 10ce7f <_Objects_Shrink_information+0x43> <== ALWAYS TAKEN if ( information->inactive_per_block[ block ] == 10ce5e: 8b 55 08 mov 0x8(%ebp),%edx 10ce61: 8b 7a 30 mov 0x30(%edx),%edi 10ce64: 3b 0f cmp (%edi),%ecx 10ce66: 74 1f je 10ce87 <_Objects_Shrink_information+0x4b> <== ALWAYS TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10ce68: 31 d2 xor %edx,%edx 10ce6a: eb 0e jmp 10ce7a <_Objects_Shrink_information+0x3e> <== ALWAYS TAKEN } index_base += information->allocation_size; 10ce6c: 01 cb add %ecx,%ebx 10ce6e: 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 ] == 10ce75: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10ce78: 74 12 je 10ce8c <_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++ ) { 10ce7a: 42 inc %edx 10ce7b: 39 d0 cmp %edx,%eax 10ce7d: 77 ed ja 10ce6c <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10ce7f: 8d 65 f4 lea -0xc(%ebp),%esp 10ce82: 5b pop %ebx 10ce83: 5e pop %esi 10ce84: 5f pop %edi 10ce85: c9 leave 10ce86: 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 ] == 10ce87: 31 f6 xor %esi,%esi <== NOT EXECUTED 10ce89: 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; 10ce8c: 8b 55 08 mov 0x8(%ebp),%edx 10ce8f: 8b 42 20 mov 0x20(%edx),%eax 10ce92: 89 75 e4 mov %esi,-0x1c(%ebp) 10ce95: eb 07 jmp 10ce9e <_Objects_Shrink_information+0x62> <== ALWAYS TAKEN 10ce97: 90 nop <== NOT EXECUTED if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10ce98: 85 ff test %edi,%edi 10ce9a: 74 2c je 10cec8 <_Objects_Shrink_information+0x8c> 10ce9c: 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 ); 10ce9e: 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; 10cea2: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10cea4: 39 da cmp %ebx,%edx 10cea6: 72 f0 jb 10ce98 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10cea8: 8b 75 08 mov 0x8(%ebp),%esi 10ceab: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10ceaf: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10ceb2: 39 ca cmp %ecx,%edx 10ceb4: 73 e2 jae 10ce98 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10ceb6: 83 ec 0c sub $0xc,%esp 10ceb9: 50 push %eax 10ceba: e8 d1 3a 00 00 call 110990 <_Chain_Extract> 10cebf: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10cec2: 85 ff test %edi,%edi 10cec4: 75 d6 jne 10ce9c <_Objects_Shrink_information+0x60> 10cec6: 66 90 xchg %ax,%ax 10cec8: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10cecb: 83 ec 0c sub $0xc,%esp 10cece: 8b 55 08 mov 0x8(%ebp),%edx 10ced1: 8b 42 34 mov 0x34(%edx),%eax 10ced4: ff 34 30 pushl (%eax,%esi,1) 10ced7: e8 7c 17 00 00 call 10e658 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10cedc: 8b 55 08 mov 0x8(%ebp),%edx 10cedf: 8b 42 34 mov 0x34(%edx),%eax 10cee2: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10cee9: 8b 42 30 mov 0x30(%edx),%eax 10ceec: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10cef3: 8b 42 14 mov 0x14(%edx),%eax 10cef6: 66 29 42 2c sub %ax,0x2c(%edx) return; 10cefa: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10cefd: 8d 65 f4 lea -0xc(%ebp),%esp 10cf00: 5b pop %ebx 10cf01: 5e pop %esi 10cf02: 5f pop %edi 10cf03: c9 leave 10cf04: c3 ret 0010d428 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10d428: 55 push %ebp 10d429: 89 e5 mov %esp,%ebp 10d42b: 57 push %edi 10d42c: 56 push %esi 10d42d: 53 push %ebx 10d42e: 83 ec 38 sub $0x38,%esp 10d431: 8b 5d 08 mov 0x8(%ebp),%ebx 10d434: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10d437: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10d43d: 53 push %ebx 10d43e: e8 f1 3b 00 00 call 111034 <_Timespec_Is_valid> 10d443: 83 c4 10 add $0x10,%esp 10d446: 84 c0 test %al,%al 10d448: 75 0a jne 10d454 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10d44a: 31 c0 xor %eax,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d44c: 8d 65 f4 lea -0xc(%ebp),%esp 10d44f: 5b pop %ebx 10d450: 5e pop %esi 10d451: 5f pop %edi 10d452: c9 leave 10d453: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10d454: 83 ec 0c sub $0xc,%esp 10d457: 8d 7d e0 lea -0x20(%ebp),%edi 10d45a: 57 push %edi 10d45b: e8 04 1d 00 00 call 10f164 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10d460: 5a pop %edx 10d461: 59 pop %ecx 10d462: 57 push %edi 10d463: 53 push %ebx 10d464: e8 f3 3b 00 00 call 11105c <_Timespec_Less_than> 10d469: 83 c4 10 add $0x10,%esp 10d46c: 84 c0 test %al,%al 10d46e: 74 10 je 10d480 <_POSIX_Absolute_timeout_to_ticks+0x58> 10d470: b8 01 00 00 00 mov $0x1,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d475: 8d 65 f4 lea -0xc(%ebp),%esp 10d478: 5b pop %ebx 10d479: 5e pop %esi 10d47a: 5f pop %edi 10d47b: c9 leave 10d47c: c3 ret 10d47d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); 10d480: 50 push %eax 10d481: 8d 45 d8 lea -0x28(%ebp),%eax 10d484: 50 push %eax 10d485: 53 push %ebx 10d486: 57 push %edi 10d487: 89 45 d4 mov %eax,-0x2c(%ebp) 10d48a: e8 f1 3b 00 00 call 111080 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10d48f: 8b 45 d4 mov -0x2c(%ebp),%eax 10d492: 89 04 24 mov %eax,(%esp) 10d495: e8 22 3c 00 00 call 1110bc <_Timespec_To_ticks> 10d49a: 89 06 mov %eax,(%esi) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) 10d49c: 83 c4 10 add $0x10,%esp 10d49f: 83 f8 01 cmp $0x1,%eax 10d4a2: 19 c0 sbb %eax,%eax 10d4a4: 83 c0 03 add $0x3,%eax /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } 10d4a7: 8d 65 f4 lea -0xc(%ebp),%esp 10d4aa: 5b pop %ebx 10d4ab: 5e pop %esi 10d4ac: 5f pop %edi 10d4ad: c9 leave 10d4ae: c3 ret 0010bf80 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10bf80: 55 push %ebp 10bf81: 89 e5 mov %esp,%ebp 10bf83: 56 push %esi 10bf84: 53 push %ebx 10bf85: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf88: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10bf8b: 85 db test %ebx,%ebx 10bf8d: 74 39 je 10bfc8 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10bf8f: 8b 03 mov (%ebx),%eax 10bf91: 83 f8 ff cmp $0xffffffff,%eax 10bf94: 74 1a je 10bfb0 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10bf96: 52 push %edx 10bf97: 56 push %esi 10bf98: 50 push %eax 10bf99: 68 e0 a1 12 00 push $0x12a1e0 10bf9e: e8 d9 2a 00 00 call 10ea7c <_Objects_Get> 10bfa3: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10bfa6: 8d 65 f8 lea -0x8(%ebp),%esp 10bfa9: 5b pop %ebx 10bfaa: 5e pop %esi 10bfab: c9 leave 10bfac: c3 ret 10bfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10bfb0: 83 ec 08 sub $0x8,%esp 10bfb3: 6a 00 push $0x0 10bfb5: 53 push %ebx 10bfb6: e8 19 00 00 00 call 10bfd4 <== ALWAYS TAKEN if ( status ) { 10bfbb: 83 c4 10 add $0x10,%esp 10bfbe: 85 c0 test %eax,%eax 10bfc0: 75 06 jne 10bfc8 <_POSIX_Condition_variables_Get+0x48> 10bfc2: 8b 03 mov (%ebx),%eax 10bfc4: eb d0 jmp 10bf96 <_POSIX_Condition_variables_Get+0x16> <== ALWAYS TAKEN 10bfc6: 66 90 xchg %ax,%ax <== NOT EXECUTED *location = OBJECTS_ERROR; 10bfc8: c7 06 01 00 00 00 movl $0x1,(%esi) 10bfce: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10bfd0: eb d4 jmp 10bfa6 <_POSIX_Condition_variables_Get+0x26> <== ALWAYS TAKEN 0010c09c <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c09c: 55 push %ebp 10c09d: 89 e5 mov %esp,%ebp 10c09f: 57 push %edi 10c0a0: 56 push %esi 10c0a1: 53 push %ebx 10c0a2: 83 ec 24 sub $0x24,%esp 10c0a5: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c0a8: 8d 45 e4 lea -0x1c(%ebp),%eax 10c0ab: 50 push %eax 10c0ac: ff 75 08 pushl 0x8(%ebp) 10c0af: e8 cc fe ff ff call 10bf80 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10c0b4: 89 c7 mov %eax,%edi switch ( location ) { 10c0b6: 83 c4 10 add $0x10,%esp 10c0b9: 8b 45 e4 mov -0x1c(%ebp),%eax 10c0bc: 85 c0 test %eax,%eax 10c0be: 74 10 je 10c0d0 <_POSIX_Condition_variables_Signal_support+0x34> 10c0c0: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c0c5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0c8: 5b pop %ebx 10c0c9: 5e pop %esi 10c0ca: 5f pop %edi 10c0cb: c9 leave 10c0cc: c3 ret 10c0cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c0d0: 8d 77 18 lea 0x18(%edi),%esi 10c0d3: eb 0b jmp 10c0e0 <_POSIX_Condition_variables_Signal_support+0x44> <== ALWAYS TAKEN 10c0d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c0d8: 84 db test %bl,%bl 10c0da: 74 20 je 10c0fc <_POSIX_Condition_variables_Signal_support+0x60> 10c0dc: 85 c0 test %eax,%eax 10c0de: 74 1c je 10c0fc <_POSIX_Condition_variables_Signal_support+0x60> the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c0e0: 83 ec 0c sub $0xc,%esp 10c0e3: 56 push %esi 10c0e4: e8 fb 35 00 00 call 10f6e4 <_Thread_queue_Dequeue> if ( !the_thread ) 10c0e9: 83 c4 10 add $0x10,%esp 10c0ec: 85 c0 test %eax,%eax 10c0ee: 75 e8 jne 10c0d8 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c0f0: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c0f7: 84 db test %bl,%bl 10c0f9: 75 e1 jne 10c0dc <_POSIX_Condition_variables_Signal_support+0x40> 10c0fb: 90 nop _Thread_Enable_dispatch(); 10c0fc: e8 ef 31 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c101: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c103: 8d 65 f4 lea -0xc(%ebp),%esp 10c106: 5b pop %ebx 10c107: 5e pop %esi 10c108: 5f pop %edi 10c109: c9 leave 10c10a: c3 ret 0010c164 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c164: 55 push %ebp 10c165: 89 e5 mov %esp,%ebp 10c167: 57 push %edi 10c168: 56 push %esi 10c169: 53 push %ebx 10c16a: 83 ec 34 sub $0x34,%esp 10c16d: 8b 7d 08 mov 0x8(%ebp),%edi 10c170: 8b 5d 0c mov 0xc(%ebp),%ebx 10c173: 8a 45 14 mov 0x14(%ebp),%al 10c176: 88 45 d7 mov %al,-0x29(%ebp) register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 10c179: 8d 75 e4 lea -0x1c(%ebp),%esi 10c17c: 56 push %esi 10c17d: 53 push %ebx 10c17e: e8 b1 01 00 00 call 10c334 <_POSIX_Mutex_Get> <== ALWAYS TAKEN 10c183: 83 c4 10 add $0x10,%esp 10c186: 85 c0 test %eax,%eax 10c188: 74 21 je 10c1ab <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c18a: a1 f8 9c 12 00 mov 0x129cf8,%eax 10c18f: 48 dec %eax 10c190: a3 f8 9c 12 00 mov %eax,0x129cf8 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c195: 83 ec 08 sub $0x8,%esp 10c198: 56 push %esi 10c199: 57 push %edi 10c19a: e8 e1 fd ff ff call 10bf80 <_POSIX_Condition_variables_Get> 10c19f: 89 c6 mov %eax,%esi switch ( location ) { 10c1a1: 83 c4 10 add $0x10,%esp 10c1a4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c1a7: 85 d2 test %edx,%edx 10c1a9: 74 11 je 10c1bc <_POSIX_Condition_variables_Wait_support+0x58> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 10c1ab: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c1b0: 89 f0 mov %esi,%eax 10c1b2: 8d 65 f4 lea -0xc(%ebp),%esp 10c1b5: 5b pop %ebx 10c1b6: 5e pop %esi 10c1b7: 5f pop %edi 10c1b8: c9 leave 10c1b9: c3 ret 10c1ba: 66 90 xchg %ax,%ax <== NOT EXECUTED the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 10c1bc: 8b 40 14 mov 0x14(%eax),%eax 10c1bf: 85 c0 test %eax,%eax 10c1c1: 74 19 je 10c1dc <_POSIX_Condition_variables_Wait_support+0x78> 10c1c3: 3b 03 cmp (%ebx),%eax 10c1c5: 74 15 je 10c1dc <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c1c7: e8 24 31 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c1cc: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c1d1: 89 f0 mov %esi,%eax 10c1d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c1d6: 5b pop %ebx 10c1d7: 5e pop %esi 10c1d8: 5f pop %edi 10c1d9: c9 leave 10c1da: c3 ret 10c1db: 90 nop <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c1dc: 83 ec 0c sub $0xc,%esp 10c1df: 53 push %ebx 10c1e0: e8 73 03 00 00 call 10c558 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c1e5: 83 c4 10 add $0x10,%esp 10c1e8: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c1ec: 74 26 je 10c214 <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c1ee: e8 fd 30 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c1f3: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c1f8: 83 ec 0c sub $0xc,%esp 10c1fb: 53 push %ebx 10c1fc: e8 cf 02 00 00 call 10c4d0 <== ALWAYS TAKEN if ( mutex_status ) 10c201: 83 c4 10 add $0x10,%esp 10c204: 85 c0 test %eax,%eax 10c206: 75 a3 jne 10c1ab <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c208: 89 f0 mov %esi,%eax 10c20a: 8d 65 f4 lea -0xc(%ebp),%esp 10c20d: 5b pop %ebx 10c20e: 5e pop %esi 10c20f: 5f pop %edi 10c210: c9 leave 10c211: c3 ret 10c212: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c214: 8b 03 mov (%ebx),%eax 10c216: 89 46 14 mov %eax,0x14(%esi) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c219: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi) _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 10c220: a1 b8 9d 12 00 mov 0x129db8,%eax 10c225: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c22c: 83 c6 18 add $0x18,%esi 10c22f: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c232: 8b 17 mov (%edi),%edx 10c234: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c237: 50 push %eax 10c238: 68 64 fb 10 00 push $0x10fb64 10c23d: ff 75 10 pushl 0x10(%ebp) 10c240: 56 push %esi 10c241: e8 ba 35 00 00 call 10f800 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c246: e8 a5 30 00 00 call 10f2f0 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c24b: a1 b8 9d 12 00 mov 0x129db8,%eax 10c250: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c253: 83 c4 10 add $0x10,%esp 10c256: 85 f6 test %esi,%esi 10c258: 74 9e je 10c1f8 <_POSIX_Condition_variables_Wait_support+0x94> 10c25a: 83 fe 74 cmp $0x74,%esi 10c25d: 0f 85 4d ff ff ff jne 10c1b0 <_POSIX_Condition_variables_Wait_support+0x4c> <== ALWAYS TAKEN 10c263: eb 93 jmp 10c1f8 <_POSIX_Condition_variables_Wait_support+0x94> <== ALWAYS TAKEN 00115be0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 115be0: 55 push %ebp 115be1: 89 e5 mov %esp,%ebp 115be3: 57 push %edi 115be4: 56 push %esi 115be5: 53 push %ebx 115be6: 83 ec 34 sub $0x34,%esp 115be9: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 115bec: 68 ff 00 00 00 push $0xff 115bf1: ff 75 08 pushl 0x8(%ebp) 115bf4: e8 7f 4f 00 00 call 11ab78 115bf9: 89 c3 mov %eax,%ebx 115bfb: a1 f8 ff 12 00 mov 0x12fff8,%eax 115c00: 40 inc %eax 115c01: a3 f8 ff 12 00 mov %eax,0x12fff8 * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 115c06: 83 c4 10 add $0x10,%esp 115c09: 85 f6 test %esi,%esi 115c0b: 0f 84 c3 00 00 00 je 115cd4 <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 115c11: 8b 4e 04 mov 0x4(%esi),%ecx 115c14: 85 c9 test %ecx,%ecx 115c16: 0f 8e fc 00 00 00 jle 115d18 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 115c1c: 8b 56 08 mov 0x8(%esi),%edx 115c1f: 85 d2 test %edx,%edx 115c21: 0f 8e f1 00 00 00 jle 115d18 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 115c27: 8d 7d d8 lea -0x28(%ebp),%edi 115c2a: b9 04 00 00 00 mov $0x4,%ecx 115c2f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 115c31: 8b 45 dc mov -0x24(%ebp),%eax 115c34: 89 45 d4 mov %eax,-0x2c(%ebp) 115c37: 8b 45 e0 mov -0x20(%ebp),%eax 115c3a: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 115c3d: 83 ec 0c sub $0xc,%esp 115c40: 68 c0 03 13 00 push $0x1303c0 115c45: e8 e2 c7 ff ff call 11242c <_Objects_Allocate> 115c4a: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 115c4c: 83 c4 10 add $0x10,%esp 115c4f: 85 c0 test %eax,%eax 115c51: 0f 84 03 01 00 00 je 115d5a <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 115c57: 8b 45 0c mov 0xc(%ebp),%eax 115c5a: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 115c5d: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 115c61: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 115c68: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 115c6c: 43 inc %ebx 115c6d: 83 ec 0c sub $0xc,%esp 115c70: 53 push %ebx 115c71: e8 8e e7 ff ff call 114404 <_Workspace_Allocate> 115c76: 89 c7 mov %eax,%edi if (!name) { 115c78: 83 c4 10 add $0x10,%esp 115c7b: 85 c0 test %eax,%eax 115c7d: 0f 84 ac 00 00 00 je 115d2f <_POSIX_Message_queue_Create_support+0x14f> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 115c83: 50 push %eax 115c84: 53 push %ebx 115c85: ff 75 08 pushl 0x8(%ebp) 115c88: 57 push %edi 115c89: e8 6e 4e 00 00 call 11aafc * * Joel: Cite POSIX or OpenGroup on above statement so we can determine * if it is a real requirement. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 115c8e: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 115c95: ff 75 d0 pushl -0x30(%ebp) 115c98: ff 75 d4 pushl -0x2c(%ebp) 115c9b: 8d 46 5c lea 0x5c(%esi),%eax 115c9e: 50 push %eax 115c9f: 8d 46 1c lea 0x1c(%esi),%eax 115ca2: 50 push %eax 115ca3: e8 dc 0d 00 00 call 116a84 <_CORE_message_queue_Initialize> 115ca8: 83 c4 20 add $0x20,%esp 115cab: 84 c0 test %al,%al 115cad: 74 39 je 115ce8 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 115caf: 0f b7 56 08 movzwl 0x8(%esi),%edx 115cb3: a1 dc 03 13 00 mov 0x1303dc,%eax 115cb8: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 115cbb: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 115cbe: 8b 45 14 mov 0x14(%ebp),%eax 115cc1: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 115cc3: e8 d8 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> 115cc8: 31 c0 xor %eax,%eax return 0; } 115cca: 8d 65 f4 lea -0xc(%ebp),%esp 115ccd: 5b pop %ebx 115cce: 5e pop %esi 115ccf: 5f pop %edi 115cd0: c9 leave 115cd1: c3 ret 115cd2: 66 90 xchg %ax,%ax <== NOT EXECUTED * There is no real basis for the default values. They will work * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 115cd4: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 115cdb: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 115ce2: e9 56 ff ff ff jmp 115c3d <_POSIX_Message_queue_Create_support+0x5d> <== ALWAYS TAKEN 115ce7: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 115ce8: 83 ec 08 sub $0x8,%esp 115ceb: 56 push %esi 115cec: 68 c0 03 13 00 push $0x1303c0 115cf1: e8 b6 ca ff ff call 1127ac <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 115cf6: 89 3c 24 mov %edi,(%esp) 115cf9: e8 22 e7 ff ff call 114420 <_Workspace_Free> _Thread_Enable_dispatch(); 115cfe: e8 9d d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 115d03: e8 5c 39 00 00 call 119664 <__errno> 115d08: c7 00 1c 00 00 00 movl $0x1c,(%eax) 115d0e: b8 ff ff ff ff mov $0xffffffff,%eax 115d13: 83 c4 10 add $0x10,%esp 115d16: eb b2 jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 115d18: e8 83 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 115d1d: e8 42 39 00 00 call 119664 <__errno> 115d22: c7 00 16 00 00 00 movl $0x16,(%eax) 115d28: b8 ff ff ff ff mov $0xffffffff,%eax 115d2d: eb 9b jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN 115d2f: 83 ec 08 sub $0x8,%esp 115d32: 56 push %esi 115d33: 68 c0 03 13 00 push $0x1303c0 115d38: e8 6f ca ff ff call 1127ac <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 115d3d: e8 5e d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 115d42: e8 1d 39 00 00 call 119664 <__errno> 115d47: c7 00 0c 00 00 00 movl $0xc,(%eax) 115d4d: b8 ff ff ff ff mov $0xffffffff,%eax 115d52: 83 c4 10 add $0x10,%esp 115d55: e9 70 ff ff ff jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 115d5a: e8 41 d4 ff ff call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 115d5f: e8 00 39 00 00 call 119664 <__errno> 115d64: c7 00 17 00 00 00 movl $0x17,(%eax) 115d6a: b8 ff ff ff ff mov $0xffffffff,%eax 115d6f: e9 56 ff ff ff jmp 115cca <_POSIX_Message_queue_Create_support+0xea> <== ALWAYS TAKEN 00115d74 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 115d74: 55 push %ebp 115d75: 89 e5 mov %esp,%ebp 115d77: 53 push %ebx 115d78: 83 ec 14 sub $0x14,%esp 115d7b: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 115d7e: 85 db test %ebx,%ebx 115d80: 74 05 je 115d87 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 115d82: 80 3b 00 cmpb $0x0,(%ebx) 115d85: 75 0d jne 115d94 <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115d87: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 115d8c: 8b 5d fc mov -0x4(%ebp),%ebx 115d8f: c9 leave 115d90: c3 ret 115d91: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 115d94: 83 ec 08 sub $0x8,%esp 115d97: 68 ff 00 00 00 push $0xff 115d9c: 53 push %ebx 115d9d: e8 d6 4d 00 00 call 11ab78 115da2: 83 c4 10 add $0x10,%esp 115da5: 3d fe 00 00 00 cmp $0xfe,%eax 115daa: 76 0c jbe 115db8 <_POSIX_Message_queue_Name_to_id+0x44> 115dac: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 115db1: 8b 5d fc mov -0x4(%ebp),%ebx 115db4: c9 leave 115db5: c3 ret 115db6: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 115db8: 50 push %eax 115db9: 8d 45 f4 lea -0xc(%ebp),%eax 115dbc: 50 push %eax 115dbd: 53 push %ebx 115dbe: 68 c0 03 13 00 push $0x1303c0 115dc3: e8 c0 12 00 00 call 117088 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 115dc8: 8b 4d f4 mov -0xc(%ebp),%ecx 115dcb: 8b 55 0c mov 0xc(%ebp),%edx 115dce: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115dd0: 83 c4 10 add $0x10,%esp 115dd3: 83 f8 01 cmp $0x1,%eax 115dd6: 19 c0 sbb %eax,%eax 115dd8: f7 d0 not %eax 115dda: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 115ddd: 8b 5d fc mov -0x4(%ebp),%ebx 115de0: c9 leave 115de1: c3 ret 0010fa20 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10fa20: 55 push %ebp 10fa21: 89 e5 mov %esp,%ebp 10fa23: 56 push %esi 10fa24: 53 push %ebx 10fa25: 83 ec 24 sub $0x24,%esp 10fa28: 8b 5d 08 mov 0x8(%ebp),%ebx 10fa2b: 8b 75 14 mov 0x14(%ebp),%esi 10fa2e: 8a 45 18 mov 0x18(%ebp),%al 10fa31: 88 45 e7 mov %al,-0x19(%ebp) RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10fa34: 8d 45 f4 lea -0xc(%ebp),%eax 10fa37: 50 push %eax 10fa38: 53 push %ebx 10fa39: 68 60 05 13 00 push $0x130560 10fa3e: e8 99 2e 00 00 call 1128dc <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fa43: 83 c4 10 add $0x10,%esp 10fa46: 8b 55 f4 mov -0xc(%ebp),%edx 10fa49: 85 d2 test %edx,%edx 10fa4b: 74 17 je 10fa64 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fa4d: e8 12 9c 00 00 call 119664 <__errno> 10fa52: c7 00 09 00 00 00 movl $0x9,(%eax) 10fa58: b8 ff ff ff ff mov $0xffffffff,%eax } 10fa5d: 8d 65 f8 lea -0x8(%ebp),%esp 10fa60: 5b pop %ebx 10fa61: 5e pop %esi 10fa62: c9 leave 10fa63: c3 ret the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10fa64: 8b 48 14 mov 0x14(%eax),%ecx 10fa67: 89 ca mov %ecx,%edx 10fa69: 83 e2 03 and $0x3,%edx 10fa6c: 4a dec %edx 10fa6d: 0f 84 af 00 00 00 je 10fb22 <_POSIX_Message_queue_Receive_support+0x102> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fa73: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10fa76: 8b 45 10 mov 0x10(%ebp),%eax 10fa79: 39 42 68 cmp %eax,0x68(%edx) 10fa7c: 77 62 ja 10fae0 <_POSIX_Message_queue_Receive_support+0xc0> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fa7e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10fa82: 75 48 jne 10facc <_POSIX_Message_queue_Receive_support+0xac> <== NEVER TAKEN 10fa84: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10fa86: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10fa8d: 83 ec 08 sub $0x8,%esp 10fa90: ff 75 1c pushl 0x1c(%ebp) 10fa93: 50 push %eax 10fa94: 8d 45 f0 lea -0x10(%ebp),%eax 10fa97: 50 push %eax 10fa98: ff 75 0c pushl 0xc(%ebp) 10fa9b: 53 push %ebx 10fa9c: 83 c2 1c add $0x1c,%edx 10fa9f: 52 push %edx 10faa0: e8 0f 1f 00 00 call 1119b4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10faa5: 83 c4 20 add $0x20,%esp 10faa8: e8 f3 36 00 00 call 1131a0 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10faad: a1 b8 00 13 00 mov 0x1300b8,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fab2: 8b 50 24 mov 0x24(%eax),%edx 10fab5: 89 16 mov %edx,(%esi) 10fab7: 85 d2 test %edx,%edx 10fab9: 78 21 js 10fadc <_POSIX_Message_queue_Receive_support+0xbc> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 10fabb: 8b 40 34 mov 0x34(%eax),%eax 10fabe: 85 c0 test %eax,%eax 10fac0: 75 3a jne 10fafc <_POSIX_Message_queue_Receive_support+0xdc> return length_out; 10fac2: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fac5: 8d 65 f8 lea -0x8(%ebp),%esp 10fac8: 5b pop %ebx 10fac9: 5e pop %esi 10faca: c9 leave 10facb: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10facc: 89 c8 mov %ecx,%eax 10face: c1 e8 0e shr $0xe,%eax 10fad1: 83 f0 01 xor $0x1,%eax 10fad4: 83 e0 01 and $0x1,%eax 10fad7: eb ad jmp 10fa86 <_POSIX_Message_queue_Receive_support+0x66> <== ALWAYS TAKEN 10fad9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 10fadc: f7 1e negl (%esi) 10fade: eb db jmp 10fabb <_POSIX_Message_queue_Receive_support+0x9b> <== ALWAYS TAKEN } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 10fae0: e8 bb 36 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10fae5: e8 7a 9b 00 00 call 119664 <__errno> 10faea: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10faf0: b8 ff ff ff ff mov $0xffffffff,%eax 10faf5: e9 63 ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN 10fafa: 66 90 xchg %ax,%ax <== NOT EXECUTED _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 10fafc: e8 63 9b 00 00 call 119664 <__errno> 10fb01: 89 c3 mov %eax,%ebx 10fb03: 83 ec 0c sub $0xc,%esp 10fb06: a1 b8 00 13 00 mov 0x1300b8,%eax 10fb0b: ff 70 34 pushl 0x34(%eax) 10fb0e: e8 39 02 00 00 call 10fd4c <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10fb13: 89 03 mov %eax,(%ebx) 10fb15: b8 ff ff ff ff mov $0xffffffff,%eax 10fb1a: 83 c4 10 add $0x10,%esp 10fb1d: e9 3b ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 10fb22: e8 79 36 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fb27: e8 38 9b 00 00 call 119664 <__errno> 10fb2c: c7 00 09 00 00 00 movl $0x9,(%eax) 10fb32: b8 ff ff ff ff mov $0xffffffff,%eax 10fb37: e9 21 ff ff ff jmp 10fa5d <_POSIX_Message_queue_Receive_support+0x3d> <== ALWAYS TAKEN 0010fb5c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 10fb5c: 55 push %ebp 10fb5d: 89 e5 mov %esp,%ebp 10fb5f: 57 push %edi 10fb60: 56 push %esi 10fb61: 53 push %ebx 10fb62: 83 ec 2c sub $0x2c,%esp 10fb65: 8b 75 08 mov 0x8(%ebp),%esi 10fb68: 8b 5d 14 mov 0x14(%ebp),%ebx 10fb6b: 8a 55 18 mov 0x18(%ebp),%dl /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 10fb6e: 83 fb 20 cmp $0x20,%ebx 10fb71: 0f 87 9d 00 00 00 ja 10fc14 <_POSIX_Message_queue_Send_support+0xb8> 10fb77: 51 push %ecx 10fb78: 8d 45 e4 lea -0x1c(%ebp),%eax 10fb7b: 50 push %eax 10fb7c: 56 push %esi 10fb7d: 68 60 05 13 00 push $0x130560 10fb82: 88 55 d4 mov %dl,-0x2c(%ebp) 10fb85: e8 52 2d 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fb8a: 83 c4 10 add $0x10,%esp 10fb8d: 8b 55 e4 mov -0x1c(%ebp),%edx 10fb90: 85 d2 test %edx,%edx 10fb92: 8a 55 d4 mov -0x2c(%ebp),%dl 10fb95: 75 69 jne 10fc00 <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 10fb97: 8b 48 14 mov 0x14(%eax),%ecx 10fb9a: f6 c1 03 test $0x3,%cl 10fb9d: 0f 84 85 00 00 00 je 10fc28 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10fba3: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fba6: 84 d2 test %dl,%dl 10fba8: 75 3a jne 10fbe4 <_POSIX_Message_queue_Send_support+0x88> 10fbaa: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 10fbac: ff 75 1c pushl 0x1c(%ebp) 10fbaf: 50 push %eax 10fbb0: f7 db neg %ebx 10fbb2: 53 push %ebx 10fbb3: 6a 00 push $0x0 10fbb5: 56 push %esi 10fbb6: ff 75 10 pushl 0x10(%ebp) 10fbb9: ff 75 0c pushl 0xc(%ebp) 10fbbc: 8d 47 1c lea 0x1c(%edi),%eax 10fbbf: 50 push %eax 10fbc0: e8 1b 1f 00 00 call 111ae0 <_CORE_message_queue_Submit> 10fbc5: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 10fbc7: 83 c4 20 add $0x20,%esp 10fbca: e8 d1 35 00 00 call 1131a0 <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 10fbcf: 83 fb 07 cmp $0x7,%ebx 10fbd2: 74 20 je 10fbf4 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 10fbd4: 85 db test %ebx,%ebx 10fbd6: 75 68 jne 10fc40 <_POSIX_Message_queue_Send_support+0xe4> 10fbd8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fbda: 8d 65 f4 lea -0xc(%ebp),%esp 10fbdd: 5b pop %ebx 10fbde: 5e pop %esi 10fbdf: 5f pop %edi 10fbe0: c9 leave 10fbe1: c3 ret 10fbe2: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10fbe4: 89 c8 mov %ecx,%eax 10fbe6: c1 e8 0e shr $0xe,%eax 10fbe9: 83 f0 01 xor $0x1,%eax 10fbec: 83 e0 01 and $0x1,%eax 10fbef: eb bb jmp 10fbac <_POSIX_Message_queue_Send_support+0x50> <== ALWAYS TAKEN 10fbf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) msg_status = _Thread_Executing->Wait.return_code; 10fbf4: a1 b8 00 13 00 mov 0x1300b8,%eax 10fbf9: 8b 58 34 mov 0x34(%eax),%ebx 10fbfc: eb d6 jmp 10fbd4 <_POSIX_Message_queue_Send_support+0x78> <== ALWAYS TAKEN 10fbfe: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fc00: e8 5f 9a 00 00 call 119664 <__errno> 10fc05: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc0b: b8 ff ff ff ff mov $0xffffffff,%eax 10fc10: eb c8 jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc12: 66 90 xchg %ax,%ax <== NOT EXECUTED * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10fc14: e8 4b 9a 00 00 call 119664 <__errno> 10fc19: c7 00 16 00 00 00 movl $0x16,(%eax) 10fc1f: b8 ff ff ff ff mov $0xffffffff,%eax 10fc24: eb b4 jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc26: 66 90 xchg %ax,%ax <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 10fc28: e8 73 35 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 10fc2d: e8 32 9a 00 00 call 119664 <__errno> 10fc32: c7 00 09 00 00 00 movl $0x9,(%eax) 10fc38: b8 ff ff ff ff mov $0xffffffff,%eax 10fc3d: eb 9b jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 10fc3f: 90 nop <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 10fc40: e8 1f 9a 00 00 call 119664 <__errno> 10fc45: 89 c6 mov %eax,%esi 10fc47: 83 ec 0c sub $0xc,%esp 10fc4a: 53 push %ebx 10fc4b: e8 fc 00 00 00 call 10fd4c <_POSIX_Message_queue_Translate_core_message_queue_return_code> <== ALWAYS TAKEN 10fc50: 89 06 mov %eax,(%esi) 10fc52: b8 ff ff ff ff mov $0xffffffff,%eax 10fc57: 83 c4 10 add $0x10,%esp 10fc5a: e9 7b ff ff ff jmp 10fbda <_POSIX_Message_queue_Send_support+0x7e> <== ALWAYS TAKEN 0010d078 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d078: 55 push %ebp 10d079: 89 e5 mov %esp,%ebp 10d07b: 56 push %esi 10d07c: 53 push %ebx 10d07d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d080: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d083: 85 db test %ebx,%ebx 10d085: 74 39 je 10d0c0 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d087: 8b 03 mov (%ebx),%eax 10d089: 83 f8 ff cmp $0xffffffff,%eax 10d08c: 74 1a je 10d0a8 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d08e: 52 push %edx 10d08f: 56 push %esi 10d090: 50 push %eax 10d091: 68 40 b8 12 00 push $0x12b840 10d096: e8 a9 2a 00 00 call 10fb44 <_Objects_Get> 10d09b: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d09e: 8d 65 f8 lea -0x8(%ebp),%esp 10d0a1: 5b pop %ebx 10d0a2: 5e pop %esi 10d0a3: c9 leave 10d0a4: c3 ret 10d0a5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Objects_Locations *location ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d0a8: 83 ec 08 sub $0x8,%esp 10d0ab: 6a 00 push $0x0 10d0ad: 53 push %ebx 10d0ae: e8 65 00 00 00 call 10d118 <== ALWAYS TAKEN 10d0b3: 83 c4 10 add $0x10,%esp 10d0b6: 85 c0 test %eax,%eax 10d0b8: 75 06 jne 10d0c0 <_POSIX_Mutex_Get+0x48> 10d0ba: 8b 03 mov (%ebx),%eax 10d0bc: eb d0 jmp 10d08e <_POSIX_Mutex_Get+0x16> <== ALWAYS TAKEN 10d0be: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d0c0: c7 06 01 00 00 00 movl $0x1,(%esi) 10d0c6: 31 c0 xor %eax,%eax 10d0c8: eb d4 jmp 10d09e <_POSIX_Mutex_Get+0x26> <== ALWAYS TAKEN 0010d024 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d024: 55 push %ebp 10d025: 89 e5 mov %esp,%ebp 10d027: 56 push %esi 10d028: 53 push %ebx 10d029: 8b 5d 08 mov 0x8(%ebp),%ebx 10d02c: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d02f: 85 db test %ebx,%ebx 10d031: 74 39 je 10d06c <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d033: 8b 03 mov (%ebx),%eax 10d035: 83 f8 ff cmp $0xffffffff,%eax 10d038: 74 1a je 10d054 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d03a: ff 75 10 pushl 0x10(%ebp) 10d03d: 56 push %esi 10d03e: 50 push %eax 10d03f: 68 40 b8 12 00 push $0x12b840 10d044: e8 a3 2a 00 00 call 10faec <_Objects_Get_isr_disable> 10d049: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d04c: 8d 65 f8 lea -0x8(%ebp),%esp 10d04f: 5b pop %ebx 10d050: 5e pop %esi 10d051: c9 leave 10d052: c3 ret 10d053: 90 nop <== NOT EXECUTED ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d054: 83 ec 08 sub $0x8,%esp 10d057: 6a 00 push $0x0 10d059: 53 push %ebx 10d05a: e8 b9 00 00 00 call 10d118 <== ALWAYS TAKEN 10d05f: 83 c4 10 add $0x10,%esp 10d062: 85 c0 test %eax,%eax 10d064: 75 06 jne 10d06c <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d066: 8b 03 mov (%ebx),%eax 10d068: eb d0 jmp 10d03a <_POSIX_Mutex_Get_interrupt_disable+0x16> <== ALWAYS TAKEN 10d06a: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d06c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d072: 31 c0 xor %eax,%eax 10d074: eb d6 jmp 10d04c <_POSIX_Mutex_Get_interrupt_disable+0x28> <== ALWAYS TAKEN 0010d274 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d274: 55 push %ebp 10d275: 89 e5 mov %esp,%ebp 10d277: 53 push %ebx 10d278: 83 ec 18 sub $0x18,%esp 10d27b: 8a 5d 0c mov 0xc(%ebp),%bl register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); 10d27e: 8d 45 f0 lea -0x10(%ebp),%eax 10d281: 50 push %eax 10d282: 8d 45 f4 lea -0xc(%ebp),%eax 10d285: 50 push %eax 10d286: ff 75 08 pushl 0x8(%ebp) 10d289: e8 96 fd ff ff call 10d024 <_POSIX_Mutex_Get_interrupt_disable> <== ALWAYS TAKEN switch ( location ) { 10d28e: 83 c4 10 add $0x10,%esp 10d291: 8b 55 f4 mov -0xc(%ebp),%edx 10d294: 85 d2 test %edx,%edx 10d296: 75 34 jne 10d2cc <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d298: 83 ec 0c sub $0xc,%esp 10d29b: ff 75 f0 pushl -0x10(%ebp) 10d29e: ff 75 10 pushl 0x10(%ebp) 10d2a1: 0f b6 db movzbl %bl,%ebx 10d2a4: 53 push %ebx 10d2a5: ff 70 08 pushl 0x8(%eax) 10d2a8: 83 c0 14 add $0x14,%eax 10d2ab: 50 push %eax 10d2ac: e8 87 1c 00 00 call 10ef38 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d2b1: 83 c4 14 add $0x14,%esp 10d2b4: a1 f8 b4 12 00 mov 0x12b4f8,%eax 10d2b9: ff 70 34 pushl 0x34(%eax) 10d2bc: e8 f3 00 00 00 call 10d3b4 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10d2c1: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d2c4: 8b 5d fc mov -0x4(%ebp),%ebx 10d2c7: c9 leave 10d2c8: c3 ret 10d2c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 10d2cc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d2d1: 8b 5d fc mov -0x4(%ebp),%ebx 10d2d4: c9 leave 10d2d5: c3 ret 00113dec <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 113dec: 55 push %ebp 113ded: 89 e5 mov %esp,%ebp 113def: 56 push %esi 113df0: 53 push %ebx 113df1: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 113df4: 8b 55 0c mov 0xc(%ebp),%edx 113df7: 85 d2 test %edx,%edx 113df9: 0f 85 b9 00 00 00 jne 113eb8 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 113dff: 85 db test %ebx,%ebx 113e01: 74 1c je 113e1f <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 113e03: 83 ec 08 sub $0x8,%esp 113e06: 68 ff 00 00 00 push $0xff 113e0b: 53 push %ebx 113e0c: e8 3b 48 00 00 call 11864c 113e11: 83 c4 10 add $0x10,%esp 113e14: 3d fe 00 00 00 cmp $0xfe,%eax 113e19: 0f 87 ad 00 00 00 ja 113ecc <_POSIX_Semaphore_Create_support+0xe0> 113e1f: a1 18 d0 12 00 mov 0x12d018,%eax 113e24: 40 inc %eax 113e25: a3 18 d0 12 00 mov %eax,0x12d018 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 113e2a: 83 ec 0c sub $0xc,%esp 113e2d: 68 60 d3 12 00 push $0x12d360 113e32: e8 11 c0 ff ff call 10fe48 <_Objects_Allocate> 113e37: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 113e39: 83 c4 10 add $0x10,%esp 113e3c: 85 c0 test %eax,%eax 113e3e: 0f 84 9a 00 00 00 je 113ede <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 113e44: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 113e4b: 85 db test %ebx,%ebx 113e4d: 74 55 je 113ea4 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 113e4f: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 113e53: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 113e5a: c6 40 15 01 movb $0x1,0x15(%eax) * blocking tasks on this semaphore should be. It could somehow * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 113e5e: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 113e65: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 113e6c: 50 push %eax 113e6d: ff 75 10 pushl 0x10(%ebp) 113e70: 8d 46 5c lea 0x5c(%esi),%eax 113e73: 50 push %eax 113e74: 8d 46 1c lea 0x1c(%esi),%eax 113e77: 50 push %eax 113e78: e8 df ba ff ff call 10f95c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 113e7d: 0f b7 56 08 movzwl 0x8(%esi),%edx 113e81: a1 7c d3 12 00 mov 0x12d37c,%eax 113e86: 89 34 90 mov %esi,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 113e89: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 113e8c: 8b 45 14 mov 0x14(%ebp),%eax 113e8f: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 113e91: e8 26 cd ff ff call 110bbc <_Thread_Enable_dispatch> 113e96: 31 c0 xor %eax,%eax return 0; 113e98: 83 c4 10 add $0x10,%esp } 113e9b: 8d 65 f8 lea -0x8(%ebp),%esp 113e9e: 5b pop %ebx 113e9f: 5e pop %esi 113ea0: c9 leave 113ea1: c3 ret 113ea2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { the_semaphore->named = true; the_semaphore->open_count = 1; the_semaphore->linked = true; } else { the_semaphore->named = false; 113ea4: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 113ea8: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 113eaf: c6 40 15 00 movb $0x0,0x15(%eax) 113eb3: eb a9 jmp 113e5e <_POSIX_Semaphore_Create_support+0x72> <== ALWAYS TAKEN 113eb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED CORE_semaphore_Attributes *the_sem_attr; char *name_p = (char *)name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) rtems_set_errno_and_return_minus_one( ENOSYS ); 113eb8: e8 2f 39 00 00 call 1177ec <__errno> 113ebd: c7 00 58 00 00 00 movl $0x58,(%eax) 113ec3: b8 ff ff ff ff mov $0xffffffff,%eax 113ec8: eb d1 jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN 113eca: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 113ecc: e8 1b 39 00 00 call 1177ec <__errno> 113ed1: c7 00 5b 00 00 00 movl $0x5b,(%eax) 113ed7: b8 ff ff ff ff mov $0xffffffff,%eax 113edc: eb bd jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 113ede: e8 d9 cc ff ff call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 113ee3: e8 04 39 00 00 call 1177ec <__errno> 113ee8: c7 00 1c 00 00 00 movl $0x1c,(%eax) 113eee: b8 ff ff ff ff mov $0xffffffff,%eax 113ef3: eb a6 jmp 113e9b <_POSIX_Semaphore_Create_support+0xaf> <== ALWAYS TAKEN 00113f48 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 113f48: 55 push %ebp 113f49: 89 e5 mov %esp,%ebp 113f4b: 83 ec 18 sub $0x18,%esp 113f4e: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 113f51: 85 c0 test %eax,%eax 113f53: 74 05 je 113f5a <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 113f55: 80 38 00 cmpb $0x0,(%eax) 113f58: 75 0a jne 113f64 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113f5a: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 113f5f: c9 leave 113f60: c3 ret 113f61: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 113f64: 52 push %edx 113f65: 8d 55 f4 lea -0xc(%ebp),%edx 113f68: 52 push %edx 113f69: 50 push %eax 113f6a: 68 60 d3 12 00 push $0x12d360 113f6f: e8 f8 0d 00 00 call 114d6c <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 113f74: 8b 4d f4 mov -0xc(%ebp),%ecx 113f77: 8b 55 0c mov 0xc(%ebp),%edx 113f7a: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 113f7c: 83 c4 10 add $0x10,%esp 113f7f: 83 f8 01 cmp $0x1,%eax 113f82: 19 c0 sbb %eax,%eax 113f84: f7 d0 not %eax 113f86: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 113f89: c9 leave 113f8a: c3 ret 00113fb4 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 113fb4: 55 push %ebp 113fb5: 89 e5 mov %esp,%ebp 113fb7: 53 push %ebx 113fb8: 83 ec 18 sub $0x18,%esp 113fbb: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 113fbe: 8d 45 f4 lea -0xc(%ebp),%eax 113fc1: 50 push %eax 113fc2: 8b 45 08 mov 0x8(%ebp),%eax 113fc5: ff 30 pushl (%eax) 113fc7: 68 60 d3 12 00 push $0x12d360 113fcc: e8 27 c3 ff ff call 1102f8 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 113fd1: 83 c4 10 add $0x10,%esp 113fd4: 8b 55 f4 mov -0xc(%ebp),%edx 113fd7: 85 d2 test %edx,%edx 113fd9: 74 15 je 113ff0 <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 113fdb: e8 0c 38 00 00 call 1177ec <__errno> 113fe0: c7 00 16 00 00 00 movl $0x16,(%eax) 113fe6: b8 ff ff ff ff mov $0xffffffff,%eax } 113feb: 8b 5d fc mov -0x4(%ebp),%ebx 113fee: c9 leave 113fef: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 113ff0: ff 75 10 pushl 0x10(%ebp) 113ff3: 0f b6 db movzbl %bl,%ebx 113ff6: 53 push %ebx 113ff7: ff 70 08 pushl 0x8(%eax) 113ffa: 83 c0 1c add $0x1c,%eax 113ffd: 50 push %eax 113ffe: e8 65 08 00 00 call 114868 <_CORE_semaphore_Seize> <== ALWAYS TAKEN &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 114003: e8 b4 cb ff ff call 110bbc <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 114008: 83 c4 10 add $0x10,%esp 11400b: a1 d8 d0 12 00 mov 0x12d0d8,%eax 114010: 8b 40 34 mov 0x34(%eax),%eax 114013: 85 c0 test %eax,%eax 114015: 75 09 jne 114020 <_POSIX_Semaphore_Wait_support+0x6c> 114017: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 114019: 8b 5d fc mov -0x4(%ebp),%ebx 11401c: c9 leave 11401d: c3 ret 11401e: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 114020: e8 c7 37 00 00 call 1177ec <__errno> 114025: 89 c3 mov %eax,%ebx 114027: 83 ec 0c sub $0xc,%esp 11402a: a1 d8 d0 12 00 mov 0x12d0d8,%eax 11402f: ff 70 34 pushl 0x34(%eax) 114032: e8 c1 26 00 00 call 1166f8 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 114037: 89 03 mov %eax,(%ebx) 114039: b8 ff ff ff ff mov $0xffffffff,%eax 11403e: 83 c4 10 add $0x10,%esp 114041: eb a8 jmp 113feb <_POSIX_Semaphore_Wait_support+0x37> 00110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 110164: 55 push %ebp 110165: 89 e5 mov %esp,%ebp 110167: 83 ec 08 sub $0x8,%esp 11016a: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 11016d: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 110173: 8b 88 cc 00 00 00 mov 0xcc(%eax),%ecx 110179: 85 c9 test %ecx,%ecx 11017b: 75 09 jne 110186 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> <== ALWAYS TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 11017d: 83 b8 d0 00 00 00 01 cmpl $0x1,0xd0(%eax) 110184: 74 06 je 11018c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 110186: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 110187: e9 74 d7 ff ff jmp 10d900 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 11018c: 8b 80 d4 00 00 00 mov 0xd4(%eax),%eax 110192: 85 c0 test %eax,%eax 110194: 74 f0 je 110186 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 110196: a1 b8 88 12 00 mov 0x1288b8,%eax 11019b: 48 dec %eax 11019c: a3 b8 88 12 00 mov %eax,0x1288b8 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 1101a1: 83 ec 08 sub $0x8,%esp 1101a4: 6a ff push $0xffffffff 1101a6: 52 push %edx 1101a7: e8 18 06 00 00 call 1107c4 <_POSIX_Thread_Exit> <== ALWAYS TAKEN { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 1101ac: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 1101af: c9 leave 1101b0: c3 ret 001111f0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 1111f0: 55 push %ebp 1111f1: 89 e5 mov %esp,%ebp 1111f3: 57 push %edi 1111f4: 56 push %esi 1111f5: 53 push %ebx 1111f6: 83 ec 18 sub $0x18,%esp 1111f9: 8b 5d 08 mov 0x8(%ebp),%ebx 1111fc: 8b 75 0c mov 0xc(%ebp),%esi 1111ff: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 111202: ff 36 pushl (%esi) 111204: e8 cb ff ff ff call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 111209: 83 c4 10 add $0x10,%esp 11120c: 84 c0 test %al,%al 11120e: 74 2a je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> <== ALWAYS TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 111210: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 111216: 8b 45 14 mov 0x14(%ebp),%eax 111219: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 11121f: 85 db test %ebx,%ebx 111221: 74 25 je 111248 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 111223: 83 fb 01 cmp $0x1,%ebx 111226: 0f 84 90 00 00 00 je 1112bc <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 11122c: 83 fb 02 cmp $0x2,%ebx 11122f: 0f 84 97 00 00 00 je 1112cc <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 111235: 83 fb 03 cmp $0x3,%ebx 111238: 74 1e je 111258 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 11123a: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 11123f: 8d 65 f4 lea -0xc(%ebp),%esp 111242: 5b pop %ebx 111243: 5e pop %esi 111244: 5f pop %edi 111245: c9 leave 111246: c3 ret 111247: 90 nop <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 111248: c7 07 01 00 00 00 movl $0x1,(%edi) 11124e: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 111250: 8d 65 f4 lea -0xc(%ebp),%esp 111253: 5b pop %ebx 111254: 5e pop %esi 111255: 5f pop %edi 111256: c9 leave 111257: c3 ret *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->ss_replenish_period.tv_sec == 0) && 111258: 8b 5e 08 mov 0x8(%esi),%ebx 11125b: 85 db test %ebx,%ebx 11125d: 75 07 jne 111266 <_POSIX_Thread_Translate_sched_param+0x76> (param->ss_replenish_period.tv_nsec == 0) ) 11125f: 8b 4e 0c mov 0xc(%esi),%ecx 111262: 85 c9 test %ecx,%ecx 111264: 74 d4 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->ss_initial_budget.tv_sec == 0) && 111266: 8b 56 10 mov 0x10(%esi),%edx 111269: 85 d2 test %edx,%edx 11126b: 75 07 jne 111274 <_POSIX_Thread_Translate_sched_param+0x84> (param->ss_initial_budget.tv_nsec == 0) ) 11126d: 8b 46 14 mov 0x14(%esi),%eax 111270: 85 c0 test %eax,%eax 111272: 74 c6 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 111274: 83 ec 0c sub $0xc,%esp 111277: 8d 46 08 lea 0x8(%esi),%eax 11127a: 50 push %eax 11127b: e8 08 df ff ff call 10f188 <_Timespec_To_ticks> 111280: 89 c3 mov %eax,%ebx 111282: 8d 46 10 lea 0x10(%esi),%eax 111285: 89 04 24 mov %eax,(%esp) 111288: e8 fb de ff ff call 10f188 <_Timespec_To_ticks> 11128d: 83 c4 10 add $0x10,%esp 111290: 39 c3 cmp %eax,%ebx 111292: 72 a6 jb 11123a <_POSIX_Thread_Translate_sched_param+0x4a> _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 111294: 83 ec 0c sub $0xc,%esp 111297: ff 76 04 pushl 0x4(%esi) 11129a: e8 35 ff ff ff call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 11129f: 83 c4 10 add $0x10,%esp 1112a2: 84 c0 test %al,%al 1112a4: 74 94 je 11123a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 1112a6: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 1112ac: 8b 45 14 mov 0x14(%ebp),%eax 1112af: c7 00 3c bb 10 00 movl $0x10bb3c,(%eax) 1112b5: 31 c0 xor %eax,%eax return 0; 1112b7: eb 86 jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 1112b9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1112bc: c7 07 00 00 00 00 movl $0x0,(%edi) 1112c2: 31 c0 xor %eax,%eax return 0; 1112c4: e9 76 ff ff ff jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 1112c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1112cc: c7 07 02 00 00 00 movl $0x2,(%edi) 1112d2: 31 c0 xor %eax,%eax return 0; 1112d4: e9 66 ff ff ff jmp 11123f <_POSIX_Thread_Translate_sched_param+0x4f> <== ALWAYS TAKEN 00110124 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 110124: 55 push %ebp 110125: 89 e5 mov %esp,%ebp 110127: 57 push %edi 110128: 56 push %esi 110129: 53 push %ebx 11012a: 83 ec 28 sub $0x28,%esp 11012d: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 110130: 68 e4 00 00 00 push $0xe4 110135: 89 55 e4 mov %edx,-0x1c(%ebp) 110138: e8 ff e4 ff ff call 10e63c <_Workspace_Allocate> 11013d: 89 c3 mov %eax,%ebx if ( !api ) 11013f: 83 c4 10 add $0x10,%esp 110142: 85 c0 test %eax,%eax 110144: 8b 55 e4 mov -0x1c(%ebp),%edx 110147: 0f 84 07 01 00 00 je 110254 <_POSIX_Threads_Create_extension+0x130> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 11014d: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 110153: be 60 14 12 00 mov $0x121460,%esi 110158: b9 0e 00 00 00 mov $0xe,%ecx 11015d: 89 c7 mov %eax,%edi 11015f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 110161: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 110168: c7 40 7c 01 00 00 00 movl $0x1,0x7c(%eax) api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 11016f: be 78 14 12 00 mov $0x121478,%esi 110174: 8d b8 80 00 00 00 lea 0x80(%eax),%edi 11017a: b1 06 mov $0x6,%cl 11017c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 11017e: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 110185: 2b 42 14 sub 0x14(%edx),%eax 110188: 89 83 80 00 00 00 mov %eax,0x80(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 11018e: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 110195: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 110198: c7 83 cc 00 00 00 00 movl $0x0,0xcc(%ebx) 11019f: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1101a2: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 1101a9: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1101ac: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 1101b2: 89 83 d8 00 00 00 mov %eax,0xd8(%ebx) the_chain->permanent_null = NULL; 1101b8: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1101bf: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1101c2: 8d 83 d8 00 00 00 lea 0xd8(%ebx),%eax 1101c8: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 1101ce: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) 1101d5: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 1101d8: 0f b6 42 0b movzbl 0xb(%edx),%eax 1101dc: 83 e0 07 and $0x7,%eax 1101df: 83 f8 03 cmp $0x3,%eax 1101e2: 74 54 je 110238 <_POSIX_Threads_Create_extension+0x114> #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; } else { api->signals_blocked = 0xffffffff; 1101e4: c7 83 c4 00 00 00 ff movl $0xffffffff,0xc4(%ebx) 1101eb: ff ff ff } _Thread_queue_Initialize( 1101ee: 6a 00 push $0x0 1101f0: 68 00 10 00 00 push $0x1000 1101f5: 6a 00 push $0x0 1101f7: 8d 43 3c lea 0x3c(%ebx),%eax 1101fa: 50 push %eax 1101fb: 89 55 e4 mov %edx,-0x1c(%ebp) 1101fe: e8 21 da ff ff call 10dc24 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 110203: 8b 55 e4 mov -0x1c(%ebp),%edx 110206: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 110209: c7 83 a4 00 00 00 00 movl $0x0,0xa4(%ebx) 110210: 00 00 00 the_watchdog->routine = routine; 110213: c7 83 b8 00 00 00 a4 movl $0x1102a4,0xb8(%ebx) 11021a: 02 11 00 the_watchdog->id = id; 11021d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) the_watchdog->user_data = user_data; 110223: 89 93 c0 00 00 00 mov %edx,0xc0(%ebx) 110229: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 11022b: 83 c4 10 add $0x10,%esp } 11022e: 8d 65 f4 lea -0xc(%ebp),%esp 110231: 5b pop %ebx 110232: 5e pop %esi 110233: 5f pop %edi 110234: c9 leave 110235: c3 ret 110236: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 110238: a1 98 74 12 00 mov 0x127498,%eax 11023d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 110243: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 110249: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) 11024f: eb 9d jmp 1101ee <_POSIX_Threads_Create_extension+0xca> <== ALWAYS TAKEN 110251: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 110254: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 110256: 8d 65 f4 lea -0xc(%ebp),%esp 110259: 5b pop %ebx 11025a: 5e pop %esi 11025b: 5f pop %edi 11025c: c9 leave 11025d: c3 ret 001100a0 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1100a0: 55 push %ebp 1100a1: 89 e5 mov %esp,%ebp 1100a3: 57 push %edi 1100a4: 56 push %esi 1100a5: 53 push %ebx 1100a6: 83 ec 28 sub $0x28,%esp 1100a9: 8b 7d 0c mov 0xc(%ebp),%edi Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 1100ac: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 1100b2: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1100b5: 57 push %edi 1100b6: e8 41 23 00 00 call 1123fc <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1100bb: 89 3c 24 mov %edi,(%esp) 1100be: e8 9d 23 00 00 call 112460 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1100c3: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1100c6: 8b 5d e4 mov -0x1c(%ebp),%ebx 1100c9: 83 c3 3c add $0x3c,%ebx 1100cc: 83 c4 10 add $0x10,%esp 1100cf: eb 08 jmp 1100d9 <_POSIX_Threads_Delete_extension+0x39> <== ALWAYS TAKEN 1100d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; 1100d4: 8b 40 28 mov 0x28(%eax),%eax 1100d7: 89 30 mov %esi,(%eax) /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1100d9: 83 ec 0c sub $0xc,%esp 1100dc: 53 push %ebx 1100dd: e8 c6 d7 ff ff call 10d8a8 <_Thread_queue_Dequeue> 1100e2: 83 c4 10 add $0x10,%esp 1100e5: 85 c0 test %eax,%eax 1100e7: 75 eb jne 1100d4 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1100e9: 8b 45 e4 mov -0x1c(%ebp),%eax 1100ec: 83 78 7c 03 cmpl $0x3,0x7c(%eax) 1100f0: 74 1e je 110110 <_POSIX_Threads_Delete_extension+0x70> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1100f2: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 1100f9: 00 00 00 (void) _Workspace_Free( api ); 1100fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1100ff: 89 45 08 mov %eax,0x8(%ebp) } 110102: 8d 65 f4 lea -0xc(%ebp),%esp 110105: 5b pop %ebx 110106: 5e pop %esi 110107: 5f pop %edi 110108: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 110109: e9 4a e5 ff ff jmp 10e658 <_Workspace_Free> 11010e: 66 90 xchg %ax,%ax <== NOT EXECUTED while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 110110: 83 ec 0c sub $0xc,%esp 110113: 05 9c 00 00 00 add $0x9c,%eax 110118: 50 push %eax 110119: e8 1a e4 ff ff call 10e538 <_Watchdog_Remove> 11011e: 83 c4 10 add $0x10,%esp 110121: eb cf jmp 1100f2 <_POSIX_Threads_Delete_extension+0x52> <== ALWAYS TAKEN 0011007c <_POSIX_Threads_Exitted_extension>: * This method is invoked each time a thread exits. */ void _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { 11007c: 55 push %ebp 11007d: 89 e5 mov %esp,%ebp 11007f: 83 ec 08 sub $0x8,%esp 110082: 8b 55 08 mov 0x8(%ebp),%edx /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) 110085: 0f b6 42 0b movzbl 0xb(%edx),%eax 110089: 83 e0 07 and $0x7,%eax 11008c: 83 f8 03 cmp $0x3,%eax 11008f: 74 03 je 110094 <_POSIX_Threads_Exitted_extension+0x18> pthread_exit( executing->Wait.return_argument ); } 110091: c9 leave 110092: c3 ret 110093: 90 nop <== NOT EXECUTED /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 110094: 8b 42 28 mov 0x28(%edx),%eax 110097: 89 45 08 mov %eax,0x8(%ebp) } 11009a: c9 leave /* * If the executing thread was not created with the POSIX API, then this * API do not get to define its exit behavior. */ if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) pthread_exit( executing->Wait.return_argument ); 11009b: e9 70 26 00 00 jmp 112710 <== ALWAYS TAKEN 00110020 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 110020: 55 push %ebp 110021: 89 e5 mov %esp,%ebp 110023: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 110026: a1 58 56 12 00 mov 0x125658,%eax 11002b: 85 c0 test %eax,%eax 11002d: 74 05 je 110034 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 11002f: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 110030: ff e0 jmp *%eax 110032: 66 90 xchg %ax,%ax <== NOT EXECUTED } 110034: c9 leave 110035: c3 ret 0010b888 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10b888: 55 push %ebp 10b889: 89 e5 mov %esp,%ebp 10b88b: 57 push %edi 10b88c: 56 push %esi 10b88d: 53 push %ebx 10b88e: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10b891: 8b 3d 54 45 12 00 mov 0x124554,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10b897: a1 50 45 12 00 mov 0x124550,%eax 10b89c: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10b89f: 85 ff test %edi,%edi 10b8a1: 74 44 je 10b8e7 <_POSIX_Threads_Initialize_user_threads_body+0x5f> <== ALWAYS TAKEN 10b8a3: 85 c0 test %eax,%eax 10b8a5: 74 40 je 10b8e7 <_POSIX_Threads_Initialize_user_threads_body+0x5f> <== ALWAYS TAKEN 10b8a7: 31 db xor %ebx,%ebx 10b8a9: 8d 75 ac lea -0x54(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10b8ac: 83 ec 0c sub $0xc,%esp 10b8af: 56 push %esi 10b8b0: e8 27 5a 00 00 call 1112dc <== ALWAYS TAKEN (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10b8b5: 5a pop %edx 10b8b6: 59 pop %ecx 10b8b7: 6a 02 push $0x2 10b8b9: 56 push %esi 10b8ba: e8 45 5a 00 00 call 111304 <== ALWAYS TAKEN (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10b8bf: 59 pop %ecx 10b8c0: 58 pop %eax 10b8c1: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10b8c5: 56 push %esi 10b8c6: e8 6d 5a 00 00 call 111338 <== ALWAYS TAKEN status = pthread_create( 10b8cb: 6a 00 push $0x0 10b8cd: ff 34 df pushl (%edi,%ebx,8) 10b8d0: 56 push %esi 10b8d1: 8d 45 e4 lea -0x1c(%ebp),%eax 10b8d4: 50 push %eax 10b8d5: e8 aa fc ff ff call 10b584 <== ALWAYS TAKEN &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10b8da: 83 c4 20 add $0x20,%esp 10b8dd: 85 c0 test %eax,%eax 10b8df: 75 0e jne 10b8ef <_POSIX_Threads_Initialize_user_threads_body+0x67> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10b8e1: 43 inc %ebx 10b8e2: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10b8e5: 77 c5 ja 10b8ac <_POSIX_Threads_Initialize_user_threads_body+0x24> <== ALWAYS TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10b8e7: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ea: 5b pop %ebx 10b8eb: 5e pop %esi 10b8ec: 5f pop %edi 10b8ed: c9 leave 10b8ee: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10b8ef: 52 push %edx 10b8f0: 50 push %eax 10b8f1: 6a 01 push $0x1 10b8f3: 6a 02 push $0x2 10b8f5: e8 a6 1d 00 00 call 10d6a0 <_Internal_error_Occurred> 001102a4 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 1102a4: 55 push %ebp 1102a5: 89 e5 mov %esp,%ebp 1102a7: 56 push %esi 1102a8: 53 push %ebx 1102a9: 8b 75 0c mov 0xc(%ebp),%esi Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1102ac: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 1102b2: 83 ec 0c sub $0xc,%esp 1102b5: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax 1102bb: 50 push %eax 1102bc: e8 77 11 00 00 call 111438 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 1102c1: 89 46 78 mov %eax,0x78(%esi) 1102c4: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1102cb: 2b 83 98 00 00 00 sub 0x98(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; 1102d1: 89 46 18 mov %eax,0x18(%esi) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 1102d4: 83 c4 10 add $0x10,%esp 1102d7: 8b 4e 1c mov 0x1c(%esi),%ecx 1102da: 85 c9 test %ecx,%ecx 1102dc: 75 05 jne 1102e3 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> <== ALWAYS TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 1102de: 39 46 14 cmp %eax,0x14(%esi) 1102e1: 77 35 ja 110318 <_POSIX_Threads_Sporadic_budget_TSR+0x74> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 1102e3: 83 ec 0c sub $0xc,%esp 1102e6: 8d 83 88 00 00 00 lea 0x88(%ebx),%eax 1102ec: 50 push %eax 1102ed: e8 46 11 00 00 call 111438 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1102f2: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1102f8: 83 c4 10 add $0x10,%esp 1102fb: 81 c3 9c 00 00 00 add $0x9c,%ebx 110301: 89 5d 0c mov %ebx,0xc(%ebp) 110304: c7 45 08 b8 74 12 00 movl $0x1274b8,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 11030b: 8d 65 f8 lea -0x8(%ebp),%esp 11030e: 5b pop %ebx 11030f: 5e pop %esi 110310: c9 leave 110311: e9 ea e0 ff ff jmp 10e400 <_Watchdog_Insert> 110316: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 110318: 52 push %edx 110319: 6a 01 push $0x1 11031b: 50 push %eax 11031c: 56 push %esi 11031d: e8 aa cc ff ff call 10cfcc <_Thread_Change_priority> 110322: 83 c4 10 add $0x10,%esp 110325: eb bc jmp 1102e3 <_POSIX_Threads_Sporadic_budget_TSR+0x3f> <== ALWAYS TAKEN 00110260 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 110260: 55 push %ebp 110261: 89 e5 mov %esp,%ebp 110263: 83 ec 08 sub $0x8,%esp 110266: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110269: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 11026f: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 110276: 0f b6 15 14 32 12 00 movzbl 0x123214,%edx 11027d: 2b 91 84 00 00 00 sub 0x84(%ecx),%edx new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; 110283: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 110286: 8b 48 1c mov 0x1c(%eax),%ecx 110289: 85 c9 test %ecx,%ecx 11028b: 75 05 jne 110292 <_POSIX_Threads_Sporadic_budget_callout+0x32> <== ALWAYS TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 11028d: 39 50 14 cmp %edx,0x14(%eax) 110290: 72 02 jb 110294 <_POSIX_Threads_Sporadic_budget_callout+0x34> #if 0 printk( "lower priority\n" ); #endif } } } 110292: c9 leave 110293: c3 ret * Make sure we are actually lowering it. If they have lowered it * to logically lower than ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 110294: 51 push %ecx 110295: 6a 01 push $0x1 110297: 52 push %edx 110298: 50 push %eax 110299: e8 2e cd ff ff call 10cfcc <_Thread_Change_priority> 11029e: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 1102a1: c9 leave 1102a2: c3 ret 001123fc <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 1123fc: 55 push %ebp 1123fd: 89 e5 mov %esp,%ebp 1123ff: 57 push %edi 112400: 56 push %esi 112401: 53 push %ebx 112402: 83 ec 0c sub $0xc,%esp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 112405: 8b 45 08 mov 0x8(%ebp),%eax 112408: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 11240e: c7 86 cc 00 00 00 01 movl $0x1,0xcc(%esi) 112415: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 112418: 8d 9e dc 00 00 00 lea 0xdc(%esi),%ebx POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 11241e: 39 9e d8 00 00 00 cmp %ebx,0xd8(%esi) 112424: 74 30 je 112456 <_POSIX_Threads_cancel_run+0x5a> 112426: 66 90 xchg %ax,%ax thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 112428: 9c pushf 112429: fa cli 11242a: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 11242b: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11242e: 8b 17 mov (%edi),%edx previous = the_node->previous; 112430: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 112433: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 112436: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 112438: 51 push %ecx 112439: 9d popf (*handler->routine)( handler->arg ); 11243a: 83 ec 0c sub $0xc,%esp 11243d: ff 77 0c pushl 0xc(%edi) 112440: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 112443: 89 3c 24 mov %edi,(%esp) 112446: e8 0d c2 ff ff call 10e658 <_Workspace_Free> POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 11244b: 83 c4 10 add $0x10,%esp 11244e: 39 9e d8 00 00 00 cmp %ebx,0xd8(%esi) 112454: 75 d2 jne 112428 <_POSIX_Threads_cancel_run+0x2c> <== ALWAYS TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 112456: 8d 65 f4 lea -0xc(%ebp),%esp 112459: 5b pop %ebx 11245a: 5e pop %esi 11245b: 5f pop %edi 11245c: c9 leave 11245d: c3 ret 00111004 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 111004: 55 push %ebp 111005: 89 e5 mov %esp,%ebp 111007: 56 push %esi 111008: 53 push %ebx 111009: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 11100c: 83 ec 0c sub $0xc,%esp 11100f: 53 push %ebx 111010: e8 2f e0 ff ff call 10f044 <_Watchdog_Remove> _ISR_Disable( level ); 111015: 9c pushf 111016: fa cli 111017: 5e pop %esi /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 111018: 83 c4 10 add $0x10,%esp 11101b: 8b 43 08 mov 0x8(%ebx),%eax 11101e: 85 c0 test %eax,%eax 111020: 74 0e je 111030 <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 111022: 56 push %esi 111023: 9d popf 111024: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 111026: 8d 65 f8 lea -0x8(%ebp),%esp 111029: 5b pop %ebx 11102a: 5e pop %esi 11102b: c9 leave 11102c: c3 ret 11102d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 111030: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 111037: 8b 45 14 mov 0x14(%ebp),%eax 11103a: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 11103d: 8b 45 10 mov 0x10(%ebp),%eax 111040: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 111043: 8b 45 18 mov 0x18(%ebp),%eax 111046: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 111049: 8b 45 0c mov 0xc(%ebp),%eax 11104c: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11104f: 83 ec 08 sub $0x8,%esp 111052: 53 push %ebx 111053: 68 98 94 12 00 push $0x129498 111058: e8 af de ff ff call 10ef0c <_Watchdog_Insert> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 11105d: 56 push %esi 11105e: 9d popf 11105f: b0 01 mov $0x1,%al return true; 111061: 83 c4 10 add $0x10,%esp } 111064: 8d 65 f8 lea -0x8(%ebp),%esp 111067: 5b pop %ebx 111068: 5e pop %esi 111069: c9 leave 11106a: c3 ret 0010b694 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10b694: 55 push %ebp 10b695: 89 e5 mov %esp,%ebp 10b697: 53 push %ebx 10b698: 83 ec 04 sub $0x4,%esp 10b69b: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10b69e: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b6a1: 8b 53 54 mov 0x54(%ebx),%edx 10b6a4: 85 d2 test %edx,%edx 10b6a6: 75 28 jne 10b6d0 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10b6a8: 8b 43 58 mov 0x58(%ebx),%eax 10b6ab: 85 c0 test %eax,%eax 10b6ad: 75 21 jne 10b6d0 <_POSIX_Timer_TSR+0x3c> <== NEVER TAKEN /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b6af: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 10b6b3: 83 ec 08 sub $0x8,%esp 10b6b6: ff 73 44 pushl 0x44(%ebx) 10b6b9: ff 73 38 pushl 0x38(%ebx) 10b6bc: e8 f7 54 00 00 call 110bb8 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10b6c1: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10b6c8: 83 c4 10 add $0x10,%esp } 10b6cb: 8b 5d fc mov -0x4(%ebp),%ebx 10b6ce: c9 leave 10b6cf: c3 ret ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10b6d0: 83 ec 0c sub $0xc,%esp 10b6d3: 53 push %ebx 10b6d4: 68 94 b6 10 00 push $0x10b694 10b6d9: ff 73 08 pushl 0x8(%ebx) 10b6dc: ff 73 64 pushl 0x64(%ebx) 10b6df: 8d 43 10 lea 0x10(%ebx),%eax 10b6e2: 50 push %eax 10b6e3: e8 1c 59 00 00 call 111004 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10b6e8: 83 c4 20 add $0x20,%esp 10b6eb: 84 c0 test %al,%al 10b6ed: 74 dc je 10b6cb <_POSIX_Timer_TSR+0x37> <== ALWAYS TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10b6ef: 83 ec 0c sub $0xc,%esp 10b6f2: 8d 43 6c lea 0x6c(%ebx),%eax 10b6f5: 50 push %eax 10b6f6: e8 65 16 00 00 call 10cd60 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b6fb: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10b6ff: 83 c4 10 add $0x10,%esp 10b702: eb af jmp 10b6b3 <_POSIX_Timer_TSR+0x1f> <== ALWAYS TAKEN 001123e0 <_POSIX_signals_Alarm_TSR>: void _POSIX_signals_Alarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 1123e0: 55 push %ebp 1123e1: 89 e5 mov %esp,%ebp 1123e3: 83 ec 08 sub $0x8,%esp int status; status = kill( getpid(), SIGALRM ); 1123e6: e8 35 ff ff ff call 112320 1123eb: c7 45 0c 0e 00 00 00 movl $0xe,0xc(%ebp) 1123f2: 89 45 08 mov %eax,0x8(%ebp) /* XXX can't print from an ISR, should this be fatal? */ } 1123f5: c9 leave void *argument __attribute__((unused)) ) { int status; status = kill( getpid(), SIGALRM ); 1123f6: e9 05 01 00 00 jmp 112500 <== ALWAYS TAKEN 00112518 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 112518: 55 push %ebp 112519: 89 e5 mov %esp,%ebp 11251b: 57 push %edi 11251c: 56 push %esi 11251d: 53 push %ebx 11251e: 83 ec 48 sub $0x48,%esp 112521: 8b 75 08 mov 0x8(%ebp),%esi 112524: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 112527: 6a 01 push $0x1 112529: 0f b6 45 10 movzbl 0x10(%ebp),%eax 11252d: 50 push %eax 11252e: 8d 7d dc lea -0x24(%ebp),%edi 112531: 57 push %edi 112532: 53 push %ebx 112533: 56 push %esi 112534: e8 6b 00 00 00 call 1125a4 <_POSIX_signals_Clear_signals> <== ALWAYS TAKEN 112539: 83 c4 20 add $0x20,%esp 11253c: 84 c0 test %al,%al 11253e: 74 58 je 112598 <_POSIX_signals_Check_signal+0x80> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 112540: 8d 04 5b lea (%ebx,%ebx,2),%eax 112543: c1 e0 02 shl $0x2,%eax 112546: 8b 90 c8 79 12 00 mov 0x1279c8(%eax),%edx 11254c: 89 55 c4 mov %edx,-0x3c(%ebp) 11254f: 4a dec %edx 112550: 74 46 je 112598 <_POSIX_signals_Check_signal+0x80> <== ALWAYS TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 112552: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 112558: 8b 90 c4 79 12 00 mov 0x1279c4(%eax),%edx 11255e: 09 ca or %ecx,%edx 112560: 89 96 c4 00 00 00 mov %edx,0xc4(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 112566: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 11256d: 74 21 je 112590 <_POSIX_signals_Check_signal+0x78> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 11256f: 83 ec 0c sub $0xc,%esp 112572: 53 push %ebx 112573: 89 4d d4 mov %ecx,-0x2c(%ebp) 112576: ff 55 c4 call *-0x3c(%ebp) 112579: 83 c4 10 add $0x10,%esp 11257c: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 11257f: 89 8e c4 00 00 00 mov %ecx,0xc4(%esi) 112585: b0 01 mov $0x1,%al return true; } 112587: 8d 65 f4 lea -0xc(%ebp),%esp 11258a: 5b pop %ebx 11258b: 5e pop %esi 11258c: 5f pop %edi 11258d: c9 leave 11258e: c3 ret 11258f: 90 nop <== NOT EXECUTED /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 112590: 50 push %eax 112591: 6a 00 push $0x0 112593: 57 push %edi 112594: eb dc jmp 112572 <_POSIX_signals_Check_signal+0x5a> <== ALWAYS TAKEN 112596: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 112598: 31 c0 xor %eax,%eax } 11259a: 8d 65 f4 lea -0xc(%ebp),%esp 11259d: 5b pop %ebx 11259e: 5e pop %esi 11259f: 5f pop %edi 1125a0: c9 leave 1125a1: c3 ret 0011352c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 11352c: 55 push %ebp 11352d: 89 e5 mov %esp,%ebp 11352f: 53 push %ebx 113530: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 113533: 9c pushf 113534: fa cli 113535: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 113536: 8d 04 49 lea (%ecx,%ecx,2),%eax 113539: c1 e0 02 shl $0x2,%eax 11353c: 83 b8 c0 79 12 00 02 cmpl $0x2,0x1279c0(%eax) 113543: 74 23 je 113568 <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 113545: 49 dec %ecx 113546: b8 fe ff ff ff mov $0xfffffffe,%eax 11354b: d3 c0 rol %cl,%eax 11354d: 23 05 a0 7b 12 00 and 0x127ba0,%eax 113553: a3 a0 7b 12 00 mov %eax,0x127ba0 if ( !_POSIX_signals_Pending ) 113558: 85 c0 test %eax,%eax 11355a: 75 06 jne 113562 <_POSIX_signals_Clear_process_signals+0x36> <== ALWAYS TAKEN _Thread_Do_post_task_switch_extension--; 11355c: ff 0d 7c 74 12 00 decl 0x12747c } _ISR_Enable( level ); 113562: 52 push %edx 113563: 9d popf } 113564: 5b pop %ebx 113565: c9 leave 113566: c3 ret 113567: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113568: 8d 98 c4 7b 12 00 lea 0x127bc4(%eax),%ebx 11356e: 39 98 c0 7b 12 00 cmp %ebx,0x127bc0(%eax) 113574: 75 ec jne 113562 <_POSIX_signals_Clear_process_signals+0x36> <== ALWAYS TAKEN 113576: eb cd jmp 113545 <_POSIX_signals_Clear_process_signals+0x19> <== ALWAYS TAKEN 001125a4 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 1125a4: 55 push %ebp 1125a5: 89 e5 mov %esp,%ebp 1125a7: 57 push %edi 1125a8: 56 push %esi 1125a9: 53 push %ebx 1125aa: 83 ec 1c sub $0x1c,%esp 1125ad: 8b 5d 0c mov 0xc(%ebp),%ebx 1125b0: 0f b6 7d 14 movzbl 0x14(%ebp),%edi static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1125b4: 8d 4b ff lea -0x1(%ebx),%ecx 1125b7: b8 01 00 00 00 mov $0x1,%eax 1125bc: d3 e0 shl %cl,%eax /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 1125be: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 1125c2: 75 3c jne 112600 <_POSIX_signals_Clear_signals+0x5c> 1125c4: b9 ff ff ff ff mov $0xffffffff,%ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 1125c9: 9c pushf 1125ca: fa cli 1125cb: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 1125ce: 89 fa mov %edi,%edx 1125d0: 84 d2 test %dl,%dl 1125d2: 74 3c je 112610 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 1125d4: 23 05 a0 7b 12 00 and 0x127ba0,%eax 1125da: 85 c8 test %ecx,%eax 1125dc: 74 5e je 11263c <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1125de: 8d 14 5b lea (%ebx,%ebx,2),%edx 1125e1: c1 e2 02 shl $0x2,%edx 1125e4: 83 ba c0 79 12 00 02 cmpl $0x2,0x1279c0(%edx) 1125eb: 74 53 je 112640 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1125ed: 83 ec 0c sub $0xc,%esp 1125f0: 53 push %ebx 1125f1: e8 36 0f 00 00 call 11352c <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN 1125f6: b0 01 mov $0x1,%al 1125f8: 83 c4 10 add $0x10,%esp 1125fb: eb 30 jmp 11262d <_POSIX_signals_Clear_signals+0x89> <== ALWAYS TAKEN 1125fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 112600: 8b 55 08 mov 0x8(%ebp),%edx 112603: 8b 8a c4 00 00 00 mov 0xc4(%edx),%ecx 112609: f7 d1 not %ecx 11260b: eb bc jmp 1125c9 <_POSIX_signals_Clear_signals+0x25> <== ALWAYS TAKEN 11260d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 112610: 8b 55 08 mov 0x8(%ebp),%edx 112613: 8b 9a c8 00 00 00 mov 0xc8(%edx),%ebx 112619: 89 c6 mov %eax,%esi 11261b: 21 de and %ebx,%esi 11261d: 85 ce test %ecx,%esi 11261f: 74 1b je 11263c <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 112621: f7 d0 not %eax 112623: 21 d8 and %ebx,%eax 112625: 89 82 c8 00 00 00 mov %eax,0xc8(%edx) 11262b: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 11262d: ff 75 e4 pushl -0x1c(%ebp) 112630: 9d popf return do_callout; } 112631: 8d 65 f4 lea -0xc(%ebp),%esp 112634: 5b pop %ebx 112635: 5e pop %esi 112636: 5f pop %edi 112637: c9 leave 112638: c3 ret 112639: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 11263c: 31 c0 xor %eax,%eax 11263e: eb ed jmp 11262d <_POSIX_signals_Clear_signals+0x89> <== ALWAYS TAKEN _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 112640: 8d 8a c0 7b 12 00 lea 0x127bc0(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112646: 8b 82 c0 7b 12 00 mov 0x127bc0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11264c: 8d 71 04 lea 0x4(%ecx),%esi 11264f: 39 f0 cmp %esi,%eax 112651: 74 45 je 112698 <_POSIX_signals_Clear_signals+0xf4> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112653: 8b 30 mov (%eax),%esi the_chain->first = new_first; 112655: 89 b2 c0 7b 12 00 mov %esi,0x127bc0(%edx) new_first->previous = _Chain_Head(the_chain); 11265b: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 11265e: 83 ec 0c sub $0xc,%esp 112661: 53 push %ebx 112662: 89 45 e0 mov %eax,-0x20(%ebp) 112665: e8 c2 0e 00 00 call 11352c <_POSIX_signals_Clear_process_signals> <== ALWAYS TAKEN * It may be impossible to get here with an empty chain * BUT until that is proven we need to be defensive and * protect against it. */ if ( psiginfo ) { *info = psiginfo->Info; 11266a: 8b 45 e0 mov -0x20(%ebp),%eax 11266d: 8d 70 08 lea 0x8(%eax),%esi 112670: b9 03 00 00 00 mov $0x3,%ecx 112675: 8b 7d 10 mov 0x10(%ebp),%edi 112678: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11267a: c7 00 44 7b 12 00 movl $0x127b44,(%eax) old_last_node = the_chain->last; 112680: 8b 15 48 7b 12 00 mov 0x127b48,%edx the_chain->last = the_node; 112686: a3 48 7b 12 00 mov %eax,0x127b48 old_last_node->next = the_node; 11268b: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11268d: 89 50 04 mov %edx,0x4(%eax) 112690: 83 c4 10 add $0x10,%esp 112693: e9 55 ff ff ff jmp 1125ed <_POSIX_signals_Clear_signals+0x49> <== ALWAYS TAKEN if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 112698: 83 ec 0c sub $0xc,%esp 11269b: 53 push %ebx 11269c: e8 8b 0e 00 00 call 11352c <_POSIX_signals_Clear_process_signals> 1126a1: 83 c4 10 add $0x10,%esp 1126a4: e9 44 ff ff ff jmp 1125ed <_POSIX_signals_Clear_signals+0x49> <== ALWAYS TAKEN 0010bf44 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10bf44: 55 push %ebp 10bf45: 89 e5 mov %esp,%ebp 10bf47: 56 push %esi 10bf48: 53 push %ebx 10bf49: 8b 55 08 mov 0x8(%ebp),%edx 10bf4c: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10bf51: bb 01 00 00 00 mov $0x1,%ebx 10bf56: 8d 48 ff lea -0x1(%eax),%ecx 10bf59: 89 de mov %ebx,%esi 10bf5b: d3 e6 shl %cl,%esi 10bf5d: 85 d6 test %edx,%esi 10bf5f: 75 20 jne 10bf81 <_POSIX_signals_Get_highest+0x3d> <== ALWAYS TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10bf61: 40 inc %eax 10bf62: 83 f8 20 cmp $0x20,%eax 10bf65: 75 ef jne 10bf56 <_POSIX_signals_Get_highest+0x12> 10bf67: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10bf69: bb 01 00 00 00 mov $0x1,%ebx 10bf6e: eb 06 jmp 10bf76 <_POSIX_signals_Get_highest+0x32> <== ALWAYS TAKEN */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10bf70: 40 inc %eax 10bf71: 83 f8 1b cmp $0x1b,%eax 10bf74: 74 0b je 10bf81 <_POSIX_signals_Get_highest+0x3d> <== ALWAYS TAKEN if ( set & signo_to_mask( signo ) ) { 10bf76: 8d 48 ff lea -0x1(%eax),%ecx 10bf79: 89 de mov %ebx,%esi 10bf7b: d3 e6 shl %cl,%esi 10bf7d: 85 d6 test %edx,%esi 10bf7f: 74 ef je 10bf70 <_POSIX_signals_Get_highest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10bf81: 5b pop %ebx 10bf82: 5e pop %esi 10bf83: c9 leave 10bf84: c3 ret 0010fe68 <_POSIX_signals_Manager_Initialization>: * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) { 10fe68: 55 push %ebp 10fe69: 89 e5 mov %esp,%ebp 10fe6b: 57 push %edi 10fe6c: 56 push %esi 10fe6d: 53 push %ebx 10fe6e: 83 ec 18 sub $0x18,%esp uint32_t signo; uint32_t maximum_queued_signals; maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals; 10fe71: 8b 1d 34 56 12 00 mov 0x125634,%ebx assert( sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors) ); #endif memcpy( 10fe77: b8 c0 79 12 00 mov $0x1279c0,%eax 10fe7c: be e0 12 12 00 mov $0x1212e0,%esi 10fe81: b9 60 00 00 00 mov $0x60,%ecx 10fe86: 89 c7 mov %eax,%edi 10fe88: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ); /* * Initialize the set of pending signals for the entire process */ sigemptyset( &_POSIX_signals_Pending ); 10fe8a: 68 a0 7b 12 00 push $0x127ba0 10fe8f: e8 e4 04 00 00 call 110378 <== ALWAYS TAKEN /* * Initialize the queue we use to block for signals */ _Thread_queue_Initialize( 10fe94: 6a 0b push $0xb 10fe96: 68 00 80 00 10 push $0x10008000 10fe9b: 6a 00 push $0x0 10fe9d: 68 60 7b 12 00 push $0x127b60 10fea2: e8 7d dd ff ff call 10dc24 <_Thread_queue_Initialize> 10fea7: b8 cc 7b 12 00 mov $0x127bcc,%eax /*PAGE * * _POSIX_signals_Manager_Initialization */ void _POSIX_signals_Manager_Initialization(void) 10feac: 83 c4 20 add $0x20,%esp 10feaf: 90 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10feb0: 8d 50 04 lea 0x4(%eax),%edx 10feb3: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10feb5: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10febc: 89 40 08 mov %eax,0x8(%eax) 10febf: 83 c0 0c add $0xc,%eax /* XXX status codes */ /* * Allocate the siginfo pools. */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) 10fec2: 3d 40 7d 12 00 cmp $0x127d40,%eax 10fec7: 75 e7 jne 10feb0 <_POSIX_signals_Manager_Initialization+0x48> _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { 10fec9: 85 db test %ebx,%ebx 10fecb: 75 76 jne 10ff43 <_POSIX_signals_Manager_Initialization+0xdb> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fecd: c7 05 40 7b 12 00 44 movl $0x127b44,0x127b40 10fed4: 7b 12 00 the_chain->permanent_null = NULL; 10fed7: c7 05 44 7b 12 00 00 movl $0x0,0x127b44 10fede: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10fee1: c7 05 48 7b 12 00 40 movl $0x127b40,0x127b48 10fee8: 7b 12 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10feeb: c7 05 28 7e 12 00 00 movl $0x0,0x127e28 10fef2: 00 00 00 the_watchdog->routine = routine; 10fef5: c7 05 3c 7e 12 00 00 movl $0x0,0x127e3c 10fefc: 00 00 00 the_watchdog->id = id; 10feff: c7 05 40 7e 12 00 00 movl $0x0,0x127e40 10ff06: 00 00 00 the_watchdog->user_data = user_data; 10ff09: c7 05 44 7e 12 00 00 movl $0x0,0x127e44 10ff10: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ff13: c7 05 48 7d 12 00 00 movl $0x0,0x127d48 10ff1a: 00 00 00 the_watchdog->routine = routine; 10ff1d: c7 05 5c 7d 12 00 00 movl $0x0,0x127d5c 10ff24: 00 00 00 the_watchdog->id = id; 10ff27: c7 05 60 7d 12 00 00 movl $0x0,0x127d60 10ff2e: 00 00 00 the_watchdog->user_data = user_data; 10ff31: c7 05 64 7d 12 00 00 movl $0x0,0x127d64 10ff38: 00 00 00 /* * Initialize the Alarm Timer */ _Watchdog_Initialize( &_POSIX_signals_Alarm_timer, NULL, 0, NULL ); _Watchdog_Initialize( &_POSIX_signals_Ualarm_timer, NULL, 0, NULL ); } 10ff3b: 8d 65 f4 lea -0xc(%ebp),%esp 10ff3e: 5b pop %ebx 10ff3f: 5e pop %esi 10ff40: 5f pop %edi 10ff41: c9 leave 10ff42: c3 ret */ for ( signo=1 ; signo<= SIGRTMAX ; signo++ ) _Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] ); if ( maximum_queued_signals ) { _Chain_Initialize( 10ff43: 83 ec 0c sub $0xc,%esp 10ff46: 8d 04 9b lea (%ebx,%ebx,4),%eax 10ff49: c1 e0 02 shl $0x2,%eax 10ff4c: 50 push %eax 10ff4d: e8 be e6 ff ff call 10e610 <_Workspace_Allocate_or_fatal_error> 10ff52: 6a 14 push $0x14 10ff54: 53 push %ebx 10ff55: 50 push %eax 10ff56: 68 40 7b 12 00 push $0x127b40 10ff5b: e8 48 0a 00 00 call 1109a8 <_Chain_Initialize> <== ALWAYS TAKEN 10ff60: 83 c4 20 add $0x20,%esp 10ff63: eb 86 jmp 10feeb <_POSIX_signals_Manager_Initialization+0x83> <== ALWAYS TAKEN 0010ff68 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 10ff68: 55 push %ebp 10ff69: 89 e5 mov %esp,%ebp 10ff6b: 56 push %esi 10ff6c: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ff6d: 8b 45 08 mov 0x8(%ebp),%eax 10ff70: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi 10ff76: 66 90 xchg %ax,%ax * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 10ff78: 9c pushf 10ff79: fa cli 10ff7a: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 10ff7b: 8b 15 a0 7b 12 00 mov 0x127ba0,%edx 10ff81: 0b 96 c8 00 00 00 or 0xc8(%esi),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 10ff87: 8b 86 c4 00 00 00 mov 0xc4(%esi),%eax 10ff8d: f7 d0 not %eax 10ff8f: 85 c2 test %eax,%edx 10ff91: 74 4a je 10ffdd <_POSIX_signals_Post_switch_extension+0x75> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 10ff93: 51 push %ecx 10ff94: 9d popf 10ff95: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10ff9a: 52 push %edx 10ff9b: 6a 00 push $0x0 10ff9d: 53 push %ebx 10ff9e: 56 push %esi 10ff9f: e8 74 25 00 00 call 112518 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10ffa4: 83 c4 0c add $0xc,%esp 10ffa7: 6a 01 push $0x1 10ffa9: 53 push %ebx 10ffaa: 56 push %esi 10ffab: e8 68 25 00 00 call 112518 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10ffb0: 43 inc %ebx 10ffb1: 83 c4 10 add $0x10,%esp 10ffb4: 83 fb 20 cmp $0x20,%ebx 10ffb7: 75 e1 jne 10ff9a <_POSIX_signals_Post_switch_extension+0x32> 10ffb9: b3 01 mov $0x1,%bl 10ffbb: 90 nop _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 10ffbc: 50 push %eax 10ffbd: 6a 00 push $0x0 10ffbf: 53 push %ebx 10ffc0: 56 push %esi 10ffc1: e8 52 25 00 00 call 112518 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 10ffc6: 83 c4 0c add $0xc,%esp 10ffc9: 6a 01 push $0x1 10ffcb: 53 push %ebx 10ffcc: 56 push %esi 10ffcd: e8 46 25 00 00 call 112518 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10ffd2: 43 inc %ebx 10ffd3: 83 c4 10 add $0x10,%esp 10ffd6: 83 fb 1b cmp $0x1b,%ebx 10ffd9: 75 e1 jne 10ffbc <_POSIX_signals_Post_switch_extension+0x54> 10ffdb: eb 9b jmp 10ff78 <_POSIX_signals_Post_switch_extension+0x10> <== ALWAYS TAKEN */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 10ffdd: 51 push %ecx 10ffde: 9d popf for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 10ffdf: 8d 65 f8 lea -0x8(%ebp),%esp 10ffe2: 5b pop %ebx 10ffe3: 5e pop %esi 10ffe4: c9 leave 10ffe5: c3 ret 001104d8 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id __attribute__((unused)), void *argument __attribute__((unused)) ) { 1104d8: 55 push %ebp 1104d9: 89 e5 mov %esp,%ebp 1104db: 83 ec 08 sub $0x8,%esp /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 1104de: e8 3d 1e 00 00 call 112320 1104e3: 83 ec 08 sub $0x8,%esp 1104e6: 6a 0e push $0xe 1104e8: 50 push %eax 1104e9: e8 12 20 00 00 call 112500 <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 1104ee: c7 04 24 40 7d 12 00 movl $0x127d40,(%esp) 1104f5: e8 3e e0 ff ff call 10e538 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1104fa: 83 c4 10 add $0x10,%esp 1104fd: c7 45 0c 40 7d 12 00 movl $0x127d40,0xc(%ebp) 110504: c7 45 08 b8 74 12 00 movl $0x1274b8,0x8(%ebp) /* * If the reset interval is non-zero, reschedule ourselves. */ _Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); } 11050b: c9 leave 11050c: e9 ef de ff ff jmp 10e400 <_Watchdog_Insert> 0011359c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 11359c: 55 push %ebp 11359d: 89 e5 mov %esp,%ebp 11359f: 57 push %edi 1135a0: 56 push %esi 1135a1: 53 push %ebx 1135a2: 83 ec 0c sub $0xc,%esp 1135a5: 8b 5d 08 mov 0x8(%ebp),%ebx 1135a8: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1135ab: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1135b1: 8d 4a ff lea -0x1(%edx),%ecx 1135b4: b8 01 00 00 00 mov $0x1,%eax 1135b9: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1135bb: 8b 4b 10 mov 0x10(%ebx),%ecx 1135be: 89 cf mov %ecx,%edi 1135c0: 81 e7 00 80 00 10 and $0x10008000,%edi 1135c6: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1135cc: 74 6e je 11363c <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1135ce: 8b 96 c4 00 00 00 mov 0xc4(%esi),%edx 1135d4: f7 d2 not %edx 1135d6: 85 d0 test %edx,%eax 1135d8: 74 56 je 113630 <_POSIX_signals_Unblock_thread+0x94> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 1135da: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 1135de: f7 c1 00 00 00 10 test $0x10000000,%ecx 1135e4: 74 32 je 113618 <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 1135e6: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 1135ed: 83 e1 08 and $0x8,%ecx 1135f0: 74 3e je 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1135f2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1135f6: 0f 84 a8 00 00 00 je 1136a4 <_POSIX_signals_Unblock_thread+0x108> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 1135fc: 83 ec 08 sub $0x8,%esp 1135ff: 68 f8 ff 03 10 push $0x1003fff8 113604: 53 push %ebx 113605: e8 02 9b ff ff call 10d10c <_Thread_Clear_state> 11360a: 31 c0 xor %eax,%eax 11360c: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 11360f: 8d 65 f4 lea -0xc(%ebp),%esp 113612: 5b pop %ebx 113613: 5e pop %esi 113614: 5f pop %edi 113615: c9 leave 113616: c3 ret 113617: 90 nop <== NOT EXECUTED if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 113618: 85 c9 test %ecx,%ecx 11361a: 75 14 jne 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 11361c: a1 74 74 12 00 mov 0x127474,%eax 113621: 85 c0 test %eax,%eax 113623: 74 0b je 113630 <_POSIX_signals_Unblock_thread+0x94> 113625: 3b 1d 98 74 12 00 cmp 0x127498,%ebx 11362b: 74 6b je 113698 <_POSIX_signals_Unblock_thread+0xfc> <== NEVER TAKEN 11362d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _ISR_Signals_to_thread_executing = true; 113630: 31 c0 xor %eax,%eax } } return false; } 113632: 8d 65 f4 lea -0xc(%ebp),%esp 113635: 5b pop %ebx 113636: 5e pop %esi 113637: 5f pop %edi 113638: c9 leave 113639: c3 ret 11363a: 66 90 xchg %ax,%ax <== NOT EXECUTED * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 11363c: 85 43 30 test %eax,0x30(%ebx) 11363f: 74 33 je 113674 <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 113641: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 113648: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11364b: 8b 4d 10 mov 0x10(%ebp),%ecx 11364e: 85 c9 test %ecx,%ecx 113650: 74 32 je 113684 <_POSIX_signals_Unblock_thread+0xe8> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 113652: b9 03 00 00 00 mov $0x3,%ecx 113657: 89 c7 mov %eax,%edi 113659: 8b 75 10 mov 0x10(%ebp),%esi 11365c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 11365e: 83 ec 0c sub $0xc,%esp 113661: 53 push %ebx 113662: e8 65 a5 ff ff call 10dbcc <_Thread_queue_Extract_with_proxy> 113667: b0 01 mov $0x1,%al return true; 113669: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 11366c: 8d 65 f4 lea -0xc(%ebp),%esp 11366f: 5b pop %ebx 113670: 5e pop %esi 113671: 5f pop %edi 113672: c9 leave 113673: c3 ret * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 113674: 8b 8e c4 00 00 00 mov 0xc4(%esi),%ecx 11367a: f7 d1 not %ecx 11367c: 85 c8 test %ecx,%eax 11367e: 75 c1 jne 113641 <_POSIX_signals_Unblock_thread+0xa5> 113680: eb ae jmp 113630 <_POSIX_signals_Unblock_thread+0x94> <== ALWAYS TAKEN 113682: 66 90 xchg %ax,%ax <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 113684: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 113686: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 11368d: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 113694: eb c8 jmp 11365e <_POSIX_signals_Unblock_thread+0xc2> <== ALWAYS TAKEN 113696: 66 90 xchg %ax,%ax <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 113698: c6 05 48 75 12 00 01 movb $0x1,0x127548 11369f: 31 c0 xor %eax,%eax 1136a1: eb 8f jmp 113632 <_POSIX_signals_Unblock_thread+0x96> <== ALWAYS TAKEN 1136a3: 90 nop <== NOT EXECUTED _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 1136a4: 83 ec 0c sub $0xc,%esp 1136a7: 8d 43 48 lea 0x48(%ebx),%eax 1136aa: 50 push %eax 1136ab: e8 88 ae ff ff call 10e538 <_Watchdog_Remove> 1136b0: 83 c4 10 add $0x10,%esp 1136b3: e9 44 ff ff ff jmp 1135fc <_POSIX_signals_Unblock_thread+0x60> <== ALWAYS TAKEN 0012eeec <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 12eeec: 55 push %ebp 12eeed: 89 e5 mov %esp,%ebp 12eeef: 56 push %esi 12eef0: 53 push %ebx 12eef1: 8b 5d 08 mov 0x8(%ebp),%ebx 12eef4: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 12eef7: 85 db test %ebx,%ebx 12eef9: 74 35 je 12ef30 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 12eefb: 85 f6 test %esi,%esi 12eefd: 74 31 je 12ef30 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 12eeff: 83 ec 0c sub $0xc,%esp 12ef02: ff 35 f0 f0 16 00 pushl 0x16f0f0 12ef08: e8 0f 2f fe ff call 111e1c <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 12ef0d: 5a pop %edx 12ef0e: 59 pop %ecx 12ef0f: 56 push %esi 12ef10: 53 push %ebx 12ef11: e8 32 ec 00 00 call 13db48 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 12ef16: 58 pop %eax 12ef17: ff 35 f0 f0 16 00 pushl 0x16f0f0 12ef1d: e8 42 2f fe ff call 111e64 <_API_Mutex_Unlock> 12ef22: b0 01 mov $0x1,%al return true; 12ef24: 83 c4 10 add $0x10,%esp } 12ef27: 8d 65 f8 lea -0x8(%ebp),%esp 12ef2a: 5b pop %ebx 12ef2b: 5e pop %esi 12ef2c: c9 leave 12ef2d: c3 ret 12ef2e: 66 90 xchg %ax,%ax <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 12ef30: 31 c0 xor %eax,%eax } 12ef32: 8d 65 f8 lea -0x8(%ebp),%esp 12ef35: 5b pop %ebx 12ef36: 5e pop %esi 12ef37: c9 leave 12ef38: c3 ret 00110758 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110758: 55 push %ebp 110759: 89 e5 mov %esp,%ebp 11075b: 56 push %esi 11075c: 53 push %ebx 11075d: 83 ec 10 sub $0x10,%esp 110760: 8b 5d 08 mov 0x8(%ebp),%ebx 110763: 8b 75 0c mov 0xc(%ebp),%esi 110766: 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 ) { 110769: 8b 15 38 e0 12 00 mov 0x12e038,%edx 11076f: 85 d2 test %edx,%edx 110771: 74 19 je 11078c <_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 ); 110773: 0f b6 c0 movzbl %al,%eax 110776: 89 45 10 mov %eax,0x10(%ebp) 110779: 89 75 0c mov %esi,0xc(%ebp) 11077c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 11077f: 8d 65 f8 lea -0x8(%ebp),%esp 110782: 5b pop %ebx 110783: 5e pop %esi 110784: 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 ); 110785: e9 f2 f1 ff ff jmp 10f97c <_Heap_Walk> 11078a: 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(); 11078c: 83 ec 0c sub $0xc,%esp 11078f: ff 35 f0 e0 12 00 pushl 0x12e0f0 110795: 88 45 f4 mov %al,-0xc(%ebp) 110798: e8 eb e3 ff ff call 10eb88 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 11079d: 83 c4 0c add $0xc,%esp 1107a0: 8a 45 f4 mov -0xc(%ebp),%al 1107a3: 0f b6 c0 movzbl %al,%eax 1107a6: 50 push %eax 1107a7: 56 push %esi 1107a8: 53 push %ebx 1107a9: e8 ce f1 ff ff call 10f97c <_Heap_Walk> _RTEMS_Unlock_allocator(); 1107ae: 5a pop %edx 1107af: ff 35 f0 e0 12 00 pushl 0x12e0f0 1107b5: 88 45 f4 mov %al,-0xc(%ebp) 1107b8: e8 13 e4 ff ff call 10ebd0 <_API_Mutex_Unlock> 1107bd: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 1107c0: 8a 45 f4 mov -0xc(%ebp),%al 1107c3: 8d 65 f8 lea -0x8(%ebp),%esp 1107c6: 5b pop %ebx 1107c7: 5e pop %esi 1107c8: c9 leave 1107c9: c3 ret 001108c4 <_RTEMS_Tasks_Invoke_task_variable_dtor>: void _RTEMS_Tasks_Invoke_task_variable_dtor( Thread_Control *the_thread, rtems_task_variable_t *tvp ) { 1108c4: 55 push %ebp 1108c5: 89 e5 mov %esp,%ebp 1108c7: 56 push %esi 1108c8: 53 push %ebx 1108c9: 8b 5d 0c mov 0xc(%ebp),%ebx void (*dtor)(void *); void *value; dtor = tvp->dtor; 1108cc: 8b 43 10 mov 0x10(%ebx),%eax if (_Thread_Is_executing(the_thread)) { 1108cf: 8b 55 08 mov 0x8(%ebp),%edx 1108d2: 3b 15 98 74 12 00 cmp 0x127498,%edx 1108d8: 74 1e je 1108f8 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x34> value = *tvp->ptr; *tvp->ptr = tvp->gval; } else { value = tvp->tval; 1108da: 8b 53 0c mov 0xc(%ebx),%edx } if ( dtor ) 1108dd: 85 c0 test %eax,%eax 1108df: 74 09 je 1108ea <_RTEMS_Tasks_Invoke_task_variable_dtor+0x26> (*dtor)(value); 1108e1: 83 ec 0c sub $0xc,%esp 1108e4: 52 push %edx 1108e5: ff d0 call *%eax 1108e7: 83 c4 10 add $0x10,%esp _Workspace_Free(tvp); 1108ea: 89 5d 08 mov %ebx,0x8(%ebp) } 1108ed: 8d 65 f8 lea -0x8(%ebp),%esp 1108f0: 5b pop %ebx 1108f1: 5e pop %esi 1108f2: c9 leave } if ( dtor ) (*dtor)(value); _Workspace_Free(tvp); 1108f3: e9 60 dd ff ff jmp 10e658 <_Workspace_Free> void (*dtor)(void *); void *value; dtor = tvp->dtor; if (_Thread_Is_executing(the_thread)) { value = *tvp->ptr; 1108f8: 8b 4b 04 mov 0x4(%ebx),%ecx 1108fb: 8b 11 mov (%ecx),%edx *tvp->ptr = tvp->gval; 1108fd: 8b 73 08 mov 0x8(%ebx),%esi 110900: 89 31 mov %esi,(%ecx) 110902: eb d9 jmp 1108dd <_RTEMS_Tasks_Invoke_task_variable_dtor+0x19> <== ALWAYS TAKEN 001106d0 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 1106d0: 55 push %ebp 1106d1: 89 e5 mov %esp,%ebp 1106d3: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 1106d6: a1 60 32 12 00 mov 0x123260,%eax 1106db: 85 c0 test %eax,%eax 1106dd: 74 05 je 1106e4 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 1106df: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 1106e0: ff e0 jmp *%eax 1106e2: 66 90 xchg %ax,%ax <== NOT EXECUTED } 1106e4: c9 leave 1106e5: 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 32 12 00 mov 0x12320c,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10b93b: 8b 3d 08 32 12 00 mov 0x123208,%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 5a 0d 00 00 call 10c6f8 <_Internal_error_Occurred> 001106e8 <_RTEMS_tasks_Manager_initialization>: * * Output parameters: NONE */ void _RTEMS_tasks_Manager_initialization(void) { 1106e8: 55 push %ebp 1106e9: 89 e5 mov %esp,%ebp 1106eb: 83 ec 0c sub $0xc,%esp _Objects_Initialize_information( 1106ee: 6a 04 push $0x4 1106f0: 6a 00 push $0x0 1106f2: 68 08 01 00 00 push $0x108 1106f7: ff 35 e0 31 12 00 pushl 0x1231e0 1106fd: 6a 01 push $0x1 1106ff: 6a 02 push $0x2 110701: 68 60 73 12 00 push $0x127360 110706: e8 9d c5 ff ff call 10cca8 <_Objects_Initialize_information> RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set( User_extensions_Control *extension ) { _User_extensions_Add_set( extension ); 11070b: 83 c4 14 add $0x14,%esp 11070e: 68 a0 50 12 00 push $0x1250a0 110713: e8 74 0d 00 00 call 11148c <_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 ); 110718: c7 04 24 80 50 12 00 movl $0x125080,(%esp) 11071f: e8 6c b6 ff ff call 10bd90 <_API_extensions_Add> 110724: 83 c4 10 add $0x10,%esp MP_PACKET_TASKS, _RTEMS_tasks_MP_Process_packet ); #endif } 110727: c9 leave 110728: c3 ret 0011072c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 11072c: 55 push %ebp 11072d: 89 e5 mov %esp,%ebp 11072f: 57 push %edi 110730: 56 push %esi 110731: 53 push %ebx 110732: 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 ]; 110735: 8b 45 08 mov 0x8(%ebp),%eax 110738: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 11073e: 85 db test %ebx,%ebx 110740: 74 45 je 110787 <_RTEMS_tasks_Post_switch_extension+0x5b> <== ALWAYS TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 110742: 9c pushf 110743: fa cli 110744: 58 pop %eax signal_set = asr->signals_posted; 110745: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 110748: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 11074f: 50 push %eax 110750: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 110751: 85 f6 test %esi,%esi 110753: 74 32 je 110787 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 110755: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110758: 50 push %eax 110759: 8d 7d e4 lea -0x1c(%ebp),%edi 11075c: 57 push %edi 11075d: 68 ff ff 00 00 push $0xffff 110762: ff 73 10 pushl 0x10(%ebx) 110765: e8 da 21 00 00 call 112944 (*asr->handler)( signal_set ); 11076a: 89 34 24 mov %esi,(%esp) 11076d: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 110770: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 110773: 83 c4 0c add $0xc,%esp 110776: 57 push %edi 110777: 68 ff ff 00 00 push $0xffff 11077c: ff 75 e4 pushl -0x1c(%ebp) 11077f: e8 c0 21 00 00 call 112944 110784: 83 c4 10 add $0x10,%esp } 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 00110688 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 110688: 55 push %ebp 110689: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 11068b: 8b 45 08 mov 0x8(%ebp),%eax 11068e: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 110694: 85 c0 test %eax,%eax 110696: 74 13 je 1106ab <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 110698: 8b 50 04 mov 0x4(%eax),%edx 11069b: 8b 0a mov (%edx),%ecx 11069d: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 1106a0: 8b 48 08 mov 0x8(%eax),%ecx 1106a3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1106a5: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 1106a7: 85 c0 test %eax,%eax 1106a9: 75 ed jne 110698 <_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; 1106ab: 8b 45 0c mov 0xc(%ebp),%eax 1106ae: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 1106b4: 85 c0 test %eax,%eax 1106b6: 74 13 je 1106cb <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 1106b8: 8b 50 04 mov 0x4(%eax),%edx 1106bb: 8b 0a mov (%edx),%ecx 1106bd: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 1106c0: 8b 48 0c mov 0xc(%eax),%ecx 1106c3: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 1106c5: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 1106c7: 85 c0 test %eax,%eax 1106c9: 75 ed jne 1106b8 <_RTEMS_tasks_Switch_extension+0x30> <== ALWAYS TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 1106cb: c9 leave 1106cc: c3 ret 0013d5e4 <_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 ) { 13d5e4: 55 push %ebp 13d5e5: 89 e5 mov %esp,%ebp 13d5e7: 57 push %edi 13d5e8: 56 push %esi 13d5e9: 53 push %ebx 13d5ea: 83 ec 38 sub $0x38,%esp 13d5ed: 8b 5d 08 mov 0x8(%ebp),%ebx #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 13d5f0: 8b 7b 40 mov 0x40(%ebx),%edi /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 13d5f3: 8d 75 e0 lea -0x20(%ebp),%esi 13d5f6: 56 push %esi 13d5f7: e8 10 13 ff ff call 12e90c <_TOD_Get_uptime> _Timestamp_Subtract( 13d5fc: 83 c4 0c add $0xc,%esp 13d5ff: ff 75 0c pushl 0xc(%ebp) 13d602: 56 push %esi 13d603: 8d 43 4c lea 0x4c(%ebx),%eax 13d606: 50 push %eax 13d607: e8 1c 70 fd ff call 114628 <_Timespec_Subtract> #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 13d60c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax 13d612: 8b 97 88 00 00 00 mov 0x88(%edi),%edx 13d618: 89 45 d8 mov %eax,-0x28(%ebp) 13d61b: 89 55 dc mov %edx,-0x24(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 13d61e: 83 c4 10 add $0x10,%esp 13d621: 3b 3d f8 f0 16 00 cmp 0x16f0f8,%edi 13d627: 74 0b je 13d634 <_Rate_monotonic_Get_status+0x50> 13d629: b0 01 mov $0x1,%al return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 13d62b: 8d 65 f4 lea -0xc(%ebp),%esp 13d62e: 5b pop %ebx 13d62f: 5e pop %esi 13d630: 5f pop %edi 13d631: c9 leave 13d632: c3 ret 13d633: 90 nop <== NOT EXECUTED if (owning_thread == _Thread_Executing) { Thread_CPU_usage_t ran; /* How much time time since last context switch */ _Timestamp_Subtract( 13d634: 57 push %edi 13d635: 8d 7d d0 lea -0x30(%ebp),%edi 13d638: 57 push %edi 13d639: 56 push %esi 13d63a: 68 00 f1 16 00 push $0x16f100 13d63f: e8 e4 6f fd ff call 114628 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); /* cpu usage += ran */ _Timestamp_Add_to( &used, &ran ); 13d644: 59 pop %ecx 13d645: 5e pop %esi 13d646: 57 push %edi 13d647: 8d 75 d8 lea -0x28(%ebp),%esi 13d64a: 56 push %esi 13d64b: e8 9c 6f fd ff call 1145ec <_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)) 13d650: 83 c3 44 add $0x44,%ebx 13d653: 58 pop %eax 13d654: 5a pop %edx 13d655: 53 push %ebx 13d656: 56 push %esi 13d657: e8 dc 06 00 00 call 13dd38 <_Timespec_Less_than> 13d65c: 83 c4 10 add $0x10,%esp 13d65f: 84 c0 test %al,%al 13d661: 74 05 je 13d668 <_Rate_monotonic_Get_status+0x84> 13d663: 31 c0 xor %eax,%eax 13d665: eb c4 jmp 13d62b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 13d667: 90 nop <== NOT EXECUTED return false; /* used = current cpu usage - cpu usage at start of period */ _Timestamp_Subtract( 13d668: 57 push %edi 13d669: ff 75 10 pushl 0x10(%ebp) 13d66c: 56 push %esi 13d66d: 53 push %ebx 13d66e: e8 b5 6f fd ff call 114628 <_Timespec_Subtract> 13d673: b0 01 mov $0x1,%al 13d675: 83 c4 10 add $0x10,%esp 13d678: eb b1 jmp 13d62b <_Rate_monotonic_Get_status+0x47> <== ALWAYS TAKEN 0013d570 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 13d570: 55 push %ebp 13d571: 89 e5 mov %esp,%ebp 13d573: 57 push %edi 13d574: 56 push %esi 13d575: 53 push %ebx 13d576: 83 ec 28 sub $0x28,%esp 13d579: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 13d57c: 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 ); 13d57f: 8d 7d e0 lea -0x20(%ebp),%edi 13d582: 57 push %edi 13d583: e8 84 13 ff ff call 12e90c <_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; 13d588: 8b 45 e0 mov -0x20(%ebp),%eax 13d58b: 8b 55 e4 mov -0x1c(%ebp),%edx 13d58e: 89 43 4c mov %eax,0x4c(%ebx) 13d591: 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; 13d594: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 13d59a: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 13d5a0: 89 43 44 mov %eax,0x44(%ebx) 13d5a3: 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) { 13d5a6: 83 c4 10 add $0x10,%esp 13d5a9: 3b 35 f8 f0 16 00 cmp 0x16f0f8,%esi 13d5af: 74 0b je 13d5bc <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 13d5b1: 8d 65 f4 lea -0xc(%ebp),%esp 13d5b4: 5b pop %ebx 13d5b5: 5e pop %esi 13d5b6: 5f pop %edi 13d5b7: c9 leave 13d5b8: c3 ret 13d5b9: 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( 13d5bc: 51 push %ecx 13d5bd: 8d 75 d8 lea -0x28(%ebp),%esi 13d5c0: 56 push %esi 13d5c1: 57 push %edi 13d5c2: 68 00 f1 16 00 push $0x16f100 13d5c7: e8 5c 70 fd ff call 114628 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 13d5cc: 58 pop %eax 13d5cd: 5a pop %edx 13d5ce: 56 push %esi 13d5cf: 83 c3 44 add $0x44,%ebx 13d5d2: 53 push %ebx 13d5d3: e8 14 70 fd ff call 1145ec <_Timespec_Add_to> 13d5d8: 83 c4 10 add $0x10,%esp } #endif } 13d5db: 8d 65 f4 lea -0xc(%ebp),%esp 13d5de: 5b pop %ebx 13d5df: 5e pop %esi 13d5e0: 5f pop %edi 13d5e1: c9 leave 13d5e2: c3 ret 0013d91c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13d91c: 55 push %ebp 13d91d: 89 e5 mov %esp,%ebp 13d91f: 83 ec 2c sub $0x2c,%esp 13d922: 8d 45 f4 lea -0xc(%ebp),%eax 13d925: 50 push %eax 13d926: ff 75 08 pushl 0x8(%ebp) 13d929: 68 e0 fc 16 00 push $0x16fce0 13d92e: e8 55 57 fd ff call 113088 <_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 ) { 13d933: 83 c4 10 add $0x10,%esp 13d936: 8b 55 f4 mov -0xc(%ebp),%edx 13d939: 85 d2 test %edx,%edx 13d93b: 75 29 jne 13d966 <_Rate_monotonic_Timeout+0x4a> <== ALWAYS TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13d93d: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13d940: f6 42 11 40 testb $0x40,0x11(%edx) 13d944: 74 08 je 13d94e <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 13d946: 8b 4a 20 mov 0x20(%edx),%ecx 13d949: 3b 48 08 cmp 0x8(%eax),%ecx 13d94c: 74 4e je 13d99c <_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 ) { 13d94e: 83 78 38 01 cmpl $0x1,0x38(%eax) 13d952: 74 14 je 13d968 <_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; 13d954: 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; 13d95b: a1 38 f0 16 00 mov 0x16f038,%eax 13d960: 48 dec %eax 13d961: a3 38 f0 16 00 mov %eax,0x16f038 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13d966: c9 leave 13d967: 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; 13d968: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 13d96f: 83 ec 0c sub $0xc,%esp 13d972: 50 push %eax 13d973: 89 45 e4 mov %eax,-0x1c(%ebp) 13d976: e8 f5 fb ff ff call 13d570 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d97b: 8b 45 e4 mov -0x1c(%ebp),%eax 13d97e: 8b 50 3c mov 0x3c(%eax),%edx 13d981: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d984: 5a pop %edx 13d985: 59 pop %ecx 13d986: 83 c0 10 add $0x10,%eax 13d989: 50 push %eax 13d98a: 68 18 f1 16 00 push $0x16f118 13d98f: e8 64 6f fd ff call 1148f8 <_Watchdog_Insert> 13d994: 83 c4 10 add $0x10,%esp 13d997: eb c2 jmp 13d95b <_Rate_monotonic_Timeout+0x3f> <== ALWAYS TAKEN 13d999: 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 ); 13d99c: 83 ec 08 sub $0x8,%esp 13d99f: 68 f8 ff 03 10 push $0x1003fff8 13d9a4: 52 push %edx 13d9a5: 89 45 e4 mov %eax,-0x1c(%ebp) 13d9a8: e8 57 5c fd ff call 113604 <_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 ); 13d9ad: 8b 45 e4 mov -0x1c(%ebp),%eax 13d9b0: 89 04 24 mov %eax,(%esp) 13d9b3: eb c1 jmp 13d976 <_Rate_monotonic_Timeout+0x5a> <== ALWAYS TAKEN 0013d67c <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 13d67c: 55 push %ebp 13d67d: 89 e5 mov %esp,%ebp 13d67f: 57 push %edi 13d680: 56 push %esi 13d681: 53 push %ebx 13d682: 83 ec 1c sub $0x1c,%esp 13d685: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 13d688: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 13d68b: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 13d68f: 0f 84 bf 00 00 00 je 13d754 <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 13d695: 52 push %edx 13d696: 8d 7d e0 lea -0x20(%ebp),%edi 13d699: 57 push %edi 13d69a: 8d 75 d8 lea -0x28(%ebp),%esi 13d69d: 56 push %esi 13d69e: 53 push %ebx 13d69f: e8 40 ff ff ff call 13d5e4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN if (!valid_status) 13d6a4: 83 c4 10 add $0x10,%esp 13d6a7: 84 c0 test %al,%al 13d6a9: 75 09 jne 13d6b4 <_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 } 13d6ab: 8d 65 f4 lea -0xc(%ebp),%esp 13d6ae: 5b pop %ebx 13d6af: 5e pop %esi 13d6b0: 5f pop %edi 13d6b1: c9 leave 13d6b2: c3 ret 13d6b3: 90 nop <== NOT EXECUTED /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 13d6b4: 83 ec 08 sub $0x8,%esp 13d6b7: 57 push %edi 13d6b8: 8d 43 6c lea 0x6c(%ebx),%eax 13d6bb: 50 push %eax 13d6bc: e8 2b 6f fd ff call 1145ec <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 13d6c1: 59 pop %ecx 13d6c2: 58 pop %eax 13d6c3: 8d 43 5c lea 0x5c(%ebx),%eax 13d6c6: 50 push %eax 13d6c7: 57 push %edi 13d6c8: e8 6b 06 00 00 call 13dd38 <_Timespec_Less_than> 13d6cd: 83 c4 10 add $0x10,%esp 13d6d0: 84 c0 test %al,%al 13d6d2: 74 0c je 13d6e0 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 13d6d4: 8b 45 e0 mov -0x20(%ebp),%eax 13d6d7: 8b 55 e4 mov -0x1c(%ebp),%edx 13d6da: 89 43 5c mov %eax,0x5c(%ebx) 13d6dd: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 13d6e0: 83 ec 08 sub $0x8,%esp 13d6e3: 8d 43 64 lea 0x64(%ebx),%eax 13d6e6: 50 push %eax 13d6e7: 57 push %edi 13d6e8: e8 27 06 00 00 call 13dd14 <_Timespec_Greater_than> 13d6ed: 83 c4 10 add $0x10,%esp 13d6f0: 84 c0 test %al,%al 13d6f2: 74 0c je 13d700 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 13d6f4: 8b 45 e0 mov -0x20(%ebp),%eax 13d6f7: 8b 55 e4 mov -0x1c(%ebp),%edx 13d6fa: 89 43 64 mov %eax,0x64(%ebx) 13d6fd: 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 ); 13d700: 83 ec 08 sub $0x8,%esp 13d703: 56 push %esi 13d704: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 13d70a: 50 push %eax 13d70b: e8 dc 6e fd ff call 1145ec <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 13d710: 58 pop %eax 13d711: 5a pop %edx 13d712: 8d 43 74 lea 0x74(%ebx),%eax 13d715: 50 push %eax 13d716: 56 push %esi 13d717: e8 1c 06 00 00 call 13dd38 <_Timespec_Less_than> 13d71c: 83 c4 10 add $0x10,%esp 13d71f: 84 c0 test %al,%al 13d721: 75 39 jne 13d75c <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 13d723: 83 ec 08 sub $0x8,%esp 13d726: 8d 43 7c lea 0x7c(%ebx),%eax 13d729: 50 push %eax 13d72a: 56 push %esi 13d72b: e8 e4 05 00 00 call 13dd14 <_Timespec_Greater_than> 13d730: 83 c4 10 add $0x10,%esp 13d733: 84 c0 test %al,%al 13d735: 0f 84 70 ff ff ff je 13d6ab <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 13d73b: 8b 45 d8 mov -0x28(%ebp),%eax 13d73e: 8b 55 dc mov -0x24(%ebp),%edx 13d741: 89 43 7c mov %eax,0x7c(%ebx) 13d744: 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 } 13d74a: 8d 65 f4 lea -0xc(%ebp),%esp 13d74d: 5b pop %ebx 13d74e: 5e pop %esi 13d74f: 5f pop %edi 13d750: c9 leave 13d751: c3 ret 13d752: 66 90 xchg %ax,%ax <== NOT EXECUTED */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 13d754: ff 43 58 incl 0x58(%ebx) 13d757: e9 39 ff ff ff jmp 13d695 <_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; 13d75c: 8b 45 d8 mov -0x28(%ebp),%eax 13d75f: 8b 55 dc mov -0x24(%ebp),%edx 13d762: 89 43 74 mov %eax,0x74(%ebx) 13d765: 89 53 78 mov %edx,0x78(%ebx) 13d768: eb b9 jmp 13d723 <_Rate_monotonic_Update_statistics+0xa7> <== ALWAYS TAKEN 0011eb00 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 11eb00: 55 push %ebp 11eb01: 89 e5 mov %esp,%ebp 11eb03: 57 push %edi 11eb04: 56 push %esi 11eb05: 53 push %ebx 11eb06: 83 ec 28 sub $0x28,%esp 11eb09: 8b 75 08 mov 0x8(%ebp),%esi 11eb0c: a1 b8 1b 14 00 mov 0x141bb8,%eax 11eb11: 40 inc %eax 11eb12: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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(); 11eb17: ff 35 70 1c 14 00 pushl 0x141c70 11eb1d: e8 62 a8 ff ff call 119384 <_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 ); 11eb22: 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 ); 11eb25: 8d 46 68 lea 0x68(%esi),%eax 11eb28: 89 45 e4 mov %eax,-0x1c(%ebp) 11eb2b: 83 c4 10 add $0x10,%esp 11eb2e: eb 32 jmp 11eb62 <_Region_Process_queue+0x62> <== ALWAYS TAKEN 11eb30: 6a 00 push $0x0 11eb32: 6a 00 push $0x0 11eb34: ff 70 24 pushl 0x24(%eax) 11eb37: ff 75 e4 pushl -0x1c(%ebp) 11eb3a: e8 65 b2 ff ff call 119da4 <_Heap_Allocate_aligned_with_boundary> the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 11eb3f: 83 c4 10 add $0x10,%esp 11eb42: 85 c0 test %eax,%eax 11eb44: 74 2e je 11eb74 <_Region_Process_queue+0x74> break; *(void **)the_thread->Wait.return_argument = the_segment; 11eb46: 8b 53 28 mov 0x28(%ebx),%edx 11eb49: 89 02 mov %eax,(%edx) the_region->number_of_used_blocks += 1; 11eb4b: ff 46 64 incl 0x64(%esi) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 11eb4e: 83 ec 08 sub $0x8,%esp 11eb51: 53 push %ebx 11eb52: 57 push %edi 11eb53: e8 fc 05 00 00 call 11f154 <_Thread_queue_Extract> <== ALWAYS TAKEN the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 11eb58: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) } 11eb5f: 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 ); 11eb62: 83 ec 0c sub $0xc,%esp 11eb65: 57 push %edi 11eb66: e8 d5 06 00 00 call 11f240 <_Thread_queue_First> <== ALWAYS TAKEN 11eb6b: 89 c3 mov %eax,%ebx if ( the_thread == NULL ) 11eb6d: 83 c4 10 add $0x10,%esp 11eb70: 85 c0 test %eax,%eax 11eb72: 75 bc jne 11eb30 <_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(); } 11eb74: 8d 65 f4 lea -0xc(%ebp),%esp 11eb77: 5b pop %ebx 11eb78: 5e pop %esi 11eb79: 5f pop %edi 11eb7a: 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(); 11eb7b: e9 bc c9 ff ff jmp 11b53c <_Thread_Enable_dispatch> 0010d8cc <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10d8cc: 55 push %ebp 10d8cd: 89 e5 mov %esp,%ebp 10d8cf: 53 push %ebx 10d8d0: 83 ec 04 sub $0x4,%esp 10d8d3: 8b 5d 08 mov 0x8(%ebp),%ebx 10d8d6: a1 18 22 13 00 mov 0x132218,%eax 10d8db: 40 inc %eax 10d8dc: a3 18 22 13 00 mov %eax,0x132218 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10d8e1: a1 ac 22 13 00 mov 0x1322ac,%eax if ( time->tv_sec < seconds ) 10d8e6: 8b 13 mov (%ebx),%edx 10d8e8: 39 d0 cmp %edx,%eax 10d8ea: 7f 34 jg 10d920 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10d8ec: 51 push %ecx 10d8ed: 29 c2 sub %eax,%edx 10d8ef: 52 push %edx 10d8f0: 6a 00 push $0x0 10d8f2: 68 ec 22 13 00 push $0x1322ec 10d8f7: e8 dc 24 00 00 call 10fdd8 <_Watchdog_Adjust> 10d8fc: 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 ); 10d8ff: 8b 03 mov (%ebx),%eax 10d901: a3 ac 22 13 00 mov %eax,0x1322ac 10d906: 8b 43 04 mov 0x4(%ebx),%eax 10d909: a3 b0 22 13 00 mov %eax,0x1322b0 _TOD_Is_set = true; 10d90e: c6 05 2c 22 13 00 01 movb $0x1,0x13222c _TOD_Activate(); _Thread_Enable_dispatch(); } 10d915: 8b 5d fc mov -0x4(%ebp),%ebx 10d918: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10d919: e9 c2 12 00 00 jmp 10ebe0 <_Thread_Enable_dispatch> 10d91e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d920: 51 push %ecx 10d921: 29 d0 sub %edx,%eax 10d923: 50 push %eax 10d924: 6a 01 push $0x1 10d926: 68 ec 22 13 00 push $0x1322ec 10d92b: e8 a8 24 00 00 call 10fdd8 <_Watchdog_Adjust> 10d930: 83 c4 10 add $0x10,%esp 10d933: eb ca jmp 10d8ff <_TOD_Set+0x33> <== ALWAYS TAKEN 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 20 37 12 movzwl 0x123720(%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 54 37 12 movzwl 0x123754(%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 3a 37 12 movzwl 0x12373a(%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 62 12 00 mov 0x12622c,%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 94 37 12 00 mov 0x123794(,%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 60 37 12 00 mov 0x123760(,%eax,4),%eax 10c118: eb e8 jmp 10c102 <_TOD_Validate+0x5a> <== ALWAYS TAKEN 0010cfcc <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10cfcc: 55 push %ebp 10cfcd: 89 e5 mov %esp,%ebp 10cfcf: 57 push %edi 10cfd0: 56 push %esi 10cfd1: 53 push %ebx 10cfd2: 83 ec 28 sub $0x28,%esp 10cfd5: 8b 5d 08 mov 0x8(%ebp),%ebx 10cfd8: 8b 75 0c mov 0xc(%ebp),%esi 10cfdb: 8a 45 10 mov 0x10(%ebp),%al 10cfde: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10cfe1: 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 ); 10cfe4: 53 push %ebx 10cfe5: e8 6a 0e 00 00 call 10de54 <_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 ) 10cfea: 83 c4 10 add $0x10,%esp 10cfed: 39 73 14 cmp %esi,0x14(%ebx) 10cff0: 74 0d je 10cfff <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10cff2: 83 ec 08 sub $0x8,%esp 10cff5: 56 push %esi 10cff6: 53 push %ebx 10cff7: e8 10 0d 00 00 call 10dd0c <_Thread_Set_priority> <== ALWAYS TAKEN 10cffc: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10cfff: 9c pushf 10d000: fa cli 10d001: 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; 10d002: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d005: 83 f8 04 cmp $0x4,%eax 10d008: 74 26 je 10d030 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d00a: 83 e7 04 and $0x4,%edi 10d00d: 74 15 je 10d024 <_Thread_Change_priority+0x58> <== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d00f: 52 push %edx 10d010: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d011: a9 e0 be 03 00 test $0x3bee0,%eax 10d016: 0f 85 bc 00 00 00 jne 10d0d8 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d01c: 8d 65 f4 lea -0xc(%ebp),%esp 10d01f: 5b pop %ebx 10d020: 5e pop %esi 10d021: 5f pop %edi 10d022: c9 leave 10d023: 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 ); 10d024: 89 c1 mov %eax,%ecx 10d026: 83 e1 fb and $0xfffffffb,%ecx 10d029: 89 4b 10 mov %ecx,0x10(%ebx) 10d02c: eb e1 jmp 10d00f <_Thread_Change_priority+0x43> <== ALWAYS TAKEN 10d02e: 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 ) ) { 10d030: 83 e7 04 and $0x4,%edi 10d033: 75 45 jne 10d07a <_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 ); 10d035: 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; 10d03c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d042: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d049: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d04c: 66 a1 8c 74 12 00 mov 0x12748c,%ax 10d052: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d058: 66 a3 8c 74 12 00 mov %ax,0x12748c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d05e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d062: 0f 84 88 00 00 00 je 10d0f0 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d068: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d06e: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d071: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d073: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d075: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d077: 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 ); 10d07a: 52 push %edx 10d07b: 9d popf 10d07c: 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 ); 10d07d: 66 8b 1d 8c 74 12 00 mov 0x12748c,%bx 10d084: 31 c0 xor %eax,%eax 10d086: 89 c1 mov %eax,%ecx 10d088: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d08c: 0f b7 c9 movzwl %cx,%ecx 10d08f: 66 8b 9c 09 20 75 12 mov 0x127520(%ecx,%ecx,1),%bx 10d096: 00 10d097: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d09b: c1 e1 04 shl $0x4,%ecx 10d09e: 0f b7 c0 movzwl %ax,%eax 10d0a1: 8d 04 01 lea (%ecx,%eax,1),%eax 10d0a4: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d0a7: a1 a0 73 12 00 mov 0x1273a0,%eax 10d0ac: 8b 04 88 mov (%eax,%ecx,4),%eax 10d0af: a3 68 74 12 00 mov %eax,0x127468 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d0b4: 8b 0d 98 74 12 00 mov 0x127498,%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() && 10d0ba: 39 c8 cmp %ecx,%eax 10d0bc: 74 0d je 10d0cb <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d0be: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d0c2: 74 07 je 10d0cb <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d0c4: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 10d0cb: 52 push %edx 10d0cc: 9d popf } 10d0cd: 8d 65 f4 lea -0xc(%ebp),%esp 10d0d0: 5b pop %ebx 10d0d1: 5e pop %esi 10d0d2: 5f pop %edi 10d0d3: c9 leave 10d0d4: c3 ret 10d0d5: 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 ); 10d0d8: 89 5d 0c mov %ebx,0xc(%ebp) 10d0db: 8b 43 44 mov 0x44(%ebx),%eax 10d0de: 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 ); } 10d0e1: 8d 65 f4 lea -0xc(%ebp),%esp 10d0e4: 5b pop %ebx 10d0e5: 5e pop %esi 10d0e6: 5f pop %edi 10d0e7: 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 ); 10d0e8: e9 87 0b 00 00 jmp 10dc74 <_Thread_queue_Requeue> 10d0ed: 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 ); 10d0f0: 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); 10d0f6: 8d 48 04 lea 0x4(%eax),%ecx 10d0f9: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d0fb: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d0fe: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d101: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d103: 89 4b 04 mov %ecx,0x4(%ebx) 10d106: e9 6f ff ff ff jmp 10d07a <_Thread_Change_priority+0xae> <== ALWAYS TAKEN 0010d10c <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d10c: 55 push %ebp 10d10d: 89 e5 mov %esp,%ebp 10d10f: 53 push %ebx 10d110: 8b 45 08 mov 0x8(%ebp),%eax 10d113: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d116: 9c pushf 10d117: fa cli 10d118: 5b pop %ebx current_state = the_thread->current_state; 10d119: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d11c: 85 ca test %ecx,%edx 10d11e: 74 70 je 10d190 <_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); 10d120: f7 d2 not %edx 10d122: 21 ca and %ecx,%edx current_state = 10d124: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d127: 85 d2 test %edx,%edx 10d129: 75 65 jne 10d190 <_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; 10d12b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d131: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d138: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d13b: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10d142: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d148: 66 89 15 8c 74 12 00 mov %dx,0x12748c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d14f: 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); 10d155: 8d 4a 04 lea 0x4(%edx),%ecx 10d158: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d15a: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d15d: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d160: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d162: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d165: 53 push %ebx 10d166: 9d popf 10d167: 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 ) { 10d168: 8b 50 14 mov 0x14(%eax),%edx 10d16b: 8b 0d 68 74 12 00 mov 0x127468,%ecx 10d171: 3b 51 14 cmp 0x14(%ecx),%edx 10d174: 73 1a jae 10d190 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d176: a3 68 74 12 00 mov %eax,0x127468 if ( _Thread_Executing->is_preemptible || 10d17b: a1 98 74 12 00 mov 0x127498,%eax 10d180: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d184: 74 12 je 10d198 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d186: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 10d18d: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d190: 53 push %ebx 10d191: 9d popf } 10d192: 5b pop %ebx 10d193: c9 leave 10d194: c3 ret 10d195: 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 || 10d198: 85 d2 test %edx,%edx 10d19a: 74 ea je 10d186 <_Thread_Clear_state+0x7a> <== ALWAYS TAKEN 10d19c: eb f2 jmp 10d190 <_Thread_Clear_state+0x84> <== ALWAYS TAKEN 0010d1a0 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d1a0: 55 push %ebp 10d1a1: 89 e5 mov %esp,%ebp 10d1a3: 56 push %esi 10d1a4: 53 push %ebx 10d1a5: 8b 75 08 mov 0x8(%ebp),%esi 10d1a8: 8b 5d 0c mov 0xc(%ebp),%ebx 10d1ab: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d1af: 8b 46 1c mov 0x1c(%esi),%eax 10d1b2: 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; 10d1b9: a1 d8 73 12 00 mov 0x1273d8,%eax 10d1be: 48 dec %eax 10d1bf: a3 d8 73 12 00 mov %eax,0x1273d8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d1c4: 83 ec 0c sub $0xc,%esp 10d1c7: 53 push %ebx 10d1c8: e8 73 11 00 00 call 10e340 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d1cd: a1 d8 73 12 00 mov 0x1273d8,%eax 10d1d2: 40 inc %eax 10d1d3: a3 d8 73 12 00 mov %eax,0x1273d8 /* * 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 ); 10d1d8: 59 pop %ecx 10d1d9: 58 pop %eax 10d1da: 53 push %ebx 10d1db: 56 push %esi 10d1dc: e8 2b f6 ff ff call 10c80c <_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 ); 10d1e1: 58 pop %eax 10d1e2: 5a pop %edx 10d1e3: 6a 01 push $0x1 10d1e5: 53 push %ebx 10d1e6: e8 8d 0b 00 00 call 10dd78 <_Thread_Set_state> <== ALWAYS TAKEN if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d1eb: 89 1c 24 mov %ebx,(%esp) 10d1ee: e8 d9 09 00 00 call 10dbcc <_Thread_queue_Extract_with_proxy> <== ALWAYS TAKEN 10d1f3: 83 c4 10 add $0x10,%esp 10d1f6: 84 c0 test %al,%al 10d1f8: 75 06 jne 10d200 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d1fa: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d1fe: 74 68 je 10d268 <_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 ) ) 10d200: 3b 1d 60 74 12 00 cmp 0x127460,%ebx 10d206: 74 74 je 10d27c <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d208: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d20f: 00 00 00 if ( the_thread->Start.fp_context ) 10d212: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d218: 85 c0 test %eax,%eax 10d21a: 74 0c je 10d228 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d21c: 83 ec 0c sub $0xc,%esp 10d21f: 50 push %eax 10d220: e8 33 14 00 00 call 10e658 <_Workspace_Free> 10d225: 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 ); 10d228: 83 ec 0c sub $0xc,%esp 10d22b: 53 push %ebx 10d22c: e8 fb 0c 00 00 call 10df2c <_Thread_Stack_Free> <== ALWAYS TAKEN the_thread->Start.stack = NULL; 10d231: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d238: 00 00 00 if ( the_thread->extensions ) 10d23b: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d241: 83 c4 10 add $0x10,%esp 10d244: 85 c0 test %eax,%eax 10d246: 74 0c je 10d254 <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10d248: 83 ec 0c sub $0xc,%esp 10d24b: 50 push %eax 10d24c: e8 07 14 00 00 call 10e658 <_Workspace_Free> 10d251: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10d254: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d25b: 00 00 00 } 10d25e: 8d 65 f8 lea -0x8(%ebp),%esp 10d261: 5b pop %ebx 10d262: 5e pop %esi 10d263: c9 leave 10d264: c3 ret 10d265: 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 ); 10d268: 83 ec 0c sub $0xc,%esp 10d26b: 8d 43 48 lea 0x48(%ebx),%eax 10d26e: 50 push %eax 10d26f: e8 c4 12 00 00 call 10e538 <_Watchdog_Remove> 10d274: 83 c4 10 add $0x10,%esp 10d277: eb 87 jmp 10d200 <_Thread_Close+0x60> <== ALWAYS TAKEN 10d279: 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; 10d27c: c7 05 60 74 12 00 00 movl $0x0,0x127460 10d283: 00 00 00 10d286: eb 80 jmp 10d208 <_Thread_Close+0x68> <== ALWAYS TAKEN 0010d288 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 10d288: 55 push %ebp 10d289: 89 e5 mov %esp,%ebp 10d28b: 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 ); 10d28e: 68 60 75 12 00 push $0x127560 10d293: e8 f8 f4 ff ff call 10c790 <_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(); 10d298: a3 a8 75 12 00 mov %eax,0x1275a8 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d29d: a1 d8 73 12 00 mov 0x1273d8,%eax 10d2a2: 40 inc %eax 10d2a3: a3 d8 73 12 00 mov %eax,0x1273d8 * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 10d2a8: 8b 15 38 32 12 00 mov 0x123238,%edx 10d2ae: 83 c4 0c add $0xc,%esp 10d2b1: 68 45 4c 44 49 push $0x49444c45 10d2b6: 6a 00 push $0x0 10d2b8: 6a 00 push $0x0 10d2ba: 6a 00 push $0x0 10d2bc: 6a 01 push $0x1 10d2be: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10d2c5: 50 push %eax 10d2c6: 6a 00 push $0x0 10d2c8: a1 10 32 12 00 mov 0x123210,%eax 10d2cd: 39 d0 cmp %edx,%eax 10d2cf: 73 02 jae 10d2d3 <_Thread_Create_idle+0x4b> 10d2d1: 89 d0 mov %edx,%eax 10d2d3: 50 push %eax 10d2d4: 6a 00 push $0x0 10d2d6: ff 35 a8 75 12 00 pushl 0x1275a8 10d2dc: 68 60 75 12 00 push $0x127560 10d2e1: e8 6a 02 00 00 call 10d550 <_Thread_Initialize> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d2e6: a1 d8 73 12 00 mov 0x1273d8,%eax 10d2eb: 48 dec %eax 10d2ec: a3 d8 73 12 00 mov %eax,0x1273d8 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; 10d2f1: a1 a8 75 12 00 mov 0x1275a8,%eax /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 10d2f6: a3 98 74 12 00 mov %eax,0x127498 10d2fb: a3 68 74 12 00 mov %eax,0x127468 _Thread_Executing = _Thread_Idle; _Thread_Start( 10d300: 83 c4 24 add $0x24,%esp 10d303: 6a 00 push $0x0 10d305: 6a 00 push $0x0 10d307: ff 35 34 32 12 00 pushl 0x123234 10d30d: 6a 00 push $0x0 10d30f: 50 push %eax 10d310: e8 af 0c 00 00 call 10dfc4 <_Thread_Start> <== ALWAYS TAKEN 10d315: 83 c4 20 add $0x20,%esp Configuration.idle_task, NULL, 0 ); } 10d318: c9 leave 10d319: c3 ret 0010d31c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10d31c: 55 push %ebp 10d31d: 89 e5 mov %esp,%ebp 10d31f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10d322: 8d 45 f4 lea -0xc(%ebp),%eax 10d325: 50 push %eax 10d326: ff 75 08 pushl 0x8(%ebp) 10d329: e8 aa 01 00 00 call 10d4d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10d32e: 83 c4 10 add $0x10,%esp 10d331: 8b 55 f4 mov -0xc(%ebp),%edx 10d334: 85 d2 test %edx,%edx 10d336: 75 1c jne 10d354 <_Thread_Delay_ended+0x38> <== ALWAYS TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10d338: 83 ec 08 sub $0x8,%esp 10d33b: 68 18 00 00 10 push $0x10000018 10d340: 50 push %eax 10d341: e8 c6 fd ff ff call 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10d346: a1 d8 73 12 00 mov 0x1273d8,%eax 10d34b: 48 dec %eax 10d34c: a3 d8 73 12 00 mov %eax,0x1273d8 10d351: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10d354: c9 leave 10d355: c3 ret 0010d358 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10d358: 55 push %ebp 10d359: 89 e5 mov %esp,%ebp 10d35b: 57 push %edi 10d35c: 56 push %esi 10d35d: 53 push %ebx 10d35e: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10d361: 8b 1d 98 74 12 00 mov 0x127498,%ebx _ISR_Disable( level ); 10d367: 9c pushf 10d368: fa cli 10d369: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10d36a: 8a 15 a8 74 12 00 mov 0x1274a8,%dl 10d370: 84 d2 test %dl,%dl 10d372: 0f 84 10 01 00 00 je 10d488 <_Thread_Dispatch+0x130> 10d378: 8d 7d d8 lea -0x28(%ebp),%edi 10d37b: e9 d1 00 00 00 jmp 10d451 <_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 ); 10d380: 50 push %eax 10d381: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10d382: 83 ec 0c sub $0xc,%esp 10d385: 8d 45 e0 lea -0x20(%ebp),%eax 10d388: 50 push %eax 10d389: e8 66 38 00 00 call 110bf4 <_TOD_Get_uptime> _Timestamp_Subtract( 10d38e: 83 c4 0c add $0xc,%esp 10d391: 57 push %edi 10d392: 8d 45 e0 lea -0x20(%ebp),%eax 10d395: 50 push %eax 10d396: 68 a0 74 12 00 push $0x1274a0 10d39b: e8 90 0d 00 00 call 10e130 <_Timespec_Subtract> <== ALWAYS TAKEN &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10d3a0: 5a pop %edx 10d3a1: 59 pop %ecx 10d3a2: 57 push %edi 10d3a3: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10d3a9: 50 push %eax 10d3aa: e8 45 0d 00 00 call 10e0f4 <_Timespec_Add_to> <== ALWAYS TAKEN _Thread_Time_of_last_context_switch = uptime; 10d3af: 8b 45 e0 mov -0x20(%ebp),%eax 10d3b2: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3b5: a3 a0 74 12 00 mov %eax,0x1274a0 10d3ba: 89 15 a4 74 12 00 mov %edx,0x1274a4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10d3c0: a1 64 74 12 00 mov 0x127464,%eax 10d3c5: 83 c4 10 add $0x10,%esp 10d3c8: 85 c0 test %eax,%eax 10d3ca: 74 10 je 10d3dc <_Thread_Dispatch+0x84> <== ALWAYS TAKEN executing->libc_reent = *_Thread_libc_reent; 10d3cc: 8b 10 mov (%eax),%edx 10d3ce: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10d3d4: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10d3da: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10d3dc: 83 ec 08 sub $0x8,%esp 10d3df: 56 push %esi 10d3e0: 53 push %ebx 10d3e1: e8 da 0f 00 00 call 10e3c0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10d3e6: 59 pop %ecx 10d3e7: 58 pop %eax 10d3e8: 81 c6 d4 00 00 00 add $0xd4,%esi 10d3ee: 56 push %esi 10d3ef: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10d3f5: 50 push %eax 10d3f6: e8 c5 12 00 00 call 10e6c0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10d3fb: 83 c4 10 add $0x10,%esp 10d3fe: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10d404: 85 d2 test %edx,%edx 10d406: 74 36 je 10d43e <_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 ); 10d408: a1 60 74 12 00 mov 0x127460,%eax 10d40d: 39 c3 cmp %eax,%ebx 10d40f: 74 2d je 10d43e <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10d411: 85 c0 test %eax,%eax 10d413: 74 11 je 10d426 <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10d415: 83 ec 0c sub $0xc,%esp 10d418: 05 ec 00 00 00 add $0xec,%eax 10d41d: 50 push %eax 10d41e: e8 d1 12 00 00 call 10e6f4 <_CPU_Context_save_fp> 10d423: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10d426: 83 ec 0c sub $0xc,%esp 10d429: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10d42f: 50 push %eax 10d430: e8 c9 12 00 00 call 10e6fe <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10d435: 89 1d 60 74 12 00 mov %ebx,0x127460 10d43b: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10d43e: 8b 1d 98 74 12 00 mov 0x127498,%ebx _ISR_Disable( level ); 10d444: 9c pushf 10d445: fa cli 10d446: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10d447: 8a 15 a8 74 12 00 mov 0x1274a8,%dl 10d44d: 84 d2 test %dl,%dl 10d44f: 74 37 je 10d488 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10d451: 8b 35 68 74 12 00 mov 0x127468,%esi _Thread_Dispatch_disable_level = 1; 10d457: c7 05 d8 73 12 00 01 movl $0x1,0x1273d8 10d45e: 00 00 00 _Context_Switch_necessary = false; 10d461: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = heir; 10d468: 89 35 98 74 12 00 mov %esi,0x127498 #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 ) 10d46e: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10d472: 0f 85 08 ff ff ff jne 10d380 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d478: 8b 15 a4 73 12 00 mov 0x1273a4,%edx 10d47e: 89 56 78 mov %edx,0x78(%esi) 10d481: e9 fa fe ff ff jmp 10d380 <_Thread_Dispatch+0x28> <== ALWAYS TAKEN 10d486: 66 90 xchg %ax,%ax <== NOT EXECUTED executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10d488: c7 05 d8 73 12 00 00 movl $0x0,0x1273d8 10d48f: 00 00 00 _ISR_Enable( level ); 10d492: 50 push %eax 10d493: 9d popf if ( _Thread_Do_post_task_switch_extension || 10d494: a1 7c 74 12 00 mov 0x12747c,%eax 10d499: 85 c0 test %eax,%eax 10d49b: 75 06 jne 10d4a3 <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10d49d: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10d4a1: 74 09 je 10d4ac <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10d4a3: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10d4a7: e8 ac e8 ff ff call 10bd58 <_API_extensions_Run_postswitch> } } 10d4ac: 8d 65 f4 lea -0xc(%ebp),%esp 10d4af: 5b pop %ebx 10d4b0: 5e pop %esi 10d4b1: 5f pop %edi 10d4b2: c9 leave 10d4b3: c3 ret 0010d4b4 <_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 ) { 10d4b4: 55 push %ebp 10d4b5: 89 e5 mov %esp,%ebp 10d4b7: 83 ec 08 sub $0x8,%esp if ( --_Thread_Dispatch_disable_level ) 10d4ba: a1 d8 73 12 00 mov 0x1273d8,%eax 10d4bf: 48 dec %eax 10d4c0: a3 d8 73 12 00 mov %eax,0x1273d8 10d4c5: a1 d8 73 12 00 mov 0x1273d8,%eax 10d4ca: 85 c0 test %eax,%eax 10d4cc: 74 02 je 10d4d0 <_Thread_Enable_dispatch+0x1c> return; _Thread_Dispatch(); } 10d4ce: c9 leave 10d4cf: c3 ret 10d4d0: c9 leave (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch(); 10d4d1: e9 82 fe ff ff jmp 10d358 <_Thread_Dispatch> <== ALWAYS TAKEN 00112cfc <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 112cfc: 55 push %ebp 112cfd: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 112cff: a1 98 74 12 00 mov 0x127498,%eax if ( !_States_Is_ready( executing->current_state ) || 112d04: 8b 50 10 mov 0x10(%eax),%edx 112d07: 85 d2 test %edx,%edx 112d09: 75 0e jne 112d19 <_Thread_Evaluate_mode+0x1d> <== ALWAYS TAKEN 112d0b: 3b 05 68 74 12 00 cmp 0x127468,%eax 112d11: 74 11 je 112d24 <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 112d13: 80 78 75 00 cmpb $0x0,0x75(%eax) 112d17: 74 0b je 112d24 <_Thread_Evaluate_mode+0x28> <== ALWAYS TAKEN _Context_Switch_necessary = true; 112d19: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 112d20: b0 01 mov $0x1,%al return true; } return false; } 112d22: c9 leave 112d23: 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; 112d24: 31 c0 xor %eax,%eax } return false; } 112d26: c9 leave 112d27: c3 ret 0010d4d8 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10d4d8: 55 push %ebp 10d4d9: 89 e5 mov %esp,%ebp 10d4db: 53 push %ebx 10d4dc: 83 ec 04 sub $0x4,%esp 10d4df: 8b 45 08 mov 0x8(%ebp),%eax 10d4e2: 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 ) ) { 10d4e5: 85 c0 test %eax,%eax 10d4e7: 74 4b je 10d534 <_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); 10d4e9: 89 c2 mov %eax,%edx 10d4eb: c1 ea 18 shr $0x18,%edx 10d4ee: 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 ) 10d4f1: 8d 5a ff lea -0x1(%edx),%ebx 10d4f4: 83 fb 03 cmp $0x3,%ebx 10d4f7: 77 2b ja 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10d4f9: 89 c3 mov %eax,%ebx 10d4fb: c1 eb 1b shr $0x1b,%ebx 10d4fe: 4b dec %ebx 10d4ff: 75 23 jne 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10d501: 8b 14 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%edx if ( !api_information ) { 10d508: 85 d2 test %edx,%edx 10d50a: 74 18 je 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10d50c: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10d50f: 85 d2 test %edx,%edx 10d511: 74 11 je 10d524 <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10d513: 53 push %ebx 10d514: 51 push %ecx 10d515: 50 push %eax 10d516: 52 push %edx 10d517: e8 24 f7 ff ff call 10cc40 <_Objects_Get> <== ALWAYS TAKEN 10d51c: 83 c4 10 add $0x10,%esp done: return tp; } 10d51f: 8b 5d fc mov -0x4(%ebp),%ebx 10d522: c9 leave 10d523: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10d524: c7 01 01 00 00 00 movl $0x1,(%ecx) 10d52a: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d52c: 8b 5d fc mov -0x4(%ebp),%ebx 10d52f: c9 leave 10d530: c3 ret 10d531: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d534: a1 d8 73 12 00 mov 0x1273d8,%eax 10d539: 40 inc %eax 10d53a: a3 d8 73 12 00 mov %eax,0x1273d8 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; 10d53f: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10d545: a1 98 74 12 00 mov 0x127498,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10d54a: 8b 5d fc mov -0x4(%ebp),%ebx 10d54d: c9 leave 10d54e: c3 ret 00112d28 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 112d28: 55 push %ebp 112d29: 89 e5 mov %esp,%ebp 112d2b: 53 push %ebx 112d2c: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 112d2f: 8b 1d 98 74 12 00 mov 0x127498,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 112d35: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 112d3b: 85 c0 test %eax,%eax 112d3d: 74 79 je 112db8 <_Thread_Handler+0x90> 112d3f: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 112d40: a0 10 70 12 00 mov 0x127010,%al 112d45: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 112d48: c6 05 10 70 12 00 01 movb $0x1,0x127010 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 112d4f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 112d55: 85 c0 test %eax,%eax 112d57: 74 24 je 112d7d <_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 ); 112d59: a1 60 74 12 00 mov 0x127460,%eax 112d5e: 39 c3 cmp %eax,%ebx 112d60: 74 1b je 112d7d <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 112d62: 85 c0 test %eax,%eax 112d64: 74 11 je 112d77 <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 112d66: 83 ec 0c sub $0xc,%esp 112d69: 05 ec 00 00 00 add $0xec,%eax 112d6e: 50 push %eax 112d6f: e8 80 b9 ff ff call 10e6f4 <_CPU_Context_save_fp> 112d74: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 112d77: 89 1d 60 74 12 00 mov %ebx,0x127460 /* * 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 ); 112d7d: 83 ec 0c sub $0xc,%esp 112d80: 53 push %ebx 112d81: e8 aa b4 ff ff call 10e230 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 112d86: e8 29 a7 ff ff call 10d4b4 <_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) */ { 112d8b: 83 c4 10 add $0x10,%esp 112d8e: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 112d92: 74 28 je 112dbc <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112d94: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112d9a: 85 c0 test %eax,%eax 112d9c: 74 2d je 112dcb <_Thread_Handler+0xa3> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 112d9e: 48 dec %eax 112d9f: 74 43 je 112de4 <_Thread_Handler+0xbc> <== 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 ); 112da1: 83 ec 0c sub $0xc,%esp 112da4: 53 push %ebx 112da5: e8 c2 b4 ff ff call 10e26c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 112daa: 83 c4 0c add $0xc,%esp 112dad: 6a 06 push $0x6 112daf: 6a 01 push $0x1 112db1: 6a 00 push $0x0 112db3: e8 40 99 ff ff call 10c6f8 <_Internal_error_Occurred> * 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); 112db8: fb sti 112db9: eb 85 jmp 112d40 <_Thread_Handler+0x18> 112dbb: 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 (); 112dbc: e8 5f c5 00 00 call 11f320 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 112dc1: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 112dc7: 85 c0 test %eax,%eax 112dc9: 75 d3 jne 112d9e <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 112dcb: 83 ec 0c sub $0xc,%esp 112dce: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 112dd4: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 112dda: 89 43 28 mov %eax,0x28(%ebx) 112ddd: 83 c4 10 add $0x10,%esp 112de0: eb bf jmp 112da1 <_Thread_Handler+0x79> <== ALWAYS TAKEN 112de2: 66 90 xchg %ax,%ax <== NOT EXECUTED ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 112de4: 83 ec 0c sub $0xc,%esp 112de7: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 112ded: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 112df3: 89 43 28 mov %eax,0x28(%ebx) 112df6: 83 c4 10 add $0x10,%esp 112df9: eb a6 jmp 112da1 <_Thread_Handler+0x79> <== ALWAYS TAKEN 0010d7cc <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 10d7cc: 55 push %ebp 10d7cd: 89 e5 mov %esp,%ebp 10d7cf: 53 push %ebx 10d7d0: 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; 10d7d3: a1 30 32 12 00 mov 0x123230,%eax maximum_extensions = Configuration.maximum_extensions; 10d7d8: 8b 15 28 32 12 00 mov 0x123228,%edx #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 10d7de: 8b 1d 44 32 12 00 mov 0x123244,%ebx 10d7e4: 85 db test %ebx,%ebx 10d7e6: 0f 94 c3 sete %bl 10d7e9: 8b 0d 40 32 12 00 mov 0x123240,%ecx 10d7ef: 85 c9 test %ecx,%ecx 10d7f1: 0f 94 c1 sete %cl 10d7f4: 38 cb cmp %cl,%bl 10d7f6: 0f 85 9d 00 00 00 jne 10d899 <_Thread_Handler_initialization+0xcd> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false; 10d7fc: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = NULL; 10d803: c7 05 98 74 12 00 00 movl $0x0,0x127498 10d80a: 00 00 00 _Thread_Heir = NULL; 10d80d: c7 05 68 74 12 00 00 movl $0x0,0x127468 10d814: 00 00 00 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 10d817: c7 05 60 74 12 00 00 movl $0x0,0x127460 10d81e: 00 00 00 #endif _Thread_Do_post_task_switch_extension = 0; 10d821: c7 05 7c 74 12 00 00 movl $0x0,0x12747c 10d828: 00 00 00 _Thread_Maximum_extensions = maximum_extensions; 10d82b: 89 15 78 74 12 00 mov %edx,0x127478 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 10d831: a3 a4 73 12 00 mov %eax,0x1273a4 _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 10d836: 83 ec 0c sub $0xc,%esp 10d839: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 10d840: 8d 44 40 03 lea 0x3(%eax,%eax,2),%eax 10d844: c1 e0 02 shl $0x2,%eax 10d847: 50 push %eax 10d848: e8 c3 0d 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10d84d: a3 a0 73 12 00 mov %eax,0x1273a0 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 10d852: 0f b6 1d 14 32 12 00 movzbl 0x123214,%ebx 10d859: 31 d2 xor %edx,%edx 10d85b: 83 c4 10 add $0x10,%esp 10d85e: 66 90 xchg %ax,%ax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d860: 8d 48 04 lea 0x4(%eax),%ecx 10d863: 89 08 mov %ecx,(%eax) the_chain->permanent_null = NULL; 10d865: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10d86c: 89 40 08 mov %eax,0x8(%eax) 10d86f: 42 inc %edx 10d870: 83 c0 0c add $0xc,%eax 10d873: 39 da cmp %ebx,%edx 10d875: 76 e9 jbe 10d860 <_Thread_Handler_initialization+0x94> /* * Initialize this class of objects. */ _Objects_Initialize_information( 10d877: 50 push %eax 10d878: 6a 08 push $0x8 10d87a: 6a 00 push $0x0 10d87c: 68 08 01 00 00 push $0x108 10d881: 6a 01 push $0x1 10d883: 6a 01 push $0x1 10d885: 6a 01 push $0x1 10d887: 68 60 75 12 00 push $0x127560 10d88c: e8 17 f4 ff ff call 10cca8 <_Objects_Initialize_information> <== ALWAYS TAKEN 10d891: 83 c4 20 add $0x20,%esp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 10d894: 8b 5d fc mov -0x4(%ebp),%ebx 10d897: c9 leave 10d898: 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( 10d899: 52 push %edx 10d89a: 6a 0f push $0xf 10d89c: 6a 01 push $0x1 10d89e: 6a 00 push $0x0 10d8a0: e8 53 ee ff ff call 10c6f8 <_Internal_error_Occurred> 0010d550 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10d550: 55 push %ebp 10d551: 89 e5 mov %esp,%ebp 10d553: 57 push %edi 10d554: 56 push %esi 10d555: 53 push %ebx 10d556: 83 ec 1c sub $0x1c,%esp 10d559: 8b 5d 0c mov 0xc(%ebp),%ebx 10d55c: 8b 4d 10 mov 0x10(%ebp),%ecx 10d55f: 8b 7d 14 mov 0x14(%ebp),%edi 10d562: 8b 75 1c mov 0x1c(%ebp),%esi 10d565: 8a 55 18 mov 0x18(%ebp),%dl 10d568: 8a 45 20 mov 0x20(%ebp),%al 10d56b: 88 45 df mov %al,-0x21(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10d56e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10d575: 00 00 00 10d578: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10d57f: 00 00 00 10d582: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10d589: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10d58c: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10d593: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10d596: 85 c9 test %ecx,%ecx 10d598: 0f 84 eb 01 00 00 je 10d789 <_Thread_Initialize+0x239> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10d59e: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10d5a5: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10d5a7: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10d5ad: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10d5b3: 84 d2 test %dl,%dl 10d5b5: 0f 85 61 01 00 00 jne 10d71c <_Thread_Initialize+0x1cc> 10d5bb: 31 c0 xor %eax,%eax 10d5bd: 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; 10d5c4: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10d5ca: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d5d0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10d5d7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10d5de: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10d5e5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10d5ec: a1 78 74 12 00 mov 0x127478,%eax 10d5f1: 85 c0 test %eax,%eax 10d5f3: 0f 85 43 01 00 00 jne 10d73c <_Thread_Initialize+0x1ec> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10d5f9: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10d600: 00 00 00 10d603: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10d60a: 8a 45 df mov -0x21(%ebp),%al 10d60d: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10d613: 8b 45 24 mov 0x24(%ebp),%eax 10d616: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10d61c: 8b 45 28 mov 0x28(%ebp),%eax 10d61f: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10d625: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10d629: 75 08 jne 10d633 <_Thread_Initialize+0xe3> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10d62b: a1 a4 73 12 00 mov 0x1273a4,%eax 10d630: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10d633: 8b 45 2c mov 0x2c(%ebp),%eax 10d636: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10d63c: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10d643: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10d64a: 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; 10d651: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10d654: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10d65a: 83 ec 08 sub $0x8,%esp 10d65d: 56 push %esi 10d65e: 53 push %ebx 10d65f: e8 a8 06 00 00 call 10dd0c <_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 ); 10d664: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10d66b: 00 00 00 10d66e: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10d675: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d678: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d67c: 8b 45 08 mov 0x8(%ebp),%eax 10d67f: 8b 40 1c mov 0x1c(%eax),%eax 10d682: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d685: 8b 45 30 mov 0x30(%ebp),%eax 10d688: 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 ); 10d68b: 89 1c 24 mov %ebx,(%esp) 10d68e: e8 65 0c 00 00 call 10e2f8 <_User_extensions_Thread_create> <== ALWAYS TAKEN if ( extension_status ) 10d693: 83 c4 10 add $0x10,%esp 10d696: 84 c0 test %al,%al 10d698: 75 76 jne 10d710 <_Thread_Initialize+0x1c0> return true; failed: if ( the_thread->libc_reent ) 10d69a: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10d6a0: 85 c0 test %eax,%eax 10d6a2: 74 0c je 10d6b0 <_Thread_Initialize+0x160> _Workspace_Free( the_thread->libc_reent ); 10d6a4: 83 ec 0c sub $0xc,%esp 10d6a7: 50 push %eax 10d6a8: e8 ab 0f 00 00 call 10e658 <_Workspace_Free> 10d6ad: 83 c4 10 add $0x10,%esp 10d6b0: 31 f6 xor %esi,%esi for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10d6b2: 8b 84 b3 f4 00 00 00 mov 0xf4(%ebx,%esi,4),%eax 10d6b9: 85 c0 test %eax,%eax 10d6bb: 74 0c je 10d6c9 <_Thread_Initialize+0x179> _Workspace_Free( the_thread->API_Extensions[i] ); 10d6bd: 83 ec 0c sub $0xc,%esp 10d6c0: 50 push %eax 10d6c1: e8 92 0f 00 00 call 10e658 <_Workspace_Free> 10d6c6: 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++ ) 10d6c9: 46 inc %esi 10d6ca: 83 fe 03 cmp $0x3,%esi 10d6cd: 75 e3 jne 10d6b2 <_Thread_Initialize+0x162> if ( the_thread->API_Extensions[i] ) _Workspace_Free( the_thread->API_Extensions[i] ); if ( extensions_area ) 10d6cf: 8b 55 e4 mov -0x1c(%ebp),%edx 10d6d2: 85 d2 test %edx,%edx 10d6d4: 74 0e je 10d6e4 <_Thread_Initialize+0x194> (void) _Workspace_Free( extensions_area ); 10d6d6: 83 ec 0c sub $0xc,%esp 10d6d9: ff 75 e4 pushl -0x1c(%ebp) 10d6dc: e8 77 0f 00 00 call 10e658 <_Workspace_Free> 10d6e1: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10d6e4: 8b 45 e0 mov -0x20(%ebp),%eax 10d6e7: 85 c0 test %eax,%eax 10d6e9: 74 0e je 10d6f9 <_Thread_Initialize+0x1a9> (void) _Workspace_Free( fp_area ); 10d6eb: 83 ec 0c sub $0xc,%esp 10d6ee: ff 75 e0 pushl -0x20(%ebp) 10d6f1: e8 62 0f 00 00 call 10e658 <_Workspace_Free> 10d6f6: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10d6f9: 83 ec 0c sub $0xc,%esp 10d6fc: 53 push %ebx 10d6fd: e8 2a 08 00 00 call 10df2c <_Thread_Stack_Free> 10d702: 31 c0 xor %eax,%eax return false; 10d704: 83 c4 10 add $0x10,%esp } 10d707: 8d 65 f4 lea -0xc(%ebp),%esp 10d70a: 5b pop %ebx 10d70b: 5e pop %esi 10d70c: 5f pop %edi 10d70d: c9 leave 10d70e: c3 ret 10d70f: 90 nop <== 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 ) 10d710: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10d712: 8d 65 f4 lea -0xc(%ebp),%esp 10d715: 5b pop %ebx 10d716: 5e pop %esi 10d717: 5f pop %edi 10d718: c9 leave 10d719: c3 ret 10d71a: 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 ); 10d71c: 83 ec 0c sub $0xc,%esp 10d71f: 6a 6c push $0x6c 10d721: e8 16 0f 00 00 call 10e63c <_Workspace_Allocate> <== ALWAYS TAKEN 10d726: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10d729: 83 c4 10 add $0x10,%esp 10d72c: 85 c0 test %eax,%eax 10d72e: 0f 84 89 00 00 00 je 10d7bd <_Thread_Initialize+0x26d> 10d734: 8b 45 e0 mov -0x20(%ebp),%eax 10d737: e9 88 fe ff ff jmp 10d5c4 <_Thread_Initialize+0x74> <== ALWAYS TAKEN /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10d73c: 83 ec 0c sub $0xc,%esp 10d73f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10d746: 50 push %eax 10d747: e8 f0 0e 00 00 call 10e63c <_Workspace_Allocate> 10d74c: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10d74f: 83 c4 10 add $0x10,%esp 10d752: 85 c0 test %eax,%eax 10d754: 0f 84 40 ff ff ff je 10d69a <_Thread_Initialize+0x14a> goto failed; } the_thread->extensions = (void **) extensions_area; 10d75a: 89 c1 mov %eax,%ecx 10d75c: 89 83 00 01 00 00 mov %eax,0x100(%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++ ) 10d762: 8b 3d 78 74 12 00 mov 0x127478,%edi 10d768: 31 d2 xor %edx,%edx 10d76a: 31 c0 xor %eax,%eax 10d76c: eb 08 jmp 10d776 <_Thread_Initialize+0x226> <== ALWAYS TAKEN 10d76e: 66 90 xchg %ax,%ax <== NOT EXECUTED 10d770: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10d776: 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++ ) 10d77d: 40 inc %eax 10d77e: 89 c2 mov %eax,%edx 10d780: 39 f8 cmp %edi,%eax 10d782: 76 ec jbe 10d770 <_Thread_Initialize+0x220> 10d784: e9 81 fe ff ff jmp 10d60a <_Thread_Initialize+0xba> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10d789: 83 ec 08 sub $0x8,%esp 10d78c: 57 push %edi 10d78d: 53 push %ebx 10d78e: 88 55 d8 mov %dl,-0x28(%ebp) 10d791: e8 32 07 00 00 call 10dec8 <_Thread_Stack_Allocate> <== ALWAYS TAKEN if ( !actual_stack_size || actual_stack_size < stack_size ) 10d796: 83 c4 10 add $0x10,%esp 10d799: 85 c0 test %eax,%eax 10d79b: 8a 55 d8 mov -0x28(%ebp),%dl 10d79e: 74 16 je 10d7b6 <_Thread_Initialize+0x266> 10d7a0: 39 c7 cmp %eax,%edi 10d7a2: 77 12 ja 10d7b6 <_Thread_Initialize+0x266> <== ALWAYS TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10d7a4: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10d7aa: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10d7b1: e9 f1 fd ff ff jmp 10d5a7 <_Thread_Initialize+0x57> <== ALWAYS TAKEN if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10d7b6: 31 c0 xor %eax,%eax 10d7b8: e9 4a ff ff ff jmp 10d707 <_Thread_Initialize+0x1b7> <== 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 ) 10d7bd: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10d7c4: e9 d1 fe ff ff jmp 10d69a <_Thread_Initialize+0x14a> <== ALWAYS TAKEN 00111ee8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 111ee8: 55 push %ebp 111ee9: 89 e5 mov %esp,%ebp 111eeb: 53 push %ebx 111eec: 83 ec 10 sub $0x10,%esp 111eef: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 111ef2: 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; 111ef9: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 111eff: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 111f02: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 111f08: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 111f0b: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 111f11: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 111f17: 8b 45 0c mov 0xc(%ebp),%eax 111f1a: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 111f20: 8b 45 10 mov 0x10(%ebp),%eax 111f23: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 111f29: 53 push %ebx 111f2a: e8 75 c7 ff ff call 10e6a4 <_Thread_queue_Extract_with_proxy> 111f2f: 83 c4 10 add $0x10,%esp 111f32: 84 c0 test %al,%al 111f34: 75 06 jne 111f3c <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 111f36: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111f3a: 74 28 je 111f64 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 111f3c: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 111f42: 39 43 14 cmp %eax,0x14(%ebx) 111f45: 74 15 je 111f5c <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 111f47: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 111f4a: 89 45 0c mov %eax,0xc(%ebp) 111f4d: 89 5d 08 mov %ebx,0x8(%ebp) } } 111f50: 8b 5d fc mov -0x4(%ebp),%ebx 111f53: 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 ); 111f54: e9 17 c9 ff ff jmp 10e870 <_Thread_Set_priority> 111f59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } 111f5c: 8b 5d fc mov -0x4(%ebp),%ebx 111f5f: c9 leave 111f60: c3 ret 111f61: 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 ); 111f64: 83 ec 0c sub $0xc,%esp 111f67: 8d 43 48 lea 0x48(%ebx),%eax 111f6a: 50 push %eax 111f6b: e8 6c d1 ff ff call 10f0dc <_Watchdog_Remove> 111f70: 83 c4 10 add $0x10,%esp 111f73: eb c7 jmp 111f3c <_Thread_Reset+0x54> <== ALWAYS TAKEN 001112b0 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 1112b0: 55 push %ebp 1112b1: 89 e5 mov %esp,%ebp 1112b3: 56 push %esi 1112b4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 1112b5: a1 98 74 12 00 mov 0x127498,%eax ready = executing->ready; 1112ba: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 1112c0: 9c pushf 1112c1: fa cli 1112c2: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 1112c3: 8b 1a mov (%edx),%ebx 1112c5: 3b 5a 08 cmp 0x8(%edx),%ebx 1112c8: 74 3e je 111308 <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 1112ca: 8b 30 mov (%eax),%esi previous = the_node->previous; 1112cc: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 1112cf: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 1112d2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1112d4: 8d 5a 04 lea 0x4(%edx),%ebx 1112d7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1112d9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1112dc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1112df: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1112e1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 1112e4: 51 push %ecx 1112e5: 9d popf 1112e6: fa cli if ( _Thread_Is_heir( executing ) ) 1112e7: 3b 05 68 74 12 00 cmp 0x127468,%eax 1112ed: 74 0d je 1112fc <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 1112ef: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 1112f6: 51 push %ecx 1112f7: 9d popf } 1112f8: 5b pop %ebx 1112f9: 5e pop %esi 1112fa: c9 leave 1112fb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 1112fc: 8b 02 mov (%edx),%eax 1112fe: a3 68 74 12 00 mov %eax,0x127468 111303: eb ea jmp 1112ef <_Thread_Reset_timeslice+0x3f> <== ALWAYS TAKEN 111305: 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 ); 111308: 51 push %ecx 111309: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 11130a: 5b pop %ebx 11130b: 5e pop %esi 11130c: c9 leave 11130d: c3 ret 0010e7e4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10e7e4: 55 push %ebp 10e7e5: 89 e5 mov %esp,%ebp 10e7e7: 53 push %ebx 10e7e8: 83 ec 04 sub $0x4,%esp 10e7eb: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !_States_Is_dormant( the_thread->current_state ) ) { 10e7ee: f6 43 10 01 testb $0x1,0x10(%ebx) 10e7f2: 74 08 je 10e7fc <_Thread_Restart+0x18> 10e7f4: 31 c0 xor %eax,%eax return true; } return false; } 10e7f6: 8b 5d fc mov -0x4(%ebp),%ebx 10e7f9: c9 leave 10e7fa: c3 ret 10e7fb: 90 nop <== NOT EXECUTED Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 10e7fc: 83 ec 0c sub $0xc,%esp 10e7ff: 53 push %ebx 10e800: e8 b3 01 00 00 call 10e9b8 <_Thread_Set_transient> <== ALWAYS TAKEN _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 10e805: 83 c4 0c add $0xc,%esp 10e808: ff 75 10 pushl 0x10(%ebp) 10e80b: ff 75 0c pushl 0xc(%ebp) 10e80e: 53 push %ebx 10e80f: e8 d4 36 00 00 call 111ee8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 10e814: 89 1c 24 mov %ebx,(%esp) 10e817: e8 a8 33 00 00 call 111bc4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e81c: 89 1c 24 mov %ebx,(%esp) 10e81f: e8 20 36 00 00 call 111e44 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 10e824: 89 1c 24 mov %ebx,(%esp) 10e827: e8 b8 06 00 00 call 10eee4 <_User_extensions_Thread_restart> <== ALWAYS TAKEN if ( _Thread_Is_executing ( the_thread ) ) 10e82c: 83 c4 10 add $0x10,%esp 10e82f: 3b 1d 58 94 12 00 cmp 0x129458,%ebx 10e835: 74 07 je 10e83e <_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 ); 10e837: b0 01 mov $0x1,%al return true; } return false; } 10e839: 8b 5d fc mov -0x4(%ebp),%ebx 10e83c: c9 leave 10e83d: 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 ) 10e83e: 83 bb ec 00 00 00 00 cmpl $0x0,0xec(%ebx) 10e845: 74 18 je 10e85f <_Thread_Restart+0x7b> _Context_Restore_fp( &_Thread_Executing->fp_context ); 10e847: 83 ec 0c sub $0xc,%esp 10e84a: 81 c3 ec 00 00 00 add $0xec,%ebx 10e850: 53 push %ebx 10e851: e8 58 0a 00 00 call 10f2ae <_CPU_Context_restore_fp> 10e856: 8b 1d 58 94 12 00 mov 0x129458,%ebx 10e85c: 83 c4 10 add $0x10,%esp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 10e85f: 83 ec 0c sub $0xc,%esp 10e862: 81 c3 d4 00 00 00 add $0xd4,%ebx 10e868: 53 push %ebx 10e869: e8 2f 0a 00 00 call 10f29d <_CPU_Context_restore> 00111640 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111640: 55 push %ebp 111641: 89 e5 mov %esp,%ebp 111643: 53 push %ebx 111644: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111647: 9c pushf 111648: fa cli 111649: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11164a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 11164d: f6 c2 02 test $0x2,%dl 111650: 74 6e je 1116c0 <_Thread_Resume+0x80> <== ALWAYS TAKEN 111652: 83 e2 fd and $0xfffffffd,%edx current_state = 111655: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111658: 85 d2 test %edx,%edx 11165a: 75 64 jne 1116c0 <_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; 11165c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111662: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111669: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 11166c: 66 8b 15 cc c9 12 00 mov 0x12c9cc,%dx 111673: 0b 90 94 00 00 00 or 0x94(%eax),%edx 111679: 66 89 15 cc c9 12 00 mov %dx,0x12c9cc _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 111680: 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); 111686: 8d 5a 04 lea 0x4(%edx),%ebx 111689: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 11168b: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 11168e: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 111691: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 111693: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 111696: 51 push %ecx 111697: 9d popf 111698: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 111699: 8b 50 14 mov 0x14(%eax),%edx 11169c: 8b 1d a8 c9 12 00 mov 0x12c9a8,%ebx 1116a2: 3b 53 14 cmp 0x14(%ebx),%edx 1116a5: 73 19 jae 1116c0 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1116a7: a3 a8 c9 12 00 mov %eax,0x12c9a8 if ( _Thread_Executing->is_preemptible || 1116ac: a1 d8 c9 12 00 mov 0x12c9d8,%eax 1116b1: 80 78 75 00 cmpb $0x0,0x75(%eax) 1116b5: 74 11 je 1116c8 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1116b7: c6 05 e8 c9 12 00 01 movb $0x1,0x12c9e8 1116be: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1116c0: 51 push %ecx 1116c1: 9d popf } 1116c2: 5b pop %ebx 1116c3: c9 leave 1116c4: c3 ret 1116c5: 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 || 1116c8: 85 d2 test %edx,%edx 1116ca: 74 eb je 1116b7 <_Thread_Resume+0x77> <== ALWAYS TAKEN 1116cc: eb f2 jmp 1116c0 <_Thread_Resume+0x80> <== ALWAYS TAKEN 0010dd78 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10dd78: 55 push %ebp 10dd79: 89 e5 mov %esp,%ebp 10dd7b: 56 push %esi 10dd7c: 53 push %ebx 10dd7d: 8b 45 08 mov 0x8(%ebp),%eax 10dd80: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10dd83: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10dd89: 9c pushf 10dd8a: fa cli 10dd8b: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10dd8c: 8b 58 10 mov 0x10(%eax),%ebx 10dd8f: 85 db test %ebx,%ebx 10dd91: 75 2d jne 10ddc0 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10dd93: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10dd96: 8b 1a mov (%edx),%ebx 10dd98: 3b 5a 08 cmp 0x8(%edx),%ebx 10dd9b: 74 3b je 10ddd8 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10dd9d: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10dd9f: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10dda2: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10dda5: 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 ); 10dda7: 51 push %ecx 10dda8: 9d popf 10dda9: fa cli if ( _Thread_Is_heir( the_thread ) ) 10ddaa: 3b 05 68 74 12 00 cmp 0x127468,%eax 10ddb0: 74 62 je 10de14 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10ddb2: 3b 05 98 74 12 00 cmp 0x127498,%eax 10ddb8: 74 12 je 10ddcc <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10ddba: 51 push %ecx 10ddbb: 9d popf } 10ddbc: 5b pop %ebx 10ddbd: 5e pop %esi 10ddbe: c9 leave 10ddbf: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10ddc0: 09 f3 or %esi,%ebx 10ddc2: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10ddc5: 51 push %ecx 10ddc6: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10ddc7: 5b pop %ebx 10ddc8: 5e pop %esi 10ddc9: c9 leave 10ddca: c3 ret 10ddcb: 90 nop <== NOT EXECUTED if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10ddcc: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 10ddd3: eb e5 jmp 10ddba <_Thread_Set_state+0x42> <== ALWAYS TAKEN 10ddd5: 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); 10ddd8: 8d 5a 04 lea 0x4(%edx),%ebx 10dddb: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10dddd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10dde4: 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; 10dde7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dded: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10ddf4: 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 ); 10ddf7: 66 83 3a 00 cmpw $0x0,(%edx) 10ddfb: 75 aa jne 10dda7 <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10ddfd: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10de04: 23 90 98 00 00 00 and 0x98(%eax),%edx 10de0a: 66 89 15 8c 74 12 00 mov %dx,0x12748c 10de11: eb 94 jmp 10dda7 <_Thread_Set_state+0x2f> <== ALWAYS TAKEN 10de13: 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 ); 10de14: 66 8b 35 8c 74 12 00 mov 0x12748c,%si 10de1b: 31 d2 xor %edx,%edx 10de1d: 89 d3 mov %edx,%ebx 10de1f: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10de23: 0f b7 db movzwl %bx,%ebx 10de26: 66 8b b4 1b 20 75 12 mov 0x127520(%ebx,%ebx,1),%si 10de2d: 00 10de2e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10de32: c1 e3 04 shl $0x4,%ebx 10de35: 0f b7 d2 movzwl %dx,%edx 10de38: 8d 14 13 lea (%ebx,%edx,1),%edx 10de3b: 8d 1c 52 lea (%edx,%edx,2),%ebx 10de3e: 8b 15 a0 73 12 00 mov 0x1273a0,%edx 10de44: 8b 14 9a mov (%edx,%ebx,4),%edx 10de47: 89 15 68 74 12 00 mov %edx,0x127468 10de4d: e9 60 ff ff ff jmp 10ddb2 <_Thread_Set_state+0x3a> <== ALWAYS TAKEN 0010de54 <_Thread_Set_transient>: */ void _Thread_Set_transient( Thread_Control *the_thread ) { 10de54: 55 push %ebp 10de55: 89 e5 mov %esp,%ebp 10de57: 56 push %esi 10de58: 53 push %ebx 10de59: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; uint32_t old_state; Chain_Control *ready; ready = the_thread->ready; 10de5c: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx _ISR_Disable( level ); 10de62: 9c pushf 10de63: fa cli 10de64: 5b pop %ebx old_state = the_thread->current_state; 10de65: 8b 50 10 mov 0x10(%eax),%edx the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state ); 10de68: 89 d6 mov %edx,%esi 10de6a: 83 ce 04 or $0x4,%esi 10de6d: 89 70 10 mov %esi,0x10(%eax) if ( _States_Is_ready( old_state ) ) { 10de70: 85 d2 test %edx,%edx 10de72: 75 11 jne 10de85 <_Thread_Set_transient+0x31> if ( _Chain_Has_only_one_node( ready ) ) { 10de74: 8b 11 mov (%ecx),%edx 10de76: 3b 51 08 cmp 0x8(%ecx),%edx 10de79: 74 11 je 10de8c <_Thread_Set_transient+0x38> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10de7b: 8b 10 mov (%eax),%edx previous = the_node->previous; 10de7d: 8b 40 04 mov 0x4(%eax),%eax next->previous = previous; 10de80: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 10de83: 89 10 mov %edx,(%eax) } else _Chain_Extract_unprotected( &the_thread->Object.Node ); } _ISR_Enable( level ); 10de85: 53 push %ebx 10de86: 9d popf } 10de87: 5b pop %ebx 10de88: 5e pop %esi 10de89: c9 leave 10de8a: c3 ret 10de8b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10de8c: 8d 51 04 lea 0x4(%ecx),%edx 10de8f: 89 11 mov %edx,(%ecx) the_chain->permanent_null = NULL; 10de91: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) the_chain->last = _Chain_Head(the_chain); 10de98: 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; 10de9b: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10dea1: 66 8b 88 9a 00 00 00 mov 0x9a(%eax),%cx 10dea8: 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 ); 10deab: 66 83 3a 00 cmpw $0x0,(%edx) 10deaf: 75 d4 jne 10de85 <_Thread_Set_transient+0x31> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10deb1: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 10deb8: 23 90 98 00 00 00 and 0x98(%eax),%edx 10debe: 66 89 15 8c 74 12 00 mov %dx,0x12748c 10dec5: eb be jmp 10de85 <_Thread_Set_transient+0x31> <== ALWAYS TAKEN 0010dec8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10dec8: 55 push %ebp 10dec9: 89 e5 mov %esp,%ebp 10decb: 53 push %ebx 10decc: 83 ec 04 sub $0x4,%esp 10decf: a1 10 32 12 00 mov 0x123210,%eax 10ded4: 8b 5d 0c mov 0xc(%ebp),%ebx 10ded7: 39 c3 cmp %eax,%ebx 10ded9: 73 02 jae 10dedd <_Thread_Stack_Allocate+0x15> 10dedb: 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 ) { 10dedd: a1 40 32 12 00 mov 0x123240,%eax 10dee2: 85 c0 test %eax,%eax 10dee4: 74 32 je 10df18 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10dee6: 83 ec 0c sub $0xc,%esp 10dee9: 53 push %ebx 10deea: ff d0 call *%eax 10deec: 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 ) 10deef: 85 c0 test %eax,%eax 10def1: 74 11 je 10df04 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10def3: 8b 55 08 mov 0x8(%ebp),%edx 10def6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10defc: 89 d8 mov %ebx,%eax 10defe: 8b 5d fc mov -0x4(%ebp),%ebx 10df01: c9 leave 10df02: c3 ret 10df03: 90 nop <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10df04: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10df06: 8b 55 08 mov 0x8(%ebp),%edx 10df09: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10df0f: 89 d8 mov %ebx,%eax 10df11: 8b 5d fc mov -0x4(%ebp),%ebx 10df14: c9 leave 10df15: c3 ret 10df16: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10df18: 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 ); 10df1b: 83 ec 0c sub $0xc,%esp 10df1e: 53 push %ebx 10df1f: e8 18 07 00 00 call 10e63c <_Workspace_Allocate> <== ALWAYS TAKEN 10df24: 83 c4 10 add $0x10,%esp 10df27: eb c6 jmp 10deef <_Thread_Stack_Allocate+0x27> <== ALWAYS TAKEN 0010df2c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10df2c: 55 push %ebp 10df2d: 89 e5 mov %esp,%ebp 10df2f: 83 ec 08 sub $0x8,%esp 10df32: 8b 45 08 mov 0x8(%ebp),%eax #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 10df35: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10df3c: 74 16 je 10df54 <_Thread_Stack_Free+0x28> * 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 ) 10df3e: 8b 15 44 32 12 00 mov 0x123244,%edx 10df44: 85 d2 test %edx,%edx 10df46: 74 10 je 10df58 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10df48: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df4e: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df51: 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 ); 10df52: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10df54: c9 leave 10df55: c3 ret 10df56: 66 90 xchg %ax,%ax <== NOT EXECUTED */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 10df58: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10df5e: 89 45 08 mov %eax,0x8(%ebp) } 10df61: 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 ); 10df62: e9 f1 06 00 00 jmp 10e658 <_Workspace_Free> <== ALWAYS TAKEN 0010dfc4 <_Thread_Start>: Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 10dfc4: 55 push %ebp 10dfc5: 89 e5 mov %esp,%ebp 10dfc7: 53 push %ebx 10dfc8: 83 ec 04 sub $0x4,%esp 10dfcb: 8b 5d 08 mov 0x8(%ebp),%ebx if ( _States_Is_dormant( the_thread->current_state ) ) { 10dfce: f6 43 10 01 testb $0x1,0x10(%ebx) 10dfd2: 75 08 jne 10dfdc <_Thread_Start+0x18> 10dfd4: 31 c0 xor %eax,%eax return true; } return false; } 10dfd6: 8b 5d fc mov -0x4(%ebp),%ebx 10dfd9: c9 leave 10dfda: c3 ret 10dfdb: 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; 10dfdc: 8b 45 10 mov 0x10(%ebp),%eax 10dfdf: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx) the_thread->Start.prototype = the_prototype; 10dfe5: 8b 45 0c mov 0xc(%ebp),%eax 10dfe8: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx) the_thread->Start.pointer_argument = pointer_argument; 10dfee: 8b 45 14 mov 0x14(%ebp),%eax 10dff1: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 10dff7: 8b 45 18 mov 0x18(%ebp),%eax 10dffa: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) _Thread_Load_environment( the_thread ); 10e000: 83 ec 0c sub $0xc,%esp 10e003: 53 push %ebx 10e004: e8 83 2f 00 00 call 110f8c <_Thread_Load_environment> _Thread_Ready( the_thread ); 10e009: 89 1c 24 mov %ebx,(%esp) 10e00c: e8 fb 31 00 00 call 11120c <_Thread_Ready> _User_extensions_Thread_start( the_thread ); 10e011: 89 1c 24 mov %ebx,(%esp) 10e014: e8 67 03 00 00 call 10e380 <_User_extensions_Thread_start> <== ALWAYS TAKEN 10e019: b0 01 mov $0x1,%al return true; 10e01b: 83 c4 10 add $0x10,%esp } return false; } 10e01e: 8b 5d fc mov -0x4(%ebp),%ebx 10e021: c9 leave 10e022: c3 ret 0010df68 <_Thread_Start_multitasking>: * ready chain * select heir */ void _Thread_Start_multitasking( void ) { 10df68: 55 push %ebp 10df69: 89 e5 mov %esp,%ebp 10df6b: 83 ec 08 sub $0x8,%esp 10df6e: c7 05 a0 75 12 00 03 movl $0x3,0x1275a0 10df75: 00 00 00 * the system is shut down. */ _System_state_Set( SYSTEM_STATE_UP ); _Context_Switch_necessary = false; 10df78: c6 05 a8 74 12 00 00 movb $0x0,0x1274a8 _Thread_Executing = _Thread_Heir; 10df7f: a1 68 74 12 00 mov 0x127468,%eax 10df84: a3 98 74 12 00 mov %eax,0x127498 #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 ) 10df89: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx 10df8f: 85 d2 test %edx,%edx 10df91: 74 16 je 10dfa9 <_Thread_Start_multitasking+0x41> _Context_Restore_fp( &_Thread_Heir->fp_context ); 10df93: 83 ec 0c sub $0xc,%esp 10df96: 05 ec 00 00 00 add $0xec,%eax 10df9b: 50 push %eax 10df9c: e8 5d 07 00 00 call 10e6fe <_CPU_Context_restore_fp> <== ALWAYS TAKEN 10dfa1: a1 68 74 12 00 mov 0x127468,%eax 10dfa6: 83 c4 10 add $0x10,%esp #endif _Context_Switch( &_Thread_BSP_context, &_Thread_Heir->Registers ); 10dfa9: 83 ec 08 sub $0x8,%esp 10dfac: 05 d4 00 00 00 add $0xd4,%eax 10dfb1: 50 push %eax 10dfb2: 68 c0 73 12 00 push $0x1273c0 10dfb7: e8 04 07 00 00 call 10e6c0 <_CPU_Context_switch> <== ALWAYS TAKEN 10dfbc: 83 c4 10 add $0x10,%esp } 10dfbf: c9 leave 10dfc0: c3 ret 00111310 <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 111310: 55 push %ebp 111311: 89 e5 mov %esp,%ebp 111313: 56 push %esi 111314: 53 push %ebx 111315: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 111318: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 11131e: 9c pushf 11131f: fa cli 111320: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 111321: 8b 58 10 mov 0x10(%eax),%ebx 111324: 85 db test %ebx,%ebx 111326: 75 34 jne 11135c <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 111328: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 11132f: 8b 1a mov (%edx),%ebx 111331: 3b 5a 08 cmp 0x8(%edx),%ebx 111334: 74 3e je 111374 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 111336: 8b 18 mov (%eax),%ebx previous = the_node->previous; 111338: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11133b: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 11133e: 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 ); 111340: 51 push %ecx 111341: 9d popf 111342: fa cli if ( _Thread_Is_heir( the_thread ) ) 111343: 3b 05 68 74 12 00 cmp 0x127468,%eax 111349: 74 65 je 1113b0 <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 11134b: 3b 05 98 74 12 00 cmp 0x127498,%eax 111351: 74 15 je 111368 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 111353: 51 push %ecx 111354: 9d popf } 111355: 5b pop %ebx 111356: 5e pop %esi 111357: c9 leave 111358: c3 ret 111359: 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 = 11135c: 83 cb 02 or $0x2,%ebx 11135f: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 111362: 51 push %ecx 111363: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 111364: 5b pop %ebx 111365: 5e pop %esi 111366: c9 leave 111367: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 111368: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 11136f: eb e2 jmp 111353 <_Thread_Suspend+0x43> <== ALWAYS TAKEN 111371: 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); 111374: 8d 5a 04 lea 0x4(%edx),%ebx 111377: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 111379: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 111380: 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; 111383: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111389: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 111390: 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 ); 111393: 66 83 3a 00 cmpw $0x0,(%edx) 111397: 75 a7 jne 111340 <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 111399: 66 8b 15 8c 74 12 00 mov 0x12748c,%dx 1113a0: 23 90 98 00 00 00 and 0x98(%eax),%edx 1113a6: 66 89 15 8c 74 12 00 mov %dx,0x12748c 1113ad: eb 91 jmp 111340 <_Thread_Suspend+0x30> <== ALWAYS TAKEN 1113af: 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 ); 1113b0: 66 8b 35 8c 74 12 00 mov 0x12748c,%si 1113b7: 31 d2 xor %edx,%edx 1113b9: 89 d3 mov %edx,%ebx 1113bb: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 1113bf: 0f b7 db movzwl %bx,%ebx 1113c2: 66 8b b4 1b 20 75 12 mov 0x127520(%ebx,%ebx,1),%si 1113c9: 00 1113ca: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 1113ce: c1 e3 04 shl $0x4,%ebx 1113d1: 0f b7 d2 movzwl %dx,%edx 1113d4: 8d 14 13 lea (%ebx,%edx,1),%edx 1113d7: 8d 1c 52 lea (%edx,%edx,2),%ebx 1113da: 8b 15 a0 73 12 00 mov 0x1273a0,%edx 1113e0: 8b 14 9a mov (%edx,%ebx,4),%edx 1113e3: 89 15 68 74 12 00 mov %edx,0x127468 1113e9: e9 5d ff ff ff jmp 11134b <_Thread_Suspend+0x3b> <== ALWAYS TAKEN 0010e024 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e024: 55 push %ebp 10e025: 89 e5 mov %esp,%ebp 10e027: 53 push %ebx 10e028: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e02b: 8b 1d 98 74 12 00 mov 0x127498,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e031: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e035: 74 19 je 10e050 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e037: 8b 43 10 mov 0x10(%ebx),%eax 10e03a: 85 c0 test %eax,%eax 10e03c: 75 12 jne 10e050 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e03e: 8b 43 7c mov 0x7c(%ebx),%eax 10e041: 83 f8 01 cmp $0x1,%eax 10e044: 72 0a jb 10e050 <_Thread_Tickle_timeslice+0x2c> 10e046: 83 f8 02 cmp $0x2,%eax 10e049: 76 29 jbe 10e074 <_Thread_Tickle_timeslice+0x50> 10e04b: 83 f8 03 cmp $0x3,%eax 10e04e: 74 08 je 10e058 <_Thread_Tickle_timeslice+0x34> <== NEVER TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e050: 8b 5d fc mov -0x4(%ebp),%ebx 10e053: c9 leave 10e054: c3 ret 10e055: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10e058: 8b 43 78 mov 0x78(%ebx),%eax 10e05b: 48 dec %eax 10e05c: 89 43 78 mov %eax,0x78(%ebx) 10e05f: 85 c0 test %eax,%eax 10e061: 75 ed jne 10e050 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e063: 83 ec 0c sub $0xc,%esp 10e066: 53 push %ebx 10e067: ff 93 80 00 00 00 call *0x80(%ebx) 10e06d: 83 c4 10 add $0x10,%esp 10e070: eb de jmp 10e050 <_Thread_Tickle_timeslice+0x2c> <== ALWAYS TAKEN 10e072: 66 90 xchg %ax,%ax <== NOT EXECUTED 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 ) { 10e074: 8b 43 78 mov 0x78(%ebx),%eax 10e077: 48 dec %eax 10e078: 89 43 78 mov %eax,0x78(%ebx) 10e07b: 85 c0 test %eax,%eax 10e07d: 7f d1 jg 10e050 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e07f: e8 2c 32 00 00 call 1112b0 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e084: a1 a4 73 12 00 mov 0x1273a4,%eax 10e089: 89 43 78 mov %eax,0x78(%ebx) 10e08c: eb c2 jmp 10e050 <_Thread_Tickle_timeslice+0x2c> <== ALWAYS TAKEN 0010e090 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e090: 55 push %ebp 10e091: 89 e5 mov %esp,%ebp 10e093: 56 push %esi 10e094: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e095: a1 98 74 12 00 mov 0x127498,%eax ready = executing->ready; 10e09a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e0a0: 9c pushf 10e0a1: fa cli 10e0a2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e0a3: 8b 1a mov (%edx),%ebx 10e0a5: 3b 5a 08 cmp 0x8(%edx),%ebx 10e0a8: 74 3e je 10e0e8 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e0aa: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e0ac: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e0af: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e0b2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e0b4: 8d 5a 04 lea 0x4(%edx),%ebx 10e0b7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e0b9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e0bc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e0bf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e0c1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e0c4: 51 push %ecx 10e0c5: 9d popf 10e0c6: fa cli if ( _Thread_Is_heir( executing ) ) 10e0c7: 3b 05 68 74 12 00 cmp 0x127468,%eax 10e0cd: 74 0d je 10e0dc <_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; 10e0cf: c6 05 a8 74 12 00 01 movb $0x1,0x1274a8 _ISR_Enable( level ); 10e0d6: 51 push %ecx 10e0d7: 9d popf } 10e0d8: 5b pop %ebx 10e0d9: 5e pop %esi 10e0da: c9 leave 10e0db: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e0dc: 8b 02 mov (%edx),%eax 10e0de: a3 68 74 12 00 mov %eax,0x127468 10e0e3: eb ea jmp 10e0cf <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10e0e5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e0e8: 3b 05 68 74 12 00 cmp 0x127468,%eax 10e0ee: 75 df jne 10e0cf <_Thread_Yield_processor+0x3f> <== ALWAYS TAKEN 10e0f0: eb e4 jmp 10e0d6 <_Thread_Yield_processor+0x46> <== ALWAYS TAKEN 0010cf80 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 10cf80: 55 push %ebp 10cf81: 89 e5 mov %esp,%ebp 10cf83: 53 push %ebx 10cf84: 83 ec 04 sub $0x4,%esp 10cf87: 8b 5d 0c mov 0xc(%ebp),%ebx 10cf8a: 8b 45 10 mov 0x10(%ebp),%eax #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 10cf8d: 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 ) ) { 10cf94: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10cf98: 74 16 je 10cfb0 <_Thread_blocking_operation_Cancel+0x30> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 10cf9a: 50 push %eax 10cf9b: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10cf9c: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 10cfa3: 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 } 10cfa6: 8b 5d fc mov -0x4(%ebp),%ebx 10cfa9: c9 leave 10cfaa: e9 5d 01 00 00 jmp 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10cfaf: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10cfb0: 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 ); 10cfb7: 50 push %eax 10cfb8: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10cfb9: 83 ec 0c sub $0xc,%esp 10cfbc: 8d 43 48 lea 0x48(%ebx),%eax 10cfbf: 50 push %eax 10cfc0: e8 73 15 00 00 call 10e538 <_Watchdog_Remove> 10cfc5: 83 c4 10 add $0x10,%esp 10cfc8: eb d2 jmp 10cf9c <_Thread_blocking_operation_Cancel+0x1c> <== ALWAYS TAKEN 0010d8a8 <_Thread_queue_Dequeue>: */ Thread_Control *_Thread_queue_Dequeue( Thread_queue_Control *the_thread_queue ) { 10d8a8: 55 push %ebp 10d8a9: 89 e5 mov %esp,%ebp 10d8ab: 53 push %ebx 10d8ac: 83 ec 04 sub $0x4,%esp 10d8af: 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 ) 10d8b2: 83 7b 34 01 cmpl $0x1,0x34(%ebx) 10d8b6: 74 1c je 10d8d4 <_Thread_queue_Dequeue+0x2c> 10d8b8: b8 1c 10 11 00 mov $0x11101c,%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 ); 10d8bd: 83 ec 0c sub $0xc,%esp 10d8c0: 53 push %ebx 10d8c1: ff d0 call *%eax _ISR_Disable( level ); 10d8c3: 9c pushf 10d8c4: fa cli 10d8c5: 5a pop %edx if ( !the_thread ) { 10d8c6: 83 c4 10 add $0x10,%esp 10d8c9: 85 c0 test %eax,%eax 10d8cb: 74 0f je 10d8dc <_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 ); 10d8cd: 52 push %edx 10d8ce: 9d popf return the_thread; } 10d8cf: 8b 5d fc mov -0x4(%ebp),%ebx 10d8d2: c9 leave 10d8d3: 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 ) 10d8d4: b8 f4 d8 10 00 mov $0x10d8f4,%eax 10d8d9: eb e2 jmp 10d8bd <_Thread_queue_Dequeue+0x15> <== ALWAYS TAKEN 10d8db: 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; 10d8dc: 8b 4b 30 mov 0x30(%ebx),%ecx 10d8df: 49 dec %ecx 10d8e0: 83 f9 01 cmp $0x1,%ecx 10d8e3: 77 e8 ja 10d8cd <_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; 10d8e5: c7 43 30 03 00 00 00 movl $0x3,0x30(%ebx) the_thread = _Thread_Executing; 10d8ec: a1 98 74 12 00 mov 0x127498,%eax 10d8f1: eb da jmp 10d8cd <_Thread_queue_Dequeue+0x25> <== ALWAYS TAKEN 0011101c <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 11101c: 55 push %ebp 11101d: 89 e5 mov %esp,%ebp 11101f: 53 push %ebx 111020: 83 ec 04 sub $0x4,%esp 111023: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 111026: 9c pushf 111027: fa cli 111028: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 111029: 8b 18 mov (%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11102b: 8d 50 04 lea 0x4(%eax),%edx 11102e: 39 d3 cmp %edx,%ebx 111030: 74 5a je 11108c <_Thread_queue_Dequeue_fifo+0x70> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 111032: 8b 13 mov (%ebx),%edx the_chain->first = new_first; 111034: 89 10 mov %edx,(%eax) new_first->previous = _Chain_Head(the_chain); 111036: 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; 111039: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111040: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111044: 74 1a je 111060 <_Thread_queue_Dequeue_fifo+0x44> _ISR_Enable( level ); 111046: 51 push %ecx 111047: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 111048: 83 ec 08 sub $0x8,%esp 11104b: 68 f8 ff 03 10 push $0x1003fff8 111050: 53 push %ebx 111051: e8 b6 c0 ff ff call 10d10c <_Thread_Clear_state> 111056: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 111059: 89 d8 mov %ebx,%eax 11105b: 8b 5d fc mov -0x4(%ebp),%ebx 11105e: c9 leave 11105f: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 111060: 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 ); 111067: 51 push %ecx 111068: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 111069: 83 ec 0c sub $0xc,%esp 11106c: 8d 43 48 lea 0x48(%ebx),%eax 11106f: 50 push %eax 111070: e8 c3 d4 ff ff call 10e538 <_Watchdog_Remove> 111075: 58 pop %eax 111076: 5a pop %edx 111077: 68 f8 ff 03 10 push $0x1003fff8 11107c: 53 push %ebx 11107d: e8 8a c0 ff ff call 10d10c <_Thread_Clear_state> 111082: 83 c4 10 add $0x10,%esp return the_thread; } _ISR_Enable( level ); return NULL; } 111085: 89 d8 mov %ebx,%eax 111087: 8b 5d fc mov -0x4(%ebp),%ebx 11108a: c9 leave 11108b: c3 ret #endif return the_thread; } _ISR_Enable( level ); 11108c: 51 push %ecx 11108d: 9d popf 11108e: 31 db xor %ebx,%ebx return NULL; 111090: eb c7 jmp 111059 <_Thread_queue_Dequeue_fifo+0x3d> <== ALWAYS TAKEN 0010d8f4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10d8f4: 55 push %ebp 10d8f5: 89 e5 mov %esp,%ebp 10d8f7: 57 push %edi 10d8f8: 56 push %esi 10d8f9: 53 push %ebx 10d8fa: 83 ec 1c sub $0x1c,%esp 10d8fd: 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 ); 10d900: 9c pushf 10d901: fa cli 10d902: 58 pop %eax 10d903: 89 f2 mov %esi,%edx 10d905: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10d907: 8d 5a 04 lea 0x4(%edx),%ebx 10d90a: 39 1a cmp %ebx,(%edx) 10d90c: 75 1a jne 10d928 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10d90e: 41 inc %ecx 10d90f: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10d912: 83 f9 04 cmp $0x4,%ecx 10d915: 75 f0 jne 10d907 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10d917: 50 push %eax 10d918: 9d popf 10d919: 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 ); } 10d91b: 89 d8 mov %ebx,%eax 10d91d: 8d 65 f4 lea -0xc(%ebp),%esp 10d920: 5b pop %ebx 10d921: 5e pop %esi 10d922: 5f pop %edi 10d923: c9 leave 10d924: c3 ret 10d925: 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 *) 10d928: 8d 14 49 lea (%ecx,%ecx,2),%edx 10d92b: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10d92e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10d935: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10d938: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10d93a: 8b 73 04 mov 0x4(%ebx),%esi 10d93d: 8d 7b 3c lea 0x3c(%ebx),%edi 10d940: 39 fa cmp %edi,%edx 10d942: 74 76 je 10d9ba <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10d944: 8b 7b 40 mov 0x40(%ebx),%edi 10d947: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10d94a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10d94c: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10d94e: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10d951: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10d953: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10d956: 8b 4b 38 mov 0x38(%ebx),%ecx 10d959: 3b 4b 40 cmp 0x40(%ebx),%ecx 10d95c: 74 14 je 10d972 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10d95e: 8d 4a 38 lea 0x38(%edx),%ecx 10d961: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10d964: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10d967: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d96a: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10d96d: 83 c2 3c add $0x3c,%edx 10d970: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10d972: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d976: 74 18 je 10d990 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10d978: 50 push %eax 10d979: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d97a: 83 ec 08 sub $0x8,%esp 10d97d: 68 f8 ff 03 10 push $0x1003fff8 10d982: 53 push %ebx 10d983: e8 84 f7 ff ff call 10d10c <_Thread_Clear_state> <== ALWAYS TAKEN 10d988: 83 c4 10 add $0x10,%esp 10d98b: eb 8e jmp 10d91b <_Thread_queue_Dequeue_priority+0x27> <== ALWAYS TAKEN 10d98d: 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; 10d990: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10d997: 50 push %eax 10d998: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10d999: 83 ec 0c sub $0xc,%esp 10d99c: 8d 43 48 lea 0x48(%ebx),%eax 10d99f: 50 push %eax 10d9a0: e8 93 0b 00 00 call 10e538 <_Watchdog_Remove> <== ALWAYS TAKEN 10d9a5: 58 pop %eax 10d9a6: 5a pop %edx 10d9a7: 68 f8 ff 03 10 push $0x1003fff8 10d9ac: 53 push %ebx 10d9ad: e8 5a f7 ff ff call 10d10c <_Thread_Clear_state> 10d9b2: 83 c4 10 add $0x10,%esp 10d9b5: e9 61 ff ff ff jmp 10d91b <_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; 10d9ba: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10d9bc: 89 71 04 mov %esi,0x4(%ecx) 10d9bf: eb b1 jmp 10d972 <_Thread_queue_Dequeue_priority+0x7e> <== ALWAYS TAKEN 00111094 <_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 ) { 111094: 55 push %ebp 111095: 89 e5 mov %esp,%ebp 111097: 56 push %esi 111098: 53 push %ebx 111099: 8b 55 08 mov 0x8(%ebp),%edx 11109c: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 11109f: 9c pushf 1110a0: fa cli 1110a1: 59 pop %ecx sync_state = the_thread_queue->sync_state; 1110a2: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 1110a5: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 1110ac: 83 f8 01 cmp $0x1,%eax 1110af: 74 0b je 1110bc <_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; 1110b1: 8b 55 10 mov 0x10(%ebp),%edx 1110b4: 89 0a mov %ecx,(%edx) return sync_state; } 1110b6: 5b pop %ebx 1110b7: 5e pop %esi 1110b8: c9 leave 1110b9: c3 ret 1110ba: 66 90 xchg %ax,%ax <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1110bc: 8d 72 04 lea 0x4(%edx),%esi 1110bf: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 1110c1: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 1110c4: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 1110c7: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 1110c9: 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; 1110cc: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 1110cf: 51 push %ecx 1110d0: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 1110d1: 5b pop %ebx 1110d2: 5e pop %esi 1110d3: c9 leave 1110d4: c3 ret 0010da5c <_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 ) { 10da5c: 55 push %ebp 10da5d: 89 e5 mov %esp,%ebp 10da5f: 57 push %edi 10da60: 56 push %esi 10da61: 53 push %ebx 10da62: 83 ec 08 sub $0x8,%esp 10da65: 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); 10da68: 8d 47 3c lea 0x3c(%edi),%eax 10da6b: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10da6e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10da75: 8d 47 38 lea 0x38(%edi),%eax 10da78: 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; 10da7b: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10da7e: 89 d0 mov %edx,%eax 10da80: c1 e8 06 shr $0x6,%eax 10da83: 8d 04 40 lea (%eax,%eax,2),%eax 10da86: 8b 4d 08 mov 0x8(%ebp),%ecx 10da89: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10da8c: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10da8f: f6 c2 20 test $0x20,%dl 10da92: 75 60 jne 10daf4 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10da94: 8d 46 04 lea 0x4(%esi),%eax 10da97: 89 75 f0 mov %esi,-0x10(%ebp) 10da9a: 89 7d ec mov %edi,-0x14(%ebp) 10da9d: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10da9f: 9c pushf 10daa0: fa cli 10daa1: 5e pop %esi search_thread = (Thread_Control *) header->first; 10daa2: 8b 4d f0 mov -0x10(%ebp),%ecx 10daa5: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10daa7: 39 f8 cmp %edi,%eax 10daa9: 75 17 jne 10dac2 <_Thread_queue_Enqueue_priority+0x66> 10daab: e9 09 01 00 00 jmp 10dbb9 <_Thread_queue_Enqueue_priority+0x15d> <== ALWAYS TAKEN break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10dab0: 56 push %esi 10dab1: 9d popf 10dab2: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10dab3: 85 58 10 test %ebx,0x10(%eax) 10dab6: 0f 84 a8 00 00 00 je 10db64 <_Thread_queue_Enqueue_priority+0x108> <== ALWAYS TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10dabc: 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 ) ) { 10dabe: 39 f8 cmp %edi,%eax 10dac0: 74 07 je 10dac9 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10dac2: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10dac5: 39 ca cmp %ecx,%edx 10dac7: 77 e7 ja 10dab0 <_Thread_queue_Enqueue_priority+0x54> 10dac9: 89 4d f0 mov %ecx,-0x10(%ebp) 10dacc: 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 ) ) { 10dacf: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10dad1: 8b 4d 08 mov 0x8(%ebp),%ecx 10dad4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10dad8: 0f 84 8e 00 00 00 je 10db6c <_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; 10dade: 8b 45 10 mov 0x10(%ebp),%eax 10dae1: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10dae3: 8b 55 08 mov 0x8(%ebp),%edx 10dae6: 8b 42 30 mov 0x30(%edx),%eax } 10dae9: 83 c4 08 add $0x8,%esp 10daec: 5b pop %ebx 10daed: 5e pop %esi 10daee: 5f pop %edi 10daef: c9 leave 10daf0: c3 ret 10daf1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10daf4: 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; 10daf7: 0f b6 0d 14 32 12 00 movzbl 0x123214,%ecx 10dafe: 41 inc %ecx _ISR_Disable( level ); 10daff: 9c pushf 10db00: fa cli 10db01: 5f pop %edi search_thread = (Thread_Control *) header->last; 10db02: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10db05: 39 f0 cmp %esi,%eax 10db07: 75 12 jne 10db1b <_Thread_queue_Enqueue_priority+0xbf> 10db09: eb 17 jmp 10db22 <_Thread_queue_Enqueue_priority+0xc6> <== ALWAYS TAKEN 10db0b: 90 nop <== NOT EXECUTED break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10db0c: 57 push %edi 10db0d: 9d popf 10db0e: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10db0f: 85 58 10 test %ebx,0x10(%eax) 10db12: 74 4c je 10db60 <_Thread_queue_Enqueue_priority+0x104> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10db14: 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 ) ) { 10db17: 39 f0 cmp %esi,%eax 10db19: 74 07 je 10db22 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10db1b: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10db1e: 39 ca cmp %ecx,%edx 10db20: 72 ea jb 10db0c <_Thread_queue_Enqueue_priority+0xb0> 10db22: 89 fe mov %edi,%esi 10db24: 89 4d ec mov %ecx,-0x14(%ebp) 10db27: 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 ) ) { 10db2a: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10db2c: 8b 4d 08 mov 0x8(%ebp),%ecx 10db2f: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10db33: 75 a9 jne 10dade <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10db35: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10db3c: 3b 55 ec cmp -0x14(%ebp),%edx 10db3f: 74 56 je 10db97 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10db41: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10db43: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10db45: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10db48: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10db4a: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10db4d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10db50: 56 push %esi 10db51: 9d popf 10db52: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10db57: 83 c4 08 add $0x8,%esp 10db5a: 5b pop %ebx 10db5b: 5e pop %esi 10db5c: 5f pop %edi 10db5d: c9 leave 10db5e: c3 ret 10db5f: 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 ); 10db60: 57 push %edi 10db61: 9d popf goto restart_reverse_search; 10db62: eb 93 jmp 10daf7 <_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 ); 10db64: 56 push %esi <== NOT EXECUTED 10db65: 9d popf <== NOT EXECUTED goto restart_forward_search; 10db66: e9 34 ff ff ff jmp 10da9f <_Thread_queue_Enqueue_priority+0x43> <== NOT EXECUTED 10db6b: 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; 10db6c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10db73: 3b 55 f0 cmp -0x10(%ebp),%edx 10db76: 74 1f je 10db97 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10db78: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10db7b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10db7d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10db80: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10db82: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10db85: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10db88: 56 push %esi 10db89: 9d popf 10db8a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10db8f: 83 c4 08 add $0x8,%esp 10db92: 5b pop %ebx 10db93: 5e pop %esi 10db94: 5f pop %edi 10db95: c9 leave 10db96: c3 ret 10db97: 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; 10db9a: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10db9d: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10db9f: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10dba2: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10dba4: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10dba7: 8b 45 08 mov 0x8(%ebp),%eax 10dbaa: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10dbad: 53 push %ebx 10dbae: 9d popf 10dbaf: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10dbb4: e9 30 ff ff ff jmp 10dae9 <_Thread_queue_Enqueue_priority+0x8d> <== ALWAYS TAKEN 10dbb9: 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 ) ) { 10dbbc: 89 f3 mov %esi,%ebx 10dbbe: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10dbc5: e9 07 ff ff ff jmp 10dad1 <_Thread_queue_Enqueue_priority+0x75> <== ALWAYS TAKEN 0010d9c4 <_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 ) { 10d9c4: 55 push %ebp 10d9c5: 89 e5 mov %esp,%ebp 10d9c7: 57 push %edi 10d9c8: 56 push %esi 10d9c9: 53 push %ebx 10d9ca: 83 ec 24 sub $0x24,%esp 10d9cd: 8b 75 08 mov 0x8(%ebp),%esi 10d9d0: 8b 7d 0c mov 0xc(%ebp),%edi Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; 10d9d3: 8b 1d 98 74 12 00 mov 0x127498,%ebx else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 10d9d9: ff 76 38 pushl 0x38(%esi) 10d9dc: 53 push %ebx 10d9dd: e8 96 03 00 00 call 10dd78 <_Thread_Set_state> <== ALWAYS TAKEN /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 10d9e2: 83 c4 10 add $0x10,%esp 10d9e5: 85 ff test %edi,%edi 10d9e7: 75 33 jne 10da1c <_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 ) 10d9e9: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10d9ed: 74 64 je 10da53 <_Thread_queue_Enqueue_with_handler+0x8f> 10d9ef: b8 94 10 11 00 mov $0x111094,%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 ); 10d9f4: 51 push %ecx 10d9f5: 8d 55 e4 lea -0x1c(%ebp),%edx 10d9f8: 52 push %edx 10d9f9: 53 push %ebx 10d9fa: 56 push %esi 10d9fb: ff d0 call *%eax if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10d9fd: 83 c4 10 add $0x10,%esp 10da00: 83 f8 01 cmp $0x1,%eax 10da03: 74 0e je 10da13 <_Thread_queue_Enqueue_with_handler+0x4f> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); 10da05: 52 push %edx 10da06: ff 75 e4 pushl -0x1c(%ebp) 10da09: 53 push %ebx 10da0a: 50 push %eax 10da0b: e8 70 f5 ff ff call 10cf80 <_Thread_blocking_operation_Cancel> 10da10: 83 c4 10 add $0x10,%esp } 10da13: 8d 65 f4 lea -0xc(%ebp),%esp 10da16: 5b pop %ebx 10da17: 5e pop %esi 10da18: 5f pop %edi 10da19: c9 leave 10da1a: c3 ret 10da1b: 90 nop <== NOT EXECUTED /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( 10da1c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10da1f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10da26: 8b 55 10 mov 0x10(%ebp),%edx 10da29: 89 53 64 mov %edx,0x64(%ebx) the_watchdog->id = id; 10da2c: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10da2f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10da36: 89 7b 54 mov %edi,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10da39: 83 ec 08 sub $0x8,%esp 10da3c: 8d 43 48 lea 0x48(%ebx),%eax 10da3f: 50 push %eax 10da40: 68 b8 74 12 00 push $0x1274b8 10da45: e8 b6 09 00 00 call 10e400 <_Watchdog_Insert> <== ALWAYS TAKEN 10da4a: 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 ) 10da4d: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10da51: 75 9c jne 10d9ef <_Thread_queue_Enqueue_with_handler+0x2b> 10da53: b8 5c da 10 00 mov $0x10da5c,%eax 10da58: eb 9a jmp 10d9f4 <_Thread_queue_Enqueue_with_handler+0x30> <== ALWAYS TAKEN 001110d8 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 1110d8: 55 push %ebp 1110d9: 89 e5 mov %esp,%ebp 1110db: 83 ec 08 sub $0x8,%esp 1110de: 8b 45 08 mov 0x8(%ebp),%eax 1110e1: 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 ) 1110e4: 83 78 34 01 cmpl $0x1,0x34(%eax) 1110e8: 74 0e je 1110f8 <_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 ); 1110ea: 89 55 0c mov %edx,0xc(%ebp) 1110ed: 89 45 08 mov %eax,0x8(%ebp) } 1110f0: 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 ); 1110f1: e9 06 1d 00 00 jmp 112dfc <_Thread_queue_Extract_fifo> 1110f6: 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 ); 1110f8: 51 push %ecx 1110f9: 6a 00 push $0x0 1110fb: 52 push %edx 1110fc: 50 push %eax 1110fd: e8 06 00 00 00 call 111108 <_Thread_queue_Extract_priority_helper> <== ALWAYS TAKEN 111102: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 111105: c9 leave 111106: c3 ret 00112dfc <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 112dfc: 55 push %ebp 112dfd: 89 e5 mov %esp,%ebp 112dff: 53 push %ebx 112e00: 83 ec 04 sub $0x4,%esp 112e03: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 112e06: 9c pushf 112e07: fa cli 112e08: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 112e09: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112e10: 74 2e je 112e40 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112e12: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 112e14: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 112e17: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 112e1a: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 112e1c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 112e23: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 112e27: 74 1f je 112e48 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 112e29: 50 push %eax 112e2a: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 112e2b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 112e32: 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 } 112e35: 8b 5d fc mov -0x4(%ebp),%ebx 112e38: c9 leave 112e39: e9 ce a2 ff ff jmp 10d10c <_Thread_Clear_state> 112e3e: 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 ); 112e40: 50 push %eax 112e41: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 112e42: 8b 5d fc mov -0x4(%ebp),%ebx 112e45: c9 leave 112e46: c3 ret 112e47: 90 nop <== NOT EXECUTED 112e48: 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 ); 112e4f: 50 push %eax 112e50: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 112e51: 83 ec 0c sub $0xc,%esp 112e54: 8d 43 48 lea 0x48(%ebx),%eax 112e57: 50 push %eax 112e58: e8 db b6 ff ff call 10e538 <_Watchdog_Remove> 112e5d: 83 c4 10 add $0x10,%esp 112e60: eb c9 jmp 112e2b <_Thread_queue_Extract_fifo+0x2f> <== ALWAYS TAKEN 00111108 <_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 ) { 111108: 55 push %ebp 111109: 89 e5 mov %esp,%ebp 11110b: 57 push %edi 11110c: 56 push %esi 11110d: 53 push %ebx 11110e: 83 ec 1c sub $0x1c,%esp 111111: 8b 5d 0c mov 0xc(%ebp),%ebx 111114: 8a 45 10 mov 0x10(%ebp),%al 111117: 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 ); 11111a: 9c pushf 11111b: fa cli 11111c: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11111f: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 111126: 74 6c je 111194 <_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; 111128: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 11112a: 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)); 11112d: 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; 111130: 8d 73 3c lea 0x3c(%ebx),%esi 111133: 39 f0 cmp %esi,%eax 111135: 74 69 je 1111a0 <_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; 111137: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 11113a: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 11113c: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 11113e: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 111141: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 111143: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 111146: 8b 53 38 mov 0x38(%ebx),%edx 111149: 3b 53 40 cmp 0x40(%ebx),%edx 11114c: 74 11 je 11115f <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 11114e: 8d 50 38 lea 0x38(%eax),%edx 111151: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 111154: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 111157: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 11115a: 83 c0 3c add $0x3c,%eax 11115d: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 11115f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 111163: 75 23 jne 111188 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 111165: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 111169: 74 3d je 1111a8 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 11116b: ff 75 e4 pushl -0x1c(%ebp) 11116e: 9d popf 11116f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 111176: 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 } 111179: 8d 65 f4 lea -0xc(%ebp),%esp 11117c: 5b pop %ebx 11117d: 5e pop %esi 11117e: 5f pop %edi 11117f: c9 leave 111180: e9 87 bf ff ff jmp 10d10c <_Thread_Clear_state> 111185: 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 ); 111188: ff 75 e4 pushl -0x1c(%ebp) 11118b: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 11118c: 8d 65 f4 lea -0xc(%ebp),%esp 11118f: 5b pop %ebx 111190: 5e pop %esi 111191: 5f pop %edi 111192: c9 leave 111193: 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 ); 111194: ff 75 e4 pushl -0x1c(%ebp) 111197: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 111198: 8d 65 f4 lea -0xc(%ebp),%esp 11119b: 5b pop %ebx 11119c: 5e pop %esi 11119d: 5f pop %edi 11119e: c9 leave 11119f: 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; 1111a0: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 1111a2: 89 4a 04 mov %ecx,0x4(%edx) 1111a5: eb b8 jmp 11115f <_Thread_queue_Extract_priority_helper+0x57> <== ALWAYS TAKEN 1111a7: 90 nop <== NOT EXECUTED 1111a8: 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 ); 1111af: ff 75 e4 pushl -0x1c(%ebp) 1111b2: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1111b3: 83 ec 0c sub $0xc,%esp 1111b6: 8d 43 48 lea 0x48(%ebx),%eax 1111b9: 50 push %eax 1111ba: e8 79 d3 ff ff call 10e538 <_Watchdog_Remove> 1111bf: 83 c4 10 add $0x10,%esp 1111c2: eb ab jmp 11116f <_Thread_queue_Extract_priority_helper+0x67> <== ALWAYS TAKEN 0010dbcc <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10dbcc: 55 push %ebp 10dbcd: 89 e5 mov %esp,%ebp 10dbcf: 83 ec 08 sub $0x8,%esp 10dbd2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10dbd5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10dbdc: 75 06 jne 10dbe4 <_Thread_queue_Extract_with_proxy+0x18> 10dbde: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10dbe0: c9 leave 10dbe1: c3 ret 10dbe2: 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 ); 10dbe4: 83 ec 08 sub $0x8,%esp 10dbe7: 50 push %eax 10dbe8: ff 70 44 pushl 0x44(%eax) 10dbeb: e8 e8 34 00 00 call 1110d8 <_Thread_queue_Extract> 10dbf0: b0 01 mov $0x1,%al return true; 10dbf2: 83 c4 10 add $0x10,%esp } return false; } 10dbf5: c9 leave 10dbf6: c3 ret 0010fa34 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 10fa34: 55 push %ebp 10fa35: 89 e5 mov %esp,%ebp 10fa37: 83 ec 08 sub $0x8,%esp 10fa3a: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 10fa3d: 83 78 34 01 cmpl $0x1,0x34(%eax) 10fa41: 74 0d je 10fa50 <_Thread_queue_First+0x1c> 10fa43: ba 6c 30 11 00 mov $0x11306c,%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 ); 10fa48: 89 45 08 mov %eax,0x8(%ebp) } 10fa4b: 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 ); 10fa4c: ff e2 jmp *%edx 10fa4e: 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 ) 10fa50: ba 5c fa 10 00 mov $0x10fa5c,%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 ); 10fa55: 89 45 08 mov %eax,0x8(%ebp) } 10fa58: 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 ); 10fa59: ff e2 jmp *%edx 0011306c <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 11306c: 55 push %ebp 11306d: 89 e5 mov %esp,%ebp 11306f: 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)); 113072: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113074: 83 c2 04 add $0x4,%edx 113077: 39 d0 cmp %edx,%eax 113079: 74 05 je 113080 <_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; } 11307b: c9 leave 11307c: c3 ret 11307d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 113080: 31 c0 xor %eax,%eax 113082: c9 leave 113083: c3 ret 0010dbf8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10dbf8: 55 push %ebp 10dbf9: 89 e5 mov %esp,%ebp 10dbfb: 56 push %esi 10dbfc: 53 push %ebx 10dbfd: 8b 5d 08 mov 0x8(%ebp),%ebx 10dc00: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc03: eb 06 jmp 10dc0b <_Thread_queue_Flush+0x13> <== ALWAYS TAKEN 10dc05: 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; 10dc08: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10dc0b: 83 ec 0c sub $0xc,%esp 10dc0e: 53 push %ebx 10dc0f: e8 94 fc ff ff call 10d8a8 <_Thread_queue_Dequeue> <== ALWAYS TAKEN 10dc14: 83 c4 10 add $0x10,%esp 10dc17: 85 c0 test %eax,%eax 10dc19: 75 ed jne 10dc08 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10dc1b: 8d 65 f8 lea -0x8(%ebp),%esp 10dc1e: 5b pop %ebx 10dc1f: 5e pop %esi 10dc20: c9 leave 10dc21: c3 ret 0010dc24 <_Thread_queue_Initialize>: Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 10dc24: 55 push %ebp 10dc25: 89 e5 mov %esp,%ebp 10dc27: 8b 45 08 mov 0x8(%ebp),%eax 10dc2a: 8b 55 0c mov 0xc(%ebp),%edx the_thread_queue->state = state; 10dc2d: 8b 4d 10 mov 0x10(%ebp),%ecx 10dc30: 89 48 38 mov %ecx,0x38(%eax) the_thread_queue->discipline = the_discipline; 10dc33: 89 50 34 mov %edx,0x34(%eax) the_thread_queue->timeout_status = timeout_status; 10dc36: 8b 4d 14 mov 0x14(%ebp),%ecx 10dc39: 89 48 3c mov %ecx,0x3c(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10dc3c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10dc43: 4a dec %edx 10dc44: 74 12 je 10dc58 <_Thread_queue_Initialize+0x34> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dc46: 8d 50 04 lea 0x4(%eax),%edx 10dc49: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dc4b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dc52: 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 ); } } 10dc55: c9 leave 10dc56: c3 ret 10dc57: 90 nop <== NOT EXECUTED * timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize( 10dc58: 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); 10dc5b: 8d 50 04 lea 0x4(%eax),%edx 10dc5e: 89 10 mov %edx,(%eax) the_chain->permanent_null = NULL; 10dc60: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) the_chain->last = _Chain_Head(the_chain); 10dc67: 89 40 08 mov %eax,0x8(%eax) 10dc6a: 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 ; 10dc6d: 39 c8 cmp %ecx,%eax 10dc6f: 75 ea jne 10dc5b <_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 ); } } 10dc71: c9 leave 10dc72: c3 ret 001111c4 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 1111c4: 55 push %ebp 1111c5: 89 e5 mov %esp,%ebp 1111c7: 83 ec 08 sub $0x8,%esp 1111ca: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 1111cd: 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 && 1111d0: 8b 4a 30 mov 0x30(%edx),%ecx 1111d3: 85 c9 test %ecx,%ecx 1111d5: 74 08 je 1111df <_Thread_queue_Process_timeout+0x1b> 1111d7: 3b 05 98 74 12 00 cmp 0x127498,%eax 1111dd: 74 19 je 1111f8 <_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; 1111df: 8b 52 3c mov 0x3c(%edx),%edx 1111e2: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 1111e5: 83 ec 08 sub $0x8,%esp 1111e8: 50 push %eax 1111e9: ff 70 44 pushl 0x44(%eax) 1111ec: e8 e7 fe ff ff call 1110d8 <_Thread_queue_Extract> <== ALWAYS TAKEN 1111f1: 83 c4 10 add $0x10,%esp } } 1111f4: c9 leave 1111f5: c3 ret 1111f6: 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 ) { 1111f8: 83 f9 03 cmp $0x3,%ecx 1111fb: 74 f7 je 1111f4 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 1111fd: 8b 4a 3c mov 0x3c(%edx),%ecx 111200: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 111203: 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 ); } } 11120a: c9 leave 11120b: c3 ret 0010dc74 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10dc74: 55 push %ebp 10dc75: 89 e5 mov %esp,%ebp 10dc77: 57 push %edi 10dc78: 56 push %esi 10dc79: 53 push %ebx 10dc7a: 83 ec 1c sub $0x1c,%esp 10dc7d: 8b 75 08 mov 0x8(%ebp),%esi 10dc80: 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 ) 10dc83: 85 f6 test %esi,%esi 10dc85: 74 06 je 10dc8d <_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 ) { 10dc87: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10dc8b: 74 0b je 10dc98 <_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 ); } } 10dc8d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10dc90: 5b pop %ebx <== NOT EXECUTED 10dc91: 5e pop %esi <== NOT EXECUTED 10dc92: 5f pop %edi <== NOT EXECUTED 10dc93: c9 leave <== NOT EXECUTED 10dc94: c3 ret <== NOT EXECUTED 10dc95: 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 ); 10dc98: 9c pushf 10dc99: fa cli 10dc9a: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10dc9b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10dca2: 75 0c jne 10dcb0 <_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 ); 10dca4: 53 push %ebx 10dca5: 9d popf } } 10dca6: 8d 65 f4 lea -0xc(%ebp),%esp 10dca9: 5b pop %ebx 10dcaa: 5e pop %esi 10dcab: 5f pop %edi 10dcac: c9 leave 10dcad: c3 ret 10dcae: 66 90 xchg %ax,%ax <== NOT EXECUTED 10dcb0: 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 ); 10dcb7: 50 push %eax 10dcb8: 6a 01 push $0x1 10dcba: 57 push %edi 10dcbb: 56 push %esi 10dcbc: e8 47 34 00 00 call 111108 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10dcc1: 83 c4 0c add $0xc,%esp 10dcc4: 8d 45 e4 lea -0x1c(%ebp),%eax 10dcc7: 50 push %eax 10dcc8: 57 push %edi 10dcc9: 56 push %esi 10dcca: e8 8d fd ff ff call 10da5c <_Thread_queue_Enqueue_priority> <== ALWAYS TAKEN 10dccf: 83 c4 10 add $0x10,%esp 10dcd2: eb d0 jmp 10dca4 <_Thread_queue_Requeue+0x30> <== ALWAYS TAKEN 0010dcd4 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dcd4: 55 push %ebp 10dcd5: 89 e5 mov %esp,%ebp 10dcd7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dcda: 8d 45 f4 lea -0xc(%ebp),%eax 10dcdd: 50 push %eax 10dcde: ff 75 08 pushl 0x8(%ebp) 10dce1: e8 f2 f7 ff ff call 10d4d8 <_Thread_Get> <== ALWAYS TAKEN switch ( location ) { 10dce6: 83 c4 10 add $0x10,%esp 10dce9: 8b 55 f4 mov -0xc(%ebp),%edx 10dcec: 85 d2 test %edx,%edx 10dcee: 75 17 jne 10dd07 <_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 ); 10dcf0: 83 ec 0c sub $0xc,%esp 10dcf3: 50 push %eax 10dcf4: e8 cb 34 00 00 call 1111c4 <_Thread_queue_Process_timeout> <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10dcf9: a1 d8 73 12 00 mov 0x1273d8,%eax 10dcfe: 48 dec %eax 10dcff: a3 d8 73 12 00 mov %eax,0x1273d8 10dd04: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10dd07: c9 leave 10dd08: 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 24 1d 14 00 mov 0x141d24,%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 7e 3c 00 00 call 11c7b0 <_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 4c 1c 14 00 mov 0x141c4c,%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 84 08 00 00 call 1193d8 <_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> 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 118b5e: 83 fa 01 cmp $0x1,%edx 118b61: 74 19 je 118b7c <_Timer_server_Body+0xb8> _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 118b66: 75 e0 jne 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 118b68: 83 ec 08 sub $0x8,%esp 118b6b: 83 c0 10 add $0x10,%eax 118b6e: 50 push %eax 118b6f: ff 75 c4 pushl -0x3c(%ebp) 118b72: e8 d1 3c 00 00 call 11c848 <_Watchdog_Insert> 118b77: 83 c4 10 add $0x10,%esp 118b7a: eb cc jmp 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN 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 118b7f: 83 c0 10 add $0x10,%eax 118b82: 50 push %eax 118b83: 56 push %esi 118b84: e8 bf 3c 00 00 call 11c848 <_Watchdog_Insert> 118b89: 83 c4 10 add $0x10,%esp 118b8c: eb ba jmp 118b48 <_Timer_server_Body+0x84> <== ALWAYS TAKEN 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> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 118b9b: 50 push %eax 118b9c: 9d popf 118b9d: e9 7a ff ff ff jmp 118b1c <_Timer_server_Body+0x58> <== ALWAYS TAKEN 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 fa 3b 00 00 call 11c7b0 <_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 67 3b 00 00 call 11c738 <_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 b8 1b 14 00 mov 0x141bb8,%eax 118c2b: 40 inc %eax 118c2c: a3 b8 1b 14 00 mov %eax,0x141bb8 /* * 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 0b 33 00 00 call 11bf48 <_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 ec 28 00 00 call 11b53c <_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 23 3d 00 00 call 11c980 <_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 1a 3d 00 00 call 11c980 <_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 49 3f 00 00 call 11c980 <_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 98 1c 14 00 push $0x141c98 118a58: e8 eb 3d 00 00 call 11c848 <_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 f9 3e 00 00 call 11c980 <_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 8c 1c 14 00 push $0x141c8c 118aa8: e8 9b 3d 00 00 call 11c848 <_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> * 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 118c89: 89 45 0c mov %eax,0xc(%ebp) 118c8c: 89 55 08 mov %edx,0x8(%ebp) } } 118c8f: 8d 65 f4 lea -0xc(%ebp),%esp 118c92: 5b pop %ebx 118c93: 5e pop %esi 118c94: 5f pop %edi 118c95: c9 leave * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 118c96: e9 19 07 00 00 jmp 1193b4 <_Chain_Append> 118c9b: 90 nop <== NOT EXECUTED 118c9c: 8b 15 b8 1b 14 00 mov 0x141bb8,%edx 118ca2: 42 inc %edx 118ca3: 89 15 b8 1b 14 00 mov %edx,0x141bb8 * 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 7a 28 00 00 jmp 11b53c <_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 4c 1c 14 00 mov 0x141c4c,%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 33 3b 00 00 call 11c848 <_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 24 1d 14 00 mov 0x141d24,%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 df 3a 00 00 call 11c848 <_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 0010f9f8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 10f9f8: 55 push %ebp 10f9f9: 89 e5 mov %esp,%ebp 10f9fb: 57 push %edi 10f9fc: 56 push %esi 10f9fd: 53 push %ebx 10f9fe: 83 ec 2c sub $0x2c,%esp 10fa01: 8b 45 08 mov 0x8(%ebp),%eax 10fa04: 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; 10fa07: 8b 10 mov (%eax),%edx 10fa09: 89 55 e0 mov %edx,-0x20(%ebp) left += lhs->tv_nsec; 10fa0c: 8b 78 04 mov 0x4(%eax),%edi right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa0f: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx 10fa14: 8b 03 mov (%ebx),%eax 10fa16: f7 e9 imul %ecx 10fa18: 89 45 d0 mov %eax,-0x30(%ebp) 10fa1b: 89 55 d4 mov %edx,-0x2c(%ebp) right += rhs->tv_nsec; 10fa1e: 8b 5b 04 mov 0x4(%ebx),%ebx 10fa21: 89 de mov %ebx,%esi 10fa23: c1 fe 1f sar $0x1f,%esi 10fa26: 01 5d d0 add %ebx,-0x30(%ebp) 10fa29: 11 75 d4 adc %esi,-0x2c(%ebp) if ( right == 0 ) { 10fa2c: 8b 55 d4 mov -0x2c(%ebp),%edx 10fa2f: 0b 55 d0 or -0x30(%ebp),%edx 10fa32: 74 7c je 10fab0 <_Timespec_Divide+0xb8> /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 10fa34: 8b 45 e0 mov -0x20(%ebp),%eax 10fa37: f7 e9 imul %ecx 10fa39: 89 45 e0 mov %eax,-0x20(%ebp) 10fa3c: 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; 10fa3f: 89 fb mov %edi,%ebx 10fa41: c1 fb 1f sar $0x1f,%ebx 10fa44: 01 7d e0 add %edi,-0x20(%ebp) 10fa47: 11 5d e4 adc %ebx,-0x1c(%ebp) 10fa4a: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx 10fa51: b9 a0 86 01 00 mov $0x186a0,%ecx 10fa56: 8b 45 e0 mov -0x20(%ebp),%eax 10fa59: f7 e1 mul %ecx 10fa5b: 89 45 e0 mov %eax,-0x20(%ebp) 10fa5e: 01 da add %ebx,%edx 10fa60: 89 55 e4 mov %edx,-0x1c(%ebp) 10fa63: ff 75 d4 pushl -0x2c(%ebp) 10fa66: ff 75 d0 pushl -0x30(%ebp) 10fa69: ff 75 e4 pushl -0x1c(%ebp) 10fa6c: ff 75 e0 pushl -0x20(%ebp) 10fa6f: e8 b8 0e 01 00 call 12092c <__udivdi3> 10fa74: 83 c4 10 add $0x10,%esp 10fa77: 89 c3 mov %eax,%ebx 10fa79: 89 d6 mov %edx,%esi *ival_percentage = answer / 1000; 10fa7b: 6a 00 push $0x0 10fa7d: 68 e8 03 00 00 push $0x3e8 10fa82: 52 push %edx 10fa83: 50 push %eax 10fa84: e8 a3 0e 01 00 call 12092c <__udivdi3> 10fa89: 83 c4 10 add $0x10,%esp 10fa8c: 8b 55 10 mov 0x10(%ebp),%edx 10fa8f: 89 02 mov %eax,(%edx) *fval_percentage = answer % 1000; 10fa91: 6a 00 push $0x0 10fa93: 68 e8 03 00 00 push $0x3e8 10fa98: 56 push %esi 10fa99: 53 push %ebx 10fa9a: e8 9d 0f 01 00 call 120a3c <__umoddi3> 10fa9f: 83 c4 10 add $0x10,%esp 10faa2: 8b 55 14 mov 0x14(%ebp),%edx 10faa5: 89 02 mov %eax,(%edx) } 10faa7: 8d 65 f4 lea -0xc(%ebp),%esp 10faaa: 5b pop %ebx 10faab: 5e pop %esi 10faac: 5f pop %edi 10faad: c9 leave 10faae: c3 ret 10faaf: 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; 10fab0: 8b 45 10 mov 0x10(%ebp),%eax 10fab3: c7 00 00 00 00 00 movl $0x0,(%eax) *fval_percentage = 0; 10fab9: 8b 55 14 mov 0x14(%ebp),%edx 10fabc: c7 02 00 00 00 00 movl $0x0,(%edx) answer = (left * 100000) / right; *ival_percentage = answer / 1000; *fval_percentage = answer % 1000; } 10fac2: 8d 65 f4 lea -0xc(%ebp),%esp 10fac5: 5b pop %ebx 10fac6: 5e pop %esi 10fac7: 5f pop %edi 10fac8: c9 leave 10fac9: c3 ret 0012912c <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 12912c: 55 push %ebp 12912d: 89 e5 mov %esp,%ebp 12912f: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 129132: 85 c0 test %eax,%eax 129134: 74 1a je 129150 <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 129136: 8b 10 mov (%eax),%edx 129138: 85 d2 test %edx,%edx 12913a: 78 14 js 129150 <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 12913c: 8b 40 04 mov 0x4(%eax),%eax 12913f: 85 c0 test %eax,%eax 129141: 78 0d js 129150 <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 129143: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 129148: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12914b: c9 leave 12914c: c3 ret 12914d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #include #include #include bool _Timespec_Is_valid( 129150: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 129152: c9 leave 129153: c3 ret 00111438 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 111438: 55 push %ebp 111439: 89 e5 mov %esp,%ebp 11143b: 56 push %esi 11143c: 53 push %ebx 11143d: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 111440: 8b 33 mov (%ebx),%esi 111442: 85 f6 test %esi,%esi 111444: 75 07 jne 11144d <_Timespec_To_ticks+0x15> 111446: 8b 43 04 mov 0x4(%ebx),%eax 111449: 85 c0 test %eax,%eax 11144b: 74 37 je 111484 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 11144d: e8 96 18 00 00 call 112ce8 111452: 89 c1 mov %eax,%ecx 111454: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 111457: a1 2c 32 12 00 mov 0x12322c,%eax 11145c: 8d 04 80 lea (%eax,%eax,4),%eax 11145f: 8d 04 80 lea (%eax,%eax,4),%eax 111462: 8d 34 80 lea (%eax,%eax,4),%esi 111465: c1 e6 03 shl $0x3,%esi 111468: 8b 43 04 mov 0x4(%ebx),%eax 11146b: 31 d2 xor %edx,%edx 11146d: f7 f6 div %esi if (ticks) 11146f: 01 c8 add %ecx,%eax 111471: 74 05 je 111478 <_Timespec_To_ticks+0x40> return ticks; return 1; } 111473: 5b pop %ebx 111474: 5e pop %esi 111475: c9 leave 111476: c3 ret 111477: 90 nop <== NOT EXECUTED ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 111478: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 11147d: 5b pop %ebx 11147e: 5e pop %esi 11147f: c9 leave 111480: c3 ret 111481: 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) ) 111484: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 111486: 5b pop %ebx 111487: 5e pop %esi 111488: c9 leave 111489: c3 ret 0010e2a8 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10e2a8: 55 push %ebp 10e2a9: 89 e5 mov %esp,%ebp 10e2ab: 57 push %edi 10e2ac: 56 push %esi 10e2ad: 53 push %ebx 10e2ae: 83 ec 1c sub $0x1c,%esp 10e2b1: 8b 75 08 mov 0x8(%ebp),%esi 10e2b4: 8b 7d 10 mov 0x10(%ebp),%edi 10e2b7: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e2ba: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e2c0: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e2c6: 74 25 je 10e2ed <_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 ); 10e2c8: 0f b6 c0 movzbl %al,%eax 10e2cb: 89 45 e4 mov %eax,-0x1c(%ebp) 10e2ce: 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 ) 10e2d0: 8b 43 30 mov 0x30(%ebx),%eax 10e2d3: 85 c0 test %eax,%eax 10e2d5: 74 0b je 10e2e2 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10e2d7: 52 push %edx 10e2d8: 57 push %edi 10e2d9: ff 75 e4 pushl -0x1c(%ebp) 10e2dc: 56 push %esi 10e2dd: ff d0 call *%eax 10e2df: 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 ) { 10e2e2: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e2e5: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e2eb: 75 e3 jne 10e2d0 <_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 ); } } 10e2ed: 8d 65 f4 lea -0xc(%ebp),%esp 10e2f0: 5b pop %ebx 10e2f1: 5e pop %esi 10e2f2: 5f pop %edi 10e2f3: c9 leave 10e2f4: c3 ret 0010e16c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e16c: 55 push %ebp 10e16d: 89 e5 mov %esp,%ebp 10e16f: 57 push %edi 10e170: 56 push %esi 10e171: 53 push %ebx 10e172: 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; 10e175: a1 58 32 12 00 mov 0x123258,%eax 10e17a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e17d: 8b 35 5c 32 12 00 mov 0x12325c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e183: c7 05 2c 76 12 00 30 movl $0x127630,0x12762c 10e18a: 76 12 00 the_chain->permanent_null = NULL; 10e18d: c7 05 30 76 12 00 00 movl $0x0,0x127630 10e194: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e197: c7 05 34 76 12 00 2c movl $0x12762c,0x127634 10e19e: 76 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e1a1: c7 05 dc 73 12 00 e0 movl $0x1273e0,0x1273dc 10e1a8: 73 12 00 the_chain->permanent_null = NULL; 10e1ab: c7 05 e0 73 12 00 00 movl $0x0,0x1273e0 10e1b2: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e1b5: c7 05 e4 73 12 00 dc movl $0x1273dc,0x1273e4 10e1bc: 73 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e1bf: 85 f6 test %esi,%esi 10e1c1: 74 64 je 10e227 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e1c3: 89 c2 mov %eax,%edx 10e1c5: 8d 04 40 lea (%eax,%eax,2),%eax 10e1c8: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e1cb: c1 e1 02 shl $0x2,%ecx 10e1ce: 83 ec 0c sub $0xc,%esp 10e1d1: 51 push %ecx 10e1d2: 89 4d d8 mov %ecx,-0x28(%ebp) 10e1d5: e8 36 04 00 00 call 10e610 <_Workspace_Allocate_or_fatal_error> <== ALWAYS TAKEN 10e1da: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e1dc: 31 c0 xor %eax,%eax 10e1de: 8b 4d d8 mov -0x28(%ebp),%ecx 10e1e1: 89 df mov %ebx,%edi 10e1e3: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e1e5: 83 c4 10 add $0x10,%esp 10e1e8: 8b 45 dc mov -0x24(%ebp),%eax 10e1eb: 85 c0 test %eax,%eax 10e1ed: 74 38 je 10e227 <_User_extensions_Handler_initialization+0xbb> <== ALWAYS TAKEN 10e1ef: 89 75 e4 mov %esi,-0x1c(%ebp) 10e1f2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e1f9: 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; 10e1fc: 8d 7b 14 lea 0x14(%ebx),%edi 10e1ff: 8b 75 e4 mov -0x1c(%ebp),%esi 10e202: b9 08 00 00 00 mov $0x8,%ecx 10e207: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e209: 83 ec 0c sub $0xc,%esp 10e20c: 53 push %ebx 10e20d: e8 7a 32 00 00 call 11148c <_User_extensions_Add_set> <== ALWAYS TAKEN _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e212: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e215: ff 45 e0 incl -0x20(%ebp) 10e218: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e21c: 83 c4 10 add $0x10,%esp 10e21f: 8b 45 e0 mov -0x20(%ebp),%eax 10e222: 39 45 dc cmp %eax,-0x24(%ebp) 10e225: 77 d5 ja 10e1fc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10e227: 8d 65 f4 lea -0xc(%ebp),%esp 10e22a: 5b pop %ebx 10e22b: 5e pop %esi 10e22c: 5f pop %edi 10e22d: c9 leave 10e22e: c3 ret 00113008 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 113008: 55 push %ebp 113009: 89 e5 mov %esp,%ebp 11300b: 53 push %ebx 11300c: 83 ec 10 sub $0x10,%esp 11300f: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 113012: 53 push %ebx 113013: e8 c0 4f 00 00 call 117fd8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 113018: 83 c4 10 add $0x10,%esp 11301b: 8b 43 24 mov 0x24(%ebx),%eax 11301e: 85 c0 test %eax,%eax 113020: 74 12 je 113034 <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 113022: 83 c3 08 add $0x8,%ebx 113025: 89 5d 08 mov %ebx,0x8(%ebp) } 113028: 8b 5d fc mov -0x4(%ebp),%ebx 11302b: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 11302c: e9 a7 4f 00 00 jmp 117fd8 <_Chain_Extract> 113031: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } 113034: 8b 5d fc mov -0x4(%ebp),%ebx 113037: c9 leave 113038: c3 ret 0010e230 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10e230: 55 push %ebp 10e231: 89 e5 mov %esp,%ebp 10e233: 56 push %esi 10e234: 53 push %ebx 10e235: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e238: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e23e: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e244: 74 1c je 10e262 <_User_extensions_Thread_begin+0x32> <== ALWAYS TAKEN 10e246: 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 ) 10e248: 8b 43 28 mov 0x28(%ebx),%eax 10e24b: 85 c0 test %eax,%eax 10e24d: 74 09 je 10e258 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10e24f: 83 ec 0c sub $0xc,%esp 10e252: 56 push %esi 10e253: ff d0 call *%eax 10e255: 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 ) { 10e258: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e25a: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e260: 75 e6 jne 10e248 <_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 ); } } 10e262: 8d 65 f8 lea -0x8(%ebp),%esp 10e265: 5b pop %ebx 10e266: 5e pop %esi 10e267: c9 leave 10e268: c3 ret 0010e2f8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10e2f8: 55 push %ebp 10e2f9: 89 e5 mov %esp,%ebp 10e2fb: 56 push %esi 10e2fc: 53 push %ebx 10e2fd: 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 ; 10e300: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e306: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e30c: 74 26 je 10e334 <_User_extensions_Thread_create+0x3c> <== ALWAYS TAKEN 10e30e: 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 ) { 10e310: 8b 43 14 mov 0x14(%ebx),%eax 10e313: 85 c0 test %eax,%eax 10e315: 74 13 je 10e32a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10e317: 83 ec 08 sub $0x8,%esp 10e31a: 56 push %esi 10e31b: ff 35 98 74 12 00 pushl 0x127498 10e321: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10e323: 83 c4 10 add $0x10,%esp 10e326: 84 c0 test %al,%al 10e328: 74 0c je 10e336 <_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 ) { 10e32a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10e32c: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e332: 75 dc jne 10e310 <_User_extensions_Thread_create+0x18> 10e334: b0 01 mov $0x1,%al return false; } } return true; } 10e336: 8d 65 f8 lea -0x8(%ebp),%esp 10e339: 5b pop %ebx 10e33a: 5e pop %esi 10e33b: c9 leave 10e33c: c3 ret 0010e340 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10e340: 55 push %ebp 10e341: 89 e5 mov %esp,%ebp 10e343: 56 push %esi 10e344: 53 push %ebx 10e345: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e348: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e34e: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e354: 74 23 je 10e379 <_User_extensions_Thread_delete+0x39> <== ALWAYS TAKEN 10e356: 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 ) 10e358: 8b 43 20 mov 0x20(%ebx),%eax 10e35b: 85 c0 test %eax,%eax 10e35d: 74 0f je 10e36e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10e35f: 83 ec 08 sub $0x8,%esp 10e362: 56 push %esi 10e363: ff 35 98 74 12 00 pushl 0x127498 10e369: ff d0 call *%eax 10e36b: 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 ) { 10e36e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e371: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e377: 75 df jne 10e358 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10e379: 8d 65 f8 lea -0x8(%ebp),%esp 10e37c: 5b pop %ebx 10e37d: 5e pop %esi 10e37e: c9 leave 10e37f: c3 ret 0010e26c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10e26c: 55 push %ebp 10e26d: 89 e5 mov %esp,%ebp 10e26f: 56 push %esi 10e270: 53 push %ebx 10e271: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e274: 8b 1d 34 76 12 00 mov 0x127634,%ebx 10e27a: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e280: 74 1d je 10e29f <_User_extensions_Thread_exitted+0x33> <== ALWAYS TAKEN 10e282: 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 ) 10e284: 8b 43 2c mov 0x2c(%ebx),%eax 10e287: 85 c0 test %eax,%eax 10e289: 74 09 je 10e294 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10e28b: 83 ec 0c sub $0xc,%esp 10e28e: 56 push %esi 10e28f: ff d0 call *%eax 10e291: 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 ) { 10e294: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10e297: 81 fb 2c 76 12 00 cmp $0x12762c,%ebx 10e29d: 75 e5 jne 10e284 <_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 ); } } 10e29f: 8d 65 f8 lea -0x8(%ebp),%esp 10e2a2: 5b pop %ebx 10e2a3: 5e pop %esi 10e2a4: c9 leave 10e2a5: c3 ret 0010eee4 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10eee4: 55 push %ebp 10eee5: 89 e5 mov %esp,%ebp 10eee7: 56 push %esi 10eee8: 53 push %ebx 10eee9: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eeec: 8b 1d ec 95 12 00 mov 0x1295ec,%ebx 10eef2: 81 fb f0 95 12 00 cmp $0x1295f0,%ebx 10eef8: 74 22 je 10ef1c <_User_extensions_Thread_restart+0x38> <== ALWAYS TAKEN 10eefa: 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 ) 10eefc: 8b 43 1c mov 0x1c(%ebx),%eax 10eeff: 85 c0 test %eax,%eax 10ef01: 74 0f je 10ef12 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10ef03: 83 ec 08 sub $0x8,%esp 10ef06: 56 push %esi 10ef07: ff 35 58 94 12 00 pushl 0x129458 10ef0d: ff d0 call *%eax 10ef0f: 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 ) { 10ef12: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ef14: 81 fb f0 95 12 00 cmp $0x1295f0,%ebx 10ef1a: 75 e0 jne 10eefc <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10ef1c: 8d 65 f8 lea -0x8(%ebp),%esp 10ef1f: 5b pop %ebx 10ef20: 5e pop %esi 10ef21: c9 leave 10ef22: c3 ret 0010e380 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10e380: 55 push %ebp 10e381: 89 e5 mov %esp,%ebp 10e383: 56 push %esi 10e384: 53 push %ebx 10e385: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e388: 8b 1d 2c 76 12 00 mov 0x12762c,%ebx 10e38e: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e394: 74 22 je 10e3b8 <_User_extensions_Thread_start+0x38> <== ALWAYS TAKEN 10e396: 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 ) 10e398: 8b 43 18 mov 0x18(%ebx),%eax 10e39b: 85 c0 test %eax,%eax 10e39d: 74 0f je 10e3ae <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10e39f: 83 ec 08 sub $0x8,%esp 10e3a2: 56 push %esi 10e3a3: ff 35 98 74 12 00 pushl 0x127498 10e3a9: ff d0 call *%eax 10e3ab: 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 ) { 10e3ae: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10e3b0: 81 fb 30 76 12 00 cmp $0x127630,%ebx 10e3b6: 75 e0 jne 10e398 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10e3b8: 8d 65 f8 lea -0x8(%ebp),%esp 10e3bb: 5b pop %ebx 10e3bc: 5e pop %esi 10e3bd: c9 leave 10e3be: c3 ret 0010e3c0 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10e3c0: 55 push %ebp 10e3c1: 89 e5 mov %esp,%ebp 10e3c3: 57 push %edi 10e3c4: 56 push %esi 10e3c5: 53 push %ebx 10e3c6: 83 ec 0c sub $0xc,%esp 10e3c9: 8b 7d 08 mov 0x8(%ebp),%edi 10e3cc: 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 ; 10e3cf: 8b 1d dc 73 12 00 mov 0x1273dc,%ebx 10e3d5: 81 fb e0 73 12 00 cmp $0x1273e0,%ebx 10e3db: 74 18 je 10e3f5 <_User_extensions_Thread_switch+0x35> <== ALWAYS TAKEN 10e3dd: 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 ); 10e3e0: 83 ec 08 sub $0x8,%esp 10e3e3: 56 push %esi 10e3e4: 57 push %edi 10e3e5: 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 ) { 10e3e8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10e3ea: 83 c4 10 add $0x10,%esp 10e3ed: 81 fb e0 73 12 00 cmp $0x1273e0,%ebx 10e3f3: 75 eb jne 10e3e0 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10e3f5: 8d 65 f4 lea -0xc(%ebp),%esp 10e3f8: 5b pop %ebx 10e3f9: 5e pop %esi 10e3fa: 5f pop %edi 10e3fb: c9 leave 10e3fc: c3 ret 0010fdd8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10fdd8: 55 push %ebp 10fdd9: 89 e5 mov %esp,%ebp 10fddb: 57 push %edi 10fddc: 56 push %esi 10fddd: 53 push %ebx 10fdde: 83 ec 1c sub $0x1c,%esp 10fde1: 8b 75 08 mov 0x8(%ebp),%esi 10fde4: 8b 4d 0c mov 0xc(%ebp),%ecx 10fde7: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10fdea: 9c pushf 10fdeb: fa cli 10fdec: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fded: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10fdef: 8d 7e 04 lea 0x4(%esi),%edi 10fdf2: 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 ) ) { 10fdf5: 39 fa cmp %edi,%edx 10fdf7: 74 3d je 10fe36 <_Watchdog_Adjust+0x5e> switch ( direction ) { 10fdf9: 85 c9 test %ecx,%ecx 10fdfb: 75 43 jne 10fe40 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fdfd: 85 db test %ebx,%ebx 10fdff: 74 35 je 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fe01: 8b 7a 10 mov 0x10(%edx),%edi 10fe04: 39 fb cmp %edi,%ebx 10fe06: 73 0f jae 10fe17 <_Watchdog_Adjust+0x3f> <== NEVER TAKEN 10fe08: eb 3e jmp 10fe48 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10fe0c: 29 fb sub %edi,%ebx 10fe0e: 74 26 je 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 10fe10: 8b 7a 10 mov 0x10(%edx),%edi 10fe13: 39 df cmp %ebx,%edi 10fe15: 77 31 ja 10fe48 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10fe17: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10fe1e: 50 push %eax 10fe1f: 9d popf _Watchdog_Tickle( header ); 10fe20: 83 ec 0c sub $0xc,%esp 10fe23: 56 push %esi 10fe24: e8 cb 01 00 00 call 10fff4 <_Watchdog_Tickle> <== ALWAYS TAKEN _ISR_Disable( level ); 10fe29: 9c pushf 10fe2a: fa cli 10fe2b: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10fe2c: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 10fe2e: 83 c4 10 add $0x10,%esp 10fe31: 39 55 e4 cmp %edx,-0x1c(%ebp) 10fe34: 75 d6 jne 10fe0c <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 10fe36: 50 push %eax 10fe37: 9d popf } 10fe38: 8d 65 f4 lea -0xc(%ebp),%esp 10fe3b: 5b pop %ebx 10fe3c: 5e pop %esi 10fe3d: 5f pop %edi 10fe3e: c9 leave 10fe3f: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 10fe40: 49 dec %ecx 10fe41: 75 f3 jne 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10fe43: 01 5a 10 add %ebx,0x10(%edx) break; 10fe46: eb ee jmp 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 10fe48: 29 df sub %ebx,%edi 10fe4a: 89 7a 10 mov %edi,0x10(%edx) break; 10fe4d: eb e7 jmp 10fe36 <_Watchdog_Adjust+0x5e> <== ALWAYS TAKEN 0011c7b0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11c7b0: 55 push %ebp 11c7b1: 89 e5 mov %esp,%ebp 11c7b3: 57 push %edi 11c7b4: 56 push %esi 11c7b5: 53 push %ebx 11c7b6: 83 ec 0c sub $0xc,%esp 11c7b9: 8b 75 08 mov 0x8(%ebp),%esi 11c7bc: 8b 55 0c mov 0xc(%ebp),%edx 11c7bf: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11c7c2: 85 d2 test %edx,%edx 11c7c4: 74 63 je 11c829 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11c7c6: 9c pushf 11c7c7: fa cli 11c7c8: 8f 45 ec popl -0x14(%ebp) 11c7cb: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11c7cd: 8d 4e 04 lea 0x4(%esi),%ecx 11c7d0: 89 4d f0 mov %ecx,-0x10(%ebp) 11c7d3: 8d 7b 04 lea 0x4(%ebx),%edi 11c7d6: 89 55 e8 mov %edx,-0x18(%ebp) 11c7d9: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11c7dc: 39 45 f0 cmp %eax,-0x10(%ebp) 11c7df: 74 44 je 11c825 <_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 ) { 11c7e1: 8b 50 10 mov 0x10(%eax),%edx 11c7e4: 3b 55 e8 cmp -0x18(%ebp),%edx 11c7e7: 77 57 ja 11c840 <_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; 11c7e9: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11c7ec: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11c7f3: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11c7f4: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11c7f6: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11c7f9: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11c7fc: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11c7fe: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11c800: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11c803: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11c806: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11c808: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11c80b: ff 75 ec pushl -0x14(%ebp) 11c80e: 9d popf 11c80f: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11c810: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11c812: 39 45 f0 cmp %eax,-0x10(%ebp) 11c815: 74 1d je 11c834 <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11c817: 8b 50 10 mov 0x10(%eax),%edx 11c81a: 85 d2 test %edx,%edx 11c81c: 74 d6 je 11c7f4 <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c81e: 8b 4d e8 mov -0x18(%ebp),%ecx 11c821: 85 c9 test %ecx,%ecx 11c823: 75 b7 jne 11c7dc <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11c825: ff 75 ec pushl -0x14(%ebp) 11c828: 9d popf } 11c829: 83 c4 0c add $0xc,%esp 11c82c: 5b pop %ebx 11c82d: 5e pop %esi 11c82e: 5f pop %edi 11c82f: c9 leave 11c830: c3 ret 11c831: 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; 11c834: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11c837: 8b 4d e8 mov -0x18(%ebp),%ecx 11c83a: 85 c9 test %ecx,%ecx 11c83c: 75 9e jne 11c7dc <_Watchdog_Adjust_to_chain+0x2c> 11c83e: eb e5 jmp 11c825 <_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; 11c840: 2b 55 e8 sub -0x18(%ebp),%edx 11c843: 89 50 10 mov %edx,0x10(%eax) break; 11c846: eb dd jmp 11c825 <_Watchdog_Adjust_to_chain+0x75> <== ALWAYS TAKEN 0010e400 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10e400: 55 push %ebp 10e401: 89 e5 mov %esp,%ebp 10e403: 57 push %edi 10e404: 56 push %esi 10e405: 53 push %ebx 10e406: 83 ec 04 sub $0x4,%esp 10e409: 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; 10e40c: 8b 3d 74 74 12 00 mov 0x127474,%edi _ISR_Disable( level ); 10e412: 9c pushf 10e413: fa cli 10e414: 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 ) { 10e417: 8b 43 08 mov 0x8(%ebx),%eax 10e41a: 85 c0 test %eax,%eax 10e41c: 0f 85 9e 00 00 00 jne 10e4c0 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10e422: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10e429: a1 40 75 12 00 mov 0x127540,%eax 10e42e: 40 inc %eax 10e42f: a3 40 75 12 00 mov %eax,0x127540 restart: delta_interval = the_watchdog->initial; 10e434: 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 ; 10e437: 8b 4d 08 mov 0x8(%ebp),%ecx 10e43a: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10e43c: 85 c0 test %eax,%eax 10e43e: 74 5d je 10e49d <_Watchdog_Insert+0x9d> 10e440: 8b 32 mov (%edx),%esi 10e442: 85 f6 test %esi,%esi 10e444: 74 57 je 10e49d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e446: 8b 4a 10 mov 0x10(%edx),%ecx 10e449: 39 c8 cmp %ecx,%eax 10e44b: 73 22 jae 10e46f <_Watchdog_Insert+0x6f> 10e44d: eb 49 jmp 10e498 <_Watchdog_Insert+0x98> <== ALWAYS TAKEN 10e44f: 90 nop <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10e450: 8b 35 94 74 12 00 mov 0x127494,%esi 10e456: 39 f7 cmp %esi,%edi 10e458: 72 72 jb 10e4cc <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10e45a: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10e45c: 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 ) ) 10e45e: 85 c0 test %eax,%eax 10e460: 74 3b je 10e49d <_Watchdog_Insert+0x9d> 10e462: 8b 0a mov (%edx),%ecx 10e464: 85 c9 test %ecx,%ecx 10e466: 74 35 je 10e49d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10e468: 8b 4a 10 mov 0x10(%edx),%ecx 10e46b: 39 c1 cmp %eax,%ecx 10e46d: 77 29 ja 10e498 <_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 ); 10e46f: ff 75 f0 pushl -0x10(%ebp) 10e472: 9d popf 10e473: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10e474: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10e478: 74 d6 je 10e450 <_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; 10e47a: 89 3d 94 74 12 00 mov %edi,0x127494 _Watchdog_Sync_count--; 10e480: a1 40 75 12 00 mov 0x127540,%eax 10e485: 48 dec %eax 10e486: a3 40 75 12 00 mov %eax,0x127540 _ISR_Enable( level ); 10e48b: ff 75 f0 pushl -0x10(%ebp) 10e48e: 9d popf } 10e48f: 58 pop %eax 10e490: 5b pop %ebx 10e491: 5e pop %esi 10e492: 5f pop %edi 10e493: c9 leave 10e494: c3 ret 10e495: 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; 10e498: 29 c1 sub %eax,%ecx 10e49a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10e49d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10e4a4: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10e4a7: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10e4aa: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10e4ad: 8b 10 mov (%eax),%edx after_node->next = the_node; 10e4af: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10e4b1: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10e4b3: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10e4b6: a1 44 75 12 00 mov 0x127544,%eax 10e4bb: 89 43 14 mov %eax,0x14(%ebx) 10e4be: eb ba jmp 10e47a <_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 ); 10e4c0: ff 75 f0 pushl -0x10(%ebp) 10e4c3: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10e4c4: 58 pop %eax 10e4c5: 5b pop %ebx 10e4c6: 5e pop %esi 10e4c7: 5f pop %edi 10e4c8: c9 leave 10e4c9: c3 ret 10e4ca: 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; 10e4cc: 89 3d 94 74 12 00 mov %edi,0x127494 goto restart; 10e4d2: e9 5d ff ff ff jmp 10e434 <_Watchdog_Insert+0x34> <== ALWAYS TAKEN 0010e538 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10e538: 55 push %ebp 10e539: 89 e5 mov %esp,%ebp 10e53b: 56 push %esi 10e53c: 53 push %ebx 10e53d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10e540: 9c pushf 10e541: fa cli 10e542: 59 pop %ecx previous_state = the_watchdog->state; 10e543: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10e546: 83 f8 01 cmp $0x1,%eax 10e549: 74 4d je 10e598 <_Watchdog_Remove+0x60> 10e54b: 73 0f jae 10e55c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10e54d: 8b 1d 44 75 12 00 mov 0x127544,%ebx 10e553: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10e556: 51 push %ecx 10e557: 9d popf return( previous_state ); } 10e558: 5b pop %ebx 10e559: 5e pop %esi 10e55a: c9 leave 10e55b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10e55c: 83 f8 03 cmp $0x3,%eax 10e55f: 77 ec ja 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10e561: 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 ); 10e568: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10e56a: 8b 33 mov (%ebx),%esi 10e56c: 85 f6 test %esi,%esi 10e56e: 74 06 je 10e576 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10e570: 8b 72 10 mov 0x10(%edx),%esi 10e573: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10e576: 8b 35 40 75 12 00 mov 0x127540,%esi 10e57c: 85 f6 test %esi,%esi 10e57e: 74 0c je 10e58c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10e580: 8b 35 74 74 12 00 mov 0x127474,%esi 10e586: 89 35 94 74 12 00 mov %esi,0x127494 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10e58c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10e58f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10e592: 89 1e mov %ebx,(%esi) 10e594: eb b7 jmp 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 10e596: 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; 10e598: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10e59f: eb ac jmp 10e54d <_Watchdog_Remove+0x15> <== ALWAYS TAKEN 0010f9cc <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 10f9cc: 55 push %ebp 10f9cd: 89 e5 mov %esp,%ebp 10f9cf: 57 push %edi 10f9d0: 56 push %esi 10f9d1: 53 push %ebx 10f9d2: 83 ec 2c sub $0x2c,%esp 10f9d5: 8b 55 08 mov 0x8(%ebp),%edx 10f9d8: 8b 45 0c mov 0xc(%ebp),%eax printk( 10f9db: 8b 78 24 mov 0x24(%eax),%edi 10f9de: 8b 70 20 mov 0x20(%eax),%esi 10f9e1: 8b 58 1c mov 0x1c(%eax),%ebx 10f9e4: 8b 48 0c mov 0xc(%eax),%ecx 10f9e7: 89 4d d4 mov %ecx,-0x2c(%ebp) 10f9ea: 8b 48 10 mov 0x10(%eax),%ecx 10f9ed: 89 4d e0 mov %ecx,-0x20(%ebp) 10f9f0: 85 d2 test %edx,%edx 10f9f2: 74 2c je 10fa20 <_Watchdog_Report+0x54> 10f9f4: b9 23 2a 12 00 mov $0x122a23,%ecx 10f9f9: 83 ec 0c sub $0xc,%esp 10f9fc: 57 push %edi 10f9fd: 56 push %esi 10f9fe: 53 push %ebx 10f9ff: 50 push %eax 10fa00: ff 75 d4 pushl -0x2c(%ebp) 10fa03: ff 75 e0 pushl -0x20(%ebp) 10fa06: 51 push %ecx 10fa07: 52 push %edx 10fa08: 68 26 33 12 00 push $0x123326 10fa0d: e8 82 9e ff ff call 109894 10fa12: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 10fa15: 8d 65 f4 lea -0xc(%ebp),%esp 10fa18: 5b pop %ebx 10fa19: 5e pop %esi 10fa1a: 5f pop %edi 10fa1b: c9 leave 10fa1c: c3 ret 10fa1d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 10fa20: b9 87 31 12 00 mov $0x123187,%ecx 10fa25: 89 ca mov %ecx,%edx 10fa27: eb d0 jmp 10f9f9 <_Watchdog_Report+0x2d> <== ALWAYS TAKEN 0010f95c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10f95c: 55 push %ebp 10f95d: 89 e5 mov %esp,%ebp 10f95f: 57 push %edi 10f960: 56 push %esi 10f961: 53 push %ebx 10f962: 83 ec 20 sub $0x20,%esp 10f965: 8b 7d 08 mov 0x8(%ebp),%edi 10f968: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10f96b: 9c pushf 10f96c: fa cli 10f96d: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10f970: 56 push %esi 10f971: 57 push %edi 10f972: 68 f0 32 12 00 push $0x1232f0 10f977: e8 18 9f ff ff call 109894 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10f97c: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10f97e: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10f981: 83 c4 10 add $0x10,%esp 10f984: 39 f3 cmp %esi,%ebx 10f986: 74 31 je 10f9b9 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10f988: 83 ec 08 sub $0x8,%esp 10f98b: 53 push %ebx 10f98c: 6a 00 push $0x0 10f98e: e8 39 00 00 00 call 10f9cc <_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 ) 10f993: 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 ; 10f995: 83 c4 10 add $0x10,%esp 10f998: 39 f3 cmp %esi,%ebx 10f99a: 75 ec jne 10f988 <_Watchdog_Report_chain+0x2c> <== ALWAYS TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10f99c: 83 ec 08 sub $0x8,%esp 10f99f: 57 push %edi 10f9a0: 68 07 33 12 00 push $0x123307 10f9a5: e8 ea 9e ff ff call 109894 10f9aa: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 10f9ad: ff 75 e4 pushl -0x1c(%ebp) 10f9b0: 9d popf } 10f9b1: 8d 65 f4 lea -0xc(%ebp),%esp 10f9b4: 5b pop %ebx 10f9b5: 5e pop %esi 10f9b6: 5f pop %edi 10f9b7: c9 leave 10f9b8: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 10f9b9: 83 ec 0c sub $0xc,%esp 10f9bc: 68 16 33 12 00 push $0x123316 10f9c1: e8 ce 9e ff ff call 109894 10f9c6: 83 c4 10 add $0x10,%esp 10f9c9: eb e2 jmp 10f9ad <_Watchdog_Report_chain+0x51> <== ALWAYS TAKEN 0010e5a4 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10e5a4: 55 push %ebp 10e5a5: 89 e5 mov %esp,%ebp 10e5a7: 57 push %edi 10e5a8: 56 push %esi 10e5a9: 53 push %ebx 10e5aa: 83 ec 1c sub $0x1c,%esp 10e5ad: 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 ); 10e5b0: 9c pushf 10e5b1: fa cli 10e5b2: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e5b3: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e5b5: 8d 47 04 lea 0x4(%edi),%eax 10e5b8: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10e5bb: 39 c3 cmp %eax,%ebx 10e5bd: 74 11 je 10e5d0 <_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) { 10e5bf: 8b 43 10 mov 0x10(%ebx),%eax 10e5c2: 85 c0 test %eax,%eax 10e5c4: 74 34 je 10e5fa <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10e5c6: 48 dec %eax 10e5c7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10e5ca: 85 c0 test %eax,%eax 10e5cc: 74 2c je 10e5fa <_Watchdog_Tickle+0x56> 10e5ce: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10e5d0: 56 push %esi 10e5d1: 9d popf } 10e5d2: 8d 65 f4 lea -0xc(%ebp),%esp 10e5d5: 5b pop %ebx 10e5d6: 5e pop %esi 10e5d7: 5f pop %edi 10e5d8: c9 leave 10e5d9: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10e5da: 83 ec 08 sub $0x8,%esp 10e5dd: ff 73 24 pushl 0x24(%ebx) 10e5e0: ff 73 20 pushl 0x20(%ebx) 10e5e3: ff 53 1c call *0x1c(%ebx) 10e5e6: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10e5e9: 9c pushf 10e5ea: fa cli 10e5eb: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e5ec: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10e5ee: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10e5f1: 74 dd je 10e5d0 <_Watchdog_Tickle+0x2c> 10e5f3: 8b 43 10 mov 0x10(%ebx),%eax 10e5f6: 85 c0 test %eax,%eax 10e5f8: 75 d6 jne 10e5d0 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10e5fa: 83 ec 0c sub $0xc,%esp 10e5fd: 53 push %ebx 10e5fe: e8 35 ff ff ff call 10e538 <_Watchdog_Remove> <== ALWAYS TAKEN _ISR_Enable( level ); 10e603: 56 push %esi 10e604: 9d popf switch( watchdog_state ) { 10e605: 83 c4 10 add $0x10,%esp 10e608: 83 f8 02 cmp $0x2,%eax 10e60b: 75 dc jne 10e5e9 <_Watchdog_Tickle+0x45> 10e60d: eb cb jmp 10e5da <_Watchdog_Tickle+0x36> <== ALWAYS TAKEN 0010e670 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10e670: 55 push %ebp 10e671: 89 e5 mov %esp,%ebp 10e673: 57 push %edi 10e674: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10e675: 8b 1d 20 32 12 00 mov 0x123220,%ebx uintptr_t size = Configuration.work_space_size; 10e67b: 8b 15 24 32 12 00 mov 0x123224,%edx if ( Configuration.do_zero_of_workspace ) 10e681: 80 3d 48 32 12 00 00 cmpb $0x0,0x123248 10e688: 75 1e jne 10e6a8 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10e68a: 6a 04 push $0x4 10e68c: 52 push %edx 10e68d: 53 push %ebx 10e68e: 68 00 74 12 00 push $0x127400 10e693: e8 3c dd ff ff call 10c3d4 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10e698: 83 c4 10 add $0x10,%esp 10e69b: 85 c0 test %eax,%eax 10e69d: 74 13 je 10e6b2 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10e69f: 8d 65 f8 lea -0x8(%ebp),%esp 10e6a2: 5b pop %ebx 10e6a3: 5f pop %edi 10e6a4: c9 leave 10e6a5: c3 ret 10e6a6: 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 ); 10e6a8: 31 c0 xor %eax,%eax 10e6aa: 89 df mov %ebx,%edi 10e6ac: 89 d1 mov %edx,%ecx 10e6ae: f3 aa rep stos %al,%es:(%edi) 10e6b0: eb d8 jmp 10e68a <_Workspace_Handler_initialization+0x1a> <== ALWAYS TAKEN size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10e6b2: 52 push %edx 10e6b3: 6a 03 push $0x3 10e6b5: 6a 01 push $0x1 10e6b7: 6a 00 push $0x0 10e6b9: e8 3a e0 ff ff call 10c6f8 <_Internal_error_Occurred> 0010b3f8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10b3f8: 55 push %ebp 10b3f9: 89 e5 mov %esp,%ebp 10b3fb: 57 push %edi 10b3fc: 56 push %esi 10b3fd: 53 push %ebx 10b3fe: 83 ec 1c sub $0x1c,%esp 10b401: 8b 5d 08 mov 0x8(%ebp),%ebx 10b404: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10b407: 85 db test %ebx,%ebx 10b409: 0f 84 f1 00 00 00 je 10b500 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10b40f: 8b 53 04 mov 0x4(%ebx),%edx 10b412: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10b418: 0f 87 e2 00 00 00 ja 10b500 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10b41e: 85 f6 test %esi,%esi 10b420: 74 10 je 10b432 olddelta->tv_sec = 0; 10b422: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10b428: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10b42f: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10b432: 8b 03 mov (%ebx),%eax 10b434: 8d 04 80 lea (%eax,%eax,4),%eax 10b437: 8d 04 80 lea (%eax,%eax,4),%eax 10b43a: 8d 04 80 lea (%eax,%eax,4),%eax 10b43d: 8d 04 80 lea (%eax,%eax,4),%eax 10b440: 8d 04 80 lea (%eax,%eax,4),%eax 10b443: 8d 04 80 lea (%eax,%eax,4),%eax 10b446: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10b449: 8d 04 02 lea (%edx,%eax,1),%eax 10b44c: 3b 05 0c 48 12 00 cmp 0x12480c,%eax 10b452: 73 0c jae 10b460 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10b454: 31 c0 xor %eax,%eax return 0; } 10b456: 8d 65 f4 lea -0xc(%ebp),%esp 10b459: 5b pop %ebx 10b45a: 5e pop %esi 10b45b: 5f pop %edi 10b45c: c9 leave 10b45d: c3 ret 10b45e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b460: a1 f8 8a 12 00 mov 0x128af8,%eax 10b465: 40 inc %eax 10b466: a3 f8 8a 12 00 mov %eax,0x128af8 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10b46b: 83 ec 0c sub $0xc,%esp 10b46e: 8d 7d e0 lea -0x20(%ebp),%edi 10b471: 57 push %edi 10b472: e8 71 17 00 00 call 10cbe8 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10b477: 8b 03 mov (%ebx),%eax 10b479: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10b47c: 8b 43 04 mov 0x4(%ebx),%eax 10b47f: 8d 04 80 lea (%eax,%eax,4),%eax 10b482: 8d 04 80 lea (%eax,%eax,4),%eax 10b485: 8d 04 80 lea (%eax,%eax,4),%eax 10b488: c1 e0 03 shl $0x3,%eax 10b48b: 03 45 e4 add -0x1c(%ebp),%eax 10b48e: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b491: 83 c4 10 add $0x10,%esp 10b494: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b499: 76 18 jbe 10b4b3 10b49b: 8b 55 e0 mov -0x20(%ebp),%edx 10b49e: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10b4a0: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b4a5: 42 inc %edx ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10b4a6: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10b4ab: 77 f3 ja 10b4a0 <== ALWAYS TAKEN 10b4ad: 89 45 e4 mov %eax,-0x1c(%ebp) 10b4b0: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10b4b3: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b4b8: 77 19 ja 10b4d3 <== ALWAYS TAKEN 10b4ba: 8b 55 e0 mov -0x20(%ebp),%edx 10b4bd: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10b4c0: 05 00 ca 9a 3b add $0x3b9aca00,%eax * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 10b4c5: 4a dec %edx ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 10b4c6: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10b4cb: 76 f3 jbe 10b4c0 10b4cd: 89 45 e4 mov %eax,-0x1c(%ebp) 10b4d0: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10b4d3: 83 ec 0c sub $0xc,%esp 10b4d6: 57 push %edi 10b4d7: e8 98 17 00 00 call 10cc74 <_TOD_Set> _Thread_Enable_dispatch(); 10b4dc: e8 5b 29 00 00 call 10de3c <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10b4e1: 83 c4 10 add $0x10,%esp 10b4e4: 85 f6 test %esi,%esi 10b4e6: 0f 84 68 ff ff ff je 10b454 <== ALWAYS TAKEN *olddelta = *delta; 10b4ec: 8b 03 mov (%ebx),%eax 10b4ee: 8b 53 04 mov 0x4(%ebx),%edx 10b4f1: 89 06 mov %eax,(%esi) 10b4f3: 89 56 04 mov %edx,0x4(%esi) 10b4f6: 31 c0 xor %eax,%eax return 0; } 10b4f8: 8d 65 f4 lea -0xc(%ebp),%esp 10b4fb: 5b pop %ebx 10b4fc: 5e pop %esi 10b4fd: 5f pop %edi 10b4fe: c9 leave 10b4ff: c3 ret */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b500: e8 af 8c 00 00 call 1141b4 <__errno> 10b505: c7 00 16 00 00 00 movl $0x16,(%eax) 10b50b: b8 ff ff ff ff mov $0xffffffff,%eax 10b510: e9 41 ff ff ff jmp 10b456 <== ALWAYS TAKEN 00112338 : } unsigned int alarm( unsigned int seconds ) { 112338: 55 push %ebp 112339: 89 e5 mov %esp,%ebp 11233b: 57 push %edi 11233c: 56 push %esi 11233d: 53 push %ebx 11233e: 83 ec 0c sub $0xc,%esp 112341: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 112344: a1 3c 7e 12 00 mov 0x127e3c,%eax 112349: 85 c0 test %eax,%eax 11234b: 74 43 je 112390 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 11234d: 83 ec 0c sub $0xc,%esp 112350: 68 20 7e 12 00 push $0x127e20 112355: e8 de c1 ff ff call 10e538 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 11235a: 83 e8 02 sub $0x2,%eax 11235d: 83 c4 10 add $0x10,%esp 112360: 83 f8 01 cmp $0x1,%eax 112363: 76 57 jbe 1123bc 112365: 31 f6 xor %esi,%esi remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 112367: 85 db test %ebx,%ebx 112369: 74 1b je 112386 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11236b: 89 1d 2c 7e 12 00 mov %ebx,0x127e2c _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 112371: 83 ec 08 sub $0x8,%esp 112374: 68 20 7e 12 00 push $0x127e20 112379: 68 ac 74 12 00 push $0x1274ac 11237e: e8 7d c0 ff ff call 10e400 <_Watchdog_Insert> 112383: 83 c4 10 add $0x10,%esp _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 112386: 89 f0 mov %esi,%eax 112388: 8d 65 f4 lea -0xc(%ebp),%esp 11238b: 5b pop %ebx 11238c: 5e pop %esi 11238d: 5f pop %edi 11238e: c9 leave 11238f: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 112390: c7 05 28 7e 12 00 00 movl $0x0,0x127e28 112397: 00 00 00 the_watchdog->routine = routine; 11239a: c7 05 3c 7e 12 00 e0 movl $0x1123e0,0x127e3c 1123a1: 23 11 00 the_watchdog->id = id; 1123a4: c7 05 40 7e 12 00 00 movl $0x0,0x127e40 1123ab: 00 00 00 the_watchdog->user_data = user_data; 1123ae: c7 05 44 7e 12 00 00 movl $0x0,0x127e44 1123b5: 00 00 00 1123b8: 31 f6 xor %esi,%esi 1123ba: eb ab jmp 112367 <== ALWAYS TAKEN * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 1123bc: 8b 35 2c 7e 12 00 mov 0x127e2c,%esi ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 1123c2: 8b 3d 38 7e 12 00 mov 0x127e38,%edi 1123c8: 2b 3d 34 7e 12 00 sub 0x127e34,%edi 1123ce: e8 15 09 00 00 call 112ce8 1123d3: 89 c1 mov %eax,%ecx * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 1123d5: 89 f8 mov %edi,%eax 1123d7: 31 d2 xor %edx,%edx 1123d9: f7 f1 div %ecx 1123db: 29 c6 sub %eax,%esi 1123dd: eb 88 jmp 112367 <== ALWAYS TAKEN 0010b780 : int clock_getres( clockid_t clock_id, struct timespec *res ) { 10b780: 55 push %ebp 10b781: 89 e5 mov %esp,%ebp 10b783: 53 push %ebx 10b784: 83 ec 04 sub $0x4,%esp 10b787: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !res ) 10b78a: 85 c9 test %ecx,%ecx 10b78c: 74 32 je 10b7c0 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 10b78e: 8b 45 08 mov 0x8(%ebp),%eax 10b791: 48 dec %eax 10b792: 83 f8 02 cmp $0x2,%eax 10b795: 77 29 ja 10b7c0 case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: if ( res ) { res->tv_sec = rtems_configuration_get_microseconds_per_tick() / 10b797: 8b 1d cc 53 12 00 mov 0x1253cc,%ebx 10b79d: ba 83 de 1b 43 mov $0x431bde83,%edx 10b7a2: 89 d8 mov %ebx,%eax 10b7a4: f7 e2 mul %edx 10b7a6: c1 ea 12 shr $0x12,%edx 10b7a9: 89 11 mov %edx,(%ecx) TOD_MICROSECONDS_PER_SECOND; res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); 10b7ab: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b7ae: 8d 04 80 lea (%eax,%eax,4),%eax 10b7b1: 8d 04 80 lea (%eax,%eax,4),%eax 10b7b4: c1 e0 03 shl $0x3,%eax 10b7b7: 89 41 04 mov %eax,0x4(%ecx) 10b7ba: 31 c0 xor %eax,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return 0; } 10b7bc: 5a pop %edx 10b7bd: 5b pop %ebx 10b7be: c9 leave 10b7bf: c3 ret res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); } break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10b7c0: e8 4b 8d 00 00 call 114510 <__errno> 10b7c5: c7 00 16 00 00 00 movl $0x16,(%eax) 10b7cb: b8 ff ff ff ff mov $0xffffffff,%eax 10b7d0: eb ea jmp 10b7bc <== ALWAYS TAKEN 0010b310 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10b310: 55 push %ebp 10b311: 89 e5 mov %esp,%ebp 10b313: 83 ec 08 sub $0x8,%esp 10b316: 8b 45 08 mov 0x8(%ebp),%eax 10b319: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10b31c: 85 d2 test %edx,%edx 10b31e: 74 14 je 10b334 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10b320: 83 f8 01 cmp $0x1,%eax 10b323: 74 47 je 10b36c _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10b325: 83 f8 04 cmp $0x4,%eax 10b328: 74 32 je 10b35c <== ALWAYS TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10b32a: 83 f8 02 cmp $0x2,%eax 10b32d: 74 2d je 10b35c return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10b32f: 83 f8 03 cmp $0x3,%eax 10b332: 74 14 je 10b348 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b334: e8 c3 92 00 00 call 1145fc <__errno> 10b339: c7 00 16 00 00 00 movl $0x16,(%eax) 10b33f: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10b344: c9 leave 10b345: c3 ret 10b346: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10b348: e8 af 92 00 00 call 1145fc <__errno> 10b34d: c7 00 58 00 00 00 movl $0x58,(%eax) 10b353: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b358: c9 leave 10b359: c3 ret 10b35a: 66 90 xchg %ax,%ax <== NOT EXECUTED } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10b35c: 83 ec 0c sub $0xc,%esp 10b35f: 52 push %edx 10b360: e8 4b 1e 00 00 call 10d1b0 <_TOD_Get_uptime_as_timespec> 10b365: 31 c0 xor %eax,%eax return 0; 10b367: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b36a: c9 leave 10b36b: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10b36c: 83 ec 0c sub $0xc,%esp 10b36f: 52 push %edx 10b370: e8 e3 1d 00 00 call 10d158 <_TOD_Get> 10b375: 31 c0 xor %eax,%eax return 0; 10b377: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10b37a: c9 leave 10b37b: c3 ret 0012cd78 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 12cd78: 55 push %ebp 12cd79: 89 e5 mov %esp,%ebp 12cd7b: 83 ec 08 sub $0x8,%esp 12cd7e: 8b 45 08 mov 0x8(%ebp),%eax 12cd81: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 12cd84: 85 d2 test %edx,%edx 12cd86: 74 0f je 12cd97 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 12cd88: 83 f8 01 cmp $0x1,%eax 12cd8b: 74 1f je 12cdac _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 12cd8d: 83 f8 02 cmp $0x2,%eax 12cd90: 74 42 je 12cdd4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 12cd92: 83 f8 03 cmp $0x3,%eax 12cd95: 74 3d je 12cdd4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 12cd97: e8 74 57 01 00 call 142510 <__errno> 12cd9c: c7 00 16 00 00 00 movl $0x16,(%eax) 12cda2: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 12cda7: c9 leave 12cda8: c3 ret 12cda9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 12cdac: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 12cdb2: 76 e3 jbe 12cd97 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 12cdb4: a1 38 f0 16 00 mov 0x16f038,%eax 12cdb9: 40 inc %eax 12cdba: a3 38 f0 16 00 mov %eax,0x16f038 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 12cdbf: 83 ec 0c sub $0xc,%esp 12cdc2: 52 push %edx 12cdc3: e8 c0 1b 00 00 call 12e988 <_TOD_Set> _Thread_Enable_dispatch(); 12cdc8: e8 df 6b fe ff call 1139ac <_Thread_Enable_dispatch> 12cdcd: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 12cdcf: 83 c4 10 add $0x10,%esp } 12cdd2: c9 leave 12cdd3: c3 ret else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 12cdd4: e8 37 57 01 00 call 142510 <__errno> 12cdd9: c7 00 58 00 00 00 movl $0x58,(%eax) 12cddf: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 12cde4: c9 leave 12cde5: c3 ret 0010b0f0 : int getitimer( int which, struct itimerval *value ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 83 ec 08 sub $0x8,%esp if ( !value ) 10b0f6: 8b 45 0c mov 0xc(%ebp),%eax 10b0f9: 85 c0 test %eax,%eax 10b0fb: 74 2f je 10b12c rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b0fd: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b101: 76 15 jbe 10b118 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b103: e8 14 8e 00 00 call 113f1c <__errno> 10b108: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b10e: b8 ff ff ff ff mov $0xffffffff,%eax 10b113: c9 leave 10b114: c3 ret 10b115: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b118: e8 ff 8d 00 00 call 113f1c <__errno> 10b11d: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b123: b8 ff ff ff ff mov $0xffffffff,%eax 10b128: c9 leave 10b129: c3 ret 10b12a: 66 90 xchg %ax,%ax <== NOT EXECUTED int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b12c: e8 eb 8d 00 00 call 113f1c <__errno> 10b131: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b137: eb d5 jmp 10b10e <== ALWAYS TAKEN 0011329c : int killinfo( pid_t pid, int sig, const union sigval *value ) { 11329c: 55 push %ebp 11329d: 89 e5 mov %esp,%ebp 11329f: 57 push %edi 1132a0: 56 push %esi 1132a1: 53 push %ebx 1132a2: 83 ec 3c sub $0x3c,%esp 1132a5: 8b 75 0c mov 0xc(%ebp),%esi 1132a8: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 1132ab: e8 70 f0 ff ff call 112320 1132b0: 3b 45 08 cmp 0x8(%ebp),%eax 1132b3: 0f 85 2f 02 00 00 jne 1134e8 rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 1132b9: 85 f6 test %esi,%esi 1132bb: 0f 84 3c 02 00 00 je 1134fd static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1132c1: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1132c4: 83 f9 1f cmp $0x1f,%ecx 1132c7: 0f 87 30 02 00 00 ja 1134fd rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 1132cd: 8d 04 76 lea (%esi,%esi,2),%eax 1132d0: 83 3c 85 c8 79 12 00 cmpl $0x1,0x1279c8(,%eax,4) 1132d7: 01 1132d8: 0f 84 cf 00 00 00 je 1133ad /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 1132de: 83 fe 08 cmp $0x8,%esi 1132e1: 0f 84 d1 00 00 00 je 1133b8 1132e7: 83 fe 04 cmp $0x4,%esi 1132ea: 0f 84 c8 00 00 00 je 1133b8 1132f0: 83 fe 0b cmp $0xb,%esi 1132f3: 0f 84 bf 00 00 00 je 1133b8 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1132f9: bb 01 00 00 00 mov $0x1,%ebx 1132fe: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 113300: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 113303: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 11330a: 85 ff test %edi,%edi 11330c: 0f 84 ca 01 00 00 je 1134dc siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 113312: 8b 07 mov (%edi),%eax 113314: 89 45 e4 mov %eax,-0x1c(%ebp) 113317: a1 d8 73 12 00 mov 0x1273d8,%eax 11331c: 40 inc %eax 11331d: a3 d8 73 12 00 mov %eax,0x1273d8 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 113322: 8b 0d 98 74 12 00 mov 0x127498,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113328: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 11332e: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 113334: f7 d0 not %eax 113336: 85 c3 test %eax,%ebx 113338: 75 34 jne 11336e /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11333a: a1 60 7b 12 00 mov 0x127b60,%eax 11333f: 3d 64 7b 12 00 cmp $0x127b64,%eax 113344: 75 1b jne 113361 113346: e9 89 00 00 00 jmp 1133d4 <== ALWAYS TAKEN 11334b: 90 nop <== NOT EXECUTED /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 11334c: 8b 92 c4 00 00 00 mov 0xc4(%edx),%edx 113352: f7 d2 not %edx 113354: 85 d3 test %edx,%ebx 113356: 75 16 jne 11336e the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 113358: 8b 00 mov (%eax),%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11335a: 3d 64 7b 12 00 cmp $0x127b64,%eax 11335f: 74 73 je 1133d4 <== NEVER TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 113361: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113363: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 113369: 85 58 30 test %ebx,0x30(%eax) 11336c: 74 de je 11334c * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 11336e: c6 41 74 01 movb $0x1,0x74(%ecx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 113372: 50 push %eax 113373: 8d 45 dc lea -0x24(%ebp),%eax 113376: 50 push %eax 113377: 56 push %esi 113378: 51 push %ecx 113379: e8 1e 02 00 00 call 11359c <_POSIX_signals_Unblock_thread> <== ALWAYS TAKEN 11337e: 83 c4 10 add $0x10,%esp 113381: 84 c0 test %al,%al 113383: 0f 85 47 01 00 00 jne 1134d0 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 113389: 83 ec 0c sub $0xc,%esp 11338c: 53 push %ebx 11338d: e8 e6 01 00 00 call 113578 <_POSIX_signals_Set_process_signals> <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 113392: 8d 1c 76 lea (%esi,%esi,2),%ebx 113395: c1 e3 02 shl $0x2,%ebx 113398: 83 c4 10 add $0x10,%esp 11339b: 83 bb c0 79 12 00 02 cmpl $0x2,0x1279c0(%ebx) 1133a2: 0f 84 ec 00 00 00 je 113494 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 1133a8: e8 07 a1 ff ff call 10d4b4 <_Thread_Enable_dispatch> 1133ad: 31 c0 xor %eax,%eax return 0; } 1133af: 8d 65 f4 lea -0xc(%ebp),%esp 1133b2: 5b pop %ebx 1133b3: 5e pop %esi 1133b4: 5f pop %edi 1133b5: c9 leave 1133b6: c3 ret 1133b7: 90 nop <== NOT EXECUTED * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 1133b8: e8 c3 03 00 00 call 113780 1133bd: 83 ec 08 sub $0x8,%esp 1133c0: 56 push %esi 1133c1: 50 push %eax 1133c2: e8 f1 02 00 00 call 1136b8 1133c7: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 1133ca: 8d 65 f4 lea -0xc(%ebp),%esp 1133cd: 5b pop %ebx 1133ce: 5e pop %esi 1133cf: 5f pop %edi 1133d0: c9 leave 1133d1: c3 ret 1133d2: 66 90 xchg %ax,%ax <== NOT EXECUTED * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 1133d4: 0f b6 05 14 32 12 00 movzbl 0x123214,%eax 1133db: 40 inc %eax 1133dc: 89 45 d4 mov %eax,-0x2c(%ebp) 1133df: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 1133e6: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 1133ed: 89 5d cc mov %ebx,-0x34(%ebp) 1133f0: 89 75 c0 mov %esi,-0x40(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1133f3: 8b 55 d0 mov -0x30(%ebp),%edx 1133f6: 8b 04 95 ac 73 12 00 mov 0x1273ac(,%edx,4),%eax 1133fd: 85 c0 test %eax,%eax 1133ff: 74 6c je 11346d continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 113401: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 113404: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 113408: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 11340b: 85 f6 test %esi,%esi 11340d: 74 5e je 11346d 11340f: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 113414: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 113417: 85 d2 test %edx,%edx 113419: 74 4d je 113468 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 11341b: 8b 4a 14 mov 0x14(%edx),%ecx 11341e: 3b 4d d4 cmp -0x2c(%ebp),%ecx 113421: 77 45 ja 113468 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 113423: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 113429: 8b 9b c4 00 00 00 mov 0xc4(%ebx),%ebx 11342f: f7 d3 not %ebx 113431: 85 5d cc test %ebx,-0x34(%ebp) 113434: 74 32 je 113468 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 113436: 3b 4d d4 cmp -0x2c(%ebp),%ecx 113439: 72 25 jb 113460 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 11343b: 8b 5d c8 mov -0x38(%ebp),%ebx 11343e: 8b 5b 10 mov 0x10(%ebx),%ebx 113441: 89 5d c4 mov %ebx,-0x3c(%ebp) 113444: 85 db test %ebx,%ebx 113446: 74 20 je 113468 <== ALWAYS TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 113448: 8b 5a 10 mov 0x10(%edx),%ebx 11344b: 85 db test %ebx,%ebx 11344d: 74 11 je 113460 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 11344f: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 113456: 75 10 jne 113468 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 113458: 81 e3 00 00 00 10 and $0x10000000,%ebx 11345e: 74 08 je 113468 113460: 89 4d d4 mov %ecx,-0x2c(%ebp) 113463: 89 55 c8 mov %edx,-0x38(%ebp) 113466: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 113468: 40 inc %eax 113469: 39 c6 cmp %eax,%esi 11346b: 73 a7 jae 113414 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 11346d: ff 45 d0 incl -0x30(%ebp) 113470: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 113474: 0f 85 79 ff ff ff jne 1133f3 11347a: 8b 5d cc mov -0x34(%ebp),%ebx 11347d: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 113480: 8b 55 c8 mov -0x38(%ebp),%edx 113483: 85 d2 test %edx,%edx 113485: 0f 84 fe fe ff ff je 113389 11348b: 8b 4d c8 mov -0x38(%ebp),%ecx 11348e: e9 db fe ff ff jmp 11336e <== ALWAYS TAKEN 113493: 90 nop <== NOT EXECUTED */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 113494: 83 ec 0c sub $0xc,%esp 113497: 68 40 7b 12 00 push $0x127b40 11349c: e8 fb 89 ff ff call 10be9c <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 1134a1: 83 c4 10 add $0x10,%esp 1134a4: 85 c0 test %eax,%eax 1134a6: 74 6a je 113512 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 1134a8: 8d 78 08 lea 0x8(%eax),%edi 1134ab: 8d 75 dc lea -0x24(%ebp),%esi 1134ae: b9 03 00 00 00 mov $0x3,%ecx 1134b3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 1134b5: 83 ec 08 sub $0x8,%esp 1134b8: 50 push %eax 1134b9: 81 c3 c0 7b 12 00 add $0x127bc0,%ebx 1134bf: 53 push %ebx 1134c0: e8 b3 89 ff ff call 10be78 <_Chain_Append> 1134c5: 83 c4 10 add $0x10,%esp 1134c8: e9 db fe ff ff jmp 1133a8 <== ALWAYS TAKEN 1134cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 1134d0: e8 df 9f ff ff call 10d4b4 <_Thread_Enable_dispatch> 1134d5: 31 c0 xor %eax,%eax return 0; 1134d7: e9 ee fe ff ff jmp 1133ca <== ALWAYS TAKEN */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 1134dc: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 1134e3: e9 2f fe ff ff jmp 113317 <== ALWAYS TAKEN /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 1134e8: e8 23 03 00 00 call 113810 <__errno> 1134ed: c7 00 03 00 00 00 movl $0x3,(%eax) 1134f3: b8 ff ff ff ff mov $0xffffffff,%eax 1134f8: e9 cd fe ff ff jmp 1133ca <== ALWAYS TAKEN */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1134fd: e8 0e 03 00 00 call 113810 <__errno> 113502: c7 00 16 00 00 00 movl $0x16,(%eax) 113508: b8 ff ff ff ff mov $0xffffffff,%eax 11350d: e9 b8 fe ff ff jmp 1133ca <== ALWAYS TAKEN if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 113512: e8 9d 9f ff ff call 10d4b4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 113517: e8 f4 02 00 00 call 113810 <__errno> 11351c: c7 00 0b 00 00 00 movl $0xb,(%eax) 113522: 83 c8 ff or $0xffffffff,%eax 113525: e9 a0 fe ff ff jmp 1133ca <== ALWAYS TAKEN 0010f634 : */ int mq_close( mqd_t mqdes ) { 10f634: 55 push %ebp 10f635: 89 e5 mov %esp,%ebp 10f637: 53 push %ebx 10f638: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10f63b: 8d 45 f4 lea -0xc(%ebp),%eax 10f63e: 50 push %eax 10f63f: ff 75 08 pushl 0x8(%ebp) 10f642: 68 60 05 13 00 push $0x130560 10f647: e8 90 32 00 00 call 1128dc <_Objects_Get> 10f64c: 89 c3 mov %eax,%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); if ( location == OBJECTS_LOCAL ) { 10f64e: 83 c4 10 add $0x10,%esp 10f651: 8b 55 f4 mov -0xc(%ebp),%edx 10f654: 85 d2 test %edx,%edx 10f656: 75 38 jne 10f690 * First update the actual message queue to reflect this descriptor * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; 10f658: 8b 40 10 mov 0x10(%eax),%eax the_mq->open_count -= 1; 10f65b: ff 48 18 decl 0x18(%eax) _POSIX_Message_queue_Delete( the_mq ); 10f65e: 83 ec 0c sub $0xc,%esp 10f661: 50 push %eax 10f662: e8 3d 00 00 00 call 10f6a4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN /* * Now close this file descriptor. */ _Objects_Close( 10f667: 59 pop %ecx 10f668: 58 pop %eax 10f669: 53 push %ebx 10f66a: 68 60 05 13 00 push $0x130560 10f66f: e8 34 2e 00 00 call 1124a8 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10f674: 58 pop %eax 10f675: 5a pop %edx 10f676: 53 push %ebx 10f677: 68 60 05 13 00 push $0x130560 10f67c: e8 2b 31 00 00 call 1127ac <_Objects_Free> &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f681: e8 1a 3b 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f686: 31 c0 xor %eax,%eax return 0; 10f688: 83 c4 10 add $0x10,%esp /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); } 10f68b: 8b 5d fc mov -0x4(%ebp),%ebx 10f68e: c9 leave 10f68f: c3 ret /* * OBJECTS_REMOTE: * OBJECTS_ERROR: */ rtems_set_errno_and_return_minus_one( EBADF ); 10f690: e8 cf 9f 00 00 call 119664 <__errno> 10f695: c7 00 09 00 00 00 movl $0x9,(%eax) 10f69b: b8 ff ff ff ff mov $0xffffffff,%eax 10f6a0: eb e9 jmp 10f68b <== ALWAYS TAKEN 0010f6f4 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10f6f4: 55 push %ebp 10f6f5: 89 e5 mov %esp,%ebp 10f6f7: 53 push %ebx 10f6f8: 83 ec 14 sub $0x14,%esp 10f6fb: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 10f6fe: 85 db test %ebx,%ebx 10f700: 74 54 je 10f756 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10f702: 51 push %ecx 10f703: 8d 45 f4 lea -0xc(%ebp),%eax 10f706: 50 push %eax 10f707: ff 75 08 pushl 0x8(%ebp) 10f70a: 68 60 05 13 00 push $0x130560 10f70f: e8 c8 31 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10f714: 83 c4 10 add $0x10,%esp 10f717: 8b 55 f4 mov -0xc(%ebp),%edx 10f71a: 85 d2 test %edx,%edx 10f71c: 75 26 jne 10f744 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10f71e: 8b 50 10 mov 0x10(%eax),%edx * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 10f721: 8b 40 14 mov 0x14(%eax),%eax 10f724: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10f726: 8b 42 68 mov 0x68(%edx),%eax 10f729: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10f72c: 8b 42 60 mov 0x60(%edx),%eax 10f72f: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10f732: 8b 42 64 mov 0x64(%edx),%eax 10f735: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10f738: e8 63 3a 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f73d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f73f: 8b 5d fc mov -0x4(%ebp),%ebx 10f742: c9 leave 10f743: c3 ret #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f744: e8 1b 9f 00 00 call 119664 <__errno> 10f749: c7 00 09 00 00 00 movl $0x9,(%eax) 10f74f: b8 ff ff ff ff mov $0xffffffff,%eax 10f754: eb e9 jmp 10f73f <== ALWAYS TAKEN POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10f756: e8 09 9f 00 00 call 119664 <__errno> 10f75b: c7 00 16 00 00 00 movl $0x16,(%eax) 10f761: b8 ff ff ff ff mov $0xffffffff,%eax 10f766: eb d7 jmp 10f73f <== ALWAYS TAKEN 0010f768 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 10f768: 55 push %ebp 10f769: 89 e5 mov %esp,%ebp 10f76b: 57 push %edi 10f76c: 56 push %esi 10f76d: 83 ec 14 sub $0x14,%esp 10f770: 8b 75 0c mov 0xc(%ebp),%esi 10f773: 8d 45 f4 lea -0xc(%ebp),%eax 10f776: 50 push %eax 10f777: ff 75 08 pushl 0x8(%ebp) 10f77a: 68 60 05 13 00 push $0x130560 10f77f: e8 58 31 00 00 call 1128dc <_Objects_Get> POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10f784: 83 c4 10 add $0x10,%esp 10f787: 8b 4d f4 mov -0xc(%ebp),%ecx 10f78a: 85 c9 test %ecx,%ecx 10f78c: 74 1a je 10f7a8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10f78e: e8 d1 9e 00 00 call 119664 <__errno> 10f793: c7 00 09 00 00 00 movl $0x9,(%eax) 10f799: b8 ff ff ff ff mov $0xffffffff,%eax 10f79e: 66 90 xchg %ax,%ax } 10f7a0: 8d 65 f8 lea -0x8(%ebp),%esp 10f7a3: 5e pop %esi 10f7a4: 5f pop %edi 10f7a5: c9 leave 10f7a6: c3 ret 10f7a7: 90 nop <== NOT EXECUTED the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10f7a8: 8b 40 10 mov 0x10(%eax),%eax if ( notification ) { 10f7ab: 85 f6 test %esi,%esi 10f7ad: 74 39 je 10f7e8 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 10f7af: 8b 50 7c mov 0x7c(%eax),%edx 10f7b2: 85 d2 test %edx,%edx 10f7b4: 75 46 jne 10f7fc CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; the_message_queue->notify_argument = the_argument; 10f7b6: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f7bd: 00 00 00 rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 10f7c0: 8d b8 90 00 00 00 lea 0x90(%eax),%edi 10f7c6: b9 05 00 00 00 mov $0x5,%ecx 10f7cb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10f7cd: c7 40 7c 14 f8 10 00 movl $0x10f814,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f7d4: 89 80 80 00 00 00 mov %eax,0x80(%eax) _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); } _Thread_Enable_dispatch(); 10f7da: e8 c1 39 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f7df: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10f7e1: 8d 65 f8 lea -0x8(%ebp),%esp 10f7e4: 5e pop %esi 10f7e5: 5f pop %edi 10f7e6: c9 leave 10f7e7: c3 ret CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 10f7e8: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax) the_message_queue->notify_argument = the_argument; 10f7ef: c7 80 80 00 00 00 00 movl $0x0,0x80(%eax) 10f7f6: 00 00 00 10f7f9: eb df jmp 10f7da <== ALWAYS TAKEN 10f7fb: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); 10f7fc: e8 9f 39 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBUSY ); 10f801: e8 5e 9e 00 00 call 119664 <__errno> 10f806: c7 00 10 00 00 00 movl $0x10,(%eax) 10f80c: b8 ff ff ff ff mov $0xffffffff,%eax 10f811: eb 8d jmp 10f7a0 <== ALWAYS TAKEN 0010f84c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 10f84c: 55 push %ebp 10f84d: 89 e5 mov %esp,%ebp 10f84f: 57 push %edi 10f850: 56 push %esi 10f851: 53 push %ebx 10f852: 83 ec 2c sub $0x2c,%esp 10f855: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f858: a1 f8 ff 12 00 mov 0x12fff8,%eax 10f85d: 40 inc %eax 10f85e: a3 f8 ff 12 00 mov %eax,0x12fff8 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10f863: 89 f0 mov %esi,%eax 10f865: 25 00 02 00 00 and $0x200,%eax 10f86a: 89 45 d4 mov %eax,-0x2c(%ebp) 10f86d: 0f 85 c9 00 00 00 jne 10f93c 10f873: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 10f87a: 83 ec 0c sub $0xc,%esp 10f87d: 68 60 05 13 00 push $0x130560 10f882: e8 a5 2b 00 00 call 11242c <_Objects_Allocate> 10f887: 89 c3 mov %eax,%ebx attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 10f889: 83 c4 10 add $0x10,%esp 10f88c: 85 c0 test %eax,%eax 10f88e: 0f 84 b4 00 00 00 je 10f948 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 10f894: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10f897: 83 ec 08 sub $0x8,%esp 10f89a: 8d 45 e4 lea -0x1c(%ebp),%eax 10f89d: 50 push %eax 10f89e: ff 75 08 pushl 0x8(%ebp) 10f8a1: e8 ce 64 00 00 call 115d74 <_POSIX_Message_queue_Name_to_id> 10f8a6: 89 c7 mov %eax,%edi * If the name to id translation worked, then the message queue exists * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10f8a8: 83 c4 10 add $0x10,%esp 10f8ab: 85 c0 test %eax,%eax 10f8ad: 75 59 jne 10f908 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10f8af: 81 e6 00 0a 00 00 and $0xa00,%esi 10f8b5: 81 fe 00 0a 00 00 cmp $0xa00,%esi 10f8bb: 0f 84 a7 00 00 00 je 10f968 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 10f8c1: 50 push %eax 10f8c2: 8d 45 dc lea -0x24(%ebp),%eax 10f8c5: 50 push %eax 10f8c6: ff 75 e4 pushl -0x1c(%ebp) 10f8c9: 68 c0 03 13 00 push $0x1303c0 10f8ce: e8 09 30 00 00 call 1128dc <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 10f8d3: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 10f8d6: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 10f8d9: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f8dc: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10f8e0: a1 7c 05 13 00 mov 0x13057c,%eax 10f8e5: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10f8e8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Objects_Open_string( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10f8ef: e8 ac 38 00 00 call 1131a0 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10f8f4: e8 a7 38 00 00 call 1131a0 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 10f8f9: 8b 43 08 mov 0x8(%ebx),%eax 10f8fc: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f8ff: 8d 65 f4 lea -0xc(%ebp),%esp 10f902: 5b pop %ebx 10f903: 5e pop %esi 10f904: 5f pop %edi 10f905: c9 leave 10f906: c3 ret 10f907: 90 nop <== NOT EXECUTED if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10f908: 83 f8 02 cmp $0x2,%eax 10f90b: 0f 84 87 00 00 00 je 10f998 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 10f911: 83 ec 08 sub $0x8,%esp 10f914: 53 push %ebx 10f915: 68 60 05 13 00 push $0x130560 10f91a: e8 8d 2e 00 00 call 1127ac <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f91f: e8 7c 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 10f924: e8 3b 9d 00 00 call 119664 <__errno> 10f929: 89 38 mov %edi,(%eax) 10f92b: b8 ff ff ff ff mov $0xffffffff,%eax 10f930: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f933: 8d 65 f4 lea -0xc(%ebp),%esp 10f936: 5b pop %ebx 10f937: 5e pop %esi 10f938: 5f pop %edi 10f939: c9 leave 10f93a: c3 ret 10f93b: 90 nop <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 10f93c: 8b 45 14 mov 0x14(%ebp),%eax 10f93f: 89 45 d0 mov %eax,-0x30(%ebp) 10f942: e9 33 ff ff ff jmp 10f87a <== ALWAYS TAKEN 10f947: 90 nop <== NOT EXECUTED va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 10f948: e8 53 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 10f94d: e8 12 9d 00 00 call 119664 <__errno> 10f952: c7 00 17 00 00 00 movl $0x17,(%eax) 10f958: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f95d: 8d 65 f4 lea -0xc(%ebp),%esp 10f960: 5b pop %ebx 10f961: 5e pop %esi 10f962: 5f pop %edi 10f963: c9 leave 10f964: c3 ret 10f965: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f968: 83 ec 08 sub $0x8,%esp 10f96b: 53 push %ebx 10f96c: 68 60 05 13 00 push $0x130560 10f971: e8 36 2e 00 00 call 1127ac <_Objects_Free> /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f976: e8 25 38 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 10f97b: e8 e4 9c 00 00 call 119664 <__errno> 10f980: c7 00 11 00 00 00 movl $0x11,(%eax) 10f986: b8 ff ff ff ff mov $0xffffffff,%eax 10f98b: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 10f98e: 8d 65 f4 lea -0xc(%ebp),%esp 10f991: 5b pop %ebx 10f992: 5e pop %esi 10f993: 5f pop %edi 10f994: c9 leave 10f995: c3 ret 10f996: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( status ) { /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10f998: 8b 55 d4 mov -0x2c(%ebp),%edx 10f99b: 85 d2 test %edx,%edx 10f99d: 0f 84 6e ff ff ff je 10f911 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 10f9a3: 8d 45 e0 lea -0x20(%ebp),%eax 10f9a6: 50 push %eax 10f9a7: ff 75 d0 pushl -0x30(%ebp) 10f9aa: 6a 01 push $0x1 10f9ac: ff 75 08 pushl 0x8(%ebp) 10f9af: e8 2c 62 00 00 call 115be0 <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 10f9b4: 83 c4 10 add $0x10,%esp 10f9b7: 40 inc %eax 10f9b8: 74 26 je 10f9e0 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 10f9ba: 8b 45 e0 mov -0x20(%ebp),%eax 10f9bd: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10f9c0: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10f9c4: a1 7c 05 13 00 mov 0x13057c,%eax 10f9c9: 89 1c 90 mov %ebx,(%eax,%edx,4) the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 10f9cc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 10f9d3: e8 c8 37 00 00 call 1131a0 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 10f9d8: 8b 43 08 mov 0x8(%ebx),%eax 10f9db: e9 1f ff ff ff jmp 10f8ff <== ALWAYS TAKEN 10f9e0: 83 ec 08 sub $0x8,%esp 10f9e3: 53 push %ebx 10f9e4: 68 60 05 13 00 push $0x130560 10f9e9: e8 be 2d 00 00 call 1127ac <_Objects_Free> /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 10f9ee: e8 ad 37 00 00 call 1131a0 <_Thread_Enable_dispatch> 10f9f3: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 10f9f8: 83 c4 10 add $0x10,%esp 10f9fb: e9 ff fe ff ff jmp 10f8ff <== ALWAYS TAKEN 0010fa00 : mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio ) { 10fa00: 55 push %ebp 10fa01: 89 e5 mov %esp,%ebp 10fa03: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Receive_support( 10fa06: 6a 00 push $0x0 10fa08: 6a 01 push $0x1 10fa0a: ff 75 14 pushl 0x14(%ebp) 10fa0d: ff 75 10 pushl 0x10(%ebp) 10fa10: ff 75 0c pushl 0xc(%ebp) 10fa13: ff 75 08 pushl 0x8(%ebp) 10fa16: e8 05 00 00 00 call 10fa20 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10fa1b: c9 leave 10fa1c: c3 ret 0010fb3c : mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio ) { 10fb3c: 55 push %ebp 10fb3d: 89 e5 mov %esp,%ebp 10fb3f: 83 ec 10 sub $0x10,%esp return _POSIX_Message_queue_Send_support( 10fb42: 6a 00 push $0x0 10fb44: 6a 01 push $0x1 10fb46: ff 75 14 pushl 0x14(%ebp) 10fb49: ff 75 10 pushl 0x10(%ebp) 10fb4c: ff 75 0c pushl 0xc(%ebp) 10fb4f: ff 75 08 pushl 0x8(%ebp) 10fb52: e8 05 00 00 00 call 10fb5c <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, true, THREAD_QUEUE_WAIT_FOREVER ); } 10fb57: c9 leave 10fb58: c3 ret 0010fc60 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 10fc60: 55 push %ebp 10fc61: 89 e5 mov %esp,%ebp 10fc63: 56 push %esi 10fc64: 53 push %ebx 10fc65: 83 ec 10 sub $0x10,%esp 10fc68: 8b 75 0c mov 0xc(%ebp),%esi 10fc6b: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 10fc6e: 85 f6 test %esi,%esi 10fc70: 74 60 je 10fcd2 10fc72: 51 push %ecx 10fc73: 8d 45 f4 lea -0xc(%ebp),%eax 10fc76: 50 push %eax 10fc77: ff 75 08 pushl 0x8(%ebp) 10fc7a: 68 60 05 13 00 push $0x130560 10fc7f: e8 58 2c 00 00 call 1128dc <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10fc84: 83 c4 10 add $0x10,%esp 10fc87: 8b 55 f4 mov -0xc(%ebp),%edx 10fc8a: 85 d2 test %edx,%edx 10fc8c: 75 32 jne 10fcc0 case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 10fc8e: 8b 50 10 mov 0x10(%eax),%edx /* * Return the old values. */ if ( omqstat ) { 10fc91: 85 db test %ebx,%ebx 10fc93: 74 17 je 10fcac omqstat->mq_flags = the_mq_fd->oflag; 10fc95: 8b 48 14 mov 0x14(%eax),%ecx 10fc98: 89 0b mov %ecx,(%ebx) omqstat->mq_msgsize = the_core_mq->maximum_message_size; 10fc9a: 8b 4a 68 mov 0x68(%edx),%ecx 10fc9d: 89 4b 08 mov %ecx,0x8(%ebx) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 10fca0: 8b 4a 60 mov 0x60(%edx),%ecx 10fca3: 89 4b 04 mov %ecx,0x4(%ebx) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 10fca6: 8b 52 64 mov 0x64(%edx),%edx 10fca9: 89 53 0c mov %edx,0xc(%ebx) } the_mq_fd->oflag = mqstat->mq_flags; 10fcac: 8b 16 mov (%esi),%edx 10fcae: 89 50 14 mov %edx,0x14(%eax) _Thread_Enable_dispatch(); 10fcb1: e8 ea 34 00 00 call 1131a0 <_Thread_Enable_dispatch> 10fcb6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10fcb8: 8d 65 f8 lea -0x8(%ebp),%esp 10fcbb: 5b pop %ebx 10fcbc: 5e pop %esi 10fcbd: c9 leave 10fcbe: c3 ret 10fcbf: 90 nop <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fcc0: e8 9f 99 00 00 call 119664 <__errno> 10fcc5: c7 00 09 00 00 00 movl $0x9,(%eax) 10fccb: b8 ff ff ff ff mov $0xffffffff,%eax 10fcd0: eb e6 jmp 10fcb8 <== ALWAYS TAKEN POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 10fcd2: e8 8d 99 00 00 call 119664 <__errno> 10fcd7: c7 00 16 00 00 00 movl $0x16,(%eax) 10fcdd: b8 ff ff ff ff mov $0xffffffff,%eax 10fce2: eb d4 jmp 10fcb8 <== ALWAYS TAKEN 0010fce4 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 10fce4: 55 push %ebp 10fce5: 89 e5 mov %esp,%ebp 10fce7: 83 ec 20 sub $0x20,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10fcea: 8d 45 f4 lea -0xc(%ebp),%eax 10fced: 50 push %eax 10fcee: ff 75 18 pushl 0x18(%ebp) 10fcf1: e8 d6 00 00 00 call 10fdcc <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Receive_support( 10fcf6: 5a pop %edx 10fcf7: 59 pop %ecx 10fcf8: ff 75 f4 pushl -0xc(%ebp) 10fcfb: 83 f8 03 cmp $0x3,%eax 10fcfe: 0f 94 c0 sete %al 10fd01: 0f b6 c0 movzbl %al,%eax 10fd04: 50 push %eax 10fd05: ff 75 14 pushl 0x14(%ebp) 10fd08: ff 75 10 pushl 0x10(%ebp) 10fd0b: ff 75 0c pushl 0xc(%ebp) 10fd0e: ff 75 08 pushl 0x8(%ebp) 10fd11: e8 0a fd ff ff call 10fa20 <_POSIX_Message_queue_Receive_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10fd16: c9 leave 10fd17: c3 ret 0010fd18 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 10fd18: 55 push %ebp 10fd19: 89 e5 mov %esp,%ebp 10fd1b: 83 ec 20 sub $0x20,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10fd1e: 8d 45 f4 lea -0xc(%ebp),%eax 10fd21: 50 push %eax 10fd22: ff 75 18 pushl 0x18(%ebp) 10fd25: e8 a2 00 00 00 call 10fdcc <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; return _POSIX_Message_queue_Send_support( 10fd2a: 5a pop %edx 10fd2b: 59 pop %ecx 10fd2c: ff 75 f4 pushl -0xc(%ebp) 10fd2f: 83 f8 03 cmp $0x3,%eax 10fd32: 0f 94 c0 sete %al 10fd35: 0f b6 c0 movzbl %al,%eax 10fd38: 50 push %eax 10fd39: ff 75 14 pushl 0x14(%ebp) 10fd3c: ff 75 10 pushl 0x10(%ebp) 10fd3f: ff 75 0c pushl 0xc(%ebp) 10fd42: ff 75 08 pushl 0x8(%ebp) 10fd45: e8 12 fe ff ff call 10fb5c <_POSIX_Message_queue_Send_support> <== ALWAYS TAKEN msg_len, msg_prio, do_wait, ticks ); } 10fd4a: c9 leave 10fd4b: c3 ret 0010fd5c : */ int mq_unlink( const char *name ) { 10fd5c: 55 push %ebp 10fd5d: 89 e5 mov %esp,%ebp 10fd5f: 53 push %ebx 10fd60: 83 ec 1c sub $0x1c,%esp 10fd63: a1 f8 ff 12 00 mov 0x12fff8,%eax 10fd68: 40 inc %eax 10fd69: a3 f8 ff 12 00 mov %eax,0x12fff8 register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 10fd6e: 8d 45 f4 lea -0xc(%ebp),%eax 10fd71: 50 push %eax 10fd72: ff 75 08 pushl 0x8(%ebp) 10fd75: e8 fa 5f 00 00 call 115d74 <_POSIX_Message_queue_Name_to_id> 10fd7a: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10fd7c: 83 c4 10 add $0x10,%esp 10fd7f: 85 c0 test %eax,%eax 10fd81: 75 35 jne 10fdb8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object( 10fd83: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10fd87: a1 dc 03 13 00 mov 0x1303dc,%eax 10fd8c: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Message_queue_Information, _Objects_Get_index( the_mq_id ) ); the_mq->linked = false; 10fd8f: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove ( POSIX_Message_queue_Control *the_mq ) { _Objects_Namespace_remove( 10fd93: 83 ec 08 sub $0x8,%esp 10fd96: 53 push %ebx 10fd97: 68 c0 03 13 00 push $0x1303c0 10fd9c: e8 8b 2c 00 00 call 112a2c <_Objects_Namespace_remove> _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 10fda1: 89 1c 24 mov %ebx,(%esp) 10fda4: e8 fb f8 ff ff call 10f6a4 <_POSIX_Message_queue_Delete> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10fda9: e8 f2 33 00 00 call 1131a0 <_Thread_Enable_dispatch> 10fdae: 31 c0 xor %eax,%eax return 0; 10fdb0: 83 c4 10 add $0x10,%esp } 10fdb3: 8b 5d fc mov -0x4(%ebp),%ebx 10fdb6: c9 leave 10fdb7: c3 ret _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10fdb8: e8 e3 33 00 00 call 1131a0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10fdbd: e8 a2 98 00 00 call 119664 <__errno> 10fdc2: 89 18 mov %ebx,(%eax) 10fdc4: b8 ff ff ff ff mov $0xffffffff,%eax 10fdc9: eb e8 jmp 10fdb3 <== ALWAYS TAKEN 00129000 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 129000: 55 push %ebp 129001: 89 e5 mov %esp,%ebp 129003: 56 push %esi 129004: 53 push %ebx 129005: 8b 5d 08 mov 0x8(%ebp),%ebx 129008: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 12900b: 83 ec 0c sub $0xc,%esp 12900e: 53 push %ebx 12900f: e8 18 01 00 00 call 12912c <_Timespec_Is_valid> <== ALWAYS TAKEN 129014: 83 c4 10 add $0x10,%esp 129017: 84 c0 test %al,%al 129019: 0f 84 e1 00 00 00 je 129100 * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 12901f: 8b 13 mov (%ebx),%edx 129021: 85 d2 test %edx,%edx 129023: 0f 88 d7 00 00 00 js 129100 <== ALWAYS TAKEN 129029: 8b 43 04 mov 0x4(%ebx),%eax 12902c: 85 c0 test %eax,%eax 12902e: 0f 88 cc 00 00 00 js 129100 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 129034: 83 ec 0c sub $0xc,%esp 129037: 53 push %ebx 129038: e8 57 fd fe ff call 118d94 <_Timespec_To_ticks> 12903d: 89 c3 mov %eax,%ebx * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 12903f: 83 c4 10 add $0x10,%esp 129042: 85 c0 test %eax,%eax 129044: 75 36 jne 12907c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 129046: a1 f8 4f 13 00 mov 0x134ff8,%eax 12904b: 40 inc %eax 12904c: a3 f8 4f 13 00 mov %eax,0x134ff8 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 129051: e8 d6 9d fe ff call 112e2c <_Thread_Yield_processor> _Thread_Enable_dispatch(); 129056: e8 c9 91 fe ff call 112224 <_Thread_Enable_dispatch> if ( rmtp ) { 12905b: 85 f6 test %esi,%esi 12905d: 0f 84 93 00 00 00 je 1290f6 rmtp->tv_sec = 0; 129063: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 129069: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 129070: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 129072: 8d 65 f8 lea -0x8(%ebp),%esp 129075: 5b pop %ebx 129076: 5e pop %esi 129077: c9 leave 129078: c3 ret 129079: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12907c: a1 f8 4f 13 00 mov 0x134ff8,%eax 129081: 40 inc %eax 129082: a3 f8 4f 13 00 mov %eax,0x134ff8 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 129087: 83 ec 08 sub $0x8,%esp 12908a: 68 08 00 00 10 push $0x10000008 12908f: ff 35 b8 50 13 00 pushl 0x1350b8 129095: e8 7a 9a fe ff call 112b14 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 12909a: 8b 15 b8 50 13 00 mov 0x1350b8,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 1290a0: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1290a3: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 1290aa: c7 42 64 8c 20 11 00 movl $0x11208c,0x64(%edx) the_watchdog->id = id; 1290b1: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 1290b4: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1290bb: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1290be: 58 pop %eax 1290bf: 59 pop %ecx 1290c0: 83 c2 48 add $0x48,%edx 1290c3: 52 push %edx 1290c4: 68 d8 50 13 00 push $0x1350d8 1290c9: e8 3e a1 fe ff call 11320c <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 1290ce: e8 51 91 fe ff call 112224 <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 1290d3: 83 c4 10 add $0x10,%esp 1290d6: 85 f6 test %esi,%esi 1290d8: 74 1c je 1290f6 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 1290da: a1 b8 50 13 00 mov 0x1350b8,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 1290df: 03 58 5c add 0x5c(%eax),%ebx 1290e2: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 1290e5: 83 ec 08 sub $0x8,%esp 1290e8: 56 push %esi 1290e9: 53 push %ebx 1290ea: e8 5d fc fe ff call 118d4c <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 1290ef: 83 c4 10 add $0x10,%esp 1290f2: 85 db test %ebx,%ebx 1290f4: 75 1f jne 129115 rtems_set_errno_and_return_minus_one( EINTR ); 1290f6: 31 c0 xor %eax,%eax #endif } return 0; } 1290f8: 8d 65 f8 lea -0x8(%ebp),%esp 1290fb: 5b pop %ebx 1290fc: 5e pop %esi 1290fd: c9 leave 1290fe: c3 ret 1290ff: 90 nop <== NOT EXECUTED * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 129100: e8 2b 2d ff ff call 11be30 <__errno> 129105: c7 00 16 00 00 00 movl $0x16,(%eax) 12910b: b8 ff ff ff ff mov $0xffffffff,%eax 129110: e9 5d ff ff ff jmp 129072 <== ALWAYS TAKEN #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 129115: e8 16 2d ff ff call 11be30 <__errno> 12911a: c7 00 04 00 00 00 movl $0x4,(%eax) 129120: b8 ff ff ff ff mov $0xffffffff,%eax 129125: e9 48 ff ff ff jmp 129072 <== ALWAYS TAKEN 0010fb80 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 10fb80: 55 push %ebp 10fb81: 89 e5 mov %esp,%ebp 10fb83: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fb86: 85 c0 test %eax,%eax 10fb88: 74 12 je 10fb9c 10fb8a: 8b 10 mov (%eax),%edx 10fb8c: 85 d2 test %edx,%edx 10fb8e: 74 0c je 10fb9c return EINVAL; attr->is_initialized = false; 10fb90: c7 00 00 00 00 00 movl $0x0,(%eax) 10fb96: 31 c0 xor %eax,%eax return 0; } 10fb98: c9 leave 10fb99: c3 ret 10fb9a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10fb9c: b8 16 00 00 00 mov $0x16,%eax } 10fba1: c9 leave 10fba2: c3 ret 0010fbf4 : int pthread_attr_getschedparam( const pthread_attr_t *attr, struct sched_param *param ) { 10fbf4: 55 push %ebp 10fbf5: 89 e5 mov %esp,%ebp 10fbf7: 57 push %edi 10fbf8: 56 push %esi 10fbf9: 8b 75 08 mov 0x8(%ebp),%esi 10fbfc: 8b 45 0c mov 0xc(%ebp),%eax if ( !attr || !attr->is_initialized || !param ) 10fbff: 85 f6 test %esi,%esi 10fc01: 74 1d je 10fc20 10fc03: 8b 16 mov (%esi),%edx 10fc05: 85 d2 test %edx,%edx 10fc07: 74 17 je 10fc20 10fc09: 85 c0 test %eax,%eax 10fc0b: 74 13 je 10fc20 return EINVAL; *param = attr->schedparam; 10fc0d: 83 c6 18 add $0x18,%esi 10fc10: b9 06 00 00 00 mov $0x6,%ecx 10fc15: 89 c7 mov %eax,%edi 10fc17: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fc19: 31 c0 xor %eax,%eax return 0; } 10fc1b: 5e pop %esi 10fc1c: 5f pop %edi 10fc1d: c9 leave 10fc1e: c3 ret 10fc1f: 90 nop <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; *param = attr->schedparam; return 0; 10fc20: b8 16 00 00 00 mov $0x16,%eax } 10fc25: 5e pop %esi 10fc26: 5f pop %edi 10fc27: c9 leave 10fc28: c3 ret 00110614 : int pthread_attr_setcputime( pthread_attr_t *attr, int clock_allowed ) { 110614: 55 push %ebp 110615: 89 e5 mov %esp,%ebp 110617: 8b 45 08 mov 0x8(%ebp),%eax 11061a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11061d: 85 c0 test %eax,%eax 11061f: 74 0b je 11062c 110621: 8b 08 mov (%eax),%ecx 110623: 85 c9 test %ecx,%ecx 110625: 74 05 je 11062c return EINVAL; switch ( clock_allowed ) { 110627: 83 fa 01 cmp $0x1,%edx 11062a: 76 08 jbe 110634 case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; return 0; 11062c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 110631: c9 leave 110632: c3 ret 110633: 90 nop <== NOT EXECUTED return EINVAL; switch ( clock_allowed ) { case CLOCK_ENABLED: case CLOCK_DISABLED: attr->cputime_clock_allowed = clock_allowed; 110634: 89 50 30 mov %edx,0x30(%eax) 110637: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 110639: c9 leave 11063a: c3 ret 0010fcf4 : int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) { 10fcf4: 55 push %ebp 10fcf5: 89 e5 mov %esp,%ebp 10fcf7: 8b 45 08 mov 0x8(%ebp),%eax 10fcfa: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fcfd: 85 c0 test %eax,%eax 10fcff: 74 0b je 10fd0c 10fd01: 8b 08 mov (%eax),%ecx 10fd03: 85 c9 test %ecx,%ecx 10fd05: 74 05 je 10fd0c return EINVAL; switch ( detachstate ) { 10fd07: 83 fa 01 cmp $0x1,%edx 10fd0a: 76 08 jbe 10fd14 case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; return 0; 10fd0c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10fd11: c9 leave 10fd12: c3 ret 10fd13: 90 nop <== NOT EXECUTED return EINVAL; switch ( detachstate ) { case PTHREAD_CREATE_DETACHED: case PTHREAD_CREATE_JOINABLE: attr->detachstate = detachstate; 10fd14: 89 50 34 mov %edx,0x34(%eax) 10fd17: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10fd19: c9 leave 10fd1a: c3 ret 00111304 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 111304: 55 push %ebp 111305: 89 e5 mov %esp,%ebp 111307: 8b 45 08 mov 0x8(%ebp),%eax 11130a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11130d: 85 c0 test %eax,%eax 11130f: 74 1f je 111330 111311: 8b 08 mov (%eax),%ecx 111313: 85 c9 test %ecx,%ecx 111315: 74 19 je 111330 return EINVAL; switch ( inheritsched ) { 111317: 8d 4a ff lea -0x1(%edx),%ecx 11131a: 83 f9 01 cmp $0x1,%ecx 11131d: 76 09 jbe 111328 11131f: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 111324: c9 leave 111325: c3 ret 111326: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 111328: 89 50 10 mov %edx,0x10(%eax) 11132b: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 11132d: c9 leave 11132e: c3 ret 11132f: 90 nop <== NOT EXECUTED switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 111330: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 111335: c9 leave 111336: c3 ret 0010fd50 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 10fd50: 55 push %ebp 10fd51: 89 e5 mov %esp,%ebp 10fd53: 57 push %edi 10fd54: 56 push %esi 10fd55: 8b 7d 08 mov 0x8(%ebp),%edi 10fd58: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 10fd5b: 85 ff test %edi,%edi 10fd5d: 74 1d je 10fd7c 10fd5f: 8b 07 mov (%edi),%eax 10fd61: 85 c0 test %eax,%eax 10fd63: 74 17 je 10fd7c 10fd65: 85 f6 test %esi,%esi 10fd67: 74 13 je 10fd7c return EINVAL; attr->schedparam = *param; 10fd69: 83 c7 18 add $0x18,%edi 10fd6c: b9 06 00 00 00 mov $0x6,%ecx 10fd71: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10fd73: 31 c0 xor %eax,%eax return 0; } 10fd75: 5e pop %esi 10fd76: 5f pop %edi 10fd77: c9 leave 10fd78: c3 ret 10fd79: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 10fd7c: b8 16 00 00 00 mov $0x16,%eax } 10fd81: 5e pop %esi 10fd82: 5f pop %edi 10fd83: c9 leave 10fd84: c3 ret 0010fd88 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10fd88: 55 push %ebp 10fd89: 89 e5 mov %esp,%ebp 10fd8b: 8b 45 08 mov 0x8(%ebp),%eax 10fd8e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fd91: 85 c0 test %eax,%eax 10fd93: 74 1b je 10fdb0 10fd95: 8b 08 mov (%eax),%ecx 10fd97: 85 c9 test %ecx,%ecx 10fd99: 74 15 je 10fdb0 return EINVAL; switch ( policy ) { 10fd9b: 83 fa 03 cmp $0x3,%edx 10fd9e: 76 08 jbe 10fda8 10fda0: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 10fda5: c9 leave 10fda6: c3 ret 10fda7: 90 nop <== NOT EXECUTED switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10fda8: 89 50 14 mov %edx,0x14(%eax) 10fdab: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 10fdad: c9 leave 10fdae: c3 ret 10fdaf: 90 nop <== NOT EXECUTED case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 10fdb0: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 10fdb5: c9 leave 10fdb6: c3 ret 0010fdb8 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 10fdb8: 55 push %ebp 10fdb9: 89 e5 mov %esp,%ebp 10fdbb: 8b 45 08 mov 0x8(%ebp),%eax 10fdbe: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10fdc1: 85 c0 test %eax,%eax 10fdc3: 74 1a je 10fddf 10fdc5: 8b 08 mov (%eax),%ecx 10fdc7: 85 c9 test %ecx,%ecx 10fdc9: 74 14 je 10fddf return EINVAL; switch ( contentionscope ) { 10fdcb: 85 d2 test %edx,%edx 10fdcd: 75 0d jne 10fddc case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 10fdcf: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10fdd6: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 10fdd8: c9 leave 10fdd9: c3 ret 10fdda: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fddc: 4a dec %edx 10fddd: 74 09 je 10fde8 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 10fddf: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 10fde4: c9 leave 10fde5: c3 ret 10fde6: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 10fde8: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 10fded: c9 leave 10fdee: c3 ret 0010fdf0 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 10fdf0: 55 push %ebp 10fdf1: 89 e5 mov %esp,%ebp 10fdf3: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10fdf6: 85 c0 test %eax,%eax 10fdf8: 74 12 je 10fe0c 10fdfa: 8b 10 mov (%eax),%edx 10fdfc: 85 d2 test %edx,%edx 10fdfe: 74 0c je 10fe0c return EINVAL; attr->stackaddr = stackaddr; 10fe00: 8b 55 0c mov 0xc(%ebp),%edx 10fe03: 89 50 04 mov %edx,0x4(%eax) 10fe06: 31 c0 xor %eax,%eax return 0; } 10fe08: c9 leave 10fe09: c3 ret 10fe0a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 10fe0c: b8 16 00 00 00 mov $0x16,%eax } 10fe11: c9 leave 10fe12: c3 ret 00111338 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 111338: 55 push %ebp 111339: 89 e5 mov %esp,%ebp 11133b: 8b 45 08 mov 0x8(%ebp),%eax 11133e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 111341: 85 c0 test %eax,%eax 111343: 74 23 je 111368 111345: 8b 08 mov (%eax),%ecx 111347: 85 c9 test %ecx,%ecx 111349: 74 1d je 111368 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 11134b: 8b 0d 58 45 12 00 mov 0x124558,%ecx 111351: d1 e1 shl %ecx 111353: 39 d1 cmp %edx,%ecx 111355: 77 09 ja 111360 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111357: 89 50 08 mov %edx,0x8(%eax) 11135a: 31 c0 xor %eax,%eax return 0; } 11135c: c9 leave 11135d: c3 ret 11135e: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 111360: 89 48 08 mov %ecx,0x8(%eax) 111363: 31 c0 xor %eax,%eax else attr->stacksize = stacksize; return 0; } 111365: c9 leave 111366: c3 ret 111367: 90 nop <== NOT EXECUTED return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 111368: b8 16 00 00 00 mov $0x16,%eax return 0; } 11136d: c9 leave 11136e: c3 ret 0010b7a0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 10b7a0: 55 push %ebp 10b7a1: 89 e5 mov %esp,%ebp 10b7a3: 83 ec 28 sub $0x28,%esp 10b7a6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b7a9: 85 c0 test %eax,%eax 10b7ab: 74 2f je 10b7dc RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b7ad: 51 push %ecx 10b7ae: 8d 55 f4 lea -0xc(%ebp),%edx 10b7b1: 52 push %edx 10b7b2: ff 30 pushl (%eax) 10b7b4: 68 60 90 12 00 push $0x129060 10b7b9: e8 62 25 00 00 call 10dd20 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b7be: 83 c4 10 add $0x10,%esp 10b7c1: 8b 55 f4 mov -0xc(%ebp),%edx 10b7c4: 85 d2 test %edx,%edx 10b7c6: 75 14 jne 10b7dc case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 10b7c8: 8b 48 58 mov 0x58(%eax),%ecx 10b7cb: 85 c9 test %ecx,%ecx 10b7cd: 74 15 je 10b7e4 _Thread_Enable_dispatch(); 10b7cf: e8 c0 2d 00 00 call 10e594 <_Thread_Enable_dispatch> 10b7d4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7d9: c9 leave 10b7da: c3 ret 10b7db: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); return 0; 10b7dc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7e1: c9 leave 10b7e2: c3 ret 10b7e3: 90 nop <== NOT EXECUTED if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b7e4: 83 ec 08 sub $0x8,%esp 10b7e7: 50 push %eax 10b7e8: 68 60 90 12 00 push $0x129060 10b7ed: 89 45 e4 mov %eax,-0x1c(%ebp) 10b7f0: e8 f7 20 00 00 call 10d8ec <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 10b7f5: 58 pop %eax 10b7f6: 5a pop %edx 10b7f7: 8b 45 e4 mov -0x1c(%ebp),%eax 10b7fa: 50 push %eax 10b7fb: 68 60 90 12 00 push $0x129060 10b800: e8 eb 23 00 00 call 10dbf0 <_Objects_Free> _POSIX_Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 10b805: e8 8a 2d 00 00 call 10e594 <_Thread_Enable_dispatch> 10b80a: 31 c0 xor %eax,%eax return 0; 10b80c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b80f: c9 leave 10b810: c3 ret 0010b814 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10b814: 55 push %ebp 10b815: 89 e5 mov %esp,%ebp 10b817: 57 push %edi 10b818: 56 push %esi 10b819: 53 push %ebx 10b81a: 83 ec 2c sub $0x2c,%esp 10b81d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b820: 8b 7d 0c mov 0xc(%ebp),%edi 10b823: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10b826: 85 db test %ebx,%ebx 10b828: 0f 84 82 00 00 00 je 10b8b0 return EINVAL; if ( count == 0 ) 10b82e: 85 f6 test %esi,%esi 10b830: 74 7e je 10b8b0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b832: 85 ff test %edi,%edi 10b834: 0f 84 92 00 00 00 je 10b8cc } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b83a: 8b 17 mov (%edi),%edx 10b83c: 85 d2 test %edx,%edx 10b83e: 74 70 je 10b8b0 return EINVAL; switch ( the_attr->process_shared ) { 10b840: 8b 47 04 mov 0x4(%edi),%eax 10b843: 85 c0 test %eax,%eax 10b845: 75 69 jne 10b8b0 <== ALWAYS TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10b847: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10b84e: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b851: a1 18 8c 12 00 mov 0x128c18,%eax 10b856: 40 inc %eax 10b857: a3 18 8c 12 00 mov %eax,0x128c18 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10b85c: 83 ec 0c sub $0xc,%esp 10b85f: 68 60 90 12 00 push $0x129060 10b864: e8 07 20 00 00 call 10d870 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10b869: 83 c4 10 add $0x10,%esp 10b86c: 85 c0 test %eax,%eax 10b86e: 74 50 je 10b8c0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10b870: 83 ec 08 sub $0x8,%esp 10b873: 8d 55 e0 lea -0x20(%ebp),%edx 10b876: 52 push %edx 10b877: 8d 50 10 lea 0x10(%eax),%edx 10b87a: 52 push %edx 10b87b: 89 45 d4 mov %eax,-0x2c(%ebp) 10b87e: e8 65 16 00 00 call 10cee8 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b883: 8b 45 d4 mov -0x2c(%ebp),%eax 10b886: 8b 50 08 mov 0x8(%eax),%edx 10b889: 0f b7 f2 movzwl %dx,%esi 10b88c: 8b 0d 7c 90 12 00 mov 0x12907c,%ecx 10b892: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b895: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10b89c: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b89e: e8 f1 2c 00 00 call 10e594 <_Thread_Enable_dispatch> 10b8a3: 31 c0 xor %eax,%eax return 0; 10b8a5: 83 c4 10 add $0x10,%esp } 10b8a8: 8d 65 f4 lea -0xc(%ebp),%esp 10b8ab: 5b pop %ebx 10b8ac: 5e pop %esi 10b8ad: 5f pop %edi 10b8ae: c9 leave 10b8af: c3 ret /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10b8b0: b8 16 00 00 00 mov $0x16,%eax } 10b8b5: 8d 65 f4 lea -0xc(%ebp),%esp 10b8b8: 5b pop %ebx 10b8b9: 5e pop %esi 10b8ba: 5f pop %edi 10b8bb: c9 leave 10b8bc: c3 ret 10b8bd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10b8c0: e8 cf 2c 00 00 call 10e594 <_Thread_Enable_dispatch> 10b8c5: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b8ca: eb e9 jmp 10b8b5 <== ALWAYS TAKEN * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10b8cc: 83 ec 0c sub $0xc,%esp 10b8cf: 8d 7d d8 lea -0x28(%ebp),%edi 10b8d2: 57 push %edi 10b8d3: e8 80 fe ff ff call 10b758 <== ALWAYS TAKEN 10b8d8: 83 c4 10 add $0x10,%esp 10b8db: e9 5a ff ff ff jmp 10b83a <== ALWAYS TAKEN 0010b8e0 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10b8e0: 55 push %ebp 10b8e1: 89 e5 mov %esp,%ebp 10b8e3: 83 ec 18 sub $0x18,%esp 10b8e6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10b8e9: 85 c0 test %eax,%eax 10b8eb: 74 4f je 10b93c RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10b8ed: 51 push %ecx 10b8ee: 8d 55 f4 lea -0xc(%ebp),%edx 10b8f1: 52 push %edx 10b8f2: ff 30 pushl (%eax) 10b8f4: 68 60 90 12 00 push $0x129060 10b8f9: e8 22 24 00 00 call 10dd20 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10b8fe: 83 c4 10 add $0x10,%esp 10b901: 8b 55 f4 mov -0xc(%ebp),%edx 10b904: 85 d2 test %edx,%edx 10b906: 75 34 jne 10b93c case OBJECTS_LOCAL: _CORE_barrier_Wait( 10b908: 83 ec 0c sub $0xc,%esp 10b90b: 6a 00 push $0x0 10b90d: 6a 00 push $0x0 10b90f: 6a 01 push $0x1 10b911: ff 70 08 pushl 0x8(%eax) 10b914: 83 c0 10 add $0x10,%eax 10b917: 50 push %eax 10b918: e8 ff 15 00 00 call 10cf1c <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10b91d: 83 c4 20 add $0x20,%esp 10b920: e8 6f 2c 00 00 call 10e594 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10b925: 83 ec 0c sub $0xc,%esp 10b928: a1 d8 8c 12 00 mov 0x128cd8,%eax 10b92d: ff 70 34 pushl 0x34(%eax) 10b930: e8 7f 57 00 00 call 1110b4 <_POSIX_Barrier_Translate_core_barrier_return_code> 10b935: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b938: c9 leave 10b939: c3 ret 10b93a: 66 90 xchg %ax,%ax <== NOT EXECUTED true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10b93c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b941: c9 leave 10b942: c3 ret 0010b710 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10b710: 55 push %ebp 10b711: 89 e5 mov %esp,%ebp 10b713: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10b716: 85 c0 test %eax,%eax 10b718: 74 12 je 10b72c 10b71a: 8b 10 mov (%eax),%edx 10b71c: 85 d2 test %edx,%edx 10b71e: 74 0c je 10b72c return EINVAL; attr->is_initialized = false; 10b720: c7 00 00 00 00 00 movl $0x0,(%eax) 10b726: 31 c0 xor %eax,%eax return 0; } 10b728: c9 leave 10b729: c3 ret 10b72a: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10b72c: b8 16 00 00 00 mov $0x16,%eax } 10b731: c9 leave 10b732: c3 ret 0010b758 : */ int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { 10b758: 55 push %ebp 10b759: 89 e5 mov %esp,%ebp 10b75b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10b75e: 85 c0 test %eax,%eax 10b760: 74 12 je 10b774 return EINVAL; attr->is_initialized = true; 10b762: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10b768: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10b76f: 31 c0 xor %eax,%eax return 0; } 10b771: c9 leave 10b772: c3 ret 10b773: 90 nop <== NOT EXECUTED int pthread_barrierattr_init( pthread_barrierattr_t *attr ) { if ( !attr ) 10b774: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10b776: c9 leave 10b777: c3 ret 0010b778 : int pthread_barrierattr_setpshared( pthread_barrierattr_t *attr, int pshared ) { 10b778: 55 push %ebp 10b779: 89 e5 mov %esp,%ebp 10b77b: 8b 45 08 mov 0x8(%ebp),%eax 10b77e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b781: 85 c0 test %eax,%eax 10b783: 74 0b je 10b790 return EINVAL; if ( !attr->is_initialized ) 10b785: 8b 08 mov (%eax),%ecx 10b787: 85 c9 test %ecx,%ecx 10b789: 74 05 je 10b790 return EINVAL; switch ( pshared ) { 10b78b: 83 fa 01 cmp $0x1,%edx 10b78e: 76 08 jbe 10b798 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10b790: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b795: c9 leave 10b796: c3 ret 10b797: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10b798: 89 50 04 mov %edx,0x4(%eax) 10b79b: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b79d: c9 leave 10b79e: c3 ret 0010aff0 : */ int pthread_cancel( pthread_t thread ) { 10aff0: 55 push %ebp 10aff1: 89 e5 mov %esp,%ebp 10aff3: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10aff6: a1 54 89 12 00 mov 0x128954,%eax 10affb: 85 c0 test %eax,%eax 10affd: 74 09 je 10b008 10afff: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b004: c9 leave 10b005: c3 ret 10b006: 66 90 xchg %ax,%ax <== NOT EXECUTED RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b008: 51 push %ecx 10b009: 8d 45 f4 lea -0xc(%ebp),%eax 10b00c: 50 push %eax 10b00d: ff 75 08 pushl 0x8(%ebp) 10b010: 68 80 8b 12 00 push $0x128b80 10b015: e8 72 20 00 00 call 10d08c <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b01a: 83 c4 10 add $0x10,%esp 10b01d: 8b 55 f4 mov -0xc(%ebp),%edx 10b020: 85 d2 test %edx,%edx 10b022: 75 20 jne 10b044 case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b024: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b02a: c7 82 d4 00 00 00 01 movl $0x1,0xd4(%edx) 10b031: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b034: 83 ec 0c sub $0xc,%esp 10b037: 50 push %eax 10b038: e8 27 51 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b03d: 31 c0 xor %eax,%eax return 0; 10b03f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b042: c9 leave 10b043: c3 ret if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b044: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b049: c9 leave 10b04a: c3 ret 0010ae60 : */ void pthread_cleanup_pop( int execute ) { 10ae60: 55 push %ebp 10ae61: 89 e5 mov %esp,%ebp 10ae63: 57 push %edi 10ae64: 56 push %esi 10ae65: 53 push %ebx 10ae66: 83 ec 1c sub $0x1c,%esp 10ae69: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10ae6c: a1 98 74 12 00 mov 0x127498,%eax 10ae71: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ae77: 8b 15 d8 73 12 00 mov 0x1273d8,%edx 10ae7d: 42 inc %edx 10ae7e: 89 15 d8 73 12 00 mov %edx,0x1273d8 * ensure that we do not get prempted and deleted while we are holding * memory that needs to be freed. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10ae84: 9c pushf 10ae85: fa cli 10ae86: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ae87: 8d 90 dc 00 00 00 lea 0xdc(%eax),%edx POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10ae8d: 39 90 d8 00 00 00 cmp %edx,0xd8(%eax) 10ae93: 74 4f je 10aee4 _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10ae95: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ae98: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10ae9a: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10ae9d: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10aea0: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10aea2: 56 push %esi 10aea3: 9d popf tmp_handler = *handler; 10aea4: 8d 7d d8 lea -0x28(%ebp),%edi 10aea7: b9 04 00 00 00 mov $0x4,%ecx 10aeac: 89 c6 mov %eax,%esi 10aeae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10aeb0: 8b 75 e0 mov -0x20(%ebp),%esi 10aeb3: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 10aeb6: 83 ec 0c sub $0xc,%esp 10aeb9: 50 push %eax 10aeba: e8 5d 38 00 00 call 10e71c <_Workspace_Free> _Thread_Enable_dispatch(); 10aebf: e8 b4 26 00 00 call 10d578 <_Thread_Enable_dispatch> if ( execute ) 10aec4: 83 c4 10 add $0x10,%esp 10aec7: 85 db test %ebx,%ebx 10aec9: 75 09 jne 10aed4 (*tmp_handler.routine)( tmp_handler.arg ); } 10aecb: 8d 65 f4 lea -0xc(%ebp),%esp 10aece: 5b pop %ebx 10aecf: 5e pop %esi 10aed0: 5f pop %edi 10aed1: c9 leave 10aed2: c3 ret 10aed3: 90 nop <== NOT EXECUTED _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aed4: 89 7d 08 mov %edi,0x8(%ebp) 10aed7: 89 f0 mov %esi,%eax } 10aed9: 8d 65 f4 lea -0xc(%ebp),%esp 10aedc: 5b pop %ebx 10aedd: 5e pop %esi 10aede: 5f pop %edi 10aedf: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10aee0: ff e0 jmp *%eax 10aee2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10aee4: e8 8f 26 00 00 call 10d578 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10aee9: 56 push %esi 10aeea: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10aeeb: 8d 65 f4 lea -0xc(%ebp),%esp 10aeee: 5b pop %ebx 10aeef: 5e pop %esi 10aef0: 5f pop %edi 10aef1: c9 leave 10aef2: c3 ret 0010b1fc : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b1fc: 55 push %ebp 10b1fd: 89 e5 mov %esp,%ebp 10b1ff: 56 push %esi 10b200: 53 push %ebx 10b201: 8b 5d 08 mov 0x8(%ebp),%ebx 10b204: 8b 75 0c mov 0xc(%ebp),%esi /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 10b207: 85 db test %ebx,%ebx 10b209: 74 4d je 10b258 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b20b: a1 18 90 12 00 mov 0x129018,%eax 10b210: 40 inc %eax 10b211: a3 18 90 12 00 mov %eax,0x129018 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b216: 83 ec 0c sub $0xc,%esp 10b219: 6a 10 push $0x10 10b21b: e8 dc 3f 00 00 call 10f1fc <_Workspace_Allocate> if ( handler ) { 10b220: 83 c4 10 add $0x10,%esp 10b223: 85 c0 test %eax,%eax 10b225: 74 25 je 10b24c <== ALWAYS TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b227: 8b 15 d8 90 12 00 mov 0x1290d8,%edx 10b22d: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b233: 81 c2 d8 00 00 00 add $0xd8,%edx handler->routine = routine; 10b239: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b23c: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b23f: 83 ec 08 sub $0x8,%esp 10b242: 50 push %eax 10b243: 52 push %edx 10b244: e8 5f 17 00 00 call 10c9a8 <_Chain_Append> 10b249: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b24c: 8d 65 f8 lea -0x8(%ebp),%esp 10b24f: 5b pop %ebx 10b250: 5e pop %esi 10b251: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b252: e9 8d 2d 00 00 jmp 10dfe4 <_Thread_Enable_dispatch> 10b257: 90 nop <== NOT EXECUTED } 10b258: 8d 65 f8 lea -0x8(%ebp),%esp 10b25b: 5b pop %ebx 10b25c: 5e pop %esi 10b25d: c9 leave 10b25e: c3 ret 0010bf08 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10bf08: 55 push %ebp 10bf09: 89 e5 mov %esp,%ebp 10bf0b: 53 push %ebx 10bf0c: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10bf0f: 8d 45 f4 lea -0xc(%ebp),%eax 10bf12: 50 push %eax 10bf13: ff 75 08 pushl 0x8(%ebp) 10bf16: e8 65 00 00 00 call 10bf80 <_POSIX_Condition_variables_Get> <== ALWAYS TAKEN 10bf1b: 89 c3 mov %eax,%ebx switch ( location ) { 10bf1d: 83 c4 10 add $0x10,%esp 10bf20: 8b 4d f4 mov -0xc(%ebp),%ecx 10bf23: 85 c9 test %ecx,%ecx 10bf25: 75 25 jne 10bf4c case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10bf27: 83 ec 0c sub $0xc,%esp 10bf2a: 8d 40 18 lea 0x18(%eax),%eax 10bf2d: 50 push %eax 10bf2e: e8 01 3b 00 00 call 10fa34 <_Thread_queue_First> 10bf33: 83 c4 10 add $0x10,%esp 10bf36: 85 c0 test %eax,%eax 10bf38: 74 1e je 10bf58 _Thread_Enable_dispatch(); 10bf3a: e8 b1 33 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10bf3f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf44: 8b 5d fc mov -0x4(%ebp),%ebx 10bf47: c9 leave 10bf48: c3 ret 10bf49: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 10bf4c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10bf51: 8b 5d fc mov -0x4(%ebp),%ebx 10bf54: c9 leave 10bf55: c3 ret 10bf56: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10bf58: 83 ec 08 sub $0x8,%esp 10bf5b: 53 push %ebx 10bf5c: 68 e0 a1 12 00 push $0x12a1e0 10bf61: e8 e2 26 00 00 call 10e648 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10bf66: 58 pop %eax 10bf67: 5a pop %edx 10bf68: 53 push %ebx 10bf69: 68 e0 a1 12 00 push $0x12a1e0 10bf6e: e8 d9 29 00 00 call 10e94c <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10bf73: e8 78 33 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10bf78: 31 c0 xor %eax,%eax return 0; 10bf7a: 83 c4 10 add $0x10,%esp 10bf7d: eb d2 jmp 10bf51 <== ALWAYS TAKEN 0010bfd4 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10bfd4: 55 push %ebp 10bfd5: 89 e5 mov %esp,%ebp 10bfd7: 53 push %ebx 10bfd8: 83 ec 14 sub $0x14,%esp 10bfdb: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10bfde: 85 db test %ebx,%ebx 10bfe0: 0f 84 86 00 00 00 je 10c06c /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10bfe6: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10bfea: 74 06 je 10bff2 <== ALWAYS TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10bfec: 8b 03 mov (%ebx),%eax 10bfee: 85 c0 test %eax,%eax 10bff0: 75 0a jne 10bffc *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10bff2: b8 16 00 00 00 mov $0x16,%eax } 10bff7: 8b 5d fc mov -0x4(%ebp),%ebx 10bffa: c9 leave 10bffb: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bffc: a1 f8 9c 12 00 mov 0x129cf8,%eax 10c001: 40 inc %eax 10c002: a3 f8 9c 12 00 mov %eax,0x129cf8 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10c007: 83 ec 0c sub $0xc,%esp 10c00a: 68 e0 a1 12 00 push $0x12a1e0 10c00f: e8 b8 25 00 00 call 10e5cc <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c014: 83 c4 10 add $0x10,%esp 10c017: 85 c0 test %eax,%eax 10c019: 74 5d je 10c078 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c01b: 8b 53 04 mov 0x4(%ebx),%edx 10c01e: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c021: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c028: 6a 74 push $0x74 10c02a: 68 00 08 00 00 push $0x800 10c02f: 6a 00 push $0x0 10c031: 8d 50 18 lea 0x18(%eax),%edx 10c034: 52 push %edx 10c035: 89 45 f4 mov %eax,-0xc(%ebp) 10c038: e8 77 3a 00 00 call 10fab4 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c03d: 8b 45 f4 mov -0xc(%ebp),%eax 10c040: 8b 50 08 mov 0x8(%eax),%edx 10c043: 0f b7 da movzwl %dx,%ebx 10c046: 8b 0d fc a1 12 00 mov 0x12a1fc,%ecx 10c04c: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10c04f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c056: 8b 45 08 mov 0x8(%ebp),%eax 10c059: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c05b: e8 90 32 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c060: 31 c0 xor %eax,%eax return 0; 10c062: 83 c4 10 add $0x10,%esp } 10c065: 8b 5d fc mov -0x4(%ebp),%ebx 10c068: c9 leave 10c069: c3 ret 10c06a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c06c: bb c4 33 12 00 mov $0x1233c4,%ebx 10c071: e9 70 ff ff ff jmp 10bfe6 <== ALWAYS TAKEN 10c076: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c078: e8 73 32 00 00 call 10f2f0 <_Thread_Enable_dispatch> 10c07d: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10c082: e9 70 ff ff ff jmp 10bff7 <== ALWAYS TAKEN 0010c088 : */ int pthread_cond_signal( pthread_cond_t *cond ) { 10c088: 55 push %ebp 10c089: 89 e5 mov %esp,%ebp 10c08b: 83 ec 10 sub $0x10,%esp return _POSIX_Condition_variables_Signal_support( cond, false ); 10c08e: 6a 00 push $0x0 10c090: ff 75 08 pushl 0x8(%ebp) 10c093: e8 04 00 00 00 call 10c09c <_POSIX_Condition_variables_Signal_support> <== ALWAYS TAKEN } 10c098: c9 leave 10c099: c3 ret 0010c10c : int pthread_cond_timedwait( pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime ) { 10c10c: 55 push %ebp 10c10d: 89 e5 mov %esp,%ebp 10c10f: 83 ec 20 sub $0x20,%esp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 10c112: 8d 45 f4 lea -0xc(%ebp),%eax 10c115: 50 push %eax 10c116: ff 75 10 pushl 0x10(%ebp) 10c119: e8 8a 04 00 00 call 10c5a8 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN 10c11e: 83 c4 10 add $0x10,%esp 10c121: 85 c0 test %eax,%eax 10c123: 75 07 jne 10c12c 10c125: b8 16 00 00 00 mov $0x16,%eax cond, mutex, ticks, already_timedout ); } 10c12a: c9 leave 10c12b: c3 ret * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) { 10c12c: 83 f8 02 cmp $0x2,%eax 10c12f: 0f 96 c0 setbe %al 10c132: 0f b6 c0 movzbl %al,%eax default: /* only to silence warnings */ already_timedout = false; break; } return _POSIX_Condition_variables_Wait_support( 10c135: 50 push %eax 10c136: ff 75 f4 pushl -0xc(%ebp) 10c139: ff 75 0c pushl 0xc(%ebp) 10c13c: ff 75 08 pushl 0x8(%ebp) 10c13f: e8 20 00 00 00 call 10c164 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN 10c144: 83 c4 10 add $0x10,%esp cond, mutex, ticks, already_timedout ); } 10c147: c9 leave 10c148: c3 ret 0010c14c : int pthread_cond_wait( pthread_cond_t *cond, pthread_mutex_t *mutex ) { 10c14c: 55 push %ebp 10c14d: 89 e5 mov %esp,%ebp 10c14f: 83 ec 08 sub $0x8,%esp return _POSIX_Condition_variables_Wait_support( 10c152: 6a 00 push $0x0 10c154: 6a 00 push $0x0 10c156: ff 75 0c pushl 0xc(%ebp) 10c159: ff 75 08 pushl 0x8(%ebp) 10c15c: e8 03 00 00 00 call 10c164 <_POSIX_Condition_variables_Wait_support> <== ALWAYS TAKEN cond, mutex, THREAD_QUEUE_WAIT_FOREVER, false ); } 10c161: c9 leave 10c162: c3 ret 0010be6c : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10be6c: 55 push %ebp 10be6d: 89 e5 mov %esp,%ebp 10be6f: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10be72: 85 c0 test %eax,%eax 10be74: 74 12 je 10be88 10be76: 8b 10 mov (%eax),%edx 10be78: 85 d2 test %edx,%edx 10be7a: 74 0c je 10be88 <== ALWAYS TAKEN return EINVAL; attr->is_initialized = false; 10be7c: c7 00 00 00 00 00 movl $0x0,(%eax) 10be82: 31 c0 xor %eax,%eax return 0; } 10be84: c9 leave 10be85: c3 ret 10be86: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10be88: b8 16 00 00 00 mov $0x16,%eax } 10be8d: c9 leave 10be8e: c3 ret 0010be90 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10be90: 55 push %ebp 10be91: 89 e5 mov %esp,%ebp 10be93: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10be96: 85 c0 test %eax,%eax 10be98: 74 0e je 10bea8 return EINVAL; *pshared = attr->process_shared; 10be9a: 8b 50 04 mov 0x4(%eax),%edx 10be9d: 8b 45 0c mov 0xc(%ebp),%eax 10bea0: 89 10 mov %edx,(%eax) 10bea2: 31 c0 xor %eax,%eax return 0; } 10bea4: c9 leave 10bea5: c3 ret 10bea6: 66 90 xchg %ax,%ax <== NOT EXECUTED int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10bea8: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10beaa: c9 leave 10beab: c3 ret 0010beac : */ int pthread_condattr_init( pthread_condattr_t *attr ) { 10beac: 55 push %ebp 10bead: 89 e5 mov %esp,%ebp 10beaf: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10beb2: 85 c0 test %eax,%eax 10beb4: 74 16 je 10becc return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; 10beb6: 8b 15 c4 33 12 00 mov 0x1233c4,%edx 10bebc: 8b 0d c8 33 12 00 mov 0x1233c8,%ecx 10bec2: 89 10 mov %edx,(%eax) 10bec4: 89 48 04 mov %ecx,0x4(%eax) 10bec7: 31 c0 xor %eax,%eax return 0; } 10bec9: c9 leave 10beca: c3 ret 10becb: 90 nop <== NOT EXECUTED int pthread_condattr_init( pthread_condattr_t *attr ) { if ( !attr ) 10becc: b0 16 mov $0x16,%al return EINVAL; *attr = _POSIX_Condition_variables_Default_attributes; return 0; } 10bece: c9 leave 10becf: c3 ret 0010bed0 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10bed0: 55 push %ebp 10bed1: 89 e5 mov %esp,%ebp 10bed3: 8b 45 08 mov 0x8(%ebp),%eax 10bed6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10bed9: 85 c0 test %eax,%eax 10bedb: 74 05 je 10bee2 return EINVAL; switch ( pshared ) { 10bedd: 83 fa 01 cmp $0x1,%edx 10bee0: 76 0a jbe 10beec case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10bee2: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10bee7: c9 leave 10bee8: c3 ret 10bee9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10beec: 89 50 04 mov %edx,0x4(%eax) 10beef: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10bef1: c9 leave 10bef2: c3 ret 0010b584 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10b584: 55 push %ebp 10b585: 89 e5 mov %esp,%ebp 10b587: 57 push %edi 10b588: 56 push %esi 10b589: 53 push %ebx 10b58a: 83 ec 4c sub $0x4c,%esp 10b58d: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b590: 8b 7d 10 mov 0x10(%ebp),%edi 10b593: 85 ff test %edi,%edi 10b595: 0f 84 79 01 00 00 je 10b714 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b59b: 85 db test %ebx,%ebx 10b59d: 74 65 je 10b604 if ( !the_attr->is_initialized ) 10b59f: 8b 33 mov (%ebx),%esi 10b5a1: 85 f6 test %esi,%esi 10b5a3: 74 1f je 10b5c4 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 10b5a5: 8b 4b 04 mov 0x4(%ebx),%ecx 10b5a8: 85 c9 test %ecx,%ecx 10b5aa: 74 0b je 10b5b7 10b5ac: 8b 43 08 mov 0x8(%ebx),%eax 10b5af: 3b 05 58 45 12 00 cmp 0x124558,%eax 10b5b5: 72 0d jb 10b5c4 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 10b5b7: 8b 43 10 mov 0x10(%ebx),%eax 10b5ba: 83 f8 01 cmp $0x1,%eax 10b5bd: 74 4d je 10b60c 10b5bf: 83 f8 02 cmp $0x2,%eax 10b5c2: 74 10 je 10b5d4 * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10b5c4: ba 16 00 00 00 mov $0x16,%edx } 10b5c9: 89 d0 mov %edx,%eax 10b5cb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5ce: 5b pop %ebx 10b5cf: 5e pop %esi 10b5d0: 5f pop %edi 10b5d1: c9 leave 10b5d2: c3 ret 10b5d3: 90 nop <== NOT EXECUTED schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10b5d4: 8b 43 14 mov 0x14(%ebx),%eax 10b5d7: 89 45 c0 mov %eax,-0x40(%ebp) schedparam = the_attr->schedparam; 10b5da: 8d 4d c8 lea -0x38(%ebp),%ecx 10b5dd: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b5e0: 8d 73 18 lea 0x18(%ebx),%esi 10b5e3: b9 06 00 00 00 mov $0x6,%ecx 10b5e8: 8b 7d c4 mov -0x3c(%ebp),%edi 10b5eb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10b5ed: 8b 53 0c mov 0xc(%ebx),%edx 10b5f0: 85 d2 test %edx,%edx 10b5f2: 74 43 je 10b637 <== NEVER TAKEN 10b5f4: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10b5f9: 89 d0 mov %edx,%eax 10b5fb: 8d 65 f4 lea -0xc(%ebp),%esp 10b5fe: 5b pop %ebx 10b5ff: 5e pop %esi 10b600: 5f pop %edi 10b601: c9 leave 10b602: c3 ret 10b603: 90 nop <== NOT EXECUTED int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10b604: bb 00 1e 12 00 mov $0x121e00,%ebx 10b609: eb 94 jmp 10b59f <== ALWAYS TAKEN 10b60b: 90 nop <== NOT EXECUTED * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b60c: a1 b8 87 12 00 mov 0x1287b8,%eax 10b611: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10b617: 8b 46 7c mov 0x7c(%esi),%eax 10b61a: 89 45 c0 mov %eax,-0x40(%ebp) schedparam = api->schedparam; 10b61d: 8d 4d c8 lea -0x38(%ebp),%ecx 10b620: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b623: 83 ee 80 sub $0xffffff80,%esi 10b626: b9 06 00 00 00 mov $0x6,%ecx 10b62b: 8b 7d c4 mov -0x3c(%ebp),%edi 10b62e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10b630: 8b 53 0c mov 0xc(%ebx),%edx 10b633: 85 d2 test %edx,%edx 10b635: 75 bd jne 10b5f4 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10b637: 83 ec 0c sub $0xc,%esp 10b63a: ff 75 c8 pushl -0x38(%ebp) 10b63d: e8 92 5b 00 00 call 1111d4 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10b642: 83 c4 10 add $0x10,%esp 10b645: 84 c0 test %al,%al 10b647: 0f 84 77 ff ff ff je 10b5c4 <== ALWAYS TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10b64d: 8b 7d c8 mov -0x38(%ebp),%edi RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10b650: 0f b6 35 5c 45 12 00 movzbl 0x12455c,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10b657: 8d 45 e0 lea -0x20(%ebp),%eax 10b65a: 50 push %eax 10b65b: 8d 45 e4 lea -0x1c(%ebp),%eax 10b65e: 50 push %eax 10b65f: ff 75 c4 pushl -0x3c(%ebp) 10b662: ff 75 c0 pushl -0x40(%ebp) 10b665: e8 86 5b 00 00 call 1111f0 <_POSIX_Thread_Translate_sched_param> <== ALWAYS TAKEN 10b66a: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10b66c: 83 c4 10 add $0x10,%esp 10b66f: 85 c0 test %eax,%eax 10b671: 0f 85 52 ff ff ff jne 10b5c9 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10b677: 83 ec 0c sub $0xc,%esp 10b67a: ff 35 b0 87 12 00 pushl 0x1287b0 10b680: 89 45 b4 mov %eax,-0x4c(%ebp) 10b683: e8 20 17 00 00 call 10cda8 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10b688: c7 04 24 c0 89 12 00 movl $0x1289c0,(%esp) 10b68f: e8 a4 20 00 00 call 10d738 <_Objects_Allocate> 10b694: 89 45 bc mov %eax,-0x44(%ebp) * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10b697: 83 c4 10 add $0x10,%esp 10b69a: 85 c0 test %eax,%eax 10b69c: 8b 55 b4 mov -0x4c(%ebp),%edx 10b69f: 0f 84 fe 00 00 00 je 10b7a3 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10b6a5: 8b 4b 08 mov 0x8(%ebx),%ecx 10b6a8: 50 push %eax 10b6a9: 6a 00 push $0x0 10b6ab: 6a 00 push $0x0 10b6ad: ff 75 e0 pushl -0x20(%ebp) 10b6b0: ff 75 e4 pushl -0x1c(%ebp) 10b6b3: 6a 01 push $0x1 10b6b5: 81 e6 ff 00 00 00 and $0xff,%esi 10b6bb: 29 fe sub %edi,%esi 10b6bd: 56 push %esi 10b6be: 6a 01 push $0x1 10b6c0: a1 58 45 12 00 mov 0x124558,%eax 10b6c5: d1 e0 shl %eax 10b6c7: 39 c8 cmp %ecx,%eax 10b6c9: 73 02 jae 10b6cd 10b6cb: 89 c8 mov %ecx,%eax 10b6cd: 50 push %eax 10b6ce: ff 73 04 pushl 0x4(%ebx) 10b6d1: ff 75 bc pushl -0x44(%ebp) 10b6d4: 68 c0 89 12 00 push $0x1289c0 10b6d9: 89 55 b4 mov %edx,-0x4c(%ebp) 10b6dc: e8 43 2e 00 00 call 10e524 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10b6e1: 83 c4 30 add $0x30,%esp 10b6e4: 84 c0 test %al,%al 10b6e6: 8b 55 b4 mov -0x4c(%ebp),%edx 10b6e9: 75 33 jne 10b71e RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10b6eb: 83 ec 08 sub $0x8,%esp 10b6ee: ff 75 bc pushl -0x44(%ebp) 10b6f1: 68 c0 89 12 00 push $0x1289c0 10b6f6: e8 bd 23 00 00 call 10dab8 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b6fb: 59 pop %ecx 10b6fc: ff 35 b0 87 12 00 pushl 0x1287b0 10b702: e8 e9 16 00 00 call 10cdf0 <_API_Mutex_Unlock> 10b707: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b70c: 83 c4 10 add $0x10,%esp 10b70f: e9 b5 fe ff ff jmp 10b5c9 <== ALWAYS TAKEN int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10b714: ba 0e 00 00 00 mov $0xe,%edx 10b719: e9 ab fe ff ff jmp 10b5c9 <== ALWAYS TAKEN } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10b71e: 8b 45 bc mov -0x44(%ebp),%eax 10b721: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b727: 89 45 b8 mov %eax,-0x48(%ebp) api->Attributes = *the_attr; 10b72a: b9 0e 00 00 00 mov $0xe,%ecx 10b72f: 89 c7 mov %eax,%edi 10b731: 89 de mov %ebx,%esi 10b733: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10b735: 8b 43 34 mov 0x34(%ebx),%eax 10b738: 8b 4d b8 mov -0x48(%ebp),%ecx 10b73b: 89 41 38 mov %eax,0x38(%ecx) api->schedpolicy = schedpolicy; 10b73e: 8b 45 c0 mov -0x40(%ebp),%eax 10b741: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = schedparam; 10b744: 89 cf mov %ecx,%edi 10b746: 83 ef 80 sub $0xffffff80,%edi 10b749: b9 06 00 00 00 mov $0x6,%ecx 10b74e: 8b 75 c4 mov -0x3c(%ebp),%esi 10b751: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10b753: 8b 4d bc mov -0x44(%ebp),%ecx 10b756: c6 41 74 01 movb $0x1,0x74(%ecx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10b75a: 83 ec 0c sub $0xc,%esp 10b75d: 6a 00 push $0x0 10b75f: ff 75 14 pushl 0x14(%ebp) 10b762: ff 75 10 pushl 0x10(%ebp) 10b765: 6a 01 push $0x1 10b767: 51 push %ecx 10b768: 89 55 b4 mov %edx,-0x4c(%ebp) 10b76b: e8 28 38 00 00 call 10ef98 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10b770: 83 c4 20 add $0x20,%esp 10b773: 83 7d c0 03 cmpl $0x3,-0x40(%ebp) 10b777: 8b 55 b4 mov -0x4c(%ebp),%edx 10b77a: 74 42 je 10b7be } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10b77c: 8b 45 bc mov -0x44(%ebp),%eax 10b77f: 8b 48 08 mov 0x8(%eax),%ecx 10b782: 8b 45 08 mov 0x8(%ebp),%eax 10b785: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10b787: 83 ec 0c sub $0xc,%esp 10b78a: ff 35 b0 87 12 00 pushl 0x1287b0 10b790: 89 55 b4 mov %edx,-0x4c(%ebp) 10b793: e8 58 16 00 00 call 10cdf0 <_API_Mutex_Unlock> return 0; 10b798: 83 c4 10 add $0x10,%esp 10b79b: 8b 55 b4 mov -0x4c(%ebp),%edx 10b79e: e9 26 fe ff ff jmp 10b5c9 <== ALWAYS TAKEN * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10b7a3: 83 ec 0c sub $0xc,%esp 10b7a6: ff 35 b0 87 12 00 pushl 0x1287b0 10b7ac: e8 3f 16 00 00 call 10cdf0 <_API_Mutex_Unlock> 10b7b1: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10b7b6: 83 c4 10 add $0x10,%esp 10b7b9: e9 0b fe ff ff jmp 10b5c9 <== ALWAYS TAKEN return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10b7be: 83 ec 0c sub $0xc,%esp 10b7c1: 8b 45 b8 mov -0x48(%ebp),%eax 10b7c4: 05 88 00 00 00 add $0x88,%eax 10b7c9: 50 push %eax 10b7ca: e8 b9 39 00 00 call 10f188 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b7cf: 8b 4d b8 mov -0x48(%ebp),%ecx 10b7d2: 89 81 a8 00 00 00 mov %eax,0xa8(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b7d8: 58 pop %eax 10b7d9: 5a pop %edx 10b7da: 89 c8 mov %ecx,%eax 10b7dc: 05 9c 00 00 00 add $0x9c,%eax 10b7e1: 50 push %eax 10b7e2: 68 d8 87 12 00 push $0x1287d8 10b7e7: e8 c0 3c 00 00 call 10f4ac <_Watchdog_Insert> 10b7ec: 83 c4 10 add $0x10,%esp 10b7ef: 8b 55 b4 mov -0x4c(%ebp),%edx 10b7f2: eb 88 jmp 10b77c <== ALWAYS TAKEN 0010b690 : #include int pthread_detach( pthread_t thread ) { 10b690: 55 push %ebp 10b691: 89 e5 mov %esp,%ebp 10b693: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b696: 8d 45 f4 lea -0xc(%ebp),%eax 10b699: 50 push %eax 10b69a: ff 75 08 pushl 0x8(%ebp) 10b69d: 68 a0 96 12 00 push $0x1296a0 10b6a2: e8 75 22 00 00 call 10d91c <_Objects_Get> register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b6a7: 83 c4 10 add $0x10,%esp 10b6aa: 8b 55 f4 mov -0xc(%ebp),%edx 10b6ad: 85 d2 test %edx,%edx 10b6af: 75 17 jne 10b6c8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 10b6b1: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b6b7: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) _Thread_Enable_dispatch(); 10b6be: e8 cd 2a 00 00 call 10e190 <_Thread_Enable_dispatch> 10b6c3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b6c5: c9 leave 10b6c6: c3 ret 10b6c7: 90 nop <== NOT EXECUTED register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b6c8: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 10b6cd: c9 leave 10b6ce: c3 ret 00112710 : } void pthread_exit( void *value_ptr ) { 112710: 55 push %ebp 112711: 89 e5 mov %esp,%ebp 112713: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 112716: ff 75 08 pushl 0x8(%ebp) 112719: ff 35 98 74 12 00 pushl 0x127498 11271f: e8 88 ff ff ff call 1126ac <_POSIX_Thread_Exit> <== ALWAYS TAKEN 112724: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 112727: c9 leave <== NOT EXECUTED 112728: c3 ret <== NOT EXECUTED 0010d7bc : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 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 7d 0c mov 0xc(%ebp),%edi 10d7c8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10d7cb: 85 ff test %edi,%edi 10d7cd: 74 65 je 10d834 10d7cf: 85 db test %ebx,%ebx 10d7d1: 74 61 je 10d834 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10d7d3: 51 push %ecx 10d7d4: 8d 45 e4 lea -0x1c(%ebp),%eax 10d7d7: 50 push %eax 10d7d8: ff 75 08 pushl 0x8(%ebp) 10d7db: 68 00 b7 12 00 push $0x12b700 10d7e0: e8 5f 23 00 00 call 10fb44 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d7e5: 83 c4 10 add $0x10,%esp 10d7e8: 8b 55 e4 mov -0x1c(%ebp),%edx 10d7eb: 85 d2 test %edx,%edx 10d7ed: 75 35 jne 10d824 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10d7ef: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10d7f5: 8b 56 7c mov 0x7c(%esi),%edx 10d7f8: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10d7fa: 83 ee 80 sub $0xffffff80,%esi 10d7fd: b9 06 00 00 00 mov $0x6,%ecx 10d802: 89 df mov %ebx,%edi 10d804: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10d806: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d80d: 2b 50 14 sub 0x14(%eax),%edx 10d810: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10d812: e8 a1 2b 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d817: 31 c0 xor %eax,%eax break; } return ESRCH; } 10d819: 8d 65 f4 lea -0xc(%ebp),%esp 10d81c: 5b pop %ebx 10d81d: 5e pop %esi 10d81e: 5f pop %edi 10d81f: c9 leave 10d820: c3 ret 10d821: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10d824: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10d829: 8d 65 f4 lea -0xc(%ebp),%esp 10d82c: 5b pop %ebx 10d82d: 5e pop %esi 10d82e: 5f pop %edi 10d82f: c9 leave 10d830: c3 ret 10d831: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 10d834: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10d839: 8d 65 f4 lea -0xc(%ebp),%esp 10d83c: 5b pop %ebx 10d83d: 5e pop %esi 10d83e: 5f pop %edi 10d83f: c9 leave 10d840: c3 ret 0010b57c : */ void *pthread_getspecific( pthread_key_t key ) { 10b57c: 55 push %ebp 10b57d: 89 e5 mov %esp,%ebp 10b57f: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 10b582: 8d 45 f4 lea -0xc(%ebp),%eax 10b585: 50 push %eax 10b586: ff 75 08 pushl 0x8(%ebp) 10b589: 68 20 99 12 00 push $0x129920 10b58e: e8 a9 24 00 00 call 10da3c <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b593: 83 c4 10 add $0x10,%esp 10b596: 8b 55 f4 mov -0xc(%ebp),%edx 10b599: 85 d2 test %edx,%edx 10b59b: 75 2b jne 10b5c8 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10b59d: 8b 15 38 95 12 00 mov 0x129538,%edx 10b5a3: 8b 4a 08 mov 0x8(%edx),%ecx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10b5a6: 89 ca mov %ecx,%edx 10b5a8: c1 ea 18 shr $0x18,%edx 10b5ab: 83 e2 07 and $0x7,%edx 10b5ae: 0f b7 c9 movzwl %cx,%ecx 10b5b1: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10b5b5: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10b5b8: 89 45 e4 mov %eax,-0x1c(%ebp) 10b5bb: e8 f0 2c 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b5c0: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10b5c3: c9 leave 10b5c4: c3 ret 10b5c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10b5c8: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return NULL; } 10b5ca: c9 leave 10b5cb: c3 ret 00110260 : int pthread_join( pthread_t thread, void **value_ptr ) { 110260: 55 push %ebp 110261: 89 e5 mov %esp,%ebp 110263: 53 push %ebx 110264: 83 ec 18 sub $0x18,%esp 110267: 8b 5d 0c mov 0xc(%ebp),%ebx 11026a: 8d 45 f4 lea -0xc(%ebp),%eax 11026d: 50 push %eax 11026e: ff 75 08 pushl 0x8(%ebp) 110271: 68 20 0a 13 00 push $0x130a20 110276: e8 05 23 00 00 call 112580 <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 11027b: 83 c4 10 add $0x10,%esp 11027e: 8b 55 f4 mov -0xc(%ebp),%edx 110281: 85 d2 test %edx,%edx 110283: 74 0b je 110290 110285: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 11028a: 8b 5d fc mov -0x4(%ebp),%ebx 11028d: c9 leave 11028e: c3 ret 11028f: 90 nop <== NOT EXECUTED the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110290: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110296: 8b 4a 38 mov 0x38(%edx),%ecx 110299: 85 c9 test %ecx,%ecx 11029b: 74 43 je 1102e0 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 11029d: 8b 0d 18 08 13 00 mov 0x130818,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 1102a3: 39 c8 cmp %ecx,%eax 1102a5: 74 49 je 1102f0 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 1102a7: 8d 45 f0 lea -0x10(%ebp),%eax 1102aa: 89 41 28 mov %eax,0x28(%ecx) 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; 1102ad: c7 42 6c 01 00 00 00 movl $0x1,0x6c(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 1102b4: 50 push %eax 1102b5: 68 14 36 11 00 push $0x113614 1102ba: 6a 00 push $0x0 1102bc: 83 c2 3c add $0x3c,%edx 1102bf: 52 push %edx 1102c0: e8 3f 30 00 00 call 113304 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 1102c5: e8 2a 2b 00 00 call 112df4 <_Thread_Enable_dispatch> if ( value_ptr ) 1102ca: 83 c4 10 add $0x10,%esp 1102cd: 85 db test %ebx,%ebx 1102cf: 74 05 je 1102d6 *value_ptr = return_pointer; 1102d1: 8b 45 f0 mov -0x10(%ebp),%eax 1102d4: 89 03 mov %eax,(%ebx) 1102d6: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1102d8: 8b 5d fc mov -0x4(%ebp),%ebx 1102db: c9 leave 1102dc: c3 ret 1102dd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); 1102e0: e8 0f 2b 00 00 call 112df4 <_Thread_Enable_dispatch> 1102e5: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 1102ea: 8b 5d fc mov -0x4(%ebp),%ebx 1102ed: c9 leave 1102ee: c3 ret 1102ef: 90 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 1102f0: e8 ff 2a 00 00 call 112df4 <_Thread_Enable_dispatch> 1102f5: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 1102fa: eb 8e jmp 11028a <== ALWAYS TAKEN 0010b400 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 10b400: 55 push %ebp 10b401: 89 e5 mov %esp,%ebp 10b403: 57 push %edi 10b404: 56 push %esi 10b405: 53 push %ebx 10b406: 83 ec 28 sub $0x28,%esp 10b409: a1 78 94 12 00 mov 0x129478,%eax 10b40e: 40 inc %eax 10b40f: a3 78 94 12 00 mov %eax,0x129478 * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 10b414: 68 20 99 12 00 push $0x129920 10b419: e8 6e 21 00 00 call 10d58c <_Objects_Allocate> 10b41e: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10b420: 83 c4 10 add $0x10,%esp 10b423: 85 c0 test %eax,%eax 10b425: 0f 84 81 00 00 00 je 10b4ac _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10b42b: 8b 45 0c mov 0xc(%ebp),%eax 10b42e: 89 46 10 mov %eax,0x10(%esi) 10b431: bb 01 00 00 00 mov $0x1,%ebx for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10b436: 8b 04 9d 4c 94 12 00 mov 0x12944c(,%ebx,4),%eax 10b43d: 85 c0 test %eax,%eax 10b43f: 74 5f je 10b4a0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10b441: 8b 40 04 mov 0x4(%eax),%eax 10b444: 0f b7 40 10 movzwl 0x10(%eax),%eax 10b448: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 10b44f: 83 ec 0c sub $0xc,%esp 10b452: 51 push %ecx 10b453: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b456: e8 e5 40 00 00 call 10f540 <_Workspace_Allocate> if ( !table ) { 10b45b: 83 c4 10 add $0x10,%esp 10b45e: 85 c0 test %eax,%eax 10b460: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b463: 74 5b je 10b4c0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10b465: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10b469: 89 c7 mov %eax,%edi 10b46b: 31 c0 xor %eax,%eax 10b46d: f3 aa rep stos %al,%es:(%edi) * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10b46f: 43 inc %ebx * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 10b470: 83 fb 05 cmp $0x5,%ebx 10b473: 75 c1 jne 10b436 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b475: 8b 46 08 mov 0x8(%esi),%eax 10b478: 0f b7 c8 movzwl %ax,%ecx 10b47b: 8b 15 3c 99 12 00 mov 0x12993c,%edx 10b481: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b484: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10b48b: 8b 55 08 mov 0x8(%ebp),%edx 10b48e: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10b490: e8 1b 2e 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b495: 31 c0 xor %eax,%eax return 0; } 10b497: 8d 65 f4 lea -0xc(%ebp),%esp 10b49a: 5b pop %ebx 10b49b: 5e pop %esi 10b49c: 5f pop %edi 10b49d: c9 leave 10b49e: c3 ret 10b49f: 90 nop <== NOT EXECUTED } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10b4a0: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10b4a7: 00 10b4a8: eb c5 jmp 10b46f <== ALWAYS TAKEN 10b4aa: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10b4ac: e8 ff 2d 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b4b1: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10b4b6: 8d 65 f4 lea -0xc(%ebp),%esp 10b4b9: 5b pop %ebx 10b4ba: 5e pop %esi 10b4bb: 5f pop %edi 10b4bc: c9 leave 10b4bd: c3 ret 10b4be: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10b4c0: 89 df mov %ebx,%edi 10b4c2: 4f dec %edi 10b4c3: 74 1a je 10b4df 10b4c5: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx 10b4c9: 8d 76 00 lea 0x0(%esi),%esi the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10b4cc: 83 ec 0c sub $0xc,%esp 10b4cf: ff 33 pushl (%ebx) 10b4d1: e8 86 40 00 00 call 10f55c <_Workspace_Free> (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 10b4d6: 83 eb 04 sub $0x4,%ebx #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10b4d9: 83 c4 10 add $0x10,%esp 10b4dc: 4f dec %edi 10b4dd: 75 ed jne 10b4cc */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10b4df: 83 ec 08 sub $0x8,%esp 10b4e2: 56 push %esi 10b4e3: 68 20 99 12 00 push $0x129920 10b4e8: e8 1f 24 00 00 call 10d90c <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10b4ed: e8 be 2d 00 00 call 10e2b0 <_Thread_Enable_dispatch> 10b4f2: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10b4f7: 83 c4 10 add $0x10,%esp 10b4fa: eb 9b jmp 10b497 <== ALWAYS TAKEN 001136b8 : int pthread_kill( pthread_t thread, int sig ) { 1136b8: 55 push %ebp 1136b9: 89 e5 mov %esp,%ebp 1136bb: 57 push %edi 1136bc: 56 push %esi 1136bd: 53 push %ebx 1136be: 83 ec 1c sub $0x1c,%esp 1136c1: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 1136c4: 85 db test %ebx,%ebx 1136c6: 0f 84 8c 00 00 00 je 113758 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 1136cc: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 1136cf: 83 ff 1f cmp $0x1f,%edi 1136d2: 0f 87 80 00 00 00 ja 113758 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 1136d8: 51 push %ecx 1136d9: 8d 45 e4 lea -0x1c(%ebp),%eax 1136dc: 50 push %eax 1136dd: ff 75 08 pushl 0x8(%ebp) 1136e0: 68 a0 76 12 00 push $0x1276a0 1136e5: e8 56 95 ff ff call 10cc40 <_Objects_Get> 1136ea: 89 c6 mov %eax,%esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 1136ec: 83 c4 10 add $0x10,%esp 1136ef: 8b 55 e4 mov -0x1c(%ebp),%edx 1136f2: 85 d2 test %edx,%edx 1136f4: 75 76 jne 11376c case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1136f6: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 1136fc: 8d 04 5b lea (%ebx,%ebx,2),%eax 1136ff: 83 3c 85 c8 79 12 00 cmpl $0x1,0x1279c8(,%eax,4) 113706: 01 113707: 74 31 je 11373a return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 113709: b8 01 00 00 00 mov $0x1,%eax 11370e: 89 f9 mov %edi,%ecx 113710: d3 e0 shl %cl,%eax 113712: 09 82 c8 00 00 00 or %eax,0xc8(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 113718: 50 push %eax 113719: 6a 00 push $0x0 11371b: 53 push %ebx 11371c: 56 push %esi 11371d: e8 7a fe ff ff call 11359c <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 113722: c6 46 74 01 movb $0x1,0x74(%esi) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 113726: a1 74 74 12 00 mov 0x127474,%eax 11372b: 83 c4 10 add $0x10,%esp 11372e: 85 c0 test %eax,%eax 113730: 74 08 je 11373a 113732: 3b 35 98 74 12 00 cmp 0x127498,%esi 113738: 74 12 je 11374c _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 11373a: e8 75 9d ff ff call 10d4b4 <_Thread_Enable_dispatch> 11373f: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 113741: 8d 65 f4 lea -0xc(%ebp),%esp 113744: 5b pop %ebx 113745: 5e pop %esi 113746: 5f pop %edi 113747: c9 leave 113748: c3 ret 113749: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 11374c: c6 05 48 75 12 00 01 movb $0x1,0x127548 113753: eb e5 jmp 11373a <== ALWAYS TAKEN 113755: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 113758: e8 b3 00 00 00 call 113810 <__errno> 11375d: c7 00 16 00 00 00 movl $0x16,(%eax) 113763: b8 ff ff ff ff mov $0xffffffff,%eax 113768: eb d7 jmp 113741 <== ALWAYS TAKEN 11376a: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 11376c: e8 9f 00 00 00 call 113810 <__errno> 113771: c7 00 03 00 00 00 movl $0x3,(%eax) 113777: b8 ff ff ff ff mov $0xffffffff,%eax 11377c: eb c3 jmp 113741 <== ALWAYS TAKEN 0010cfac : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 10cfac: 55 push %ebp 10cfad: 89 e5 mov %esp,%ebp 10cfaf: 83 ec 30 sub $0x30,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10cfb2: 8d 45 f4 lea -0xc(%ebp),%eax 10cfb5: 50 push %eax 10cfb6: ff 75 08 pushl 0x8(%ebp) 10cfb9: e8 ba 00 00 00 call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10cfbe: 83 c4 10 add $0x10,%esp 10cfc1: 8b 55 f4 mov -0xc(%ebp),%edx 10cfc4: 85 d2 test %edx,%edx 10cfc6: 74 08 je 10cfd0 10cfc8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10cfcd: c9 leave 10cfce: c3 ret 10cfcf: 90 nop <== NOT EXECUTED /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 10cfd0: 8b 48 64 mov 0x64(%eax),%ecx 10cfd3: 85 c9 test %ecx,%ecx 10cfd5: 75 0d jne 10cfe4 _Thread_Enable_dispatch(); 10cfd7: e8 dc 33 00 00 call 1103b8 <_Thread_Enable_dispatch> 10cfdc: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10cfe1: c9 leave 10cfe2: c3 ret 10cfe3: 90 nop <== NOT EXECUTED if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); 10cfe4: 83 ec 08 sub $0x8,%esp 10cfe7: 50 push %eax 10cfe8: 68 40 b8 12 00 push $0x12b840 10cfed: 89 45 e4 mov %eax,-0x1c(%ebp) 10cff0: e8 1b 27 00 00 call 10f710 <_Objects_Close> _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL ); 10cff5: 83 c4 0c add $0xc,%esp 10cff8: 6a 16 push $0x16 10cffa: 6a 00 push $0x0 10cffc: 8b 45 e4 mov -0x1c(%ebp),%eax 10cfff: 8d 50 14 lea 0x14(%eax),%edx 10d002: 52 push %edx 10d003: e8 2c 1e 00 00 call 10ee34 <_CORE_mutex_Flush> RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 10d008: 58 pop %eax 10d009: 5a pop %edx 10d00a: 8b 45 e4 mov -0x1c(%ebp),%eax 10d00d: 50 push %eax 10d00e: 68 40 b8 12 00 push $0x12b840 10d013: e8 fc 29 00 00 call 10fa14 <_Objects_Free> _POSIX_Mutex_Free( the_mutex ); _Thread_Enable_dispatch(); 10d018: e8 9b 33 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d01d: 31 c0 xor %eax,%eax return 0; 10d01f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d022: c9 leave 10d023: c3 ret 0010d0cc : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d0cc: 55 push %ebp 10d0cd: 89 e5 mov %esp,%ebp 10d0cf: 53 push %ebx 10d0d0: 83 ec 14 sub $0x14,%esp 10d0d3: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d0d6: 85 db test %ebx,%ebx 10d0d8: 74 19 je 10d0f3 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d0da: 83 ec 08 sub $0x8,%esp 10d0dd: 8d 45 f4 lea -0xc(%ebp),%eax 10d0e0: 50 push %eax 10d0e1: ff 75 08 pushl 0x8(%ebp) 10d0e4: e8 8f ff ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d0e9: 83 c4 10 add $0x10,%esp 10d0ec: 8b 55 f4 mov -0xc(%ebp),%edx 10d0ef: 85 d2 test %edx,%edx 10d0f1: 74 0d je 10d100 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 10d0f3: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d0f8: 8b 5d fc mov -0x4(%ebp),%ebx 10d0fb: c9 leave 10d0fc: c3 ret 10d0fd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10d100: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d107: 2b 50 60 sub 0x60(%eax),%edx 10d10a: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d10c: e8 a7 32 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d111: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d113: 8b 5d fc mov -0x4(%ebp),%ebx 10d116: c9 leave 10d117: c3 ret 0010d118 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d118: 55 push %ebp 10d119: 89 e5 mov %esp,%ebp 10d11b: 57 push %edi 10d11c: 56 push %esi 10d11d: 53 push %ebx 10d11e: 83 ec 1c sub $0x1c,%esp 10d121: 8b 75 08 mov 0x8(%ebp),%esi 10d124: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 10d127: 85 db test %ebx,%ebx 10d129: 0f 84 09 01 00 00 je 10d238 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d12f: 85 f6 test %esi,%esi 10d131: 0f 84 e5 00 00 00 je 10d21c } } } #endif if ( !the_attr->is_initialized ) 10d137: 8b 13 mov (%ebx),%edx 10d139: 85 d2 test %edx,%edx 10d13b: 0f 84 db 00 00 00 je 10d21c return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d141: 8b 43 04 mov 0x4(%ebx),%eax 10d144: 83 f8 01 cmp $0x1,%eax 10d147: 0f 84 f7 00 00 00 je 10d244 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d14d: 85 c0 test %eax,%eax 10d14f: 0f 85 c7 00 00 00 jne 10d21c return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d155: 8b 43 0c mov 0xc(%ebx),%eax 10d158: 83 f8 01 cmp $0x1,%eax 10d15b: 0f 84 e7 00 00 00 je 10d248 10d161: 83 f8 02 cmp $0x2,%eax 10d164: 0f 84 c2 00 00 00 je 10d22c 10d16a: 85 c0 test %eax,%eax 10d16c: 0f 85 aa 00 00 00 jne 10d21c 10d172: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) } /* * Validate the priority ceiling field -- should always be valid. */ if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 10d179: 83 ec 0c sub $0xc,%esp 10d17c: ff 73 08 pushl 0x8(%ebx) 10d17f: e8 2c 03 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10d184: 83 c4 10 add $0x10,%esp 10d187: 84 c0 test %al,%al 10d189: 0f 84 8d 00 00 00 je 10d21c #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d18f: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d193: 0f 87 83 00 00 00 ja 10d21c 10d199: a1 38 b4 12 00 mov 0x12b438,%eax 10d19e: 40 inc %eax 10d19f: a3 38 b4 12 00 mov %eax,0x12b438 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d1a4: 83 ec 0c sub $0xc,%esp 10d1a7: 68 40 b8 12 00 push $0x12b840 10d1ac: e8 e3 24 00 00 call 10f694 <_Objects_Allocate> 10d1b1: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d1b3: 83 c4 10 add $0x10,%esp 10d1b6: 85 c0 test %eax,%eax 10d1b8: 0f 84 96 00 00 00 je 10d254 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d1be: 8b 43 04 mov 0x4(%ebx),%eax 10d1c1: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d1c4: 31 c0 xor %eax,%eax 10d1c6: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d1ca: 0f 94 c0 sete %al 10d1cd: 89 47 54 mov %eax,0x54(%edi) else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = true; 10d1d0: c6 47 58 01 movb $0x1,0x58(%edi) the_mutex_attr->priority_ceiling = 10d1d4: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10d1db: 2b 43 08 sub 0x8(%ebx),%eax 10d1de: 89 47 60 mov %eax,0x60(%edi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d1e1: 8b 45 e4 mov -0x1c(%ebp),%eax 10d1e4: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d1e7: 50 push %eax 10d1e8: 6a 01 push $0x1 10d1ea: 8d 47 54 lea 0x54(%edi),%eax 10d1ed: 50 push %eax 10d1ee: 8d 47 14 lea 0x14(%edi),%eax 10d1f1: 50 push %eax 10d1f2: e8 49 1c 00 00 call 10ee40 <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d1f7: 8b 47 08 mov 0x8(%edi),%eax 10d1fa: 0f b7 c8 movzwl %ax,%ecx 10d1fd: 8b 15 5c b8 12 00 mov 0x12b85c,%edx 10d203: 89 3c 8a mov %edi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10d206: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi) CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 10d20d: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d20f: e8 a4 31 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d214: 31 c0 xor %eax,%eax return 0; 10d216: 83 c4 10 add $0x10,%esp 10d219: eb 06 jmp 10d221 <== ALWAYS TAKEN 10d21b: 90 nop <== NOT EXECUTED 10d21c: b8 16 00 00 00 mov $0x16,%eax } 10d221: 8d 65 f4 lea -0xc(%ebp),%esp 10d224: 5b pop %ebx 10d225: 5e pop %esi 10d226: 5f pop %edi 10d227: c9 leave 10d228: c3 ret 10d229: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d22c: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; break; 10d233: e9 41 ff ff ff jmp 10d179 <== ALWAYS TAKEN POSIX_Mutex_Control *the_mutex; CORE_mutex_Attributes *the_mutex_attr; const pthread_mutexattr_t *the_attr; CORE_mutex_Disciplines the_discipline; if ( attr ) the_attr = attr; 10d238: bb c0 b8 12 00 mov $0x12b8c0,%ebx 10d23d: e9 ed fe ff ff jmp 10d12f <== ALWAYS TAKEN 10d242: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d244: b0 58 mov $0x58,%al 10d246: eb d9 jmp 10d221 <== ALWAYS TAKEN return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d248: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d24f: e9 25 ff ff ff jmp 10d179 <== ALWAYS TAKEN _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d254: e8 5f 31 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d259: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10d25e: eb c1 jmp 10d221 <== ALWAYS TAKEN 0010d260 : */ int pthread_mutex_lock( pthread_mutex_t *mutex ) { 10d260: 55 push %ebp 10d261: 89 e5 mov %esp,%ebp 10d263: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, true, THREAD_QUEUE_WAIT_FOREVER ); 10d266: 6a 00 push $0x0 10d268: 6a 01 push $0x1 10d26a: ff 75 08 pushl 0x8(%ebp) 10d26d: e8 02 00 00 00 call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10d272: c9 leave 10d273: c3 ret 0010d2d8 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 10d2d8: 55 push %ebp 10d2d9: 89 e5 mov %esp,%ebp 10d2db: 57 push %edi 10d2dc: 56 push %esi 10d2dd: 53 push %ebx 10d2de: 83 ec 2c sub $0x2c,%esp 10d2e1: 8b 7d 08 mov 0x8(%ebp),%edi 10d2e4: 8b 75 0c mov 0xc(%ebp),%esi 10d2e7: 8b 5d 10 mov 0x10(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; if ( !old_ceiling ) 10d2ea: 85 db test %ebx,%ebx 10d2ec: 74 10 je 10d2fe return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d2ee: 83 ec 0c sub $0xc,%esp 10d2f1: 56 push %esi 10d2f2: e8 b9 01 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> <== ALWAYS TAKEN 10d2f7: 83 c4 10 add $0x10,%esp 10d2fa: 84 c0 test %al,%al 10d2fc: 75 0e jne 10d30c the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); return 0; 10d2fe: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d303: 8d 65 f4 lea -0xc(%ebp),%esp 10d306: 5b pop %ebx 10d307: 5e pop %esi 10d308: 5f pop %edi 10d309: c9 leave 10d30a: c3 ret 10d30b: 90 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10d30c: a0 5c 72 12 00 mov 0x12725c,%al 10d311: 88 45 d7 mov %al,-0x29(%ebp) /* * Must acquire the mutex before we can change it's ceiling. * POSIX says block until we acquire it. */ (void) pthread_mutex_lock( mutex ); 10d314: 83 ec 0c sub $0xc,%esp 10d317: 57 push %edi 10d318: e8 43 ff ff ff call 10d260 <== ALWAYS TAKEN * operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d31d: 58 pop %eax 10d31e: 5a pop %edx 10d31f: 8d 45 e4 lea -0x1c(%ebp),%eax 10d322: 50 push %eax 10d323: 57 push %edi 10d324: e8 4f fd ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d329: 83 c4 10 add $0x10,%esp 10d32c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10d32f: 85 c9 test %ecx,%ecx 10d331: 75 cb jne 10d2fe case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 10d333: 0f b6 15 5c 72 12 00 movzbl 0x12725c,%edx 10d33a: 2b 50 60 sub 0x60(%eax),%edx 10d33d: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 10d33f: 0f b6 55 d7 movzbl -0x29(%ebp),%edx 10d343: 29 f2 sub %esi,%edx 10d345: 89 50 60 mov %edx,0x60(%eax) /* * We are required to unlock the mutex before we return. */ _CORE_mutex_Surrender( 10d348: 52 push %edx 10d349: 6a 00 push $0x0 10d34b: ff 70 08 pushl 0x8(%eax) 10d34e: 83 c0 14 add $0x14,%eax 10d351: 50 push %eax 10d352: e8 81 1c 00 00 call 10efd8 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d357: e8 5c 30 00 00 call 1103b8 <_Thread_Enable_dispatch> 10d35c: 31 c0 xor %eax,%eax return 0; 10d35e: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d361: 8d 65 f4 lea -0xc(%ebp),%esp 10d364: 5b pop %ebx 10d365: 5e pop %esi 10d366: 5f pop %edi 10d367: c9 leave 10d368: c3 ret 0010d36c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10d36c: 55 push %ebp 10d36d: 89 e5 mov %esp,%ebp 10d36f: 53 push %ebx 10d370: 83 ec 1c sub $0x1c,%esp 10d373: 8b 5d 08 mov 0x8(%ebp),%ebx * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10d376: 8d 45 f4 lea -0xc(%ebp),%eax 10d379: 50 push %eax 10d37a: ff 75 0c pushl 0xc(%ebp) 10d37d: e8 a6 00 00 00 call 10d428 <_POSIX_Absolute_timeout_to_ticks> <== ALWAYS TAKEN if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10d382: 83 c4 10 add $0x10,%esp 10d385: 83 f8 03 cmp $0x3,%eax 10d388: 74 16 je 10d3a0 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d38a: 50 push %eax 10d38b: ff 75 f4 pushl -0xc(%ebp) 10d38e: 6a 00 push $0x0 10d390: 53 push %ebx 10d391: e8 de fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN 10d396: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d399: 8b 5d fc mov -0x4(%ebp),%ebx 10d39c: c9 leave 10d39d: c3 ret 10d39e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10d3a0: 52 push %edx 10d3a1: ff 75 f4 pushl -0xc(%ebp) 10d3a4: 6a 01 push $0x1 10d3a6: 53 push %ebx 10d3a7: e8 c8 fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN 10d3ac: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10d3af: 8b 5d fc mov -0x4(%ebp),%ebx 10d3b2: c9 leave 10d3b3: c3 ret 0010d3c4 : */ int pthread_mutex_trylock( pthread_mutex_t *mutex ) { 10d3c4: 55 push %ebp 10d3c5: 89 e5 mov %esp,%ebp 10d3c7: 83 ec 0c sub $0xc,%esp return _POSIX_Mutex_Lock_support( mutex, false, THREAD_QUEUE_WAIT_FOREVER ); 10d3ca: 6a 00 push $0x0 10d3cc: 6a 00 push $0x0 10d3ce: ff 75 08 pushl 0x8(%ebp) 10d3d1: e8 9e fe ff ff call 10d274 <_POSIX_Mutex_Lock_support> <== ALWAYS TAKEN } 10d3d6: c9 leave 10d3d7: c3 ret 0010d3d8 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 10d3d8: 55 push %ebp 10d3d9: 89 e5 mov %esp,%ebp 10d3db: 53 push %ebx 10d3dc: 83 ec 1c sub $0x1c,%esp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d3df: 8d 45 f4 lea -0xc(%ebp),%eax 10d3e2: 50 push %eax 10d3e3: ff 75 08 pushl 0x8(%ebp) 10d3e6: e8 8d fc ff ff call 10d078 <_POSIX_Mutex_Get> <== ALWAYS TAKEN switch ( location ) { 10d3eb: 83 c4 10 add $0x10,%esp 10d3ee: 8b 4d f4 mov -0xc(%ebp),%ecx 10d3f1: 85 c9 test %ecx,%ecx 10d3f3: 75 27 jne 10d41c case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 10d3f5: 52 push %edx 10d3f6: 6a 00 push $0x0 10d3f8: ff 70 08 pushl 0x8(%eax) 10d3fb: 83 c0 14 add $0x14,%eax 10d3fe: 50 push %eax 10d3ff: e8 d4 1b 00 00 call 10efd8 <_CORE_mutex_Surrender> 10d404: 89 c3 mov %eax,%ebx &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 10d406: e8 ad 2f 00 00 call 1103b8 <_Thread_Enable_dispatch> return _POSIX_Mutex_Translate_core_mutex_return_code( status ); 10d40b: 89 1c 24 mov %ebx,(%esp) 10d40e: e8 a1 ff ff ff call 10d3b4 <_POSIX_Mutex_Translate_core_mutex_return_code> <== ALWAYS TAKEN 10d413: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d416: 8b 5d fc mov -0x4(%ebp),%ebx 10d419: c9 leave 10d41a: c3 ret 10d41b: 90 nop <== NOT EXECUTED register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 10d41c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d421: 8b 5d fc mov -0x4(%ebp),%ebx 10d424: c9 leave 10d425: c3 ret 0010ce58 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10ce58: 55 push %ebp 10ce59: 89 e5 mov %esp,%ebp 10ce5b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10ce5e: 85 c0 test %eax,%eax 10ce60: 74 12 je 10ce74 10ce62: 8b 10 mov (%eax),%edx 10ce64: 85 d2 test %edx,%edx 10ce66: 74 0c je 10ce74 return EINVAL; attr->is_initialized = false; 10ce68: c7 00 00 00 00 00 movl $0x0,(%eax) 10ce6e: 31 c0 xor %eax,%eax return 0; } 10ce70: c9 leave 10ce71: c3 ret 10ce72: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10ce74: b8 16 00 00 00 mov $0x16,%eax } 10ce79: c9 leave 10ce7a: c3 ret 0010b0a0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10b0a0: 55 push %ebp 10b0a1: 89 e5 mov %esp,%ebp 10b0a3: 8b 45 08 mov 0x8(%ebp),%eax 10b0a6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b0a9: 85 c0 test %eax,%eax 10b0ab: 74 13 je 10b0c0 return EINVAL; if ( !attr->is_initialized ) 10b0ad: 8b 08 mov (%eax),%ecx 10b0af: 85 c9 test %ecx,%ecx 10b0b1: 74 0d je 10b0c0 return EINVAL; if ( !type ) 10b0b3: 85 d2 test %edx,%edx 10b0b5: 74 09 je 10b0c0 <== ALWAYS TAKEN return EINVAL; *type = attr->type; 10b0b7: 8b 40 10 mov 0x10(%eax),%eax 10b0ba: 89 02 mov %eax,(%edx) 10b0bc: 31 c0 xor %eax,%eax return 0; } 10b0be: c9 leave 10b0bf: c3 ret if ( !type ) return EINVAL; *type = attr->type; return 0; 10b0c0: b8 16 00 00 00 mov $0x16,%eax } 10b0c5: c9 leave 10b0c6: c3 ret 0010cf1c : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10cf1c: 55 push %ebp 10cf1d: 89 e5 mov %esp,%ebp 10cf1f: 56 push %esi 10cf20: 53 push %ebx 10cf21: 8b 5d 08 mov 0x8(%ebp),%ebx 10cf24: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10cf27: 85 db test %ebx,%ebx 10cf29: 74 06 je 10cf31 10cf2b: 8b 03 mov (%ebx),%eax 10cf2d: 85 c0 test %eax,%eax 10cf2f: 75 0f jne 10cf40 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10cf31: b8 16 00 00 00 mov $0x16,%eax } 10cf36: 8d 65 f8 lea -0x8(%ebp),%esp 10cf39: 5b pop %ebx 10cf3a: 5e pop %esi 10cf3b: c9 leave 10cf3c: c3 ret 10cf3d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10cf40: 83 ec 0c sub $0xc,%esp 10cf43: 56 push %esi 10cf44: e8 67 05 00 00 call 10d4b0 <_POSIX_Priority_Is_valid> 10cf49: 83 c4 10 add $0x10,%esp 10cf4c: 84 c0 test %al,%al 10cf4e: 74 e1 je 10cf31 return EINVAL; attr->prio_ceiling = prioceiling; 10cf50: 89 73 08 mov %esi,0x8(%ebx) 10cf53: 31 c0 xor %eax,%eax return 0; } 10cf55: 8d 65 f8 lea -0x8(%ebp),%esp 10cf58: 5b pop %ebx 10cf59: 5e pop %esi 10cf5a: c9 leave 10cf5b: c3 ret 0010cf5c : int pthread_mutexattr_setprotocol( pthread_mutexattr_t *attr, int protocol ) { 10cf5c: 55 push %ebp 10cf5d: 89 e5 mov %esp,%ebp 10cf5f: 8b 45 08 mov 0x8(%ebp),%eax 10cf62: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cf65: 85 c0 test %eax,%eax 10cf67: 74 0b je 10cf74 10cf69: 8b 08 mov (%eax),%ecx 10cf6b: 85 c9 test %ecx,%ecx 10cf6d: 74 05 je 10cf74 return EINVAL; switch ( protocol ) { 10cf6f: 83 fa 02 cmp $0x2,%edx 10cf72: 76 08 jbe 10cf7c case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; return 0; 10cf74: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cf79: c9 leave 10cf7a: c3 ret 10cf7b: 90 nop <== NOT EXECUTED switch ( protocol ) { case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_INHERIT: case PTHREAD_PRIO_PROTECT: attr->protocol = protocol; 10cf7c: 89 50 0c mov %edx,0xc(%eax) 10cf7f: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cf81: c9 leave 10cf82: c3 ret 0010cf84 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10cf84: 55 push %ebp 10cf85: 89 e5 mov %esp,%ebp 10cf87: 8b 45 08 mov 0x8(%ebp),%eax 10cf8a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10cf8d: 85 c0 test %eax,%eax 10cf8f: 74 0b je 10cf9c 10cf91: 8b 08 mov (%eax),%ecx 10cf93: 85 c9 test %ecx,%ecx 10cf95: 74 05 je 10cf9c return EINVAL; switch ( pshared ) { 10cf97: 83 fa 01 cmp $0x1,%edx 10cf9a: 76 08 jbe 10cfa4 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cf9c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cfa1: c9 leave 10cfa2: c3 ret 10cfa3: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cfa4: 89 50 04 mov %edx,0x4(%eax) 10cfa7: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cfa9: c9 leave 10cfaa: c3 ret 0010b0f0 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b0f0: 55 push %ebp 10b0f1: 89 e5 mov %esp,%ebp 10b0f3: 8b 45 08 mov 0x8(%ebp),%eax 10b0f6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b0f9: 85 c0 test %eax,%eax 10b0fb: 74 0b je 10b108 10b0fd: 8b 08 mov (%eax),%ecx 10b0ff: 85 c9 test %ecx,%ecx 10b101: 74 05 je 10b108 <== ALWAYS TAKEN return EINVAL; switch ( type ) { 10b103: 83 fa 03 cmp $0x3,%edx 10b106: 76 08 jbe 10b110 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 10b108: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b10d: c9 leave 10b10e: c3 ret 10b10f: 90 nop <== NOT EXECUTED switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10b110: 89 50 10 mov %edx,0x10(%eax) 10b113: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b115: c9 leave 10b116: c3 ret 0010bc04 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 57 push %edi 10bc08: 56 push %esi 10bc09: 53 push %ebx 10bc0a: 83 ec 1c sub $0x1c,%esp 10bc0d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bc10: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10bc13: 85 db test %ebx,%ebx 10bc15: 74 51 je 10bc68 10bc17: 85 f6 test %esi,%esi 10bc19: 74 4d je 10bc68 return EINVAL; if ( !once_control->init_executed ) { 10bc1b: 8b 7b 04 mov 0x4(%ebx),%edi 10bc1e: 85 ff test %edi,%edi 10bc20: 74 0a je 10bc2c 10bc22: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10bc24: 8d 65 f4 lea -0xc(%ebp),%esp 10bc27: 5b pop %ebx 10bc28: 5e pop %esi 10bc29: 5f pop %edi 10bc2a: c9 leave 10bc2b: c3 ret if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10bc2c: 51 push %ecx 10bc2d: 8d 7d e4 lea -0x1c(%ebp),%edi 10bc30: 57 push %edi 10bc31: 68 00 01 00 00 push $0x100 10bc36: 68 00 01 00 00 push $0x100 10bc3b: e8 c8 0b 00 00 call 10c808 if ( !once_control->init_executed ) { 10bc40: 83 c4 10 add $0x10,%esp 10bc43: 8b 53 04 mov 0x4(%ebx),%edx 10bc46: 85 d2 test %edx,%edx 10bc48: 74 2e je 10bc78 <== NEVER TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bc4a: 50 push %eax 10bc4b: 57 push %edi 10bc4c: 68 00 01 00 00 push $0x100 10bc51: ff 75 e4 pushl -0x1c(%ebp) 10bc54: e8 af 0b 00 00 call 10c808 10bc59: 31 c0 xor %eax,%eax 10bc5b: 83 c4 10 add $0x10,%esp } return 0; } 10bc5e: 8d 65 f4 lea -0xc(%ebp),%esp 10bc61: 5b pop %ebx 10bc62: 5e pop %esi 10bc63: 5f pop %edi 10bc64: c9 leave 10bc65: c3 ret 10bc66: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10bc68: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10bc6d: 8d 65 f4 lea -0xc(%ebp),%esp 10bc70: 5b pop %ebx 10bc71: 5e pop %esi 10bc72: 5f pop %edi 10bc73: c9 leave 10bc74: c3 ret 10bc75: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = true; 10bc78: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10bc7e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10bc85: ff d6 call *%esi 10bc87: eb c1 jmp 10bc4a <== ALWAYS TAKEN 0010c0dc : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c0dc: 55 push %ebp 10c0dd: 89 e5 mov %esp,%ebp 10c0df: 53 push %ebx 10c0e0: 83 ec 14 sub $0x14,%esp 10c0e3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c0e6: 85 c0 test %eax,%eax 10c0e8: 74 42 je 10c12c RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c0ea: 53 push %ebx 10c0eb: 8d 55 f4 lea -0xc(%ebp),%edx 10c0ee: 52 push %edx 10c0ef: ff 30 pushl (%eax) 10c0f1: 68 00 a4 12 00 push $0x12a400 10c0f6: e8 29 2b 00 00 call 10ec24 <_Objects_Get> 10c0fb: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c0fd: 83 c4 10 add $0x10,%esp 10c100: 8b 4d f4 mov -0xc(%ebp),%ecx 10c103: 85 c9 test %ecx,%ecx 10c105: 75 25 jne 10c12c case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 10c107: 83 ec 0c sub $0xc,%esp 10c10a: 8d 40 10 lea 0x10(%eax),%eax 10c10d: 50 push %eax 10c10e: e8 b5 3b 00 00 call 10fcc8 <_Thread_queue_First> 10c113: 83 c4 10 add $0x10,%esp 10c116: 85 c0 test %eax,%eax 10c118: 74 1e je 10c138 _Thread_Enable_dispatch(); 10c11a: e8 79 33 00 00 call 10f498 <_Thread_Enable_dispatch> 10c11f: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c124: 8b 5d fc mov -0x4(%ebp),%ebx 10c127: c9 leave 10c128: c3 ret 10c129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 10c12c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c131: 8b 5d fc mov -0x4(%ebp),%ebx 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c138: 83 ec 08 sub $0x8,%esp 10c13b: 53 push %ebx 10c13c: 68 00 a4 12 00 push $0x12a400 10c141: e8 aa 26 00 00 call 10e7f0 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c146: 58 pop %eax 10c147: 5a pop %edx 10c148: 53 push %ebx 10c149: 68 00 a4 12 00 push $0x12a400 10c14e: e8 a1 29 00 00 call 10eaf4 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c153: e8 40 33 00 00 call 10f498 <_Thread_Enable_dispatch> 10c158: 31 c0 xor %eax,%eax return 0; 10c15a: 83 c4 10 add $0x10,%esp 10c15d: eb d2 jmp 10c131 <== ALWAYS TAKEN 0010c160 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c160: 55 push %ebp 10c161: 89 e5 mov %esp,%ebp 10c163: 56 push %esi 10c164: 53 push %ebx 10c165: 83 ec 20 sub $0x20,%esp 10c168: 8b 5d 08 mov 0x8(%ebp),%ebx 10c16b: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c16e: 85 db test %ebx,%ebx 10c170: 74 15 je 10c187 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c172: 85 f6 test %esi,%esi 10c174: 0f 84 86 00 00 00 je 10c200 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c17a: 8b 16 mov (%esi),%edx 10c17c: 85 d2 test %edx,%edx 10c17e: 74 07 je 10c187 <== ALWAYS TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c180: 8b 46 04 mov 0x4(%esi),%eax 10c183: 85 c0 test %eax,%eax 10c185: 74 0d je 10c194 <== NEVER TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10c187: b8 16 00 00 00 mov $0x16,%eax } 10c18c: 8d 65 f8 lea -0x8(%ebp),%esp 10c18f: 5b pop %ebx 10c190: 5e pop %esi 10c191: c9 leave 10c192: c3 ret 10c193: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c194: a1 78 a1 12 00 mov 0x12a178,%eax 10c199: 40 inc %eax 10c19a: a3 78 a1 12 00 mov %eax,0x12a178 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10c19f: 83 ec 0c sub $0xc,%esp 10c1a2: 68 00 a4 12 00 push $0x12a400 10c1a7: e8 c8 25 00 00 call 10e774 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c1ac: 83 c4 10 add $0x10,%esp 10c1af: 85 c0 test %eax,%eax 10c1b1: 74 41 je 10c1f4 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c1b3: 83 ec 08 sub $0x8,%esp 10c1b6: 8d 55 f4 lea -0xc(%ebp),%edx 10c1b9: 52 push %edx 10c1ba: 8d 50 10 lea 0x10(%eax),%edx 10c1bd: 52 push %edx 10c1be: 89 45 e4 mov %eax,-0x1c(%ebp) 10c1c1: e8 ca 1d 00 00 call 10df90 <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c1c6: 8b 45 e4 mov -0x1c(%ebp),%eax 10c1c9: 8b 50 08 mov 0x8(%eax),%edx 10c1cc: 0f b7 f2 movzwl %dx,%esi 10c1cf: 8b 0d 1c a4 12 00 mov 0x12a41c,%ecx 10c1d5: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10c1d8: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c1df: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c1e1: e8 b2 32 00 00 call 10f498 <_Thread_Enable_dispatch> 10c1e6: 31 c0 xor %eax,%eax return 0; 10c1e8: 83 c4 10 add $0x10,%esp } 10c1eb: 8d 65 f8 lea -0x8(%ebp),%esp 10c1ee: 5b pop %ebx 10c1ef: 5e pop %esi 10c1f0: c9 leave 10c1f1: c3 ret 10c1f2: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c1f4: e8 9f 32 00 00 call 10f498 <_Thread_Enable_dispatch> 10c1f9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c1fe: eb 8c jmp 10c18c <== ALWAYS TAKEN * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c200: 83 ec 0c sub $0xc,%esp 10c203: 8d 75 ec lea -0x14(%ebp),%esi 10c206: 56 push %esi 10c207: e8 38 09 00 00 call 10cb44 <== ALWAYS TAKEN 10c20c: 83 c4 10 add $0x10,%esp 10c20f: e9 66 ff ff ff jmp 10c17a <== ALWAYS TAKEN 0010c214 : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 10c214: 55 push %ebp 10c215: 89 e5 mov %esp,%ebp 10c217: 53 push %ebx 10c218: 83 ec 14 sub $0x14,%esp 10c21b: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c21e: 85 db test %ebx,%ebx 10c220: 74 1b je 10c23d RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c222: 51 push %ecx 10c223: 8d 45 f4 lea -0xc(%ebp),%eax 10c226: 50 push %eax 10c227: ff 33 pushl (%ebx) 10c229: 68 00 a4 12 00 push $0x12a400 10c22e: e8 f1 29 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c233: 83 c4 10 add $0x10,%esp 10c236: 8b 55 f4 mov -0xc(%ebp),%edx 10c239: 85 d2 test %edx,%edx 10c23b: 74 0b je 10c248 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c23d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c242: 8b 5d fc mov -0x4(%ebp),%ebx 10c245: c9 leave 10c246: c3 ret 10c247: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c248: 83 ec 0c sub $0xc,%esp 10c24b: 6a 00 push $0x0 10c24d: 6a 00 push $0x0 10c24f: 6a 01 push $0x1 10c251: ff 33 pushl (%ebx) 10c253: 83 c0 10 add $0x10,%eax 10c256: 50 push %eax 10c257: e8 68 1d 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> true, /* we are willing to wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c25c: 83 c4 20 add $0x20,%esp 10c25f: e8 34 32 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c264: 83 ec 0c sub $0xc,%esp 10c267: a1 38 a2 12 00 mov 0x12a238,%eax 10c26c: ff 70 34 pushl 0x34(%eax) 10c26f: e8 70 01 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c274: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c277: 8b 5d fc mov -0x4(%ebp),%ebx 10c27a: c9 leave 10c27b: c3 ret 0010c27c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c27c: 55 push %ebp 10c27d: 89 e5 mov %esp,%ebp 10c27f: 56 push %esi 10c280: 53 push %ebx 10c281: 83 ec 20 sub $0x20,%esp 10c284: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c287: 85 db test %ebx,%ebx 10c289: 74 7d je 10c308 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10c28b: 83 ec 08 sub $0x8,%esp 10c28e: 8d 45 f0 lea -0x10(%ebp),%eax 10c291: 50 push %eax 10c292: ff 75 0c pushl 0xc(%ebp) 10c295: e8 aa 5e 00 00 call 112144 <_POSIX_Absolute_timeout_to_ticks> 10c29a: 89 c6 mov %eax,%esi 10c29c: 83 c4 0c add $0xc,%esp 10c29f: 8d 45 f4 lea -0xc(%ebp),%eax 10c2a2: 50 push %eax 10c2a3: ff 33 pushl (%ebx) 10c2a5: 68 00 a4 12 00 push $0x12a400 10c2aa: e8 75 29 00 00 call 10ec24 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c2af: 83 c4 10 add $0x10,%esp 10c2b2: 8b 55 f4 mov -0xc(%ebp),%edx 10c2b5: 85 d2 test %edx,%edx 10c2b7: 75 4f jne 10c308 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 10c2b9: 83 fe 03 cmp $0x3,%esi 10c2bc: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c2bf: 83 ec 0c sub $0xc,%esp 10c2c2: 6a 00 push $0x0 10c2c4: ff 75 f0 pushl -0x10(%ebp) 10c2c7: 0f b6 ca movzbl %dl,%ecx 10c2ca: 51 push %ecx 10c2cb: ff 33 pushl (%ebx) 10c2cd: 83 c0 10 add $0x10,%eax 10c2d0: 50 push %eax 10c2d1: 88 55 e4 mov %dl,-0x1c(%ebp) 10c2d4: e8 eb 1c 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c2d9: 83 c4 20 add $0x20,%esp 10c2dc: e8 b7 31 00 00 call 10f498 <_Thread_Enable_dispatch> if ( !do_wait ) { 10c2e1: 8a 55 e4 mov -0x1c(%ebp),%dl 10c2e4: 84 d2 test %dl,%dl 10c2e6: 75 3c jne 10c324 if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10c2e8: a1 38 a2 12 00 mov 0x12a238,%eax 10c2ed: 8b 40 34 mov 0x34(%eax),%eax 10c2f0: 83 f8 02 cmp $0x2,%eax 10c2f3: 74 1f je 10c314 break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c2f5: 83 ec 0c sub $0xc,%esp 10c2f8: 50 push %eax 10c2f9: e8 e6 00 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c2fe: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c301: 8d 65 f8 lea -0x8(%ebp),%esp 10c304: 5b pop %ebx 10c305: 5e pop %esi 10c306: c9 leave 10c307: c3 ret break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c308: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c30d: 8d 65 f8 lea -0x8(%ebp),%esp 10c310: 5b pop %ebx 10c311: 5e pop %esi 10c312: c9 leave 10c313: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10c314: 85 f6 test %esi,%esi 10c316: 74 f0 je 10c308 <== ALWAYS TAKEN 10c318: 83 fe 02 cmp $0x2,%esi 10c31b: 77 d8 ja 10c2f5 <== ALWAYS TAKEN 10c31d: b0 74 mov $0x74,%al 10c31f: eb ec jmp 10c30d <== ALWAYS TAKEN 10c321: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c324: a1 38 a2 12 00 mov 0x12a238,%eax 10c329: 8b 40 34 mov 0x34(%eax),%eax 10c32c: eb c7 jmp 10c2f5 <== ALWAYS TAKEN 0010c330 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c330: 55 push %ebp 10c331: 89 e5 mov %esp,%ebp 10c333: 56 push %esi 10c334: 53 push %ebx 10c335: 83 ec 20 sub $0x20,%esp 10c338: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10c33b: 85 db test %ebx,%ebx 10c33d: 74 7d je 10c3bc * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10c33f: 83 ec 08 sub $0x8,%esp 10c342: 8d 45 f0 lea -0x10(%ebp),%eax 10c345: 50 push %eax 10c346: ff 75 0c pushl 0xc(%ebp) 10c349: e8 f6 5d 00 00 call 112144 <_POSIX_Absolute_timeout_to_ticks> 10c34e: 89 c6 mov %eax,%esi 10c350: 83 c4 0c add $0xc,%esp 10c353: 8d 45 f4 lea -0xc(%ebp),%eax 10c356: 50 push %eax 10c357: ff 33 pushl (%ebx) 10c359: 68 00 a4 12 00 push $0x12a400 10c35e: e8 c1 28 00 00 call 10ec24 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c363: 83 c4 10 add $0x10,%esp 10c366: 8b 55 f4 mov -0xc(%ebp),%edx 10c369: 85 d2 test %edx,%edx 10c36b: 75 4f jne 10c3bc (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 10c36d: 83 fe 03 cmp $0x3,%esi 10c370: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c373: 83 ec 0c sub $0xc,%esp 10c376: 6a 00 push $0x0 10c378: ff 75 f0 pushl -0x10(%ebp) 10c37b: 0f b6 ca movzbl %dl,%ecx 10c37e: 51 push %ecx 10c37f: ff 33 pushl (%ebx) 10c381: 83 c0 10 add $0x10,%eax 10c384: 50 push %eax 10c385: 88 55 e4 mov %dl,-0x1c(%ebp) 10c388: e8 ff 1c 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10c38d: 83 c4 20 add $0x20,%esp 10c390: e8 03 31 00 00 call 10f498 <_Thread_Enable_dispatch> if ( !do_wait && 10c395: 8a 55 e4 mov -0x1c(%ebp),%dl 10c398: 84 d2 test %dl,%dl 10c39a: 75 3c jne 10c3d8 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10c39c: a1 38 a2 12 00 mov 0x12a238,%eax 10c3a1: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10c3a4: 83 f8 02 cmp $0x2,%eax 10c3a7: 74 1f je 10c3c8 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3a9: 83 ec 0c sub $0xc,%esp 10c3ac: 50 push %eax 10c3ad: e8 32 00 00 00 call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c3b2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c3b5: 8d 65 f8 lea -0x8(%ebp),%esp 10c3b8: 5b pop %ebx 10c3b9: 5e pop %esi 10c3ba: c9 leave 10c3bb: c3 ret case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c3bc: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c3c1: 8d 65 f8 lea -0x8(%ebp),%esp 10c3c4: 5b pop %ebx 10c3c5: 5e pop %esi 10c3c6: c9 leave 10c3c7: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10c3c8: 85 f6 test %esi,%esi 10c3ca: 74 f0 je 10c3bc <== ALWAYS TAKEN 10c3cc: 83 fe 02 cmp $0x2,%esi 10c3cf: 77 d8 ja 10c3a9 <== ALWAYS TAKEN 10c3d1: b0 74 mov $0x74,%al 10c3d3: eb ec jmp 10c3c1 <== ALWAYS TAKEN 10c3d5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c3d8: a1 38 a2 12 00 mov 0x12a238,%eax 10c3dd: 8b 40 34 mov 0x34(%eax),%eax 10c3e0: eb c7 jmp 10c3a9 <== ALWAYS TAKEN 0010c3f4 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 10c3f4: 55 push %ebp 10c3f5: 89 e5 mov %esp,%ebp 10c3f7: 53 push %ebx 10c3f8: 83 ec 14 sub $0x14,%esp 10c3fb: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c3fe: 85 db test %ebx,%ebx 10c400: 74 1b je 10c41d 10c402: 51 push %ecx 10c403: 8d 45 f4 lea -0xc(%ebp),%eax 10c406: 50 push %eax 10c407: ff 33 pushl (%ebx) 10c409: 68 00 a4 12 00 push $0x12a400 10c40e: e8 11 28 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c413: 83 c4 10 add $0x10,%esp 10c416: 8b 55 f4 mov -0xc(%ebp),%edx 10c419: 85 d2 test %edx,%edx 10c41b: 74 0b je 10c428 NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c41d: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c422: 8b 5d fc mov -0x4(%ebp),%ebx 10c425: c9 leave 10c426: c3 ret 10c427: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10c428: 83 ec 0c sub $0xc,%esp 10c42b: 6a 00 push $0x0 10c42d: 6a 00 push $0x0 10c42f: 6a 00 push $0x0 10c431: ff 33 pushl (%ebx) 10c433: 83 c0 10 add $0x10,%eax 10c436: 50 push %eax 10c437: e8 88 1b 00 00 call 10dfc4 <_CORE_RWLock_Obtain_for_reading> 0, NULL ); _Thread_Enable_dispatch(); 10c43c: 83 c4 20 add $0x20,%esp 10c43f: e8 54 30 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c444: 83 ec 0c sub $0xc,%esp 10c447: a1 38 a2 12 00 mov 0x12a238,%eax 10c44c: ff 70 34 pushl 0x34(%eax) 10c44f: e8 90 ff ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c454: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c457: 8b 5d fc mov -0x4(%ebp),%ebx 10c45a: c9 leave 10c45b: c3 ret 0010c45c : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 10c45c: 55 push %ebp 10c45d: 89 e5 mov %esp,%ebp 10c45f: 53 push %ebx 10c460: 83 ec 14 sub $0x14,%esp 10c463: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c466: 85 db test %ebx,%ebx 10c468: 74 1b je 10c485 10c46a: 51 push %ecx 10c46b: 8d 45 f4 lea -0xc(%ebp),%eax 10c46e: 50 push %eax 10c46f: ff 33 pushl (%ebx) 10c471: 68 00 a4 12 00 push $0x12a400 10c476: e8 a9 27 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c47b: 83 c4 10 add $0x10,%esp 10c47e: 8b 55 f4 mov -0xc(%ebp),%edx 10c481: 85 d2 test %edx,%edx 10c483: 74 0b je 10c490 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c485: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c48a: 8b 5d fc mov -0x4(%ebp),%ebx 10c48d: c9 leave 10c48e: c3 ret 10c48f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c490: 83 ec 0c sub $0xc,%esp 10c493: 6a 00 push $0x0 10c495: 6a 00 push $0x0 10c497: 6a 00 push $0x0 10c499: ff 33 pushl (%ebx) 10c49b: 83 c0 10 add $0x10,%eax 10c49e: 50 push %eax 10c49f: e8 e8 1b 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> false, /* we are not willing to wait */ 0, NULL ); _Thread_Enable_dispatch(); 10c4a4: 83 c4 20 add $0x20,%esp 10c4a7: e8 ec 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c4ac: 83 ec 0c sub $0xc,%esp 10c4af: a1 38 a2 12 00 mov 0x12a238,%eax 10c4b4: ff 70 34 pushl 0x34(%eax) 10c4b7: e8 28 ff ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c4bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c4bf: 8b 5d fc mov -0x4(%ebp),%ebx 10c4c2: c9 leave 10c4c3: c3 ret 0010c4c4 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 10c4c4: 55 push %ebp 10c4c5: 89 e5 mov %esp,%ebp 10c4c7: 53 push %ebx 10c4c8: 83 ec 14 sub $0x14,%esp 10c4cb: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 10c4ce: 85 c0 test %eax,%eax 10c4d0: 74 1b je 10c4ed 10c4d2: 51 push %ecx 10c4d3: 8d 55 f4 lea -0xc(%ebp),%edx 10c4d6: 52 push %edx 10c4d7: ff 30 pushl (%eax) 10c4d9: 68 00 a4 12 00 push $0x12a400 10c4de: e8 41 27 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c4e3: 83 c4 10 add $0x10,%esp 10c4e6: 8b 55 f4 mov -0xc(%ebp),%edx 10c4e9: 85 d2 test %edx,%edx 10c4eb: 74 0b je 10c4f8 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c4ed: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c4f2: 8b 5d fc mov -0x4(%ebp),%ebx 10c4f5: c9 leave 10c4f6: c3 ret 10c4f7: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 10c4f8: 83 ec 0c sub $0xc,%esp 10c4fb: 83 c0 10 add $0x10,%eax 10c4fe: 50 push %eax 10c4ff: e8 14 1c 00 00 call 10e118 <_CORE_RWLock_Release> 10c504: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10c506: e8 8d 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 10c50b: 89 1c 24 mov %ebx,(%esp) 10c50e: e8 d1 fe ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c513: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c516: 8b 5d fc mov -0x4(%ebp),%ebx 10c519: c9 leave 10c51a: c3 ret 0010c51c : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 10c51c: 55 push %ebp 10c51d: 89 e5 mov %esp,%ebp 10c51f: 53 push %ebx 10c520: 83 ec 14 sub $0x14,%esp 10c523: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 10c526: 85 db test %ebx,%ebx 10c528: 74 1b je 10c545 10c52a: 51 push %ecx 10c52b: 8d 45 f4 lea -0xc(%ebp),%eax 10c52e: 50 push %eax 10c52f: ff 33 pushl (%ebx) 10c531: 68 00 a4 12 00 push $0x12a400 10c536: e8 e9 26 00 00 call 10ec24 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c53b: 83 c4 10 add $0x10,%esp 10c53e: 8b 55 f4 mov -0xc(%ebp),%edx 10c541: 85 d2 test %edx,%edx 10c543: 74 0b je 10c550 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c545: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c54a: 8b 5d fc mov -0x4(%ebp),%ebx 10c54d: c9 leave 10c54e: c3 ret 10c54f: 90 nop <== NOT EXECUTED the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10c550: 83 ec 0c sub $0xc,%esp 10c553: 6a 00 push $0x0 10c555: 6a 00 push $0x0 10c557: 6a 01 push $0x1 10c559: ff 33 pushl (%ebx) 10c55b: 83 c0 10 add $0x10,%eax 10c55e: 50 push %eax 10c55f: e8 28 1b 00 00 call 10e08c <_CORE_RWLock_Obtain_for_writing> true, /* do not timeout -- wait forever */ 0, NULL ); _Thread_Enable_dispatch(); 10c564: 83 c4 20 add $0x20,%esp 10c567: e8 2c 2f 00 00 call 10f498 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( 10c56c: 83 ec 0c sub $0xc,%esp 10c56f: a1 38 a2 12 00 mov 0x12a238,%eax 10c574: ff 70 34 pushl 0x34(%eax) 10c577: e8 68 fe ff ff call 10c3e4 <_POSIX_RWLock_Translate_core_RWLock_return_code> <== ALWAYS TAKEN 10c57c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c57f: 8b 5d fc mov -0x4(%ebp),%ebx 10c582: c9 leave 10c583: c3 ret 0010cafc : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10cafc: 55 push %ebp 10cafd: 89 e5 mov %esp,%ebp 10caff: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10cb02: 85 c0 test %eax,%eax 10cb04: 74 12 je 10cb18 10cb06: 8b 10 mov (%eax),%edx 10cb08: 85 d2 test %edx,%edx 10cb0a: 74 0c je 10cb18 return EINVAL; attr->is_initialized = false; 10cb0c: c7 00 00 00 00 00 movl $0x0,(%eax) 10cb12: 31 c0 xor %eax,%eax return 0; } 10cb14: c9 leave 10cb15: c3 ret 10cb16: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10cb18: b8 16 00 00 00 mov $0x16,%eax } 10cb1d: c9 leave 10cb1e: c3 ret 0010cb44 : */ int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { 10cb44: 55 push %ebp 10cb45: 89 e5 mov %esp,%ebp 10cb47: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10cb4a: 85 c0 test %eax,%eax 10cb4c: 74 12 je 10cb60 return EINVAL; attr->is_initialized = true; 10cb4e: c7 00 01 00 00 00 movl $0x1,(%eax) attr->process_shared = PTHREAD_PROCESS_PRIVATE; 10cb54: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10cb5b: 31 c0 xor %eax,%eax return 0; } 10cb5d: c9 leave 10cb5e: c3 ret 10cb5f: 90 nop <== NOT EXECUTED int pthread_rwlockattr_init( pthread_rwlockattr_t *attr ) { if ( !attr ) 10cb60: b0 16 mov $0x16,%al return EINVAL; attr->is_initialized = true; attr->process_shared = PTHREAD_PROCESS_PRIVATE; return 0; } 10cb62: c9 leave 10cb63: c3 ret 0010cb64 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10cb64: 55 push %ebp 10cb65: 89 e5 mov %esp,%ebp 10cb67: 8b 45 08 mov 0x8(%ebp),%eax 10cb6a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10cb6d: 85 c0 test %eax,%eax 10cb6f: 74 0b je 10cb7c return EINVAL; if ( !attr->is_initialized ) 10cb71: 8b 08 mov (%eax),%ecx 10cb73: 85 c9 test %ecx,%ecx 10cb75: 74 05 je 10cb7c return EINVAL; switch ( pshared ) { 10cb77: 83 fa 01 cmp $0x1,%edx 10cb7a: 76 08 jbe 10cb84 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10cb7c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10cb81: c9 leave 10cb82: c3 ret 10cb83: 90 nop <== NOT EXECUTED return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10cb84: 89 50 04 mov %edx,0x4(%eax) 10cb87: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10cb89: c9 leave 10cb8a: c3 ret 0010b0d0 : int pthread_setcancelstate( int state, int *oldstate ) { 10b0d0: 55 push %ebp 10b0d1: 89 e5 mov %esp,%ebp 10b0d3: 53 push %ebx 10b0d4: 83 ec 04 sub $0x4,%esp 10b0d7: 8b 4d 08 mov 0x8(%ebp),%ecx 10b0da: 8b 55 0c mov 0xc(%ebp),%edx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b0dd: a1 54 89 12 00 mov 0x128954,%eax 10b0e2: 85 c0 test %eax,%eax 10b0e4: 75 16 jne 10b0fc return EPROTO; if ( !oldstate ) 10b0e6: 85 d2 test %edx,%edx 10b0e8: 74 05 je 10b0ef return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b0ea: 83 f9 01 cmp $0x1,%ecx 10b0ed: 76 19 jbe 10b108 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b0ef: b8 16 00 00 00 mov $0x16,%eax } 10b0f4: 8b 5d fc mov -0x4(%ebp),%ebx 10b0f7: c9 leave 10b0f8: c3 ret 10b0f9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b0fc: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b101: 8b 5d fc mov -0x4(%ebp),%ebx 10b104: c9 leave 10b105: c3 ret 10b106: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b108: a1 78 89 12 00 mov 0x128978,%eax 10b10d: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b113: 8b 1d b8 88 12 00 mov 0x1288b8,%ebx 10b119: 43 inc %ebx 10b11a: 89 1d b8 88 12 00 mov %ebx,0x1288b8 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b120: 8b 98 cc 00 00 00 mov 0xcc(%eax),%ebx 10b126: 89 1a mov %ebx,(%edx) thread_support->cancelability_state = state; 10b128: 89 88 cc 00 00 00 mov %ecx,0xcc(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b12e: 83 ec 0c sub $0xc,%esp 10b131: ff 35 78 89 12 00 pushl 0x128978 10b137: e8 28 50 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b13c: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b13e: 83 c4 10 add $0x10,%esp } 10b141: 8b 5d fc mov -0x4(%ebp),%ebx 10b144: c9 leave 10b145: c3 ret 0010b148 : int pthread_setcanceltype( int type, int *oldtype ) { 10b148: 55 push %ebp 10b149: 89 e5 mov %esp,%ebp 10b14b: 53 push %ebx 10b14c: 83 ec 04 sub $0x4,%esp 10b14f: 8b 4d 08 mov 0x8(%ebp),%ecx 10b152: 8b 55 0c mov 0xc(%ebp),%edx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b155: a1 54 89 12 00 mov 0x128954,%eax 10b15a: 85 c0 test %eax,%eax 10b15c: 75 16 jne 10b174 return EPROTO; if ( !oldtype ) 10b15e: 85 d2 test %edx,%edx 10b160: 74 05 je 10b167 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b162: 83 f9 01 cmp $0x1,%ecx 10b165: 76 19 jbe 10b180 _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b167: b8 16 00 00 00 mov $0x16,%eax } 10b16c: 8b 5d fc mov -0x4(%ebp),%ebx 10b16f: c9 leave 10b170: c3 ret 10b171: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b174: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b179: 8b 5d fc mov -0x4(%ebp),%ebx 10b17c: c9 leave 10b17d: c3 ret 10b17e: 66 90 xchg %ax,%ax <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b180: a1 78 89 12 00 mov 0x128978,%eax 10b185: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b18b: 8b 1d b8 88 12 00 mov 0x1288b8,%ebx 10b191: 43 inc %ebx 10b192: 89 1d b8 88 12 00 mov %ebx,0x1288b8 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b198: 8b 98 d0 00 00 00 mov 0xd0(%eax),%ebx 10b19e: 89 1a mov %ebx,(%edx) thread_support->cancelability_type = type; 10b1a0: 89 88 d0 00 00 00 mov %ecx,0xd0(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b1a6: 83 ec 0c sub $0xc,%esp 10b1a9: ff 35 78 89 12 00 pushl 0x128978 10b1af: e8 b0 4f 00 00 call 110164 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b1b4: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b1b6: 83 c4 10 add $0x10,%esp } 10b1b9: 8b 5d fc mov -0x4(%ebp),%ebx 10b1bc: c9 leave 10b1bd: c3 ret 0010dbd0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10dbd0: 55 push %ebp 10dbd1: 89 e5 mov %esp,%ebp 10dbd3: 57 push %edi 10dbd4: 56 push %esi 10dbd5: 53 push %ebx 10dbd6: 83 ec 2c sub $0x2c,%esp 10dbd9: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10dbdc: 85 f6 test %esi,%esi 10dbde: 0f 84 c4 00 00 00 je 10dca8 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10dbe4: 8d 45 e0 lea -0x20(%ebp),%eax 10dbe7: 50 push %eax 10dbe8: 8d 45 e4 lea -0x1c(%ebp),%eax 10dbeb: 50 push %eax 10dbec: 56 push %esi 10dbed: ff 75 0c pushl 0xc(%ebp) 10dbf0: e8 07 55 00 00 call 1130fc <_POSIX_Thread_Translate_sched_param> 10dbf5: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10dbf7: 83 c4 10 add $0x10,%esp 10dbfa: 85 c0 test %eax,%eax 10dbfc: 74 0a je 10dc08 case OBJECTS_ERROR: break; } return ESRCH; } 10dbfe: 89 d8 mov %ebx,%eax 10dc00: 8d 65 f4 lea -0xc(%ebp),%esp 10dc03: 5b pop %ebx 10dc04: 5e pop %esi 10dc05: 5f pop %edi 10dc06: c9 leave 10dc07: c3 ret 10dc08: 50 push %eax 10dc09: 8d 45 dc lea -0x24(%ebp),%eax 10dc0c: 50 push %eax 10dc0d: ff 75 08 pushl 0x8(%ebp) 10dc10: 68 00 b7 12 00 push $0x12b700 10dc15: e8 2a 1f 00 00 call 10fb44 <_Objects_Get> 10dc1a: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dc1c: 83 c4 10 add $0x10,%esp 10dc1f: 8b 7d dc mov -0x24(%ebp),%edi 10dc22: 85 ff test %edi,%edi 10dc24: 0f 85 8e 00 00 00 jne 10dcb8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10dc2a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10dc30: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10dc33: 83 78 7c 03 cmpl $0x3,0x7c(%eax) 10dc37: 0f 84 c3 00 00 00 je 10dd00 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10dc3d: 8b 45 0c mov 0xc(%ebp),%eax 10dc40: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dc43: 89 41 7c mov %eax,0x7c(%ecx) api->schedparam = *param; 10dc46: 89 cf mov %ecx,%edi 10dc48: 83 ef 80 sub $0xffffff80,%edi 10dc4b: b9 06 00 00 00 mov $0x6,%ecx 10dc50: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10dc52: 8b 45 e4 mov -0x1c(%ebp),%eax 10dc55: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10dc58: 8b 45 e0 mov -0x20(%ebp),%eax 10dc5b: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10dc61: 8b 75 0c mov 0xc(%ebp),%esi 10dc64: 85 f6 test %esi,%esi 10dc66: 78 2e js 10dc96 <== ALWAYS TAKEN 10dc68: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10dc6c: 7f 56 jg 10dcc4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dc6e: a1 04 b4 12 00 mov 0x12b404,%eax 10dc73: 89 42 78 mov %eax,0x78(%edx) 10dc76: 0f b6 05 5c 72 12 00 movzbl 0x12725c,%eax 10dc7d: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dc80: 2b 81 80 00 00 00 sub 0x80(%ecx),%eax the_thread->real_priority = 10dc86: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10dc89: 51 push %ecx 10dc8a: 6a 01 push $0x1 10dc8c: 50 push %eax 10dc8d: 52 push %edx 10dc8e: e8 3d 22 00 00 call 10fed0 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10dc93: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10dc96: e8 1d 27 00 00 call 1103b8 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10dc9b: 89 d8 mov %ebx,%eax 10dc9d: 8d 65 f4 lea -0xc(%ebp),%esp 10dca0: 5b pop %ebx 10dca1: 5e pop %esi 10dca2: 5f pop %edi 10dca3: c9 leave 10dca4: c3 ret 10dca5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED int rc; /* * Check all the parameters */ if ( !param ) 10dca8: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10dcad: 89 d8 mov %ebx,%eax 10dcaf: 8d 65 f4 lea -0xc(%ebp),%esp 10dcb2: 5b pop %ebx 10dcb3: 5e pop %esi 10dcb4: 5f pop %edi 10dcb5: c9 leave 10dcb6: c3 ret 10dcb7: 90 nop <== NOT EXECUTED /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10dcb8: b3 03 mov $0x3,%bl case OBJECTS_ERROR: break; } return ESRCH; } 10dcba: 89 d8 mov %ebx,%eax 10dcbc: 8d 65 f4 lea -0xc(%ebp),%esp 10dcbf: 5b pop %ebx 10dcc0: 5e pop %esi 10dcc1: 5f pop %edi 10dcc2: c9 leave 10dcc3: c3 ret api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10dcc4: 83 7d 0c 03 cmpl $0x3,0xc(%ebp) 10dcc8: 75 cc jne 10dc96 <== ALWAYS TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10dcca: 8b 4d d4 mov -0x2c(%ebp),%ecx 10dccd: 8b 81 80 00 00 00 mov 0x80(%ecx),%eax 10dcd3: 89 81 98 00 00 00 mov %eax,0x98(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10dcd9: 83 ec 0c sub $0xc,%esp 10dcdc: 89 c8 mov %ecx,%eax 10dcde: 05 9c 00 00 00 add $0x9c,%eax 10dce3: 50 push %eax 10dce4: 89 55 d0 mov %edx,-0x30(%ebp) 10dce7: e8 a4 38 00 00 call 111590 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10dcec: 58 pop %eax 10dced: 5a pop %edx 10dcee: 8b 55 d0 mov -0x30(%ebp),%edx 10dcf1: 52 push %edx 10dcf2: 6a 00 push $0x0 10dcf4: e8 43 fe ff ff call 10db3c <_POSIX_Threads_Sporadic_budget_TSR> 10dcf9: 83 c4 10 add $0x10,%esp 10dcfc: eb 98 jmp 10dc96 <== ALWAYS TAKEN 10dcfe: 66 90 xchg %ax,%ax <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 10dd00: 83 ec 0c sub $0xc,%esp 10dd03: 05 9c 00 00 00 add $0x9c,%eax 10dd08: 50 push %eax 10dd09: 89 55 d0 mov %edx,-0x30(%ebp) 10dd0c: e8 7f 38 00 00 call 111590 <_Watchdog_Remove> 10dd11: 83 c4 10 add $0x10,%esp 10dd14: 8b 55 d0 mov -0x30(%ebp),%edx 10dd17: e9 21 ff ff ff jmp 10dc3d <== ALWAYS TAKEN 00111548 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 111548: 55 push %ebp 111549: 89 e5 mov %esp,%ebp 11154b: 57 push %edi 11154c: 56 push %esi 11154d: 53 push %ebx 11154e: 83 ec 0c sub $0xc,%esp 111551: 8b 4d 08 mov 0x8(%ebp),%ecx 111554: 8b 55 0c mov 0xc(%ebp),%edx 111557: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 11155a: 85 d2 test %edx,%edx 11155c: 0f 84 9a 00 00 00 je 1115fc rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111562: 8b 35 78 94 12 00 mov 0x129478,%esi 111568: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 11156e: 85 db test %ebx,%ebx 111570: 74 0c je 11157e *oset = api->signals_blocked; 111572: 8b b8 c4 00 00 00 mov 0xc4(%eax),%edi 111578: 89 3b mov %edi,(%ebx) if ( !set ) 11157a: 85 d2 test %edx,%edx 11157c: 74 42 je 1115c0 return 0; switch ( how ) { 11157e: 83 f9 01 cmp $0x1,%ecx 111581: 74 6d je 1115f0 111583: 83 f9 02 cmp $0x2,%ecx 111586: 74 44 je 1115cc 111588: 85 c9 test %ecx,%ecx 11158a: 75 4c jne 1115d8 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 11158c: 8b 12 mov (%edx),%edx 11158e: 89 90 c4 00 00 00 mov %edx,0xc4(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 111594: 8b 15 80 9b 12 00 mov 0x129b80,%edx 11159a: 0b 90 c8 00 00 00 or 0xc8(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 1115a0: 8b 80 c4 00 00 00 mov 0xc4(%eax),%eax 1115a6: f7 d0 not %eax 1115a8: 85 c2 test %eax,%edx 1115aa: 74 14 je 1115c0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 1115ac: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 1115b0: e8 bf cc ff ff call 10e274 <_Thread_Dispatch> 1115b5: 31 c0 xor %eax,%eax } return 0; } 1115b7: 83 c4 0c add $0xc,%esp 1115ba: 5b pop %ebx 1115bb: 5e pop %esi 1115bc: 5f pop %edi 1115bd: c9 leave 1115be: c3 ret 1115bf: 90 nop <== NOT EXECUTED /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 1115c0: 31 c0 xor %eax,%eax } return 0; } 1115c2: 83 c4 0c add $0xc,%esp 1115c5: 5b pop %ebx 1115c6: 5e pop %esi 1115c7: 5f pop %edi 1115c8: c9 leave 1115c9: c3 ret 1115ca: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 1115cc: 8b 12 mov (%edx),%edx 1115ce: f7 d2 not %edx 1115d0: 21 90 c4 00 00 00 and %edx,0xc4(%eax) break; 1115d6: eb bc jmp 111594 <== ALWAYS TAKEN case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1115d8: e8 1f 30 00 00 call 1145fc <__errno> 1115dd: c7 00 16 00 00 00 movl $0x16,(%eax) 1115e3: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 1115e8: 83 c4 0c add $0xc,%esp 1115eb: 5b pop %ebx 1115ec: 5e pop %esi 1115ed: 5f pop %edi 1115ee: c9 leave 1115ef: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 1115f0: 8b 12 mov (%edx),%edx 1115f2: 09 90 c4 00 00 00 or %edx,0xc4(%eax) break; 1115f8: eb 9a jmp 111594 <== ALWAYS TAKEN 1115fa: 66 90 xchg %ax,%ax <== NOT EXECUTED sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 1115fc: 85 db test %ebx,%ebx 1115fe: 74 d8 je 1115d8 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 111600: 8b 35 78 94 12 00 mov 0x129478,%esi 111606: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 11160c: e9 61 ff ff ff jmp 111572 <== ALWAYS TAKEN 0010b5b0 : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 10b5b0: 55 push %ebp 10b5b1: 89 e5 mov %esp,%ebp 10b5b3: 83 ec 28 sub $0x28,%esp 10b5b6: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 10b5b9: 85 c0 test %eax,%eax 10b5bb: 74 2f je 10b5ec RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b5bd: 52 push %edx 10b5be: 8d 55 f4 lea -0xc(%ebp),%edx 10b5c1: 52 push %edx 10b5c2: ff 30 pushl (%eax) 10b5c4: 68 a0 89 12 00 push $0x1289a0 10b5c9: e8 ae 20 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b5ce: 83 c4 10 add $0x10,%esp 10b5d1: 8b 4d f4 mov -0xc(%ebp),%ecx 10b5d4: 85 c9 test %ecx,%ecx 10b5d6: 75 14 jne 10b5ec */ RTEMS_INLINE_ROUTINE bool _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 10b5d8: 8b 50 18 mov 0x18(%eax),%edx case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 10b5db: 85 d2 test %edx,%edx 10b5dd: 74 15 je 10b5f4 _Thread_Enable_dispatch(); 10b5df: e8 0c 29 00 00 call 10def0 <_Thread_Enable_dispatch> 10b5e4: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b5e9: c9 leave 10b5ea: c3 ret 10b5eb: 90 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); return 0; 10b5ec: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b5f1: c9 leave 10b5f2: c3 ret 10b5f3: 90 nop <== NOT EXECUTED if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b5f4: 83 ec 08 sub $0x8,%esp 10b5f7: 50 push %eax 10b5f8: 68 a0 89 12 00 push $0x1289a0 10b5fd: 89 45 e4 mov %eax,-0x1c(%ebp) 10b600: e8 43 1c 00 00 call 10d248 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 10b605: 58 pop %eax 10b606: 5a pop %edx 10b607: 8b 45 e4 mov -0x1c(%ebp),%eax 10b60a: 50 push %eax 10b60b: 68 a0 89 12 00 push $0x1289a0 10b610: e8 37 1f 00 00 call 10d54c <_Objects_Free> _POSIX_Spinlock_Free( the_spinlock ); _Thread_Enable_dispatch(); 10b615: e8 d6 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b61a: 31 c0 xor %eax,%eax return 0; 10b61c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b61f: c9 leave 10b620: c3 ret 0010b624 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 10b624: 55 push %ebp 10b625: 89 e5 mov %esp,%ebp 10b627: 56 push %esi 10b628: 53 push %ebx 10b629: 83 ec 20 sub $0x20,%esp 10b62c: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 10b62f: 85 db test %ebx,%ebx 10b631: 74 65 je 10b698 return EINVAL; switch ( pshared ) { 10b633: 8b 45 0c mov 0xc(%ebp),%eax 10b636: 85 c0 test %eax,%eax 10b638: 75 5e jne 10b698 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b63a: a1 98 86 12 00 mov 0x128698,%eax 10b63f: 40 inc %eax 10b640: a3 98 86 12 00 mov %eax,0x128698 * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 10b645: 83 ec 0c sub $0xc,%esp 10b648: 68 a0 89 12 00 push $0x1289a0 10b64d: e8 7a 1b 00 00 call 10d1cc <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 10b652: 83 c4 10 add $0x10,%esp 10b655: 85 c0 test %eax,%eax 10b657: 74 4b je 10b6a4 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 10b659: 83 ec 08 sub $0x8,%esp 10b65c: 8d 55 f4 lea -0xc(%ebp),%edx 10b65f: 52 push %edx 10b660: 8d 50 10 lea 0x10(%eax),%edx 10b663: 52 push %edx 10b664: 89 45 e4 mov %eax,-0x1c(%ebp) 10b667: e8 f4 15 00 00 call 10cc60 <_CORE_spinlock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b66c: 8b 45 e4 mov -0x1c(%ebp),%eax 10b66f: 8b 50 08 mov 0x8(%eax),%edx 10b672: 0f b7 f2 movzwl %dx,%esi 10b675: 8b 0d bc 89 12 00 mov 0x1289bc,%ecx 10b67b: 89 04 b1 mov %eax,(%ecx,%esi,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b67e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 10b685: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10b687: e8 64 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b68c: 31 c0 xor %eax,%eax return 0; 10b68e: 83 c4 10 add $0x10,%esp } 10b691: 8d 65 f8 lea -0x8(%ebp),%esp 10b694: 5b pop %ebx 10b695: 5e pop %esi 10b696: c9 leave 10b697: c3 ret _Objects_Open_u32( &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; 10b698: b8 16 00 00 00 mov $0x16,%eax } 10b69d: 8d 65 f8 lea -0x8(%ebp),%esp 10b6a0: 5b pop %ebx 10b6a1: 5e pop %esi 10b6a2: c9 leave 10b6a3: c3 ret _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { _Thread_Enable_dispatch(); 10b6a4: e8 47 28 00 00 call 10def0 <_Thread_Enable_dispatch> 10b6a9: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10b6ae: eb ed jmp 10b69d <== ALWAYS TAKEN 0010b6b0 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 10b6b0: 55 push %ebp 10b6b1: 89 e5 mov %esp,%ebp 10b6b3: 53 push %ebx 10b6b4: 83 ec 14 sub $0x14,%esp 10b6b7: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b6ba: 85 c0 test %eax,%eax 10b6bc: 74 1b je 10b6d9 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 10b6be: 53 push %ebx 10b6bf: 8d 55 f4 lea -0xc(%ebp),%edx 10b6c2: 52 push %edx 10b6c3: ff 30 pushl (%eax) 10b6c5: 68 a0 89 12 00 push $0x1289a0 10b6ca: e8 ad 1f 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b6cf: 83 c4 10 add $0x10,%esp 10b6d2: 8b 4d f4 mov -0xc(%ebp),%ecx 10b6d5: 85 c9 test %ecx,%ecx 10b6d7: 74 0b je 10b6e4 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b6d9: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b6de: 8b 5d fc mov -0x4(%ebp),%ebx 10b6e1: c9 leave 10b6e2: c3 ret 10b6e3: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, true, 0 ); 10b6e4: 52 push %edx 10b6e5: 6a 00 push $0x0 10b6e7: 6a 01 push $0x1 10b6e9: 83 c0 10 add $0x10,%eax 10b6ec: 50 push %eax 10b6ed: e8 e2 15 00 00 call 10ccd4 <_CORE_spinlock_Wait> 10b6f2: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b6f4: e8 f7 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b6f9: 89 1c 24 mov %ebx,(%esp) 10b6fc: e8 0b 00 00 00 call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b701: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b704: 8b 5d fc mov -0x4(%ebp),%ebx 10b707: c9 leave 10b708: c3 ret 0010b71c : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 10b71c: 55 push %ebp 10b71d: 89 e5 mov %esp,%ebp 10b71f: 53 push %ebx 10b720: 83 ec 14 sub $0x14,%esp 10b723: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b726: 85 c0 test %eax,%eax 10b728: 74 1b je 10b745 10b72a: 53 push %ebx 10b72b: 8d 55 f4 lea -0xc(%ebp),%edx 10b72e: 52 push %edx 10b72f: ff 30 pushl (%eax) 10b731: 68 a0 89 12 00 push $0x1289a0 10b736: e8 41 1f 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b73b: 83 c4 10 add $0x10,%esp 10b73e: 8b 4d f4 mov -0xc(%ebp),%ecx 10b741: 85 c9 test %ecx,%ecx 10b743: 74 0b je 10b750 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b745: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b74a: 8b 5d fc mov -0x4(%ebp),%ebx 10b74d: c9 leave 10b74e: c3 ret 10b74f: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, false, 0 ); 10b750: 52 push %edx 10b751: 6a 00 push $0x0 10b753: 6a 00 push $0x0 10b755: 83 c0 10 add $0x10,%eax 10b758: 50 push %eax 10b759: e8 76 15 00 00 call 10ccd4 <_CORE_spinlock_Wait> 10b75e: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b760: e8 8b 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b765: 89 1c 24 mov %ebx,(%esp) 10b768: e8 9f ff ff ff call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b76d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b770: 8b 5d fc mov -0x4(%ebp),%ebx 10b773: c9 leave 10b774: c3 ret 0010b778 : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 10b778: 55 push %ebp 10b779: 89 e5 mov %esp,%ebp 10b77b: 53 push %ebx 10b77c: 83 ec 14 sub $0x14,%esp 10b77f: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 10b782: 85 c0 test %eax,%eax 10b784: 74 1b je 10b7a1 10b786: 51 push %ecx 10b787: 8d 55 f4 lea -0xc(%ebp),%edx 10b78a: 52 push %edx 10b78b: ff 30 pushl (%eax) 10b78d: 68 a0 89 12 00 push $0x1289a0 10b792: e8 e5 1e 00 00 call 10d67c <_Objects_Get> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 10b797: 83 c4 10 add $0x10,%esp 10b79a: 8b 55 f4 mov -0xc(%ebp),%edx 10b79d: 85 d2 test %edx,%edx 10b79f: 74 0b je 10b7ac case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7a1: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b7a6: 8b 5d fc mov -0x4(%ebp),%ebx 10b7a9: c9 leave 10b7aa: c3 ret 10b7ab: 90 nop <== NOT EXECUTED the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 10b7ac: 83 ec 0c sub $0xc,%esp 10b7af: 83 c0 10 add $0x10,%eax 10b7b2: 50 push %eax 10b7b3: e8 cc 14 00 00 call 10cc84 <_CORE_spinlock_Release> 10b7b8: 89 c3 mov %eax,%ebx _Thread_Enable_dispatch(); 10b7ba: e8 31 27 00 00 call 10def0 <_Thread_Enable_dispatch> return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 10b7bf: 89 1c 24 mov %ebx,(%esp) 10b7c2: e8 45 ff ff ff call 10b70c <_POSIX_Spinlock_Translate_core_spinlock_return_code> <== ALWAYS TAKEN 10b7c7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b7ca: 8b 5d fc mov -0x4(%ebp),%ebx 10b7cd: c9 leave 10b7ce: c3 ret 0010b9d8 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10b9d8: 55 push %ebp 10b9d9: 89 e5 mov %esp,%ebp 10b9db: 83 ec 08 sub $0x8,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b9de: a1 b4 90 12 00 mov 0x1290b4,%eax 10b9e3: 85 c0 test %eax,%eax 10b9e5: 75 44 jne 10ba2b <== ALWAYS TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b9e7: a1 d8 90 12 00 mov 0x1290d8,%eax 10b9ec: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b9f2: 8b 15 18 90 12 00 mov 0x129018,%edx 10b9f8: 42 inc %edx 10b9f9: 89 15 18 90 12 00 mov %edx,0x129018 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10b9ff: 8b 90 cc 00 00 00 mov 0xcc(%eax),%edx 10ba05: 85 d2 test %edx,%edx 10ba07: 75 27 jne 10ba30 <== ALWAYS TAKEN thread_support->cancelation_requested ) 10ba09: 8b 80 d4 00 00 00 mov 0xd4(%eax),%eax 10ba0f: 85 c0 test %eax,%eax 10ba11: 74 1d je 10ba30 cancel = true; _Thread_Enable_dispatch(); 10ba13: e8 cc 25 00 00 call 10dfe4 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10ba18: 83 ec 08 sub $0x8,%esp 10ba1b: 6a ff push $0xffffffff 10ba1d: ff 35 d8 90 12 00 pushl 0x1290d8 10ba23: e8 a8 54 00 00 call 110ed0 <_POSIX_Thread_Exit> 10ba28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ba2b: c9 leave <== NOT EXECUTED 10ba2c: c3 ret <== NOT EXECUTED 10ba2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10ba30: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10ba31: e9 ae 25 00 00 jmp 10dfe4 <_Thread_Enable_dispatch> 0011272c : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 11272c: 55 push %ebp 11272d: 89 e5 mov %esp,%ebp 11272f: 57 push %edi 112730: 56 push %esi 112731: 53 push %ebx 112732: 83 ec 2c sub $0x2c,%esp 112735: 8b 5d 08 mov 0x8(%ebp),%ebx 112738: 8b 7d 0c mov 0xc(%ebp),%edi 11273b: 8b 45 10 mov 0x10(%ebp),%eax 11273e: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 112741: 85 db test %ebx,%ebx 112743: 0f 84 87 00 00 00 je 1127d0 return RTEMS_INVALID_NAME; if ( !id ) 112749: 85 f6 test %esi,%esi 11274b: 0f 84 bb 00 00 00 je 11280c return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 112751: f7 c7 10 00 00 00 test $0x10,%edi 112757: 0f 84 83 00 00 00 je 1127e0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 11275d: 85 c0 test %eax,%eax 11275f: 0f 84 87 00 00 00 je 1127ec if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 112765: 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; 11276c: 89 45 e4 mov %eax,-0x1c(%ebp) 11276f: a1 d8 73 12 00 mov 0x1273d8,%eax 112774: 40 inc %eax 112775: a3 d8 73 12 00 mov %eax,0x1273d8 * 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 ); 11277a: 83 ec 0c sub $0xc,%esp 11277d: 68 60 7e 12 00 push $0x127e60 112782: e8 09 a0 ff ff call 10c790 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 112787: 83 c4 10 add $0x10,%esp 11278a: 85 c0 test %eax,%eax 11278c: 74 6a je 1127f8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 11278e: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 112791: 83 ec 08 sub $0x8,%esp 112794: 8d 55 e0 lea -0x20(%ebp),%edx 112797: 52 push %edx 112798: 8d 50 14 lea 0x14(%eax),%edx 11279b: 52 push %edx 11279c: 89 45 d4 mov %eax,-0x2c(%ebp) 11279f: e8 5c 04 00 00 call 112c00 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1127a4: 8b 45 d4 mov -0x2c(%ebp),%eax 1127a7: 8b 50 08 mov 0x8(%eax),%edx 1127aa: 0f b7 fa movzwl %dx,%edi 1127ad: 8b 0d 7c 7e 12 00 mov 0x127e7c,%ecx 1127b3: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1127b6: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 1127b9: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 1127bb: e8 f4 ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 1127c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1127c2: 83 c4 10 add $0x10,%esp } 1127c5: 8d 65 f4 lea -0xc(%ebp),%esp 1127c8: 5b pop %ebx 1127c9: 5e pop %esi 1127ca: 5f pop %edi 1127cb: c9 leave 1127cc: c3 ret 1127cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1127d0: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1127d5: 8d 65 f4 lea -0xc(%ebp),%esp 1127d8: 5b pop %ebx 1127d9: 5e pop %esi 1127da: 5f pop %edi 1127db: c9 leave 1127dc: c3 ret 1127dd: 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; 1127e0: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 1127e7: eb 83 jmp 11276c <== ALWAYS TAKEN 1127e9: 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 ) 1127ec: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1127ee: 8d 65 f4 lea -0xc(%ebp),%esp 1127f1: 5b pop %ebx 1127f2: 5e pop %esi 1127f3: 5f pop %edi 1127f4: c9 leave 1127f5: c3 ret 1127f6: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 1127f8: e8 b7 ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 1127fd: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 112802: 8d 65 f4 lea -0xc(%ebp),%esp 112805: 5b pop %ebx 112806: 5e pop %esi 112807: 5f pop %edi 112808: c9 leave 112809: c3 ret 11280a: 66 90 xchg %ax,%ax <== NOT EXECUTED CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 11280c: b8 09 00 00 00 mov $0x9,%eax 112811: eb b2 jmp 1127c5 <== ALWAYS TAKEN 00112814 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 112814: 55 push %ebp 112815: 89 e5 mov %esp,%ebp 112817: 53 push %ebx 112818: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 11281b: 8d 45 f4 lea -0xc(%ebp),%eax 11281e: 50 push %eax 11281f: ff 75 08 pushl 0x8(%ebp) 112822: 68 60 7e 12 00 push $0x127e60 112827: e8 14 a4 ff ff call 10cc40 <_Objects_Get> 11282c: 89 c3 mov %eax,%ebx Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 11282e: 83 c4 10 add $0x10,%esp 112831: 8b 4d f4 mov -0xc(%ebp),%ecx 112834: 85 c9 test %ecx,%ecx 112836: 75 38 jne 112870 case OBJECTS_LOCAL: _CORE_barrier_Flush( 112838: 52 push %edx 112839: 6a 02 push $0x2 11283b: 6a 00 push $0x0 11283d: 8d 40 14 lea 0x14(%eax),%eax 112840: 50 push %eax 112841: e8 b2 b3 ff ff call 10dbf8 <_Thread_queue_Flush> &the_barrier->Barrier, NULL, CORE_BARRIER_WAS_DELETED ); _Objects_Close( &_Barrier_Information, &the_barrier->Object ); 112846: 59 pop %ecx 112847: 58 pop %eax 112848: 53 push %ebx 112849: 68 60 7e 12 00 push $0x127e60 11284e: e8 b9 9f ff ff call 10c80c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 112853: 58 pop %eax 112854: 5a pop %edx 112855: 53 push %ebx 112856: 68 60 7e 12 00 push $0x127e60 11285b: e8 b0 a2 ff ff call 10cb10 <_Objects_Free> _Barrier_Free( the_barrier ); _Thread_Enable_dispatch(); 112860: e8 4f ac ff ff call 10d4b4 <_Thread_Enable_dispatch> 112865: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 112867: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11286a: 8b 5d fc mov -0x4(%ebp),%ebx 11286d: c9 leave 11286e: c3 ret 11286f: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 112870: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112875: 8b 5d fc mov -0x4(%ebp),%ebx 112878: c9 leave 112879: c3 ret 001128e0 : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 1128e0: 55 push %ebp 1128e1: 89 e5 mov %esp,%ebp 1128e3: 53 push %ebx 1128e4: 83 ec 18 sub $0x18,%esp 1128e7: 8b 5d 08 mov 0x8(%ebp),%ebx 1128ea: 8d 45 f4 lea -0xc(%ebp),%eax 1128ed: 50 push %eax 1128ee: 53 push %ebx 1128ef: 68 60 7e 12 00 push $0x127e60 1128f4: e8 47 a3 ff ff call 10cc40 <_Objects_Get> Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 1128f9: 83 c4 10 add $0x10,%esp 1128fc: 8b 55 f4 mov -0xc(%ebp),%edx 1128ff: 85 d2 test %edx,%edx 112901: 75 35 jne 112938 <== ALWAYS TAKEN case OBJECTS_LOCAL: _CORE_barrier_Wait( 112903: 83 ec 0c sub $0xc,%esp 112906: 6a 00 push $0x0 112908: ff 75 0c pushl 0xc(%ebp) 11290b: 6a 01 push $0x1 11290d: 53 push %ebx 11290e: 83 c0 14 add $0x14,%eax 112911: 50 push %eax 112912: e8 4d 03 00 00 call 112c64 <_CORE_barrier_Wait> id, true, timeout, NULL ); _Thread_Enable_dispatch(); 112917: 83 c4 20 add $0x20,%esp 11291a: e8 95 ab ff ff call 10d4b4 <_Thread_Enable_dispatch> return _Barrier_Translate_core_barrier_return_code( 11291f: 83 ec 0c sub $0xc,%esp 112922: a1 98 74 12 00 mov 0x127498,%eax 112927: ff 70 34 pushl 0x34(%eax) 11292a: e8 61 0e 00 00 call 113790 <_Barrier_Translate_core_barrier_return_code> 11292f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 112932: 8b 5d fc mov -0x4(%ebp),%ebx 112935: c9 leave 112936: c3 ret 112937: 90 nop <== NOT EXECUTED { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 112938: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11293d: 8b 5d fc mov -0x4(%ebp),%ebx 112940: c9 leave 112941: 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 2c 22 13 00 00 cmpb $0x0,0x13222c 10be45: 74 0d je 10be54 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); 10be47: 8b 15 ac 22 13 00 mov 0x1322ac,%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 2c 22 13 00 00 cmpb $0x0,0x13222c 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 31 19 00 00 call 10d7e8 <_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 3a 98 00 00 call 115728 /* 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 62 12 00 divl 0x12622c 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 4c f0 16 00 00 cmpb $0x0,0x16f04c 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 39 19 00 00 call 1125c8 <_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 0012d96c : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 12d96c: 55 push %ebp 12d96d: 89 e5 mov %esp,%ebp 12d96f: 83 ec 08 sub $0x8,%esp 12d972: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 12d975: 85 c0 test %eax,%eax 12d977: 74 13 je 12d98c return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 12d979: 83 ec 0c sub $0xc,%esp 12d97c: 50 push %eax 12d97d: e8 e2 0f 00 00 call 12e964 <_TOD_Get_uptime_as_timespec> 12d982: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12d984: 83 c4 10 add $0x10,%esp } 12d987: c9 leave 12d988: c3 ret 12d989: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 12d98c: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 12d98e: c9 leave 12d98f: 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 62 12 00 imul 0x12622c,%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 18 22 13 00 mov 0x132218,%eax 10bfaa: 40 inc %eax 10bfab: a3 18 22 13 00 mov %eax,0x132218 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 11 19 00 00 call 10d8cc <_TOD_Set> _Thread_Enable_dispatch(); 10bfbb: e8 20 2c 00 00 call 10ebe0 <_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 a4 75 12 00 mov %eax,0x1275a4 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 c5 14 00 00 call 10c358 <_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 b8 74 12 00 push $0x1274b8 10ae9b: e8 04 37 00 00 call 10e5a4 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10aea0: e8 7f 31 00 00 call 10e024 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10aea5: a0 a8 74 12 00 mov 0x1274a8,%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 d8 73 12 00 mov 0x1273d8,%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 93 24 00 00 call 10d358 <_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 98 74 12 00 mov 0x127498,%ecx 10aee2: 8b 89 f4 00 00 00 mov 0xf4(%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 d8 73 12 00 mov 0x1273d8,%ecx 10aefa: 41 inc %ecx 10aefb: 89 0d d8 73 12 00 mov %ecx,0x1273d8 *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 a1 25 00 00 call 10d4b4 <_Thread_Enable_dispatch> return( _Thread_Executing->Wait.return_code ); 10af13: a1 98 74 12 00 mov 0x127498,%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 75 24 00 00 call 10d4d8 <_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 f4 00 00 00 mov 0xf4(%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 29 24 00 00 call 10d4b4 <_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 00110768 : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 110768: 55 push %ebp 110769: 89 e5 mov %esp,%ebp 11076b: 57 push %edi 11076c: 56 push %esi 11076d: 53 push %ebx 11076e: 83 ec 1c sub $0x1c,%esp 110771: 8b 75 0c mov 0xc(%ebp),%esi 110774: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 110777: 85 db test %ebx,%ebx 110779: 0f 84 85 00 00 00 je 110804 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 11077f: 8b 45 08 mov 0x8(%ebp),%eax 110782: 85 c0 test %eax,%eax 110784: 75 0e jne 110794 110786: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11078b: 8d 65 f4 lea -0xc(%ebp),%esp 11078e: 5b pop %ebx 11078f: 5e pop %esi 110790: 5f pop %edi 110791: c9 leave 110792: c3 ret 110793: 90 nop <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110794: a1 f8 4f 13 00 mov 0x134ff8,%eax 110799: 40 inc %eax 11079a: a3 f8 4f 13 00 mov %eax,0x134ff8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 11079f: 83 ec 0c sub $0xc,%esp 1107a2: 68 80 52 13 00 push $0x135280 1107a7: e8 e4 0c 00 00 call 111490 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 1107ac: 83 c4 10 add $0x10,%esp 1107af: 85 c0 test %eax,%eax 1107b1: 74 45 je 1107f8 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 1107b3: 8d 78 24 lea 0x24(%eax),%edi 1107b6: b9 08 00 00 00 mov $0x8,%ecx 1107bb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 1107bd: 83 ec 0c sub $0xc,%esp 1107c0: 8d 50 10 lea 0x10(%eax),%edx 1107c3: 52 push %edx 1107c4: 89 45 e4 mov %eax,-0x1c(%ebp) 1107c7: e8 3c 27 00 00 call 112f08 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1107cc: 8b 45 e4 mov -0x1c(%ebp),%eax 1107cf: 8b 50 08 mov 0x8(%eax),%edx 1107d2: 0f b7 f2 movzwl %dx,%esi 1107d5: 8b 0d 9c 52 13 00 mov 0x13529c,%ecx 1107db: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1107de: 8b 4d 08 mov 0x8(%ebp),%ecx 1107e1: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 1107e4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 1107e6: e8 39 1a 00 00 call 112224 <_Thread_Enable_dispatch> 1107eb: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1107ed: 83 c4 10 add $0x10,%esp } 1107f0: 8d 65 f4 lea -0xc(%ebp),%esp 1107f3: 5b pop %ebx 1107f4: 5e pop %esi 1107f5: 5f pop %edi 1107f6: c9 leave 1107f7: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 1107f8: e8 27 1a 00 00 call 112224 <_Thread_Enable_dispatch> 1107fd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 110802: eb 87 jmp 11078b <== ALWAYS TAKEN rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 110804: b8 09 00 00 00 mov $0x9,%eax 110809: eb 80 jmp 11078b <== ALWAYS TAKEN 0011080c : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 11080c: 55 push %ebp 11080d: 89 e5 mov %esp,%ebp 11080f: 53 push %ebx 110810: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 110813: 8d 45 f4 lea -0xc(%ebp),%eax 110816: 50 push %eax 110817: ff 75 08 pushl 0x8(%ebp) 11081a: 68 80 52 13 00 push $0x135280 11081f: e8 1c 11 00 00 call 111940 <_Objects_Get> 110824: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110826: 83 c4 10 add $0x10,%esp 110829: 8b 55 f4 mov -0xc(%ebp),%edx 11082c: 85 d2 test %edx,%edx 11082e: 75 38 jne 110868 case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 110830: 83 ec 0c sub $0xc,%esp 110833: 8d 40 10 lea 0x10(%eax),%eax 110836: 50 push %eax 110837: e8 cc 27 00 00 call 113008 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 11083c: 59 pop %ecx 11083d: 58 pop %eax 11083e: 53 push %ebx 11083f: 68 80 52 13 00 push $0x135280 110844: e8 c3 0c 00 00 call 11150c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 110849: 58 pop %eax 11084a: 5a pop %edx 11084b: 53 push %ebx 11084c: 68 80 52 13 00 push $0x135280 110851: e8 ba 0f 00 00 call 111810 <_Objects_Free> <== ALWAYS TAKEN _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 110856: e8 c9 19 00 00 call 112224 <_Thread_Enable_dispatch> 11085b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11085d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110860: 8b 5d fc mov -0x4(%ebp),%ebx 110863: c9 leave 110864: c3 ret 110865: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 110868: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11086d: 8b 5d fc mov -0x4(%ebp),%ebx 110870: c9 leave 110871: 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 a0 75 12 00 00 movl $0x0,0x1275a0 10bad5: 00 00 00 #endif /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); 10bad8: e8 b3 2d 00 00 call 10e890 <_CPU_Initialize> /* * Do this as early as possible to ensure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 10badd: e8 22 4e 00 00 call 110904 <_Debug_Manager_initialization> <== ALWAYS TAKEN _API_extensions_Initialization(); 10bae2: e8 21 02 00 00 call 10bd08 <_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 d8 73 12 00 01 movl $0x1,0x1273d8 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 7a 2b 00 00 call 10e670 <_Workspace_Handler_initialization> _User_extensions_Handler_initialization(); 10baf6: e8 71 26 00 00 call 10e16c <_User_extensions_Handler_initialization> _ISR_Handler_initialization(); 10bafb: e8 38 0c 00 00 call 10c738 <_ISR_Handler_initialization> <== ALWAYS TAKEN /* * Initialize the internal support API and allocator Mutex */ _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 10bb00: c7 05 b0 73 12 00 f0 movl $0x1273f0,0x1273b0 10bb07: 73 12 00 _API_Mutex_Initialization( 1 ); 10bb0a: 83 ec 0c sub $0xc,%esp 10bb0d: 6a 01 push $0x1 10bb0f: e8 10 03 00 00 call 10be24 <_API_Mutex_Initialization> <== ALWAYS TAKEN _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); 10bb14: c7 04 24 90 74 12 00 movl $0x127490,(%esp) 10bb1b: e8 88 02 00 00 call 10bda8 <_API_Mutex_Allocate> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { int index; _Priority_Major_bit_map = 0; 10bb20: 66 c7 05 8c 74 12 00 movw $0x0,0x12748c 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 20 75 12 movw $0x0,0x127520(%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 93 29 00 00 call 10e4d8 <_Watchdog_Handler_initialization> _TOD_Handler_initialization(); 10bb45: e8 da 07 00 00 call 10c324 <_TOD_Handler_initialization> <== ALWAYS TAKEN _Thread_Handler_initialization(); 10bb4a: e8 7d 1c 00 00 call 10d7cc <_Thread_Handler_initialization> _MPCI_Handler_initialization( RTEMS_TIMEOUT ); #endif /* MANAGERS */ _RTEMS_API_Initialize(); 10bb4f: e8 6c 01 00 00 call 10bcc0 <_RTEMS_API_Initialize> <== ALWAYS TAKEN _Extension_Manager_initialization(); 10bb54: e8 1b 00 00 00 call 10bb74 <_Extension_Manager_initialization> <== ALWAYS TAKEN _IO_Manager_initialization(); 10bb59: e8 82 00 00 00 call 10bbe0 <_IO_Manager_initialization> <== ALWAYS TAKEN #ifdef RTEMS_POSIX_API _POSIX_API_Initialize(); 10bb5e: e8 15 01 00 00 call 10bc78 <_POSIX_API_Initialize> <== ALWAYS TAKEN 10bb63: c7 05 a0 75 12 00 01 movl $0x1,0x1275a0 10bb6a: 00 00 00 _Thread_Create_idle(); /* * Scheduling can properly occur now as long as we avoid dispatching. */ } 10bb6d: 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(); 10bb6e: e9 15 17 00 00 jmp 10d288 <_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 f1 00 00 00 call 10bbb0 <_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 67 02 00 00 jmp 10bd2c <_API_extensions_Run_postdriver> <== ALWAYS TAKEN 00112a84 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112a84: 55 push %ebp 112a85: 89 e5 mov %esp,%ebp 112a87: 56 push %esi 112a88: 53 push %ebx 112a89: 8b 45 08 mov 0x8(%ebp),%eax 112a8c: 8b 4d 0c mov 0xc(%ebp),%ecx 112a8f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112a92: 39 05 00 7e 12 00 cmp %eax,0x127e00 112a98: 76 22 jbe 112abc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 112a9a: 8d 34 40 lea (%eax,%eax,2),%esi 112a9d: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112aa3: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112aa7: 85 d2 test %edx,%edx 112aa9: 74 1d je 112ac8 112aab: 89 5d 10 mov %ebx,0x10(%ebp) 112aae: 89 4d 0c mov %ecx,0xc(%ebp) 112ab1: 89 45 08 mov %eax,0x8(%ebp) } 112ab4: 5b pop %ebx 112ab5: 5e pop %esi 112ab6: 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; 112ab7: ff e2 jmp *%edx 112ab9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112abc: 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; } 112ac1: 5b pop %ebx 112ac2: 5e pop %esi 112ac3: c9 leave 112ac4: c3 ret 112ac5: 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; 112ac8: 31 c0 xor %eax,%eax } 112aca: 5b pop %ebx 112acb: 5e pop %esi 112acc: c9 leave 112acd: c3 ret 00112ad0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112ad0: 55 push %ebp 112ad1: 89 e5 mov %esp,%ebp 112ad3: 56 push %esi 112ad4: 53 push %ebx 112ad5: 8b 45 08 mov 0x8(%ebp),%eax 112ad8: 8b 4d 0c mov 0xc(%ebp),%ecx 112adb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112ade: 39 05 00 7e 12 00 cmp %eax,0x127e00 112ae4: 76 22 jbe 112b08 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 112ae6: 8d 34 40 lea (%eax,%eax,2),%esi 112ae9: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112aef: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112af3: 85 d2 test %edx,%edx 112af5: 74 1d je 112b14 112af7: 89 5d 10 mov %ebx,0x10(%ebp) 112afa: 89 4d 0c mov %ecx,0xc(%ebp) 112afd: 89 45 08 mov %eax,0x8(%ebp) } 112b00: 5b pop %ebx 112b01: 5e pop %esi 112b02: 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; 112b03: ff e2 jmp *%edx 112b05: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b08: 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; } 112b0d: 5b pop %ebx 112b0e: 5e pop %esi 112b0f: c9 leave 112b10: c3 ret 112b11: 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; 112b14: 31 c0 xor %eax,%eax } 112b16: 5b pop %ebx 112b17: 5e pop %esi 112b18: c9 leave 112b19: c3 ret 00110948 : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 110948: 55 push %ebp 110949: 89 e5 mov %esp,%ebp 11094b: 56 push %esi 11094c: 53 push %ebx 11094d: 8b 45 08 mov 0x8(%ebp),%eax 110950: 8b 4d 0c mov 0xc(%ebp),%ecx 110953: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 110956: 39 05 00 7e 12 00 cmp %eax,0x127e00 11095c: 76 1e jbe 11097c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 11095e: 8d 34 40 lea (%eax,%eax,2),%esi 110961: 8b 15 04 7e 12 00 mov 0x127e04,%edx 110967: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 11096a: 85 d2 test %edx,%edx 11096c: 74 1a je 110988 11096e: 89 5d 10 mov %ebx,0x10(%ebp) 110971: 89 4d 0c mov %ecx,0xc(%ebp) 110974: 89 45 08 mov %eax,0x8(%ebp) } 110977: 5b pop %ebx 110978: 5e pop %esi 110979: 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; 11097a: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 11097c: 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; } 110981: 5b pop %ebx 110982: 5e pop %esi 110983: c9 leave 110984: c3 ret 110985: 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; 110988: 31 c0 xor %eax,%eax } 11098a: 5b pop %ebx 11098b: 5e pop %esi 11098c: c9 leave 11098d: c3 ret 00112b1c : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b1c: 55 push %ebp 112b1d: 89 e5 mov %esp,%ebp 112b1f: 56 push %esi 112b20: 53 push %ebx 112b21: 8b 45 08 mov 0x8(%ebp),%eax 112b24: 8b 4d 0c mov 0xc(%ebp),%ecx 112b27: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b2a: 39 05 00 7e 12 00 cmp %eax,0x127e00 112b30: 76 22 jbe 112b54 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 112b32: 8d 34 40 lea (%eax,%eax,2),%esi 112b35: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112b3b: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b3f: 85 d2 test %edx,%edx 112b41: 74 1d je 112b60 112b43: 89 5d 10 mov %ebx,0x10(%ebp) 112b46: 89 4d 0c mov %ecx,0xc(%ebp) 112b49: 89 45 08 mov %eax,0x8(%ebp) } 112b4c: 5b pop %ebx 112b4d: 5e pop %esi 112b4e: 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; 112b4f: ff e2 jmp *%edx 112b51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b54: 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; } 112b59: 5b pop %ebx 112b5a: 5e pop %esi 112b5b: c9 leave 112b5c: c3 ret 112b5d: 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; 112b60: 31 c0 xor %eax,%eax } 112b62: 5b pop %ebx 112b63: 5e pop %esi 112b64: c9 leave 112b65: c3 ret 00112b68 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112b68: 55 push %ebp 112b69: 89 e5 mov %esp,%ebp 112b6b: 56 push %esi 112b6c: 53 push %ebx 112b6d: 8b 45 08 mov 0x8(%ebp),%eax 112b70: 8b 4d 0c mov 0xc(%ebp),%ecx 112b73: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112b76: 39 05 00 7e 12 00 cmp %eax,0x127e00 112b7c: 76 22 jbe 112ba0 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 112b7e: 8d 34 40 lea (%eax,%eax,2),%esi 112b81: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112b87: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112b8b: 85 d2 test %edx,%edx 112b8d: 74 1d je 112bac 112b8f: 89 5d 10 mov %ebx,0x10(%ebp) 112b92: 89 4d 0c mov %ecx,0xc(%ebp) 112b95: 89 45 08 mov %eax,0x8(%ebp) } 112b98: 5b pop %ebx 112b99: 5e pop %esi 112b9a: 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; 112b9b: ff e2 jmp *%edx 112b9d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112ba0: 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; } 112ba5: 5b pop %ebx 112ba6: 5e pop %esi 112ba7: c9 leave 112ba8: c3 ret 112ba9: 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; 112bac: 31 c0 xor %eax,%eax } 112bae: 5b pop %ebx 112baf: 5e pop %esi 112bb0: c9 leave 112bb1: c3 ret 0010d390 : 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 ) { 10d390: 55 push %ebp 10d391: 89 e5 mov %esp,%ebp 10d393: 57 push %edi 10d394: 56 push %esi 10d395: 53 push %ebx 10d396: 83 ec 0c sub $0xc,%esp 10d399: 8b 5d 08 mov 0x8(%ebp),%ebx 10d39c: 8b 75 0c mov 0xc(%ebp),%esi 10d39f: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d3a2: a1 80 d6 12 00 mov 0x12d680,%eax if ( rtems_interrupt_is_in_progress() ) 10d3a7: 8b 0d 94 cc 12 00 mov 0x12cc94,%ecx 10d3ad: 85 c9 test %ecx,%ecx 10d3af: 0f 85 ab 00 00 00 jne 10d460 return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d3b5: 85 d2 test %edx,%edx 10d3b7: 0f 84 e3 00 00 00 je 10d4a0 return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d3bd: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d3bf: 85 f6 test %esi,%esi 10d3c1: 0f 84 d9 00 00 00 je 10d4a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d3c7: 8b 3e mov (%esi),%edi 10d3c9: 85 ff test %edi,%edi 10d3cb: 0f 84 c3 00 00 00 je 10d494 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d3d1: 39 d8 cmp %ebx,%eax 10d3d3: 76 7b jbe 10d450 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d3d5: a1 f8 cb 12 00 mov 0x12cbf8,%eax 10d3da: 40 inc %eax 10d3db: a3 f8 cb 12 00 mov %eax,0x12cbf8 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d3e0: 85 db test %ebx,%ebx 10d3e2: 0f 85 88 00 00 00 jne 10d470 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d3e8: 8b 0d 80 d6 12 00 mov 0x12d680,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d3ee: 85 c9 test %ecx,%ecx 10d3f0: 0f 84 b7 00 00 00 je 10d4ad <== ALWAYS TAKEN 10d3f6: 8b 3d 84 d6 12 00 mov 0x12d684,%edi 10d3fc: 89 f8 mov %edi,%eax 10d3fe: eb 08 jmp 10d408 <== ALWAYS TAKEN 10d400: 43 inc %ebx 10d401: 83 c0 18 add $0x18,%eax 10d404: 39 d9 cmp %ebx,%ecx 10d406: 76 0b jbe 10d413 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d408: 83 38 00 cmpl $0x0,(%eax) 10d40b: 75 f3 jne 10d400 10d40d: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d411: 75 ed jne 10d400 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d413: 89 1a mov %ebx,(%edx) if ( m != n ) 10d415: 39 d9 cmp %ebx,%ecx 10d417: 0f 84 97 00 00 00 je 10d4b4 10d41d: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d420: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d423: b9 06 00 00 00 mov $0x6,%ecx 10d428: 89 c7 mov %eax,%edi 10d42a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d42c: e8 2f 1a 00 00 call 10ee60 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d431: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d438: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d43f: 89 5d 08 mov %ebx,0x8(%ebp) } 10d442: 83 c4 0c add $0xc,%esp 10d445: 5b pop %ebx 10d446: 5e pop %esi 10d447: 5f pop %edi 10d448: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d449: e9 62 85 00 00 jmp 1159b0 <== ALWAYS TAKEN 10d44e: 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 ) 10d450: 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 ); } 10d455: 83 c4 0c add $0xc,%esp 10d458: 5b pop %ebx 10d459: 5e pop %esi 10d45a: 5f pop %edi 10d45b: c9 leave 10d45c: c3 ret 10d45d: 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() ) 10d460: 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 ); } 10d465: 83 c4 0c add $0xc,%esp 10d468: 5b pop %ebx 10d469: 5e pop %esi 10d46a: 5f pop %edi 10d46b: c9 leave 10d46c: c3 ret 10d46d: 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; 10d470: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d473: c1 e0 03 shl $0x3,%eax 10d476: 03 05 84 d6 12 00 add 0x12d684,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d47c: 8b 38 mov (%eax),%edi 10d47e: 85 ff test %edi,%edi 10d480: 74 3e je 10d4c0 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(); 10d482: e8 d9 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d487: 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 ); } 10d48c: 83 c4 0c add $0xc,%esp 10d48f: 5b pop %ebx 10d490: 5e pop %esi 10d491: 5f pop %edi 10d492: c9 leave 10d493: 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; 10d494: 8b 4e 04 mov 0x4(%esi),%ecx 10d497: 85 c9 test %ecx,%ecx 10d499: 0f 85 32 ff ff ff jne 10d3d1 10d49f: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d4a0: b8 09 00 00 00 mov $0x9,%eax } 10d4a5: 83 c4 0c add $0xc,%esp 10d4a8: 5b pop %ebx 10d4a9: 5e pop %esi 10d4aa: 5f pop %edi 10d4ab: c9 leave 10d4ac: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d4ad: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d4b3: 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(); 10d4b4: e8 a7 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d4b9: b8 05 00 00 00 mov $0x5,%eax return sc; 10d4be: eb 95 jmp 10d455 <== 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; 10d4c0: 8b 48 04 mov 0x4(%eax),%ecx 10d4c3: 85 c9 test %ecx,%ecx 10d4c5: 75 bb jne 10d482 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d4c7: 89 1a mov %ebx,(%edx) 10d4c9: e9 55 ff ff ff jmp 10d423 <== ALWAYS TAKEN 0010d4d0 : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d4d0: 55 push %ebp 10d4d1: 89 e5 mov %esp,%ebp 10d4d3: 57 push %edi 10d4d4: 83 ec 04 sub $0x4,%esp 10d4d7: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d4da: 8b 15 94 cc 12 00 mov 0x12cc94,%edx 10d4e0: 85 d2 test %edx,%edx 10d4e2: 75 44 jne 10d528 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d4e4: 39 05 80 d6 12 00 cmp %eax,0x12d680 10d4ea: 77 0c ja 10d4f8 10d4ec: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d4f1: 5a pop %edx 10d4f2: 5f pop %edi 10d4f3: c9 leave 10d4f4: c3 ret 10d4f5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10d4f8: 8b 15 f8 cb 12 00 mov 0x12cbf8,%edx 10d4fe: 42 inc %edx 10d4ff: 89 15 f8 cb 12 00 mov %edx,0x12cbf8 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d505: 8d 14 40 lea (%eax,%eax,2),%edx 10d508: c1 e2 03 shl $0x3,%edx 10d50b: 03 15 84 d6 12 00 add 0x12d684,%edx 10d511: b9 18 00 00 00 mov $0x18,%ecx 10d516: 31 c0 xor %eax,%eax 10d518: 89 d7 mov %edx,%edi 10d51a: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d51c: e8 3f 19 00 00 call 10ee60 <_Thread_Enable_dispatch> 10d521: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d523: 5a pop %edx 10d524: 5f pop %edi 10d525: c9 leave 10d526: c3 ret 10d527: 90 nop <== NOT EXECUTED rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d528: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d52d: 5a pop %edx 10d52e: 5f pop %edi 10d52f: c9 leave 10d530: c3 ret 00112bb4 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 112bb4: 55 push %ebp 112bb5: 89 e5 mov %esp,%ebp 112bb7: 56 push %esi 112bb8: 53 push %ebx 112bb9: 8b 45 08 mov 0x8(%ebp),%eax 112bbc: 8b 4d 0c mov 0xc(%ebp),%ecx 112bbf: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bc2: 39 05 00 7e 12 00 cmp %eax,0x127e00 112bc8: 76 22 jbe 112bec return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 112bca: 8d 34 40 lea (%eax,%eax,2),%esi 112bcd: 8b 15 04 7e 12 00 mov 0x127e04,%edx 112bd3: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 112bd7: 85 d2 test %edx,%edx 112bd9: 74 1d je 112bf8 112bdb: 89 5d 10 mov %ebx,0x10(%ebp) 112bde: 89 4d 0c mov %ecx,0xc(%ebp) 112be1: 89 45 08 mov %eax,0x8(%ebp) } 112be4: 5b pop %ebx 112be5: 5e pop %esi 112be6: 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; 112be7: ff e2 jmp *%edx 112be9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 112bec: 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; } 112bf1: 5b pop %ebx 112bf2: 5e pop %esi 112bf3: c9 leave 112bf4: c3 ret 112bf5: 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; 112bf8: 31 c0 xor %eax,%eax } 112bfa: 5b pop %ebx 112bfb: 5e pop %esi 112bfc: c9 leave 112bfd: c3 ret 0010dd70 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10dd70: 55 push %ebp 10dd71: 89 e5 mov %esp,%ebp 10dd73: 57 push %edi 10dd74: 56 push %esi 10dd75: 53 push %ebx 10dd76: 83 ec 1c sub $0x1c,%esp 10dd79: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10dd7c: 85 ff test %edi,%edi 10dd7e: 74 4d je 10ddcd <== ALWAYS TAKEN 10dd80: 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 ] ) 10dd87: 8b 55 e4 mov -0x1c(%ebp),%edx 10dd8a: 8b 04 95 ec 21 13 00 mov 0x1321ec(,%edx,4),%eax 10dd91: 85 c0 test %eax,%eax 10dd93: 74 2f je 10ddc4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10dd95: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10dd98: 85 f6 test %esi,%esi 10dd9a: 74 28 je 10ddc4 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10dd9c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10dda1: 74 21 je 10ddc4 10dda3: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10dda8: 8b 46 1c mov 0x1c(%esi),%eax 10ddab: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10ddae: 85 c0 test %eax,%eax 10ddb0: 74 09 je 10ddbb <== ALWAYS TAKEN continue; (*routine)(the_thread); 10ddb2: 83 ec 0c sub $0xc,%esp 10ddb5: 50 push %eax 10ddb6: ff d7 call *%edi 10ddb8: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10ddbb: 43 inc %ebx 10ddbc: 0f b7 46 10 movzwl 0x10(%esi),%eax 10ddc0: 39 d8 cmp %ebx,%eax 10ddc2: 73 e4 jae 10dda8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10ddc4: ff 45 e4 incl -0x1c(%ebp) 10ddc7: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10ddcb: 75 ba jne 10dd87 (*routine)(the_thread); } } } 10ddcd: 8d 65 f4 lea -0xc(%ebp),%esp 10ddd0: 5b pop %ebx 10ddd1: 5e pop %esi 10ddd2: 5f pop %edi 10ddd3: c9 leave 10ddd4: 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 60 25 14 00 push $0x142560 115f35: e8 1e 4d 00 00 call 11ac58 <_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 d4 34 00 00 call 11943c <_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 ca 55 00 00 call 11b53c <_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 f8 10 13 00 mov 0x1310f8,%eax 113b15: 40 inc %eax 113b16: a3 f8 10 13 00 mov %eax,0x1310f8 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 113b1b: 89 4d d4 mov %ecx,-0x2c(%ebp) 113b1e: e8 5d 5a 00 00 call 119580 <_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 f1 10 00 00 call 114c40 <_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 a0 1a 13 00 push $0x131aa0 113b62: e8 15 1f 00 00 call 115a7c <_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 34 29 00 00 call 1164a0 <_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 bc 1a 13 00 mov 0x131abc,%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 ff 28 00 00 call 1164a0 <_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 f3 28 00 00 call 1164a0 <_Thread_Enable_dispatch> 113bad: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 113bb2: e9 2f ff ff ff jmp 113ae6 00117ae0 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 117ae0: 55 push %ebp 117ae1: 89 e5 mov %esp,%ebp 117ae3: 53 push %ebx 117ae4: 83 ec 18 sub $0x18,%esp 117ae7: 8d 45 f4 lea -0xc(%ebp),%eax 117aea: 50 push %eax 117aeb: ff 75 08 pushl 0x8(%ebp) 117aee: 68 00 5a 13 00 push $0x135a00 117af3: e8 48 9e ff ff call 111940 <_Objects_Get> 117af8: 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 ) { 117afa: 83 c4 10 add $0x10,%esp 117afd: 8b 4d f4 mov -0xc(%ebp),%ecx 117b00: 85 c9 test %ecx,%ecx 117b02: 75 3c jne 117b40 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 117b04: 83 ec 08 sub $0x8,%esp 117b07: 50 push %eax 117b08: 68 00 5a 13 00 push $0x135a00 117b0d: e8 fa 99 ff ff call 11150c <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 117b12: 83 c4 0c add $0xc,%esp 117b15: 6a 05 push $0x5 117b17: 6a 00 push $0x0 117b19: 8d 43 14 lea 0x14(%ebx),%eax 117b1c: 50 push %eax 117b1d: e8 0e 05 00 00 call 118030 <_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 ); 117b22: 58 pop %eax 117b23: 5a pop %edx 117b24: 53 push %ebx 117b25: 68 00 5a 13 00 push $0x135a00 117b2a: e8 e1 9c ff ff call 111810 <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 117b2f: e8 f0 a6 ff ff call 112224 <_Thread_Enable_dispatch> 117b34: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117b36: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b39: 8b 5d fc mov -0x4(%ebp),%ebx 117b3c: c9 leave 117b3d: c3 ret 117b3e: 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 ) { 117b40: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117b45: 8b 5d fc mov -0x4(%ebp),%ebx 117b48: c9 leave 117b49: 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 60 25 14 00 push $0x142560 11611f: e8 34 4b 00 00 call 11ac58 <_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 b8 33 00 00 call 1194fc <_CORE_message_queue_Flush> 116144: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116146: e8 f1 53 00 00 call 11b53c <_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 60 25 14 00 push $0x142560 11617f: e8 d4 4a 00 00 call 11ac58 <_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 9a 53 00 00 call 11b53c <_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 a0 1a 13 00 push $0x131aa0 113bff: e8 a8 1f 00 00 call 115bac <_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 d4 10 00 00 call 114d00 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 113c2c: 83 c4 20 add $0x20,%esp 113c2f: e8 6c 28 00 00 call 1164a0 <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 113c34: 83 ec 0c sub $0xc,%esp 113c37: a1 b8 11 13 00 mov 0x1311b8,%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 80 7d 12 00 push $0x127d80 10b279: e8 c2 19 00 00 call 10cc40 <_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 13 0c 00 00 call 10bec0 <_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 fd 21 00 00 call 10d4b4 <_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 60 25 14 00 push $0x142560 116311: e8 42 49 00 00 call 11ac58 <_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 0b 34 00 00 call 119750 <_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 ed 51 00 00 call 11b53c <_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 0010b7bc : const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 10b7bc: 55 push %ebp 10b7bd: 89 e5 mov %esp,%ebp 10b7bf: 83 ec 08 sub $0x8,%esp 10b7c2: 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 ) 10b7c5: 83 f8 01 cmp $0x1,%eax 10b7c8: 74 36 je 10b800 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b7ca: 83 f8 02 cmp $0x2,%eax 10b7cd: 74 29 je 10b7f8 api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b7cf: 83 f8 03 cmp $0x3,%eax 10b7d2: 74 08 je 10b7dc 10b7d4: b8 f9 1f 12 00 mov $0x121ff9,%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"; } 10b7d9: c9 leave 10b7da: c3 ret 10b7db: 90 nop <== NOT EXECUTED if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 10b7dc: b8 00 6f 12 00 mov $0x126f00,%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 ); 10b7e1: 83 ec 08 sub $0x8,%esp 10b7e4: ff 75 0c pushl 0xc(%ebp) 10b7e7: 50 push %eax 10b7e8: e8 1f 48 00 00 call 11000c if ( class_assoc ) 10b7ed: 83 c4 10 add $0x10,%esp 10b7f0: 85 c0 test %eax,%eax 10b7f2: 74 14 je 10b808 return class_assoc->name; 10b7f4: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b7f6: c9 leave 10b7f7: c3 ret const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 10b7f8: b8 80 6e 12 00 mov $0x126e80,%eax 10b7fd: eb e2 jmp 10b7e1 <== ALWAYS TAKEN 10b7ff: 90 nop <== NOT EXECUTED ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 10b800: b8 60 6e 12 00 mov $0x126e60,%eax 10b805: eb da jmp 10b7e1 <== ALWAYS TAKEN 10b807: 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 ) 10b808: b8 01 20 12 00 mov $0x122001,%eax return class_assoc->name; return "BAD CLASS"; } 10b80d: c9 leave 10b80e: c3 ret 0010b810 : }; const char *rtems_object_get_api_name( int api ) { 10b810: 55 push %ebp 10b811: 89 e5 mov %esp,%ebp 10b813: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10b816: ff 75 08 pushl 0x8(%ebp) 10b819: 68 a0 6f 12 00 push $0x126fa0 10b81e: e8 e9 47 00 00 call 11000c if ( api_assoc ) 10b823: 83 c4 10 add $0x10,%esp 10b826: 85 c0 test %eax,%eax 10b828: 74 06 je 10b830 return api_assoc->name; 10b82a: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10b82c: c9 leave 10b82d: c3 ret 10b82e: 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 ) 10b830: b8 01 20 12 00 mov $0x122001,%eax return api_assoc->name; return "BAD CLASS"; } 10b835: c9 leave 10b836: c3 ret 0010cd38 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10cd38: 55 push %ebp 10cd39: 89 e5 mov %esp,%ebp 10cd3b: 57 push %edi 10cd3c: 56 push %esi 10cd3d: 53 push %ebx 10cd3e: 83 ec 0c sub $0xc,%esp 10cd41: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cd44: 85 db test %ebx,%ebx 10cd46: 74 5c je 10cda4 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10cd48: 83 ec 08 sub $0x8,%esp 10cd4b: ff 75 0c pushl 0xc(%ebp) 10cd4e: ff 75 08 pushl 0x8(%ebp) 10cd51: e8 a2 1a 00 00 call 10e7f8 <_Objects_Get_information> if ( !obj_info ) 10cd56: 83 c4 10 add $0x10,%esp 10cd59: 85 c0 test %eax,%eax 10cd5b: 74 57 je 10cdb4 return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10cd5d: 8b 50 08 mov 0x8(%eax),%edx 10cd60: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10cd62: 8b 50 0c mov 0xc(%eax),%edx 10cd65: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10cd68: 8a 50 12 mov 0x12(%eax),%dl 10cd6b: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10cd6e: 0f b7 70 10 movzwl 0x10(%eax),%esi 10cd72: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10cd75: 85 f6 test %esi,%esi 10cd77: 74 3f je 10cdb8 <== ALWAYS TAKEN 10cd79: 8b 78 1c mov 0x1c(%eax),%edi 10cd7c: b9 01 00 00 00 mov $0x1,%ecx 10cd81: b8 01 00 00 00 mov $0x1,%eax 10cd86: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10cd88: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10cd8c: 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++ ) 10cd8f: 40 inc %eax 10cd90: 89 c1 mov %eax,%ecx 10cd92: 39 c6 cmp %eax,%esi 10cd94: 73 f2 jae 10cd88 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10cd96: 89 53 10 mov %edx,0x10(%ebx) 10cd99: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10cd9b: 8d 65 f4 lea -0xc(%ebp),%esp 10cd9e: 5b pop %ebx 10cd9f: 5e pop %esi 10cda0: 5f pop %edi 10cda1: c9 leave 10cda2: c3 ret 10cda3: 90 nop <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10cda4: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10cda9: 8d 65 f4 lea -0xc(%ebp),%esp 10cdac: 5b pop %ebx 10cdad: 5e pop %esi 10cdae: 5f pop %edi 10cdaf: c9 leave 10cdb0: c3 ret 10cdb1: 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 ) 10cdb4: b0 0a mov $0xa,%al 10cdb6: eb e3 jmp 10cd9b <== 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++ ) 10cdb8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10cdba: eb da jmp 10cd96 <== 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 eb 1c 00 00 call 1119a8 <_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 ec be 12 00 mov 0x12beec(,%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 0010b844 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10b844: 55 push %ebp 10b845: 89 e5 mov %esp,%ebp 10b847: 57 push %edi 10b848: 56 push %esi 10b849: 53 push %ebx 10b84a: 83 ec 1c sub $0x1c,%esp 10b84d: 8b 75 08 mov 0x8(%ebp),%esi 10b850: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b853: 85 ff test %edi,%edi 10b855: 74 61 je 10b8b8 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b857: 85 f6 test %esi,%esi 10b859: 74 35 je 10b890 information = _Objects_Get_information_id( tmpId ); 10b85b: 83 ec 0c sub $0xc,%esp 10b85e: 56 push %esi 10b85f: e8 80 18 00 00 call 10d0e4 <_Objects_Get_information_id> 10b864: 89 c3 mov %eax,%ebx if ( !information ) 10b866: 83 c4 10 add $0x10,%esp 10b869: 85 c0 test %eax,%eax 10b86b: 74 16 je 10b883 return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10b86d: 50 push %eax 10b86e: 8d 45 e4 lea -0x1c(%ebp),%eax 10b871: 50 push %eax 10b872: 56 push %esi 10b873: 53 push %ebx 10b874: e8 0f 1a 00 00 call 10d288 <_Objects_Get> switch ( location ) { 10b879: 83 c4 10 add $0x10,%esp 10b87c: 8b 4d e4 mov -0x1c(%ebp),%ecx 10b87f: 85 c9 test %ecx,%ecx 10b881: 74 19 je 10b89c case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10b883: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b888: 8d 65 f4 lea -0xc(%ebp),%esp 10b88b: 5b pop %ebx 10b88c: 5e pop %esi 10b88d: 5f pop %edi 10b88e: c9 leave 10b88f: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10b890: a1 38 94 12 00 mov 0x129438,%eax 10b895: 8b 70 08 mov 0x8(%eax),%esi 10b898: eb c1 jmp 10b85b <== ALWAYS TAKEN 10b89a: 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 ); 10b89c: 52 push %edx 10b89d: 57 push %edi 10b89e: 50 push %eax 10b89f: 53 push %ebx 10b8a0: e8 df 1b 00 00 call 10d484 <_Objects_Set_name> _Thread_Enable_dispatch(); 10b8a5: e8 26 23 00 00 call 10dbd0 <_Thread_Enable_dispatch> 10b8aa: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b8ac: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b8af: 8d 65 f4 lea -0xc(%ebp),%esp 10b8b2: 5b pop %ebx 10b8b3: 5e pop %esi 10b8b4: 5f pop %edi 10b8b5: c9 leave 10b8b6: c3 ret 10b8b7: 90 nop <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10b8b8: b8 09 00 00 00 mov $0x9,%eax 10b8bd: eb c9 jmp 10b888 <== 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 b8 1b 14 00 mov 0x141bb8,%eax 1163e5: 40 inc %eax 1163e6: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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 40 1a 14 00 push $0x141a40 1163f3: 89 55 e0 mov %edx,-0x20(%ebp) 1163f6: e8 71 43 00 00 call 11a76c <_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 c6 2f 00 00 call 1193fc <_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 5c 1a 14 00 mov 0x141a5c,%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 e7 50 00 00 call 11b53c <_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 d7 50 00 00 call 11b53c <_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 40 1a 14 00 push $0x141a40 116482: e8 d1 47 00 00 call 11ac58 <_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 98 50 00 00 call 11b53c <_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 40 1a 14 00 push $0x141a40 1164b5: 89 45 e4 mov %eax,-0x1c(%ebp) 1164b8: e8 2b 43 00 00 call 11a7e8 <_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 40 1a 14 00 push $0x141a40 1164c8: e8 1f 46 00 00 call 11aaec <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 1164cd: e8 6a 50 00 00 call 11b53c <_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 40 1a 14 00 push $0x141a40 1164f8: e8 5b 47 00 00 call 11ac58 <_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 c3 2e 00 00 call 1193d8 <_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 15 50 00 00 call 11b53c <_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 e7 4f 00 00 call 11b53c <_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 40 1a 14 00 push $0x141a40 116597: e8 bc 46 00 00 call 11ac58 <_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 d3 2d 00 00 call 1193b4 <_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 53 4f 00 00 call 11b53c <_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 3f 4f 00 00 call 11b53c <_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 b8 1b 14 00 mov 0x141bb8,%eax 1159f1: 40 inc %eax 1159f2: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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 00 1a 14 00 push $0x141a00 1159ff: 89 55 e4 mov %edx,-0x1c(%ebp) 115a02: e8 65 4d 00 00 call 11a76c <_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 1c 1a 14 00 mov 0x141a1c,%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 05 5b 00 00 call 11b53c <_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 f3 5a 00 00 call 11b53c <_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 00 1a 14 00 push $0x141a00 115a62: e8 f1 51 00 00 call 11ac58 <_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 00 1a 14 00 push $0x141a00 115a7a: 89 45 e4 mov %eax,-0x1c(%ebp) 115a7d: e8 66 4d 00 00 call 11a7e8 <_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 00 1a 14 00 push $0x141a00 115a8d: e8 5a 50 00 00 call 11aaec <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 115a92: e8 a5 5a 00 00 call 11b53c <_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 00 1a 14 00 push $0x141a00 115ac7: e8 8c 51 00 00 call 11ac58 <_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 44 5a 00 00 call 11b53c <_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 00 1a 14 00 push $0x141a00 115b57: e8 fc 50 00 00 call 11ac58 <_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 b4 59 00 00 call 11b53c <_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 80 1a 14 00 push $0x141a80 11661f: e8 34 46 00 00 call 11ac58 <_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 78 1c 14 00 cmp 0x141c78,%eax 116645: 74 11 je 116658 _Thread_Enable_dispatch(); 116647: e8 f0 4e 00 00 call 11b53c <_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 1c 63 00 00 call 11c980 <_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 cc 4e 00 00 call 11b53c <_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 f8 94 12 00 mov 0x1294f8,%eax 10c1cc: 40 inc %eax 10c1cd: a3 f8 94 12 00 mov %eax,0x1294f8 * 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 00 94 12 00 push $0x129400 10c1da: e8 51 1e 00 00 call 10e030 <_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 b8 95 12 00 mov 0x1295b8,%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 1c 94 12 00 mov 0x12941c,%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 da 2b 00 00 call 10ee38 <_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 bb 2b 00 00 call 10ee38 <_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 0013d4b0 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 13d4b0: 55 push %ebp 13d4b1: 89 e5 mov %esp,%ebp 13d4b3: 53 push %ebx 13d4b4: 83 ec 24 sub $0x24,%esp 13d4b7: 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 ) 13d4ba: 85 db test %ebx,%ebx 13d4bc: 0f 84 92 00 00 00 je 13d554 13d4c2: 50 push %eax 13d4c3: 8d 45 f4 lea -0xc(%ebp),%eax 13d4c6: 50 push %eax 13d4c7: ff 75 08 pushl 0x8(%ebp) 13d4ca: 68 e0 fc 16 00 push $0x16fce0 13d4cf: e8 b4 5b fd ff call 113088 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d4d4: 83 c4 10 add $0x10,%esp 13d4d7: 8b 4d f4 mov -0xc(%ebp),%ecx 13d4da: 85 c9 test %ecx,%ecx 13d4dc: 74 0a je 13d4e8 13d4de: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d4e3: 8b 5d fc mov -0x4(%ebp),%ebx 13d4e6: c9 leave 13d4e7: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 13d4e8: 8b 50 40 mov 0x40(%eax),%edx 13d4eb: 8b 52 08 mov 0x8(%edx),%edx 13d4ee: 89 13 mov %edx,(%ebx) status->state = the_period->state; 13d4f0: 8b 50 38 mov 0x38(%eax),%edx 13d4f3: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 13d4f6: 85 d2 test %edx,%edx 13d4f8: 75 2a jne 13d524 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 13d4fa: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 13d501: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 13d508: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 13d50f: 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(); 13d516: e8 91 64 fd ff call 1139ac <_Thread_Enable_dispatch> 13d51b: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d51d: 8b 5d fc mov -0x4(%ebp),%ebx 13d520: c9 leave 13d521: c3 ret 13d522: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 13d524: 52 push %edx 13d525: 8d 55 ec lea -0x14(%ebp),%edx 13d528: 52 push %edx 13d529: 8d 55 e4 lea -0x1c(%ebp),%edx 13d52c: 52 push %edx 13d52d: 50 push %eax 13d52e: e8 b1 00 00 00 call 13d5e4 <_Rate_monotonic_Get_status> <== ALWAYS TAKEN the_period, &since_last_period, &executed ); if (!valid_status) { 13d533: 83 c4 10 add $0x10,%esp 13d536: 84 c0 test %al,%al 13d538: 74 26 je 13d560 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 13d53a: 8b 45 e4 mov -0x1c(%ebp),%eax 13d53d: 8b 55 e8 mov -0x18(%ebp),%edx 13d540: 89 43 08 mov %eax,0x8(%ebx) 13d543: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 13d546: 8b 45 ec mov -0x14(%ebp),%eax 13d549: 8b 55 f0 mov -0x10(%ebp),%edx 13d54c: 89 43 10 mov %eax,0x10(%ebx) 13d54f: 89 53 14 mov %edx,0x14(%ebx) 13d552: eb c2 jmp 13d516 <== ALWAYS TAKEN Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 13d554: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d559: 8b 5d fc mov -0x4(%ebp),%ebx 13d55c: c9 leave 13d55d: c3 ret 13d55e: 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(); 13d560: e8 47 64 fd ff call 1139ac <_Thread_Enable_dispatch> 13d565: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 13d56a: e9 74 ff ff ff jmp 13d4e3 <== ALWAYS TAKEN 0013d76c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 13d76c: 55 push %ebp 13d76d: 89 e5 mov %esp,%ebp 13d76f: 57 push %edi 13d770: 56 push %esi 13d771: 53 push %ebx 13d772: 83 ec 30 sub $0x30,%esp 13d775: 8b 5d 08 mov 0x8(%ebp),%ebx 13d778: 8b 75 0c mov 0xc(%ebp),%esi 13d77b: 8d 45 e4 lea -0x1c(%ebp),%eax 13d77e: 50 push %eax 13d77f: 53 push %ebx 13d780: 68 e0 fc 16 00 push $0x16fce0 13d785: e8 fe 58 fd ff call 113088 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 13d78a: 83 c4 10 add $0x10,%esp 13d78d: 8b 7d e4 mov -0x1c(%ebp),%edi 13d790: 85 ff test %edi,%edi 13d792: 74 10 je 13d7a4 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 13d794: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d799: 8d 65 f4 lea -0xc(%ebp),%esp 13d79c: 5b pop %ebx 13d79d: 5e pop %esi 13d79e: 5f pop %edi 13d79f: c9 leave 13d7a0: c3 ret 13d7a1: 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 ) ) { 13d7a4: 8b 50 40 mov 0x40(%eax),%edx 13d7a7: 3b 15 f8 f0 16 00 cmp 0x16f0f8,%edx 13d7ad: 74 15 je 13d7c4 _Thread_Enable_dispatch(); 13d7af: e8 f8 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d7b4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 13d7b9: 8d 65 f4 lea -0xc(%ebp),%esp 13d7bc: 5b pop %ebx 13d7bd: 5e pop %esi 13d7be: 5f pop %edi 13d7bf: c9 leave 13d7c0: c3 ret 13d7c1: 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 ) { 13d7c4: 85 f6 test %esi,%esi 13d7c6: 0f 84 b0 00 00 00 je 13d87c } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 13d7cc: 9c pushf 13d7cd: fa cli 13d7ce: 5f pop %edi switch ( the_period->state ) { 13d7cf: 8b 50 38 mov 0x38(%eax),%edx 13d7d2: 83 fa 02 cmp $0x2,%edx 13d7d5: 0f 84 bd 00 00 00 je 13d898 13d7db: 83 fa 04 cmp $0x4,%edx 13d7de: 74 5c je 13d83c 13d7e0: 85 d2 test %edx,%edx 13d7e2: 75 b0 jne 13d794 <== ALWAYS TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 13d7e4: 57 push %edi 13d7e5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 13d7e6: 83 ec 0c sub $0xc,%esp 13d7e9: 50 push %eax 13d7ea: 89 45 d4 mov %eax,-0x2c(%ebp) 13d7ed: e8 7e fd ff ff call 13d570 <_Rate_monotonic_Initiate_statistics> <== ALWAYS TAKEN the_period->state = RATE_MONOTONIC_ACTIVE; 13d7f2: 8b 45 d4 mov -0x2c(%ebp),%eax 13d7f5: 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; 13d7fc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 13d803: c7 40 2c 1c d9 13 00 movl $0x13d91c,0x2c(%eax) the_watchdog->id = id; 13d80a: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 13d80d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 13d814: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d817: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d81a: 5a pop %edx 13d81b: 59 pop %ecx 13d81c: 83 c0 10 add $0x10,%eax 13d81f: 50 push %eax 13d820: 68 18 f1 16 00 push $0x16f118 13d825: e8 ce 70 fd ff call 1148f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13d82a: e8 7d 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d82f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13d831: 83 c4 10 add $0x10,%esp 13d834: e9 60 ff ff ff jmp 13d799 <== ALWAYS TAKEN 13d839: 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 ); 13d83c: 83 ec 0c sub $0xc,%esp 13d83f: 50 push %eax 13d840: 89 45 d4 mov %eax,-0x2c(%ebp) 13d843: e8 34 fe ff ff call 13d67c <_Rate_monotonic_Update_statistics> <== ALWAYS TAKEN _ISR_Enable( level ); 13d848: 57 push %edi 13d849: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 13d84a: 8b 45 d4 mov -0x2c(%ebp),%eax 13d84d: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 13d854: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13d857: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13d85a: 59 pop %ecx 13d85b: 5b pop %ebx 13d85c: 83 c0 10 add $0x10,%eax 13d85f: 50 push %eax 13d860: 68 18 f1 16 00 push $0x16f118 13d865: e8 8e 70 fd ff call 1148f8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 13d86a: e8 3d 61 fd ff call 1139ac <_Thread_Enable_dispatch> 13d86f: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 13d874: 83 c4 10 add $0x10,%esp 13d877: e9 1d ff ff ff jmp 13d799 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 13d87c: 8b 40 38 mov 0x38(%eax),%eax 13d87f: 83 f8 04 cmp $0x4,%eax 13d882: 76 74 jbe 13d8f8 <== NEVER TAKEN 13d884: 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(); 13d886: 89 45 d4 mov %eax,-0x2c(%ebp) 13d889: e8 1e 61 fd ff call 1139ac <_Thread_Enable_dispatch> return( return_value ); 13d88e: 8b 45 d4 mov -0x2c(%ebp),%eax 13d891: e9 03 ff ff ff jmp 13d799 <== ALWAYS TAKEN 13d896: 66 90 xchg %ax,%ax <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 13d898: 83 ec 0c sub $0xc,%esp 13d89b: 50 push %eax 13d89c: 89 45 d4 mov %eax,-0x2c(%ebp) 13d89f: e8 d8 fd ff ff call 13d67c <_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; 13d8a4: 8b 45 d4 mov -0x2c(%ebp),%eax 13d8a7: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 13d8ae: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 13d8b1: 57 push %edi 13d8b2: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 13d8b3: 8b 15 f8 f0 16 00 mov 0x16f0f8,%edx 13d8b9: 8b 48 08 mov 0x8(%eax),%ecx 13d8bc: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 13d8bf: 5e pop %esi 13d8c0: 5f pop %edi 13d8c1: 68 00 40 00 00 push $0x4000 13d8c6: 52 push %edx 13d8c7: 89 45 d4 mov %eax,-0x2c(%ebp) 13d8ca: e8 a1 69 fd ff call 114270 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 13d8cf: 9c pushf 13d8d0: fa cli 13d8d1: 59 pop %ecx local_state = the_period->state; 13d8d2: 8b 45 d4 mov -0x2c(%ebp),%eax 13d8d5: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 13d8d8: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 13d8df: 51 push %ecx 13d8e0: 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 ) 13d8e1: 83 c4 10 add $0x10,%esp 13d8e4: 83 fa 03 cmp $0x3,%edx 13d8e7: 74 18 je 13d901 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 13d8e9: e8 be 60 fd ff call 1139ac <_Thread_Enable_dispatch> 13d8ee: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 13d8f0: e9 a4 fe ff ff jmp 13d799 <== ALWAYS TAKEN 13d8f5: 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 ) { 13d8f8: 8b 04 85 34 39 16 00 mov 0x163934(,%eax,4),%eax 13d8ff: eb 85 jmp 13d886 <== 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 ); 13d901: 83 ec 08 sub $0x8,%esp 13d904: 68 00 40 00 00 push $0x4000 13d909: ff 35 f8 f0 16 00 pushl 0x16f0f8 13d90f: e8 f0 5c fd ff call 113604 <_Thread_Clear_state> 13d914: 83 c4 10 add $0x10,%esp 13d917: eb d0 jmp 13d8e9 <== ALWAYS TAKEN 0012ddb8 : } } } void rtems_rate_monotonic_report_statistics( void ) { 12ddb8: 55 push %ebp 12ddb9: 89 e5 mov %esp,%ebp 12ddbb: 83 ec 10 sub $0x10,%esp rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 12ddbe: 68 c8 df 10 00 push $0x10dfc8 12ddc3: 6a 00 push $0x0 12ddc5: e8 0a fe ff ff call 12dbd4 <== ALWAYS TAKEN 12ddca: 83 c4 10 add $0x10,%esp } 12ddcd: c9 leave 12ddce: c3 ret 0012dbd4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 12dbd4: 55 push %ebp 12dbd5: 89 e5 mov %esp,%ebp 12dbd7: 57 push %edi 12dbd8: 56 push %esi 12dbd9: 53 push %ebx 12dbda: 83 ec 7c sub $0x7c,%esp 12dbdd: 8b 7d 08 mov 0x8(%ebp),%edi 12dbe0: 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 ) 12dbe3: 85 f6 test %esi,%esi 12dbe5: 0f 84 bd 00 00 00 je 12dca8 <== ALWAYS TAKEN return; (*print)( context, "Period information by period\n" ); 12dbeb: 83 ec 08 sub $0x8,%esp 12dbee: 68 68 ff 15 00 push $0x15ff68 12dbf3: 57 push %edi 12dbf4: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 12dbf6: 59 pop %ecx 12dbf7: 5b pop %ebx 12dbf8: 68 a0 ff 15 00 push $0x15ffa0 12dbfd: 57 push %edi 12dbfe: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 12dc00: 58 pop %eax 12dc01: 5a pop %edx 12dc02: 68 c4 ff 15 00 push $0x15ffc4 12dc07: 57 push %edi 12dc08: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 12dc0a: 59 pop %ecx 12dc0b: 5b pop %ebx 12dc0c: 68 e8 ff 15 00 push $0x15ffe8 12dc11: 57 push %edi 12dc12: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 12dc14: 58 pop %eax 12dc15: 5a pop %edx 12dc16: 68 34 00 16 00 push $0x160034 12dc1b: 57 push %edi 12dc1c: 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 ; 12dc1e: 8b 1d e8 fc 16 00 mov 0x16fce8,%ebx 12dc24: 83 c4 10 add $0x10,%esp 12dc27: 3b 1d ec fc 16 00 cmp 0x16fcec,%ebx 12dc2d: 77 79 ja 12dca8 <== 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); 12dc2f: 89 75 84 mov %esi,-0x7c(%ebp) 12dc32: eb 09 jmp 12dc3d <== 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++ ) { 12dc34: 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 ; 12dc35: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12dc3b: 72 6b jb 12dca8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 12dc3d: 83 ec 08 sub $0x8,%esp 12dc40: 8d 45 88 lea -0x78(%ebp),%eax 12dc43: 50 push %eax 12dc44: 53 push %ebx 12dc45: e8 ba f7 00 00 call 13d404 if ( status != RTEMS_SUCCESSFUL ) 12dc4a: 83 c4 10 add $0x10,%esp 12dc4d: 85 c0 test %eax,%eax 12dc4f: 75 e3 jne 12dc34 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 12dc51: 83 ec 08 sub $0x8,%esp 12dc54: 8d 55 c0 lea -0x40(%ebp),%edx 12dc57: 52 push %edx 12dc58: 53 push %ebx 12dc59: e8 52 f8 00 00 call 13d4b0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 12dc5e: 83 c4 0c add $0xc,%esp 12dc61: 8d 45 e3 lea -0x1d(%ebp),%eax 12dc64: 50 push %eax 12dc65: 6a 05 push $0x5 12dc67: ff 75 c0 pushl -0x40(%ebp) 12dc6a: e8 cd 36 fe ff call 11133c <== ALWAYS TAKEN /* * Print part of report line that is not dependent on granularity */ (*print)( context, 12dc6f: 59 pop %ecx 12dc70: 5e pop %esi 12dc71: ff 75 8c pushl -0x74(%ebp) 12dc74: ff 75 88 pushl -0x78(%ebp) 12dc77: 8d 55 e3 lea -0x1d(%ebp),%edx 12dc7a: 52 push %edx 12dc7b: 53 push %ebx 12dc7c: 68 86 ff 15 00 push $0x15ff86 12dc81: 57 push %edi 12dc82: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 12dc85: 8b 45 88 mov -0x78(%ebp),%eax 12dc88: 83 c4 20 add $0x20,%esp 12dc8b: 85 c0 test %eax,%eax 12dc8d: 75 21 jne 12dcb0 (*print)( context, "\n" ); 12dc8f: 83 ec 08 sub $0x8,%esp 12dc92: 68 61 1d 16 00 push $0x161d61 12dc97: 57 push %edi 12dc98: ff 55 84 call *-0x7c(%ebp) continue; 12dc9b: 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++ ) { 12dc9e: 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 ; 12dc9f: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12dca5: 73 96 jae 12dc3d <== NEVER TAKEN 12dca7: 90 nop <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 12dca8: 8d 65 f4 lea -0xc(%ebp),%esp 12dcab: 5b pop %ebx 12dcac: 5e pop %esi 12dcad: 5f pop %edi 12dcae: c9 leave 12dcaf: 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 ); 12dcb0: 52 push %edx 12dcb1: 8d 55 d8 lea -0x28(%ebp),%edx 12dcb4: 52 push %edx 12dcb5: 50 push %eax 12dcb6: 8d 45 a0 lea -0x60(%ebp),%eax 12dcb9: 50 push %eax 12dcba: e8 0d 17 00 00 call 12f3cc <_Timespec_Divide_by_integer> (*print)( context, 12dcbf: 8b 4d dc mov -0x24(%ebp),%ecx 12dcc2: be d3 4d 62 10 mov $0x10624dd3,%esi 12dcc7: 89 c8 mov %ecx,%eax 12dcc9: f7 ee imul %esi 12dccb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcd1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dcd7: c1 f8 06 sar $0x6,%eax 12dcda: c1 f9 1f sar $0x1f,%ecx 12dcdd: 29 c8 sub %ecx,%eax 12dcdf: 50 push %eax 12dce0: ff 75 d8 pushl -0x28(%ebp) 12dce3: 8b 4d 9c mov -0x64(%ebp),%ecx 12dce6: 89 c8 mov %ecx,%eax 12dce8: f7 ee imul %esi 12dcea: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dcf0: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dcf6: c1 f8 06 sar $0x6,%eax 12dcf9: c1 f9 1f sar $0x1f,%ecx 12dcfc: 29 c8 sub %ecx,%eax 12dcfe: 50 push %eax 12dcff: ff 75 98 pushl -0x68(%ebp) 12dd02: 8b 4d 94 mov -0x6c(%ebp),%ecx 12dd05: 89 c8 mov %ecx,%eax 12dd07: f7 ee imul %esi 12dd09: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dd0f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd15: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd1b: c1 f8 06 sar $0x6,%eax 12dd1e: c1 f9 1f sar $0x1f,%ecx 12dd21: 29 c8 sub %ecx,%eax 12dd23: 50 push %eax 12dd24: ff 75 90 pushl -0x70(%ebp) 12dd27: 68 80 00 16 00 push $0x160080 12dd2c: 57 push %edi 12dd2d: 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); 12dd30: 83 c4 2c add $0x2c,%esp 12dd33: 8d 55 d8 lea -0x28(%ebp),%edx 12dd36: 52 push %edx 12dd37: ff 75 88 pushl -0x78(%ebp) 12dd3a: 8d 45 b8 lea -0x48(%ebp),%eax 12dd3d: 50 push %eax 12dd3e: e8 89 16 00 00 call 12f3cc <_Timespec_Divide_by_integer> (*print)( context, 12dd43: 8b 4d dc mov -0x24(%ebp),%ecx 12dd46: 89 c8 mov %ecx,%eax 12dd48: f7 ee imul %esi 12dd4a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd50: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd56: c1 f8 06 sar $0x6,%eax 12dd59: c1 f9 1f sar $0x1f,%ecx 12dd5c: 29 c8 sub %ecx,%eax 12dd5e: 50 push %eax 12dd5f: ff 75 d8 pushl -0x28(%ebp) 12dd62: 8b 4d b4 mov -0x4c(%ebp),%ecx 12dd65: 89 c8 mov %ecx,%eax 12dd67: f7 ee imul %esi 12dd69: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd6f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 12dd75: c1 f8 06 sar $0x6,%eax 12dd78: c1 f9 1f sar $0x1f,%ecx 12dd7b: 29 c8 sub %ecx,%eax 12dd7d: 50 push %eax 12dd7e: ff 75 b0 pushl -0x50(%ebp) 12dd81: 8b 4d ac mov -0x54(%ebp),%ecx 12dd84: 89 c8 mov %ecx,%eax 12dd86: f7 ee imul %esi 12dd88: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 12dd8e: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 12dd94: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 12dd9a: c1 fe 06 sar $0x6,%esi 12dd9d: 89 c8 mov %ecx,%eax 12dd9f: 99 cltd 12dda0: 29 d6 sub %edx,%esi 12dda2: 56 push %esi 12dda3: ff 75 a8 pushl -0x58(%ebp) 12dda6: 68 a0 00 16 00 push $0x1600a0 12ddab: 57 push %edi 12ddac: ff 55 84 call *-0x7c(%ebp) 12ddaf: 83 c4 30 add $0x30,%esp 12ddb2: e9 7d fe ff ff jmp 12dc34 <== ALWAYS TAKEN 0012ddd0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 12ddd0: 55 push %ebp 12ddd1: 89 e5 mov %esp,%ebp 12ddd3: 53 push %ebx 12ddd4: 83 ec 04 sub $0x4,%esp 12ddd7: a1 38 f0 16 00 mov 0x16f038,%eax 12dddc: 40 inc %eax 12dddd: a3 38 f0 16 00 mov %eax,0x16f038 /* * 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 ; 12dde2: 8b 1d e8 fc 16 00 mov 0x16fce8,%ebx 12dde8: 3b 1d ec fc 16 00 cmp 0x16fcec,%ebx 12ddee: 77 15 ja 12de05 <== ALWAYS TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 12ddf0: 83 ec 0c sub $0xc,%esp 12ddf3: 53 push %ebx 12ddf4: e8 17 00 00 00 call 12de10 <== 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++ ) { 12ddf9: 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 ; 12ddfa: 83 c4 10 add $0x10,%esp 12ddfd: 39 1d ec fc 16 00 cmp %ebx,0x16fcec 12de03: 73 eb jae 12ddf0 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 12de05: 8b 5d fc mov -0x4(%ebp),%ebx 12de08: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 12de09: e9 9e 5b fe ff jmp 1139ac <_Thread_Enable_dispatch> 0012de10 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 12de10: 55 push %ebp 12de11: 89 e5 mov %esp,%ebp 12de13: 57 push %edi 12de14: 53 push %ebx 12de15: 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 *) 12de18: 8d 45 f4 lea -0xc(%ebp),%eax 12de1b: 50 push %eax 12de1c: ff 75 08 pushl 0x8(%ebp) 12de1f: 68 e0 fc 16 00 push $0x16fce0 12de24: e8 5f 52 fe ff call 113088 <_Objects_Get> 12de29: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 12de2b: 83 c4 10 add $0x10,%esp 12de2e: 8b 45 f4 mov -0xc(%ebp),%eax 12de31: 85 c0 test %eax,%eax 12de33: 75 3b jne 12de70 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 12de35: 8d 5a 54 lea 0x54(%edx),%ebx 12de38: b9 38 00 00 00 mov $0x38,%ecx 12de3d: 31 c0 xor %eax,%eax 12de3f: 89 df mov %ebx,%edi 12de41: f3 aa rep stos %al,%es:(%edi) 12de43: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 12de4a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 12de51: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 12de58: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 12de5f: e8 48 5b fe ff call 1139ac <_Thread_Enable_dispatch> 12de64: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de66: 8d 65 f8 lea -0x8(%ebp),%esp 12de69: 5b pop %ebx 12de6a: 5f pop %edi 12de6b: c9 leave 12de6c: c3 ret 12de6d: 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 ) { 12de70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12de75: 8d 65 f8 lea -0x8(%ebp),%esp 12de78: 5b pop %ebx 12de79: 5f pop %edi 12de7a: c9 leave 12de7b: 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 70 1c 14 00 pushl 0x141c70 116ded: e8 4a 25 00 00 call 11933c <_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 c0 1a 14 00 movl $0x141ac0,(%esp) 116df9: e8 6e 39 00 00 call 11a76c <_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 36 34 00 00 call 11a250 <_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 c0 1a 14 00 push $0x141ac0 116e30: e8 b7 3c 00 00 call 11aaec <_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 70 1c 14 00 pushl 0x141c70 116e46: 89 45 e4 mov %eax,-0x1c(%ebp) 116e49: e8 36 25 00 00 call 119384 <_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 2e 4e 00 00 call 11bcd8 <_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 dc 1a 14 00 mov 0x141adc,%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 70 1c 14 00 pushl 0x141c70 116ed9: e8 5e 24 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 116eed: e8 2a 3d 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 116f0a: e8 75 24 00 00 call 119384 <_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 c0 1a 14 00 push $0x141ac0 116f31: 89 45 e4 mov %eax,-0x1c(%ebp) 116f34: e8 af 38 00 00 call 11a7e8 <_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 c0 1a 14 00 push $0x141ac0 116f44: e8 a3 3b 00 00 call 11aaec <_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 70 1c 14 00 pushl 0x141c70 116f68: e8 cf 23 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 116f7c: e8 9b 3c 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 116f9b: e8 e4 23 00 00 call 119384 <_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 9b 2f 00 00 call 119f58 <_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 70 1c 14 00 pushl 0x141c70 11700b: e8 2c 23 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 11701f: e8 f8 3b 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 11703c: e8 43 23 00 00 call 119384 <_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 fa 30 00 00 call 11a168 <_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 70 1c 14 00 pushl 0x141c70 11709b: e8 9c 22 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 1170af: e8 68 3b 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 1170cc: e8 b3 22 00 00 call 119384 <_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 d7 30 00 00 call 11a1c0 <_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 70 1c 14 00 pushl 0x141c70 117135: e8 02 22 00 00 call 11933c <_API_Mutex_Lock> executing = _Thread_Executing; 11713a: a1 78 1c 14 00 mov 0x141c78,%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 c0 1a 14 00 push $0x141ac0 117151: e8 c6 3a 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 117175: 89 45 d0 mov %eax,-0x30(%ebp) 117178: e8 07 22 00 00 call 119384 <_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 02 2c 00 00 call 119da4 <_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 b8 1b 14 00 mov 0x141bb8,%eax 1171d2: 40 inc %eax 1171d3: a3 b8 1b 14 00 mov %eax,0x141bb8 * 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 70 1c 14 00 pushl 0x141c70 1171e1: e8 9e 21 00 00 call 119384 <_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 88 bd 11 00 push $0x11bd88 11720a: ff 75 14 pushl 0x14(%ebp) 11720d: 50 push %eax 11720e: e8 65 48 00 00 call 11ba78 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117213: e8 24 43 00 00 call 11b53c <_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 70 1c 14 00 pushl 0x141c70 117247: e8 f0 20 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 11725b: e8 bc 39 00 00 call 11ac1c <_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 0a 34 00 00 call 11a680 <_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 70 1c 14 00 pushl 0x141c70 117288: 89 45 e4 mov %eax,-0x1c(%ebp) 11728b: e8 f4 20 00 00 call 119384 <_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 70 1c 14 00 pushl 0x141c70 117300: e8 37 20 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 117314: e8 03 39 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 11732e: e8 51 20 00 00 call 119384 <_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 16 32 00 00 call 11a574 <_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 8d 77 00 00 call 11eb00 <_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 70 1c 14 00 pushl 0x141c70 117389: 89 45 e4 mov %eax,-0x1c(%ebp) 11738c: e8 f3 1f 00 00 call 119384 <_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 70 1c 14 00 pushl 0x141c70 1173b9: e8 7e 1f 00 00 call 11933c <_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 c0 1a 14 00 push $0x141ac0 1173cd: e8 4a 38 00 00 call 11ac1c <_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 70 1c 14 00 pushl 0x141c70 1173ec: e8 93 1f 00 00 call 119384 <_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 ed 2b 00 00 call 119ff8 <_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 d8 76 00 00 call 11eb00 <_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 d8 73 12 00 mov 0x1273d8,%eax 10b364: 40 inc %eax 10b365: a3 d8 73 12 00 mov %eax,0x1273d8 * 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 20 73 12 00 push $0x127320 10b372: 89 4d c4 mov %ecx,-0x3c(%ebp) 10b375: e8 16 14 00 00 call 10c790 <_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 35 0c 00 00 call 10c000 <_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 3c 73 12 00 mov 0x12733c,%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 c1 20 00 00 call 10d4b4 <_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 68 0e 00 00 call 10c2a4 <_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 6b 20 00 00 call 10d4b4 <_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 20 73 12 00 push $0x127320 10b48c: e8 7f 16 00 00 call 10cb10 <_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 1e 20 00 00 call 10d4b4 <_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 20 73 12 00 push $0x127320 10b4cf: e8 6c 17 00 00 call 10cc40 <_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 af 1f 00 00 call 10d4b4 <_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 d6 0a 00 00 call 10bff4 <_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 20 73 12 00 push $0x127320 10b52a: e8 dd 12 00 00 call 10c80c <_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 20 73 12 00 push $0x127320 10b537: e8 d4 15 00 00 call 10cb10 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10b53c: e8 73 1f 00 00 call 10d4b4 <_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 3e 0d 00 00 call 10c298 <_CORE_semaphore_Flush> 10b55a: 83 c4 10 add $0x10,%esp 10b55d: eb c2 jmp 10b521 <== ALWAYS TAKEN 00115500 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 115500: 55 push %ebp 115501: 89 e5 mov %esp,%ebp 115503: 83 ec 1c sub $0x1c,%esp 115506: 8d 45 f4 lea -0xc(%ebp),%eax 115509: 50 push %eax 11550a: ff 75 08 pushl 0x8(%ebp) 11550d: 68 40 cb 12 00 push $0x12cb40 115512: e8 55 90 ff ff call 10e56c <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 115517: 83 c4 10 add $0x10,%esp 11551a: 8b 55 f4 mov -0xc(%ebp),%edx 11551d: 85 d2 test %edx,%edx 11551f: 74 07 je 115528 115521: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115526: c9 leave 115527: c3 ret the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 115528: f6 40 10 30 testb $0x30,0x10(%eax) 11552c: 75 1a jne 115548 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 11552e: 52 push %edx 11552f: 6a 01 push $0x1 115531: 6a 00 push $0x0 115533: 83 c0 14 add $0x14,%eax 115536: 50 push %eax 115537: e8 30 86 ff ff call 10db6c <_CORE_semaphore_Flush> 11553c: 83 c4 10 add $0x10,%esp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 11553f: e8 1c 99 ff ff call 10ee60 <_Thread_Enable_dispatch> 115544: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 115546: c9 leave 115547: 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( 115548: 51 push %ecx 115549: 6a 01 push $0x1 11554b: 6a 00 push $0x0 11554d: 83 c0 14 add $0x14,%eax 115550: 50 push %eax 115551: e8 72 83 ff ff call 10d8c8 <_CORE_mutex_Flush> <== ALWAYS TAKEN 115556: 83 c4 10 add $0x10,%esp 115559: eb e4 jmp 11553f <== 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 20 73 12 00 push $0x127320 10b580: e8 63 16 00 00 call 10cbe8 <_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 3e 0b 00 00 call 10c0f8 <_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 98 74 12 00 mov 0x127498,%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 98 74 12 00 mov 0x127498,%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 98 74 12 00 mov 0x127498,%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 d8 73 12 00 mov 0x1273d8,%ecx 10b62a: 41 inc %ecx 10b62b: 89 0d d8 73 12 00 mov %ecx,0x1273d8 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 d4 dc 10 00 push $0x10dcd4 10b64b: 57 push %edi 10b64c: 50 push %eax 10b64d: e8 72 23 00 00 call 10d9c4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10b652: e8 5d 1e 00 00 call 10d4b4 <_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 20 73 12 00 push $0x127320 10b670: e8 cb 15 00 00 call 10cc40 <_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 45 0c 00 00 call 10c2e4 <_CORE_semaphore_Surrender> 10b69f: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10b6a1: e8 0e 1e 00 00 call 10d4b4 <_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 d3 0a 00 00 call 10c198 <_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 e8 1d 00 00 call 10d4b4 <_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 78 9c 12 00 mov 0x129c78,%eax 10c5fa: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10c600: 8b 0d b8 9b 12 00 mov 0x129bb8,%ecx 10c606: 41 inc %ecx 10c607: 89 0d b8 9b 12 00 mov %ecx,0x129bb8 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 41 21 00 00 call 10e760 <_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 10 21 00 00 call 10e760 <_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 5d 3c 00 00 call 11b58c <_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 f4 00 00 00 mov 0xf4(%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 54 1c 14 00 mov 0x141c54,%edx 117969: 85 d2 test %edx,%edx 11796b: 74 1b je 117988 11796d: 3b 05 78 1c 14 00 cmp 0x141c78,%eax 117973: 75 13 jne 117988 <== ALWAYS TAKEN _ISR_Signals_to_thread_executing = true; 117975: c6 05 28 1d 14 00 01 movb $0x1,0x141d28 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 af 3b 00 00 call 11b53c <_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 a3 3b 00 00 call 11b53c <_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 32 12 00 movzbl 0x123214,%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 90 74 12 00 pushl 0x127490 10b74c: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b74f: e8 ac 06 00 00 call 10be00 <_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 60 73 12 00 movl $0x127360,(%esp) 10b75b: e8 30 10 00 00 call 10c790 <_Objects_Allocate> 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 60 73 12 00 push $0x127360 10b7a2: 89 55 e4 mov %edx,-0x1c(%ebp) 10b7a5: e8 a6 1d 00 00 call 10d550 <_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 f4 00 00 00 mov 0xf4(%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 90 74 12 00 pushl 0x127490 10b7d7: e8 6c 06 00 00 call 10be48 <_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 79 13 00 00 call 10cb80 <_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 fd 12 00 00 call 10cb10 <_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 90 74 12 00 pushl 0x127490 10b81a: e8 29 06 00 00 call 10be48 <_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 90 74 12 00 pushl 0x127490 10b839: e8 0a 06 00 00 call 10be48 <_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 90 74 12 00 pushl 0x127490 10b869: e8 92 05 00 00 call 10be00 <_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 5c 1c 00 00 call 10d4d8 <_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 ed 12 00 00 call 10cb80 <_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 04 19 00 00 call 10d1a0 <_Thread_Close> 10b89c: 58 pop %eax 10b89d: ff 73 08 pushl 0x8(%ebx) 10b8a0: e8 db 12 00 00 call 10cb80 <_Objects_Get_information_id> 10b8a5: 5a pop %edx 10b8a6: 59 pop %ecx 10b8a7: 53 push %ebx 10b8a8: 50 push %eax 10b8a9: e8 62 12 00 00 call 10cb10 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10b8ae: 58 pop %eax 10b8af: ff 35 90 74 12 00 pushl 0x127490 10b8b5: e8 8e 05 00 00 call 10be48 <_API_Mutex_Unlock> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 10b8ba: e8 f5 1b 00 00 call 10d4b4 <_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 90 74 12 00 pushl 0x127490 10b8d5: e8 6e 05 00 00 call 10be48 <_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 c4 6c 12 00 00 cmpb $0x0,0x126cc4 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 58 b2 12 00 mov 0x12b258,%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 45 1f 00 00 call 10f22c <_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 f4 00 00 00 mov 0xf4(%eax),%eax 10d2f7: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10d2fb: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10d2fd: e8 06 1f 00 00 call 10f208 <_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 58 b2 12 00 mov 0x12b258,%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 f4 00 00 00 mov 0xf4(%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 98 74 12 00 mov 0x127498,%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 60 73 12 00 push $0x127360 10b916: e8 a9 14 00 00 call 10cdc4 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; 10b91b: 8b 04 85 6c 0d 12 00 mov 0x120d6c(,%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 8e 38 00 00 call 11b58c <_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 21 38 00 00 call 11b53c <_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 13 38 00 00 call 11b53c <_Thread_Enable_dispatch> 117d29: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117d2b: c9 leave 117d2c: c3 ret 00112944 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 112944: 55 push %ebp 112945: 89 e5 mov %esp,%ebp 112947: 57 push %edi 112948: 56 push %esi 112949: 53 push %ebx 11294a: 83 ec 1c sub $0x1c,%esp 11294d: 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 ) 112950: 85 c9 test %ecx,%ecx 112952: 0f 84 1c 01 00 00 je 112a74 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 112958: 8b 1d 98 74 12 00 mov 0x127498,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 11295e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 112964: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 112968: 19 f6 sbb %esi,%esi 11296a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 112970: 8b 53 7c mov 0x7c(%ebx),%edx 112973: 85 d2 test %edx,%edx 112975: 0f 85 b5 00 00 00 jne 112a30 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 11297b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 11297f: 19 d2 sbb %edx,%edx 112981: 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(); 112987: 89 55 e4 mov %edx,-0x1c(%ebp) 11298a: 89 4d e0 mov %ecx,-0x20(%ebp) 11298d: e8 1a bf ff ff call 10e8ac <_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; 112992: 8b 55 e4 mov -0x1c(%ebp),%edx 112995: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 112997: 09 f0 or %esi,%eax 112999: 8b 4d e0 mov -0x20(%ebp),%ecx 11299c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 11299e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 1129a5: 74 0f je 1129b6 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 1129a7: 8b 45 08 mov 0x8(%ebp),%eax 1129aa: c1 e8 08 shr $0x8,%eax 1129ad: 83 f0 01 xor $0x1,%eax 1129b0: 83 e0 01 and $0x1,%eax 1129b3: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 1129b6: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 1129bd: 74 18 je 1129d7 if ( _Modes_Is_timeslice(mode_set) ) { 1129bf: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 1129c6: 74 74 je 112a3c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 1129c8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 1129cf: a1 a4 73 12 00 mov 0x1273a4,%eax 1129d4: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 1129d7: f6 45 0c 01 testb $0x1,0xc(%ebp) 1129db: 74 07 je 1129e4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 1129dd: f6 45 08 01 testb $0x1,0x8(%ebp) 1129e1: 74 69 je 112a4c 1129e3: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 1129e4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 1129eb: 74 2c je 112a19 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 1129ed: 8b 45 08 mov 0x8(%ebp),%eax 1129f0: c1 e8 0a shr $0xa,%eax 1129f3: 83 f0 01 xor $0x1,%eax 1129f6: 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; 1129f9: 38 47 08 cmp %al,0x8(%edi) 1129fc: 74 1b je 112a19 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; 1129fe: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 112a01: 9c pushf 112a02: fa cli 112a03: 58 pop %eax _signals = information->signals_pending; 112a04: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 112a07: 8b 4f 14 mov 0x14(%edi),%ecx 112a0a: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 112a0d: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 112a10: 50 push %eax 112a11: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 112a12: 8b 47 14 mov 0x14(%edi),%eax 112a15: 85 c0 test %eax,%eax 112a17: 75 53 jne 112a6c 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; 112a19: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 112a1b: 83 3d a0 75 12 00 03 cmpl $0x3,0x1275a0 112a22: 74 2c je 112a50 <== NEVER TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 112a24: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112a26: 83 c4 1c add $0x1c,%esp 112a29: 5b pop %ebx 112a2a: 5e pop %esi 112a2b: 5f pop %edi 112a2c: c9 leave 112a2d: c3 ret 112a2e: 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; 112a30: 81 ce 00 02 00 00 or $0x200,%esi 112a36: e9 40 ff ff ff jmp 11297b <== ALWAYS TAKEN 112a3b: 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; 112a3c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 112a43: f6 45 0c 01 testb $0x1,0xc(%ebp) 112a47: 74 9b je 1129e4 112a49: eb 92 jmp 1129dd <== ALWAYS TAKEN 112a4b: 90 nop <== NOT EXECUTED 112a4c: fb sti 112a4d: eb 95 jmp 1129e4 112a4f: 90 nop <== NOT EXECUTED } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 112a50: e8 a7 02 00 00 call 112cfc <_Thread_Evaluate_mode> <== ALWAYS TAKEN 112a55: 84 c0 test %al,%al 112a57: 75 04 jne 112a5d 112a59: 84 db test %bl,%bl 112a5b: 74 c7 je 112a24 _Thread_Dispatch(); 112a5d: e8 f6 a8 ff ff call 10d358 <_Thread_Dispatch> 112a62: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 112a64: 83 c4 1c add $0x1c,%esp 112a67: 5b pop %ebx 112a68: 5e pop %esi 112a69: 5f pop %edi 112a6a: c9 leave 112a6b: 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; 112a6c: c6 43 74 01 movb $0x1,0x74(%ebx) 112a70: b3 01 mov $0x1,%bl 112a72: eb a7 jmp 112a1b <== ALWAYS TAKEN ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 112a74: 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; } 112a79: 83 c4 1c add $0x1c,%esp 112a7c: 5b pop %ebx 112a7d: 5e pop %esi 112a7e: 5f pop %edi 112a7f: c9 leave 112a80: 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 32 1c 00 00 call 10dfb0 <_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 50 24 00 00 call 10e7e4 <_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 ec 1b 00 00 call 10df8c <_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 d7 1b 00 00 call 10df8c <_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 12 1d 00 00 call 110e0c <_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 a5 1c 00 00 call 110dbc <_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 15 25 00 00 call 111640 <_Thread_Resume> _Thread_Enable_dispatch(); 10f12b: e8 8c 1c 00 00 call 110dbc <_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 c4 6c 12 00 00 cmpb $0x0,0x126cc4 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 58 b2 12 00 mov 0x12b258,%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 d1 1d 00 00 call 10f22c <_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 f4 00 00 00 mov 0xf4(%eax),%eax 10d46b: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10d46f: e8 94 1d 00 00 call 10f208 <_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 58 b2 12 00 mov 0x12b258,%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 f4 00 00 00 mov 0xf4(%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 54 8d 12 00 movzbl 0x128d54,%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 68 1e 00 00 call 111d04 <_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 04 19 00 00 call 1117cc <_Thread_Change_priority> 10fec8: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10fecb: e8 e4 1d 00 00 call 111cb4 <_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 1b 1b 00 00 call 10d4d8 <_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 ec 25 00 00 call 10dfc4 <_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 d0 1a 00 00 call 10d4b4 <_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 a7 1a 00 00 call 10d4b4 <_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 00110874 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 110874: 55 push %ebp 110875: 89 e5 mov %esp,%ebp 110877: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 11087a: 8d 45 f4 lea -0xc(%ebp),%eax 11087d: 50 push %eax 11087e: ff 75 08 pushl 0x8(%ebp) 110881: e8 52 cc ff ff call 10d4d8 <_Thread_Get> switch ( location ) { 110886: 83 c4 10 add $0x10,%esp 110889: 8b 55 f4 mov -0xc(%ebp),%edx 11088c: 85 d2 test %edx,%edx 11088e: 74 08 je 110898 110890: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110895: c9 leave 110896: c3 ret 110897: 90 nop <== NOT EXECUTED the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 110898: f6 40 10 02 testb $0x2,0x10(%eax) 11089c: 74 0e je 1108ac _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 11089e: e8 11 cc ff ff call 10d4b4 <_Thread_Enable_dispatch> 1108a3: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108a8: c9 leave 1108a9: c3 ret 1108aa: 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 ); 1108ac: 83 ec 0c sub $0xc,%esp 1108af: 50 push %eax 1108b0: e8 5b 0a 00 00 call 111310 <_Thread_Suspend> _Thread_Enable_dispatch(); 1108b5: e8 fa cb ff ff call 10d4b4 <_Thread_Enable_dispatch> 1108ba: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1108bc: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1108bf: c9 leave 1108c0: c3 ret 0012e344 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 12e344: 55 push %ebp 12e345: 89 e5 mov %esp,%ebp 12e347: 57 push %edi 12e348: 56 push %esi 12e349: 53 push %ebx 12e34a: 83 ec 1c sub $0x1c,%esp 12e34d: 8b 5d 0c mov 0xc(%ebp),%ebx 12e350: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e353: 85 db test %ebx,%ebx 12e355: 0f 84 9d 00 00 00 je 12e3f8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e35b: 83 ec 08 sub $0x8,%esp 12e35e: 8d 45 e4 lea -0x1c(%ebp),%eax 12e361: 50 push %eax 12e362: ff 75 08 pushl 0x8(%ebp) 12e365: e8 66 56 fe ff call 1139d0 <_Thread_Get> 12e36a: 89 c6 mov %eax,%esi switch (location) { 12e36c: 83 c4 10 add $0x10,%esp 12e36f: 8b 45 e4 mov -0x1c(%ebp),%eax 12e372: 85 c0 test %eax,%eax 12e374: 74 0e je 12e384 12e376: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e37b: 8d 65 f4 lea -0xc(%ebp),%esp 12e37e: 5b pop %ebx 12e37f: 5e pop %esi 12e380: 5f pop %edi 12e381: c9 leave 12e382: c3 ret 12e383: 90 nop <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 12e384: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 12e38a: 85 c0 test %eax,%eax 12e38c: 75 44 jne 12e3d2 12e38e: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 12e390: 83 ec 0c sub $0xc,%esp 12e393: 6a 14 push $0x14 12e395: e8 9a 67 fe ff call 114b34 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 12e39a: 83 c4 10 add $0x10,%esp 12e39d: 85 c0 test %eax,%eax 12e39f: 74 4b je 12e3ec _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 12e3a1: 8b 13 mov (%ebx),%edx 12e3a3: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 12e3a6: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 12e3a9: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 12e3ac: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 12e3b2: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 12e3b4: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 12e3ba: e8 ed 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3bf: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3c1: 8d 65 f4 lea -0xc(%ebp),%esp 12e3c4: 5b pop %ebx 12e3c5: 5e pop %esi 12e3c6: 5f pop %edi 12e3c7: c9 leave 12e3c8: c3 ret 12e3c9: 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; 12e3cc: 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) { 12e3ce: 85 c0 test %eax,%eax 12e3d0: 74 be je 12e390 if (tvp->ptr == ptr) { 12e3d2: 39 58 04 cmp %ebx,0x4(%eax) 12e3d5: 75 f5 jne 12e3cc tvp->dtor = dtor; 12e3d7: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 12e3da: e8 cd 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3df: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3e1: 8d 65 f4 lea -0xc(%ebp),%esp 12e3e4: 5b pop %ebx 12e3e5: 5e pop %esi 12e3e6: 5f pop %edi 12e3e7: c9 leave 12e3e8: c3 ret 12e3e9: 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(); 12e3ec: e8 bb 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e3f1: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 12e3f6: eb 83 jmp 12e37b <== ALWAYS TAKEN { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 12e3f8: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e3fd: 8d 65 f4 lea -0xc(%ebp),%esp 12e400: 5b pop %ebx 12e401: 5e pop %esi 12e402: 5f pop %edi 12e403: c9 leave 12e404: c3 ret 0012e408 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 12e408: 55 push %ebp 12e409: 89 e5 mov %esp,%ebp 12e40b: 53 push %ebx 12e40c: 83 ec 14 sub $0x14,%esp 12e40f: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 12e412: 85 db test %ebx,%ebx 12e414: 74 4c je 12e462 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 12e416: 83 ec 08 sub $0x8,%esp 12e419: 8d 45 f4 lea -0xc(%ebp),%eax 12e41c: 50 push %eax 12e41d: ff 75 08 pushl 0x8(%ebp) 12e420: e8 ab 55 fe ff call 1139d0 <_Thread_Get> switch (location) { 12e425: 83 c4 10 add $0x10,%esp 12e428: 8b 55 f4 mov -0xc(%ebp),%edx 12e42b: 85 d2 test %edx,%edx 12e42d: 74 0d je 12e43c 12e42f: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e434: 8b 5d fc mov -0x4(%ebp),%ebx 12e437: c9 leave 12e438: c3 ret 12e439: 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; 12e43c: 8b 90 04 01 00 00 mov 0x104(%eax),%edx while (tvp) { 12e442: 85 d2 test %edx,%edx 12e444: 74 17 je 12e45d if (tvp->ptr == ptr) { 12e446: 39 5a 04 cmp %ebx,0x4(%edx) 12e449: 75 0a jne 12e455 12e44b: eb 3c jmp 12e489 <== ALWAYS TAKEN 12e44d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 12e450: 39 5a 04 cmp %ebx,0x4(%edx) 12e453: 74 17 je 12e46c 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; 12e455: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 12e457: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 12e459: 85 d2 test %edx,%edx 12e45b: 75 f3 jne 12e450 <== NEVER TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e45d: e8 4a 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e462: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e467: 8b 5d fc mov -0x4(%ebp),%ebx 12e46a: c9 leave 12e46b: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 12e46c: 8b 1a mov (%edx),%ebx 12e46e: 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 ); 12e470: 83 ec 08 sub $0x8,%esp 12e473: 52 push %edx 12e474: 50 push %eax 12e475: e8 a2 00 00 00 call 12e51c <_RTEMS_Tasks_Invoke_task_variable_dtor> <== ALWAYS TAKEN _Thread_Enable_dispatch(); 12e47a: e8 2d 55 fe ff call 1139ac <_Thread_Enable_dispatch> 12e47f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 12e481: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e484: 8b 5d fc mov -0x4(%ebp),%ebx 12e487: c9 leave 12e488: 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; 12e489: 8b 0a mov (%edx),%ecx 12e48b: 89 88 04 01 00 00 mov %ecx,0x104(%eax) 12e491: eb dd jmp 12e470 <== ALWAYS TAKEN 0012e494 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 12e494: 55 push %ebp 12e495: 89 e5 mov %esp,%ebp 12e497: 56 push %esi 12e498: 53 push %ebx 12e499: 83 ec 10 sub $0x10,%esp 12e49c: 8b 5d 0c mov 0xc(%ebp),%ebx 12e49f: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 12e4a2: 85 db test %ebx,%ebx 12e4a4: 74 56 je 12e4fc return RTEMS_INVALID_ADDRESS; if ( !result ) 12e4a6: 85 f6 test %esi,%esi 12e4a8: 74 52 je 12e4fc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 12e4aa: 83 ec 08 sub $0x8,%esp 12e4ad: 8d 45 f4 lea -0xc(%ebp),%eax 12e4b0: 50 push %eax 12e4b1: ff 75 08 pushl 0x8(%ebp) 12e4b4: e8 17 55 fe ff call 1139d0 <_Thread_Get> switch (location) { 12e4b9: 83 c4 10 add $0x10,%esp 12e4bc: 8b 55 f4 mov -0xc(%ebp),%edx 12e4bf: 85 d2 test %edx,%edx 12e4c1: 75 2d jne 12e4f0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 12e4c3: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 12e4c9: 85 c0 test %eax,%eax 12e4cb: 75 09 jne 12e4d6 12e4cd: eb 39 jmp 12e508 <== ALWAYS TAKEN 12e4cf: 90 nop <== NOT EXECUTED */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 12e4d0: 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) { 12e4d2: 85 c0 test %eax,%eax 12e4d4: 74 32 je 12e508 <== ALWAYS TAKEN if (tvp->ptr == ptr) { 12e4d6: 39 58 04 cmp %ebx,0x4(%eax) 12e4d9: 75 f5 jne 12e4d0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 12e4db: 8b 40 0c mov 0xc(%eax),%eax 12e4de: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 12e4e0: e8 c7 54 fe ff call 1139ac <_Thread_Enable_dispatch> 12e4e5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4e7: 8d 65 f8 lea -0x8(%ebp),%esp 12e4ea: 5b pop %ebx 12e4eb: 5e pop %esi 12e4ec: c9 leave 12e4ed: c3 ret 12e4ee: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 12e4f0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e4f5: 8d 65 f8 lea -0x8(%ebp),%esp 12e4f8: 5b pop %ebx 12e4f9: 5e pop %esi 12e4fa: c9 leave 12e4fb: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 12e4fc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e501: 8d 65 f8 lea -0x8(%ebp),%esp 12e504: 5b pop %ebx 12e505: 5e pop %esi 12e506: c9 leave 12e507: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 12e508: e8 9f 54 fe ff call 1139ac <_Thread_Enable_dispatch> 12e50d: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12e512: 8d 65 f8 lea -0x8(%ebp),%esp 12e515: 5b pop %ebx 12e516: 5e pop %esi 12e517: c9 leave 12e518: 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 d8 73 12 00 mov 0x1273d8,%eax 10ba23: 40 inc %eax 10ba24: a3 d8 73 12 00 mov %eax,0x1273d8 _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 98 74 12 00 pushl 0x127498 10ba38: e8 3b 23 00 00 call 10dd78 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10ba3d: a1 98 74 12 00 mov 0x127498,%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 1c d3 10 00 movl $0x10d31c,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 b8 74 12 00 push $0x1274b8 10ba6b: e8 90 29 00 00 call 10e400 <_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 3c 1a 00 00 call 10d4b4 <_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 0b 26 00 00 call 10e090 <_Thread_Yield_processor> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); 10ba85: e8 2a 1a 00 00 call 10d4b4 <_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 cc 9d 12 00 00 cmpb $0x0,0x129dcc 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 4c 9e 12 00 cmp 0x129e4c,%eax 10c852: 76 e2 jbe 10c836 10c854: 8b 15 b8 9d 12 00 mov 0x129db8,%edx 10c85a: 42 inc %edx 10c85b: 89 15 b8 9d 12 00 mov %edx,0x129db8 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 78 9e 12 00 pushl 0x129e78 10c86c: 89 45 f4 mov %eax,-0xc(%ebp) 10c86f: e8 34 24 00 00 call 10eca8 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10c874: 8b 15 78 9e 12 00 mov 0x129e78,%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 4c e2 10 00 movl $0x10e24c,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 4c 9e 12 00 sub 0x129e4c,%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 8c 9e 12 00 push $0x129e8c 10c8ac: e8 f7 2a 00 00 call 10f3a8 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10c8b1: e8 2e 1b 00 00 call 10e3e4 <_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 a0 25 14 00 push $0x1425a0 11826a: e8 e9 29 00 00 call 11ac58 <_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 ee 46 00 00 call 11c980 <_Watchdog_Remove> 118292: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118295: e8 a2 32 00 00 call 11b53c <_Thread_Enable_dispatch> 11829a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11829c: c9 leave 11829d: c3 ret 0010bd4c : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10bd4c: 55 push %ebp 10bd4d: 89 e5 mov %esp,%ebp 10bd4f: 57 push %edi 10bd50: 56 push %esi 10bd51: 53 push %ebx 10bd52: 83 ec 0c sub $0xc,%esp 10bd55: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd58: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bd5b: 85 db test %ebx,%ebx 10bd5d: 74 6d je 10bdcc return RTEMS_INVALID_NAME; if ( !id ) 10bd5f: 85 f6 test %esi,%esi 10bd61: 0f 84 89 00 00 00 je 10bdf0 10bd67: a1 b8 88 12 00 mov 0x1288b8,%eax 10bd6c: 40 inc %eax 10bd6d: a3 b8 88 12 00 mov %eax,0x1288b8 * 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 ); 10bd72: 83 ec 0c sub $0xc,%esp 10bd75: 68 a0 92 12 00 push $0x1292a0 10bd7a: e8 5d 0e 00 00 call 10cbdc <_Objects_Allocate> <== ALWAYS TAKEN _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10bd7f: 83 c4 10 add $0x10,%esp 10bd82: 85 c0 test %eax,%eax 10bd84: 74 56 je 10bddc _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10bd86: 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; 10bd8d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bd94: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10bd9b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10bda2: 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; 10bda9: 8b 50 08 mov 0x8(%eax),%edx 10bdac: 0f b7 fa movzwl %dx,%edi 10bdaf: 8b 0d bc 92 12 00 mov 0x1292bc,%ecx 10bdb5: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bdb8: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10bdbb: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10bdbd: e8 3e 1b 00 00 call 10d900 <_Thread_Enable_dispatch> 10bdc2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10bdc4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdc7: 5b pop %ebx 10bdc8: 5e pop %esi 10bdc9: 5f pop %edi 10bdca: c9 leave 10bdcb: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10bdcc: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bdd1: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd4: 5b pop %ebx 10bdd5: 5e pop %esi 10bdd6: 5f pop %edi 10bdd7: c9 leave 10bdd8: c3 ret 10bdd9: 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(); 10bddc: e8 1f 1b 00 00 call 10d900 <_Thread_Enable_dispatch> 10bde1: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bde6: 8d 65 f4 lea -0xc(%ebp),%esp 10bde9: 5b pop %ebx 10bdea: 5e pop %esi 10bdeb: 5f pop %edi 10bdec: c9 leave 10bded: c3 ret 10bdee: 66 90 xchg %ax,%ax <== NOT EXECUTED Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bdf0: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10bdf5: 8d 65 f4 lea -0xc(%ebp),%esp 10bdf8: 5b pop %ebx 10bdf9: 5e pop %esi 10bdfa: 5f pop %edi 10bdfb: c9 leave 10bdfc: 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 a0 25 14 00 push $0x1425a0 118367: e8 ec 28 00 00 call 11ac58 <_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 a0 25 14 00 push $0x1425a0 118381: e8 62 24 00 00 call 11a7e8 <_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 ef 45 00 00 call 11c980 <_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 a0 25 14 00 push $0x1425a0 118399: e8 4e 27 00 00 call 11aaec <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 11839e: e8 99 31 00 00 call 11b53c <_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 0010be00 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10be00: 55 push %ebp 10be01: 89 e5 mov %esp,%ebp 10be03: 57 push %edi 10be04: 56 push %esi 10be05: 53 push %ebx 10be06: 83 ec 2c sub $0x2c,%esp 10be09: 8b 5d 0c mov 0xc(%ebp),%ebx 10be0c: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10be0f: 85 db test %ebx,%ebx 10be11: 0f 84 99 00 00 00 je 10beb0 return RTEMS_INVALID_NUMBER; if ( !routine ) 10be17: 85 f6 test %esi,%esi 10be19: 0f 84 b1 00 00 00 je 10bed0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10be1f: 57 push %edi 10be20: 8d 45 e4 lea -0x1c(%ebp),%eax 10be23: 50 push %eax 10be24: ff 75 08 pushl 0x8(%ebp) 10be27: 68 a0 92 12 00 push $0x1292a0 10be2c: e8 5b 12 00 00 call 10d08c <_Objects_Get> 10be31: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10be33: 83 c4 10 add $0x10,%esp 10be36: 8b 4d e4 mov -0x1c(%ebp),%ecx 10be39: 85 c9 test %ecx,%ecx 10be3b: 74 0f je 10be4c 10be3d: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be42: 8d 65 f4 lea -0xc(%ebp),%esp 10be45: 5b pop %ebx 10be46: 5e pop %esi 10be47: 5f pop %edi 10be48: c9 leave 10be49: c3 ret 10be4a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10be4c: 8d 50 10 lea 0x10(%eax),%edx 10be4f: 83 ec 0c sub $0xc,%esp 10be52: 52 push %edx 10be53: 89 55 d4 mov %edx,-0x2c(%ebp) 10be56: e8 29 2b 00 00 call 10e984 <_Watchdog_Remove> _ISR_Disable( level ); 10be5b: 9c pushf 10be5c: fa cli 10be5d: 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 ) { 10be5e: 83 c4 10 add $0x10,%esp 10be61: 8b 57 18 mov 0x18(%edi),%edx 10be64: 85 d2 test %edx,%edx 10be66: 8b 55 d4 mov -0x2c(%ebp),%edx 10be69: 75 55 jne 10bec0 /* * 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; 10be6b: 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; 10be72: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10be79: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10be7c: 8b 4d 08 mov 0x8(%ebp),%ecx 10be7f: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10be82: 8b 4d 14 mov 0x14(%ebp),%ecx 10be85: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10be88: 50 push %eax 10be89: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10be8a: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10be8d: 83 ec 08 sub $0x8,%esp 10be90: 52 push %edx 10be91: 68 98 89 12 00 push $0x128998 10be96: e8 b1 29 00 00 call 10e84c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10be9b: e8 60 1a 00 00 call 10d900 <_Thread_Enable_dispatch> 10bea0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bea2: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bea5: 8d 65 f4 lea -0xc(%ebp),%esp 10bea8: 5b pop %ebx 10bea9: 5e pop %esi 10beaa: 5f pop %edi 10beab: c9 leave 10beac: c3 ret 10bead: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10beb0: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10beb5: 8d 65 f4 lea -0xc(%ebp),%esp 10beb8: 5b pop %ebx 10beb9: 5e pop %esi 10beba: 5f pop %edi 10bebb: c9 leave 10bebc: c3 ret 10bebd: 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 ); 10bec0: 50 push %eax 10bec1: 9d popf _Thread_Enable_dispatch(); 10bec2: e8 39 1a 00 00 call 10d900 <_Thread_Enable_dispatch> 10bec7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bec9: e9 74 ff ff ff jmp 10be42 <== ALWAYS TAKEN 10bece: 66 90 xchg %ax,%ax <== NOT EXECUTED ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10bed0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bed5: 8d 65 f4 lea -0xc(%ebp),%esp 10bed8: 5b pop %ebx 10bed9: 5e pop %esi 10beda: 5f pop %edi 10bedb: c9 leave 10bedc: 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 cc 1b 14 00 00 cmpb $0x0,0x141bcc 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 4c 1c 14 00 cmp 0x141c4c,%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 a0 25 14 00 push $0x1425a0 11850b: e8 48 27 00 00 call 11ac58 <_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 54 44 00 00 call 11c980 <_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 4c 1c 14 00 sub 0x141c4c,%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 8c 1c 14 00 push $0x141c8c 11855d: e8 e6 42 00 00 call 11c848 <_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 d5 2f 00 00 call 11b53c <_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 a0 25 14 00 push $0x1425a0 1185a7: e8 ac 26 00 00 call 11ac58 <_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 60 2f 00 00 call 11b53c <_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 d4 95 13 00 movzbl 0x1395d4,%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 b8 1b 14 00 mov 0x141bb8,%edx 1188ce: 42 inc %edx 1188cf: 89 15 b8 1b 14 00 mov %edx,0x141bb8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 1188d5: 8a 1d 20 d4 13 00 mov 0x13d420,%bl initialized = true; 1188db: c6 05 20 d4 13 00 01 movb $0x1,0x13d420 _Thread_Enable_dispatch(); 1188e2: e8 55 2c 00 00 call 11b53c <_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 20 d4 13 00 00 movb $0x0,0x13d420 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 5c 1b 14 00 mov 0x141b5c,%edx 118940: 8b 14 8a mov (%edx,%ecx,4),%edx 118943: 89 15 40 d4 13 00 mov %edx,0x13d440 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118949: c7 05 70 d4 13 00 74 movl $0x13d474,0x13d470 118950: d4 13 00 the_chain->permanent_null = NULL; 118953: c7 05 74 d4 13 00 00 movl $0x0,0x13d474 11895a: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11895d: c7 05 78 d4 13 00 70 movl $0x13d470,0x13d478 118964: d4 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 118967: c7 05 a8 d4 13 00 ac movl $0x13d4ac,0x13d4a8 11896e: d4 13 00 the_chain->permanent_null = NULL; 118971: c7 05 ac d4 13 00 00 movl $0x0,0x13d4ac 118978: 00 00 00 the_chain->last = _Chain_Head(the_chain); 11897b: c7 05 b0 d4 13 00 a8 movl $0x13d4a8,0x13d4b0 118982: d4 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 118985: c7 05 50 d4 13 00 00 movl $0x0,0x13d450 11898c: 00 00 00 the_watchdog->routine = routine; 11898f: c7 05 64 d4 13 00 a4 movl $0x11b3a4,0x13d464 118996: b3 11 00 the_watchdog->id = id; 118999: a3 68 d4 13 00 mov %eax,0x13d468 the_watchdog->user_data = user_data; 11899e: c7 05 6c d4 13 00 00 movl $0x0,0x13d46c 1189a5: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1189a8: c7 05 88 d4 13 00 00 movl $0x0,0x13d488 1189af: 00 00 00 the_watchdog->routine = routine; 1189b2: c7 05 9c d4 13 00 a4 movl $0x11b3a4,0x13d49c 1189b9: b3 11 00 the_watchdog->id = id; 1189bc: a3 a0 d4 13 00 mov %eax,0x13d4a0 the_watchdog->user_data = user_data; 1189c1: c7 05 a4 d4 13 00 00 movl $0x0,0x13d4a4 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 44 d4 13 00 70 movl $0x118c70,0x13d444 1189d2: 8c 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 1189d5: 8b 15 24 1d 14 00 mov 0x141d24,%edx 1189db: 89 15 7c d4 13 00 mov %edx,0x13d47c ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 1189e1: 8b 15 4c 1c 14 00 mov 0x141c4c,%edx 1189e7: 89 15 b4 d4 13 00 mov %edx,0x13d4b4 ts->insert_chain = NULL; 1189ed: c7 05 b8 d4 13 00 00 movl $0x0,0x13d4b8 1189f4: 00 00 00 ts->active = false; 1189f7: c6 05 bc d4 13 00 00 movb $0x0,0x13d4bc /* * The default timer server is now available. */ _Timer_server = ts; 1189fe: c7 05 e0 25 14 00 40 movl $0x13d440,0x1425e0 118a05: d4 13 00 /* * Start the timer server */ status = rtems_task_start( 118a08: 52 push %edx 118a09: 68 40 d4 13 00 push $0x13d440 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 a0 25 14 00 push $0x1425a0 118628: e8 2b 26 00 00 call 11ac58 <_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 dd 2e 00 00 call 11b53c <_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 08 43 00 00 call 11c980 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 118678: 59 pop %ecx 118679: 5e pop %esi 11867a: 53 push %ebx 11867b: 68 98 1c 14 00 push $0x141c98 118680: e8 c3 41 00 00 call 11c848 <_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 e0 25 14 00 mov 0x1425e0,%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 e2 42 00 00 call 11c980 <_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 e0 25 14 00 mov 0x1425e0,%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 a0 25 14 00 push $0x1425a0 1186f1: e8 62 25 00 00 call 11ac58 <_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 6f 42 00 00 call 11c980 <_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 ec 2d 00 00 call 11b53c <_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 b5 2d 00 00 call 11b53c <_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 e0 25 14 00 mov 0x1425e0,%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 cc 1b 14 00 00 cmpb $0x0,0x141bcc 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 4c 1c 14 00 cmp 0x141c4c,%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 a0 25 14 00 push $0x1425a0 118803: e8 50 24 00 00 call 11ac58 <_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 5d 41 00 00 call 11c980 <_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 4c 1c 14 00 sub 0x141c4c,%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 e4 2c 00 00 call 11b53c <_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 0010bc9c : #include int sched_get_priority_max( int policy ) { 10bc9c: 55 push %ebp 10bc9d: 89 e5 mov %esp,%ebp 10bc9f: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10bca2: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10bca6: 76 14 jbe 10bcbc case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bca8: e8 bb 87 00 00 call 114468 <__errno> 10bcad: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcb3: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10bcb8: c9 leave 10bcb9: c3 ret 10bcba: 66 90 xchg %ax,%ax <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10bcbc: 0f b6 05 5c 45 12 00 movzbl 0x12455c,%eax 10bcc3: 48 dec %eax } 10bcc4: c9 leave 10bcc5: c3 ret 0010bcc8 : #include int sched_get_priority_min( int policy ) { 10bcc8: 55 push %ebp 10bcc9: 89 e5 mov %esp,%ebp 10bccb: 83 ec 08 sub $0x8,%esp switch ( policy ) { 10bcce: 83 7d 08 03 cmpl $0x3,0x8(%ebp) 10bcd2: 76 14 jbe 10bce8 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10bcd4: e8 8f 87 00 00 call 114468 <__errno> 10bcd9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcdf: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bce4: c9 leave 10bce5: c3 ret 10bce6: 66 90 xchg %ax,%ax <== NOT EXECUTED int sched_get_priority_min( int policy ) { switch ( policy ) { 10bce8: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10bced: c9 leave 10bcee: c3 ret 0010bcf0 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10bcf0: 55 push %ebp 10bcf1: 89 e5 mov %esp,%ebp 10bcf3: 56 push %esi 10bcf4: 53 push %ebx 10bcf5: 8b 75 08 mov 0x8(%ebp),%esi 10bcf8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bcfb: 85 f6 test %esi,%esi 10bcfd: 75 21 jne 10bd20 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10bcff: 85 db test %ebx,%ebx 10bd01: 74 38 je 10bd3b rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10bd03: 83 ec 08 sub $0x8,%esp 10bd06: 53 push %ebx 10bd07: ff 35 c4 86 12 00 pushl 0x1286c4 10bd0d: e8 f2 33 00 00 call 10f104 <_Timespec_From_ticks> 10bd12: 31 c0 xor %eax,%eax return 0; 10bd14: 83 c4 10 add $0x10,%esp } 10bd17: 8d 65 f8 lea -0x8(%ebp),%esp 10bd1a: 5b pop %ebx 10bd1b: 5e pop %esi 10bd1c: c9 leave 10bd1d: c3 ret 10bd1e: 66 90 xchg %ax,%ax <== NOT EXECUTED { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10bd20: e8 d3 c9 ff ff call 1086f8 10bd25: 39 f0 cmp %esi,%eax 10bd27: 74 d6 je 10bcff rtems_set_errno_and_return_minus_one( ESRCH ); 10bd29: e8 3a 87 00 00 call 114468 <__errno> 10bd2e: c7 00 03 00 00 00 movl $0x3,(%eax) 10bd34: b8 ff ff ff ff mov $0xffffffff,%eax 10bd39: eb dc jmp 10bd17 <== ALWAYS TAKEN if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bd3b: e8 28 87 00 00 call 114468 <__errno> 10bd40: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd46: b8 ff ff ff ff mov $0xffffffff,%eax 10bd4b: eb ca jmp 10bd17 <== ALWAYS TAKEN 0010e1d4 : */ int sem_close( sem_t *sem ) { 10e1d4: 55 push %ebp 10e1d5: 89 e5 mov %esp,%ebp 10e1d7: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 10e1da: 8d 45 f4 lea -0xc(%ebp),%eax 10e1dd: 50 push %eax 10e1de: 8b 45 08 mov 0x8(%ebp),%eax 10e1e1: ff 30 pushl (%eax) 10e1e3: 68 60 d3 12 00 push $0x12d360 10e1e8: e8 0b 21 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e1ed: 83 c4 10 add $0x10,%esp 10e1f0: 8b 55 f4 mov -0xc(%ebp),%edx 10e1f3: 85 d2 test %edx,%edx 10e1f5: 74 15 je 10e20c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e1f7: e8 f0 95 00 00 call 1177ec <__errno> 10e1fc: c7 00 16 00 00 00 movl $0x16,(%eax) 10e202: b8 ff ff ff ff mov $0xffffffff,%eax } 10e207: c9 leave 10e208: c3 ret 10e209: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10e20c: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10e20f: 83 ec 0c sub $0xc,%esp 10e212: 50 push %eax 10e213: e8 e0 5c 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e218: e8 9f 29 00 00 call 110bbc <_Thread_Enable_dispatch> 10e21d: 31 c0 xor %eax,%eax return 0; 10e21f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e222: c9 leave 10e223: c3 ret 0010e224 : */ int sem_destroy( sem_t *sem ) { 10e224: 55 push %ebp 10e225: 89 e5 mov %esp,%ebp 10e227: 83 ec 1c sub $0x1c,%esp 10e22a: 8d 45 f4 lea -0xc(%ebp),%eax 10e22d: 50 push %eax 10e22e: 8b 45 08 mov 0x8(%ebp),%eax 10e231: ff 30 pushl (%eax) 10e233: 68 60 d3 12 00 push $0x12d360 10e238: e8 bb 20 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e23d: 83 c4 10 add $0x10,%esp 10e240: 8b 55 f4 mov -0xc(%ebp),%edx 10e243: 85 d2 test %edx,%edx 10e245: 74 15 je 10e25c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e247: e8 a0 95 00 00 call 1177ec <__errno> 10e24c: c7 00 16 00 00 00 movl $0x16,(%eax) 10e252: b8 ff ff ff ff mov $0xffffffff,%eax } 10e257: c9 leave 10e258: c3 ret 10e259: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10e25c: 80 78 14 00 cmpb $0x0,0x14(%eax) 10e260: 75 16 jne 10e278 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10e262: 83 ec 0c sub $0xc,%esp 10e265: 50 push %eax 10e266: e8 8d 5c 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e26b: e8 4c 29 00 00 call 110bbc <_Thread_Enable_dispatch> 10e270: 31 c0 xor %eax,%eax return 0; 10e272: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e275: c9 leave 10e276: c3 ret 10e277: 90 nop <== NOT EXECUTED /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10e278: e8 3f 29 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10e27d: e8 6a 95 00 00 call 1177ec <__errno> 10e282: c7 00 16 00 00 00 movl $0x16,(%eax) 10e288: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e28d: c9 leave 10e28e: c3 ret 0010e290 : int sem_getvalue( sem_t *sem, int *sval ) { 10e290: 55 push %ebp 10e291: 89 e5 mov %esp,%ebp 10e293: 83 ec 1c sub $0x1c,%esp 10e296: 8d 45 f4 lea -0xc(%ebp),%eax 10e299: 50 push %eax 10e29a: 8b 45 08 mov 0x8(%ebp),%eax 10e29d: ff 30 pushl (%eax) 10e29f: 68 60 d3 12 00 push $0x12d360 10e2a4: e8 4f 20 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e2a9: 83 c4 10 add $0x10,%esp 10e2ac: 8b 55 f4 mov -0xc(%ebp),%edx 10e2af: 85 d2 test %edx,%edx 10e2b1: 74 15 je 10e2c8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e2b3: e8 34 95 00 00 call 1177ec <__errno> 10e2b8: c7 00 16 00 00 00 movl $0x16,(%eax) 10e2be: b8 ff ff ff ff mov $0xffffffff,%eax } 10e2c3: c9 leave 10e2c4: c3 ret 10e2c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 10e2c8: 8b 50 64 mov 0x64(%eax),%edx 10e2cb: 8b 45 0c mov 0xc(%ebp),%eax 10e2ce: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e2d0: e8 e7 28 00 00 call 110bbc <_Thread_Enable_dispatch> 10e2d5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e2d7: c9 leave 10e2d8: c3 ret 0010e2dc : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10e2dc: 55 push %ebp 10e2dd: 89 e5 mov %esp,%ebp 10e2df: 53 push %ebx 10e2e0: 83 ec 14 sub $0x14,%esp 10e2e3: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10e2e6: 85 db test %ebx,%ebx 10e2e8: 74 26 je 10e310 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 10e2ea: 8d 45 f4 lea -0xc(%ebp),%eax 10e2ed: 50 push %eax 10e2ee: ff 75 10 pushl 0x10(%ebp) 10e2f1: ff 75 0c pushl 0xc(%ebp) 10e2f4: 6a 00 push $0x0 10e2f6: e8 f1 5a 00 00 call 113dec <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 10e2fb: 83 c4 10 add $0x10,%esp 10e2fe: 83 f8 ff cmp $0xffffffff,%eax 10e301: 74 08 je 10e30b *sem = the_semaphore->Object.id; 10e303: 8b 55 f4 mov -0xc(%ebp),%edx 10e306: 8b 52 08 mov 0x8(%edx),%edx 10e309: 89 13 mov %edx,(%ebx) return status; } 10e30b: 8b 5d fc mov -0x4(%ebp),%ebx 10e30e: c9 leave 10e30f: c3 ret { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 10e310: e8 d7 94 00 00 call 1177ec <__errno> 10e315: c7 00 16 00 00 00 movl $0x16,(%eax) 10e31b: b8 ff ff ff ff mov $0xffffffff,%eax 10e320: eb e9 jmp 10e30b <== ALWAYS TAKEN 0010e324 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10e324: 55 push %ebp 10e325: 89 e5 mov %esp,%ebp 10e327: 57 push %edi 10e328: 56 push %esi 10e329: 53 push %ebx 10e32a: 83 ec 2c sub $0x2c,%esp 10e32d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e330: a1 18 d0 12 00 mov 0x12d018,%eax 10e335: 40 inc %eax 10e336: a3 18 d0 12 00 mov %eax,0x12d018 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10e33b: 8b 7d 0c mov 0xc(%ebp),%edi 10e33e: 81 e7 00 02 00 00 and $0x200,%edi 10e344: 0f 85 86 00 00 00 jne 10e3d0 10e34a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10e351: 83 ec 08 sub $0x8,%esp 10e354: 8d 45 e4 lea -0x1c(%ebp),%eax 10e357: 50 push %eax 10e358: 56 push %esi 10e359: e8 ea 5b 00 00 call 113f48 <_POSIX_Semaphore_Name_to_id> 10e35e: 89 c3 mov %eax,%ebx * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10e360: 83 c4 10 add $0x10,%esp 10e363: 85 c0 test %eax,%eax 10e365: 74 25 je 10e38c /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10e367: 83 f8 02 cmp $0x2,%eax 10e36a: 75 04 jne 10e370 <== ALWAYS TAKEN 10e36c: 85 ff test %edi,%edi 10e36e: 75 6c jne 10e3dc _Thread_Enable_dispatch(); 10e370: e8 47 28 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10e375: e8 72 94 00 00 call 1177ec <__errno> 10e37a: 89 18 mov %ebx,(%eax) 10e37c: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10e381: 8d 65 f4 lea -0xc(%ebp),%esp 10e384: 5b pop %ebx 10e385: 5e pop %esi 10e386: 5f pop %edi 10e387: c9 leave 10e388: c3 ret 10e389: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10e38c: 8b 45 0c mov 0xc(%ebp),%eax 10e38f: 25 00 0a 00 00 and $0xa00,%eax 10e394: 3d 00 0a 00 00 cmp $0xa00,%eax 10e399: 74 65 je 10e400 10e39b: 50 push %eax 10e39c: 8d 45 dc lea -0x24(%ebp),%eax 10e39f: 50 push %eax 10e3a0: ff 75 e4 pushl -0x1c(%ebp) 10e3a3: 68 60 d3 12 00 push $0x12d360 10e3a8: e8 4b 1f 00 00 call 1102f8 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10e3ad: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10e3b0: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10e3b3: e8 04 28 00 00 call 110bbc <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10e3b8: e8 ff 27 00 00 call 110bbc <_Thread_Enable_dispatch> goto return_id; 10e3bd: 83 c4 10 add $0x10,%esp return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 10e3c0: 8b 45 e0 mov -0x20(%ebp),%eax 10e3c3: 83 c0 08 add $0x8,%eax #endif return id; } 10e3c6: 8d 65 f4 lea -0xc(%ebp),%esp 10e3c9: 5b pop %ebx 10e3ca: 5e pop %esi 10e3cb: 5f pop %edi 10e3cc: c9 leave 10e3cd: c3 ret 10e3ce: 66 90 xchg %ax,%ax <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10e3d0: 8b 45 14 mov 0x14(%ebp),%eax 10e3d3: 89 45 d4 mov %eax,-0x2c(%ebp) 10e3d6: e9 76 ff ff ff jmp 10e351 <== ALWAYS TAKEN 10e3db: 90 nop <== NOT EXECUTED /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 10e3dc: 8d 45 e0 lea -0x20(%ebp),%eax 10e3df: 50 push %eax 10e3e0: ff 75 d4 pushl -0x2c(%ebp) 10e3e3: 6a 00 push $0x0 10e3e5: 56 push %esi 10e3e6: e8 01 5a 00 00 call 113dec <_POSIX_Semaphore_Create_support> 10e3eb: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10e3ed: e8 ca 27 00 00 call 110bbc <_Thread_Enable_dispatch> if ( status == -1 ) 10e3f2: 83 c4 10 add $0x10,%esp 10e3f5: 43 inc %ebx 10e3f6: 75 c8 jne 10e3c0 10e3f8: b8 ff ff ff ff mov $0xffffffff,%eax 10e3fd: eb c7 jmp 10e3c6 <== ALWAYS TAKEN 10e3ff: 90 nop <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10e400: e8 b7 27 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10e405: e8 e2 93 00 00 call 1177ec <__errno> 10e40a: c7 00 11 00 00 00 movl $0x11,(%eax) 10e410: b8 ff ff ff ff mov $0xffffffff,%eax 10e415: eb af jmp 10e3c6 <== ALWAYS TAKEN 0010e418 : */ int sem_post( sem_t *sem ) { 10e418: 55 push %ebp 10e419: 89 e5 mov %esp,%ebp 10e41b: 83 ec 1c sub $0x1c,%esp 10e41e: 8d 45 f4 lea -0xc(%ebp),%eax 10e421: 50 push %eax 10e422: 8b 45 08 mov 0x8(%ebp),%eax 10e425: ff 30 pushl (%eax) 10e427: 68 60 d3 12 00 push $0x12d360 10e42c: e8 c7 1e 00 00 call 1102f8 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10e431: 83 c4 10 add $0x10,%esp 10e434: 8b 4d f4 mov -0xc(%ebp),%ecx 10e437: 85 c9 test %ecx,%ecx 10e439: 74 15 je 10e450 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10e43b: e8 ac 93 00 00 call 1177ec <__errno> 10e440: c7 00 16 00 00 00 movl $0x16,(%eax) 10e446: b8 ff ff ff ff mov $0xffffffff,%eax } 10e44b: c9 leave 10e44c: c3 ret 10e44d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10e450: 52 push %edx 10e451: 6a 00 push $0x0 10e453: ff 70 08 pushl 0x8(%eax) 10e456: 83 c0 1c add $0x1c,%eax 10e459: 50 push %eax 10e45a: e8 3d 15 00 00 call 10f99c <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10e45f: e8 58 27 00 00 call 110bbc <_Thread_Enable_dispatch> 10e464: 31 c0 xor %eax,%eax return 0; 10e466: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10e469: c9 leave 10e46a: c3 ret 0010e46c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10e46c: 55 push %ebp 10e46d: 89 e5 mov %esp,%ebp 10e46f: 53 push %ebx 10e470: 83 ec 1c sub $0x1c,%esp 10e473: 8b 5d 08 mov 0x8(%ebp),%ebx * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10e476: 8d 45 f4 lea -0xc(%ebp),%eax 10e479: 50 push %eax 10e47a: ff 75 0c pushl 0xc(%ebp) 10e47d: e8 ce 50 00 00 call 113550 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10e482: 83 c4 10 add $0x10,%esp 10e485: 83 f8 03 cmp $0x3,%eax 10e488: 74 16 je 10e4a0 <== NEVER TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e48a: 50 push %eax <== NOT EXECUTED 10e48b: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10e48e: 6a 00 push $0x0 <== NOT EXECUTED 10e490: 53 push %ebx <== NOT EXECUTED 10e491: e8 1e 5b 00 00 call 113fb4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 10e496: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10e499: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e49c: c9 leave <== NOT EXECUTED 10e49d: c3 ret <== NOT EXECUTED 10e49e: 66 90 xchg %ax,%ax <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10e4a0: 52 push %edx 10e4a1: ff 75 f4 pushl -0xc(%ebp) 10e4a4: 6a 01 push $0x1 10e4a6: 53 push %ebx 10e4a7: e8 08 5b 00 00 call 113fb4 <_POSIX_Semaphore_Wait_support> 10e4ac: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10e4af: 8b 5d fc mov -0x4(%ebp),%ebx 10e4b2: c9 leave 10e4b3: c3 ret 0010e4c8 : */ int sem_unlink( const char *name ) { 10e4c8: 55 push %ebp 10e4c9: 89 e5 mov %esp,%ebp 10e4cb: 53 push %ebx 10e4cc: 83 ec 1c sub $0x1c,%esp 10e4cf: a1 18 d0 12 00 mov 0x12d018,%eax 10e4d4: 40 inc %eax 10e4d5: a3 18 d0 12 00 mov %eax,0x12d018 register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10e4da: 8d 45 f4 lea -0xc(%ebp),%eax 10e4dd: 50 push %eax 10e4de: ff 75 08 pushl 0x8(%ebp) 10e4e1: e8 62 5a 00 00 call 113f48 <_POSIX_Semaphore_Name_to_id> 10e4e6: 89 c3 mov %eax,%ebx if ( status != 0 ) { 10e4e8: 83 c4 10 add $0x10,%esp 10e4eb: 85 c0 test %eax,%eax 10e4ed: 75 35 jne 10e524 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 10e4ef: 0f b7 55 f4 movzwl -0xc(%ebp),%edx 10e4f3: a1 7c d3 12 00 mov 0x12d37c,%eax 10e4f8: 8b 1c 90 mov (%eax,%edx,4),%ebx &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 10e4fb: c6 43 15 00 movb $0x0,0x15(%ebx) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 10e4ff: 83 ec 08 sub $0x8,%esp 10e502: 53 push %ebx 10e503: 68 60 d3 12 00 push $0x12d360 10e508: e8 3b 1f 00 00 call 110448 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 10e50d: 89 1c 24 mov %ebx,(%esp) 10e510: e8 e3 59 00 00 call 113ef8 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10e515: e8 a2 26 00 00 call 110bbc <_Thread_Enable_dispatch> 10e51a: 31 c0 xor %eax,%eax return 0; 10e51c: 83 c4 10 add $0x10,%esp } 10e51f: 8b 5d fc mov -0x4(%ebp),%ebx 10e522: c9 leave 10e523: c3 ret _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 10e524: e8 93 26 00 00 call 110bbc <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 10e529: e8 be 92 00 00 call 1177ec <__errno> 10e52e: 89 18 mov %ebx,(%eax) 10e530: b8 ff ff ff ff mov $0xffffffff,%eax 10e535: eb e8 jmp 10e51f <== ALWAYS TAKEN 0010b1b0 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b1b0: 55 push %ebp 10b1b1: 89 e5 mov %esp,%ebp 10b1b3: 83 ec 08 sub $0x8,%esp if ( !value ) 10b1b6: 8b 55 0c mov 0xc(%ebp),%edx 10b1b9: 85 d2 test %edx,%edx 10b1bb: 74 33 je 10b1f0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b1bd: 8b 45 10 mov 0x10(%ebp),%eax 10b1c0: 85 c0 test %eax,%eax 10b1c2: 74 2c je 10b1f0 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b1c4: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b1c8: 76 12 jbe 10b1dc case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b1ca: e8 4d 8d 00 00 call 113f1c <__errno> 10b1cf: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b1d5: b8 ff ff ff ff mov $0xffffffff,%eax 10b1da: c9 leave 10b1db: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b1dc: e8 3b 8d 00 00 call 113f1c <__errno> 10b1e1: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b1e7: b8 ff ff ff ff mov $0xffffffff,%eax 10b1ec: c9 leave 10b1ed: c3 ret 10b1ee: 66 90 xchg %ax,%ax <== NOT EXECUTED { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b1f0: e8 27 8d 00 00 call 113f1c <__errno> 10b1f5: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b1fb: eb d8 jmp 10b1d5 <== ALWAYS TAKEN 0010bbdc : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 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 10bbe5: 8b 5d 08 mov 0x8(%ebp),%ebx 10bbe8: 8b 45 0c mov 0xc(%ebp),%eax 10bbeb: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10bbee: 85 d2 test %edx,%edx 10bbf0: 74 13 je 10bc05 *oact = _POSIX_signals_Vectors[ sig ]; 10bbf2: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10bbf5: 8d 34 8d a0 99 12 00 lea 0x1299a0(,%ecx,4),%esi 10bbfc: b9 03 00 00 00 mov $0x3,%ecx 10bc01: 89 d7 mov %edx,%edi 10bc03: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10bc05: 85 db test %ebx,%ebx 10bc07: 74 6f je 10bc78 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10bc09: 8d 53 ff lea -0x1(%ebx),%edx 10bc0c: 83 fa 1f cmp $0x1f,%edx 10bc0f: 77 67 ja 10bc78 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10bc11: 83 fb 09 cmp $0x9,%ebx 10bc14: 74 62 je 10bc78 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10bc16: 85 c0 test %eax,%eax 10bc18: 74 37 je 10bc51 <== ALWAYS TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10bc1a: 9c pushf 10bc1b: fa cli 10bc1c: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10bc1f: 8b 50 08 mov 0x8(%eax),%edx 10bc22: 85 d2 test %edx,%edx 10bc24: 74 36 je 10bc5c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10bc26: 83 ec 0c sub $0xc,%esp 10bc29: 53 push %ebx 10bc2a: 89 45 e0 mov %eax,-0x20(%ebp) 10bc2d: e8 da 53 00 00 call 11100c <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10bc32: 8d 14 5b lea (%ebx,%ebx,2),%edx 10bc35: 8d 3c 95 a0 99 12 00 lea 0x1299a0(,%edx,4),%edi 10bc3c: b9 03 00 00 00 mov $0x3,%ecx 10bc41: 8b 45 e0 mov -0x20(%ebp),%eax 10bc44: 89 c6 mov %eax,%esi 10bc46: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bc48: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10bc4b: ff 75 e4 pushl -0x1c(%ebp) 10bc4e: 9d popf 10bc4f: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10bc51: 8d 65 f4 lea -0xc(%ebp),%esp 10bc54: 5b pop %ebx 10bc55: 5e pop %esi 10bc56: 5f pop %edi 10bc57: c9 leave 10bc58: c3 ret 10bc59: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10bc5c: 8d 34 5b lea (%ebx,%ebx,2),%esi 10bc5f: c1 e6 02 shl $0x2,%esi 10bc62: 8d be a0 99 12 00 lea 0x1299a0(%esi),%edi 10bc68: 81 c6 40 2f 12 00 add $0x122f40,%esi 10bc6e: b9 03 00 00 00 mov $0x3,%ecx 10bc73: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10bc75: eb d4 jmp 10bc4b <== ALWAYS TAKEN 10bc77: 90 nop <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bc78: e8 7f 89 00 00 call 1145fc <__errno> 10bc7d: c7 00 16 00 00 00 movl $0x16,(%eax) 10bc83: b8 ff ff ff ff mov $0xffffffff,%eax 10bc88: eb c7 jmp 10bc51 <== ALWAYS TAKEN 0010bc8c : int sigaddset( sigset_t *set, int signo ) { 10bc8c: 55 push %ebp 10bc8d: 89 e5 mov %esp,%ebp 10bc8f: 83 ec 08 sub $0x8,%esp 10bc92: 8b 45 08 mov 0x8(%ebp),%eax 10bc95: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10bc98: 85 c0 test %eax,%eax 10bc9a: 74 18 je 10bcb4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10bc9c: 85 c9 test %ecx,%ecx 10bc9e: 74 14 je 10bcb4 10bca0: 49 dec %ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) 10bca1: 83 f9 1f cmp $0x1f,%ecx 10bca4: 77 0e ja 10bcb4 rtems_set_errno_and_return_minus_one( EINVAL ); *set |= signo_to_mask(signo); 10bca6: ba 01 00 00 00 mov $0x1,%edx 10bcab: d3 e2 shl %cl,%edx 10bcad: 09 10 or %edx,(%eax) 10bcaf: 31 c0 xor %eax,%eax return 0; } 10bcb1: c9 leave 10bcb2: c3 ret 10bcb3: 90 nop <== NOT EXECUTED if ( !signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10bcb4: e8 43 89 00 00 call 1145fc <__errno> 10bcb9: c7 00 16 00 00 00 movl $0x16,(%eax) 10bcbf: b8 ff ff ff ff mov $0xffffffff,%eax *set |= signo_to_mask(signo); return 0; } 10bcc4: c9 leave 10bcc5: c3 ret 0010d614 : int sigdelset( sigset_t *set, int signo ) { 10d614: 55 push %ebp 10d615: 89 e5 mov %esp,%ebp 10d617: 83 ec 08 sub $0x8,%esp 10d61a: 8b 45 08 mov 0x8(%ebp),%eax 10d61d: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d620: 85 c0 test %eax,%eax 10d622: 74 18 je 10d63c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d624: 85 c9 test %ecx,%ecx 10d626: 74 0f je 10d637 10d628: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d629: 83 f9 1f cmp $0x1f,%ecx 10d62c: 77 0e ja 10d63c rtems_set_errno_and_return_minus_one( EINVAL ); *set &= ~signo_to_mask(signo); 10d62e: ba fe ff ff ff mov $0xfffffffe,%edx 10d633: d3 c2 rol %cl,%edx 10d635: 21 10 and %edx,(%eax) 10d637: 31 c0 xor %eax,%eax return 0; } 10d639: c9 leave 10d63a: c3 ret 10d63b: 90 nop <== NOT EXECUTED if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d63c: e8 e7 89 00 00 call 116028 <__errno> 10d641: c7 00 16 00 00 00 movl $0x16,(%eax) 10d647: b8 ff ff ff ff mov $0xffffffff,%eax *set &= ~signo_to_mask(signo); return 0; } 10d64c: c9 leave 10d64d: c3 ret 0010d6a8 : int sigismember( const sigset_t *set, int signo ) { 10d6a8: 55 push %ebp 10d6a9: 89 e5 mov %esp,%ebp 10d6ab: 83 ec 08 sub $0x8,%esp 10d6ae: 8b 45 08 mov 0x8(%ebp),%eax 10d6b1: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !set ) 10d6b4: 85 c0 test %eax,%eax 10d6b6: 74 20 je 10d6d8 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d6b8: 85 c9 test %ecx,%ecx 10d6ba: 74 18 je 10d6d4 10d6bc: 49 dec %ecx return 0; if ( !is_valid_signo(signo) ) 10d6bd: 83 f9 1f cmp $0x1f,%ecx 10d6c0: 77 16 ja 10d6d8 rtems_set_errno_and_return_minus_one( EINVAL ); 10d6c2: ba 01 00 00 00 mov $0x1,%edx 10d6c7: d3 e2 shl %cl,%edx 10d6c9: 85 10 test %edx,(%eax) 10d6cb: 0f 95 c0 setne %al 10d6ce: 0f b6 c0 movzbl %al,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6d1: c9 leave 10d6d2: c3 ret 10d6d3: 90 nop <== NOT EXECUTED ) { if ( !set ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !signo ) 10d6d4: 31 c0 xor %eax,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6d6: c9 leave 10d6d7: c3 ret if ( !signo ) return 0; if ( !is_valid_signo(signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10d6d8: e8 4b 89 00 00 call 116028 <__errno> 10d6dd: c7 00 16 00 00 00 movl $0x16,(%eax) 10d6e3: b8 ff ff ff ff mov $0xffffffff,%eax if ( *set & signo_to_mask(signo) ) return 1; return 0; } 10d6e8: c9 leave 10d6e9: c3 ret 0010b9f4 : sighandler_t signal( int signum, sighandler_t handler ) { 10b9f4: 55 push %ebp 10b9f5: 89 e5 mov %esp,%ebp 10b9f7: 53 push %ebx 10b9f8: 83 ec 30 sub $0x30,%esp struct sigaction s; struct sigaction old; s.sa_handler = handler ; 10b9fb: 8b 45 0c mov 0xc(%ebp),%eax 10b9fe: 89 45 f4 mov %eax,-0xc(%ebp) sigemptyset(&s.sa_mask); 10ba01: 8d 5d ec lea -0x14(%ebp),%ebx 10ba04: 8d 45 f0 lea -0x10(%ebp),%eax 10ba07: 50 push %eax 10ba08: e8 bb ff ff ff call 10b9c8 <== ALWAYS TAKEN s.sa_flags = SA_RESTART | SA_INTERRUPT | SA_NOMASK; s.sa_restorer= NULL ; #elif defined(signal_like_SVR4) s.sa_flags = SA_RESTART; #else s.sa_flags = 0; 10ba0d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) #endif sigaction( signum, &s, &old ); 10ba14: 83 c4 0c add $0xc,%esp 10ba17: 8d 45 e0 lea -0x20(%ebp),%eax 10ba1a: 50 push %eax 10ba1b: 53 push %ebx 10ba1c: ff 75 08 pushl 0x8(%ebp) 10ba1f: e8 b8 fe ff ff call 10b8dc <== ALWAYS TAKEN return (sighandler_t) old.sa_handler; } 10ba24: 8b 45 e8 mov -0x18(%ebp),%eax 10ba27: 8b 5d fc mov -0x4(%ebp),%ebx 10ba2a: c9 leave 10ba2b: c3 ret 0010bd30 : int sigprocmask( int how, const sigset_t *set, sigset_t *oset ) { 10bd30: 55 push %ebp 10bd31: 89 e5 mov %esp,%ebp 10bd33: 83 ec 08 sub $0x8,%esp #if defined(RTEMS_POSIX_API) return pthread_sigmask( how, set, oset ); #else return -1; #endif } 10bd36: c9 leave /* * P1003.1c/Draft 10, p. 38 maps sigprocmask to pthread_sigmask. */ #if defined(RTEMS_POSIX_API) return pthread_sigmask( how, set, oset ); 10bd37: e9 0c 58 00 00 jmp 111548 <== ALWAYS TAKEN 0010d74c : #include int sigsuspend( const sigset_t *sigmask ) { 10d74c: 55 push %ebp 10d74d: 89 e5 mov %esp,%ebp 10d74f: 56 push %esi 10d750: 53 push %ebx 10d751: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10d754: 8d 5d f4 lea -0xc(%ebp),%ebx 10d757: 53 push %ebx 10d758: ff 75 08 pushl 0x8(%ebp) 10d75b: 6a 01 push $0x1 10d75d: e8 c6 ff ff ff call 10d728 <== ALWAYS TAKEN (void) sigfillset( &all_signals ); 10d762: 8d 75 f0 lea -0x10(%ebp),%esi 10d765: 89 34 24 mov %esi,(%esp) 10d768: e8 0f ff ff ff call 10d67c <== ALWAYS TAKEN status = sigtimedwait( &all_signals, NULL, NULL ); 10d76d: 83 c4 0c add $0xc,%esp 10d770: 6a 00 push $0x0 10d772: 6a 00 push $0x0 10d774: 56 push %esi 10d775: e8 76 00 00 00 call 10d7f0 <== ALWAYS TAKEN 10d77a: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10d77c: 83 c4 0c add $0xc,%esp 10d77f: 6a 00 push $0x0 10d781: 53 push %ebx 10d782: 6a 00 push $0x0 10d784: e8 9f ff ff ff call 10d728 <== ALWAYS TAKEN /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10d789: 83 c4 10 add $0x10,%esp 10d78c: 46 inc %esi 10d78d: 75 0d jne 10d79c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10d78f: b8 ff ff ff ff mov $0xffffffff,%eax 10d794: 8d 65 f8 lea -0x8(%ebp),%esp 10d797: 5b pop %ebx 10d798: 5e pop %esi 10d799: c9 leave 10d79a: c3 ret 10d79b: 90 nop <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 10d79c: e8 87 88 00 00 call 116028 <__errno> 10d7a1: c7 00 04 00 00 00 movl $0x4,(%eax) 10d7a7: eb e6 jmp 10d78f <== ALWAYS TAKEN 0010bf88 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10bf88: 55 push %ebp 10bf89: 89 e5 mov %esp,%ebp 10bf8b: 57 push %edi 10bf8c: 56 push %esi 10bf8d: 53 push %ebx 10bf8e: 83 ec 2c sub $0x2c,%esp 10bf91: 8b 75 08 mov 0x8(%ebp),%esi 10bf94: 8b 5d 0c mov 0xc(%ebp),%ebx 10bf97: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10bf9a: 85 f6 test %esi,%esi 10bf9c: 0f 84 7a 01 00 00 je 10c11c /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10bfa2: 85 ff test %edi,%edi 10bfa4: 0f 84 1e 01 00 00 je 10c0c8 if ( !_Timespec_Is_valid( timeout ) ) 10bfaa: 83 ec 0c sub $0xc,%esp 10bfad: 57 push %edi 10bfae: e8 91 34 00 00 call 10f444 <_Timespec_Is_valid> 10bfb3: 83 c4 10 add $0x10,%esp 10bfb6: 84 c0 test %al,%al 10bfb8: 0f 84 5e 01 00 00 je 10c11c rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10bfbe: 83 ec 0c sub $0xc,%esp 10bfc1: 57 push %edi 10bfc2: e8 e1 34 00 00 call 10f4a8 <_Timespec_To_ticks> if ( !interval ) 10bfc7: 83 c4 10 add $0x10,%esp 10bfca: 85 c0 test %eax,%eax 10bfcc: 0f 84 4a 01 00 00 je 10c11c <== ALWAYS TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10bfd2: 85 db test %ebx,%ebx 10bfd4: 0f 84 f8 00 00 00 je 10c0d2 <== ALWAYS TAKEN the_thread = _Thread_Executing; 10bfda: 8b 15 58 98 12 00 mov 0x129858,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10bfe0: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10bfe6: 9c pushf 10bfe7: fa cli 10bfe8: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10bfeb: 8b 0e mov (%esi),%ecx 10bfed: 89 4d d4 mov %ecx,-0x2c(%ebp) 10bff0: 8b 8f c8 00 00 00 mov 0xc8(%edi),%ecx 10bff6: 85 4d d4 test %ecx,-0x2c(%ebp) 10bff9: 0f 85 dd 00 00 00 jne 10c0dc return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10bfff: 8b 0d 60 9f 12 00 mov 0x129f60,%ecx 10c005: 85 4d d4 test %ecx,-0x2c(%ebp) 10c008: 75 7e jne 10c088 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c00a: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c010: 8b 0d 98 97 12 00 mov 0x129798,%ecx 10c016: 41 inc %ecx 10c017: 89 0d 98 97 12 00 mov %ecx,0x129798 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c01d: c7 42 44 20 9f 12 00 movl $0x129f20,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c024: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c02b: 8b 0e mov (%esi),%ecx 10c02d: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c030: 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; 10c033: c7 05 50 9f 12 00 01 movl $0x1,0x129f50 10c03a: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c03d: ff 75 d0 pushl -0x30(%ebp) 10c040: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c041: 52 push %edx 10c042: 68 e8 ef 10 00 push $0x10efe8 10c047: 50 push %eax 10c048: 68 20 9f 12 00 push $0x129f20 10c04d: e8 86 2c 00 00 call 10ecd8 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c052: e8 71 27 00 00 call 10e7c8 <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 10c057: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c05e: 6a 00 push $0x0 10c060: 53 push %ebx 10c061: ff 33 pushl (%ebx) 10c063: 57 push %edi 10c064: e8 2f 56 00 00 call 111698 <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c069: 83 c4 20 add $0x20,%esp 10c06c: e8 d3 88 00 00 call 114944 <__errno> 10c071: 8b 15 58 98 12 00 mov 0x129858,%edx 10c077: 8b 52 34 mov 0x34(%edx),%edx 10c07a: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c07c: 8b 33 mov (%ebx),%esi } 10c07e: 89 f0 mov %esi,%eax 10c080: 8d 65 f4 lea -0xc(%ebp),%esp 10c083: 5b pop %ebx 10c084: 5e pop %esi 10c085: 5f pop %edi 10c086: c9 leave 10c087: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c088: 83 ec 0c sub $0xc,%esp 10c08b: 51 push %ecx 10c08c: e8 b3 fe ff ff call 10bf44 <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10c091: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c093: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c09a: 6a 01 push $0x1 10c09c: 53 push %ebx 10c09d: 50 push %eax 10c09e: 57 push %edi 10c09f: e8 f4 55 00 00 call 111698 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c0a4: ff 75 d0 pushl -0x30(%ebp) 10c0a7: 9d popf the_info->si_signo = signo; 10c0a8: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c0aa: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c0b1: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c0b8: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c0bb: 89 f0 mov %esi,%eax 10c0bd: 8d 65 f4 lea -0xc(%ebp),%esp 10c0c0: 5b pop %ebx 10c0c1: 5e pop %esi 10c0c2: 5f pop %edi 10c0c3: c9 leave 10c0c4: c3 ret 10c0c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c0c8: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c0ca: 85 db test %ebx,%ebx 10c0cc: 0f 85 08 ff ff ff jne 10bfda 10c0d2: 8d 5d dc lea -0x24(%ebp),%ebx 10c0d5: e9 00 ff ff ff jmp 10bfda <== ALWAYS TAKEN 10c0da: 66 90 xchg %ax,%ax <== NOT EXECUTED /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 10c0dc: 83 ec 0c sub $0xc,%esp 10c0df: 51 push %ecx 10c0e0: e8 5f fe ff ff call 10bf44 <_POSIX_signals_Get_highest> <== ALWAYS TAKEN 10c0e5: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c0e7: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c0ee: 6a 00 push $0x0 10c0f0: 53 push %ebx 10c0f1: 50 push %eax 10c0f2: 57 push %edi 10c0f3: e8 a0 55 00 00 call 111698 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c0f8: ff 75 d0 pushl -0x30(%ebp) 10c0fb: 9d popf the_info->si_code = SI_USER; 10c0fc: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c103: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c10a: 8b 33 mov (%ebx),%esi 10c10c: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c10f: 89 f0 mov %esi,%eax 10c111: 8d 65 f4 lea -0xc(%ebp),%esp 10c114: 5b pop %ebx 10c115: 5e pop %esi 10c116: 5f pop %edi 10c117: c9 leave 10c118: c3 ret 10c119: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c11c: e8 23 88 00 00 call 114944 <__errno> 10c121: c7 00 16 00 00 00 movl $0x16,(%eax) 10c127: be ff ff ff ff mov $0xffffffff,%esi 10c12c: e9 4d ff ff ff jmp 10c07e <== ALWAYS TAKEN 0010d9b4 : int sigwait( const sigset_t *set, int *sig ) { 10d9b4: 55 push %ebp 10d9b5: 89 e5 mov %esp,%ebp 10d9b7: 53 push %ebx 10d9b8: 83 ec 08 sub $0x8,%esp 10d9bb: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10d9be: 6a 00 push $0x0 10d9c0: 6a 00 push $0x0 10d9c2: ff 75 08 pushl 0x8(%ebp) 10d9c5: e8 26 fe ff ff call 10d7f0 <== ALWAYS TAKEN if ( status != -1 ) { 10d9ca: 83 c4 10 add $0x10,%esp 10d9cd: 83 f8 ff cmp $0xffffffff,%eax 10d9d0: 74 0e je 10d9e0 if ( sig ) 10d9d2: 85 db test %ebx,%ebx 10d9d4: 74 02 je 10d9d8 <== ALWAYS TAKEN *sig = status; 10d9d6: 89 03 mov %eax,(%ebx) 10d9d8: 31 c0 xor %eax,%eax return 0; } return errno; } 10d9da: 8b 5d fc mov -0x4(%ebp),%ebx 10d9dd: c9 leave 10d9de: c3 ret 10d9df: 90 nop <== NOT EXECUTED if ( sig ) *sig = status; return 0; } return errno; 10d9e0: e8 43 86 00 00 call 116028 <__errno> 10d9e5: 8b 00 mov (%eax),%eax } 10d9e7: 8b 5d fc mov -0x4(%ebp),%ebx 10d9ea: c9 leave 10d9eb: c3 ret 0010d99c : int sigwaitinfo( const sigset_t *set, siginfo_t *info ) { 10d99c: 55 push %ebp 10d99d: 89 e5 mov %esp,%ebp 10d99f: 83 ec 0c sub $0xc,%esp return sigtimedwait( set, info, NULL ); 10d9a2: 6a 00 push $0x0 10d9a4: ff 75 0c pushl 0xc(%ebp) 10d9a7: ff 75 08 pushl 0x8(%ebp) 10d9aa: e8 41 fe ff ff call 10d7f0 <== ALWAYS TAKEN } 10d9af: c9 leave 10d9b0: c3 ret 0010b060 : */ long sysconf( int name ) { 10b060: 55 push %ebp 10b061: 89 e5 mov %esp,%ebp 10b063: 83 ec 08 sub $0x8,%esp 10b066: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b069: 83 f8 02 cmp $0x2,%eax 10b06c: 74 16 je 10b084 return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b06e: 83 f8 04 cmp $0x4,%eax 10b071: 74 21 je 10b094 return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b073: 83 f8 33 cmp $0x33,%eax 10b076: 74 24 je 10b09c return 1024; if ( name == _SC_PAGESIZE ) 10b078: 83 f8 08 cmp $0x8,%eax 10b07b: 75 27 jne 10b0a4 10b07d: 66 b8 00 10 mov $0x1000,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b081: c9 leave 10b082: c3 ret 10b083: 90 nop <== NOT EXECUTED long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b084: b8 40 42 0f 00 mov $0xf4240,%eax 10b089: 31 d2 xor %edx,%edx 10b08b: f7 35 6c 42 12 00 divl 0x12426c if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b091: c9 leave 10b092: c3 ret 10b093: 90 nop <== NOT EXECUTED if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 10b094: a1 4c 41 12 00 mov 0x12414c,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b099: c9 leave 10b09a: c3 ret 10b09b: 90 nop <== NOT EXECUTED rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b09c: 66 b8 00 04 mov $0x400,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b0a0: c9 leave 10b0a1: c3 ret 10b0a2: 66 90 xchg %ax,%ax <== NOT EXECUTED #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b0a4: e8 23 8d 00 00 call 113dcc <__errno> 10b0a9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b0af: b8 ff ff ff ff mov $0xffffffff,%eax } 10b0b4: c9 leave 10b0b5: c3 ret 0010b3a0 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10b3a0: 55 push %ebp 10b3a1: 89 e5 mov %esp,%ebp 10b3a3: 56 push %esi 10b3a4: 53 push %ebx 10b3a5: 8b 5d 0c mov 0xc(%ebp),%ebx 10b3a8: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10b3ab: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10b3af: 0f 85 db 00 00 00 jne 10b490 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10b3b5: 85 f6 test %esi,%esi 10b3b7: 0f 84 d3 00 00 00 je 10b490 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10b3bd: 85 db test %ebx,%ebx 10b3bf: 74 21 je 10b3e2 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10b3c1: 8b 03 mov (%ebx),%eax 10b3c3: 48 dec %eax 10b3c4: 83 f8 01 cmp $0x1,%eax 10b3c7: 0f 87 c3 00 00 00 ja 10b490 <== ALWAYS TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 10b3cd: 8b 43 04 mov 0x4(%ebx),%eax 10b3d0: 85 c0 test %eax,%eax 10b3d2: 0f 84 b8 00 00 00 je 10b490 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10b3d8: 48 dec %eax 10b3d9: 83 f8 1f cmp $0x1f,%eax 10b3dc: 0f 87 ae 00 00 00 ja 10b490 <== ALWAYS TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b3e2: a1 b8 93 12 00 mov 0x1293b8,%eax 10b3e7: 40 inc %eax 10b3e8: a3 b8 93 12 00 mov %eax,0x1293b8 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 10b3ed: 83 ec 0c sub $0xc,%esp 10b3f0: 68 40 97 12 00 push $0x129740 10b3f5: e8 2a 1e 00 00 call 10d224 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10b3fa: 83 c4 10 add $0x10,%esp 10b3fd: 85 c0 test %eax,%eax 10b3ff: 0f 84 a2 00 00 00 je 10b4a7 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10b405: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10b409: 8b 15 78 94 12 00 mov 0x129478,%edx 10b40f: 8b 52 08 mov 0x8(%edx),%edx 10b412: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10b415: 85 db test %ebx,%ebx 10b417: 74 11 je 10b42a ptimer->inf.sigev_notify = evp->sigev_notify; 10b419: 8b 13 mov (%ebx),%edx 10b41b: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10b41e: 8b 53 04 mov 0x4(%ebx),%edx 10b421: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10b424: 8b 53 08 mov 0x8(%ebx),%edx 10b427: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10b42a: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10b431: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10b438: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10b43f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10b446: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b44d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10b454: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10b45b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10b462: 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; 10b469: 8b 50 08 mov 0x8(%eax),%edx 10b46c: 0f b7 da movzwl %dx,%ebx 10b46f: 8b 0d 5c 97 12 00 mov 0x12975c,%ecx 10b475: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b478: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 10b47f: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10b481: e8 c2 2a 00 00 call 10df48 <_Thread_Enable_dispatch> 10b486: 31 c0 xor %eax,%eax return 0; } 10b488: 8d 65 f8 lea -0x8(%ebp),%esp 10b48b: 5b pop %ebx 10b48c: 5e pop %esi 10b48d: c9 leave 10b48e: c3 ret 10b48f: 90 nop <== NOT EXECUTED if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 10b490: e8 9f 8e 00 00 call 114334 <__errno> 10b495: c7 00 16 00 00 00 movl $0x16,(%eax) 10b49b: b8 ff ff ff ff mov $0xffffffff,%eax _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; _Thread_Enable_dispatch(); return 0; } 10b4a0: 8d 65 f8 lea -0x8(%ebp),%esp 10b4a3: 5b pop %ebx 10b4a4: 5e pop %esi 10b4a5: c9 leave 10b4a6: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10b4a7: e8 9c 2a 00 00 call 10df48 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10b4ac: e8 83 8e 00 00 call 114334 <__errno> 10b4b1: c7 00 0b 00 00 00 movl $0xb,(%eax) 10b4b7: b8 ff ff ff ff mov $0xffffffff,%eax 10b4bc: eb ca jmp 10b488 <== ALWAYS TAKEN 0010b890 : int timer_delete( timer_t timerid ) { 10b890: 55 push %ebp 10b891: 89 e5 mov %esp,%ebp 10b893: 53 push %ebx 10b894: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10b897: 8d 45 f4 lea -0xc(%ebp),%eax 10b89a: 50 push %eax 10b89b: ff 75 08 pushl 0x8(%ebp) 10b89e: 68 60 97 12 00 push $0x129760 10b8a3: e8 34 21 00 00 call 10d9dc <_Objects_Get> 10b8a8: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b8aa: 83 c4 10 add $0x10,%esp 10b8ad: 8b 4d f4 mov -0xc(%ebp),%ecx 10b8b0: 85 c9 test %ecx,%ecx 10b8b2: 74 18 je 10b8cc #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b8b4: e8 37 91 00 00 call 1149f0 <__errno> 10b8b9: c7 00 16 00 00 00 movl $0x16,(%eax) 10b8bf: b8 ff ff ff ff mov $0xffffffff,%eax } 10b8c4: 8b 5d fc mov -0x4(%ebp),%ebx 10b8c7: c9 leave 10b8c8: c3 ret 10b8c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); 10b8cc: 83 ec 08 sub $0x8,%esp 10b8cf: 50 push %eax 10b8d0: 68 60 97 12 00 push $0x129760 10b8d5: e8 ce 1c 00 00 call 10d5a8 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10b8da: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10b8de: 8d 43 10 lea 0x10(%ebx),%eax 10b8e1: 89 04 24 mov %eax,(%esp) 10b8e4: e8 ab 3a 00 00 call 10f394 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10b8e9: 58 pop %eax 10b8ea: 5a pop %edx 10b8eb: 53 push %ebx 10b8ec: 68 60 97 12 00 push $0x129760 10b8f1: e8 b6 1f 00 00 call 10d8ac <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10b8f6: e8 55 29 00 00 call 10e250 <_Thread_Enable_dispatch> 10b8fb: 31 c0 xor %eax,%eax return 0; 10b8fd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b900: 8b 5d fc mov -0x4(%ebp),%ebx 10b903: c9 leave 10b904: c3 ret 0010c774 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10c774: 55 push %ebp 10c775: 89 e5 mov %esp,%ebp 10c777: 53 push %ebx 10c778: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10c77b: 8d 45 f4 lea -0xc(%ebp),%eax 10c77e: 50 push %eax 10c77f: ff 75 08 pushl 0x8(%ebp) 10c782: 68 80 b0 12 00 push $0x12b080 10c787: e8 bc 20 00 00 call 10e848 <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c78c: 83 c4 10 add $0x10,%esp 10c78f: 8b 55 f4 mov -0xc(%ebp),%edx 10c792: 85 d2 test %edx,%edx 10c794: 74 1a je 10c7b0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c796: e8 35 8d 00 00 call 1154d0 <__errno> 10c79b: c7 00 16 00 00 00 movl $0x16,(%eax) 10c7a1: bb ff ff ff ff mov $0xffffffff,%ebx } 10c7a6: 89 d8 mov %ebx,%eax 10c7a8: 8b 5d fc mov -0x4(%ebp),%ebx 10c7ab: c9 leave 10c7ac: c3 ret 10c7ad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10c7b0: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10c7b3: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10c7ba: e8 fd 28 00 00 call 10f0bc <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c7bf: 89 d8 mov %ebx,%eax 10c7c1: 8b 5d fc mov -0x4(%ebp),%ebx 10c7c4: c9 leave 10c7c5: c3 ret 0010c7c8 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10c7c8: 55 push %ebp 10c7c9: 89 e5 mov %esp,%ebp 10c7cb: 56 push %esi 10c7cc: 53 push %ebx 10c7cd: 83 ec 10 sub $0x10,%esp 10c7d0: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10c7d3: 85 db test %ebx,%ebx 10c7d5: 74 65 je 10c83c rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10c7d7: 83 ec 0c sub $0xc,%esp 10c7da: 8d 45 ec lea -0x14(%ebp),%eax 10c7dd: 50 push %eax 10c7de: e8 cd 16 00 00 call 10deb0 <_TOD_Get> 10c7e3: 83 c4 0c add $0xc,%esp 10c7e6: 8d 45 f4 lea -0xc(%ebp),%eax 10c7e9: 50 push %eax 10c7ea: ff 75 08 pushl 0x8(%ebp) 10c7ed: 68 80 b0 12 00 push $0x12b080 10c7f2: e8 51 20 00 00 call 10e848 <_Objects_Get> 10c7f7: 89 c6 mov %eax,%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c7f9: 83 c4 10 add $0x10,%esp 10c7fc: 8b 45 f4 mov -0xc(%ebp),%eax 10c7ff: 85 c0 test %eax,%eax 10c801: 75 39 jne 10c83c case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10c803: a1 64 ae 12 00 mov 0x12ae64,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10c808: 83 ec 08 sub $0x8,%esp 10c80b: 8d 53 08 lea 0x8(%ebx),%edx 10c80e: 52 push %edx 10c80f: 8b 56 1c mov 0x1c(%esi),%edx 10c812: 03 56 24 add 0x24(%esi),%edx 10c815: 29 c2 sub %eax,%edx 10c817: 52 push %edx 10c818: e8 1b 35 00 00 call 10fd38 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10c81d: 8b 46 54 mov 0x54(%esi),%eax 10c820: 8b 56 58 mov 0x58(%esi),%edx 10c823: 89 03 mov %eax,(%ebx) 10c825: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10c828: e8 8f 28 00 00 call 10f0bc <_Thread_Enable_dispatch> 10c82d: 31 c0 xor %eax,%eax return 0; 10c82f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c832: 8d 65 f8 lea -0x8(%ebp),%esp 10c835: 5b pop %ebx 10c836: 5e pop %esi 10c837: c9 leave 10c838: c3 ret 10c839: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c83c: e8 8f 8c 00 00 call 1154d0 <__errno> 10c841: c7 00 16 00 00 00 movl $0x16,(%eax) 10c847: b8 ff ff ff ff mov $0xffffffff,%eax 10c84c: eb e4 jmp 10c832 <== ALWAYS TAKEN 0010b4c0 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10b4c0: 55 push %ebp 10b4c1: 89 e5 mov %esp,%ebp 10b4c3: 57 push %edi 10b4c4: 56 push %esi 10b4c5: 53 push %ebx 10b4c6: 83 ec 3c sub $0x3c,%esp 10b4c9: 8b 4d 0c mov 0xc(%ebp),%ecx 10b4cc: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10b4cf: 85 db test %ebx,%ebx 10b4d1: 0f 84 39 01 00 00 je 10b610 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 10b4d7: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx) 10b4de: 0f 87 2c 01 00 00 ja 10b610 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10b4e4: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx) 10b4eb: 0f 87 1f 01 00 00 ja 10b610 <== ALWAYS TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10b4f1: 83 f9 04 cmp $0x4,%ecx 10b4f4: 0f 84 da 00 00 00 je 10b5d4 10b4fa: 85 c9 test %ecx,%ecx 10b4fc: 0f 85 0e 01 00 00 jne 10b610 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b502: 8d 45 cc lea -0x34(%ebp),%eax 10b505: 89 45 c4 mov %eax,-0x3c(%ebp) 10b508: b9 04 00 00 00 mov $0x4,%ecx 10b50d: 89 c7 mov %eax,%edi 10b50f: 89 de mov %ebx,%esi 10b511: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10b513: 50 push %eax 10b514: 8d 45 e4 lea -0x1c(%ebp),%eax 10b517: 50 push %eax 10b518: ff 75 08 pushl 0x8(%ebp) 10b51b: 68 40 97 12 00 push $0x129740 10b520: e8 af 21 00 00 call 10d6d4 <_Objects_Get> 10b525: 89 c2 mov %eax,%edx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10b527: 83 c4 10 add $0x10,%esp 10b52a: 8b 7d e4 mov -0x1c(%ebp),%edi 10b52d: 85 ff test %edi,%edi 10b52f: 0f 85 db 00 00 00 jne 10b610 case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 10b535: 8b 75 d4 mov -0x2c(%ebp),%esi 10b538: 85 f6 test %esi,%esi 10b53a: 75 0b jne 10b547 10b53c: 8b 4d d8 mov -0x28(%ebp),%ecx 10b53f: 85 c9 test %ecx,%ecx 10b541: 0f 84 e1 00 00 00 je 10b628 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10b547: 83 ec 0c sub $0xc,%esp 10b54a: 53 push %ebx 10b54b: 89 55 c0 mov %edx,-0x40(%ebp) 10b54e: e8 d1 36 00 00 call 10ec24 <_Timespec_To_ticks> 10b553: 8b 55 c0 mov -0x40(%ebp),%edx 10b556: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10b559: 8d 45 d4 lea -0x2c(%ebp),%eax 10b55c: 89 04 24 mov %eax,(%esp) 10b55f: e8 c0 36 00 00 call 10ec24 <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10b564: 8b 55 c0 mov -0x40(%ebp),%edx 10b567: 89 14 24 mov %edx,(%esp) 10b56a: 68 94 b6 10 00 push $0x10b694 10b56f: ff 72 08 pushl 0x8(%edx) 10b572: 50 push %eax 10b573: 8d 42 10 lea 0x10(%edx),%eax 10b576: 50 push %eax 10b577: e8 88 5a 00 00 call 111004 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10b57c: 83 c4 20 add $0x20,%esp 10b57f: 84 c0 test %al,%al 10b581: 8b 55 c0 mov -0x40(%ebp),%edx 10b584: 0f 84 ea 00 00 00 je 10b674 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10b58a: 8b 45 14 mov 0x14(%ebp),%eax 10b58d: 85 c0 test %eax,%eax 10b58f: 0f 84 ef 00 00 00 je 10b684 *ovalue = ptimer->timer_data; 10b595: 8d 42 54 lea 0x54(%edx),%eax 10b598: b9 04 00 00 00 mov $0x4,%ecx 10b59d: 8b 7d 14 mov 0x14(%ebp),%edi 10b5a0: 89 c6 mov %eax,%esi 10b5a2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10b5a4: b9 04 00 00 00 mov $0x4,%ecx 10b5a9: 89 c7 mov %eax,%edi 10b5ab: 8b 75 c4 mov -0x3c(%ebp),%esi 10b5ae: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10b5b0: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10b5b4: 83 ec 0c sub $0xc,%esp 10b5b7: 83 c2 6c add $0x6c,%edx 10b5ba: 52 push %edx 10b5bb: e8 a0 17 00 00 call 10cd60 <_TOD_Get> _Thread_Enable_dispatch(); 10b5c0: e8 83 29 00 00 call 10df48 <_Thread_Enable_dispatch> 10b5c5: 31 c0 xor %eax,%eax return 0; 10b5c7: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b5ca: 8d 65 f4 lea -0xc(%ebp),%esp 10b5cd: 5b pop %ebx 10b5ce: 5e pop %esi 10b5cf: 5f pop %edi 10b5d0: c9 leave 10b5d1: c3 ret 10b5d2: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10b5d4: 8d 45 cc lea -0x34(%ebp),%eax 10b5d7: 89 45 c4 mov %eax,-0x3c(%ebp) 10b5da: 89 c7 mov %eax,%edi 10b5dc: 89 de mov %ebx,%esi 10b5de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10b5e0: 83 ec 0c sub $0xc,%esp 10b5e3: 8d 75 dc lea -0x24(%ebp),%esi 10b5e6: 56 push %esi 10b5e7: e8 74 17 00 00 call 10cd60 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10b5ec: 59 pop %ecx 10b5ed: 5f pop %edi 10b5ee: 8d 7d d4 lea -0x2c(%ebp),%edi 10b5f1: 57 push %edi 10b5f2: 56 push %esi 10b5f3: e8 cc 35 00 00 call 10ebc4 <_Timespec_Greater_than> 10b5f8: 83 c4 10 add $0x10,%esp 10b5fb: 84 c0 test %al,%al 10b5fd: 75 11 jne 10b610 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10b5ff: 52 push %edx 10b600: 57 push %edi 10b601: 57 push %edi 10b602: 56 push %esi 10b603: e8 e0 35 00 00 call 10ebe8 <_Timespec_Subtract> 10b608: 83 c4 10 add $0x10,%esp 10b60b: e9 03 ff ff ff jmp 10b513 <== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b610: e8 1f 8d 00 00 call 114334 <__errno> 10b615: c7 00 16 00 00 00 movl $0x16,(%eax) 10b61b: b8 ff ff ff ff mov $0xffffffff,%eax } 10b620: 8d 65 f4 lea -0xc(%ebp),%esp 10b623: 5b pop %ebx 10b624: 5e pop %esi 10b625: 5f pop %edi 10b626: c9 leave 10b627: c3 ret case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10b628: 83 ec 0c sub $0xc,%esp 10b62b: 8d 40 10 lea 0x10(%eax),%eax 10b62e: 50 push %eax 10b62f: 89 55 c0 mov %edx,-0x40(%ebp) 10b632: e8 0d 3a 00 00 call 10f044 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10b637: 83 c4 10 add $0x10,%esp 10b63a: 8b 55 14 mov 0x14(%ebp),%edx 10b63d: 85 d2 test %edx,%edx 10b63f: 8b 55 c0 mov -0x40(%ebp),%edx 10b642: 74 48 je 10b68c *ovalue = ptimer->timer_data; 10b644: 8d 42 54 lea 0x54(%edx),%eax 10b647: b9 04 00 00 00 mov $0x4,%ecx 10b64c: 8b 7d 14 mov 0x14(%ebp),%edi 10b64f: 89 c6 mov %eax,%esi 10b651: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10b653: b9 04 00 00 00 mov $0x4,%ecx 10b658: 89 c7 mov %eax,%edi 10b65a: 8b 75 c4 mov -0x3c(%ebp),%esi 10b65d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10b65f: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10b663: e8 e0 28 00 00 call 10df48 <_Thread_Enable_dispatch> 10b668: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b66a: 8d 65 f4 lea -0xc(%ebp),%esp 10b66d: 5b pop %ebx 10b66e: 5e pop %esi 10b66f: 5f pop %edi 10b670: c9 leave 10b671: c3 ret 10b672: 66 90 xchg %ax,%ax <== NOT EXECUTED ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10b674: e8 cf 28 00 00 call 10df48 <_Thread_Enable_dispatch> 10b679: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b67b: 8d 65 f4 lea -0xc(%ebp),%esp 10b67e: 5b pop %ebx 10b67f: 5e pop %esi 10b680: 5f pop %edi 10b681: c9 leave 10b682: c3 ret 10b683: 90 nop <== NOT EXECUTED 10b684: 8d 42 54 lea 0x54(%edx),%eax 10b687: e9 18 ff ff ff jmp 10b5a4 <== ALWAYS TAKEN 10b68c: 8d 42 54 lea 0x54(%edx),%eax 10b68f: eb c2 jmp 10b653 <== ALWAYS TAKEN 001103a4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 1103a4: 55 push %ebp 1103a5: 89 e5 mov %esp,%ebp 1103a7: 57 push %edi 1103a8: 56 push %esi 1103a9: 53 push %ebx 1103aa: 83 ec 2c sub $0x2c,%esp 1103ad: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 1103b0: 8b 0d 5c 7d 12 00 mov 0x127d5c,%ecx 1103b6: 85 c9 test %ecx,%ecx 1103b8: 0f 84 8e 00 00 00 je 11044c _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 1103be: 83 ec 0c sub $0xc,%esp 1103c1: 68 40 7d 12 00 push $0x127d40 1103c6: e8 6d e1 ff ff call 10e538 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 1103cb: 83 e8 02 sub $0x2,%eax 1103ce: 83 c4 10 add $0x10,%esp 1103d1: 83 f8 01 cmp $0x1,%eax 1103d4: 0f 86 a2 00 00 00 jbe 11047c <== NEVER TAKEN 1103da: 31 f6 xor %esi,%esi <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 1103dc: 85 db test %ebx,%ebx 1103de: 74 62 je 110442 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 1103e0: ba 83 de 1b 43 mov $0x431bde83,%edx 1103e5: 89 d8 mov %ebx,%eax 1103e7: f7 e2 mul %edx 1103e9: c1 ea 12 shr $0x12,%edx 1103ec: 89 55 e0 mov %edx,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 1103ef: 8d 04 92 lea (%edx,%edx,4),%eax 1103f2: 8d 04 80 lea (%eax,%eax,4),%eax 1103f5: 8d 04 80 lea (%eax,%eax,4),%eax 1103f8: 8d 04 80 lea (%eax,%eax,4),%eax 1103fb: 8d 04 80 lea (%eax,%eax,4),%eax 1103fe: 8d 04 80 lea (%eax,%eax,4),%eax 110401: c1 e0 06 shl $0x6,%eax 110404: 29 c3 sub %eax,%ebx 110406: 8d 04 9b lea (%ebx,%ebx,4),%eax 110409: 8d 04 80 lea (%eax,%eax,4),%eax 11040c: 8d 04 80 lea (%eax,%eax,4),%eax 11040f: c1 e0 03 shl $0x3,%eax 110412: 89 45 e4 mov %eax,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 110415: 83 ec 0c sub $0xc,%esp 110418: 8d 5d e0 lea -0x20(%ebp),%ebx 11041b: 53 push %ebx 11041c: e8 17 10 00 00 call 111438 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 110421: 89 1c 24 mov %ebx,(%esp) 110424: e8 0f 10 00 00 call 111438 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 110429: a3 4c 7d 12 00 mov %eax,0x127d4c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11042e: 58 pop %eax 11042f: 5a pop %edx 110430: 68 40 7d 12 00 push $0x127d40 110435: 68 b8 74 12 00 push $0x1274b8 11043a: e8 c1 df ff ff call 10e400 <_Watchdog_Insert> 11043f: 83 c4 10 add $0x10,%esp } return remaining; } 110442: 89 f0 mov %esi,%eax 110444: 8d 65 f4 lea -0xc(%ebp),%esp 110447: 5b pop %ebx 110448: 5e pop %esi 110449: 5f pop %edi 11044a: c9 leave 11044b: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11044c: c7 05 48 7d 12 00 00 movl $0x0,0x127d48 110453: 00 00 00 the_watchdog->routine = routine; 110456: c7 05 5c 7d 12 00 d8 movl $0x1104d8,0x127d5c 11045d: 04 11 00 the_watchdog->id = id; 110460: c7 05 60 7d 12 00 00 movl $0x0,0x127d60 110467: 00 00 00 the_watchdog->user_data = user_data; 11046a: c7 05 64 7d 12 00 00 movl $0x0,0x127d64 110471: 00 00 00 110474: 31 f6 xor %esi,%esi 110476: e9 61 ff ff ff jmp 1103dc <== ALWAYS TAKEN 11047b: 90 nop <== NOT EXECUTED * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 11047c: a1 54 7d 12 00 mov 0x127d54,%eax 110481: 03 05 4c 7d 12 00 add 0x127d4c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 110487: 83 ec 08 sub $0x8,%esp 11048a: 8d 55 e0 lea -0x20(%ebp),%edx 11048d: 52 push %edx 11048e: 2b 05 58 7d 12 00 sub 0x127d58,%eax 110494: 50 push %eax 110495: e8 56 0f 00 00 call 1113f0 <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 11049a: 8b 45 e0 mov -0x20(%ebp),%eax 11049d: 8d 04 80 lea (%eax,%eax,4),%eax 1104a0: 8d 04 80 lea (%eax,%eax,4),%eax 1104a3: 8d 04 80 lea (%eax,%eax,4),%eax 1104a6: 8d 04 80 lea (%eax,%eax,4),%eax 1104a9: 8d 04 80 lea (%eax,%eax,4),%eax 1104ac: 8d 3c 80 lea (%eax,%eax,4),%edi 1104af: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 1104b2: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 1104b7: 8b 45 e4 mov -0x1c(%ebp),%eax 1104ba: f7 e9 imul %ecx 1104bc: 89 45 d0 mov %eax,-0x30(%ebp) 1104bf: 89 55 d4 mov %edx,-0x2c(%ebp) 1104c2: 8b 75 d4 mov -0x2c(%ebp),%esi 1104c5: c1 fe 06 sar $0x6,%esi 1104c8: 8b 45 e4 mov -0x1c(%ebp),%eax 1104cb: 99 cltd 1104cc: 29 d6 sub %edx,%esi 1104ce: 01 fe add %edi,%esi 1104d0: 83 c4 10 add $0x10,%esp 1104d3: e9 04 ff ff ff jmp 1103dc <== ALWAYS TAKEN