0010e3b0 <_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 ) { 10e3b0: 55 push %ebp 10e3b1: 89 e5 mov %esp,%ebp 10e3b3: 53 push %ebx 10e3b4: 83 ec 04 sub $0x4,%esp 10e3b7: 8b 45 08 mov 0x8(%ebp),%eax 10e3ba: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10e3bd: 8b 15 70 3a 12 00 mov 0x123a70,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10e3c3: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10e3ca: 83 78 50 00 cmpl $0x0,0x50(%eax) 10e3ce: 0f 84 87 00 00 00 je 10e45b <_CORE_mutex_Seize_interrupt_trylock+0xab> the_mutex->lock = CORE_MUTEX_LOCKED; 10e3d4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10e3db: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10e3de: 8b 5a 08 mov 0x8(%edx),%ebx 10e3e1: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10e3e4: 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; 10e3eb: 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 ) || 10e3ee: 83 fb 02 cmp $0x2,%ebx 10e3f1: 74 05 je 10e3f8 <_CORE_mutex_Seize_interrupt_trylock+0x48> 10e3f3: 83 fb 03 cmp $0x3,%ebx 10e3f6: 75 08 jne 10e400 <_CORE_mutex_Seize_interrupt_trylock+0x50> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10e3f8: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10e3fb: 83 fb 03 cmp $0x3,%ebx 10e3fe: 74 05 je 10e405 <_CORE_mutex_Seize_interrupt_trylock+0x55> _ISR_Enable( *level_p ); 10e400: ff 31 pushl (%ecx) 10e402: 9d popf 10e403: eb 7b jmp 10e480 <_CORE_mutex_Seize_interrupt_trylock+0xd0> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10e405: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10e408: 3b 58 4c cmp 0x4c(%eax),%ebx 10e40b: 75 05 jne 10e412 <_CORE_mutex_Seize_interrupt_trylock+0x62> _ISR_Enable( *level_p ); 10e40d: ff 31 pushl (%ecx) 10e40f: 9d popf 10e410: eb 6e jmp 10e480 <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; } if ( current > ceiling ) { 10e412: 76 2a jbe 10e43e <_CORE_mutex_Seize_interrupt_trylock+0x8e> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10e414: 8b 15 b4 39 12 00 mov 0x1239b4,%edx 10e41a: 42 inc %edx 10e41b: 89 15 b4 39 12 00 mov %edx,0x1239b4 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10e421: ff 31 pushl (%ecx) 10e423: 9d popf _Thread_Change_priority( 10e424: 52 push %edx 10e425: 6a 00 push $0x0 10e427: ff 70 4c pushl 0x4c(%eax) 10e42a: ff 70 5c pushl 0x5c(%eax) 10e42d: e8 96 d2 ff ff call 10b6c8 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10e432: e8 2e d7 ff ff call 10bb65 <_Thread_Enable_dispatch> 10e437: 31 c0 xor %eax,%eax 10e439: 83 c4 10 add $0x10,%esp 10e43c: eb 4b jmp 10e489 <_CORE_mutex_Seize_interrupt_trylock+0xd9> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10e43e: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10e445: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10e44c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10e453: ff 4a 1c decl 0x1c(%edx) _ISR_Enable( *level_p ); 10e456: ff 31 pushl (%ecx) 10e458: 9d popf 10e459: eb 25 jmp 10e480 <_CORE_mutex_Seize_interrupt_trylock+0xd0> /* * 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 ) ) { 10e45b: 8b 58 5c mov 0x5c(%eax),%ebx 10e45e: 39 d3 cmp %edx,%ebx 10e460: 75 22 jne 10e484 <_CORE_mutex_Seize_interrupt_trylock+0xd4> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10e462: 8b 50 40 mov 0x40(%eax),%edx 10e465: 85 d2 test %edx,%edx 10e467: 74 05 je 10e46e <_CORE_mutex_Seize_interrupt_trylock+0xbe> 10e469: 4a dec %edx 10e46a: 75 18 jne 10e484 <_CORE_mutex_Seize_interrupt_trylock+0xd4> 10e46c: eb 08 jmp 10e476 <_CORE_mutex_Seize_interrupt_trylock+0xc6> <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10e46e: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 10e471: ff 31 pushl (%ecx) 10e473: 9d popf 10e474: eb 0a jmp 10e480 <_CORE_mutex_Seize_interrupt_trylock+0xd0> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10e476: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10e47d: ff 31 pushl (%ecx) <== NOT EXECUTED 10e47f: 9d popf <== NOT EXECUTED 10e480: 31 c0 xor %eax,%eax 10e482: eb 05 jmp 10e489 <_CORE_mutex_Seize_interrupt_trylock+0xd9> 10e484: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10e489: 8b 5d fc mov -0x4(%ebp),%ebx 10e48c: c9 leave 10e48d: c3 ret 00109b5c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109b5c: 55 push %ebp 109b5d: 89 e5 mov %esp,%ebp 109b5f: 57 push %edi 109b60: 56 push %esi 109b61: 53 push %ebx 109b62: 83 ec 2c sub $0x2c,%esp 109b65: 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 ]; 109b68: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109b6e: 8b 43 30 mov 0x30(%ebx),%eax 109b71: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109b74: 9c pushf 109b75: fa cli 109b76: 58 pop %eax pending_events = api->pending_events; 109b77: 8b 17 mov (%edi),%edx 109b79: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109b7c: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 109b7f: 21 f2 and %esi,%edx 109b81: 75 07 jne 109b8a <_Event_Surrender+0x2e> _ISR_Enable( level ); 109b83: 50 push %eax 109b84: 9d popf return; 109b85: e9 b0 00 00 00 jmp 109c3a <_Event_Surrender+0xde> /* * 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() && 109b8a: 8b 0d 4c 3a 12 00 mov 0x123a4c,%ecx 109b90: 85 c9 test %ecx,%ecx 109b92: 74 49 je 109bdd <_Event_Surrender+0x81> 109b94: 3b 1d 70 3a 12 00 cmp 0x123a70,%ebx 109b9a: 75 41 jne 109bdd <_Event_Surrender+0x81> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109b9c: 8b 0d 08 3c 12 00 mov 0x123c08,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109ba2: 83 f9 02 cmp $0x2,%ecx 109ba5: 74 09 je 109bb0 <_Event_Surrender+0x54> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109ba7: 8b 0d 08 3c 12 00 mov 0x123c08,%ecx /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 109bad: 49 dec %ecx 109bae: 75 2d jne 109bdd <_Event_Surrender+0x81> _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) ) { 109bb0: 39 f2 cmp %esi,%edx 109bb2: 74 06 je 109bba <_Event_Surrender+0x5e> 109bb4: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109bb8: 74 1f je 109bd9 <_Event_Surrender+0x7d> api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 109bba: 89 d6 mov %edx,%esi 109bbc: f7 d6 not %esi 109bbe: 23 75 d4 and -0x2c(%ebp),%esi 109bc1: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109bc3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109bca: 8b 4b 28 mov 0x28(%ebx),%ecx 109bcd: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109bcf: c7 05 08 3c 12 00 03 movl $0x3,0x123c08 109bd6: 00 00 00 } _ISR_Enable( level ); 109bd9: 50 push %eax 109bda: 9d popf return; 109bdb: eb 5d jmp 109c3a <_Event_Surrender+0xde> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109bdd: f6 43 11 01 testb $0x1,0x11(%ebx) 109be1: 74 55 je 109c38 <_Event_Surrender+0xdc> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109be3: 39 f2 cmp %esi,%edx 109be5: 74 06 je 109bed <_Event_Surrender+0x91> 109be7: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109beb: 74 4b je 109c38 <_Event_Surrender+0xdc> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 109bed: 89 d6 mov %edx,%esi 109bef: f7 d6 not %esi 109bf1: 23 75 d4 and -0x2c(%ebp),%esi 109bf4: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 109bf6: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109bfd: 8b 4b 28 mov 0x28(%ebx),%ecx 109c00: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109c02: 50 push %eax 109c03: 9d popf 109c04: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109c05: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109c09: 74 06 je 109c11 <_Event_Surrender+0xb5> _ISR_Enable( level ); 109c0b: 50 push %eax 109c0c: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109c0d: 51 push %ecx 109c0e: 51 push %ecx 109c0f: eb 17 jmp 109c28 <_Event_Surrender+0xcc> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109c11: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109c18: 50 push %eax 109c19: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109c1a: 83 ec 0c sub $0xc,%esp 109c1d: 8d 43 48 lea 0x48(%ebx),%eax 109c20: 50 push %eax 109c21: e8 ba 2d 00 00 call 10c9e0 <_Watchdog_Remove> 109c26: 58 pop %eax 109c27: 5a pop %edx 109c28: 68 f8 ff 03 10 push $0x1003fff8 109c2d: 53 push %ebx 109c2e: e8 b5 1b 00 00 call 10b7e8 <_Thread_Clear_state> 109c33: 83 c4 10 add $0x10,%esp 109c36: eb 02 jmp 109c3a <_Event_Surrender+0xde> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109c38: 50 push %eax <== NOT EXECUTED 109c39: 9d popf <== NOT EXECUTED } 109c3a: 8d 65 f4 lea -0xc(%ebp),%esp 109c3d: 5b pop %ebx 109c3e: 5e pop %esi 109c3f: 5f pop %edi 109c40: c9 leave 109c41: c3 ret 0010aef4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10aef4: 55 push %ebp 10aef5: 89 e5 mov %esp,%ebp 10aef7: 53 push %ebx 10aef8: 83 ec 08 sub $0x8,%esp 10aefb: 8b 45 08 mov 0x8(%ebp),%eax 10aefe: 8b 55 0c mov 0xc(%ebp),%edx 10af01: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10af04: a3 58 3a 12 00 mov %eax,0x123a58 _Internal_errors_What_happened.is_internal = is_internal; 10af09: 88 15 5c 3a 12 00 mov %dl,0x123a5c _Internal_errors_What_happened.the_error = the_error; 10af0f: 89 1d 60 3a 12 00 mov %ebx,0x123a60 _User_extensions_Fatal( the_source, is_internal, the_error ); 10af15: 53 push %ebx 10af16: 0f b6 d2 movzbl %dl,%edx 10af19: 52 push %edx 10af1a: 50 push %eax 10af1b: e8 8b 18 00 00 call 10c7ab <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10af20: c7 05 4c 3b 12 00 05 movl $0x5,0x123b4c <== NOT EXECUTED 10af27: 00 00 00 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10af2a: fa cli <== NOT EXECUTED 10af2b: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10af2d: f4 hlt <== NOT EXECUTED 10af2e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10af31: eb fe jmp 10af31 <_Internal_error_Occurred+0x3d> <== NOT EXECUTED 0010b3f8 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 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 45 08 mov 0x8(%ebp),%eax 10b404: 8b 55 0c mov 0xc(%ebp),%edx 10b407: 8b 75 10 mov 0x10(%ebp),%esi 10b40a: 8b 5d 14 mov 0x14(%ebp),%ebx 10b40d: 8b 4d 20 mov 0x20(%ebp),%ecx 10b410: 89 4d e4 mov %ecx,-0x1c(%ebp) 10b413: 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; 10b417: 89 10 mov %edx,(%eax) information->the_class = the_class; 10b419: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10b41d: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10b420: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10b427: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10b42e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10b435: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10b43b: 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; 10b441: 8b 3c 95 88 39 12 00 mov 0x123988(,%edx,4),%edi 10b448: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10b44b: 89 df mov %ebx,%edi 10b44d: 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 = 10b450: 89 f9 mov %edi,%ecx 10b452: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10b455: 89 d9 mov %ebx,%ecx 10b457: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10b45d: 85 ff test %edi,%edi 10b45f: 74 10 je 10b471 <_Objects_Initialize_information+0x79> 10b461: 85 c9 test %ecx,%ecx 10b463: 75 0c jne 10b471 <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10b465: 50 push %eax 10b466: 6a 14 push $0x14 10b468: 6a 01 push $0x1 10b46a: 6a 00 push $0x0 10b46c: e8 83 fa ff ff call 10aef4 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10b471: 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; 10b475: c7 40 1c 50 36 12 00 movl $0x123650,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10b47c: c1 e2 18 shl $0x18,%edx 10b47f: 81 ca 00 00 01 00 or $0x10000,%edx 10b485: c1 e6 1b shl $0x1b,%esi 10b488: 09 f2 or %esi,%edx 10b48a: 85 c9 test %ecx,%ecx 10b48c: 0f 95 c3 setne %bl 10b48f: 89 de mov %ebx,%esi 10b491: 81 e6 ff 00 00 00 and $0xff,%esi 10b497: 09 f2 or %esi,%edx 10b499: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10b49c: 8b 55 e4 mov -0x1c(%ebp),%edx 10b49f: f6 c2 03 test $0x3,%dl 10b4a2: 74 06 je 10b4aa <_Objects_Initialize_information+0xb2> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10b4a4: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10b4a7: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10b4aa: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10b4ae: 8d 50 24 lea 0x24(%eax),%edx 10b4b1: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10b4b4: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10b4bb: 8d 50 20 lea 0x20(%eax),%edx 10b4be: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10b4c1: 85 c9 test %ecx,%ecx 10b4c3: 74 0f je 10b4d4 <_Objects_Initialize_information+0xdc> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10b4c5: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b4c8: 8d 65 f4 lea -0xc(%ebp),%esp 10b4cb: 5b pop %ebx 10b4cc: 5e pop %esi 10b4cd: 5f pop %edi 10b4ce: 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 ); 10b4cf: e9 4c fb ff ff jmp 10b020 <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10b4d4: 8d 65 f4 lea -0xc(%ebp),%esp 10b4d7: 5b pop %ebx 10b4d8: 5e pop %esi 10b4d9: 5f pop %edi 10b4da: c9 leave 10b4db: c3 ret 0010c05c <_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 ) { 10c05c: 55 push %ebp 10c05d: 89 e5 mov %esp,%ebp 10c05f: 57 push %edi 10c060: 56 push %esi 10c061: 53 push %ebx 10c062: 83 ec 10 sub $0x10,%esp 10c065: 8b 4d 08 mov 0x8(%ebp),%ecx 10c068: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c06b: 8d 50 3c lea 0x3c(%eax),%edx 10c06e: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c071: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c078: 8d 50 38 lea 0x38(%eax),%edx 10c07b: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c07e: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c081: 89 de mov %ebx,%esi 10c083: c1 ee 06 shr $0x6,%esi 10c086: 6b f6 0c imul $0xc,%esi,%esi 10c089: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c08c: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c08f: f6 c3 20 test $0x20,%bl 10c092: 75 70 jne 10c104 <_Thread_queue_Enqueue_priority+0xa8> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c094: 8d 56 04 lea 0x4(%esi),%edx 10c097: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c09a: 9c pushf 10c09b: fa cli 10c09c: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c09f: 8b 16 mov (%esi),%edx 10c0a1: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c0a8: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c0ab: eb 1f jmp 10c0cc <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c0ad: 8b 72 14 mov 0x14(%edx),%esi 10c0b0: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c0b3: 39 f3 cmp %esi,%ebx 10c0b5: 76 1a jbe 10c0d1 <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c0b7: ff 75 f0 pushl -0x10(%ebp) 10c0ba: 9d popf 10c0bb: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c0bc: 85 7a 10 test %edi,0x10(%edx) 10c0bf: 75 09 jne 10c0ca <_Thread_queue_Enqueue_priority+0x6e> 10c0c1: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c0c4: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c0c7: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c0c8: eb d0 jmp 10c09a <_Thread_queue_Enqueue_priority+0x3e> <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c0ca: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c0cc: 3b 55 e8 cmp -0x18(%ebp),%edx 10c0cf: 75 dc jne 10c0ad <_Thread_queue_Enqueue_priority+0x51> 10c0d1: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c0d4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c0d8: 0f 85 a9 00 00 00 jne 10c187 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c0de: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c0e5: 3b 5d ec cmp -0x14(%ebp),%ebx 10c0e8: 0f 84 82 00 00 00 je 10c170 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c0ee: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c0f1: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c0f3: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c0f6: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c0f8: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c0fb: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c0fe: ff 75 f0 pushl -0x10(%ebp) 10c101: 9d popf 10c102: eb 65 jmp 10c169 <_Thread_queue_Enqueue_priority+0x10d> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c104: 0f b6 15 34 fa 11 00 movzbl 0x11fa34,%edx 10c10b: 42 inc %edx 10c10c: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c10f: 9c pushf 10c110: fa cli 10c111: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c114: 8b 56 08 mov 0x8(%esi),%edx 10c117: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c11a: eb 20 jmp 10c13c <_Thread_queue_Enqueue_priority+0xe0> search_priority = search_thread->current_priority; 10c11c: 8b 72 14 mov 0x14(%edx),%esi 10c11f: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c122: 39 f3 cmp %esi,%ebx 10c124: 73 1b jae 10c141 <_Thread_queue_Enqueue_priority+0xe5> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c126: ff 75 f0 pushl -0x10(%ebp) 10c129: 9d popf 10c12a: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c12b: 85 7a 10 test %edi,0x10(%edx) 10c12e: 75 09 jne 10c139 <_Thread_queue_Enqueue_priority+0xdd> 10c130: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c133: ff 75 f0 pushl -0x10(%ebp) 10c136: 9d popf goto restart_reverse_search; 10c137: eb cb jmp 10c104 <_Thread_queue_Enqueue_priority+0xa8> } search_thread = (Thread_Control *) 10c139: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c13c: 3b 55 e8 cmp -0x18(%ebp),%edx 10c13f: 75 db jne 10c11c <_Thread_queue_Enqueue_priority+0xc0> 10c141: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c144: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c148: 75 3d jne 10c187 <_Thread_queue_Enqueue_priority+0x12b> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c14a: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c151: 3b 5d ec cmp -0x14(%ebp),%ebx 10c154: 74 1a je 10c170 <_Thread_queue_Enqueue_priority+0x114> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c156: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c158: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c15a: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c15d: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c15f: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c162: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c165: ff 75 f0 pushl -0x10(%ebp) 10c168: 9d popf 10c169: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c16e: eb 1f jmp 10c18f <_Thread_queue_Enqueue_priority+0x133> 10c170: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c173: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c176: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c178: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c17b: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c17d: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c180: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c183: 56 push %esi 10c184: 9d popf 10c185: eb e2 jmp 10c169 <_Thread_queue_Enqueue_priority+0x10d> * 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; 10c187: 8b 45 10 mov 0x10(%ebp),%eax 10c18a: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c18c: 8b 41 30 mov 0x30(%ecx),%eax } 10c18f: 83 c4 10 add $0x10,%esp 10c192: 5b pop %ebx 10c193: 5e pop %esi 10c194: 5f pop %edi 10c195: c9 leave 10c196: c3 ret 0010c779 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10c779: 55 push %ebp 10c77a: 89 e5 mov %esp,%ebp 10c77c: 56 push %esi 10c77d: 53 push %ebx 10c77e: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10c781: 8b 1d cc 3b 12 00 mov 0x123bcc,%ebx 10c787: eb 13 jmp 10c79c <_User_extensions_Thread_exitted+0x23> !_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 ) 10c789: 8b 43 2c mov 0x2c(%ebx),%eax 10c78c: 85 c0 test %eax,%eax 10c78e: 74 09 je 10c799 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10c790: 83 ec 0c sub $0xc,%esp 10c793: 56 push %esi 10c794: ff d0 call *%eax 10c796: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10c799: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10c79c: 81 fb c4 3b 12 00 cmp $0x123bc4,%ebx 10c7a2: 75 e5 jne 10c789 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10c7a4: 8d 65 f8 lea -0x8(%ebp),%esp 10c7a7: 5b pop %ebx 10c7a8: 5e pop %esi 10c7a9: c9 leave 10c7aa: c3 ret 0010ba50 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10ba50: 55 push %ebp 10ba51: 89 e5 mov %esp,%ebp 10ba53: 56 push %esi 10ba54: 53 push %ebx 10ba55: 83 ec 10 sub $0x10,%esp 10ba58: 8b 55 08 mov 0x8(%ebp),%edx 10ba5b: 8b 75 0c mov 0xc(%ebp),%esi 10ba5e: 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() ) 10ba61: b8 16 00 00 00 mov $0x16,%eax 10ba66: 80 3d c4 21 12 00 00 cmpb $0x0,0x1221c4 10ba6d: 74 5d je 10bacc return RTEMS_NOT_CONFIGURED; if ( !note ) 10ba6f: b0 09 mov $0x9,%al 10ba71: 85 db test %ebx,%ebx 10ba73: 74 57 je 10bacc /* * 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 ) 10ba75: b0 0a mov $0xa,%al 10ba77: 83 fe 0f cmp $0xf,%esi 10ba7a: 77 50 ja 10bacc /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10ba7c: 85 d2 test %edx,%edx 10ba7e: 74 0a je 10ba8a _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10ba80: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba85: 3b 50 08 cmp 0x8(%eax),%edx 10ba88: 75 13 jne 10ba9d api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10ba8a: a1 c4 64 12 00 mov 0x1264c4,%eax 10ba8f: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax 10ba95: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10ba99: 89 03 mov %eax,(%ebx) 10ba9b: eb 2d jmp 10baca return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10ba9d: 50 push %eax 10ba9e: 50 push %eax 10ba9f: 8d 45 f4 lea -0xc(%ebp),%eax 10baa2: 50 push %eax 10baa3: 52 push %edx 10baa4: e8 9f 1b 00 00 call 10d648 <_Thread_Get> 10baa9: 89 c2 mov %eax,%edx switch ( location ) { 10baab: 83 c4 10 add $0x10,%esp 10baae: b8 04 00 00 00 mov $0x4,%eax 10bab3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bab7: 75 13 jne 10bacc case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10bab9: 8b 82 f0 00 00 00 mov 0xf0(%edx),%eax <== NOT EXECUTED 10babf: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax <== NOT EXECUTED 10bac3: 89 03 mov %eax,(%ebx) <== NOT EXECUTED _Thread_Enable_dispatch(); 10bac5: e8 5b 1b 00 00 call 10d625 <_Thread_Enable_dispatch> <== NOT EXECUTED 10baca: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bacc: 8d 65 f8 lea -0x8(%ebp),%esp 10bacf: 5b pop %ebx 10bad0: 5e pop %esi 10bad1: c9 leave 10bad2: c3 ret