=============================================================================== 00117374 <_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 ) { 117374: 55 push %ebp 117375: 89 e5 mov %esp,%ebp 117377: 57 push %edi 117378: 56 push %esi 117379: 53 push %ebx 11737a: 83 ec 1c sub $0x1c,%esp 11737d: 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 ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 117380: b8 01 00 00 00 mov $0x1,%eax { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 117385: 8b 55 10 mov 0x10(%ebp),%edx 117388: 3b 53 4c cmp 0x4c(%ebx),%edx 11738b: 77 4e ja 1173db <_CORE_message_queue_Broadcast+0x67><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11738d: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117391: 75 09 jne 11739c <_CORE_message_queue_Broadcast+0x28> 117393: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11739a: eb 23 jmp 1173bf <_CORE_message_queue_Broadcast+0x4b> *count = 0; 11739c: 8b 45 1c mov 0x1c(%ebp),%eax 11739f: c7 00 00 00 00 00 movl $0x0,(%eax) 1173a5: eb 32 jmp 1173d9 <_CORE_message_queue_Broadcast+0x65> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 1173a7: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1173aa: 8b 42 2c mov 0x2c(%edx),%eax 1173ad: 89 c7 mov %eax,%edi 1173af: 8b 75 0c mov 0xc(%ebp),%esi 1173b2: 8b 4d 10 mov 0x10(%ebp),%ecx 1173b5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1173b7: 8b 42 28 mov 0x28(%edx),%eax 1173ba: 8b 55 10 mov 0x10(%ebp),%edx 1173bd: 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 = 1173bf: 83 ec 0c sub $0xc,%esp 1173c2: 53 push %ebx 1173c3: e8 10 24 00 00 call 1197d8 <_Thread_queue_Dequeue> 1173c8: 89 c2 mov %eax,%edx 1173ca: 83 c4 10 add $0x10,%esp 1173cd: 85 c0 test %eax,%eax 1173cf: 75 d6 jne 1173a7 <_CORE_message_queue_Broadcast+0x33> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 1173d1: 8b 55 e4 mov -0x1c(%ebp),%edx 1173d4: 8b 45 1c mov 0x1c(%ebp),%eax 1173d7: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1173d9: 31 c0 xor %eax,%eax } 1173db: 8d 65 f4 lea -0xc(%ebp),%esp 1173de: 5b pop %ebx 1173df: 5e pop %esi 1173e0: 5f pop %edi 1173e1: c9 leave 1173e2: c3 ret =============================================================================== 00112228 <_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 ) { 112228: 55 push %ebp 112229: 89 e5 mov %esp,%ebp 11222b: 57 push %edi 11222c: 56 push %esi 11222d: 53 push %ebx 11222e: 83 ec 1c sub $0x1c,%esp 112231: 8b 5d 08 mov 0x8(%ebp),%ebx 112234: 8b 7d 10 mov 0x10(%ebp),%edi 112237: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 11223a: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 11223d: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 112244: 89 53 4c mov %edx,0x4c(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 112247: 89 d0 mov %edx,%eax 112249: f6 c2 03 test $0x3,%dl 11224c: 74 0c je 11225a <_CORE_message_queue_Initialize+0x32> allocated_message_size += sizeof(uint32_t); 11224e: 83 c0 04 add $0x4,%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 112251: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) return false; 112254: 31 f6 xor %esi,%esi if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) 112256: 39 d0 cmp %edx,%eax 112258: 72 68 jb 1122c2 <_CORE_message_queue_Initialize+0x9a><== NEVER 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)); 11225a: 8d 50 10 lea 0x10(%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 * 11225d: 89 d1 mov %edx,%ecx 11225f: 0f af cf imul %edi,%ecx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; 112262: 31 f6 xor %esi,%esi * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 112264: 39 c1 cmp %eax,%ecx 112266: 72 5a jb 1122c2 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 112268: 83 ec 0c sub $0xc,%esp 11226b: 51 push %ecx 11226c: 89 55 e4 mov %edx,-0x1c(%ebp) 11226f: e8 72 26 00 00 call 1148e6 <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 112274: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 112277: 83 c4 10 add $0x10,%esp 11227a: 85 c0 test %eax,%eax 11227c: 8b 55 e4 mov -0x1c(%ebp),%edx 11227f: 74 41 je 1122c2 <_CORE_message_queue_Initialize+0x9a> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112281: 52 push %edx 112282: 57 push %edi 112283: 50 push %eax 112284: 8d 43 60 lea 0x60(%ebx),%eax 112287: 50 push %eax 112288: e8 37 40 00 00 call 1162c4 <_Chain_Initialize> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 11228d: 8d 43 54 lea 0x54(%ebx),%eax 112290: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 112293: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 11229a: 8d 43 50 lea 0x50(%ebx),%eax 11229d: 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( 1122a0: 6a 06 push $0x6 1122a2: 68 80 00 00 00 push $0x80 1122a7: 8b 45 0c mov 0xc(%ebp),%eax 1122aa: 83 38 01 cmpl $0x1,(%eax) 1122ad: 0f 94 c0 sete %al 1122b0: 0f b6 c0 movzbl %al,%eax 1122b3: 50 push %eax 1122b4: 53 push %ebx 1122b5: e8 8a 1e 00 00 call 114144 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1122ba: 83 c4 20 add $0x20,%esp 1122bd: be 01 00 00 00 mov $0x1,%esi } 1122c2: 89 f0 mov %esi,%eax 1122c4: 8d 65 f4 lea -0xc(%ebp),%esp 1122c7: 5b pop %ebx 1122c8: 5e pop %esi 1122c9: 5f pop %edi 1122ca: c9 leave 1122cb: c3 ret =============================================================================== 001122cc <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1122cc: 55 push %ebp 1122cd: 89 e5 mov %esp,%ebp 1122cf: 57 push %edi 1122d0: 56 push %esi 1122d1: 53 push %ebx 1122d2: 83 ec 2c sub $0x2c,%esp 1122d5: 8b 45 08 mov 0x8(%ebp),%eax 1122d8: 8b 55 0c mov 0xc(%ebp),%edx 1122db: 89 55 dc mov %edx,-0x24(%ebp) 1122de: 8b 55 10 mov 0x10(%ebp),%edx 1122e1: 89 55 e4 mov %edx,-0x1c(%ebp) 1122e4: 8b 7d 14 mov 0x14(%ebp),%edi 1122e7: 8b 55 1c mov 0x1c(%ebp),%edx 1122ea: 89 55 d4 mov %edx,-0x2c(%ebp) 1122ed: 8a 55 18 mov 0x18(%ebp),%dl 1122f0: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1122f3: 8b 0d ec cb 12 00 mov 0x12cbec,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1122f9: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112300: 9c pushf 112301: fa cli 112302: 8f 45 e0 popl -0x20(%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 ); } 112305: 8b 50 50 mov 0x50(%eax),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 112308: 8d 58 54 lea 0x54(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11230b: 39 da cmp %ebx,%edx 11230d: 74 47 je 112356 <_CORE_message_queue_Seize+0x8a> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11230f: 8b 32 mov (%edx),%esi head->next = new_first; 112311: 89 70 50 mov %esi,0x50(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 112314: 8d 58 50 lea 0x50(%eax),%ebx 112317: 89 5e 04 mov %ebx,0x4(%esi) executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11231a: 85 d2 test %edx,%edx 11231c: 74 38 je 112356 <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 11231e: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 112321: ff 75 e0 pushl -0x20(%ebp) 112324: 9d popf *size_p = the_message->Contents.size; 112325: 8b 4a 08 mov 0x8(%edx),%ecx 112328: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 11232a: 8b 0d ec cb 12 00 mov 0x12cbec,%ecx 112330: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112337: 8d 72 0c lea 0xc(%edx),%esi const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11233a: 8b 0f mov (%edi),%ecx 11233c: 8b 7d e4 mov -0x1c(%ebp),%edi 11233f: f3 a4 rep movsb %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 112341: 89 55 0c mov %edx,0xc(%ebp) 112344: 83 c0 60 add $0x60,%eax 112347: 89 45 08 mov %eax,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 11234a: 83 c4 2c add $0x2c,%esp 11234d: 5b pop %ebx 11234e: 5e pop %esi 11234f: 5f pop %edi 112350: c9 leave 112351: e9 52 fe ff ff jmp 1121a8 <_Chain_Append> return; } #endif } if ( !wait ) { 112356: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 11235a: 75 13 jne 11236f <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 11235c: ff 75 e0 pushl -0x20(%ebp) 11235f: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 112360: 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 ); } 112367: 83 c4 2c add $0x2c,%esp 11236a: 5b pop %ebx 11236b: 5e pop %esi 11236c: 5f pop %edi 11236d: c9 leave 11236e: c3 ret RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 11236f: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 112376: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 112379: 8b 55 dc mov -0x24(%ebp),%edx 11237c: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 11237f: 8b 55 e4 mov -0x1c(%ebp),%edx 112382: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 112385: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 112388: ff 75 e0 pushl -0x20(%ebp) 11238b: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 11238c: c7 45 10 f4 41 11 00 movl $0x1141f4,0x10(%ebp) 112393: 8b 55 d4 mov -0x2c(%ebp),%edx 112396: 89 55 0c mov %edx,0xc(%ebp) 112399: 89 45 08 mov %eax,0x8(%ebp) } 11239c: 83 c4 2c add $0x2c,%esp 11239f: 5b pop %ebx 1123a0: 5e pop %esi 1123a1: 5f pop %edi 1123a2: 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 ); 1123a3: e9 70 1b 00 00 jmp 113f18 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010abd1 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10abd1: 55 push %ebp 10abd2: 89 e5 mov %esp,%ebp 10abd4: 53 push %ebx 10abd5: 83 ec 14 sub $0x14,%esp 10abd8: 8b 5d 08 mov 0x8(%ebp),%ebx 10abdb: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10abde: a1 c0 45 12 00 mov 0x1245c0,%eax 10abe3: 85 c0 test %eax,%eax 10abe5: 74 19 je 10ac00 <_CORE_mutex_Seize+0x2f> 10abe7: 84 d2 test %dl,%dl 10abe9: 74 15 je 10ac00 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10abeb: 83 3d 1c 47 12 00 01 cmpl $0x1,0x12471c 10abf2: 76 0c jbe 10ac00 <_CORE_mutex_Seize+0x2f> 10abf4: 53 push %ebx 10abf5: 6a 12 push $0x12 10abf7: 6a 00 push $0x0 10abf9: 6a 00 push $0x0 10abfb: e8 dc 05 00 00 call 10b1dc <_Internal_error_Occurred> 10ac00: 51 push %ecx 10ac01: 51 push %ecx 10ac02: 8d 45 18 lea 0x18(%ebp),%eax 10ac05: 50 push %eax 10ac06: 53 push %ebx 10ac07: 88 55 f4 mov %dl,-0xc(%ebp) 10ac0a: e8 3d 3d 00 00 call 10e94c <_CORE_mutex_Seize_interrupt_trylock> 10ac0f: 83 c4 10 add $0x10,%esp 10ac12: 85 c0 test %eax,%eax 10ac14: 8a 55 f4 mov -0xc(%ebp),%dl 10ac17: 74 48 je 10ac61 <_CORE_mutex_Seize+0x90> 10ac19: 84 d2 test %dl,%dl 10ac1b: 75 12 jne 10ac2f <_CORE_mutex_Seize+0x5e> 10ac1d: ff 75 18 pushl 0x18(%ebp) 10ac20: 9d popf 10ac21: a1 dc 47 12 00 mov 0x1247dc,%eax 10ac26: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10ac2d: eb 32 jmp 10ac61 <_CORE_mutex_Seize+0x90> 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; 10ac2f: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10ac36: a1 dc 47 12 00 mov 0x1247dc,%eax 10ac3b: 89 58 44 mov %ebx,0x44(%eax) 10ac3e: 8b 55 0c mov 0xc(%ebp),%edx 10ac41: 89 50 20 mov %edx,0x20(%eax) 10ac44: a1 c0 45 12 00 mov 0x1245c0,%eax 10ac49: 40 inc %eax 10ac4a: a3 c0 45 12 00 mov %eax,0x1245c0 10ac4f: ff 75 18 pushl 0x18(%ebp) 10ac52: 9d popf 10ac53: 50 push %eax 10ac54: 50 push %eax 10ac55: ff 75 14 pushl 0x14(%ebp) 10ac58: 53 push %ebx 10ac59: e8 26 ff ff ff call 10ab84 <_CORE_mutex_Seize_interrupt_blocking> 10ac5e: 83 c4 10 add $0x10,%esp } 10ac61: 8b 5d fc mov -0x4(%ebp),%ebx 10ac64: c9 leave 10ac65: c3 ret =============================================================================== 0010ad8c <_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 ) { 10ad8c: 55 push %ebp 10ad8d: 89 e5 mov %esp,%ebp 10ad8f: 53 push %ebx 10ad90: 83 ec 10 sub $0x10,%esp 10ad93: 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)) ) { 10ad96: 53 push %ebx 10ad97: e8 90 16 00 00 call 10c42c <_Thread_queue_Dequeue> 10ad9c: 89 c2 mov %eax,%edx 10ad9e: 83 c4 10 add $0x10,%esp { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10ada1: 31 c0 xor %eax,%eax if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10ada3: 85 d2 test %edx,%edx 10ada5: 75 15 jne 10adbc <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10ada7: 9c pushf 10ada8: fa cli 10ada9: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10adaa: 8b 53 48 mov 0x48(%ebx),%edx the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10adad: b0 04 mov $0x4,%al (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10adaf: 3b 53 40 cmp 0x40(%ebx),%edx 10adb2: 73 06 jae 10adba <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10adb4: 42 inc %edx 10adb5: 89 53 48 mov %edx,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10adb8: 30 c0 xor %al,%al _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10adba: 51 push %ecx 10adbb: 9d popf } return status; } 10adbc: 8b 5d fc mov -0x4(%ebp),%ebx 10adbf: c9 leave 10adc0: c3 ret =============================================================================== 00109da0 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109da0: 55 push %ebp 109da1: 89 e5 mov %esp,%ebp 109da3: 57 push %edi 109da4: 56 push %esi 109da5: 53 push %ebx 109da6: 83 ec 2c sub $0x2c,%esp 109da9: 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 ]; 109dac: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109db2: 8b 43 30 mov 0x30(%ebx),%eax 109db5: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109db8: 9c pushf 109db9: fa cli 109dba: 58 pop %eax pending_events = api->pending_events; 109dbb: 8b 17 mov (%edi),%edx 109dbd: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109dc0: 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 ) ) { 109dc3: 21 f2 and %esi,%edx 109dc5: 75 07 jne 109dce <_Event_Surrender+0x2e> _ISR_Enable( level ); 109dc7: 50 push %eax 109dc8: 9d popf return; 109dc9: e9 af 00 00 00 jmp 109e7d <_Event_Surrender+0xdd> /* * 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() && 109dce: 83 3d d8 47 12 00 00 cmpl $0x0,0x1247d8 109dd5: 74 49 je 109e20 <_Event_Surrender+0x80> 109dd7: 3b 1d dc 47 12 00 cmp 0x1247dc,%ebx 109ddd: 75 41 jne 109e20 <_Event_Surrender+0x80> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109ddf: 8b 0d 10 48 12 00 mov 0x124810,%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() && _Thread_Is_executing( the_thread ) && 109de5: 83 f9 02 cmp $0x2,%ecx 109de8: 74 09 je 109df3 <_Event_Surrender+0x53> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109dea: 8b 0d 10 48 12 00 mov 0x124810,%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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109df0: 49 dec %ecx 109df1: 75 2d jne 109e20 <_Event_Surrender+0x80> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109df3: 39 f2 cmp %esi,%edx 109df5: 74 06 je 109dfd <_Event_Surrender+0x5d> 109df7: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109dfb: 74 1f je 109e1c <_Event_Surrender+0x7c> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 109dfd: 89 d6 mov %edx,%esi 109dff: f7 d6 not %esi 109e01: 23 75 d4 and -0x2c(%ebp),%esi 109e04: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 109e06: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109e0d: 8b 4b 28 mov 0x28(%ebx),%ecx 109e10: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109e12: c7 05 10 48 12 00 03 movl $0x3,0x124810 109e19: 00 00 00 } _ISR_Enable( level ); 109e1c: 50 push %eax 109e1d: 9d popf return; 109e1e: eb 5d jmp 109e7d <_Event_Surrender+0xdd> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109e20: f6 43 11 01 testb $0x1,0x11(%ebx) 109e24: 74 55 je 109e7b <_Event_Surrender+0xdb> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109e26: 39 f2 cmp %esi,%edx 109e28: 74 06 je 109e30 <_Event_Surrender+0x90> 109e2a: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109e2e: 74 4b je 109e7b <_Event_Surrender+0xdb> <== NEVER TAKEN 109e30: 89 d6 mov %edx,%esi 109e32: f7 d6 not %esi 109e34: 23 75 d4 and -0x2c(%ebp),%esi 109e37: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 109e39: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109e40: 8b 4b 28 mov 0x28(%ebx),%ecx 109e43: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109e45: 50 push %eax 109e46: 9d popf 109e47: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109e48: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109e4c: 74 06 je 109e54 <_Event_Surrender+0xb4> _ISR_Enable( level ); 109e4e: 50 push %eax 109e4f: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109e50: 51 push %ecx 109e51: 51 push %ecx 109e52: eb 17 jmp 109e6b <_Event_Surrender+0xcb> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109e54: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109e5b: 50 push %eax 109e5c: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109e5d: 83 ec 0c sub $0xc,%esp 109e60: 8d 43 48 lea 0x48(%ebx),%eax 109e63: 50 push %eax 109e64: e8 83 2f 00 00 call 10cdec <_Watchdog_Remove> 109e69: 58 pop %eax 109e6a: 5a pop %edx 109e6b: 68 f8 ff 03 10 push $0x1003fff8 109e70: 53 push %ebx 109e71: e8 8a 1f 00 00 call 10be00 <_Thread_Clear_state> 109e76: 83 c4 10 add $0x10,%esp 109e79: eb 02 jmp 109e7d <_Event_Surrender+0xdd> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109e7b: 50 push %eax 109e7c: 9d popf } 109e7d: 8d 65 f4 lea -0xc(%ebp),%esp 109e80: 5b pop %ebx 109e81: 5e pop %esi 109e82: 5f pop %edi 109e83: c9 leave 109e84: c3 ret =============================================================================== 00109e88 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109e88: 55 push %ebp 109e89: 89 e5 mov %esp,%ebp 109e8b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109e8e: 8d 45 f4 lea -0xc(%ebp),%eax 109e91: 50 push %eax 109e92: ff 75 08 pushl 0x8(%ebp) 109e95: e8 9e 22 00 00 call 10c138 <_Thread_Get> switch ( location ) { 109e9a: 83 c4 10 add $0x10,%esp 109e9d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109ea1: 75 49 jne 109eec <_Event_Timeout+0x64> <== NEVER TAKEN * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 109ea3: 9c pushf 109ea4: fa cli 109ea5: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109ea6: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109ead: 3b 05 dc 47 12 00 cmp 0x1247dc,%eax 109eb3: 75 13 jne 109ec8 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109eb5: 8b 0d 10 48 12 00 mov 0x124810,%ecx 109ebb: 49 dec %ecx 109ebc: 75 0a jne 109ec8 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109ebe: c7 05 10 48 12 00 02 movl $0x2,0x124810 109ec5: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109ec8: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109ecf: 52 push %edx 109ed0: 9d popf 109ed1: 52 push %edx 109ed2: 52 push %edx 109ed3: 68 f8 ff 03 10 push $0x1003fff8 109ed8: 50 push %eax 109ed9: e8 22 1f 00 00 call 10be00 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109ede: a1 c0 45 12 00 mov 0x1245c0,%eax 109ee3: 48 dec %eax 109ee4: a3 c0 45 12 00 mov %eax,0x1245c0 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 109ee9: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109eec: c9 leave 109eed: c3 ret =============================================================================== 0010ef83 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 10ef83: 55 push %ebp 10ef84: 89 e5 mov %esp,%ebp 10ef86: 57 push %edi 10ef87: 56 push %esi 10ef88: 53 push %ebx 10ef89: 83 ec 4c sub $0x4c,%esp 10ef8c: 8b 5d 08 mov 0x8(%ebp),%ebx 10ef8f: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 10ef92: 8b 43 20 mov 0x20(%ebx),%eax 10ef95: 89 45 c0 mov %eax,-0x40(%ebp) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 10ef98: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 10ef9f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 10efa6: 8b 53 10 mov 0x10(%ebx),%edx 10efa9: 89 55 c4 mov %edx,-0x3c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10efac: 8b 43 14 mov 0x14(%ebx),%eax uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 10efaf: 8b 7b 30 mov 0x30(%ebx),%edi 10efb2: 89 7d bc mov %edi,-0x44(%ebp) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; 10efb5: 31 f6 xor %esi,%esi uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 10efb7: 8b 7d 0c mov 0xc(%ebp),%edi 10efba: 01 cf add %ecx,%edi 10efbc: 0f 82 d4 01 00 00 jb 10f196 <_Heap_Extend+0x213> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 10efc2: 52 push %edx 10efc3: 52 push %edx 10efc4: 8d 55 e0 lea -0x20(%ebp),%edx 10efc7: 52 push %edx 10efc8: 8d 55 e4 lea -0x1c(%ebp),%edx 10efcb: 52 push %edx 10efcc: 50 push %eax 10efcd: ff 75 c4 pushl -0x3c(%ebp) 10efd0: 51 push %ecx 10efd1: ff 75 0c pushl 0xc(%ebp) 10efd4: e8 26 c3 ff ff call 10b2ff <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 10efd9: 83 c4 20 add $0x20,%esp 10efdc: 84 c0 test %al,%al 10efde: 0f 84 b2 01 00 00 je 10f196 <_Heap_Extend+0x213> 10efe4: 8b 4d c0 mov -0x40(%ebp),%ecx 10efe7: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10efee: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10eff5: 31 f6 xor %esi,%esi 10eff7: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 10effe: 8b 43 18 mov 0x18(%ebx),%eax 10f001: 89 5d b8 mov %ebx,-0x48(%ebp) 10f004: eb 02 jmp 10f008 <_Heap_Extend+0x85> 10f006: 89 c8 mov %ecx,%eax uintptr_t const sub_area_end = start_block->prev_size; 10f008: 8b 19 mov (%ecx),%ebx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 10f00a: 39 c7 cmp %eax,%edi 10f00c: 76 09 jbe 10f017 <_Heap_Extend+0x94> 10f00e: 39 5d 0c cmp %ebx,0xc(%ebp) 10f011: 0f 82 7d 01 00 00 jb 10f194 <_Heap_Extend+0x211> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10f017: 39 c7 cmp %eax,%edi 10f019: 74 06 je 10f021 <_Heap_Extend+0x9e> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10f01b: 39 df cmp %ebx,%edi 10f01d: 72 07 jb 10f026 <_Heap_Extend+0xa3> 10f01f: eb 08 jmp 10f029 <_Heap_Extend+0xa6> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10f021: 89 4d d0 mov %ecx,-0x30(%ebp) 10f024: eb 03 jmp 10f029 <_Heap_Extend+0xa6> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10f026: 89 4d c8 mov %ecx,-0x38(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f029: 8d 43 f8 lea -0x8(%ebx),%eax 10f02c: 89 45 d4 mov %eax,-0x2c(%ebp) 10f02f: 89 d8 mov %ebx,%eax 10f031: 31 d2 xor %edx,%edx 10f033: f7 75 c4 divl -0x3c(%ebp) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10f036: 29 55 d4 sub %edx,-0x2c(%ebp) link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 10f039: 3b 5d 0c cmp 0xc(%ebp),%ebx 10f03c: 75 07 jne 10f045 <_Heap_Extend+0xc2> start_block->prev_size = extend_area_end; 10f03e: 89 39 mov %edi,(%ecx) 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 ) 10f040: 8b 75 d4 mov -0x2c(%ebp),%esi 10f043: eb 08 jmp 10f04d <_Heap_Extend+0xca> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 10f045: 73 06 jae 10f04d <_Heap_Extend+0xca> 10f047: 8b 55 d4 mov -0x2c(%ebp),%edx 10f04a: 89 55 cc mov %edx,-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; 10f04d: 8b 45 d4 mov -0x2c(%ebp),%eax 10f050: 8b 48 04 mov 0x4(%eax),%ecx 10f053: 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); 10f056: 01 c1 add %eax,%ecx link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 10f058: 3b 4d c0 cmp -0x40(%ebp),%ecx 10f05b: 75 a9 jne 10f006 <_Heap_Extend+0x83> 10f05d: 8b 5d b8 mov -0x48(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 10f060: 8b 55 0c mov 0xc(%ebp),%edx 10f063: 3b 53 18 cmp 0x18(%ebx),%edx 10f066: 73 05 jae 10f06d <_Heap_Extend+0xea> heap->area_begin = extend_area_begin; 10f068: 89 53 18 mov %edx,0x18(%ebx) 10f06b: eb 08 jmp 10f075 <_Heap_Extend+0xf2> } else if ( heap->area_end < extend_area_end ) { 10f06d: 39 7b 1c cmp %edi,0x1c(%ebx) 10f070: 73 03 jae 10f075 <_Heap_Extend+0xf2> heap->area_end = extend_area_end; 10f072: 89 7b 1c mov %edi,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 10f075: 8b 45 e0 mov -0x20(%ebp),%eax 10f078: 8b 55 e4 mov -0x1c(%ebp),%edx heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 10f07b: 89 c1 mov %eax,%ecx 10f07d: 29 d1 sub %edx,%ecx 10f07f: 89 4d d4 mov %ecx,-0x2c(%ebp) (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 10f082: 89 3a mov %edi,(%edx) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 10f084: 83 c9 01 or $0x1,%ecx 10f087: 89 4a 04 mov %ecx,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 10f08a: 8b 4d d4 mov -0x2c(%ebp),%ecx 10f08d: 89 08 mov %ecx,(%eax) extend_last_block->size_and_flag = 0; 10f08f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 10f096: 39 53 20 cmp %edx,0x20(%ebx) 10f099: 76 05 jbe 10f0a0 <_Heap_Extend+0x11d> heap->first_block = extend_first_block; 10f09b: 89 53 20 mov %edx,0x20(%ebx) 10f09e: eb 08 jmp 10f0a8 <_Heap_Extend+0x125> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 10f0a0: 39 43 24 cmp %eax,0x24(%ebx) 10f0a3: 73 03 jae 10f0a8 <_Heap_Extend+0x125> heap->last_block = extend_last_block; 10f0a5: 89 43 24 mov %eax,0x24(%ebx) } if ( merge_below_block != NULL ) { 10f0a8: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10f0ac: 74 3b je 10f0e9 <_Heap_Extend+0x166> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 10f0ae: 8b 43 10 mov 0x10(%ebx),%eax 10f0b1: 89 45 d4 mov %eax,-0x2c(%ebp) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 10f0b4: 8b 4d 0c mov 0xc(%ebp),%ecx 10f0b7: 83 c1 08 add $0x8,%ecx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10f0ba: 89 c8 mov %ecx,%eax 10f0bc: 31 d2 xor %edx,%edx 10f0be: f7 75 d4 divl -0x2c(%ebp) if ( remainder != 0 ) { 10f0c1: 85 d2 test %edx,%edx 10f0c3: 74 05 je 10f0ca <_Heap_Extend+0x147> return value - remainder + alignment; 10f0c5: 03 4d d4 add -0x2c(%ebp),%ecx 10f0c8: 29 d1 sub %edx,%ecx uintptr_t const new_first_block_begin = 10f0ca: 8d 51 f8 lea -0x8(%ecx),%edx uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 10f0cd: 8b 45 d0 mov -0x30(%ebp),%eax 10f0d0: 8b 00 mov (%eax),%eax 10f0d2: 89 41 f8 mov %eax,-0x8(%ecx) uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 10f0d5: 8b 45 d0 mov -0x30(%ebp),%eax 10f0d8: 29 d0 sub %edx,%eax first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 10f0da: 83 c8 01 or $0x1,%eax 10f0dd: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 10f0e0: 89 d8 mov %ebx,%eax 10f0e2: e8 81 fe ff ff call 10ef68 <_Heap_Free_block> 10f0e7: eb 14 jmp 10f0fd <_Heap_Extend+0x17a> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 10f0e9: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10f0ed: 74 0e je 10f0fd <_Heap_Extend+0x17a> _Heap_Link_below( 10f0ef: 8b 55 e0 mov -0x20(%ebp),%edx { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 10f0f2: 8b 45 c8 mov -0x38(%ebp),%eax 10f0f5: 29 d0 sub %edx,%eax 10f0f7: 83 c8 01 or $0x1,%eax 10f0fa: 89 42 04 mov %eax,0x4(%edx) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 10f0fd: 85 f6 test %esi,%esi 10f0ff: 74 30 je 10f131 <_Heap_Extend+0x1ae> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 10f101: 83 ef 08 sub $0x8,%edi uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 10f104: 29 f7 sub %esi,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f106: 89 f8 mov %edi,%eax 10f108: 31 d2 xor %edx,%edx 10f10a: f7 73 10 divl 0x10(%ebx) 10f10d: 29 d7 sub %edx,%edi ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 10f10f: 8b 46 04 mov 0x4(%esi),%eax 10f112: 29 f8 sub %edi,%eax | HEAP_PREV_BLOCK_USED; 10f114: 83 c8 01 or $0x1,%eax 10f117: 89 44 37 04 mov %eax,0x4(%edi,%esi,1) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f11b: 8b 46 04 mov 0x4(%esi),%eax 10f11e: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 10f121: 09 f8 or %edi,%eax 10f123: 89 46 04 mov %eax,0x4(%esi) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 10f126: 89 f2 mov %esi,%edx 10f128: 89 d8 mov %ebx,%eax 10f12a: e8 39 fe ff ff call 10ef68 <_Heap_Free_block> 10f12f: eb 21 jmp 10f152 <_Heap_Extend+0x1cf> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 10f131: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10f135: 74 1b je 10f152 <_Heap_Extend+0x1cf> _Heap_Link_above( 10f137: 8b 4d e0 mov -0x20(%ebp),%ecx ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 10f13a: 8b 45 e4 mov -0x1c(%ebp),%eax 10f13d: 2b 45 cc sub -0x34(%ebp),%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f140: 8b 7d cc mov -0x34(%ebp),%edi 10f143: 8b 57 04 mov 0x4(%edi),%edx 10f146: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 10f149: 09 d0 or %edx,%eax 10f14b: 89 47 04 mov %eax,0x4(%edi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10f14e: 83 49 04 01 orl $0x1,0x4(%ecx) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 10f152: 85 f6 test %esi,%esi 10f154: 75 10 jne 10f166 <_Heap_Extend+0x1e3> 10f156: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10f15a: 75 0a jne 10f166 <_Heap_Extend+0x1e3> _Heap_Free_block( heap, extend_first_block ); 10f15c: 8b 55 e4 mov -0x1c(%ebp),%edx 10f15f: 89 d8 mov %ebx,%eax 10f161: e8 02 fe ff ff call 10ef68 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 10f166: 8b 53 24 mov 0x24(%ebx),%edx * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 10f169: 8b 43 20 mov 0x20(%ebx),%eax 10f16c: 29 d0 sub %edx,%eax RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 10f16e: 8b 4a 04 mov 0x4(%edx),%ecx 10f171: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 10f174: 09 c8 or %ecx,%eax 10f176: 89 42 04 mov %eax,0x4(%edx) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 10f179: 8b 43 30 mov 0x30(%ebx),%eax 10f17c: 2b 45 bc sub -0x44(%ebp),%eax /* Statistics */ stats->size += extended_size; 10f17f: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 10f182: be 01 00 00 00 mov $0x1,%esi extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) 10f187: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f18b: 74 09 je 10f196 <_Heap_Extend+0x213> <== NEVER TAKEN *extended_size_ptr = extended_size; 10f18d: 8b 55 14 mov 0x14(%ebp),%edx 10f190: 89 02 mov %eax,(%edx) 10f192: eb 02 jmp 10f196 <_Heap_Extend+0x213> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 10f194: 31 f6 xor %esi,%esi if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 10f196: 89 f0 mov %esi,%eax 10f198: 8d 65 f4 lea -0xc(%ebp),%esp 10f19b: 5b pop %ebx 10f19c: 5e pop %esi 10f19d: 5f pop %edi 10f19e: c9 leave 10f19f: c3 ret =============================================================================== 0010ebd8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10ebd8: 55 push %ebp 10ebd9: 89 e5 mov %esp,%ebp 10ebdb: 57 push %edi 10ebdc: 56 push %esi 10ebdd: 53 push %ebx 10ebde: 83 ec 14 sub $0x14,%esp 10ebe1: 8b 4d 08 mov 0x8(%ebp),%ecx 10ebe4: 8b 55 0c mov 0xc(%ebp),%edx * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 10ebe7: b0 01 mov $0x1,%al /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 10ebe9: 85 d2 test %edx,%edx 10ebeb: 0f 84 4b 01 00 00 je 10ed3c <_Heap_Free+0x164> 10ebf1: 8d 5a f8 lea -0x8(%edx),%ebx 10ebf4: 89 d0 mov %edx,%eax 10ebf6: 31 d2 xor %edx,%edx 10ebf8: f7 71 10 divl 0x10(%ecx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 10ebfb: 29 d3 sub %edx,%ebx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10ebfd: 8b 41 20 mov 0x20(%ecx),%eax 10ec00: 89 45 ec mov %eax,-0x14(%ebp) && (uintptr_t) block <= (uintptr_t) heap->last_block; 10ec03: 31 d2 xor %edx,%edx 10ec05: 39 c3 cmp %eax,%ebx 10ec07: 72 08 jb 10ec11 <_Heap_Free+0x39> 10ec09: 31 d2 xor %edx,%edx 10ec0b: 39 59 24 cmp %ebx,0x24(%ecx) 10ec0e: 0f 93 c2 setae %dl alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10ec11: 31 c0 xor %eax,%eax } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10ec13: 85 d2 test %edx,%edx 10ec15: 0f 84 21 01 00 00 je 10ed3c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10ec1b: 8b 43 04 mov 0x4(%ebx),%eax 10ec1e: 89 45 f0 mov %eax,-0x10(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ec21: 89 c6 mov %eax,%esi 10ec23: 83 e6 fe and $0xfffffffe,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ec26: 8d 14 33 lea (%ebx,%esi,1),%edx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10ec29: 31 ff xor %edi,%edi 10ec2b: 3b 55 ec cmp -0x14(%ebp),%edx 10ec2e: 72 0a jb 10ec3a <_Heap_Free+0x62> <== NEVER TAKEN 10ec30: 31 c0 xor %eax,%eax 10ec32: 39 51 24 cmp %edx,0x24(%ecx) 10ec35: 0f 93 c0 setae %al 10ec38: 89 c7 mov %eax,%edi block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { return false; 10ec3a: 31 c0 xor %eax,%eax _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10ec3c: 85 ff test %edi,%edi 10ec3e: 0f 84 f8 00 00 00 je 10ed3c <_Heap_Free+0x164> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10ec44: 8b 7a 04 mov 0x4(%edx),%edi return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 10ec47: f7 c7 01 00 00 00 test $0x1,%edi 10ec4d: 0f 84 e9 00 00 00 je 10ed3c <_Heap_Free+0x164> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ec53: 83 e7 fe and $0xfffffffe,%edi 10ec56: 89 7d e8 mov %edi,-0x18(%ebp) if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10ec59: 8b 41 24 mov 0x24(%ecx),%eax 10ec5c: 89 45 e4 mov %eax,-0x1c(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10ec5f: 31 c0 xor %eax,%eax 10ec61: 3b 55 e4 cmp -0x1c(%ebp),%edx 10ec64: 74 0a je 10ec70 <_Heap_Free+0x98> 10ec66: 31 c0 xor %eax,%eax 10ec68: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 10ec6d: 0f 94 c0 sete %al if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10ec70: 88 45 e3 mov %al,-0x1d(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10ec73: f6 45 f0 01 testb $0x1,-0x10(%ebp) 10ec77: 75 62 jne 10ecdb <_Heap_Free+0x103> uintptr_t const prev_size = block->prev_size; 10ec79: 8b 03 mov (%ebx),%eax 10ec7b: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10ec7e: 29 c3 sub %eax,%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10ec80: 31 ff xor %edi,%edi 10ec82: 3b 5d ec cmp -0x14(%ebp),%ebx 10ec85: 72 0a jb 10ec91 <_Heap_Free+0xb9> <== NEVER TAKEN 10ec87: 31 c0 xor %eax,%eax 10ec89: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10ec8c: 0f 93 c0 setae %al 10ec8f: 89 c7 mov %eax,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { _HAssert( false ); return( false ); 10ec91: 31 c0 xor %eax,%eax if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10ec93: 85 ff test %edi,%edi 10ec95: 0f 84 a1 00 00 00 je 10ed3c <_Heap_Free+0x164> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 10ec9b: f6 43 04 01 testb $0x1,0x4(%ebx) 10ec9f: 0f 84 97 00 00 00 je 10ed3c <_Heap_Free+0x164> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10eca5: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10eca9: 74 1a je 10ecc5 <_Heap_Free+0xed> uintptr_t const size = block_size + prev_size + next_block_size; 10ecab: 8b 45 e8 mov -0x18(%ebp),%eax 10ecae: 8d 04 06 lea (%esi,%eax,1),%eax 10ecb1: 03 45 f0 add -0x10(%ebp),%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10ecb4: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = block->prev; 10ecb7: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 10ecba: 89 7a 08 mov %edi,0x8(%edx) next->prev = prev; 10ecbd: 89 57 0c mov %edx,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10ecc0: ff 49 38 decl 0x38(%ecx) 10ecc3: eb 33 jmp 10ecf8 <_Heap_Free+0x120> 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; 10ecc5: 8b 45 f0 mov -0x10(%ebp),%eax 10ecc8: 8d 04 06 lea (%esi,%eax,1),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10eccb: 89 c7 mov %eax,%edi 10eccd: 83 cf 01 or $0x1,%edi 10ecd0: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ecd3: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 10ecd7: 89 02 mov %eax,(%edx) 10ecd9: eb 56 jmp 10ed31 <_Heap_Free+0x159> } } else if ( next_is_free ) { /* coalesce next */ 10ecdb: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10ecdf: 74 24 je 10ed05 <_Heap_Free+0x12d> uintptr_t const size = block_size + next_block_size; 10ece1: 8b 45 e8 mov -0x18(%ebp),%eax 10ece4: 01 f0 add %esi,%eax RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10ece6: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = old_block->prev; 10ece9: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10ecec: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10ecef: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 10ecf2: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10ecf5: 89 5a 08 mov %ebx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10ecf8: 89 c2 mov %eax,%edx 10ecfa: 83 ca 01 or $0x1,%edx 10ecfd: 89 53 04 mov %edx,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10ed00: 89 04 03 mov %eax,(%ebx,%eax,1) 10ed03: eb 2c jmp 10ed31 <_Heap_Free+0x159> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ed05: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 10ed08: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 10ed0b: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10ed0e: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10ed11: 89 58 0c mov %ebx,0xc(%eax) } 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; 10ed14: 89 f0 mov %esi,%eax 10ed16: 83 c8 01 or $0x1,%eax 10ed19: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10ed1c: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 10ed20: 89 32 mov %esi,(%edx) /* Statistics */ ++stats->free_blocks; 10ed22: 8b 41 38 mov 0x38(%ecx),%eax 10ed25: 40 inc %eax 10ed26: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 10ed29: 39 41 3c cmp %eax,0x3c(%ecx) 10ed2c: 73 03 jae 10ed31 <_Heap_Free+0x159> stats->max_free_blocks = stats->free_blocks; 10ed2e: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10ed31: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10ed34: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10ed37: 01 71 30 add %esi,0x30(%ecx) return( true ); 10ed3a: b0 01 mov $0x1,%al } 10ed3c: 83 c4 14 add $0x14,%esp 10ed3f: 5b pop %ebx 10ed40: 5e pop %esi 10ed41: 5f pop %edi 10ed42: c9 leave 10ed43: c3 ret =============================================================================== 0011c5e0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11c5e0: 55 push %ebp 11c5e1: 89 e5 mov %esp,%ebp 11c5e3: 57 push %edi 11c5e4: 56 push %esi 11c5e5: 53 push %ebx 11c5e6: 8b 5d 08 mov 0x8(%ebp),%ebx 11c5e9: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 11c5ec: 8d 4e f8 lea -0x8(%esi),%ecx 11c5ef: 89 f0 mov %esi,%eax 11c5f1: 31 d2 xor %edx,%edx 11c5f3: f7 73 10 divl 0x10(%ebx) uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 11c5f6: 29 d1 sub %edx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11c5f8: 8b 53 20 mov 0x20(%ebx),%edx && (uintptr_t) block <= (uintptr_t) heap->last_block; 11c5fb: 31 ff xor %edi,%edi 11c5fd: 39 d1 cmp %edx,%ecx 11c5ff: 72 0a jb 11c60b <_Heap_Size_of_alloc_area+0x2b> 11c601: 31 c0 xor %eax,%eax 11c603: 39 4b 24 cmp %ecx,0x24(%ebx) 11c606: 0f 93 c0 setae %al 11c609: 89 c7 mov %eax,%edi Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 11c60b: 31 c0 xor %eax,%eax uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11c60d: 85 ff test %edi,%edi 11c60f: 74 30 je 11c641 <_Heap_Size_of_alloc_area+0x61> - 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; 11c611: 8b 41 04 mov 0x4(%ecx),%eax 11c614: 83 e0 fe and $0xfffffffe,%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11c617: 01 c1 add %eax,%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; 11c619: 31 ff xor %edi,%edi 11c61b: 39 d1 cmp %edx,%ecx 11c61d: 72 0a jb 11c629 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN 11c61f: 31 c0 xor %eax,%eax 11c621: 39 4b 24 cmp %ecx,0x24(%ebx) 11c624: 0f 93 c0 setae %al 11c627: 89 c7 mov %eax,%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11c629: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11c62b: 85 ff test %edi,%edi 11c62d: 74 12 je 11c641 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11c62f: f6 41 04 01 testb $0x1,0x4(%ecx) 11c633: 74 0c je 11c641 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11c635: 29 f1 sub %esi,%ecx 11c637: 8d 51 04 lea 0x4(%ecx),%edx 11c63a: 8b 45 10 mov 0x10(%ebp),%eax 11c63d: 89 10 mov %edx,(%eax) return true; 11c63f: b0 01 mov $0x1,%al } 11c641: 5b pop %ebx 11c642: 5e pop %esi 11c643: 5f pop %edi 11c644: c9 leave 11c645: c3 ret =============================================================================== 0010bbc6 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bbc6: 55 push %ebp 10bbc7: 89 e5 mov %esp,%ebp 10bbc9: 57 push %edi 10bbca: 56 push %esi 10bbcb: 53 push %ebx 10bbcc: 83 ec 4c sub $0x4c,%esp 10bbcf: 8b 75 08 mov 0x8(%ebp),%esi 10bbd2: 8b 5d 0c mov 0xc(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10bbd5: 8b 46 10 mov 0x10(%esi),%eax 10bbd8: 89 45 d8 mov %eax,-0x28(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10bbdb: 8b 4e 14 mov 0x14(%esi),%ecx 10bbde: 89 4d d4 mov %ecx,-0x2c(%ebp) Heap_Block *const first_block = heap->first_block; 10bbe1: 8b 46 20 mov 0x20(%esi),%eax 10bbe4: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_block = heap->last_block; 10bbe7: 8b 4e 24 mov 0x24(%esi),%ecx 10bbea: 89 4d c8 mov %ecx,-0x38(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10bbed: c7 45 e4 88 bb 10 00 movl $0x10bb88,-0x1c(%ebp) 10bbf4: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10bbf8: 74 07 je 10bc01 <_Heap_Walk+0x3b> 10bbfa: c7 45 e4 8d bb 10 00 movl $0x10bb8d,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 10bc01: b0 01 mov $0x1,%al Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 10bc03: 83 3d 04 6b 12 00 03 cmpl $0x3,0x126b04 10bc0a: 0f 85 e8 02 00 00 jne 10bef8 <_Heap_Walk+0x332> 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)( 10bc10: 52 push %edx 10bc11: ff 76 0c pushl 0xc(%esi) 10bc14: ff 76 08 pushl 0x8(%esi) 10bc17: ff 75 c8 pushl -0x38(%ebp) 10bc1a: ff 75 d0 pushl -0x30(%ebp) 10bc1d: ff 76 1c pushl 0x1c(%esi) 10bc20: ff 76 18 pushl 0x18(%esi) 10bc23: ff 75 d4 pushl -0x2c(%ebp) 10bc26: ff 75 d8 pushl -0x28(%ebp) 10bc29: 68 81 f1 11 00 push $0x11f181 10bc2e: 6a 00 push $0x0 10bc30: 53 push %ebx 10bc31: 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 ) { 10bc34: 83 c4 30 add $0x30,%esp 10bc37: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10bc3b: 75 0b jne 10bc48 <_Heap_Walk+0x82> (*printer)( source, true, "page size is zero\n" ); 10bc3d: 50 push %eax 10bc3e: 68 12 f2 11 00 push $0x11f212 10bc43: e9 6b 02 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10bc48: f6 45 d8 03 testb $0x3,-0x28(%ebp) 10bc4c: 74 0d je 10bc5b <_Heap_Walk+0x95> (*printer)( 10bc4e: ff 75 d8 pushl -0x28(%ebp) 10bc51: 68 25 f2 11 00 push $0x11f225 10bc56: e9 58 02 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bc5b: 8b 45 d4 mov -0x2c(%ebp),%eax 10bc5e: 31 d2 xor %edx,%edx 10bc60: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10bc63: 85 d2 test %edx,%edx 10bc65: 74 0d je 10bc74 <_Heap_Walk+0xae> (*printer)( 10bc67: ff 75 d4 pushl -0x2c(%ebp) 10bc6a: 68 43 f2 11 00 push $0x11f243 10bc6f: e9 3f 02 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10bc74: 8b 45 d0 mov -0x30(%ebp),%eax 10bc77: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bc7a: 31 d2 xor %edx,%edx 10bc7c: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( 10bc7f: 85 d2 test %edx,%edx 10bc81: 74 0d je 10bc90 <_Heap_Walk+0xca> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10bc83: ff 75 d0 pushl -0x30(%ebp) 10bc86: 68 67 f2 11 00 push $0x11f267 10bc8b: e9 23 02 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10bc90: 8b 45 d0 mov -0x30(%ebp),%eax 10bc93: f6 40 04 01 testb $0x1,0x4(%eax) 10bc97: 75 0b jne 10bca4 <_Heap_Walk+0xde> (*printer)( 10bc99: 57 push %edi 10bc9a: 68 98 f2 11 00 push $0x11f298 10bc9f: e9 0f 02 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> - 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; 10bca4: 8b 4d c8 mov -0x38(%ebp),%ecx 10bca7: 8b 79 04 mov 0x4(%ecx),%edi 10bcaa: 83 e7 fe and $0xfffffffe,%edi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10bcad: 01 cf add %ecx,%edi ); return false; } if ( _Heap_Is_free( last_block ) ) { 10bcaf: f6 47 04 01 testb $0x1,0x4(%edi) 10bcb3: 75 0b jne 10bcc0 <_Heap_Walk+0xfa> (*printer)( 10bcb5: 56 push %esi 10bcb6: 68 c6 f2 11 00 push $0x11f2c6 10bcbb: e9 f3 01 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> ); return false; } if ( 10bcc0: 3b 7d d0 cmp -0x30(%ebp),%edi 10bcc3: 74 0b je 10bcd0 <_Heap_Walk+0x10a> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10bcc5: 51 push %ecx <== NOT EXECUTED 10bcc6: 68 db f2 11 00 push $0x11f2db <== NOT EXECUTED 10bccb: e9 e3 01 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10bcd0: 8b 46 10 mov 0x10(%esi),%eax 10bcd3: 89 45 e0 mov %eax,-0x20(%ebp) block = next_block; } while ( block != first_block ); return true; } 10bcd6: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 10bcd9: 89 75 dc mov %esi,-0x24(%ebp) 10bcdc: eb 75 jmp 10bd53 <_Heap_Walk+0x18d> 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; 10bcde: 31 c0 xor %eax,%eax 10bce0: 39 4e 20 cmp %ecx,0x20(%esi) 10bce3: 77 08 ja 10bced <_Heap_Walk+0x127> 10bce5: 31 c0 xor %eax,%eax 10bce7: 39 4e 24 cmp %ecx,0x24(%esi) 10bcea: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10bced: 85 c0 test %eax,%eax 10bcef: 75 0b jne 10bcfc <_Heap_Walk+0x136> (*printer)( 10bcf1: 51 push %ecx 10bcf2: 68 0a f3 11 00 push $0x11f30a 10bcf7: e9 b7 01 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10bcfc: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bcff: 31 d2 xor %edx,%edx 10bd01: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10bd04: 85 d2 test %edx,%edx 10bd06: 74 0b je 10bd13 <_Heap_Walk+0x14d> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10bd08: 51 push %ecx 10bd09: 68 2a f3 11 00 push $0x11f32a 10bd0e: e9 a0 01 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> - 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; 10bd13: 8b 41 04 mov 0x4(%ecx),%eax 10bd16: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10bd19: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10bd1e: 74 0b je 10bd2b <_Heap_Walk+0x165> (*printer)( 10bd20: 51 push %ecx 10bd21: 68 5a f3 11 00 push $0x11f35a 10bd26: e9 88 01 00 00 jmp 10beb3 <_Heap_Walk+0x2ed> ); return false; } if ( free_block->prev != prev_block ) { 10bd2b: 8b 41 0c mov 0xc(%ecx),%eax 10bd2e: 3b 45 dc cmp -0x24(%ebp),%eax 10bd31: 74 1a je 10bd4d <_Heap_Walk+0x187> (*printer)( 10bd33: 83 ec 0c sub $0xc,%esp 10bd36: 50 push %eax 10bd37: 51 push %ecx 10bd38: 68 76 f3 11 00 push $0x11f376 10bd3d: 6a 01 push $0x1 10bd3f: 53 push %ebx 10bd40: ff 55 e4 call *-0x1c(%ebp) 10bd43: 83 c4 20 add $0x20,%esp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 10bd46: 31 c0 xor %eax,%eax 10bd48: e9 ab 01 00 00 jmp 10bef8 <_Heap_Walk+0x332> return false; } prev_block = free_block; free_block = free_block->next; 10bd4d: 89 4d dc mov %ecx,-0x24(%ebp) 10bd50: 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 ) { 10bd53: 39 f1 cmp %esi,%ecx 10bd55: 75 87 jne 10bcde <_Heap_Walk+0x118> 10bd57: 89 5d dc mov %ebx,-0x24(%ebp) 10bd5a: eb 02 jmp 10bd5e <_Heap_Walk+0x198> block->prev_size ); } block = next_block; } while ( block != first_block ); 10bd5c: 89 df mov %ebx,%edi return true; } 10bd5e: 8b 4f 04 mov 0x4(%edi),%ecx 10bd61: 89 4d cc mov %ecx,-0x34(%ebp) 10bd64: 83 e1 fe and $0xfffffffe,%ecx 10bd67: 89 4d e0 mov %ecx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10bd6a: 8d 1c 0f lea (%edi,%ecx,1),%ebx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 10bd6d: 31 c0 xor %eax,%eax 10bd6f: 39 5e 20 cmp %ebx,0x20(%esi) 10bd72: 77 08 ja 10bd7c <_Heap_Walk+0x1b6> <== NEVER TAKEN 10bd74: 31 c0 xor %eax,%eax 10bd76: 39 5e 24 cmp %ebx,0x24(%esi) 10bd79: 0f 93 c0 setae %al bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10bd7c: 85 c0 test %eax,%eax 10bd7e: 75 11 jne 10bd91 <_Heap_Walk+0x1cb> 10bd80: 89 d9 mov %ebx,%ecx 10bd82: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bd85: 83 ec 0c sub $0xc,%esp 10bd88: 51 push %ecx 10bd89: 57 push %edi 10bd8a: 68 a8 f3 11 00 push $0x11f3a8 10bd8f: eb ac jmp 10bd3d <_Heap_Walk+0x177> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 10bd91: 3b 7d c8 cmp -0x38(%ebp),%edi 10bd94: 0f 95 c1 setne %cl RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bd97: 8b 45 e0 mov -0x20(%ebp),%eax 10bd9a: 31 d2 xor %edx,%edx 10bd9c: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10bd9f: 85 d2 test %edx,%edx 10bda1: 74 15 je 10bdb8 <_Heap_Walk+0x1f2> 10bda3: 84 c9 test %cl,%cl 10bda5: 74 11 je 10bdb8 <_Heap_Walk+0x1f2> 10bda7: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdaa: 83 ec 0c sub $0xc,%esp 10bdad: ff 75 e0 pushl -0x20(%ebp) 10bdb0: 57 push %edi 10bdb1: 68 d5 f3 11 00 push $0x11f3d5 10bdb6: eb 85 jmp 10bd3d <_Heap_Walk+0x177> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10bdb8: 8b 45 d4 mov -0x2c(%ebp),%eax 10bdbb: 39 45 e0 cmp %eax,-0x20(%ebp) 10bdbe: 73 18 jae 10bdd8 <_Heap_Walk+0x212> 10bdc0: 84 c9 test %cl,%cl 10bdc2: 74 14 je 10bdd8 <_Heap_Walk+0x212> <== NEVER TAKEN 10bdc4: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdc7: 52 push %edx 10bdc8: 52 push %edx 10bdc9: 50 push %eax 10bdca: ff 75 e0 pushl -0x20(%ebp) 10bdcd: 57 push %edi 10bdce: 68 03 f4 11 00 push $0x11f403 10bdd3: e9 65 ff ff ff jmp 10bd3d <_Heap_Walk+0x177> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10bdd8: 39 fb cmp %edi,%ebx 10bdda: 77 18 ja 10bdf4 <_Heap_Walk+0x22e> 10bddc: 84 c9 test %cl,%cl 10bdde: 74 14 je 10bdf4 <_Heap_Walk+0x22e> 10bde0: 89 d9 mov %ebx,%ecx 10bde2: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bde5: 83 ec 0c sub $0xc,%esp 10bde8: 51 push %ecx 10bde9: 57 push %edi 10bdea: 68 2e f4 11 00 push $0x11f42e 10bdef: e9 49 ff ff ff jmp 10bd3d <_Heap_Walk+0x177> 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; 10bdf4: 8b 4d cc mov -0x34(%ebp),%ecx 10bdf7: 83 e1 01 and $0x1,%ecx 10bdfa: 89 4d c4 mov %ecx,-0x3c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10bdfd: f6 43 04 01 testb $0x1,0x4(%ebx) 10be01: 0f 85 ba 00 00 00 jne 10bec1 <_Heap_Walk+0x2fb> block = next_block; } while ( block != first_block ); return true; } 10be07: 8b 46 08 mov 0x8(%esi),%eax 10be0a: 89 45 c0 mov %eax,-0x40(%ebp) block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 10be0d: 8b 4f 08 mov 0x8(%edi),%ecx 10be10: 89 4d b4 mov %ecx,-0x4c(%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)( 10be13: ba 4e f1 11 00 mov $0x11f14e,%edx 10be18: 3b 4e 0c cmp 0xc(%esi),%ecx 10be1b: 74 0e je 10be2b <_Heap_Walk+0x265> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 10be1d: ba 99 f0 11 00 mov $0x11f099,%edx 10be22: 39 f1 cmp %esi,%ecx 10be24: 75 05 jne 10be2b <_Heap_Walk+0x265> 10be26: ba 5d f1 11 00 mov $0x11f15d,%edx false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 10be2b: 8b 47 0c mov 0xc(%edi),%eax 10be2e: 89 45 cc mov %eax,-0x34(%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)( 10be31: b8 67 f1 11 00 mov $0x11f167,%eax 10be36: 8b 4d c0 mov -0x40(%ebp),%ecx 10be39: 39 4d cc cmp %ecx,-0x34(%ebp) 10be3c: 74 0f je 10be4d <_Heap_Walk+0x287> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10be3e: b8 99 f0 11 00 mov $0x11f099,%eax 10be43: 39 75 cc cmp %esi,-0x34(%ebp) 10be46: 75 05 jne 10be4d <_Heap_Walk+0x287> 10be48: b8 77 f1 11 00 mov $0x11f177,%eax Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10be4d: 83 ec 0c sub $0xc,%esp 10be50: 52 push %edx 10be51: ff 75 b4 pushl -0x4c(%ebp) 10be54: 50 push %eax 10be55: ff 75 cc pushl -0x34(%ebp) 10be58: ff 75 e0 pushl -0x20(%ebp) 10be5b: 57 push %edi 10be5c: 68 62 f4 11 00 push $0x11f462 10be61: 6a 00 push $0x0 10be63: ff 75 dc pushl -0x24(%ebp) 10be66: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10be69: 8b 03 mov (%ebx),%eax 10be6b: 83 c4 30 add $0x30,%esp 10be6e: 39 45 e0 cmp %eax,-0x20(%ebp) 10be71: 74 16 je 10be89 <_Heap_Walk+0x2c3> 10be73: 89 d9 mov %ebx,%ecx 10be75: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be78: 56 push %esi 10be79: 51 push %ecx 10be7a: 50 push %eax 10be7b: ff 75 e0 pushl -0x20(%ebp) 10be7e: 57 push %edi 10be7f: 68 97 f4 11 00 push $0x11f497 10be84: e9 b4 fe ff ff jmp 10bd3d <_Heap_Walk+0x177> ); return false; } if ( !prev_used ) { 10be89: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10be8d: 75 0b jne 10be9a <_Heap_Walk+0x2d4> 10be8f: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be92: 57 push %edi 10be93: 68 d0 f4 11 00 push $0x11f4d0 10be98: eb 19 jmp 10beb3 <_Heap_Walk+0x2ed> block = next_block; } while ( block != first_block ); return true; } 10be9a: 8b 46 08 mov 0x8(%esi),%eax 10be9d: eb 07 jmp 10bea6 <_Heap_Walk+0x2e0> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10be9f: 39 f8 cmp %edi,%eax 10bea1: 74 4a je 10beed <_Heap_Walk+0x327> return true; } free_block = free_block->next; 10bea3: 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 ) { 10bea6: 39 f0 cmp %esi,%eax 10bea8: 75 f5 jne 10be9f <_Heap_Walk+0x2d9> 10beaa: 8b 5d dc mov -0x24(%ebp),%ebx return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10bead: 57 push %edi 10beae: 68 3b f5 11 00 push $0x11f53b 10beb3: 6a 01 push $0x1 10beb5: 53 push %ebx 10beb6: ff 55 e4 call *-0x1c(%ebp) 10beb9: 83 c4 10 add $0x10,%esp 10bebc: e9 85 fe ff ff jmp 10bd46 <_Heap_Walk+0x180> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 10bec1: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10bec5: 74 0e je 10bed5 <_Heap_Walk+0x30f> (*printer)( 10bec7: 83 ec 0c sub $0xc,%esp 10beca: ff 75 e0 pushl -0x20(%ebp) 10becd: 57 push %edi 10bece: 68 ff f4 11 00 push $0x11f4ff 10bed3: eb 0d jmp 10bee2 <_Heap_Walk+0x31c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bed5: 51 push %ecx 10bed6: 51 push %ecx 10bed7: ff 37 pushl (%edi) 10bed9: ff 75 e0 pushl -0x20(%ebp) 10bedc: 57 push %edi 10bedd: 68 16 f5 11 00 push $0x11f516 10bee2: 6a 00 push $0x0 10bee4: ff 75 dc pushl -0x24(%ebp) 10bee7: ff 55 e4 call *-0x1c(%ebp) 10beea: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10beed: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bef0: 0f 85 66 fe ff ff jne 10bd5c <_Heap_Walk+0x196> return true; 10bef6: b0 01 mov $0x1,%al } 10bef8: 8d 65 f4 lea -0xc(%ebp),%esp 10befb: 5b pop %ebx 10befc: 5e pop %esi 10befd: 5f pop %edi 10befe: c9 leave 10beff: c3 ret =============================================================================== 0010b1dc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b1dc: 55 push %ebp 10b1dd: 89 e5 mov %esp,%ebp 10b1df: 53 push %ebx 10b1e0: 83 ec 08 sub $0x8,%esp 10b1e3: 8b 45 08 mov 0x8(%ebp),%eax 10b1e6: 8b 55 0c mov 0xc(%ebp),%edx 10b1e9: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b1ec: a3 58 46 12 00 mov %eax,0x124658 _Internal_errors_What_happened.is_internal = is_internal; 10b1f1: 88 15 5c 46 12 00 mov %dl,0x12465c _Internal_errors_What_happened.the_error = the_error; 10b1f7: 89 1d 60 46 12 00 mov %ebx,0x124660 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b1fd: 53 push %ebx 10b1fe: 0f b6 d2 movzbl %dl,%edx 10b201: 52 push %edx 10b202: 50 push %eax 10b203: e8 a3 19 00 00 call 10cbab <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b208: c7 05 1c 47 12 00 05 movl $0x5,0x12471c <== NOT EXECUTED 10b20f: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b212: fa cli <== NOT EXECUTED 10b213: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b215: f4 hlt <== NOT EXECUTED 10b216: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b219: eb fe jmp 10b219 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b26c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b26c: 55 push %ebp 10b26d: 89 e5 mov %esp,%ebp 10b26f: 56 push %esi 10b270: 53 push %ebx 10b271: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) return NULL; 10b274: 31 c9 xor %ecx,%ecx * 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 ) 10b276: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b27a: 74 53 je 10b2cf <_Objects_Allocate+0x63><== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b27c: 8d 73 20 lea 0x20(%ebx),%esi 10b27f: 83 ec 0c sub $0xc,%esp 10b282: 56 push %esi 10b283: e8 9c f7 ff ff call 10aa24 <_Chain_Get> 10b288: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b28a: 83 c4 10 add $0x10,%esp 10b28d: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b291: 74 3c je 10b2cf <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b293: 85 c0 test %eax,%eax 10b295: 75 1a jne 10b2b1 <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b297: 83 ec 0c sub $0xc,%esp 10b29a: 53 push %ebx 10b29b: e8 60 00 00 00 call 10b300 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b2a0: 89 34 24 mov %esi,(%esp) 10b2a3: e8 7c f7 ff ff call 10aa24 <_Chain_Get> 10b2a8: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b2aa: 83 c4 10 add $0x10,%esp 10b2ad: 85 c0 test %eax,%eax 10b2af: 74 1e je 10b2cf <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b2b1: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b2b5: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b2b9: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10b2bb: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b2bf: 31 d2 xor %edx,%edx 10b2c1: f7 f6 div %esi information->inactive_per_block[ block ]--; 10b2c3: c1 e0 02 shl $0x2,%eax 10b2c6: 03 43 30 add 0x30(%ebx),%eax 10b2c9: ff 08 decl (%eax) information->inactive--; 10b2cb: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10b2cf: 89 c8 mov %ecx,%eax 10b2d1: 8d 65 f8 lea -0x8(%ebp),%esp 10b2d4: 5b pop %ebx 10b2d5: 5e pop %esi 10b2d6: c9 leave 10b2d7: c3 ret =============================================================================== 0010b5f0 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10b5f0: 55 push %ebp 10b5f1: 89 e5 mov %esp,%ebp 10b5f3: 57 push %edi 10b5f4: 56 push %esi 10b5f5: 53 push %ebx 10b5f6: 83 ec 0c sub $0xc,%esp 10b5f9: 8b 75 08 mov 0x8(%ebp),%esi 10b5fc: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 10b5ff: 31 db xor %ebx,%ebx ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b601: 66 85 ff test %di,%di 10b604: 74 37 je 10b63d <_Objects_Get_information+0x4d> /* * 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 ); 10b606: 83 ec 0c sub $0xc,%esp 10b609: 56 push %esi 10b60a: e8 35 37 00 00 call 10ed44 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b60f: 83 c4 10 add $0x10,%esp 10b612: 85 c0 test %eax,%eax 10b614: 74 27 je 10b63d <_Objects_Get_information+0x4d> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b616: 0f b7 ff movzwl %di,%edi 10b619: 39 c7 cmp %eax,%edi 10b61b: 77 20 ja 10b63d <_Objects_Get_information+0x4d> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b61d: 8b 04 b5 98 45 12 00 mov 0x124598(,%esi,4),%eax 10b624: 85 c0 test %eax,%eax 10b626: 74 15 je 10b63d <_Objects_Get_information+0x4d><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b628: 8b 1c b8 mov (%eax,%edi,4),%ebx if ( !info ) 10b62b: 85 db test %ebx,%ebx 10b62d: 74 0e je 10b63d <_Objects_Get_information+0x4d><== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 10b62f: 31 c0 xor %eax,%eax 10b631: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx) 10b636: 0f 95 c0 setne %al 10b639: f7 d8 neg %eax 10b63b: 21 c3 and %eax,%ebx #endif return info; } 10b63d: 89 d8 mov %ebx,%eax 10b63f: 8d 65 f4 lea -0xc(%ebp),%esp 10b642: 5b pop %ebx 10b643: 5e pop %esi 10b644: 5f pop %edi 10b645: c9 leave 10b646: c3 ret =============================================================================== 00118a08 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118a08: 55 push %ebp 118a09: 89 e5 mov %esp,%ebp 118a0b: 53 push %ebx 118a0c: 8b 55 08 mov 0x8(%ebp),%edx 118a0f: 8b 4d 10 mov 0x10(%ebp),%ecx /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 118a12: b8 01 00 00 00 mov $0x1,%eax 118a17: 2b 42 08 sub 0x8(%edx),%eax 118a1a: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118a1d: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118a21: 39 c3 cmp %eax,%ebx 118a23: 72 12 jb 118a37 <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118a25: 8b 52 1c mov 0x1c(%edx),%edx 118a28: 8b 04 82 mov (%edx,%eax,4),%eax 118a2b: 85 c0 test %eax,%eax 118a2d: 74 08 je 118a37 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118a2f: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118a35: eb 08 jmp 118a3f <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118a37: c7 01 01 00 00 00 movl $0x1,(%ecx) return NULL; 118a3d: 31 c0 xor %eax,%eax } 118a3f: 5b pop %ebx 118a40: c9 leave 118a41: c3 ret =============================================================================== 0010c80c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10c80c: 55 push %ebp 10c80d: 89 e5 mov %esp,%ebp 10c80f: 53 push %ebx 10c810: 83 ec 14 sub $0x14,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c813: 8b 45 08 mov 0x8(%ebp),%eax 10c816: 85 c0 test %eax,%eax 10c818: 75 08 jne 10c822 <_Objects_Id_to_name+0x16> 10c81a: a1 48 65 12 00 mov 0x126548,%eax 10c81f: 8b 40 08 mov 0x8(%eax),%eax 10c822: 89 c2 mov %eax,%edx 10c824: c1 ea 18 shr $0x18,%edx 10c827: 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 ) 10c82a: 8d 4a ff lea -0x1(%edx),%ecx the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 10c82d: bb 03 00 00 00 mov $0x3,%ebx 10c832: 83 f9 02 cmp $0x2,%ecx 10c835: 77 30 ja 10c867 <_Objects_Id_to_name+0x5b> 10c837: eb 35 jmp 10c86e <_Objects_Id_to_name+0x62> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10c839: 89 c1 mov %eax,%ecx 10c83b: c1 e9 1b shr $0x1b,%ecx if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10c83e: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10c841: 85 d2 test %edx,%edx 10c843: 74 22 je 10c867 <_Objects_Id_to_name+0x5b><== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10c845: 51 push %ecx 10c846: 8d 4d f4 lea -0xc(%ebp),%ecx 10c849: 51 push %ecx 10c84a: 50 push %eax 10c84b: 52 push %edx 10c84c: e8 63 ff ff ff call 10c7b4 <_Objects_Get> if ( !the_object ) 10c851: 83 c4 10 add $0x10,%esp 10c854: 85 c0 test %eax,%eax 10c856: 74 0f je 10c867 <_Objects_Id_to_name+0x5b> return OBJECTS_INVALID_ID; *name = the_object->name; 10c858: 8b 50 0c mov 0xc(%eax),%edx 10c85b: 8b 45 0c mov 0xc(%ebp),%eax 10c85e: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c860: e8 3d 0a 00 00 call 10d2a2 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c865: 31 db xor %ebx,%ebx } 10c867: 89 d8 mov %ebx,%eax 10c869: 8b 5d fc mov -0x4(%ebp),%ebx 10c86c: c9 leave 10c86d: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10c86e: 8b 14 95 04 63 12 00 mov 0x126304(,%edx,4),%edx 10c875: 85 d2 test %edx,%edx 10c877: 75 c0 jne 10c839 <_Objects_Id_to_name+0x2d> 10c879: eb ec jmp 10c867 <_Objects_Id_to_name+0x5b> =============================================================================== 0010e64d <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10e64d: 55 push %ebp 10e64e: 89 e5 mov %esp,%ebp 10e650: 57 push %edi 10e651: 56 push %esi 10e652: 53 push %ebx 10e653: 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 ]; 10e656: 8b 45 08 mov 0x8(%ebp),%eax 10e659: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx if ( !api ) 10e65f: 85 db test %ebx,%ebx 10e661: 74 45 je 10e6a8 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10e663: 9c pushf 10e664: fa cli 10e665: 58 pop %eax signal_set = asr->signals_posted; 10e666: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10e669: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10e670: 50 push %eax 10e671: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10e672: 85 ff test %edi,%edi 10e674: 74 32 je 10e6a8 <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 10e676: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e679: 50 push %eax 10e67a: 8d 75 e4 lea -0x1c(%ebp),%esi 10e67d: 56 push %esi 10e67e: 68 ff ff 00 00 push $0xffff 10e683: ff 73 10 pushl 0x10(%ebx) 10e686: e8 31 18 00 00 call 10febc (*asr->handler)( signal_set ); 10e68b: 89 3c 24 mov %edi,(%esp) 10e68e: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10e691: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10e694: 83 c4 0c add $0xc,%esp 10e697: 56 push %esi 10e698: 68 ff ff 00 00 push $0xffff 10e69d: ff 75 e4 pushl -0x1c(%ebp) 10e6a0: e8 17 18 00 00 call 10febc 10e6a5: 83 c4 10 add $0x10,%esp } 10e6a8: 8d 65 f4 lea -0xc(%ebp),%esp 10e6ab: 5b pop %ebx 10e6ac: 5e pop %esi 10e6ad: 5f pop %edi 10e6ae: c9 leave 10e6af: c3 ret =============================================================================== 0010b3fc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b3fc: 55 push %ebp 10b3fd: 89 e5 mov %esp,%ebp 10b3ff: 53 push %ebx 10b400: 83 ec 18 sub $0x18,%esp /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); 10b403: 8d 45 f4 lea -0xc(%ebp),%eax 10b406: 50 push %eax 10b407: ff 75 08 pushl 0x8(%ebp) 10b40a: 68 f4 62 12 00 push $0x1262f4 10b40f: e8 f0 19 00 00 call 10ce04 <_Objects_Get> 10b414: 89 c3 mov %eax,%ebx switch ( location ) { 10b416: 83 c4 10 add $0x10,%esp 10b419: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b41d: 75 64 jne 10b483 <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b41f: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b422: f6 40 11 40 testb $0x40,0x11(%eax) 10b426: 74 18 je 10b440 <_Rate_monotonic_Timeout+0x44> 10b428: 8b 53 08 mov 0x8(%ebx),%edx 10b42b: 39 50 20 cmp %edx,0x20(%eax) 10b42e: 75 10 jne 10b440 <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b430: 52 push %edx 10b431: 52 push %edx 10b432: 68 f8 ff 03 10 push $0x1003fff8 10b437: 50 push %eax 10b438: e8 2f 21 00 00 call 10d56c <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b43d: 59 pop %ecx 10b43e: eb 10 jmp 10b450 <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b440: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b444: 75 2b jne 10b471 <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b446: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b44d: 83 ec 0c sub $0xc,%esp 10b450: 53 push %ebx 10b451: e8 ec fa ff ff call 10af42 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b456: 8b 43 3c mov 0x3c(%ebx),%eax 10b459: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b45c: 58 pop %eax 10b45d: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10b45e: 83 c3 10 add $0x10,%ebx 10b461: 53 push %ebx 10b462: 68 a8 64 12 00 push $0x1264a8 10b467: e8 c8 30 00 00 call 10e534 <_Watchdog_Insert> 10b46c: 83 c4 10 add $0x10,%esp 10b46f: eb 07 jmp 10b478 <_Rate_monotonic_Timeout+0x7c> } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b471: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b478: a1 e4 63 12 00 mov 0x1263e4,%eax 10b47d: 48 dec %eax 10b47e: a3 e4 63 12 00 mov %eax,0x1263e4 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b483: 8b 5d fc mov -0x4(%ebp),%ebx 10b486: c9 leave 10b487: c3 ret =============================================================================== 0010b988 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10b988: 55 push %ebp 10b989: 89 e5 mov %esp,%ebp 10b98b: 56 push %esi 10b98c: 53 push %ebx 10b98d: 8b 55 08 mov 0x8(%ebp),%edx ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 10b990: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx ready = sched_info->ready_chain; 10b996: 8b 01 mov (%ecx),%eax if ( _Chain_Has_only_one_node( ready ) ) { 10b998: 8b 58 08 mov 0x8(%eax),%ebx 10b99b: 39 18 cmp %ebx,(%eax) 10b99d: 75 32 jne 10b9d1 <_Scheduler_priority_Block+0x49> Chain_Node *tail = _Chain_Tail( the_chain ); 10b99f: 8d 58 04 lea 0x4(%eax),%ebx 10b9a2: 89 18 mov %ebx,(%eax) head->next = tail; head->previous = NULL; 10b9a4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10b9ab: 89 40 08 mov %eax,0x8(%eax) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10b9ae: 8b 59 04 mov 0x4(%ecx),%ebx 10b9b1: 66 8b 03 mov (%ebx),%ax 10b9b4: 66 23 41 0e and 0xe(%ecx),%ax 10b9b8: 66 89 03 mov %ax,(%ebx) if ( *the_priority_map->minor == 0 ) 10b9bb: 66 85 c0 test %ax,%ax 10b9be: 75 1b jne 10b9db <_Scheduler_priority_Block+0x53> _Priority_Major_bit_map &= the_priority_map->block_major; 10b9c0: 66 a1 ec 47 12 00 mov 0x1247ec,%ax 10b9c6: 23 41 0c and 0xc(%ecx),%eax 10b9c9: 66 a3 ec 47 12 00 mov %ax,0x1247ec 10b9cf: eb 0a jmp 10b9db <_Scheduler_priority_Block+0x53> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10b9d1: 8b 0a mov (%edx),%ecx previous = the_node->previous; 10b9d3: 8b 42 04 mov 0x4(%edx),%eax next->previous = previous; 10b9d6: 89 41 04 mov %eax,0x4(%ecx) previous->next = next; 10b9d9: 89 08 mov %ecx,(%eax) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10b9db: 3b 15 e0 47 12 00 cmp 0x1247e0,%edx 10b9e1: 75 43 jne 10ba26 <_Scheduler_priority_Block+0x9e> RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10b9e3: 66 8b 35 ec 47 12 00 mov 0x1247ec,%si 10b9ea: 31 c9 xor %ecx,%ecx 10b9ec: 89 cb mov %ecx,%ebx 10b9ee: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10b9f2: 0f b7 db movzwl %bx,%ebx 10b9f5: 66 8b b4 1b f0 47 12 mov 0x1247f0(%ebx,%ebx,1),%si 10b9fc: 00 10b9fd: 66 0f bc ce bsf %si,%cx return (_Priority_Bits_index( major ) << 4) + 10ba01: c1 e3 04 shl $0x4,%ebx 10ba04: 0f b7 c9 movzwl %cx,%ecx 10ba07: 8d 04 0b lea (%ebx,%ecx,1),%eax Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10ba0a: 6b c0 0c imul $0xc,%eax,%eax 10ba0d: 03 05 50 04 12 00 add 0x120450,%eax _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } 10ba13: 8b 18 mov (%eax),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ba15: 83 c0 04 add $0x4,%eax return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10ba18: 31 c9 xor %ecx,%ecx Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10ba1a: 39 c3 cmp %eax,%ebx 10ba1c: 74 02 je 10ba20 <_Scheduler_priority_Block+0x98><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); 10ba1e: 89 d9 mov %ebx,%ecx * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10ba20: 89 0d e0 47 12 00 mov %ecx,0x1247e0 /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10ba26: 3b 15 dc 47 12 00 cmp 0x1247dc,%edx 10ba2c: 75 07 jne 10ba35 <_Scheduler_priority_Block+0xad> _Thread_Dispatch_necessary = true; 10ba2e: c6 05 e8 47 12 00 01 movb $0x1,0x1247e8 } 10ba35: 5b pop %ebx 10ba36: 5e pop %esi 10ba37: c9 leave 10ba38: c3 ret =============================================================================== 0010bb88 <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10bb88: 55 push %ebp 10bb89: 89 e5 mov %esp,%ebp 10bb8b: 53 push %ebx RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10bb8c: 66 8b 1d ec 47 12 00 mov 0x1247ec,%bx 10bb93: 31 d2 xor %edx,%edx 10bb95: 89 d1 mov %edx,%ecx 10bb97: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10bb9b: 0f b7 c9 movzwl %cx,%ecx 10bb9e: 66 8b 9c 09 f0 47 12 mov 0x1247f0(%ecx,%ecx,1),%bx 10bba5: 00 10bba6: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10bbaa: c1 e1 04 shl $0x4,%ecx 10bbad: 0f b7 d2 movzwl %dx,%edx 10bbb0: 8d 04 11 lea (%ecx,%edx,1),%eax Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10bbb3: 6b c0 0c imul $0xc,%eax,%eax 10bbb6: 03 05 50 04 12 00 add 0x120450,%eax _Scheduler_priority_Schedule_body(); } 10bbbc: 8b 08 mov (%eax),%ecx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10bbbe: 83 c0 04 add $0x4,%eax return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10bbc1: 31 d2 xor %edx,%edx Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 10bbc3: 39 c1 cmp %eax,%ecx 10bbc5: 74 02 je 10bbc9 <_Scheduler_priority_Schedule+0x41><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); 10bbc7: 89 ca mov %ecx,%edx * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 10bbc9: 89 15 e0 47 12 00 mov %edx,0x1247e0 10bbcf: 5b pop %ebx 10bbd0: c9 leave 10bbd1: c3 ret =============================================================================== 0010bc94 <_Scheduler_priority_Yield>: * ready chain * select heir */ void _Scheduler_priority_Yield(void) { 10bc94: 55 push %ebp 10bc95: 89 e5 mov %esp,%ebp 10bc97: 56 push %esi 10bc98: 53 push %ebx Scheduler_priority_Per_thread *sched_info; ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10bc99: a1 dc 47 12 00 mov 0x1247dc,%eax sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info; ready = sched_info->ready_chain; 10bc9e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx 10bca4: 8b 12 mov (%edx),%edx _ISR_Disable( level ); 10bca6: 9c pushf 10bca7: fa cli 10bca8: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10bca9: 8b 5a 08 mov 0x8(%edx),%ebx 10bcac: 39 1a cmp %ebx,(%edx) 10bcae: 74 2e je 10bcde <_Scheduler_priority_Yield+0x4a> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10bcb0: 8b 30 mov (%eax),%esi previous = the_node->previous; 10bcb2: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10bcb5: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10bcb8: 89 33 mov %esi,(%ebx) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 10bcba: 8b 5a 08 mov 0x8(%edx),%ebx RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 10bcbd: 8d 72 04 lea 0x4(%edx),%esi 10bcc0: 89 30 mov %esi,(%eax) Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 10bcc2: 89 42 08 mov %eax,0x8(%edx) old_last->next = the_node; 10bcc5: 89 03 mov %eax,(%ebx) the_node->previous = old_last; 10bcc7: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10bcca: 51 push %ecx 10bccb: 9d popf 10bccc: fa cli if ( _Thread_Is_heir( executing ) ) 10bccd: 3b 05 e0 47 12 00 cmp 0x1247e0,%eax 10bcd3: 75 11 jne 10bce6 <_Scheduler_priority_Yield+0x52><== NEVER TAKEN _Thread_Heir = (Thread_Control *) _Chain_First( ready ); 10bcd5: 8b 02 mov (%edx),%eax 10bcd7: a3 e0 47 12 00 mov %eax,0x1247e0 10bcdc: eb 08 jmp 10bce6 <_Scheduler_priority_Yield+0x52> _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10bcde: 3b 05 e0 47 12 00 cmp 0x1247e0,%eax 10bce4: 74 07 je 10bced <_Scheduler_priority_Yield+0x59><== ALWAYS TAKEN _Thread_Dispatch_necessary = true; 10bce6: c6 05 e8 47 12 00 01 movb $0x1,0x1247e8 _ISR_Enable( level ); 10bced: 51 push %ecx 10bcee: 9d popf } 10bcef: 5b pop %ebx 10bcf0: 5e pop %esi 10bcf1: c9 leave 10bcf2: c3 ret =============================================================================== 0010ad34 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10ad34: 55 push %ebp 10ad35: 89 e5 mov %esp,%ebp 10ad37: 56 push %esi 10ad38: 53 push %ebx 10ad39: 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(); 10ad3c: 8b 35 b4 36 12 00 mov 0x1236b4,%esi (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 10ad42: 31 db xor %ebx,%ebx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ad44: 85 c9 test %ecx,%ecx 10ad46: 74 57 je 10ad9f <_TOD_Validate+0x6b> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10ad48: b8 40 42 0f 00 mov $0xf4240,%eax 10ad4d: 31 d2 xor %edx,%edx 10ad4f: f7 f6 div %esi rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10ad51: 39 41 18 cmp %eax,0x18(%ecx) 10ad54: 73 49 jae 10ad9f <_TOD_Validate+0x6b> (the_tod->ticks >= ticks_per_second) || 10ad56: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10ad5a: 77 43 ja 10ad9f <_TOD_Validate+0x6b> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10ad5c: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10ad60: 77 3d ja 10ad9f <_TOD_Validate+0x6b> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10ad62: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10ad66: 77 37 ja 10ad9f <_TOD_Validate+0x6b> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10ad68: 8b 41 04 mov 0x4(%ecx),%eax rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 10ad6b: 85 c0 test %eax,%eax 10ad6d: 74 30 je 10ad9f <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->month == 0) || 10ad6f: 83 f8 0c cmp $0xc,%eax 10ad72: 77 2b ja 10ad9f <_TOD_Validate+0x6b> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10ad74: 8b 31 mov (%ecx),%esi (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 10ad76: 81 fe c3 07 00 00 cmp $0x7c3,%esi 10ad7c: 76 21 jbe 10ad9f <_TOD_Validate+0x6b> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10ad7e: 8b 51 08 mov 0x8(%ecx),%edx (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) || 10ad81: 85 d2 test %edx,%edx 10ad83: 74 1a je 10ad9f <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10ad85: 83 e6 03 and $0x3,%esi 10ad88: 75 09 jne 10ad93 <_TOD_Validate+0x5f> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ad8a: 8b 04 85 70 0a 12 00 mov 0x120a70(,%eax,4),%eax 10ad91: eb 07 jmp 10ad9a <_TOD_Validate+0x66> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ad93: 8b 04 85 3c 0a 12 00 mov 0x120a3c(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10ad9a: 39 c2 cmp %eax,%edx 10ad9c: 0f 96 c3 setbe %bl if ( the_tod->day > days_in_month ) return false; return true; } 10ad9f: 88 d8 mov %bl,%al 10ada1: 5b pop %ebx 10ada2: 5e pop %esi 10ada3: c9 leave 10ada4: c3 ret =============================================================================== 0010bd40 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10bd40: 55 push %ebp 10bd41: 89 e5 mov %esp,%ebp 10bd43: 57 push %edi 10bd44: 56 push %esi 10bd45: 53 push %ebx 10bd46: 83 ec 28 sub $0x28,%esp 10bd49: 8b 5d 08 mov 0x8(%ebp),%ebx 10bd4c: 8b 75 0c mov 0xc(%ebp),%esi 10bd4f: 8a 45 10 mov 0x10(%ebp),%al 10bd52: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10bd55: 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 ); 10bd58: 53 push %ebx 10bd59: e8 3a 0b 00 00 call 10c898 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 10bd5e: 83 c4 10 add $0x10,%esp 10bd61: 39 73 14 cmp %esi,0x14(%ebx) 10bd64: 74 0c je 10bd72 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bd66: 50 push %eax 10bd67: 50 push %eax 10bd68: 56 push %esi 10bd69: 53 push %ebx 10bd6a: e8 d9 0a 00 00 call 10c848 <_Thread_Set_priority> 10bd6f: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bd72: 9c pushf 10bd73: fa cli 10bd74: 5e pop %esi /* * 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; 10bd75: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10bd78: 83 f8 04 cmp $0x4,%eax 10bd7b: 74 2b je 10bda8 <_Thread_Change_priority+0x68> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bd7d: 83 e7 04 and $0x4,%edi 10bd80: 75 08 jne 10bd8a <_Thread_Change_priority+0x4a><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bd82: 89 c2 mov %eax,%edx 10bd84: 83 e2 fb and $0xfffffffb,%edx 10bd87: 89 53 10 mov %edx,0x10(%ebx) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10bd8a: 56 push %esi 10bd8b: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bd8c: a9 e0 be 03 00 test $0x3bee0,%eax 10bd91: 74 65 je 10bdf8 <_Thread_Change_priority+0xb8> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10bd93: 89 5d 0c mov %ebx,0xc(%ebp) 10bd96: 8b 43 44 mov 0x44(%ebx),%eax 10bd99: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 10bd9c: 8d 65 f4 lea -0xc(%ebp),%esp 10bd9f: 5b pop %ebx 10bda0: 5e pop %esi 10bda1: 5f pop %edi 10bda2: 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 ); 10bda3: e9 18 0a 00 00 jmp 10c7c0 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10bda8: 83 e7 04 and $0x4,%edi 10bdab: 75 26 jne 10bdd3 <_Thread_Change_priority+0x93><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bdad: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10bdb4: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10bdb8: 74 0c je 10bdc6 <_Thread_Change_priority+0x86> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10bdba: 83 ec 0c sub $0xc,%esp 10bdbd: 53 push %ebx 10bdbe: ff 15 78 04 12 00 call *0x120478 10bdc4: eb 0a jmp 10bdd0 <_Thread_Change_priority+0x90> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10bdc6: 83 ec 0c sub $0xc,%esp 10bdc9: 53 push %ebx 10bdca: ff 15 74 04 12 00 call *0x120474 10bdd0: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10bdd3: 56 push %esi 10bdd4: 9d popf 10bdd5: fa cli * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 10bdd6: ff 15 58 04 12 00 call *0x120458 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10bddc: a1 dc 47 12 00 mov 0x1247dc,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 10bde1: 3b 05 e0 47 12 00 cmp 0x1247e0,%eax 10bde7: 74 0d je 10bdf6 <_Thread_Change_priority+0xb6> 10bde9: 80 78 74 00 cmpb $0x0,0x74(%eax) 10bded: 74 07 je 10bdf6 <_Thread_Change_priority+0xb6> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10bdef: c6 05 e8 47 12 00 01 movb $0x1,0x1247e8 _ISR_Enable( level ); 10bdf6: 56 push %esi 10bdf7: 9d popf } 10bdf8: 8d 65 f4 lea -0xc(%ebp),%esp 10bdfb: 5b pop %ebx 10bdfc: 5e pop %esi 10bdfd: 5f pop %edi 10bdfe: c9 leave 10bdff: c3 ret =============================================================================== 0010bfa4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10bfa4: 55 push %ebp 10bfa5: 89 e5 mov %esp,%ebp 10bfa7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10bfaa: 8d 45 f4 lea -0xc(%ebp),%eax 10bfad: 50 push %eax 10bfae: ff 75 08 pushl 0x8(%ebp) 10bfb1: e8 82 01 00 00 call 10c138 <_Thread_Get> switch ( location ) { 10bfb6: 83 c4 10 add $0x10,%esp 10bfb9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10bfbd: 75 1b jne 10bfda <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10bfbf: 52 push %edx 10bfc0: 52 push %edx 10bfc1: 68 18 00 00 10 push $0x10000018 10bfc6: 50 push %eax 10bfc7: e8 34 fe ff ff call 10be00 <_Thread_Clear_state> 10bfcc: a1 c0 45 12 00 mov 0x1245c0,%eax 10bfd1: 48 dec %eax 10bfd2: a3 c0 45 12 00 mov %eax,0x1245c0 10bfd7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10bfda: c9 leave 10bfdb: c3 ret =============================================================================== 0010bfdc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10bfdc: 55 push %ebp 10bfdd: 89 e5 mov %esp,%ebp 10bfdf: 57 push %edi 10bfe0: 56 push %esi 10bfe1: 53 push %ebx 10bfe2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10bfe5: 8b 1d dc 47 12 00 mov 0x1247dc,%ebx _ISR_Disable( level ); 10bfeb: 9c pushf 10bfec: fa cli 10bfed: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10bfee: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10bff1: e9 f9 00 00 00 jmp 10c0ef <_Thread_Dispatch+0x113> heir = _Thread_Heir; 10bff6: 8b 35 e0 47 12 00 mov 0x1247e0,%esi _Thread_Dispatch_disable_level = 1; 10bffc: c7 05 c0 45 12 00 01 movl $0x1,0x1245c0 10c003: 00 00 00 _Thread_Dispatch_necessary = false; 10c006: c6 05 e8 47 12 00 00 movb $0x0,0x1247e8 _Thread_Executing = heir; 10c00d: 89 35 dc 47 12 00 mov %esi,0x1247dc /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 10c013: 39 de cmp %ebx,%esi 10c015: 0f 84 e2 00 00 00 je 10c0fd <_Thread_Dispatch+0x121> */ #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 ) 10c01b: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c01f: 75 09 jne 10c02a <_Thread_Dispatch+0x4e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c021: 8b 15 90 45 12 00 mov 0x124590,%edx 10c027: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c02a: 50 push %eax 10c02b: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c02c: 83 ec 0c sub $0xc,%esp 10c02f: 8d 45 e0 lea -0x20(%ebp),%eax 10c032: 50 push %eax 10c033: e8 e8 29 00 00 call 10ea20 <_TOD_Get_uptime> _Timestamp_Subtract( 10c038: 83 c4 0c add $0xc,%esp 10c03b: 57 push %edi 10c03c: 8d 45 e0 lea -0x20(%ebp),%eax 10c03f: 50 push %eax 10c040: 68 70 46 12 00 push $0x124670 10c045: e8 16 0a 00 00 call 10ca60 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c04a: 58 pop %eax 10c04b: 5a pop %edx 10c04c: 57 push %edi 10c04d: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c053: 50 push %eax 10c054: e8 d7 09 00 00 call 10ca30 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c059: 8b 45 e0 mov -0x20(%ebp),%eax 10c05c: 8b 55 e4 mov -0x1c(%ebp),%edx 10c05f: a3 70 46 12 00 mov %eax,0x124670 10c064: 89 15 74 46 12 00 mov %edx,0x124674 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c06a: a1 48 46 12 00 mov 0x124648,%eax 10c06f: 83 c4 10 add $0x10,%esp 10c072: 85 c0 test %eax,%eax 10c074: 74 10 je 10c086 <_Thread_Dispatch+0xaa> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c076: 8b 10 mov (%eax),%edx 10c078: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c07e: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx 10c084: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c086: 51 push %ecx 10c087: 51 push %ecx 10c088: 56 push %esi 10c089: 53 push %ebx 10c08a: e8 09 0c 00 00 call 10cc98 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c08f: 58 pop %eax 10c090: 5a pop %edx 10c091: 81 c6 c4 00 00 00 add $0xc4,%esi 10c097: 56 push %esi 10c098: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax 10c09e: 50 push %eax 10c09f: e8 cc 0e 00 00 call 10cf70 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c0a4: 83 c4 10 add $0x10,%esp 10c0a7: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx) 10c0ae: 74 36 je 10c0e6 <_Thread_Dispatch+0x10a> #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 ); 10c0b0: a1 44 46 12 00 mov 0x124644,%eax 10c0b5: 39 c3 cmp %eax,%ebx 10c0b7: 74 2d je 10c0e6 <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c0b9: 85 c0 test %eax,%eax 10c0bb: 74 11 je 10c0ce <_Thread_Dispatch+0xf2> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c0bd: 83 ec 0c sub $0xc,%esp 10c0c0: 05 dc 00 00 00 add $0xdc,%eax 10c0c5: 50 push %eax 10c0c6: e8 d9 0e 00 00 call 10cfa4 <_CPU_Context_save_fp> 10c0cb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c0ce: 83 ec 0c sub $0xc,%esp 10c0d1: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax 10c0d7: 50 push %eax 10c0d8: e8 d1 0e 00 00 call 10cfae <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c0dd: 89 1d 44 46 12 00 mov %ebx,0x124644 10c0e3: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c0e6: 8b 1d dc 47 12 00 mov 0x1247dc,%ebx _ISR_Disable( level ); 10c0ec: 9c pushf 10c0ed: fa cli 10c0ee: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10c0ef: 8a 15 e8 47 12 00 mov 0x1247e8,%dl 10c0f5: 84 d2 test %dl,%dl 10c0f7: 0f 85 f9 fe ff ff jne 10bff6 <_Thread_Dispatch+0x1a> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10c0fd: c7 05 c0 45 12 00 00 movl $0x0,0x1245c0 10c104: 00 00 00 _ISR_Enable( level ); 10c107: 50 push %eax 10c108: 9d popf _API_extensions_Run_postswitch(); 10c109: e8 d5 e7 ff ff call 10a8e3 <_API_extensions_Run_postswitch> } 10c10e: 8d 65 f4 lea -0xc(%ebp),%esp 10c111: 5b pop %ebx 10c112: 5e pop %esi 10c113: 5f pop %edi 10c114: c9 leave 10c115: c3 ret =============================================================================== 001100dc <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 1100dc: 55 push %ebp 1100dd: 89 e5 mov %esp,%ebp 1100df: 53 push %ebx 1100e0: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 1100e3: 8b 1d dc 47 12 00 mov 0x1247dc,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 1100e9: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 1100ef: 85 c0 test %eax,%eax 1100f1: 74 03 je 1100f6 <_Thread_Handler+0x1a> 1100f3: fa cli 1100f4: eb 01 jmp 1100f7 <_Thread_Handler+0x1b> 1100f6: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 1100f7: a0 84 42 12 00 mov 0x124284,%al 1100fc: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 1100ff: c6 05 84 42 12 00 01 movb $0x1,0x124284 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110106: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx) 11010d: 74 24 je 110133 <_Thread_Handler+0x57> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 11010f: a1 44 46 12 00 mov 0x124644,%eax 110114: 39 c3 cmp %eax,%ebx 110116: 74 1b je 110133 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110118: 85 c0 test %eax,%eax 11011a: 74 11 je 11012d <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 11011c: 83 ec 0c sub $0xc,%esp 11011f: 05 dc 00 00 00 add $0xdc,%eax 110124: 50 push %eax 110125: e8 7a ce ff ff call 10cfa4 <_CPU_Context_save_fp> 11012a: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 11012d: 89 1d 44 46 12 00 mov %ebx,0x124644 /* * 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 ); 110133: 83 ec 0c sub $0xc,%esp 110136: 53 push %ebx 110137: e8 0c ca ff ff call 10cb48 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 11013c: e8 d5 bf ff ff call 10c116 <_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) */ { 110141: 83 c4 10 add $0x10,%esp 110144: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110148: 75 05 jne 11014f <_Thread_Handler+0x73> INIT_NAME (); 11014a: e8 f1 c6 00 00 call 11c840 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 11014f: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx) 110156: 75 15 jne 11016d <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110158: 83 ec 0c sub $0xc,%esp 11015b: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 110161: ff 93 90 00 00 00 call *0x90(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 110167: 89 43 28 mov %eax,0x28(%ebx) 11016a: 83 c4 10 add $0x10,%esp * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 11016d: 83 ec 0c sub $0xc,%esp 110170: 53 push %ebx 110171: e8 03 ca ff ff call 10cb79 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110176: 83 c4 0c add $0xc,%esp 110179: 6a 05 push $0x5 11017b: 6a 01 push $0x1 11017d: 6a 00 push $0x0 11017f: e8 58 b0 ff ff call 10b1dc <_Internal_error_Occurred> =============================================================================== 0010c1ac <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c1ac: 55 push %ebp 10c1ad: 89 e5 mov %esp,%ebp 10c1af: 57 push %edi 10c1b0: 56 push %esi 10c1b1: 53 push %ebx 10c1b2: 83 ec 24 sub $0x24,%esp 10c1b5: 8b 5d 0c mov 0xc(%ebp),%ebx 10c1b8: 8b 75 14 mov 0x14(%ebp),%esi 10c1bb: 8a 55 18 mov 0x18(%ebp),%dl 10c1be: 8a 45 20 mov 0x20(%ebp),%al 10c1c1: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10c1c4: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10c1cb: 00 00 00 10c1ce: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10c1d5: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c1d8: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx) 10c1df: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c1e2: 56 push %esi 10c1e3: 53 push %ebx 10c1e4: 88 55 e0 mov %dl,-0x20(%ebp) 10c1e7: e8 dc 06 00 00 call 10c8c8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c1ec: 83 c4 10 add $0x10,%esp 10c1ef: 39 f0 cmp %esi,%eax 10c1f1: 8a 55 e0 mov -0x20(%ebp),%dl 10c1f4: 0f 82 9f 01 00 00 jb 10c399 <_Thread_Initialize+0x1ed> 10c1fa: 85 c0 test %eax,%eax 10c1fc: 0f 84 97 01 00 00 je 10c399 <_Thread_Initialize+0x1ed><== NEVER TAKEN Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c202: 8b 8b c0 00 00 00 mov 0xc0(%ebx),%ecx 10c208: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx) the_stack->size = size; 10c20e: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10c214: 31 ff xor %edi,%edi /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10c216: 84 d2 test %dl,%dl 10c218: 74 17 je 10c231 <_Thread_Initialize+0x85> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c21a: 83 ec 0c sub $0xc,%esp 10c21d: 6a 6c push $0x6c 10c21f: e8 e2 0c 00 00 call 10cf06 <_Workspace_Allocate> 10c224: 89 c7 mov %eax,%edi if ( !fp_area ) 10c226: 83 c4 10 add $0x10,%esp 10c229: 85 c0 test %eax,%eax 10c22b: 0f 84 15 01 00 00 je 10c346 <_Thread_Initialize+0x19a> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c231: 89 bb dc 00 00 00 mov %edi,0xdc(%ebx) the_thread->Start.fp_context = fp_area; 10c237: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c23d: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c244: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c24b: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c252: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c259: a1 54 46 12 00 mov 0x124654,%eax * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10c25e: 31 f6 xor %esi,%esi #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c260: 85 c0 test %eax,%eax 10c262: 74 1d je 10c281 <_Thread_Initialize+0xd5> extensions_area = _Workspace_Allocate( 10c264: 83 ec 0c sub $0xc,%esp 10c267: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c26e: 50 push %eax 10c26f: e8 92 0c 00 00 call 10cf06 <_Workspace_Allocate> 10c274: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c276: 83 c4 10 add $0x10,%esp 10c279: 85 c0 test %eax,%eax 10c27b: 0f 84 c7 00 00 00 je 10c348 <_Thread_Initialize+0x19c> goto failed; } the_thread->extensions = (void **) extensions_area; 10c281: 89 b3 ec 00 00 00 mov %esi,0xec(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c287: 85 f6 test %esi,%esi 10c289: 74 16 je 10c2a1 <_Thread_Initialize+0xf5> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c28b: 8b 15 54 46 12 00 mov 0x124654,%edx 10c291: 31 c0 xor %eax,%eax 10c293: eb 08 jmp 10c29d <_Thread_Initialize+0xf1> the_thread->extensions[i] = NULL; 10c295: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c29c: 40 inc %eax 10c29d: 39 d0 cmp %edx,%eax 10c29f: 76 f4 jbe 10c295 <_Thread_Initialize+0xe9> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c2a1: 8a 45 e7 mov -0x19(%ebp),%al 10c2a4: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c2aa: 8b 45 24 mov 0x24(%ebp),%eax 10c2ad: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10c2b3: 8b 45 28 mov 0x28(%ebp),%eax 10c2b6: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c2bc: 8b 45 2c mov 0x2c(%ebp),%eax 10c2bf: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10c2c5: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c2cc: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c2d3: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10c2da: 8b 45 1c mov 0x1c(%ebp),%eax 10c2dd: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c2e0: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 10c2e6: 83 ec 0c sub $0xc,%esp 10c2e9: 53 push %ebx 10c2ea: ff 15 68 04 12 00 call *0x120468 10c2f0: 89 c2 mov %eax,%edx sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10c2f2: 83 c4 10 add $0x10,%esp 10c2f5: 85 c0 test %eax,%eax 10c2f7: 74 51 je 10c34a <_Thread_Initialize+0x19e> goto failed; _Thread_Set_priority( the_thread, priority ); 10c2f9: 51 push %ecx 10c2fa: 51 push %ecx 10c2fb: ff 75 1c pushl 0x1c(%ebp) 10c2fe: 53 push %ebx 10c2ff: 89 45 e0 mov %eax,-0x20(%ebp) 10c302: e8 41 05 00 00 call 10c848 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c307: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c30e: 00 00 00 10c311: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c318: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10c31b: 8b 45 08 mov 0x8(%ebp),%eax 10c31e: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c321: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c325: 89 1c 88 mov %ebx,(%eax,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c328: 8b 45 30 mov 0x30(%ebp),%eax 10c32b: 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 ); 10c32e: 89 1c 24 mov %ebx,(%esp) 10c331: e8 b2 08 00 00 call 10cbe8 <_User_extensions_Thread_create> 10c336: 88 c1 mov %al,%cl if ( extension_status ) 10c338: 83 c4 10 add $0x10,%esp return true; 10c33b: b0 01 mov $0x1,%al * 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 ) 10c33d: 84 c9 test %cl,%cl 10c33f: 8b 55 e0 mov -0x20(%ebp),%edx 10c342: 74 06 je 10c34a <_Thread_Initialize+0x19e> 10c344: eb 55 jmp 10c39b <_Thread_Initialize+0x1ef> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10c346: 31 f6 xor %esi,%esi size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 10c348: 31 d2 xor %edx,%edx extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 10c34a: 83 ec 0c sub $0xc,%esp 10c34d: ff b3 e0 00 00 00 pushl 0xe0(%ebx) 10c353: 89 55 e0 mov %edx,-0x20(%ebp) 10c356: e8 c4 0b 00 00 call 10cf1f <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10c35b: 5a pop %edx 10c35c: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10c362: e8 b8 0b 00 00 call 10cf1f <_Workspace_Free> 10c367: 58 pop %eax 10c368: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10c36e: e8 ac 0b 00 00 call 10cf1f <_Workspace_Free> _Workspace_Free( extensions_area ); 10c373: 89 34 24 mov %esi,(%esp) 10c376: e8 a4 0b 00 00 call 10cf1f <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10c37b: 89 3c 24 mov %edi,(%esp) 10c37e: e8 9c 0b 00 00 call 10cf1f <_Workspace_Free> #endif _Workspace_Free( sched ); 10c383: 8b 55 e0 mov -0x20(%ebp),%edx 10c386: 89 14 24 mov %edx,(%esp) 10c389: e8 91 0b 00 00 call 10cf1f <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10c38e: 89 1c 24 mov %ebx,(%esp) 10c391: e8 82 05 00 00 call 10c918 <_Thread_Stack_Free> return false; 10c396: 83 c4 10 add $0x10,%esp * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10c399: 31 c0 xor %eax,%eax _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10c39b: 8d 65 f4 lea -0xc(%ebp),%esp 10c39e: 5b pop %ebx 10c39f: 5e pop %esi 10c3a0: 5f pop %edi 10c3a1: c9 leave 10c3a2: c3 ret =============================================================================== 0010f5d0 <_Thread_Resume>: */ void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f5d0: 55 push %ebp 10f5d1: 89 e5 mov %esp,%ebp 10f5d3: 53 push %ebx 10f5d4: 83 ec 04 sub $0x4,%esp 10f5d7: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f5da: 9c pushf 10f5db: fa cli 10f5dc: 5b pop %ebx current_state = the_thread->current_state; 10f5dd: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f5e0: f6 c2 02 test $0x2,%dl 10f5e3: 74 17 je 10f5fc <_Thread_Resume+0x2c> <== NEVER TAKEN 10f5e5: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 10f5e8: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10f5eb: 85 d2 test %edx,%edx 10f5ed: 75 0d jne 10f5fc <_Thread_Resume+0x2c> */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10f5ef: 83 ec 0c sub $0xc,%esp 10f5f2: 50 push %eax 10f5f3: ff 15 84 36 12 00 call *0x123684 10f5f9: 83 c4 10 add $0x10,%esp _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10f5fc: 53 push %ebx 10f5fd: 9d popf } 10f5fe: 8b 5d fc mov -0x4(%ebp),%ebx 10f601: c9 leave 10f602: c3 ret =============================================================================== 0010c7c0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c7c0: 55 push %ebp 10c7c1: 89 e5 mov %esp,%ebp 10c7c3: 57 push %edi 10c7c4: 56 push %esi 10c7c5: 53 push %ebx 10c7c6: 83 ec 1c sub $0x1c,%esp 10c7c9: 8b 75 08 mov 0x8(%ebp),%esi 10c7cc: 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 ) 10c7cf: 85 f6 test %esi,%esi 10c7d1: 74 36 je 10c809 <_Thread_queue_Requeue+0x49><== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 10c7d3: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c7d7: 75 30 jne 10c809 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c7d9: 9c pushf 10c7da: fa cli 10c7db: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c7dc: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c7e3: 74 22 je 10c807 <_Thread_queue_Requeue+0x47><== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c7e5: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c7ec: 50 push %eax 10c7ed: 6a 01 push $0x1 10c7ef: 57 push %edi 10c7f0: 56 push %esi 10c7f1: e8 c6 26 00 00 call 10eebc <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c7f6: 83 c4 0c add $0xc,%esp 10c7f9: 8d 45 e4 lea -0x1c(%ebp),%eax 10c7fc: 50 push %eax 10c7fd: 57 push %edi 10c7fe: 56 push %esi 10c7ff: e8 c0 fd ff ff call 10c5c4 <_Thread_queue_Enqueue_priority> 10c804: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c807: 53 push %ebx 10c808: 9d popf } } 10c809: 8d 65 f4 lea -0xc(%ebp),%esp 10c80c: 5b pop %ebx 10c80d: 5e pop %esi 10c80e: 5f pop %edi 10c80f: c9 leave 10c810: c3 ret =============================================================================== 0010c814 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c814: 55 push %ebp 10c815: 89 e5 mov %esp,%ebp 10c817: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c81a: 8d 45 f4 lea -0xc(%ebp),%eax 10c81d: 50 push %eax 10c81e: ff 75 08 pushl 0x8(%ebp) 10c821: e8 12 f9 ff ff call 10c138 <_Thread_Get> switch ( location ) { 10c826: 83 c4 10 add $0x10,%esp 10c829: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c82d: 75 17 jne 10c846 <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c82f: 83 ec 0c sub $0xc,%esp 10c832: 50 push %eax 10c833: e8 3c 27 00 00 call 10ef74 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c838: a1 c0 45 12 00 mov 0x1245c0,%eax 10c83d: 48 dec %eax 10c83e: a3 c0 45 12 00 mov %eax,0x1245c0 10c843: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c846: c9 leave 10c847: c3 ret =============================================================================== 001169c4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 1169c4: 55 push %ebp 1169c5: 89 e5 mov %esp,%ebp 1169c7: 57 push %edi 1169c8: 56 push %esi 1169c9: 53 push %ebx 1169ca: 83 ec 4c sub $0x4c,%esp 1169cd: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 1169d0: 8d 55 dc lea -0x24(%ebp),%edx 1169d3: 8d 45 e0 lea -0x20(%ebp),%eax 1169d6: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 1169d9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 1169e0: 89 55 e4 mov %edx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 1169e3: 8d 7d d0 lea -0x30(%ebp),%edi 1169e6: 8d 4d d4 lea -0x2c(%ebp),%ecx 1169e9: 89 4d d0 mov %ecx,-0x30(%ebp) head->previous = NULL; 1169ec: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 1169f3: 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 ); 1169f6: 8d 53 30 lea 0x30(%ebx),%edx 1169f9: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 1169fc: 8d 73 68 lea 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 1169ff: 89 45 b4 mov %eax,-0x4c(%ebp) Chain_Control *tmp; /* * 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; 116a02: 8d 4d dc lea -0x24(%ebp),%ecx 116a05: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 116a08: a1 28 db 13 00 mov 0x13db28,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116a0d: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 116a10: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116a13: 51 push %ecx 116a14: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 116a15: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116a17: 50 push %eax 116a18: ff 75 c0 pushl -0x40(%ebp) 116a1b: e8 38 38 00 00 call 11a258 <_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(); 116a20: a1 a0 da 13 00 mov 0x13daa0,%eax 116a25: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 116a28: 8b 43 74 mov 0x74(%ebx),%eax /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 116a2b: 83 c4 10 add $0x10,%esp 116a2e: 39 45 c4 cmp %eax,-0x3c(%ebp) 116a31: 76 10 jbe 116a43 <_Timer_server_Body+0x7f> /* * 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 ); 116a33: 52 push %edx 116a34: 57 push %edi if ( snapshot > last_snapshot ) { /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; 116a35: 8b 55 c4 mov -0x3c(%ebp),%edx 116a38: 29 c2 sub %eax,%edx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 116a3a: 52 push %edx 116a3b: 56 push %esi 116a3c: e8 17 38 00 00 call 11a258 <_Watchdog_Adjust_to_chain> 116a41: eb 0f jmp 116a52 <_Timer_server_Body+0x8e> } else if ( snapshot < last_snapshot ) { 116a43: 73 10 jae 116a55 <_Timer_server_Body+0x91> /* * 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 ); 116a45: 51 push %ecx } else if ( snapshot < last_snapshot ) { /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; 116a46: 2b 45 c4 sub -0x3c(%ebp),%eax _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 116a49: 50 push %eax 116a4a: 6a 01 push $0x1 116a4c: 56 push %esi 116a4d: e8 9a 37 00 00 call 11a1ec <_Watchdog_Adjust> 116a52: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116a55: 8b 4d c4 mov -0x3c(%ebp),%ecx 116a58: 89 4b 74 mov %ecx,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 116a5b: 8b 43 78 mov 0x78(%ebx),%eax 116a5e: 83 ec 0c sub $0xc,%esp 116a61: 50 push %eax 116a62: e8 b1 08 00 00 call 117318 <_Chain_Get> if ( timer == NULL ) { 116a67: 83 c4 10 add $0x10,%esp 116a6a: 85 c0 test %eax,%eax 116a6c: 74 29 je 116a97 <_Timer_server_Body+0xd3><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116a6e: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 116a71: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 116a74: 75 0b jne 116a81 <_Timer_server_Body+0xbd><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116a76: 52 push %edx <== NOT EXECUTED 116a77: 52 push %edx <== NOT EXECUTED 116a78: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116a7b: 50 push %eax <== NOT EXECUTED 116a7c: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 116a7f: eb 0c jmp 116a8d <_Timer_server_Body+0xc9><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116a81: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116a84: 75 d5 jne 116a5b <_Timer_server_Body+0x97><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116a86: 51 push %ecx <== NOT EXECUTED 116a87: 51 push %ecx <== NOT EXECUTED 116a88: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116a8b: 50 push %eax <== NOT EXECUTED 116a8c: 56 push %esi <== NOT EXECUTED 116a8d: e8 4e 38 00 00 call 11a2e0 <_Watchdog_Insert> <== NOT EXECUTED 116a92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116a95: eb c4 jmp 116a5b <_Timer_server_Body+0x97><== 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 ); 116a97: 9c pushf 116a98: fa cli 116a99: 5a pop %edx tmp = ts->insert_chain; 116a9a: 8b 43 78 mov 0x78(%ebx),%eax if ( _Chain_Is_empty( insert_chain ) ) { 116a9d: b0 01 mov $0x1,%al 116a9f: 8b 4d b4 mov -0x4c(%ebp),%ecx 116aa2: 39 4d dc cmp %ecx,-0x24(%ebp) 116aa5: 75 09 jne 116ab0 <_Timer_server_Body+0xec><== NEVER TAKEN ts->insert_chain = NULL; 116aa7: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) do_loop = false; 116aae: 31 c0 xor %eax,%eax } _ISR_Enable( level ); 116ab0: 52 push %edx 116ab1: 9d popf * 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; while ( do_loop ) { 116ab2: 84 c0 test %al,%al 116ab4: 0f 85 4e ff ff ff jne 116a08 <_Timer_server_Body+0x44><== NEVER TAKEN 116aba: 8d 45 d4 lea -0x2c(%ebp),%eax _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 ) ) { 116abd: 39 45 d0 cmp %eax,-0x30(%ebp) 116ac0: 74 3a je 116afc <_Timer_server_Body+0x138> 116ac2: 89 45 b0 mov %eax,-0x50(%ebp) /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 116ac5: 9c pushf 116ac6: fa cli 116ac7: 59 pop %ecx initialized = false; } #endif return status; } 116ac8: 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)) 116acb: 3b 45 b0 cmp -0x50(%ebp),%eax 116ace: 74 25 je 116af5 <_Timer_server_Body+0x131> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 116ad0: 8b 10 mov (%eax),%edx head->next = new_first; 116ad2: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 116ad5: 89 7a 04 mov %edi,0x4(%edx) * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 116ad8: 85 c0 test %eax,%eax 116ada: 74 19 je 116af5 <_Timer_server_Body+0x131><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 116adc: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116ae3: 51 push %ecx 116ae4: 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 ); 116ae5: 52 push %edx 116ae6: 52 push %edx 116ae7: ff 70 24 pushl 0x24(%eax) 116aea: ff 70 20 pushl 0x20(%eax) 116aed: ff 50 1c call *0x1c(%eax) } 116af0: 83 c4 10 add $0x10,%esp 116af3: eb d0 jmp 116ac5 <_Timer_server_Body+0x101> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 116af5: 51 push %ecx 116af6: 9d popf 116af7: e9 06 ff ff ff jmp 116a02 <_Timer_server_Body+0x3e> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116afc: c6 43 7c 00 movb $0x0,0x7c(%ebx) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 116b00: e8 23 fe ff ff call 116928 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 116b05: 51 push %ecx 116b06: 51 push %ecx 116b07: 6a 08 push $0x8 116b09: ff 33 pushl (%ebx) 116b0b: e8 b4 31 00 00 call 119cc4 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116b10: 89 d8 mov %ebx,%eax 116b12: e8 21 fe ff ff call 116938 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 116b17: 89 d8 mov %ebx,%eax 116b19: e8 60 fe ff ff call 11697e <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116b1e: e8 9f 29 00 00 call 1194c2 <_Thread_Enable_dispatch> ts->active = true; 116b23: 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 ); 116b27: 8d 43 08 lea 0x8(%ebx),%eax 116b2a: 89 04 24 mov %eax,(%esp) 116b2d: e8 ce 38 00 00 call 11a400 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116b32: 8d 43 40 lea 0x40(%ebx),%eax 116b35: 89 04 24 mov %eax,(%esp) 116b38: e8 c3 38 00 00 call 11a400 <_Watchdog_Remove> 116b3d: 83 c4 10 add $0x10,%esp 116b40: e9 bd fe ff ff jmp 116a02 <_Timer_server_Body+0x3e> =============================================================================== 00116b45 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116b45: 55 push %ebp 116b46: 89 e5 mov %esp,%ebp 116b48: 57 push %edi 116b49: 56 push %esi 116b4a: 53 push %ebx 116b4b: 83 ec 2c sub $0x2c,%esp 116b4e: 8b 5d 08 mov 0x8(%ebp),%ebx 116b51: 8b 75 0c mov 0xc(%ebp),%esi if ( ts->insert_chain == NULL ) { 116b54: 8b 43 78 mov 0x78(%ebx),%eax 116b57: 85 c0 test %eax,%eax 116b59: 0f 85 de 00 00 00 jne 116c3d <_Timer_server_Schedule_operation_method+0xf8><== NEVER TAKEN * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 116b5f: e8 c4 fd ff ff call 116928 <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116b64: 8b 46 38 mov 0x38(%esi),%eax 116b67: 83 f8 01 cmp $0x1,%eax 116b6a: 75 5a jne 116bc6 <_Timer_server_Schedule_operation_method+0x81> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116b6c: 9c pushf 116b6d: fa cli 116b6e: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116b71: 8b 15 28 db 13 00 mov 0x13db28,%edx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116b77: 8b 4b 3c mov 0x3c(%ebx),%ecx initialized = false; } #endif return status; } 116b7a: 8b 43 30 mov 0x30(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 116b7d: 8d 7b 34 lea 0x34(%ebx),%edi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 116b80: 39 f8 cmp %edi,%eax 116b82: 74 19 je 116b9d <_Timer_server_Schedule_operation_method+0x58> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116b84: 89 d7 mov %edx,%edi 116b86: 29 cf sub %ecx,%edi 116b88: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116b8b: 8b 78 10 mov 0x10(%eax),%edi if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116b8e: 31 c9 xor %ecx,%ecx * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { 116b90: 3b 7d e4 cmp -0x1c(%ebp),%edi 116b93: 76 05 jbe 116b9a <_Timer_server_Schedule_operation_method+0x55> delta_interval -= delta; 116b95: 89 f9 mov %edi,%ecx 116b97: 2b 4d e4 sub -0x1c(%ebp),%ecx } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116b9a: 89 48 10 mov %ecx,0x10(%eax) } ts->Interval_watchdogs.last_snapshot = snapshot; 116b9d: 89 53 3c mov %edx,0x3c(%ebx) _ISR_Enable( level ); 116ba0: ff 75 e0 pushl -0x20(%ebp) 116ba3: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116ba4: 50 push %eax 116ba5: 50 push %eax 116ba6: 83 c6 10 add $0x10,%esi 116ba9: 56 push %esi 116baa: 8d 43 30 lea 0x30(%ebx),%eax 116bad: 50 push %eax 116bae: e8 2d 37 00 00 call 11a2e0 <_Watchdog_Insert> if ( !ts->active ) { 116bb3: 8a 43 7c mov 0x7c(%ebx),%al 116bb6: 83 c4 10 add $0x10,%esp 116bb9: 84 c0 test %al,%al 116bbb: 75 74 jne 116c31 <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_interval_system_watchdog( ts ); 116bbd: 89 d8 mov %ebx,%eax 116bbf: e8 74 fd ff ff call 116938 <_Timer_server_Reset_interval_system_watchdog> 116bc4: eb 6b jmp 116c31 <_Timer_server_Schedule_operation_method+0xec> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116bc6: 83 f8 03 cmp $0x3,%eax 116bc9: 75 66 jne 116c31 <_Timer_server_Schedule_operation_method+0xec> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 116bcb: 9c pushf 116bcc: fa cli 116bcd: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116bd0: 8b 15 a0 da 13 00 mov 0x13daa0,%edx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116bd6: 8b 43 74 mov 0x74(%ebx),%eax initialized = false; } #endif return status; } 116bd9: 8b 4b 68 mov 0x68(%ebx),%ecx 116bdc: 8d 7b 6c lea 0x6c(%ebx),%edi * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 116bdf: 39 f9 cmp %edi,%ecx 116be1: 74 27 je 116c0a <_Timer_server_Schedule_operation_method+0xc5> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 116be3: 8b 79 10 mov 0x10(%ecx),%edi 116be6: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 116be9: 39 c2 cmp %eax,%edx 116beb: 76 15 jbe 116c02 <_Timer_server_Schedule_operation_method+0xbd> /* * We advanced in time. */ delta = snapshot - last_snapshot; 116bed: 89 d7 mov %edx,%edi 116bef: 29 c7 sub %eax,%edi 116bf1: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116bf4: 31 c0 xor %eax,%eax if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 116bf6: 39 7d d4 cmp %edi,-0x2c(%ebp) 116bf9: 76 0c jbe 116c07 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN delta_interval -= delta; 116bfb: 8b 45 d4 mov -0x2c(%ebp),%eax 116bfe: 29 f8 sub %edi,%eax 116c00: eb 05 jmp 116c07 <_Timer_server_Schedule_operation_method+0xc2> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 116c02: 03 45 d4 add -0x2c(%ebp),%eax delta_interval += delta; 116c05: 29 d0 sub %edx,%eax } first_watchdog->delta_interval = delta_interval; 116c07: 89 41 10 mov %eax,0x10(%ecx) } ts->TOD_watchdogs.last_snapshot = snapshot; 116c0a: 89 53 74 mov %edx,0x74(%ebx) _ISR_Enable( level ); 116c0d: ff 75 e0 pushl -0x20(%ebp) 116c10: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116c11: 57 push %edi 116c12: 57 push %edi 116c13: 83 c6 10 add $0x10,%esi 116c16: 56 push %esi 116c17: 8d 43 68 lea 0x68(%ebx),%eax 116c1a: 50 push %eax 116c1b: e8 c0 36 00 00 call 11a2e0 <_Watchdog_Insert> if ( !ts->active ) { 116c20: 8a 43 7c mov 0x7c(%ebx),%al 116c23: 83 c4 10 add $0x10,%esp 116c26: 84 c0 test %al,%al 116c28: 75 07 jne 116c31 <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_tod_system_watchdog( ts ); 116c2a: 89 d8 mov %ebx,%eax 116c2c: e8 4d fd ff ff call 11697e <_Timer_server_Reset_tod_system_watchdog> * 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 ); } } 116c31: 8d 65 f4 lea -0xc(%ebp),%esp 116c34: 5b pop %ebx 116c35: 5e pop %esi 116c36: 5f pop %edi 116c37: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116c38: e9 85 28 00 00 jmp 1194c2 <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116c3d: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED 116c40: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED 116c43: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 116c46: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116c49: 5b pop %ebx <== NOT EXECUTED 116c4a: 5e pop %esi <== NOT EXECUTED 116c4b: 5f pop %edi <== NOT EXECUTED 116c4c: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 116c4d: e9 8a 06 00 00 jmp 1172dc <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010cbab <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cbab: 55 push %ebp 10cbac: 89 e5 mov %esp,%ebp 10cbae: 57 push %edi 10cbaf: 56 push %esi 10cbb0: 53 push %ebx 10cbb1: 83 ec 0c sub $0xc,%esp 10cbb4: 8b 7d 10 mov 0x10(%ebp),%edi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10cbb7: 8b 1d 94 47 12 00 mov 0x124794,%ebx the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10cbbd: 0f b6 75 0c movzbl 0xc(%ebp),%esi ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10cbc1: eb 15 jmp 10cbd8 <_User_extensions_Fatal+0x2d> !_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 ) 10cbc3: 8b 43 30 mov 0x30(%ebx),%eax 10cbc6: 85 c0 test %eax,%eax 10cbc8: 74 0b je 10cbd5 <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10cbca: 52 push %edx 10cbcb: 57 push %edi 10cbcc: 56 push %esi 10cbcd: ff 75 08 pushl 0x8(%ebp) 10cbd0: ff d0 call *%eax 10cbd2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10cbd5: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10cbd8: 81 fb 8c 47 12 00 cmp $0x12478c,%ebx 10cbde: 75 e3 jne 10cbc3 <_User_extensions_Fatal+0x18><== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10cbe0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cbe3: 5b pop %ebx <== NOT EXECUTED 10cbe4: 5e pop %esi <== NOT EXECUTED 10cbe5: 5f pop %edi <== NOT EXECUTED 10cbe6: c9 leave <== NOT EXECUTED 10cbe7: c3 ret <== NOT EXECUTED =============================================================================== 0010ca94 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10ca94: 55 push %ebp 10ca95: 89 e5 mov %esp,%ebp 10ca97: 57 push %edi 10ca98: 56 push %esi 10ca99: 53 push %ebx 10ca9a: 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; 10ca9d: a1 60 05 12 00 mov 0x120560,%eax 10caa2: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10caa5: 8b 35 64 05 12 00 mov 0x120564,%esi ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10caab: c7 05 8c 47 12 00 90 movl $0x124790,0x12478c 10cab2: 47 12 00 head->previous = NULL; 10cab5: c7 05 90 47 12 00 00 movl $0x0,0x124790 10cabc: 00 00 00 tail->previous = head; 10cabf: c7 05 94 47 12 00 8c movl $0x12478c,0x124794 10cac6: 47 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10cac9: c7 05 c4 45 12 00 c8 movl $0x1245c8,0x1245c4 10cad0: 45 12 00 head->previous = NULL; 10cad3: c7 05 c8 45 12 00 00 movl $0x0,0x1245c8 10cada: 00 00 00 tail->previous = head; 10cadd: c7 05 cc 45 12 00 c4 movl $0x1245c4,0x1245cc 10cae4: 45 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10cae7: 85 f6 test %esi,%esi 10cae9: 74 53 je 10cb3e <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10caeb: 6b c8 34 imul $0x34,%eax,%ecx 10caee: 83 ec 0c sub $0xc,%esp 10caf1: 51 push %ecx 10caf2: 89 4d e0 mov %ecx,-0x20(%ebp) 10caf5: e8 3d 04 00 00 call 10cf37 <_Workspace_Allocate_or_fatal_error> 10cafa: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10cafc: 31 c0 xor %eax,%eax 10cafe: 8b 4d e0 mov -0x20(%ebp),%ecx 10cb01: 89 df mov %ebx,%edi 10cb03: f3 aa rep stos %al,%es:(%edi) 10cb05: 89 f0 mov %esi,%eax extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10cb07: 83 c4 10 add $0x10,%esp 10cb0a: 31 d2 xor %edx,%edx 10cb0c: eb 2b jmp 10cb39 <_User_extensions_Handler_initialization+0xa5> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10cb0e: 8d 7b 14 lea 0x14(%ebx),%edi 10cb11: 89 c6 mov %eax,%esi 10cb13: b9 08 00 00 00 mov $0x8,%ecx 10cb18: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10cb1a: 83 ec 0c sub $0xc,%esp 10cb1d: 53 push %ebx 10cb1e: 89 45 dc mov %eax,-0x24(%ebp) 10cb21: 89 55 e0 mov %edx,-0x20(%ebp) 10cb24: e8 f3 24 00 00 call 10f01c <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10cb29: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10cb2c: 8b 55 e0 mov -0x20(%ebp),%edx 10cb2f: 42 inc %edx 10cb30: 8b 45 dc mov -0x24(%ebp),%eax 10cb33: 83 c0 20 add $0x20,%eax 10cb36: 83 c4 10 add $0x10,%esp 10cb39: 3b 55 e4 cmp -0x1c(%ebp),%edx 10cb3c: 72 d0 jb 10cb0e <_User_extensions_Handler_initialization+0x7a> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10cb3e: 8d 65 f4 lea -0xc(%ebp),%esp 10cb41: 5b pop %ebx 10cb42: 5e pop %esi 10cb43: 5f pop %edi 10cb44: c9 leave 10cb45: c3 ret =============================================================================== 0010cb79 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10cb79: 55 push %ebp 10cb7a: 89 e5 mov %esp,%ebp 10cb7c: 56 push %esi 10cb7d: 53 push %ebx 10cb7e: 8b 75 08 mov 0x8(%ebp),%esi the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10cb81: 8b 1d 94 47 12 00 mov 0x124794,%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10cb87: eb 13 jmp 10cb9c <_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 ) 10cb89: 8b 43 2c mov 0x2c(%ebx),%eax 10cb8c: 85 c0 test %eax,%eax 10cb8e: 74 09 je 10cb99 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10cb90: 83 ec 0c sub $0xc,%esp 10cb93: 56 push %esi 10cb94: ff d0 call *%eax 10cb96: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10cb99: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10cb9c: 81 fb 8c 47 12 00 cmp $0x12478c,%ebx 10cba2: 75 e5 jne 10cb89 <_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 ); } } 10cba4: 8d 65 f8 lea -0x8(%ebp),%esp 10cba7: 5b pop %ebx 10cba8: 5e pop %esi 10cba9: c9 leave 10cbaa: c3 ret =============================================================================== 0010e3f0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e3f0: 55 push %ebp 10e3f1: 89 e5 mov %esp,%ebp 10e3f3: 57 push %edi 10e3f4: 56 push %esi 10e3f5: 53 push %ebx 10e3f6: 83 ec 1c sub $0x1c,%esp 10e3f9: 8b 75 08 mov 0x8(%ebp),%esi 10e3fc: 8b 7d 0c mov 0xc(%ebp),%edi 10e3ff: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e402: 9c pushf 10e403: fa cli 10e404: 58 pop %eax } } _ISR_Enable( level ); } 10e405: 8b 16 mov (%esi),%edx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10e407: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e40a: 39 ca cmp %ecx,%edx 10e40c: 74 44 je 10e452 <_Watchdog_Adjust+0x62> switch ( direction ) { 10e40e: 85 ff test %edi,%edi 10e410: 74 3c je 10e44e <_Watchdog_Adjust+0x5e> 10e412: 4f dec %edi 10e413: 75 3d jne 10e452 <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e415: 01 5a 10 add %ebx,0x10(%edx) break; 10e418: eb 38 jmp 10e452 <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10e41a: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e41c: 8b 7a 10 mov 0x10(%edx),%edi 10e41f: 39 fb cmp %edi,%ebx 10e421: 73 07 jae 10e42a <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e423: 29 df sub %ebx,%edi 10e425: 89 7a 10 mov %edi,0x10(%edx) break; 10e428: eb 28 jmp 10e452 <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e42a: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e431: 50 push %eax 10e432: 9d popf _Watchdog_Tickle( header ); 10e433: 83 ec 0c sub $0xc,%esp 10e436: 56 push %esi 10e437: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e43a: e8 a5 01 00 00 call 10e5e4 <_Watchdog_Tickle> _ISR_Disable( level ); 10e43f: 9c pushf 10e440: fa cli 10e441: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e442: 83 c4 10 add $0x10,%esp 10e445: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e448: 39 0e cmp %ecx,(%esi) 10e44a: 74 06 je 10e452 <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e44c: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e44e: 85 db test %ebx,%ebx 10e450: 75 c8 jne 10e41a <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e452: 50 push %eax 10e453: 9d popf } 10e454: 8d 65 f4 lea -0xc(%ebp),%esp 10e457: 5b pop %ebx 10e458: 5e pop %esi 10e459: 5f pop %edi 10e45a: c9 leave 10e45b: c3 ret =============================================================================== 0010cdec <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cdec: 55 push %ebp 10cded: 89 e5 mov %esp,%ebp 10cdef: 56 push %esi 10cdf0: 53 push %ebx 10cdf1: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10cdf4: 9c pushf 10cdf5: fa cli 10cdf6: 5e pop %esi previous_state = the_watchdog->state; 10cdf7: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10cdfa: 83 f8 01 cmp $0x1,%eax 10cdfd: 74 09 je 10ce08 <_Watchdog_Remove+0x1c> 10cdff: 72 42 jb 10ce43 <_Watchdog_Remove+0x57> 10ce01: 83 f8 03 cmp $0x3,%eax 10ce04: 77 3d ja 10ce43 <_Watchdog_Remove+0x57> <== NEVER TAKEN 10ce06: eb 09 jmp 10ce11 <_Watchdog_Remove+0x25> /* * 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; 10ce08: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ce0f: eb 32 jmp 10ce43 <_Watchdog_Remove+0x57> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ce11: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 10ce18: 8b 0a mov (%edx),%ecx case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ce1a: 83 39 00 cmpl $0x0,(%ecx) 10ce1d: 74 06 je 10ce25 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ce1f: 8b 5a 10 mov 0x10(%edx),%ebx 10ce22: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10ce25: 8b 1d d0 46 12 00 mov 0x1246d0,%ebx 10ce2b: 85 db test %ebx,%ebx 10ce2d: 74 0c je 10ce3b <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10ce2f: 8b 1d d8 47 12 00 mov 0x1247d8,%ebx 10ce35: 89 1d 68 46 12 00 mov %ebx,0x124668 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ce3b: 8b 5a 04 mov 0x4(%edx),%ebx next->previous = previous; 10ce3e: 89 59 04 mov %ebx,0x4(%ecx) previous->next = next; 10ce41: 89 0b mov %ecx,(%ebx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ce43: 8b 0d d4 46 12 00 mov 0x1246d4,%ecx 10ce49: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10ce4c: 56 push %esi 10ce4d: 9d popf return( previous_state ); } 10ce4e: 5b pop %ebx 10ce4f: 5e pop %esi 10ce50: c9 leave 10ce51: c3 ret =============================================================================== 0010df78 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10df78: 55 push %ebp 10df79: 89 e5 mov %esp,%ebp 10df7b: 57 push %edi 10df7c: 56 push %esi 10df7d: 53 push %ebx 10df7e: 83 ec 20 sub $0x20,%esp 10df81: 8b 7d 08 mov 0x8(%ebp),%edi 10df84: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10df87: 9c pushf 10df88: fa cli 10df89: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10df8c: 56 push %esi 10df8d: 57 push %edi 10df8e: 68 98 05 12 00 push $0x120598 10df93: e8 94 ab ff ff call 108b2c printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10df98: 8b 1e mov (%esi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10df9a: 83 c6 04 add $0x4,%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { 10df9d: 83 c4 10 add $0x10,%esp 10dfa0: 39 f3 cmp %esi,%ebx 10dfa2: 74 1d je 10dfc1 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10dfa4: 52 push %edx 10dfa5: 52 push %edx 10dfa6: 53 push %ebx 10dfa7: 6a 00 push $0x0 10dfa9: e8 32 00 00 00 call 10dfe0 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 10dfae: 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 = _Chain_First( header ) ; 10dfb0: 83 c4 10 add $0x10,%esp 10dfb3: 39 f3 cmp %esi,%ebx 10dfb5: 75 ed jne 10dfa4 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10dfb7: 50 push %eax 10dfb8: 50 push %eax 10dfb9: 57 push %edi 10dfba: 68 af 05 12 00 push $0x1205af 10dfbf: eb 08 jmp 10dfc9 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10dfc1: 83 ec 0c sub $0xc,%esp 10dfc4: 68 be 05 12 00 push $0x1205be 10dfc9: e8 5e ab ff ff call 108b2c 10dfce: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10dfd1: ff 75 e4 pushl -0x1c(%ebp) 10dfd4: 9d popf } 10dfd5: 8d 65 f4 lea -0xc(%ebp),%esp 10dfd8: 5b pop %ebx 10dfd9: 5e pop %esi 10dfda: 5f pop %edi 10dfdb: c9 leave 10dfdc: c3 ret =============================================================================== 0010ce54 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ce54: 55 push %ebp 10ce55: 89 e5 mov %esp,%ebp 10ce57: 57 push %edi 10ce58: 56 push %esi 10ce59: 53 push %ebx 10ce5a: 83 ec 1c sub $0x1c,%esp 10ce5d: 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 ); 10ce60: 9c pushf 10ce61: fa cli 10ce62: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10ce63: 8b 1f mov (%edi),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ce65: 8d 47 04 lea 0x4(%edi),%eax 10ce68: 89 45 e4 mov %eax,-0x1c(%ebp) * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 10ce6b: 39 c3 cmp %eax,%ebx 10ce6d: 74 40 je 10ceaf <_Watchdog_Tickle+0x5b> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10ce6f: 8b 43 10 mov 0x10(%ebx),%eax 10ce72: 85 c0 test %eax,%eax 10ce74: 74 08 je 10ce7e <_Watchdog_Tickle+0x2a> the_watchdog->delta_interval--; 10ce76: 48 dec %eax 10ce77: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10ce7a: 85 c0 test %eax,%eax 10ce7c: 75 31 jne 10ceaf <_Watchdog_Tickle+0x5b> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10ce7e: 83 ec 0c sub $0xc,%esp 10ce81: 53 push %ebx 10ce82: e8 65 ff ff ff call 10cdec <_Watchdog_Remove> _ISR_Enable( level ); 10ce87: 56 push %esi 10ce88: 9d popf switch( watchdog_state ) { 10ce89: 83 c4 10 add $0x10,%esp 10ce8c: 83 f8 02 cmp $0x2,%eax 10ce8f: 75 0e jne 10ce9f <_Watchdog_Tickle+0x4b> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10ce91: 50 push %eax 10ce92: 50 push %eax 10ce93: ff 73 24 pushl 0x24(%ebx) 10ce96: ff 73 20 pushl 0x20(%ebx) 10ce99: ff 53 1c call *0x1c(%ebx) the_watchdog->id, the_watchdog->user_data ); break; 10ce9c: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10ce9f: 9c pushf 10cea0: fa cli 10cea1: 5e pop %esi } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 10cea2: 8b 1f mov (%edi),%ebx _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10cea4: 3b 5d e4 cmp -0x1c(%ebp),%ebx 10cea7: 74 06 je 10ceaf <_Watchdog_Tickle+0x5b> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 10cea9: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cead: eb cd jmp 10ce7c <_Watchdog_Tickle+0x28> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10ceaf: 56 push %esi 10ceb0: 9d popf } 10ceb1: 8d 65 f4 lea -0xc(%ebp),%esp 10ceb4: 5b pop %ebx 10ceb5: 5e pop %esi 10ceb6: 5f pop %edi 10ceb7: c9 leave 10ceb8: c3 ret =============================================================================== 0010acc8 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10acc8: 55 push %ebp 10acc9: 89 e5 mov %esp,%ebp 10accb: 57 push %edi 10accc: 56 push %esi 10accd: 53 push %ebx 10acce: 83 ec 1c sub $0x1c,%esp 10acd1: 8b 7d 0c mov 0xc(%ebp),%edi while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 10acd4: 8d 75 e4 lea -0x1c(%ebp),%esi 10acd7: eb 13 jmp 10acec 10acd9: 56 push %esi 10acda: ff 75 10 pushl 0x10(%ebp) 10acdd: 6a 00 push $0x0 10acdf: 57 push %edi 10ace0: e8 0f f5 ff ff call 10a1f4 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10ace5: 83 c4 10 add $0x10,%esp 10ace8: 85 c0 test %eax,%eax 10acea: 75 16 jne 10ad02 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10acec: 83 ec 0c sub $0xc,%esp 10acef: ff 75 08 pushl 0x8(%ebp) 10acf2: e8 59 04 00 00 call 10b150 <_Chain_Get> 10acf7: 89 c3 mov %eax,%ebx sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10acf9: 83 c4 10 add $0x10,%esp 10acfc: 85 c0 test %eax,%eax 10acfe: 74 d9 je 10acd9 10ad00: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10ad02: 8b 55 14 mov 0x14(%ebp),%edx 10ad05: 89 1a mov %ebx,(%edx) return sc; } 10ad07: 8d 65 f4 lea -0xc(%ebp),%esp 10ad0a: 5b pop %ebx 10ad0b: 5e pop %esi 10ad0c: 5f pop %edi 10ad0d: c9 leave 10ad0e: c3 ret =============================================================================== 0010c710 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c710: 55 push %ebp 10c711: 89 e5 mov %esp,%ebp 10c713: 57 push %edi 10c714: 56 push %esi 10c715: 53 push %ebx 10c716: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c719: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c71d: 74 41 je 10c760 <== NEVER TAKEN 10c71f: bb 01 00 00 00 mov $0x1,%ebx return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 10c724: 8b 04 9d 3c 7b 12 00 mov 0x127b3c(,%ebx,4),%eax 10c72b: 85 c0 test %eax,%eax 10c72d: 74 2b je 10c75a continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10c72f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c732: be 01 00 00 00 mov $0x1,%esi 10c737: 85 ff test %edi,%edi 10c739: 75 17 jne 10c752 10c73b: eb 1d jmp 10c75a continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c73d: 8b 47 1c mov 0x1c(%edi),%eax 10c740: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c743: 85 c0 test %eax,%eax 10c745: 74 0a je 10c751 <== NEVER TAKEN continue; (*routine)(the_thread); 10c747: 83 ec 0c sub $0xc,%esp 10c74a: 50 push %eax 10c74b: ff 55 08 call *0x8(%ebp) 10c74e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c751: 46 inc %esi 10c752: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c756: 39 c6 cmp %eax,%esi 10c758: 76 e3 jbe 10c73d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c75a: 43 inc %ebx 10c75b: 83 fb 04 cmp $0x4,%ebx 10c75e: 75 c4 jne 10c724 (*routine)(the_thread); } } } 10c760: 8d 65 f4 lea -0xc(%ebp),%esp 10c763: 5b pop %ebx 10c764: 5e pop %esi 10c765: 5f pop %edi 10c766: c9 leave 10c767: c3 ret =============================================================================== 00114840 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 114840: 55 push %ebp 114841: 89 e5 mov %esp,%ebp 114843: 57 push %edi 114844: 56 push %esi 114845: 53 push %ebx 114846: 83 ec 1c sub $0x1c,%esp 114849: 8b 75 0c mov 0xc(%ebp),%esi 11484c: 8b 55 10 mov 0x10(%ebp),%edx 11484f: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 114852: b8 03 00 00 00 mov $0x3,%eax rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114857: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 11485b: 0f 84 ce 00 00 00 je 11492f return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 114861: b0 09 mov $0x9,%al register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 114863: 85 f6 test %esi,%esi 114865: 0f 84 c4 00 00 00 je 11492f return RTEMS_INVALID_ADDRESS; if ( !id ) 11486b: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11486f: 0f 84 ba 00 00 00 je 11492f <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114875: 85 ff test %edi,%edi 114877: 0f 84 ad 00 00 00 je 11492a 11487d: 85 d2 test %edx,%edx 11487f: 0f 84 a5 00 00 00 je 11492a !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 114885: b0 08 mov $0x8,%al return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114887: 39 fa cmp %edi,%edx 114889: 0f 82 a0 00 00 00 jb 11492f 11488f: f7 c7 03 00 00 00 test $0x3,%edi 114895: 0f 85 94 00 00 00 jne 11492f !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 11489b: b0 09 mov $0x9,%al if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 11489d: f7 c6 03 00 00 00 test $0x3,%esi 1148a3: 0f 85 86 00 00 00 jne 11492f 1148a9: a1 14 da 13 00 mov 0x13da14,%eax 1148ae: 40 inc %eax 1148af: a3 14 da 13 00 mov %eax,0x13da14 * 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 ); 1148b4: 83 ec 0c sub $0xc,%esp 1148b7: 68 a4 d8 13 00 push $0x13d8a4 1148bc: 89 55 e4 mov %edx,-0x1c(%ebp) 1148bf: e8 18 3d 00 00 call 1185dc <_Objects_Allocate> 1148c4: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 1148c6: 83 c4 10 add $0x10,%esp 1148c9: 85 c0 test %eax,%eax 1148cb: 8b 55 e4 mov -0x1c(%ebp),%edx 1148ce: 75 0c jne 1148dc _Thread_Enable_dispatch(); 1148d0: e8 ed 4b 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 1148d5: b8 05 00 00 00 mov $0x5,%eax 1148da: eb 53 jmp 11492f _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 1148dc: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 1148df: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 1148e2: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 1148e5: 8b 45 18 mov 0x18(%ebp),%eax 1148e8: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 1148eb: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 1148f2: 57 push %edi 1148f3: 89 d0 mov %edx,%eax 1148f5: 31 d2 xor %edx,%edx 1148f7: f7 f7 div %edi 1148f9: 50 push %eax 1148fa: 56 push %esi 1148fb: 8d 43 24 lea 0x24(%ebx),%eax 1148fe: 50 push %eax 1148ff: e8 38 2a 00 00 call 11733c <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 114904: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 114907: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11490a: 8b 15 c0 d8 13 00 mov 0x13d8c0,%edx 114910: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 114913: 8b 55 08 mov 0x8(%ebp),%edx 114916: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 114919: 8b 55 1c mov 0x1c(%ebp),%edx 11491c: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 11491e: e8 9f 4b 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 114923: 83 c4 10 add $0x10,%esp 114926: 31 c0 xor %eax,%eax 114928: eb 05 jmp 11492f if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 11492a: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11492f: 8d 65 f4 lea -0xc(%ebp),%esp 114932: 5b pop %ebx 114933: 5e pop %esi 114934: 5f pop %edi 114935: c9 leave 114936: c3 ret =============================================================================== 00113fb8 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 113fb8: 55 push %ebp 113fb9: 89 e5 mov %esp,%ebp 113fbb: 57 push %edi 113fbc: 56 push %esi 113fbd: 53 push %ebx 113fbe: 83 ec 0c sub $0xc,%esp 113fc1: 8b 75 08 mov 0x8(%ebp),%esi 113fc4: 8b 7d 10 mov 0x10(%ebp),%edi 113fc7: 8b 5d 18 mov 0x18(%ebp),%ebx register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 113fca: b8 03 00 00 00 mov $0x3,%eax rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 113fcf: 85 f6 test %esi,%esi 113fd1: 74 66 je 114039 <== NEVER TAKEN return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 113fd3: b0 09 mov $0x9,%al register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 113fd5: 85 db test %ebx,%ebx 113fd7: 74 60 je 114039 <== NEVER TAKEN * id - port id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_port_create( 113fd9: 8b 55 0c mov 0xc(%ebp),%edx 113fdc: 09 fa or %edi,%edx return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 113fde: 80 e2 03 and $0x3,%dl 113fe1: 75 56 jne 114039 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 113fe3: a1 14 da 13 00 mov 0x13da14,%eax 113fe8: 40 inc %eax 113fe9: a3 14 da 13 00 mov %eax,0x13da14 */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) _Objects_Allocate( &_Dual_ported_memory_Information ); 113fee: 83 ec 0c sub $0xc,%esp 113ff1: 68 64 d8 13 00 push $0x13d864 113ff6: e8 e1 45 00 00 call 1185dc <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 113ffb: 83 c4 10 add $0x10,%esp 113ffe: 85 c0 test %eax,%eax 114000: 75 0c jne 11400e _Thread_Enable_dispatch(); 114002: e8 bb 54 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 114007: b8 05 00 00 00 mov $0x5,%eax 11400c: eb 2b jmp 114039 } the_port->internal_base = internal_start; 11400e: 8b 55 0c mov 0xc(%ebp),%edx 114011: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 114014: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 114017: 8b 55 14 mov 0x14(%ebp),%edx 11401a: 4a dec %edx 11401b: 89 50 18 mov %edx,0x18(%eax) Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 11401e: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 114021: 0f b7 fa movzwl %dx,%edi #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 114024: 8b 0d 80 d8 13 00 mov 0x13d880,%ecx 11402a: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11402d: 89 70 0c mov %esi,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 114030: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 114032: e8 8b 54 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 114037: 31 c0 xor %eax,%eax } 114039: 8d 65 f4 lea -0xc(%ebp),%esp 11403c: 5b pop %ebx 11403d: 5e pop %esi 11403e: 5f pop %edi 11403f: c9 leave 114040: c3 ret =============================================================================== 0010b085 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b085: 55 push %ebp 10b086: 89 e5 mov %esp,%ebp 10b088: 57 push %edi 10b089: 56 push %esi 10b08a: 53 push %ebx 10b08b: 83 ec 30 sub $0x30,%esp 10b08e: 8b 75 08 mov 0x8(%ebp),%esi 10b091: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); 10b094: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10b097: 50 push %eax 10b098: 56 push %esi 10b099: 68 f4 62 12 00 push $0x1262f4 10b09e: e8 61 1d 00 00 call 10ce04 <_Objects_Get> 10b0a3: 89 c7 mov %eax,%edi switch ( location ) { 10b0a5: 83 c4 10 add $0x10,%esp 10b0a8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b0ac: 0f 85 3b 01 00 00 jne 10b1ed <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b0b2: a1 00 66 12 00 mov 0x126600,%eax 10b0b7: 39 47 40 cmp %eax,0x40(%edi) 10b0ba: 74 0f je 10b0cb _Thread_Enable_dispatch(); 10b0bc: e8 c1 27 00 00 call 10d882 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10b0c1: be 17 00 00 00 mov $0x17,%esi 10b0c6: e9 27 01 00 00 jmp 10b1f2 } if ( length == RTEMS_PERIOD_STATUS ) { 10b0cb: 85 db test %ebx,%ebx 10b0cd: 75 1b jne 10b0ea switch ( the_period->state ) { 10b0cf: 8b 47 38 mov 0x38(%edi),%eax 10b0d2: 31 f6 xor %esi,%esi 10b0d4: 83 f8 04 cmp $0x4,%eax 10b0d7: 77 07 ja 10b0e0 <== NEVER TAKEN 10b0d9: 8b 34 85 6c 03 12 00 mov 0x12036c(,%eax,4),%esi case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b0e0: e8 9d 27 00 00 call 10d882 <_Thread_Enable_dispatch> return( return_value ); 10b0e5: e9 08 01 00 00 jmp 10b1f2 } _ISR_Disable( level ); 10b0ea: 9c pushf 10b0eb: fa cli 10b0ec: 8f 45 d4 popl -0x2c(%ebp) if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10b0ef: 8b 47 38 mov 0x38(%edi),%eax 10b0f2: 85 c0 test %eax,%eax 10b0f4: 75 4c jne 10b142 _ISR_Enable( level ); 10b0f6: ff 75 d4 pushl -0x2c(%ebp) 10b0f9: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b0fa: 83 ec 0c sub $0xc,%esp 10b0fd: 57 push %edi 10b0fe: e8 3f fe ff ff call 10af42 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b103: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b10a: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b111: c7 47 2c fc b3 10 00 movl $0x10b3fc,0x2c(%edi) the_watchdog->id = id; 10b118: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b11b: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b122: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b125: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b128: 58 pop %eax 10b129: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b12a: 83 c7 10 add $0x10,%edi 10b12d: 57 push %edi 10b12e: 68 a8 64 12 00 push $0x1264a8 10b133: e8 fc 33 00 00 call 10e534 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b138: e8 45 27 00 00 call 10d882 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b13d: 83 c4 10 add $0x10,%esp 10b140: eb 65 jmp 10b1a7 } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10b142: 83 f8 02 cmp $0x2,%eax 10b145: 75 64 jne 10b1ab /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b147: 83 ec 0c sub $0xc,%esp 10b14a: 57 push %edi 10b14b: e8 5a fe ff ff call 10afaa <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 10b150: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b157: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b15a: ff 75 d4 pushl -0x2c(%ebp) 10b15d: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b15e: a1 00 66 12 00 mov 0x126600,%eax 10b163: 8b 57 08 mov 0x8(%edi),%edx 10b166: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b169: 5b pop %ebx 10b16a: 5e pop %esi 10b16b: 68 00 40 00 00 push $0x4000 10b170: 50 push %eax 10b171: e8 56 2e 00 00 call 10dfcc <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b176: 9c pushf 10b177: fa cli 10b178: 5a pop %edx local_state = the_period->state; 10b179: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b17c: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b183: 52 push %edx 10b184: 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 ) 10b185: 83 c4 10 add $0x10,%esp 10b188: 83 f8 03 cmp $0x3,%eax 10b18b: 75 15 jne 10b1a2 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b18d: 51 push %ecx 10b18e: 51 push %ecx 10b18f: 68 00 40 00 00 push $0x4000 10b194: ff 35 00 66 12 00 pushl 0x126600 10b19a: e8 cd 23 00 00 call 10d56c <_Thread_Clear_state> 10b19f: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b1a2: e8 db 26 00 00 call 10d882 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b1a7: 31 f6 xor %esi,%esi 10b1a9: eb 47 jmp 10b1f2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1ab: be 04 00 00 00 mov $0x4,%esi _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10b1b0: 83 f8 04 cmp $0x4,%eax 10b1b3: 75 3d jne 10b1f2 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b1b5: 83 ec 0c sub $0xc,%esp 10b1b8: 57 push %edi 10b1b9: e8 ec fd ff ff call 10afaa <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b1be: ff 75 d4 pushl -0x2c(%ebp) 10b1c1: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b1c2: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b1c9: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b1cc: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b1cf: 58 pop %eax 10b1d0: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b1d1: 83 c7 10 add $0x10,%edi 10b1d4: 57 push %edi 10b1d5: 68 a8 64 12 00 push $0x1264a8 10b1da: e8 55 33 00 00 call 10e534 <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b1df: e8 9e 26 00 00 call 10d882 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10b1e4: 83 c4 10 add $0x10,%esp 10b1e7: 66 be 06 00 mov $0x6,%si 10b1eb: eb 05 jmp 10b1f2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b1ed: be 04 00 00 00 mov $0x4,%esi } 10b1f2: 89 f0 mov %esi,%eax 10b1f4: 8d 65 f4 lea -0xc(%ebp),%esp 10b1f7: 5b pop %ebx 10b1f8: 5e pop %esi 10b1f9: 5f pop %edi 10b1fa: c9 leave 10b1fb: c3 ret =============================================================================== 0010b1fc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b1fc: 55 push %ebp 10b1fd: 89 e5 mov %esp,%ebp 10b1ff: 57 push %edi 10b200: 56 push %esi 10b201: 53 push %ebx 10b202: 83 ec 7c sub $0x7c,%esp 10b205: 8b 5d 08 mov 0x8(%ebp),%ebx 10b208: 8b 7d 0c mov 0xc(%ebp),%edi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10b20b: 85 ff test %edi,%edi 10b20d: 0f 84 2b 01 00 00 je 10b33e <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b213: 52 push %edx 10b214: 52 push %edx 10b215: 68 80 03 12 00 push $0x120380 10b21a: 53 push %ebx 10b21b: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b21d: 5e pop %esi 10b21e: 58 pop %eax 10b21f: 68 9e 03 12 00 push $0x12039e 10b224: 53 push %ebx 10b225: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b227: 5a pop %edx 10b228: 59 pop %ecx 10b229: 68 c0 03 12 00 push $0x1203c0 10b22e: 53 push %ebx 10b22f: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b231: 5e pop %esi 10b232: 58 pop %eax 10b233: 68 e3 03 12 00 push $0x1203e3 10b238: 53 push %ebx 10b239: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b23b: 5a pop %edx 10b23c: 59 pop %ecx 10b23d: 68 2e 04 12 00 push $0x12042e 10b242: 53 push %ebx 10b243: ff d7 call *%edi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b245: 8b 35 fc 62 12 00 mov 0x1262fc,%esi 10b24b: 83 c4 10 add $0x10,%esp 10b24e: e9 df 00 00 00 jmp 10b332 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b253: 50 push %eax 10b254: 50 push %eax 10b255: 8d 45 88 lea -0x78(%ebp),%eax 10b258: 50 push %eax 10b259: 56 push %esi 10b25a: e8 c9 4b 00 00 call 10fe28 if ( status != RTEMS_SUCCESSFUL ) 10b25f: 83 c4 10 add $0x10,%esp 10b262: 85 c0 test %eax,%eax 10b264: 0f 85 c7 00 00 00 jne 10b331 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 10b26a: 51 push %ecx 10b26b: 51 push %ecx 10b26c: 8d 55 c0 lea -0x40(%ebp),%edx 10b26f: 52 push %edx 10b270: 56 push %esi 10b271: e8 56 4c 00 00 call 10fecc #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b276: 83 c4 0c add $0xc,%esp 10b279: 8d 45 e3 lea -0x1d(%ebp),%eax 10b27c: 50 push %eax 10b27d: 6a 05 push $0x5 10b27f: ff 75 c0 pushl -0x40(%ebp) 10b282: e8 01 02 00 00 call 10b488 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b287: 58 pop %eax 10b288: 5a pop %edx 10b289: ff 75 8c pushl -0x74(%ebp) 10b28c: ff 75 88 pushl -0x78(%ebp) 10b28f: 8d 55 e3 lea -0x1d(%ebp),%edx 10b292: 52 push %edx 10b293: 56 push %esi 10b294: 68 7a 04 12 00 push $0x12047a 10b299: 53 push %ebx 10b29a: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b29c: 8b 45 88 mov -0x78(%ebp),%eax 10b29f: 83 c4 20 add $0x20,%esp 10b2a2: 85 c0 test %eax,%eax 10b2a4: 75 0f jne 10b2b5 (*print)( context, "\n" ); 10b2a6: 51 push %ecx 10b2a7: 51 push %ecx 10b2a8: 68 e0 06 12 00 push $0x1206e0 10b2ad: 53 push %ebx 10b2ae: ff d7 call *%edi continue; 10b2b0: 83 c4 10 add $0x10,%esp 10b2b3: eb 7c jmp 10b331 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 ); 10b2b5: 52 push %edx 10b2b6: 8d 55 d8 lea -0x28(%ebp),%edx 10b2b9: 52 push %edx 10b2ba: 50 push %eax 10b2bb: 8d 45 a0 lea -0x60(%ebp),%eax 10b2be: 50 push %eax 10b2bf: e8 44 2f 00 00 call 10e208 <_Timespec_Divide_by_integer> (*print)( context, 10b2c4: 8b 45 dc mov -0x24(%ebp),%eax 10b2c7: b9 e8 03 00 00 mov $0x3e8,%ecx 10b2cc: 99 cltd 10b2cd: f7 f9 idiv %ecx 10b2cf: 50 push %eax 10b2d0: ff 75 d8 pushl -0x28(%ebp) 10b2d3: 8b 45 9c mov -0x64(%ebp),%eax 10b2d6: 99 cltd 10b2d7: f7 f9 idiv %ecx 10b2d9: 50 push %eax 10b2da: ff 75 98 pushl -0x68(%ebp) 10b2dd: 8b 45 94 mov -0x6c(%ebp),%eax 10b2e0: 99 cltd 10b2e1: f7 f9 idiv %ecx 10b2e3: 50 push %eax 10b2e4: ff 75 90 pushl -0x70(%ebp) 10b2e7: 68 91 04 12 00 push $0x120491 10b2ec: 53 push %ebx 10b2ed: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b2f0: ff d7 call *%edi struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b2f2: 83 c4 2c add $0x2c,%esp 10b2f5: 8d 55 d8 lea -0x28(%ebp),%edx 10b2f8: 52 push %edx 10b2f9: ff 75 88 pushl -0x78(%ebp) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; 10b2fc: 8d 45 b8 lea -0x48(%ebp),%eax _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b2ff: 50 push %eax 10b300: e8 03 2f 00 00 call 10e208 <_Timespec_Divide_by_integer> (*print)( context, 10b305: 8b 45 dc mov -0x24(%ebp),%eax 10b308: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b30b: 99 cltd 10b30c: f7 f9 idiv %ecx 10b30e: 50 push %eax 10b30f: ff 75 d8 pushl -0x28(%ebp) 10b312: 8b 45 b4 mov -0x4c(%ebp),%eax 10b315: 99 cltd 10b316: f7 f9 idiv %ecx 10b318: 50 push %eax 10b319: ff 75 b0 pushl -0x50(%ebp) 10b31c: 8b 45 ac mov -0x54(%ebp),%eax 10b31f: 99 cltd 10b320: f7 f9 idiv %ecx 10b322: 50 push %eax 10b323: ff 75 a8 pushl -0x58(%ebp) 10b326: 68 b0 04 12 00 push $0x1204b0 10b32b: 53 push %ebx 10b32c: ff d7 call *%edi 10b32e: 83 c4 30 add $0x30,%esp * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 10b331: 46 inc %esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10b332: 3b 35 00 63 12 00 cmp 0x126300,%esi 10b338: 0f 86 15 ff ff ff jbe 10b253 the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b33e: 8d 65 f4 lea -0xc(%ebp),%esp 10b341: 5b pop %ebx 10b342: 5e pop %esi 10b343: 5f pop %edi 10b344: c9 leave 10b345: c3 ret =============================================================================== 00115ba0 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 115ba0: 55 push %ebp 115ba1: 89 e5 mov %esp,%ebp 115ba3: 53 push %ebx 115ba4: 83 ec 14 sub $0x14,%esp 115ba7: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 115baa: b8 0a 00 00 00 mov $0xa,%eax register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 115baf: 85 db test %ebx,%ebx 115bb1: 74 6d je 115c20 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 115bb3: 50 push %eax 115bb4: 50 push %eax 115bb5: 8d 45 f4 lea -0xc(%ebp),%eax 115bb8: 50 push %eax 115bb9: ff 75 08 pushl 0x8(%ebp) 115bbc: e8 23 39 00 00 call 1194e4 <_Thread_Get> switch ( location ) { 115bc1: 83 c4 10 add $0x10,%esp 115bc4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115bc8: 75 51 jne 115c1b case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115bca: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 115bd0: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115bd4: 74 39 je 115c0f if ( asr->is_enabled ) { 115bd6: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115bda: 74 22 je 115bfe rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115bdc: 9c pushf 115bdd: fa cli 115bde: 59 pop %ecx *signal_set |= signals; 115bdf: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115be2: 51 push %ecx 115be3: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115be4: 83 3d 34 dc 13 00 00 cmpl $0x0,0x13dc34 115beb: 74 19 je 115c06 115bed: 3b 05 38 dc 13 00 cmp 0x13dc38,%eax 115bf3: 75 11 jne 115c06 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 115bf5: c6 05 44 dc 13 00 01 movb $0x1,0x13dc44 115bfc: eb 08 jmp 115c06 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115bfe: 9c pushf 115bff: fa cli 115c00: 58 pop %eax *signal_set |= signals; 115c01: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115c04: 50 push %eax 115c05: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115c06: e8 b7 38 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115c0b: 31 c0 xor %eax,%eax 115c0d: eb 11 jmp 115c20 } _Thread_Enable_dispatch(); 115c0f: e8 ae 38 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 115c14: b8 0b 00 00 00 mov $0xb,%eax 115c19: eb 05 jmp 115c20 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115c1b: b8 04 00 00 00 mov $0x4,%eax } 115c20: 8b 5d fc mov -0x4(%ebp),%ebx 115c23: c9 leave 115c24: c3 ret =============================================================================== 0010febc : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 10febc: 55 push %ebp 10febd: 89 e5 mov %esp,%ebp 10febf: 57 push %edi 10fec0: 56 push %esi 10fec1: 53 push %ebx 10fec2: 83 ec 1c sub $0x1c,%esp 10fec5: 8b 4d 10 mov 0x10(%ebp),%ecx bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 10fec8: b8 09 00 00 00 mov $0x9,%eax ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 10fecd: 85 c9 test %ecx,%ecx 10fecf: 0f 84 fb 00 00 00 je 10ffd0 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 10fed5: 8b 35 dc 47 12 00 mov 0x1247dc,%esi api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10fedb: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 10fee1: 80 7e 74 01 cmpb $0x1,0x74(%esi) 10fee5: 19 ff sbb %edi,%edi 10fee7: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 10feed: 83 7e 7c 00 cmpl $0x0,0x7c(%esi) 10fef1: 74 06 je 10fef9 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 10fef3: 81 cf 00 02 00 00 or $0x200,%edi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 10fef9: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 10fefd: 19 d2 sbb %edx,%edx 10feff: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 10ff05: 89 55 e4 mov %edx,-0x1c(%ebp) 10ff08: 89 4d e0 mov %ecx,-0x20(%ebp) 10ff0b: e8 c5 d3 ff ff call 10d2d5 <_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; 10ff10: 8b 55 e4 mov -0x1c(%ebp),%edx 10ff13: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 10ff15: 09 f8 or %edi,%eax 10ff17: 8b 4d e0 mov -0x20(%ebp),%ecx 10ff1a: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 10ff1c: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 10ff23: 74 0b je 10ff30 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 10ff25: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 10ff2c: 0f 94 46 74 sete 0x74(%esi) if ( mask & RTEMS_TIMESLICE_MASK ) { 10ff30: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 10ff37: 74 21 je 10ff5a if ( _Modes_Is_timeslice(mode_set) ) { 10ff39: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 10ff40: 74 11 je 10ff53 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10ff42: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10ff49: a1 90 45 12 00 mov 0x124590,%eax 10ff4e: 89 46 78 mov %eax,0x78(%esi) 10ff51: eb 07 jmp 10ff5a } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10ff53: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 10ff5a: f6 45 0c 01 testb $0x1,0xc(%ebp) 10ff5e: 74 0a je 10ff6a */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 10ff60: f6 45 08 01 testb $0x1,0x8(%ebp) 10ff64: 74 03 je 10ff69 10ff66: fa cli 10ff67: eb 01 jmp 10ff6a 10ff69: fb sti /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 10ff6a: 31 c9 xor %ecx,%ecx if ( mask & RTEMS_ASR_MASK ) { 10ff6c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 10ff73: 74 2a je 10ff9f * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 10ff75: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 10ff7c: 0f 94 c0 sete %al is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 10ff7f: 3a 43 08 cmp 0x8(%ebx),%al 10ff82: 74 1b je 10ff9f asr->is_enabled = is_asr_enabled; 10ff84: 88 43 08 mov %al,0x8(%ebx) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 10ff87: 9c pushf 10ff88: fa cli 10ff89: 58 pop %eax _signals = information->signals_pending; 10ff8a: 8b 53 18 mov 0x18(%ebx),%edx information->signals_pending = information->signals_posted; 10ff8d: 8b 4b 14 mov 0x14(%ebx),%ecx 10ff90: 89 4b 18 mov %ecx,0x18(%ebx) information->signals_posted = _signals; 10ff93: 89 53 14 mov %edx,0x14(%ebx) _ISR_Enable( _level ); 10ff96: 50 push %eax 10ff97: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 10ff98: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10ff9c: 0f 95 c1 setne %cl if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 10ff9f: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 10ffa1: 83 3d 1c 47 12 00 03 cmpl $0x3,0x12471c 10ffa8: 75 26 jne 10ffd0 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 10ffaa: 8b 15 dc 47 12 00 mov 0x1247dc,%edx if ( are_signals_pending || 10ffb0: 84 c9 test %cl,%cl 10ffb2: 75 0e jne 10ffc2 10ffb4: 3b 15 e0 47 12 00 cmp 0x1247e0,%edx 10ffba: 74 14 je 10ffd0 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 10ffbc: 80 7a 74 00 cmpb $0x0,0x74(%edx) 10ffc0: 74 0e je 10ffd0 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 10ffc2: c6 05 e8 47 12 00 01 movb $0x1,0x1247e8 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 10ffc9: e8 0e c0 ff ff call 10bfdc <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 10ffce: 31 c0 xor %eax,%eax } 10ffd0: 83 c4 1c add $0x1c,%esp 10ffd3: 5b pop %ebx 10ffd4: 5e pop %esi 10ffd5: 5f pop %edi 10ffd6: c9 leave 10ffd7: c3 ret =============================================================================== 0010dd84 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dd84: 55 push %ebp 10dd85: 89 e5 mov %esp,%ebp 10dd87: 56 push %esi 10dd88: 53 push %ebx 10dd89: 83 ec 10 sub $0x10,%esp 10dd8c: 8b 5d 0c mov 0xc(%ebp),%ebx 10dd8f: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dd92: 85 db test %ebx,%ebx 10dd94: 74 10 je 10dda6 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 10dd96: 0f b6 15 24 32 12 00 movzbl 0x123224,%edx !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10dd9d: b8 13 00 00 00 mov $0x13,%eax ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dda2: 39 d3 cmp %edx,%ebx 10dda4: 77 52 ja 10ddf8 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10dda6: b8 09 00 00 00 mov $0x9,%eax if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10ddab: 85 f6 test %esi,%esi 10ddad: 74 49 je 10ddf8 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ddaf: 51 push %ecx 10ddb0: 51 push %ecx 10ddb1: 8d 45 f4 lea -0xc(%ebp),%eax 10ddb4: 50 push %eax 10ddb5: ff 75 08 pushl 0x8(%ebp) 10ddb8: e8 e7 1d 00 00 call 10fba4 <_Thread_Get> switch ( location ) { 10ddbd: 83 c4 10 add $0x10,%esp 10ddc0: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10ddc4: 75 2d jne 10ddf3 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10ddc6: 8b 50 14 mov 0x14(%eax),%edx 10ddc9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10ddcb: 85 db test %ebx,%ebx 10ddcd: 74 1b je 10ddea the_thread->real_priority = new_priority; 10ddcf: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10ddd2: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10ddd6: 74 05 je 10dddd 10ddd8: 39 58 14 cmp %ebx,0x14(%eax) 10dddb: 76 0d jbe 10ddea <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10dddd: 52 push %edx 10ddde: 6a 00 push $0x0 10dde0: 53 push %ebx 10dde1: 50 push %eax 10dde2: e8 c5 19 00 00 call 10f7ac <_Thread_Change_priority> 10dde7: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10ddea: e8 93 1d 00 00 call 10fb82 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10ddef: 31 c0 xor %eax,%eax 10ddf1: eb 05 jmp 10ddf8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10ddf3: b8 04 00 00 00 mov $0x4,%eax } 10ddf8: 8d 65 f8 lea -0x8(%ebp),%esp 10ddfb: 5b pop %ebx 10ddfc: 5e pop %esi 10ddfd: c9 leave 10ddfe: c3 ret =============================================================================== 001163ec : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 1163ec: 55 push %ebp 1163ed: 89 e5 mov %esp,%ebp 1163ef: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 1163f2: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1163f5: 50 push %eax 1163f6: ff 75 08 pushl 0x8(%ebp) 1163f9: 68 b0 dc 13 00 push $0x13dcb0 1163fe: e8 41 26 00 00 call 118a44 <_Objects_Get> switch ( location ) { 116403: 83 c4 10 add $0x10,%esp 116406: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 11640a: 75 1e jne 11642a case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 11640c: 83 78 38 04 cmpl $0x4,0x38(%eax) 116410: 74 0f je 116421 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 116412: 83 ec 0c sub $0xc,%esp 116415: 83 c0 10 add $0x10,%eax 116418: 50 push %eax 116419: e8 e2 3f 00 00 call 11a400 <_Watchdog_Remove> 11641e: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 116421: e8 9c 30 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116426: 31 c0 xor %eax,%eax 116428: eb 05 jmp 11642f #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 11642a: b8 04 00 00 00 mov $0x4,%eax } 11642f: c9 leave 116430: c3 ret =============================================================================== 0011684c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 11684c: 55 push %ebp 11684d: 89 e5 mov %esp,%ebp 11684f: 57 push %edi 116850: 56 push %esi 116851: 53 push %ebx 116852: 83 ec 1c sub $0x1c,%esp 116855: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116858: 8b 35 f0 dc 13 00 mov 0x13dcf0,%esi if ( !timer_server ) return RTEMS_INCORRECT_STATE; 11685e: bb 0e 00 00 00 mov $0xe,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 116863: 85 f6 test %esi,%esi 116865: 0f 84 b1 00 00 00 je 11691c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 11686b: b3 0b mov $0xb,%bl Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 11686d: 80 3d 28 da 13 00 00 cmpb $0x0,0x13da28 116874: 0f 84 a2 00 00 00 je 11691c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 11687a: b3 09 mov $0x9,%bl return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 11687c: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 116880: 0f 84 96 00 00 00 je 11691c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116886: 83 ec 0c sub $0xc,%esp 116889: 57 push %edi 11688a: e8 b5 d6 ff ff call 113f44 <_TOD_Validate> 11688f: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_CLOCK; 116892: b3 14 mov $0x14,%bl return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116894: 84 c0 test %al,%al 116896: 0f 84 80 00 00 00 je 11691c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 11689c: 83 ec 0c sub $0xc,%esp 11689f: 57 push %edi 1168a0: e8 37 d6 ff ff call 113edc <_TOD_To_seconds> 1168a5: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 1168a7: 83 c4 10 add $0x10,%esp 1168aa: 3b 05 a0 da 13 00 cmp 0x13daa0,%eax 1168b0: 76 6a jbe 11691c 1168b2: 51 push %ecx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 1168b3: 8d 45 e4 lea -0x1c(%ebp),%eax 1168b6: 50 push %eax 1168b7: ff 75 08 pushl 0x8(%ebp) 1168ba: 68 b0 dc 13 00 push $0x13dcb0 1168bf: e8 80 21 00 00 call 118a44 <_Objects_Get> 1168c4: 89 c3 mov %eax,%ebx switch ( location ) { 1168c6: 83 c4 10 add $0x10,%esp 1168c9: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 1168cd: 75 48 jne 116917 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 1168cf: 83 ec 0c sub $0xc,%esp 1168d2: 8d 40 10 lea 0x10(%eax),%eax 1168d5: 50 push %eax 1168d6: e8 25 3b 00 00 call 11a400 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 1168db: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1168e2: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 1168e9: 8b 45 10 mov 0x10(%ebp),%eax 1168ec: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 1168ef: 8b 45 08 mov 0x8(%ebp),%eax 1168f2: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 1168f5: 8b 45 14 mov 0x14(%ebp),%eax 1168f8: 89 43 34 mov %eax,0x34(%ebx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 1168fb: 2b 3d a0 da 13 00 sub 0x13daa0,%edi 116901: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 116904: 58 pop %eax 116905: 5a pop %edx 116906: 53 push %ebx 116907: 56 push %esi 116908: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 11690b: e8 b2 2b 00 00 call 1194c2 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 116910: 83 c4 10 add $0x10,%esp 116913: 31 db xor %ebx,%ebx 116915: eb 05 jmp 11691c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 116917: bb 04 00 00 00 mov $0x4,%ebx } 11691c: 89 d8 mov %ebx,%eax 11691e: 8d 65 f4 lea -0xc(%ebp),%esp 116921: 5b pop %ebx 116922: 5e pop %esi 116923: 5f pop %edi 116924: c9 leave 116925: c3 ret