=============================================================================== 0010ce0c <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10ce0c: 55 push %ebp 10ce0d: 89 e5 mov %esp,%ebp 10ce0f: 53 push %ebx 10ce10: 83 ec 04 sub $0x4,%esp 10ce13: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10ce16: 8b 15 78 88 12 00 mov 0x128878,%edx * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 10ce1c: 9c pushf 10ce1d: fa cli 10ce1e: 58 pop %eax if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10ce1f: 8b 4b 44 mov 0x44(%ebx),%ecx 10ce22: 85 c9 test %ecx,%ecx 10ce24: 75 0b jne 10ce31 <_CORE_RWLock_Release+0x25> _ISR_Enable( level ); 10ce26: 50 push %eax 10ce27: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10ce28: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) return CORE_RWLOCK_SUCCESSFUL; 10ce2f: eb 72 jmp 10cea3 <_CORE_RWLock_Release+0x97> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 10ce31: 49 dec %ecx 10ce32: 75 0f jne 10ce43 <_CORE_RWLock_Release+0x37> the_rwlock->number_of_readers -= 1; 10ce34: 8b 4b 48 mov 0x48(%ebx),%ecx 10ce37: 49 dec %ecx 10ce38: 89 4b 48 mov %ecx,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10ce3b: 85 c9 test %ecx,%ecx 10ce3d: 74 04 je 10ce43 <_CORE_RWLock_Release+0x37> /* must be unlocked again */ _ISR_Enable( level ); 10ce3f: 50 push %eax 10ce40: 9d popf return CORE_RWLOCK_SUCCESSFUL; 10ce41: eb 60 jmp 10cea3 <_CORE_RWLock_Release+0x97> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10ce43: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 10ce4a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10ce51: 50 push %eax 10ce52: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10ce53: 83 ec 0c sub $0xc,%esp 10ce56: 53 push %ebx 10ce57: e8 e0 17 00 00 call 10e63c <_Thread_queue_Dequeue> if ( next ) { 10ce5c: 83 c4 10 add $0x10,%esp 10ce5f: 85 c0 test %eax,%eax 10ce61: 74 40 je 10cea3 <_CORE_RWLock_Release+0x97> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10ce63: 83 78 30 01 cmpl $0x1,0x30(%eax) 10ce67: 75 09 jne 10ce72 <_CORE_RWLock_Release+0x66> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10ce69: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10ce70: eb 31 jmp 10cea3 <_CORE_RWLock_Release+0x97> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10ce72: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10ce75: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 10ce7c: 83 ec 0c sub $0xc,%esp 10ce7f: 53 push %ebx 10ce80: e8 af 1b 00 00 call 10ea34 <_Thread_queue_First> if ( !next || 10ce85: 83 c4 10 add $0x10,%esp 10ce88: 85 c0 test %eax,%eax 10ce8a: 74 17 je 10cea3 <_CORE_RWLock_Release+0x97> 10ce8c: 83 78 30 01 cmpl $0x1,0x30(%eax) 10ce90: 74 11 je 10cea3 <_CORE_RWLock_Release+0x97><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10ce92: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10ce95: 52 push %edx 10ce96: 52 push %edx 10ce97: 50 push %eax 10ce98: 53 push %ebx 10ce99: e8 86 1a 00 00 call 10e924 <_Thread_queue_Extract> } 10ce9e: 83 c4 10 add $0x10,%esp 10cea1: eb d9 jmp 10ce7c <_CORE_RWLock_Release+0x70> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10cea3: 31 c0 xor %eax,%eax 10cea5: 8b 5d fc mov -0x4(%ebp),%ebx 10cea8: c9 leave 10cea9: c3 ret =============================================================================== 0010ceac <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10ceac: 55 push %ebp 10cead: 89 e5 mov %esp,%ebp 10ceaf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10ceb2: 8d 45 f4 lea -0xc(%ebp),%eax 10ceb5: 50 push %eax 10ceb6: ff 75 08 pushl 0x8(%ebp) 10ceb9: e8 66 14 00 00 call 10e324 <_Thread_Get> switch ( location ) { 10cebe: 83 c4 10 add $0x10,%esp 10cec1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10cec5: 75 17 jne 10cede <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10cec7: 83 ec 0c sub $0xc,%esp 10ceca: 50 push %eax 10cecb: e8 30 1c 00 00 call 10eb00 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10ced0: a1 50 83 12 00 mov 0x128350,%eax 10ced5: 48 dec %eax 10ced6: a3 50 83 12 00 mov %eax,0x128350 10cedb: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10cede: c9 leave 10cedf: c3 ret =============================================================================== 0011736c <_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 ) { 11736c: 55 push %ebp 11736d: 89 e5 mov %esp,%ebp 11736f: 57 push %edi 117370: 56 push %esi 117371: 53 push %ebx 117372: 83 ec 1c sub $0x1c,%esp 117375: 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; 117378: 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 ) { 11737d: 8b 55 10 mov 0x10(%ebp),%edx 117380: 3b 53 4c cmp 0x4c(%ebx),%edx 117383: 77 4e ja 1173d3 <_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 ) { 117385: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117389: 75 09 jne 117394 <_CORE_message_queue_Broadcast+0x28> 11738b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 117392: eb 23 jmp 1173b7 <_CORE_message_queue_Broadcast+0x4b> *count = 0; 117394: 8b 45 1c mov 0x1c(%ebp),%eax 117397: c7 00 00 00 00 00 movl $0x0,(%eax) 11739d: eb 32 jmp 1173d1 <_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; 11739f: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 1173a2: 8b 42 2c mov 0x2c(%edx),%eax 1173a5: 89 c7 mov %eax,%edi 1173a7: 8b 75 0c mov 0xc(%ebp),%esi 1173aa: 8b 4d 10 mov 0x10(%ebp),%ecx 1173ad: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 1173af: 8b 42 28 mov 0x28(%edx),%eax 1173b2: 8b 55 10 mov 0x10(%ebp),%edx 1173b5: 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 = 1173b7: 83 ec 0c sub $0xc,%esp 1173ba: 53 push %ebx 1173bb: e8 0c 25 00 00 call 1198cc <_Thread_queue_Dequeue> 1173c0: 89 c2 mov %eax,%edx 1173c2: 83 c4 10 add $0x10,%esp 1173c5: 85 c0 test %eax,%eax 1173c7: 75 d6 jne 11739f <_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; 1173c9: 8b 55 e4 mov -0x1c(%ebp),%edx 1173cc: 8b 45 1c mov 0x1c(%ebp),%eax 1173cf: 89 10 mov %edx,(%eax) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1173d1: 31 c0 xor %eax,%eax } 1173d3: 8d 65 f4 lea -0xc(%ebp),%esp 1173d6: 5b pop %ebx 1173d7: 5e pop %esi 1173d8: 5f pop %edi 1173d9: c9 leave 1173da: c3 ret =============================================================================== 00112220 <_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 ) { 112220: 55 push %ebp 112221: 89 e5 mov %esp,%ebp 112223: 57 push %edi 112224: 56 push %esi 112225: 53 push %ebx 112226: 83 ec 1c sub $0x1c,%esp 112229: 8b 5d 08 mov 0x8(%ebp),%ebx 11222c: 8b 7d 10 mov 0x10(%ebp),%edi 11222f: 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; 112232: 89 7b 44 mov %edi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 112235: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 11223c: 89 53 4c mov %edx,0x4c(%ebx) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 11223f: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 112246: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 11224d: 89 d0 mov %edx,%eax 11224f: f6 c2 03 test $0x3,%dl 112252: 74 0c je 112260 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uint32_t); 112254: 83 c0 04 add $0x4,%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 112257: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) return false; 11225a: 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) 11225c: 39 d0 cmp %edx,%eax 11225e: 72 68 jb 1122c8 <_CORE_message_queue_Initialize+0xa8><== 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)); 112260: 8d 50 14 lea 0x14(%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 * 112263: 89 d1 mov %edx,%ecx 112265: 0f af cf imul %edi,%ecx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; 112268: 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) 11226a: 39 c1 cmp %eax,%ecx 11226c: 72 5a jb 1122c8 <_CORE_message_queue_Initialize+0xa8><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 11226e: 83 ec 0c sub $0xc,%esp 112271: 51 push %ecx 112272: 89 55 e4 mov %edx,-0x1c(%ebp) 112275: e8 a4 27 00 00 call 114a1e <_Workspace_Allocate> return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 11227a: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 11227d: 83 c4 10 add $0x10,%esp 112280: 85 c0 test %eax,%eax 112282: 8b 55 e4 mov -0x1c(%ebp),%edx 112285: 74 41 je 1122c8 <_CORE_message_queue_Initialize+0xa8> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 112287: 52 push %edx 112288: 57 push %edi 112289: 50 push %eax 11228a: 8d 43 68 lea 0x68(%ebx),%eax 11228d: 50 push %eax 11228e: e8 e9 4a 00 00 call 116d7c <_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 ); 112293: 8d 43 54 lea 0x54(%ebx),%eax 112296: 89 43 50 mov %eax,0x50(%ebx) head->next = tail; head->previous = NULL; 112299: 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 ); 1122a0: 8d 43 50 lea 0x50(%ebx),%eax 1122a3: 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( 1122a6: 6a 06 push $0x6 1122a8: 68 80 00 00 00 push $0x80 1122ad: 8b 45 0c mov 0xc(%ebp),%eax 1122b0: 83 38 01 cmpl $0x1,(%eax) 1122b3: 0f 94 c0 sete %al 1122b6: 0f b6 c0 movzbl %al,%eax 1122b9: 50 push %eax 1122ba: 53 push %ebx 1122bb: e8 84 1f 00 00 call 114244 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1122c0: 83 c4 20 add $0x20,%esp 1122c3: be 01 00 00 00 mov $0x1,%esi } 1122c8: 89 f0 mov %esi,%eax 1122ca: 8d 65 f4 lea -0xc(%ebp),%esp 1122cd: 5b pop %ebx 1122ce: 5e pop %esi 1122cf: 5f pop %edi 1122d0: c9 leave 1122d1: c3 ret =============================================================================== 001122d4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1122d4: 55 push %ebp 1122d5: 89 e5 mov %esp,%ebp 1122d7: 57 push %edi 1122d8: 56 push %esi 1122d9: 53 push %ebx 1122da: 83 ec 2c sub $0x2c,%esp 1122dd: 8b 55 08 mov 0x8(%ebp),%edx 1122e0: 8b 45 0c mov 0xc(%ebp),%eax 1122e3: 89 45 dc mov %eax,-0x24(%ebp) 1122e6: 8b 5d 10 mov 0x10(%ebp),%ebx 1122e9: 89 5d e0 mov %ebx,-0x20(%ebp) 1122ec: 8b 4d 14 mov 0x14(%ebp),%ecx 1122ef: 8b 75 1c mov 0x1c(%ebp),%esi 1122f2: 89 75 d4 mov %esi,-0x2c(%ebp) 1122f5: 8a 45 18 mov 0x18(%ebp),%al 1122f8: 88 45 db mov %al,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1122fb: a1 f0 d9 12 00 mov 0x12d9f0,%eax executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 112300: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _ISR_Disable( level ); 112307: 9c pushf 112308: fa cli 112309: 8f 45 e4 popl -0x1c(%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 ); } 11230c: 8b 5a 50 mov 0x50(%edx),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 11230f: 8d 72 54 lea 0x54(%edx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 112312: 39 f3 cmp %esi,%ebx 112314: 0f 84 8a 00 00 00 je 1123a4 <_CORE_message_queue_Seize+0xd0> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 11231a: 8b 33 mov (%ebx),%esi head->next = new_first; 11231c: 89 72 50 mov %esi,0x50(%edx) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 11231f: 8d 7a 50 lea 0x50(%edx),%edi 112322: 89 7e 04 mov %edi,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 ) { 112325: 85 db test %ebx,%ebx 112327: 74 7b je 1123a4 <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 112329: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 11232c: ff 75 e4 pushl -0x1c(%ebp) 11232f: 9d popf *size_p = the_message->Contents.size; 112330: 8b 43 0c mov 0xc(%ebx),%eax 112333: 89 01 mov %eax,(%ecx) _Thread_Executing->Wait.count = 112335: 8b 73 08 mov 0x8(%ebx),%esi 112338: a1 f0 d9 12 00 mov 0x12d9f0,%eax 11233d: 89 70 24 mov %esi,0x24(%eax) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 112340: 8d 73 10 lea 0x10(%ebx),%esi 112343: 89 75 e4 mov %esi,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112346: 8b 09 mov (%ecx),%ecx 112348: 8b 7d e0 mov -0x20(%ebp),%edi 11234b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 11234d: 83 ec 0c sub $0xc,%esp 112350: 52 push %edx 112351: 89 55 d0 mov %edx,-0x30(%ebp) 112354: e8 b3 1b 00 00 call 113f0c <_Thread_queue_Dequeue> if ( !the_thread ) { 112359: 83 c4 10 add $0x10,%esp 11235c: 85 c0 test %eax,%eax 11235e: 8b 55 d0 mov -0x30(%ebp),%edx 112361: 75 15 jne 112378 <_CORE_message_queue_Seize+0xa4> 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 ); 112363: 89 5d 0c mov %ebx,0xc(%ebp) 112366: 83 c2 68 add $0x68,%edx 112369: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 11236c: 8d 65 f4 lea -0xc(%ebp),%esp 11236f: 5b pop %ebx 112370: 5e pop %esi 112371: 5f pop %edi 112372: c9 leave 112373: e9 28 fe ff ff jmp 1121a0 <_Chain_Append> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 112378: 8b 48 24 mov 0x24(%eax),%ecx 11237b: 89 4b 08 mov %ecx,0x8(%ebx) */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 11237e: 8b 48 30 mov 0x30(%eax),%ecx 112381: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 112384: 8b 70 2c mov 0x2c(%eax),%esi 112387: 8b 7d e4 mov -0x1c(%ebp),%edi 11238a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 11238c: 8b 43 08 mov 0x8(%ebx),%eax 11238f: 89 45 10 mov %eax,0x10(%ebp) 112392: 89 5d 0c mov %ebx,0xc(%ebp) 112395: 89 55 08 mov %edx,0x8(%ebp) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 112398: 8d 65 f4 lea -0xc(%ebp),%esp 11239b: 5b pop %ebx 11239c: 5e pop %esi 11239d: 5f pop %edi 11239e: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 11239f: e9 10 4a 00 00 jmp 116db4 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 1123a4: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1123a8: 75 13 jne 1123bd <_CORE_message_queue_Seize+0xe9> _ISR_Enable( level ); 1123aa: ff 75 e4 pushl -0x1c(%ebp) 1123ad: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 1123ae: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax) 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 ); } 1123b5: 8d 65 f4 lea -0xc(%ebp),%esp 1123b8: 5b pop %ebx 1123b9: 5e pop %esi 1123ba: 5f pop %edi 1123bb: c9 leave 1123bc: 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; 1123bd: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 1123c4: 89 50 44 mov %edx,0x44(%eax) executing->Wait.id = id; 1123c7: 8b 5d dc mov -0x24(%ebp),%ebx 1123ca: 89 58 20 mov %ebx,0x20(%eax) executing->Wait.return_argument_second.mutable_object = buffer; 1123cd: 8b 75 e0 mov -0x20(%ebp),%esi 1123d0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.return_argument = size_p; 1123d3: 89 48 28 mov %ecx,0x28(%eax) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1123d6: ff 75 e4 pushl -0x1c(%ebp) 1123d9: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1123da: c7 45 10 f4 42 11 00 movl $0x1142f4,0x10(%ebp) 1123e1: 8b 45 d4 mov -0x2c(%ebp),%eax 1123e4: 89 45 0c mov %eax,0xc(%ebp) 1123e7: 89 55 08 mov %edx,0x8(%ebp) } 1123ea: 8d 65 f4 lea -0xc(%ebp),%esp 1123ed: 5b pop %ebx 1123ee: 5e pop %esi 1123ef: 5f pop %edi 1123f0: 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 ); 1123f1: e9 22 1c 00 00 jmp 114018 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010ac2d <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10ac2d: 55 push %ebp 10ac2e: 89 e5 mov %esp,%ebp 10ac30: 53 push %ebx 10ac31: 83 ec 14 sub $0x14,%esp 10ac34: 8b 5d 08 mov 0x8(%ebp),%ebx 10ac37: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10ac3a: a1 40 53 12 00 mov 0x125340,%eax 10ac3f: 85 c0 test %eax,%eax 10ac41: 74 19 je 10ac5c <_CORE_mutex_Seize+0x2f> 10ac43: 84 d2 test %dl,%dl 10ac45: 74 15 je 10ac5c <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10ac47: 83 3d 9c 54 12 00 01 cmpl $0x1,0x12549c 10ac4e: 76 0c jbe 10ac5c <_CORE_mutex_Seize+0x2f> 10ac50: 53 push %ebx 10ac51: 6a 12 push $0x12 10ac53: 6a 00 push $0x0 10ac55: 6a 00 push $0x0 10ac57: e8 dc 05 00 00 call 10b238 <_Internal_error_Occurred> 10ac5c: 51 push %ecx 10ac5d: 51 push %ecx 10ac5e: 8d 45 18 lea 0x18(%ebp),%eax 10ac61: 50 push %eax 10ac62: 53 push %ebx 10ac63: 88 55 f4 mov %dl,-0xc(%ebp) 10ac66: e8 c9 47 00 00 call 10f434 <_CORE_mutex_Seize_interrupt_trylock> 10ac6b: 83 c4 10 add $0x10,%esp 10ac6e: 85 c0 test %eax,%eax 10ac70: 8a 55 f4 mov -0xc(%ebp),%dl 10ac73: 74 48 je 10acbd <_CORE_mutex_Seize+0x90> 10ac75: 84 d2 test %dl,%dl 10ac77: 75 12 jne 10ac8b <_CORE_mutex_Seize+0x5e> 10ac79: ff 75 18 pushl 0x18(%ebp) 10ac7c: 9d popf 10ac7d: a1 68 58 12 00 mov 0x125868,%eax 10ac82: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10ac89: eb 32 jmp 10acbd <_CORE_mutex_Seize+0x90> 10ac8b: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10ac92: a1 68 58 12 00 mov 0x125868,%eax 10ac97: 89 58 44 mov %ebx,0x44(%eax) 10ac9a: 8b 55 0c mov 0xc(%ebp),%edx 10ac9d: 89 50 20 mov %edx,0x20(%eax) 10aca0: a1 40 53 12 00 mov 0x125340,%eax 10aca5: 40 inc %eax 10aca6: a3 40 53 12 00 mov %eax,0x125340 10acab: ff 75 18 pushl 0x18(%ebp) 10acae: 9d popf 10acaf: 50 push %eax 10acb0: 50 push %eax 10acb1: ff 75 14 pushl 0x14(%ebp) 10acb4: 53 push %ebx 10acb5: e8 26 ff ff ff call 10abe0 <_CORE_mutex_Seize_interrupt_blocking> 10acba: 83 c4 10 add $0x10,%esp } 10acbd: 8b 5d fc mov -0x4(%ebp),%ebx 10acc0: c9 leave 10acc1: c3 ret =============================================================================== 0010ade8 <_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 ) { 10ade8: 55 push %ebp 10ade9: 89 e5 mov %esp,%ebp 10adeb: 53 push %ebx 10adec: 83 ec 10 sub $0x10,%esp 10adef: 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)) ) { 10adf2: 53 push %ebx 10adf3: e8 dc 16 00 00 call 10c4d4 <_Thread_queue_Dequeue> 10adf8: 89 c2 mov %eax,%edx 10adfa: 83 c4 10 add $0x10,%esp { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10adfd: 31 c0 xor %eax,%eax if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10adff: 85 d2 test %edx,%edx 10ae01: 75 15 jne 10ae18 <_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 ); 10ae03: 9c pushf 10ae04: fa cli 10ae05: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10ae06: 8b 53 48 mov 0x48(%ebx),%edx the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 10ae09: 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 ) 10ae0b: 3b 53 40 cmp 0x40(%ebx),%edx 10ae0e: 73 06 jae 10ae16 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10ae10: 42 inc %edx 10ae11: 89 53 48 mov %edx,0x48(%ebx) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10ae14: 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 ); 10ae16: 51 push %ecx 10ae17: 9d popf } return status; } 10ae18: 8b 5d fc mov -0x4(%ebp),%ebx 10ae1b: c9 leave 10ae1c: c3 ret =============================================================================== 00109d4c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 109d4c: 55 push %ebp 109d4d: 89 e5 mov %esp,%ebp 109d4f: 57 push %edi 109d50: 56 push %esi 109d51: 53 push %ebx 109d52: 83 ec 2c sub $0x2c,%esp 109d55: 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 ]; 109d58: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 109d5e: 8b 43 30 mov 0x30(%ebx),%eax 109d61: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 109d64: 9c pushf 109d65: fa cli 109d66: 58 pop %eax pending_events = api->pending_events; 109d67: 8b 17 mov (%edi),%edx 109d69: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 109d6c: 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 ) ) { 109d6f: 21 f2 and %esi,%edx 109d71: 75 07 jne 109d7a <_Event_Surrender+0x2e> _ISR_Enable( level ); 109d73: 50 push %eax 109d74: 9d popf return; 109d75: e9 af 00 00 00 jmp 109e29 <_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() && 109d7a: 83 3d 64 58 12 00 00 cmpl $0x0,0x125864 109d81: 74 49 je 109dcc <_Event_Surrender+0x80> 109d83: 3b 1d 68 58 12 00 cmp 0x125868,%ebx 109d89: 75 41 jne 109dcc <_Event_Surrender+0x80> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 109d8b: 8b 0d 3c 5c 12 00 mov 0x125c3c,%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 ) && 109d91: 83 f9 02 cmp $0x2,%ecx 109d94: 74 09 je 109d9f <_Event_Surrender+0x53> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 109d96: 8b 0d 3c 5c 12 00 mov 0x125c3c,%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) || 109d9c: 49 dec %ecx 109d9d: 75 2d jne 109dcc <_Event_Surrender+0x80> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 109d9f: 39 f2 cmp %esi,%edx 109da1: 74 06 je 109da9 <_Event_Surrender+0x5d> 109da3: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109da7: 74 1f je 109dc8 <_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) ); 109da9: 89 d6 mov %edx,%esi 109dab: f7 d6 not %esi 109dad: 23 75 d4 and -0x2c(%ebp),%esi 109db0: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 109db2: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109db9: 8b 4b 28 mov 0x28(%ebx),%ecx 109dbc: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 109dbe: c7 05 3c 5c 12 00 03 movl $0x3,0x125c3c 109dc5: 00 00 00 } _ISR_Enable( level ); 109dc8: 50 push %eax 109dc9: 9d popf return; 109dca: eb 5d jmp 109e29 <_Event_Surrender+0xdd> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 109dcc: f6 43 11 01 testb $0x1,0x11(%ebx) 109dd0: 74 55 je 109e27 <_Event_Surrender+0xdb> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 109dd2: 39 f2 cmp %esi,%edx 109dd4: 74 06 je 109ddc <_Event_Surrender+0x90> 109dd6: f6 45 e0 02 testb $0x2,-0x20(%ebp) 109dda: 74 4b je 109e27 <_Event_Surrender+0xdb> <== NEVER TAKEN 109ddc: 89 d6 mov %edx,%esi 109dde: f7 d6 not %esi 109de0: 23 75 d4 and -0x2c(%ebp),%esi 109de3: 89 37 mov %esi,(%edi) api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 109de5: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 109dec: 8b 4b 28 mov 0x28(%ebx),%ecx 109def: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 109df1: 50 push %eax 109df2: 9d popf 109df3: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 109df4: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 109df8: 74 06 je 109e00 <_Event_Surrender+0xb4> _ISR_Enable( level ); 109dfa: 50 push %eax 109dfb: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 109dfc: 51 push %ecx 109dfd: 51 push %ecx 109dfe: eb 17 jmp 109e17 <_Event_Surrender+0xcb> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 109e00: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 109e07: 50 push %eax 109e08: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 109e09: 83 ec 0c sub $0xc,%esp 109e0c: 8d 43 48 lea 0x48(%ebx),%eax 109e0f: 50 push %eax 109e10: e8 b7 30 00 00 call 10cecc <_Watchdog_Remove> 109e15: 58 pop %eax 109e16: 5a pop %edx 109e17: 68 f8 ff 03 10 push $0x1003fff8 109e1c: 53 push %ebx 109e1d: e8 62 20 00 00 call 10be84 <_Thread_Clear_state> 109e22: 83 c4 10 add $0x10,%esp 109e25: eb 02 jmp 109e29 <_Event_Surrender+0xdd> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 109e27: 50 push %eax 109e28: 9d popf } 109e29: 8d 65 f4 lea -0xc(%ebp),%esp 109e2c: 5b pop %ebx 109e2d: 5e pop %esi 109e2e: 5f pop %edi 109e2f: c9 leave 109e30: c3 ret =============================================================================== 00109e34 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 109e34: 55 push %ebp 109e35: 89 e5 mov %esp,%ebp 109e37: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 109e3a: 8d 45 f4 lea -0xc(%ebp),%eax 109e3d: 50 push %eax 109e3e: ff 75 08 pushl 0x8(%ebp) 109e41: e8 76 23 00 00 call 10c1bc <_Thread_Get> switch ( location ) { 109e46: 83 c4 10 add $0x10,%esp 109e49: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 109e4d: 75 49 jne 109e98 <_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 ); 109e4f: 9c pushf 109e50: fa cli 109e51: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 109e52: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 109e59: 3b 05 68 58 12 00 cmp 0x125868,%eax 109e5f: 75 13 jne 109e74 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 109e61: 8b 0d 3c 5c 12 00 mov 0x125c3c,%ecx 109e67: 49 dec %ecx 109e68: 75 0a jne 109e74 <_Event_Timeout+0x40> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 109e6a: c7 05 3c 5c 12 00 02 movl $0x2,0x125c3c 109e71: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 109e74: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 109e7b: 52 push %edx 109e7c: 9d popf 109e7d: 52 push %edx 109e7e: 52 push %edx 109e7f: 68 f8 ff 03 10 push $0x1003fff8 109e84: 50 push %eax 109e85: e8 fa 1f 00 00 call 10be84 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 109e8a: a1 40 53 12 00 mov 0x125340,%eax 109e8f: 48 dec %eax 109e90: a3 40 53 12 00 mov %eax,0x125340 _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 109e95: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 109e98: c9 leave 109e99: c3 ret =============================================================================== 0010fa7b <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 10fa7b: 55 push %ebp 10fa7c: 89 e5 mov %esp,%ebp 10fa7e: 57 push %edi 10fa7f: 56 push %esi 10fa80: 53 push %ebx 10fa81: 83 ec 4c sub $0x4c,%esp 10fa84: 8b 5d 08 mov 0x8(%ebp),%ebx 10fa87: 8b 4d 10 mov 0x10(%ebp),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 10fa8a: 8b 43 20 mov 0x20(%ebx),%eax 10fa8d: 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; 10fa90: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) Heap_Block *extend_last_block = NULL; 10fa97: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) uintptr_t const page_size = heap->page_size; 10fa9e: 8b 53 10 mov 0x10(%ebx),%edx 10faa1: 89 55 c4 mov %edx,-0x3c(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10faa4: 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; 10faa7: 8b 7b 30 mov 0x30(%ebx),%edi 10faaa: 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; 10faad: 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 ) { 10faaf: 8b 7d 0c mov 0xc(%ebp),%edi 10fab2: 01 cf add %ecx,%edi 10fab4: 0f 82 d4 01 00 00 jb 10fc8e <_Heap_Extend+0x213> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 10faba: 52 push %edx 10fabb: 52 push %edx 10fabc: 8d 55 e0 lea -0x20(%ebp),%edx 10fabf: 52 push %edx 10fac0: 8d 55 e4 lea -0x1c(%ebp),%edx 10fac3: 52 push %edx 10fac4: 50 push %eax 10fac5: ff 75 c4 pushl -0x3c(%ebp) 10fac8: 51 push %ecx 10fac9: ff 75 0c pushl 0xc(%ebp) 10facc: e8 8a b8 ff ff call 10b35b <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 10fad1: 83 c4 20 add $0x20,%esp 10fad4: 84 c0 test %al,%al 10fad6: 0f 84 b2 01 00 00 je 10fc8e <_Heap_Extend+0x213> 10fadc: 8b 4d c0 mov -0x40(%ebp),%ecx 10fadf: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10fae6: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 10faed: 31 f6 xor %esi,%esi 10faef: 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; 10faf6: 8b 43 18 mov 0x18(%ebx),%eax 10faf9: 89 5d b8 mov %ebx,-0x48(%ebp) 10fafc: eb 02 jmp 10fb00 <_Heap_Extend+0x85> 10fafe: 89 c8 mov %ecx,%eax uintptr_t const sub_area_end = start_block->prev_size; 10fb00: 8b 19 mov (%ecx),%ebx Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 10fb02: 39 c7 cmp %eax,%edi 10fb04: 76 09 jbe 10fb0f <_Heap_Extend+0x94> 10fb06: 39 5d 0c cmp %ebx,0xc(%ebp) 10fb09: 0f 82 7d 01 00 00 jb 10fc8c <_Heap_Extend+0x211> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10fb0f: 39 c7 cmp %eax,%edi 10fb11: 74 06 je 10fb19 <_Heap_Extend+0x9e> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10fb13: 39 df cmp %ebx,%edi 10fb15: 72 07 jb 10fb1e <_Heap_Extend+0xa3> 10fb17: eb 08 jmp 10fb21 <_Heap_Extend+0xa6> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 10fb19: 89 4d d0 mov %ecx,-0x30(%ebp) 10fb1c: eb 03 jmp 10fb21 <_Heap_Extend+0xa6> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 10fb1e: 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); 10fb21: 8d 43 f8 lea -0x8(%ebx),%eax 10fb24: 89 45 d4 mov %eax,-0x2c(%ebp) 10fb27: 89 d8 mov %ebx,%eax 10fb29: 31 d2 xor %edx,%edx 10fb2b: 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); 10fb2e: 29 55 d4 sub %edx,-0x2c(%ebp) link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 10fb31: 3b 5d 0c cmp 0xc(%ebp),%ebx 10fb34: 75 07 jne 10fb3d <_Heap_Extend+0xc2> start_block->prev_size = extend_area_end; 10fb36: 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 ) 10fb38: 8b 75 d4 mov -0x2c(%ebp),%esi 10fb3b: eb 08 jmp 10fb45 <_Heap_Extend+0xca> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 10fb3d: 73 06 jae 10fb45 <_Heap_Extend+0xca> 10fb3f: 8b 55 d4 mov -0x2c(%ebp),%edx 10fb42: 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; 10fb45: 8b 45 d4 mov -0x2c(%ebp),%eax 10fb48: 8b 48 04 mov 0x4(%eax),%ecx 10fb4b: 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); 10fb4e: 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 ); 10fb50: 3b 4d c0 cmp -0x40(%ebp),%ecx 10fb53: 75 a9 jne 10fafe <_Heap_Extend+0x83> 10fb55: 8b 5d b8 mov -0x48(%ebp),%ebx if ( extend_area_begin < heap->area_begin ) { 10fb58: 8b 55 0c mov 0xc(%ebp),%edx 10fb5b: 3b 53 18 cmp 0x18(%ebx),%edx 10fb5e: 73 05 jae 10fb65 <_Heap_Extend+0xea> heap->area_begin = extend_area_begin; 10fb60: 89 53 18 mov %edx,0x18(%ebx) 10fb63: eb 08 jmp 10fb6d <_Heap_Extend+0xf2> } else if ( heap->area_end < extend_area_end ) { 10fb65: 39 7b 1c cmp %edi,0x1c(%ebx) 10fb68: 73 03 jae 10fb6d <_Heap_Extend+0xf2> heap->area_end = extend_area_end; 10fb6a: 89 7b 1c mov %edi,0x1c(%ebx) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 10fb6d: 8b 45 e0 mov -0x20(%ebp),%eax 10fb70: 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 = 10fb73: 89 c1 mov %eax,%ecx 10fb75: 29 d1 sub %edx,%ecx 10fb77: 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; 10fb7a: 89 3a mov %edi,(%edx) extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 10fb7c: 83 c9 01 or $0x1,%ecx 10fb7f: 89 4a 04 mov %ecx,0x4(%edx) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 10fb82: 8b 4d d4 mov -0x2c(%ebp),%ecx 10fb85: 89 08 mov %ecx,(%eax) extend_last_block->size_and_flag = 0; 10fb87: 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 ) { 10fb8e: 39 53 20 cmp %edx,0x20(%ebx) 10fb91: 76 05 jbe 10fb98 <_Heap_Extend+0x11d> heap->first_block = extend_first_block; 10fb93: 89 53 20 mov %edx,0x20(%ebx) 10fb96: eb 08 jmp 10fba0 <_Heap_Extend+0x125> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 10fb98: 39 43 24 cmp %eax,0x24(%ebx) 10fb9b: 73 03 jae 10fba0 <_Heap_Extend+0x125> heap->last_block = extend_last_block; 10fb9d: 89 43 24 mov %eax,0x24(%ebx) } if ( merge_below_block != NULL ) { 10fba0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10fba4: 74 3b je 10fbe1 <_Heap_Extend+0x166> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 10fba6: 8b 43 10 mov 0x10(%ebx),%eax 10fba9: 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 ); 10fbac: 8b 4d 0c mov 0xc(%ebp),%ecx 10fbaf: 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; 10fbb2: 89 c8 mov %ecx,%eax 10fbb4: 31 d2 xor %edx,%edx 10fbb6: f7 75 d4 divl -0x2c(%ebp) if ( remainder != 0 ) { 10fbb9: 85 d2 test %edx,%edx 10fbbb: 74 05 je 10fbc2 <_Heap_Extend+0x147> <== ALWAYS TAKEN return value - remainder + alignment; 10fbbd: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED 10fbc0: 29 d1 sub %edx,%ecx <== NOT EXECUTED uintptr_t const new_first_block_begin = 10fbc2: 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; 10fbc5: 8b 45 d0 mov -0x30(%ebp),%eax 10fbc8: 8b 00 mov (%eax),%eax 10fbca: 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 = 10fbcd: 8b 45 d0 mov -0x30(%ebp),%eax 10fbd0: 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; 10fbd2: 83 c8 01 or $0x1,%eax 10fbd5: 89 42 04 mov %eax,0x4(%edx) _Heap_Free_block( heap, new_first_block ); 10fbd8: 89 d8 mov %ebx,%eax 10fbda: e8 81 fe ff ff call 10fa60 <_Heap_Free_block> 10fbdf: eb 14 jmp 10fbf5 <_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 ) { 10fbe1: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 10fbe5: 74 0e je 10fbf5 <_Heap_Extend+0x17a> _Heap_Link_below( 10fbe7: 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; 10fbea: 8b 45 c8 mov -0x38(%ebp),%eax 10fbed: 29 d0 sub %edx,%eax 10fbef: 83 c8 01 or $0x1,%eax 10fbf2: 89 42 04 mov %eax,0x4(%edx) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 10fbf5: 85 f6 test %esi,%esi 10fbf7: 74 30 je 10fc29 <_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, 10fbf9: 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( 10fbfc: 29 f7 sub %esi,%edi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10fbfe: 89 f8 mov %edi,%eax 10fc00: 31 d2 xor %edx,%edx 10fc02: f7 73 10 divl 0x10(%ebx) 10fc05: 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) 10fc07: 8b 46 04 mov 0x4(%esi),%eax 10fc0a: 29 f8 sub %edi,%eax | HEAP_PREV_BLOCK_USED; 10fc0c: 83 c8 01 or $0x1,%eax 10fc0f: 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; 10fc13: 8b 46 04 mov 0x4(%esi),%eax 10fc16: 83 e0 01 and $0x1,%eax block->size_and_flag = size | flag; 10fc19: 09 f8 or %edi,%eax 10fc1b: 89 46 04 mov %eax,0x4(%esi) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 10fc1e: 89 f2 mov %esi,%edx 10fc20: 89 d8 mov %ebx,%eax 10fc22: e8 39 fe ff ff call 10fa60 <_Heap_Free_block> 10fc27: eb 21 jmp 10fc4a <_Heap_Extend+0x1cf> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 10fc29: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 10fc2d: 74 1b je 10fc4a <_Heap_Extend+0x1cf> _Heap_Link_above( 10fc2f: 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 ); 10fc32: 8b 45 e4 mov -0x1c(%ebp),%eax 10fc35: 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; 10fc38: 8b 7d cc mov -0x34(%ebp),%edi 10fc3b: 8b 57 04 mov 0x4(%edi),%edx 10fc3e: 83 e2 01 and $0x1,%edx block->size_and_flag = size | flag; 10fc41: 09 d0 or %edx,%eax 10fc43: 89 47 04 mov %eax,0x4(%edi) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10fc46: 83 49 04 01 orl $0x1,0x4(%ecx) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 10fc4a: 85 f6 test %esi,%esi 10fc4c: 75 10 jne 10fc5e <_Heap_Extend+0x1e3> 10fc4e: 83 7d d0 00 cmpl $0x0,-0x30(%ebp) 10fc52: 75 0a jne 10fc5e <_Heap_Extend+0x1e3> _Heap_Free_block( heap, extend_first_block ); 10fc54: 8b 55 e4 mov -0x1c(%ebp),%edx 10fc57: 89 d8 mov %ebx,%eax 10fc59: e8 02 fe ff ff call 10fa60 <_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 10fc5e: 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( 10fc61: 8b 43 20 mov 0x20(%ebx),%eax 10fc64: 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; 10fc66: 8b 4a 04 mov 0x4(%edx),%ecx 10fc69: 83 e1 01 and $0x1,%ecx block->size_and_flag = size | flag; 10fc6c: 09 c8 or %ecx,%eax 10fc6e: 89 42 04 mov %eax,0x4(%edx) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 10fc71: 8b 43 30 mov 0x30(%ebx),%eax 10fc74: 2b 45 bc sub -0x44(%ebp),%eax /* Statistics */ stats->size += extended_size; 10fc77: 01 43 2c add %eax,0x2c(%ebx) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 10fc7a: 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 ) 10fc7f: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10fc83: 74 09 je 10fc8e <_Heap_Extend+0x213> <== NEVER TAKEN *extended_size_ptr = extended_size; 10fc85: 8b 55 14 mov 0x14(%ebp),%edx 10fc88: 89 02 mov %eax,(%edx) 10fc8a: eb 02 jmp 10fc8e <_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; 10fc8c: 31 f6 xor %esi,%esi if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 10fc8e: 89 f0 mov %esi,%eax 10fc90: 8d 65 f4 lea -0xc(%ebp),%esp 10fc93: 5b pop %ebx 10fc94: 5e pop %esi 10fc95: 5f pop %edi 10fc96: c9 leave 10fc97: c3 ret =============================================================================== 0010f6d0 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10f6d0: 55 push %ebp 10f6d1: 89 e5 mov %esp,%ebp 10f6d3: 57 push %edi 10f6d4: 56 push %esi 10f6d5: 53 push %ebx 10f6d6: 83 ec 14 sub $0x14,%esp 10f6d9: 8b 4d 08 mov 0x8(%ebp),%ecx 10f6dc: 8b 45 0c mov 0xc(%ebp),%eax 10f6df: 8d 58 f8 lea -0x8(%eax),%ebx 10f6e2: 31 d2 xor %edx,%edx 10f6e4: 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); 10f6e7: 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 10f6e9: 8b 41 20 mov 0x20(%ecx),%eax 10f6ec: 89 45 ec mov %eax,-0x14(%ebp) && (uintptr_t) block <= (uintptr_t) heap->last_block; 10f6ef: 31 d2 xor %edx,%edx 10f6f1: 39 c3 cmp %eax,%ebx 10f6f3: 72 08 jb 10f6fd <_Heap_Free+0x2d> 10f6f5: 31 d2 xor %edx,%edx 10f6f7: 39 59 24 cmp %ebx,0x24(%ecx) 10f6fa: 0f 93 c2 setae %dl bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 10f6fd: 31 c0 xor %eax,%eax uintptr_t next_block_size = 0; bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10f6ff: 85 d2 test %edx,%edx 10f701: 0f 84 21 01 00 00 je 10f828 <_Heap_Free+0x158> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10f707: 8b 43 04 mov 0x4(%ebx),%eax 10f70a: 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; 10f70d: 89 c6 mov %eax,%esi 10f70f: 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); 10f712: 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; 10f715: 31 ff xor %edi,%edi 10f717: 3b 55 ec cmp -0x14(%ebp),%edx 10f71a: 72 0a jb 10f726 <_Heap_Free+0x56> <== NEVER TAKEN 10f71c: 31 c0 xor %eax,%eax 10f71e: 39 51 24 cmp %edx,0x24(%ecx) 10f721: 0f 93 c0 setae %al 10f724: 89 c7 mov %eax,%edi _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; 10f726: 31 c0 xor %eax,%eax block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10f728: 85 ff test %edi,%edi 10f72a: 0f 84 f8 00 00 00 je 10f828 <_Heap_Free+0x158> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 10f730: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10f733: f7 c7 01 00 00 00 test $0x1,%edi 10f739: 0f 84 e9 00 00 00 je 10f828 <_Heap_Free+0x158> <== 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; 10f73f: 83 e7 fe and $0xfffffffe,%edi 10f742: 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 10f745: 8b 41 24 mov 0x24(%ecx),%eax 10f748: 89 45 e4 mov %eax,-0x1c(%ebp) && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 10f74b: 31 c0 xor %eax,%eax 10f74d: 3b 55 e4 cmp -0x1c(%ebp),%edx 10f750: 74 0a je 10f75c <_Heap_Free+0x8c> 10f752: 31 c0 xor %eax,%eax 10f754: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1) 10f759: 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 10f75c: 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 ) ) { 10f75f: f6 45 f0 01 testb $0x1,-0x10(%ebp) 10f763: 75 62 jne 10f7c7 <_Heap_Free+0xf7> uintptr_t const prev_size = block->prev_size; 10f765: 8b 03 mov (%ebx),%eax 10f767: 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); 10f76a: 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; 10f76c: 31 ff xor %edi,%edi 10f76e: 3b 5d ec cmp -0x14(%ebp),%ebx 10f771: 72 0a jb 10f77d <_Heap_Free+0xad> <== NEVER TAKEN 10f773: 31 c0 xor %eax,%eax 10f775: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10f778: 0f 93 c0 setae %al 10f77b: 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 ); 10f77d: 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 ) ) { 10f77f: 85 ff test %edi,%edi 10f781: 0f 84 a1 00 00 00 je 10f828 <_Heap_Free+0x158> <== 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) ) { 10f787: f6 43 04 01 testb $0x1,0x4(%ebx) 10f78b: 0f 84 97 00 00 00 je 10f828 <_Heap_Free+0x158> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10f791: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10f795: 74 1a je 10f7b1 <_Heap_Free+0xe1> uintptr_t const size = block_size + prev_size + next_block_size; 10f797: 8b 45 e8 mov -0x18(%ebp),%eax 10f79a: 8d 04 06 lea (%esi,%eax,1),%eax 10f79d: 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; 10f7a0: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = block->prev; 10f7a3: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 10f7a6: 89 7a 08 mov %edi,0x8(%edx) next->prev = prev; 10f7a9: 89 57 0c mov %edx,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10f7ac: ff 49 38 decl 0x38(%ecx) 10f7af: eb 33 jmp 10f7e4 <_Heap_Free+0x114> 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; 10f7b1: 8b 45 f0 mov -0x10(%ebp),%eax 10f7b4: 8d 04 06 lea (%esi,%eax,1),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f7b7: 89 c7 mov %eax,%edi 10f7b9: 83 cf 01 or $0x1,%edi 10f7bc: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f7bf: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 10f7c3: 89 02 mov %eax,(%edx) 10f7c5: eb 56 jmp 10f81d <_Heap_Free+0x14d> } } else if ( next_is_free ) { /* coalesce next */ 10f7c7: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 10f7cb: 74 24 je 10f7f1 <_Heap_Free+0x121> uintptr_t const size = block_size + next_block_size; 10f7cd: 8b 45 e8 mov -0x18(%ebp),%eax 10f7d0: 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; 10f7d2: 8b 7a 08 mov 0x8(%edx),%edi Heap_Block *prev = old_block->prev; 10f7d5: 8b 52 0c mov 0xc(%edx),%edx new_block->next = next; 10f7d8: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10f7db: 89 53 0c mov %edx,0xc(%ebx) next->prev = new_block; 10f7de: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10f7e1: 89 5a 08 mov %ebx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10f7e4: 89 c2 mov %eax,%edx 10f7e6: 83 ca 01 or $0x1,%edx 10f7e9: 89 53 04 mov %edx,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10f7ec: 89 04 03 mov %eax,(%ebx,%eax,1) 10f7ef: eb 2c jmp 10f81d <_Heap_Free+0x14d> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10f7f1: 8b 41 08 mov 0x8(%ecx),%eax new_block->next = next; 10f7f4: 89 43 08 mov %eax,0x8(%ebx) new_block->prev = block_before; 10f7f7: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10f7fa: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10f7fd: 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; 10f800: 89 f0 mov %esi,%eax 10f802: 83 c8 01 or $0x1,%eax 10f805: 89 43 04 mov %eax,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10f808: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = block_size; 10f80c: 89 32 mov %esi,(%edx) /* Statistics */ ++stats->free_blocks; 10f80e: 8b 41 38 mov 0x38(%ecx),%eax 10f811: 40 inc %eax 10f812: 89 41 38 mov %eax,0x38(%ecx) if ( stats->max_free_blocks < stats->free_blocks ) { 10f815: 39 41 3c cmp %eax,0x3c(%ecx) 10f818: 73 03 jae 10f81d <_Heap_Free+0x14d> stats->max_free_blocks = stats->free_blocks; 10f81a: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10f81d: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10f820: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10f823: 01 71 30 add %esi,0x30(%ecx) return( true ); 10f826: b0 01 mov $0x1,%al } 10f828: 83 c4 14 add $0x14,%esp 10f82b: 5b pop %ebx 10f82c: 5e pop %esi 10f82d: 5f pop %edi 10f82e: c9 leave 10f82f: c3 ret =============================================================================== 0011d470 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11d470: 55 push %ebp 11d471: 89 e5 mov %esp,%ebp 11d473: 57 push %edi 11d474: 56 push %esi 11d475: 53 push %ebx 11d476: 8b 5d 08 mov 0x8(%ebp),%ebx 11d479: 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); 11d47c: 8d 4e f8 lea -0x8(%esi),%ecx 11d47f: 89 f0 mov %esi,%eax 11d481: 31 d2 xor %edx,%edx 11d483: 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); 11d486: 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 11d488: 8b 53 20 mov 0x20(%ebx),%edx && (uintptr_t) block <= (uintptr_t) heap->last_block; 11d48b: 31 ff xor %edi,%edi 11d48d: 39 d1 cmp %edx,%ecx 11d48f: 72 0a jb 11d49b <_Heap_Size_of_alloc_area+0x2b> 11d491: 31 c0 xor %eax,%eax 11d493: 39 4b 24 cmp %ecx,0x24(%ebx) 11d496: 0f 93 c0 setae %al 11d499: 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; 11d49b: 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 ) ) { 11d49d: 85 ff test %edi,%edi 11d49f: 74 30 je 11d4d1 <_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; 11d4a1: 8b 41 04 mov 0x4(%ecx),%eax 11d4a4: 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); 11d4a7: 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; 11d4a9: 31 ff xor %edi,%edi 11d4ab: 39 d1 cmp %edx,%ecx 11d4ad: 72 0a jb 11d4b9 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN 11d4af: 31 c0 xor %eax,%eax 11d4b1: 39 4b 24 cmp %ecx,0x24(%ebx) 11d4b4: 0f 93 c0 setae %al 11d4b7: 89 c7 mov %eax,%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 11d4b9: 31 c0 xor %eax,%eax } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11d4bb: 85 ff test %edi,%edi 11d4bd: 74 12 je 11d4d1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 11d4bf: f6 41 04 01 testb $0x1,0x4(%ecx) 11d4c3: 74 0c je 11d4d1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 11d4c5: 29 f1 sub %esi,%ecx 11d4c7: 8d 51 04 lea 0x4(%ecx),%edx 11d4ca: 8b 45 10 mov 0x10(%ebp),%eax 11d4cd: 89 10 mov %edx,(%eax) return true; 11d4cf: b0 01 mov $0x1,%al } 11d4d1: 5b pop %ebx 11d4d2: 5e pop %esi 11d4d3: 5f pop %edi 11d4d4: c9 leave 11d4d5: c3 ret =============================================================================== 0010bc16 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bc16: 55 push %ebp 10bc17: 89 e5 mov %esp,%ebp 10bc19: 57 push %edi 10bc1a: 56 push %esi 10bc1b: 53 push %ebx 10bc1c: 83 ec 4c sub $0x4c,%esp 10bc1f: 8b 75 08 mov 0x8(%ebp),%esi 10bc22: 8b 5d 0c mov 0xc(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10bc25: 8b 46 10 mov 0x10(%esi),%eax 10bc28: 89 45 d8 mov %eax,-0x28(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10bc2b: 8b 4e 14 mov 0x14(%esi),%ecx 10bc2e: 89 4d d4 mov %ecx,-0x2c(%ebp) Heap_Block *const first_block = heap->first_block; 10bc31: 8b 46 20 mov 0x20(%esi),%eax 10bc34: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_block = heap->last_block; 10bc37: 8b 4e 24 mov 0x24(%esi),%ecx 10bc3a: 89 4d c8 mov %ecx,-0x38(%ebp) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10bc3d: c7 45 e4 d8 bb 10 00 movl $0x10bbd8,-0x1c(%ebp) 10bc44: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10bc48: 74 07 je 10bc51 <_Heap_Walk+0x3b> 10bc4a: c7 45 e4 dd bb 10 00 movl $0x10bbdd,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 10bc51: 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() ) ) { 10bc53: 83 3d 24 75 12 00 03 cmpl $0x3,0x127524 10bc5a: 0f 85 e8 02 00 00 jne 10bf48 <_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)( 10bc60: 52 push %edx 10bc61: ff 76 0c pushl 0xc(%esi) 10bc64: ff 76 08 pushl 0x8(%esi) 10bc67: ff 75 c8 pushl -0x38(%ebp) 10bc6a: ff 75 d0 pushl -0x30(%ebp) 10bc6d: ff 76 1c pushl 0x1c(%esi) 10bc70: ff 76 18 pushl 0x18(%esi) 10bc73: ff 75 d4 pushl -0x2c(%ebp) 10bc76: ff 75 d8 pushl -0x28(%ebp) 10bc79: 68 d9 ff 11 00 push $0x11ffd9 10bc7e: 6a 00 push $0x0 10bc80: 53 push %ebx 10bc81: 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 ) { 10bc84: 83 c4 30 add $0x30,%esp 10bc87: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10bc8b: 75 0b jne 10bc98 <_Heap_Walk+0x82> (*printer)( source, true, "page size is zero\n" ); 10bc8d: 50 push %eax 10bc8e: 68 6a 00 12 00 push $0x12006a 10bc93: e9 6b 02 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10bc98: f6 45 d8 03 testb $0x3,-0x28(%ebp) 10bc9c: 74 0d je 10bcab <_Heap_Walk+0x95> (*printer)( 10bc9e: ff 75 d8 pushl -0x28(%ebp) 10bca1: 68 7d 00 12 00 push $0x12007d 10bca6: e9 58 02 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bcab: 8b 45 d4 mov -0x2c(%ebp),%eax 10bcae: 31 d2 xor %edx,%edx 10bcb0: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10bcb3: 85 d2 test %edx,%edx 10bcb5: 74 0d je 10bcc4 <_Heap_Walk+0xae> (*printer)( 10bcb7: ff 75 d4 pushl -0x2c(%ebp) 10bcba: 68 9b 00 12 00 push $0x12009b 10bcbf: e9 3f 02 00 00 jmp 10bf03 <_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; 10bcc4: 8b 45 d0 mov -0x30(%ebp),%eax 10bcc7: 83 c0 08 add $0x8,%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bcca: 31 d2 xor %edx,%edx 10bccc: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( 10bccf: 85 d2 test %edx,%edx 10bcd1: 74 0d je 10bce0 <_Heap_Walk+0xca> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10bcd3: ff 75 d0 pushl -0x30(%ebp) 10bcd6: 68 bf 00 12 00 push $0x1200bf 10bcdb: e9 23 02 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10bce0: 8b 45 d0 mov -0x30(%ebp),%eax 10bce3: f6 40 04 01 testb $0x1,0x4(%eax) 10bce7: 75 0b jne 10bcf4 <_Heap_Walk+0xde> (*printer)( 10bce9: 57 push %edi 10bcea: 68 f0 00 12 00 push $0x1200f0 10bcef: e9 0f 02 00 00 jmp 10bf03 <_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; 10bcf4: 8b 4d c8 mov -0x38(%ebp),%ecx 10bcf7: 8b 79 04 mov 0x4(%ecx),%edi 10bcfa: 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); 10bcfd: 01 cf add %ecx,%edi ); return false; } if ( _Heap_Is_free( last_block ) ) { 10bcff: f6 47 04 01 testb $0x1,0x4(%edi) 10bd03: 75 0b jne 10bd10 <_Heap_Walk+0xfa> (*printer)( 10bd05: 56 push %esi 10bd06: 68 1e 01 12 00 push $0x12011e 10bd0b: e9 f3 01 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> ); return false; } if ( 10bd10: 3b 7d d0 cmp -0x30(%ebp),%edi 10bd13: 74 0b je 10bd20 <_Heap_Walk+0x10a> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 10bd15: 51 push %ecx <== NOT EXECUTED 10bd16: 68 33 01 12 00 push $0x120133 <== NOT EXECUTED 10bd1b: e9 e3 01 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10bd20: 8b 46 10 mov 0x10(%esi),%eax 10bd23: 89 45 e0 mov %eax,-0x20(%ebp) block = next_block; } while ( block != first_block ); return true; } 10bd26: 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 ); 10bd29: 89 75 dc mov %esi,-0x24(%ebp) 10bd2c: eb 75 jmp 10bda3 <_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; 10bd2e: 31 c0 xor %eax,%eax 10bd30: 39 4e 20 cmp %ecx,0x20(%esi) 10bd33: 77 08 ja 10bd3d <_Heap_Walk+0x127> 10bd35: 31 c0 xor %eax,%eax 10bd37: 39 4e 24 cmp %ecx,0x24(%esi) 10bd3a: 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 ) ) { 10bd3d: 85 c0 test %eax,%eax 10bd3f: 75 0b jne 10bd4c <_Heap_Walk+0x136> (*printer)( 10bd41: 51 push %ecx 10bd42: 68 62 01 12 00 push $0x120162 10bd47: e9 b7 01 00 00 jmp 10bf03 <_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; 10bd4c: 8d 41 08 lea 0x8(%ecx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bd4f: 31 d2 xor %edx,%edx 10bd51: f7 75 e0 divl -0x20(%ebp) ); return false; } if ( 10bd54: 85 d2 test %edx,%edx 10bd56: 74 0b je 10bd63 <_Heap_Walk+0x14d> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10bd58: 51 push %ecx 10bd59: 68 82 01 12 00 push $0x120182 10bd5e: e9 a0 01 00 00 jmp 10bf03 <_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; 10bd63: 8b 41 04 mov 0x4(%ecx),%eax 10bd66: 83 e0 fe and $0xfffffffe,%eax ); return false; } if ( _Heap_Is_used( free_block ) ) { 10bd69: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10bd6e: 74 0b je 10bd7b <_Heap_Walk+0x165> (*printer)( 10bd70: 51 push %ecx 10bd71: 68 b2 01 12 00 push $0x1201b2 10bd76: e9 88 01 00 00 jmp 10bf03 <_Heap_Walk+0x2ed> ); return false; } if ( free_block->prev != prev_block ) { 10bd7b: 8b 41 0c mov 0xc(%ecx),%eax 10bd7e: 3b 45 dc cmp -0x24(%ebp),%eax 10bd81: 74 1a je 10bd9d <_Heap_Walk+0x187> (*printer)( 10bd83: 83 ec 0c sub $0xc,%esp 10bd86: 50 push %eax 10bd87: 51 push %ecx 10bd88: 68 ce 01 12 00 push $0x1201ce 10bd8d: 6a 01 push $0x1 10bd8f: 53 push %ebx 10bd90: ff 55 e4 call *-0x1c(%ebp) 10bd93: 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; 10bd96: 31 c0 xor %eax,%eax 10bd98: e9 ab 01 00 00 jmp 10bf48 <_Heap_Walk+0x332> return false; } prev_block = free_block; free_block = free_block->next; 10bd9d: 89 4d dc mov %ecx,-0x24(%ebp) 10bda0: 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 ) { 10bda3: 39 f1 cmp %esi,%ecx 10bda5: 75 87 jne 10bd2e <_Heap_Walk+0x118> 10bda7: 89 5d dc mov %ebx,-0x24(%ebp) 10bdaa: eb 02 jmp 10bdae <_Heap_Walk+0x198> block->prev_size ); } block = next_block; } while ( block != first_block ); 10bdac: 89 df mov %ebx,%edi return true; } 10bdae: 8b 4f 04 mov 0x4(%edi),%ecx 10bdb1: 89 4d cc mov %ecx,-0x34(%ebp) 10bdb4: 83 e1 fe and $0xfffffffe,%ecx 10bdb7: 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); 10bdba: 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; 10bdbd: 31 c0 xor %eax,%eax 10bdbf: 39 5e 20 cmp %ebx,0x20(%esi) 10bdc2: 77 08 ja 10bdcc <_Heap_Walk+0x1b6> <== NEVER TAKEN 10bdc4: 31 c0 xor %eax,%eax 10bdc6: 39 5e 24 cmp %ebx,0x24(%esi) 10bdc9: 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 ) ) { 10bdcc: 85 c0 test %eax,%eax 10bdce: 75 11 jne 10bde1 <_Heap_Walk+0x1cb> 10bdd0: 89 d9 mov %ebx,%ecx 10bdd2: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdd5: 83 ec 0c sub $0xc,%esp 10bdd8: 51 push %ecx 10bdd9: 57 push %edi 10bdda: 68 00 02 12 00 push $0x120200 10bddf: eb ac jmp 10bd8d <_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; 10bde1: 3b 7d c8 cmp -0x38(%ebp),%edi 10bde4: 0f 95 c1 setne %cl RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 10bde7: 8b 45 e0 mov -0x20(%ebp),%eax 10bdea: 31 d2 xor %edx,%edx 10bdec: f7 75 d8 divl -0x28(%ebp) ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 10bdef: 85 d2 test %edx,%edx 10bdf1: 74 15 je 10be08 <_Heap_Walk+0x1f2> 10bdf3: 84 c9 test %cl,%cl 10bdf5: 74 11 je 10be08 <_Heap_Walk+0x1f2> 10bdf7: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bdfa: 83 ec 0c sub $0xc,%esp 10bdfd: ff 75 e0 pushl -0x20(%ebp) 10be00: 57 push %edi 10be01: 68 2d 02 12 00 push $0x12022d 10be06: eb 85 jmp 10bd8d <_Heap_Walk+0x177> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 10be08: 8b 45 d4 mov -0x2c(%ebp),%eax 10be0b: 39 45 e0 cmp %eax,-0x20(%ebp) 10be0e: 73 18 jae 10be28 <_Heap_Walk+0x212> 10be10: 84 c9 test %cl,%cl 10be12: 74 14 je 10be28 <_Heap_Walk+0x212> <== NEVER TAKEN 10be14: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be17: 52 push %edx 10be18: 52 push %edx 10be19: 50 push %eax 10be1a: ff 75 e0 pushl -0x20(%ebp) 10be1d: 57 push %edi 10be1e: 68 5b 02 12 00 push $0x12025b 10be23: e9 65 ff ff ff jmp 10bd8d <_Heap_Walk+0x177> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 10be28: 39 fb cmp %edi,%ebx 10be2a: 77 18 ja 10be44 <_Heap_Walk+0x22e> 10be2c: 84 c9 test %cl,%cl 10be2e: 74 14 je 10be44 <_Heap_Walk+0x22e> 10be30: 89 d9 mov %ebx,%ecx 10be32: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10be35: 83 ec 0c sub $0xc,%esp 10be38: 51 push %ecx 10be39: 57 push %edi 10be3a: 68 86 02 12 00 push $0x120286 10be3f: e9 49 ff ff ff jmp 10bd8d <_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; 10be44: 8b 4d cc mov -0x34(%ebp),%ecx 10be47: 83 e1 01 and $0x1,%ecx 10be4a: 89 4d c4 mov %ecx,-0x3c(%ebp) ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10be4d: f6 43 04 01 testb $0x1,0x4(%ebx) 10be51: 0f 85 ba 00 00 00 jne 10bf11 <_Heap_Walk+0x2fb> block = next_block; } while ( block != first_block ); return true; } 10be57: 8b 46 08 mov 0x8(%esi),%eax 10be5a: 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 ? 10be5d: 8b 4f 08 mov 0x8(%edi),%ecx 10be60: 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)( 10be63: ba a6 ff 11 00 mov $0x11ffa6,%edx 10be68: 3b 4e 0c cmp 0xc(%esi),%ecx 10be6b: 74 0e je 10be7b <_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)" : "") 10be6d: ba ed fe 11 00 mov $0x11feed,%edx 10be72: 39 f1 cmp %esi,%ecx 10be74: 75 05 jne 10be7b <_Heap_Walk+0x265> 10be76: ba b5 ff 11 00 mov $0x11ffb5,%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 ? 10be7b: 8b 47 0c mov 0xc(%edi),%eax 10be7e: 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)( 10be81: b8 bf ff 11 00 mov $0x11ffbf,%eax 10be86: 8b 4d c0 mov -0x40(%ebp),%ecx 10be89: 39 4d cc cmp %ecx,-0x34(%ebp) 10be8c: 74 0f je 10be9d <_Heap_Walk+0x287> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 10be8e: b8 ed fe 11 00 mov $0x11feed,%eax 10be93: 39 75 cc cmp %esi,-0x34(%ebp) 10be96: 75 05 jne 10be9d <_Heap_Walk+0x287> 10be98: b8 cf ff 11 00 mov $0x11ffcf,%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)( 10be9d: 83 ec 0c sub $0xc,%esp 10bea0: 52 push %edx 10bea1: ff 75 b4 pushl -0x4c(%ebp) 10bea4: 50 push %eax 10bea5: ff 75 cc pushl -0x34(%ebp) 10bea8: ff 75 e0 pushl -0x20(%ebp) 10beab: 57 push %edi 10beac: 68 ba 02 12 00 push $0x1202ba 10beb1: 6a 00 push $0x0 10beb3: ff 75 dc pushl -0x24(%ebp) 10beb6: 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 ) { 10beb9: 8b 03 mov (%ebx),%eax 10bebb: 83 c4 30 add $0x30,%esp 10bebe: 39 45 e0 cmp %eax,-0x20(%ebp) 10bec1: 74 16 je 10bed9 <_Heap_Walk+0x2c3> 10bec3: 89 d9 mov %ebx,%ecx 10bec5: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bec8: 56 push %esi 10bec9: 51 push %ecx 10beca: 50 push %eax 10becb: ff 75 e0 pushl -0x20(%ebp) 10bece: 57 push %edi 10becf: 68 ef 02 12 00 push $0x1202ef 10bed4: e9 b4 fe ff ff jmp 10bd8d <_Heap_Walk+0x177> ); return false; } if ( !prev_used ) { 10bed9: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10bedd: 75 0b jne 10beea <_Heap_Walk+0x2d4> 10bedf: 8b 5d dc mov -0x24(%ebp),%ebx (*printer)( 10bee2: 57 push %edi 10bee3: 68 28 03 12 00 push $0x120328 10bee8: eb 19 jmp 10bf03 <_Heap_Walk+0x2ed> block = next_block; } while ( block != first_block ); return true; } 10beea: 8b 46 08 mov 0x8(%esi),%eax 10beed: eb 07 jmp 10bef6 <_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 ) { 10beef: 39 f8 cmp %edi,%eax 10bef1: 74 4a je 10bf3d <_Heap_Walk+0x327> return true; } free_block = free_block->next; 10bef3: 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 ) { 10bef6: 39 f0 cmp %esi,%eax 10bef8: 75 f5 jne 10beef <_Heap_Walk+0x2d9> 10befa: 8b 5d dc mov -0x24(%ebp),%ebx return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10befd: 57 push %edi 10befe: 68 93 03 12 00 push $0x120393 10bf03: 6a 01 push $0x1 10bf05: 53 push %ebx 10bf06: ff 55 e4 call *-0x1c(%ebp) 10bf09: 83 c4 10 add $0x10,%esp 10bf0c: e9 85 fe ff ff jmp 10bd96 <_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) { 10bf11: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp) 10bf15: 74 0e je 10bf25 <_Heap_Walk+0x30f> (*printer)( 10bf17: 83 ec 0c sub $0xc,%esp 10bf1a: ff 75 e0 pushl -0x20(%ebp) 10bf1d: 57 push %edi 10bf1e: 68 57 03 12 00 push $0x120357 10bf23: eb 0d jmp 10bf32 <_Heap_Walk+0x31c> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10bf25: 51 push %ecx 10bf26: 51 push %ecx 10bf27: ff 37 pushl (%edi) 10bf29: ff 75 e0 pushl -0x20(%ebp) 10bf2c: 57 push %edi 10bf2d: 68 6e 03 12 00 push $0x12036e 10bf32: 6a 00 push $0x0 10bf34: ff 75 dc pushl -0x24(%ebp) 10bf37: ff 55 e4 call *-0x1c(%ebp) 10bf3a: 83 c4 20 add $0x20,%esp block->prev_size ); } block = next_block; } while ( block != first_block ); 10bf3d: 3b 5d d0 cmp -0x30(%ebp),%ebx 10bf40: 0f 85 66 fe ff ff jne 10bdac <_Heap_Walk+0x196> return true; 10bf46: b0 01 mov $0x1,%al } 10bf48: 8d 65 f4 lea -0xc(%ebp),%esp 10bf4b: 5b pop %ebx 10bf4c: 5e pop %esi 10bf4d: 5f pop %edi 10bf4e: c9 leave 10bf4f: c3 ret =============================================================================== 0010b238 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b238: 55 push %ebp 10b239: 89 e5 mov %esp,%ebp 10b23b: 53 push %ebx 10b23c: 83 ec 08 sub $0x8,%esp 10b23f: 8b 45 08 mov 0x8(%ebp),%eax 10b242: 8b 55 0c mov 0xc(%ebp),%edx 10b245: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b248: a3 d8 53 12 00 mov %eax,0x1253d8 _Internal_errors_What_happened.is_internal = is_internal; 10b24d: 88 15 dc 53 12 00 mov %dl,0x1253dc _Internal_errors_What_happened.the_error = the_error; 10b253: 89 1d e0 53 12 00 mov %ebx,0x1253e0 _User_extensions_Fatal( the_source, is_internal, the_error ); 10b259: 53 push %ebx 10b25a: 0f b6 d2 movzbl %dl,%edx 10b25d: 52 push %edx 10b25e: 50 push %eax 10b25f: e8 27 1a 00 00 call 10cc8b <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b264: c7 05 9c 54 12 00 05 movl $0x5,0x12549c <== NOT EXECUTED 10b26b: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b26e: fa cli <== NOT EXECUTED 10b26f: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b271: f4 hlt <== NOT EXECUTED 10b272: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b275: eb fe jmp 10b275 <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 0010b2c8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b2c8: 55 push %ebp 10b2c9: 89 e5 mov %esp,%ebp 10b2cb: 56 push %esi 10b2cc: 53 push %ebx 10b2cd: 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; 10b2d0: 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 ) 10b2d2: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b2d6: 74 53 je 10b32b <_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 ); 10b2d8: 8d 73 20 lea 0x20(%ebx),%esi 10b2db: 83 ec 0c sub $0xc,%esp 10b2de: 56 push %esi 10b2df: e8 38 f7 ff ff call 10aa1c <_Chain_Get> 10b2e4: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b2e6: 83 c4 10 add $0x10,%esp 10b2e9: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b2ed: 74 3c je 10b32b <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b2ef: 85 c0 test %eax,%eax 10b2f1: 75 1a jne 10b30d <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b2f3: 83 ec 0c sub $0xc,%esp 10b2f6: 53 push %ebx 10b2f7: e8 60 00 00 00 call 10b35c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b2fc: 89 34 24 mov %esi,(%esp) 10b2ff: e8 18 f7 ff ff call 10aa1c <_Chain_Get> 10b304: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b306: 83 c4 10 add $0x10,%esp 10b309: 85 c0 test %eax,%eax 10b30b: 74 1e je 10b32b <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b30d: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b311: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b315: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 10b317: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b31b: 31 d2 xor %edx,%edx 10b31d: f7 f6 div %esi information->inactive_per_block[ block ]--; 10b31f: c1 e0 02 shl $0x2,%eax 10b322: 03 43 30 add 0x30(%ebx),%eax 10b325: ff 08 decl (%eax) information->inactive--; 10b327: 66 ff 4b 2c decw 0x2c(%ebx) ); } #endif return the_object; } 10b32b: 89 c8 mov %ecx,%eax 10b32d: 8d 65 f8 lea -0x8(%ebp),%esp 10b330: 5b pop %ebx 10b331: 5e pop %esi 10b332: c9 leave 10b333: c3 ret =============================================================================== 0010b64c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 10b64c: 55 push %ebp 10b64d: 89 e5 mov %esp,%ebp 10b64f: 57 push %edi 10b650: 56 push %esi 10b651: 53 push %ebx 10b652: 83 ec 0c sub $0xc,%esp 10b655: 8b 75 08 mov 0x8(%ebp),%esi 10b658: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 10b65b: 31 db xor %ebx,%ebx ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b65d: 66 85 ff test %di,%di 10b660: 74 37 je 10b699 <_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 ); 10b662: 83 ec 0c sub $0xc,%esp 10b665: 56 push %esi 10b666: e8 c5 41 00 00 call 10f830 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b66b: 83 c4 10 add $0x10,%esp 10b66e: 85 c0 test %eax,%eax 10b670: 74 27 je 10b699 <_Objects_Get_information+0x4d> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b672: 0f b7 ff movzwl %di,%edi 10b675: 39 c7 cmp %eax,%edi 10b677: 77 20 ja 10b699 <_Objects_Get_information+0x4d> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b679: 8b 04 b5 18 53 12 00 mov 0x125318(,%esi,4),%eax 10b680: 85 c0 test %eax,%eax 10b682: 74 15 je 10b699 <_Objects_Get_information+0x4d><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10b684: 8b 1c b8 mov (%eax,%edi,4),%ebx if ( !info ) 10b687: 85 db test %ebx,%ebx 10b689: 74 0e je 10b699 <_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; 10b68b: 31 c0 xor %eax,%eax 10b68d: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx) 10b692: 0f 95 c0 setne %al 10b695: f7 d8 neg %eax 10b697: 21 c3 and %eax,%ebx #endif return info; } 10b699: 89 d8 mov %ebx,%eax 10b69b: 8d 65 f4 lea -0xc(%ebp),%esp 10b69e: 5b pop %ebx 10b69f: 5e pop %esi 10b6a0: 5f pop %edi 10b6a1: c9 leave 10b6a2: c3 ret =============================================================================== 00118ab0 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118ab0: 55 push %ebp 118ab1: 89 e5 mov %esp,%ebp 118ab3: 53 push %ebx 118ab4: 8b 55 08 mov 0x8(%ebp),%edx 118ab7: 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; 118aba: b8 01 00 00 00 mov $0x1,%eax 118abf: 2b 42 08 sub 0x8(%edx),%eax 118ac2: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118ac5: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118ac9: 39 c3 cmp %eax,%ebx 118acb: 72 12 jb 118adf <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118acd: 8b 52 1c mov 0x1c(%edx),%edx 118ad0: 8b 04 82 mov (%edx,%eax,4),%eax 118ad3: 85 c0 test %eax,%eax 118ad5: 74 08 je 118adf <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118ad7: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118add: eb 08 jmp 118ae7 <_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; 118adf: c7 01 01 00 00 00 movl $0x1,(%ecx) return NULL; 118ae5: 31 c0 xor %eax,%eax } 118ae7: 5b pop %ebx 118ae8: c9 leave 118ae9: c3 ret =============================================================================== 0010c868 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10c868: 55 push %ebp 10c869: 89 e5 mov %esp,%ebp 10c86b: 53 push %ebx 10c86c: 83 ec 14 sub $0x14,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10c86f: 8b 45 08 mov 0x8(%ebp),%eax 10c872: 85 c0 test %eax,%eax 10c874: 75 08 jne 10c87e <_Objects_Id_to_name+0x16> 10c876: a1 d4 78 12 00 mov 0x1278d4,%eax 10c87b: 8b 40 08 mov 0x8(%eax),%eax 10c87e: 89 c2 mov %eax,%edx 10c880: c1 ea 18 shr $0x18,%edx 10c883: 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 ) 10c886: 8d 4a ff lea -0x1(%edx),%ecx the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 10c889: bb 03 00 00 00 mov $0x3,%ebx 10c88e: 83 f9 02 cmp $0x2,%ecx 10c891: 77 36 ja 10c8c9 <_Objects_Id_to_name+0x61> 10c893: eb 3b jmp 10c8d0 <_Objects_Id_to_name+0x68> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 10c895: 89 c1 mov %eax,%ecx 10c897: 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 ]; 10c89a: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10c89d: 85 d2 test %edx,%edx 10c89f: 74 28 je 10c8c9 <_Objects_Id_to_name+0x61><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10c8a1: 80 7a 38 00 cmpb $0x0,0x38(%edx) 10c8a5: 75 22 jne 10c8c9 <_Objects_Id_to_name+0x61><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 10c8a7: 51 push %ecx 10c8a8: 8d 4d f4 lea -0xc(%ebp),%ecx 10c8ab: 51 push %ecx 10c8ac: 50 push %eax 10c8ad: 52 push %edx 10c8ae: e8 5d ff ff ff call 10c810 <_Objects_Get> if ( !the_object ) 10c8b3: 83 c4 10 add $0x10,%esp 10c8b6: 85 c0 test %eax,%eax 10c8b8: 74 0f je 10c8c9 <_Objects_Id_to_name+0x61> return OBJECTS_INVALID_ID; *name = the_object->name; 10c8ba: 8b 50 0c mov 0xc(%eax),%edx 10c8bd: 8b 45 0c mov 0xc(%ebp),%eax 10c8c0: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c8c2: e8 67 0a 00 00 call 10d32e <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10c8c7: 31 db xor %ebx,%ebx } 10c8c9: 89 d8 mov %ebx,%eax 10c8cb: 8b 5d fc mov -0x4(%ebp),%ebx 10c8ce: c9 leave 10c8cf: 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 ] ) 10c8d0: 8b 14 95 84 73 12 00 mov 0x127384(,%edx,4),%edx 10c8d7: 85 d2 test %edx,%edx 10c8d9: 75 ba jne 10c895 <_Objects_Id_to_name+0x2d> 10c8db: eb ec jmp 10c8c9 <_Objects_Id_to_name+0x61> =============================================================================== 0010e2bc <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 10e2bc: 55 push %ebp 10e2bd: 89 e5 mov %esp,%ebp 10e2bf: 57 push %edi 10e2c0: 56 push %esi 10e2c1: 53 push %ebx 10e2c2: 83 ec 30 sub $0x30,%esp 10e2c5: 8b 75 08 mov 0x8(%ebp),%esi 10e2c8: 8b 5d 14 mov 0x14(%ebp),%ebx 10e2cb: 8a 55 18 mov 0x18(%ebp),%dl POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); 10e2ce: 8d 45 e4 lea -0x1c(%ebp),%eax RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10e2d1: 50 push %eax 10e2d2: 56 push %esi 10e2d3: 68 70 e2 12 00 push $0x12e270 10e2d8: 88 55 d4 mov %dl,-0x2c(%ebp) 10e2db: e8 f0 2a 00 00 call 110dd0 <_Objects_Get> switch ( location ) { 10e2e0: 83 c4 10 add $0x10,%esp 10e2e3: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10e2e7: 8a 55 d4 mov -0x2c(%ebp),%dl 10e2ea: 0f 85 aa 00 00 00 jne 10e39a <_POSIX_Message_queue_Receive_support+0xde> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 10e2f0: 8b 78 14 mov 0x14(%eax),%edi 10e2f3: 89 f9 mov %edi,%ecx 10e2f5: 83 e1 03 and $0x3,%ecx 10e2f8: 49 dec %ecx 10e2f9: 75 0a jne 10e305 <_POSIX_Message_queue_Receive_support+0x49> _Thread_Enable_dispatch(); 10e2fb: e8 ea 35 00 00 call 1118ea <_Thread_Enable_dispatch> 10e300: e9 95 00 00 00 jmp 10e39a <_POSIX_Message_queue_Receive_support+0xde> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 10e305: 8b 40 10 mov 0x10(%eax),%eax if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 10e308: 8b 48 68 mov 0x68(%eax),%ecx 10e30b: 39 4d 10 cmp %ecx,0x10(%ebp) 10e30e: 73 15 jae 10e325 <_POSIX_Message_queue_Receive_support+0x69> _Thread_Enable_dispatch(); 10e310: e8 d5 35 00 00 call 1118ea <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 10e315: e8 da 8a 00 00 call 116df4 <__errno> 10e31a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 10e320: e9 80 00 00 00 jmp 10e3a5 <_POSIX_Message_queue_Receive_support+0xe9> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 10e325: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 10e32c: 31 c9 xor %ecx,%ecx 10e32e: 84 d2 test %dl,%dl 10e330: 74 09 je 10e33b <_POSIX_Message_queue_Receive_support+0x7f><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 10e332: 81 e7 00 40 00 00 and $0x4000,%edi 10e338: 0f 94 c1 sete %cl do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 10e33b: 52 push %edx 10e33c: 52 push %edx 10e33d: ff 75 1c pushl 0x1c(%ebp) 10e340: 0f b6 c9 movzbl %cl,%ecx 10e343: 51 push %ecx 10e344: 8d 55 e0 lea -0x20(%ebp),%edx 10e347: 52 push %edx 10e348: ff 75 0c pushl 0xc(%ebp) 10e34b: 56 push %esi 10e34c: 83 c0 1c add $0x1c,%eax 10e34f: 50 push %eax 10e350: e8 7f 1c 00 00 call 10ffd4 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 10e355: 83 c4 20 add $0x20,%esp 10e358: e8 8d 35 00 00 call 1118ea <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 10e35d: a1 e8 e2 12 00 mov 0x12e2e8,%eax RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 10e362: 8b 50 24 mov 0x24(%eax),%edx 10e365: c1 fa 1f sar $0x1f,%edx 10e368: 8b 48 24 mov 0x24(%eax),%ecx 10e36b: 31 d1 xor %edx,%ecx 10e36d: 89 0b mov %ecx,(%ebx) 10e36f: 29 13 sub %edx,(%ebx) if ( !_Thread_Executing->Wait.return_code ) 10e371: 83 78 34 00 cmpl $0x0,0x34(%eax) 10e375: 75 05 jne 10e37c <_POSIX_Message_queue_Receive_support+0xc0> return length_out; 10e377: 8b 45 e0 mov -0x20(%ebp),%eax 10e37a: eb 2c jmp 10e3a8 <_POSIX_Message_queue_Receive_support+0xec> rtems_set_errno_and_return_minus_one( 10e37c: e8 73 8a 00 00 call 116df4 <__errno> 10e381: 89 c3 mov %eax,%ebx 10e383: 83 ec 0c sub $0xc,%esp 10e386: a1 e8 e2 12 00 mov 0x12e2e8,%eax 10e38b: ff 70 34 pushl 0x34(%eax) 10e38e: e8 ed 01 00 00 call 10e580 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 10e393: 89 03 mov %eax,(%ebx) 10e395: 83 c4 10 add $0x10,%esp 10e398: eb 0b jmp 10e3a5 <_POSIX_Message_queue_Receive_support+0xe9> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10e39a: e8 55 8a 00 00 call 116df4 <__errno> 10e39f: c7 00 09 00 00 00 movl $0x9,(%eax) 10e3a5: 83 c8 ff or $0xffffffff,%eax } 10e3a8: 8d 65 f4 lea -0xc(%ebp),%esp 10e3ab: 5b pop %ebx 10e3ac: 5e pop %esi 10e3ad: 5f pop %edi 10e3ae: c9 leave 10e3af: c3 ret =============================================================================== 0010e97c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 10e97c: 55 push %ebp 10e97d: 89 e5 mov %esp,%ebp 10e97f: 83 ec 08 sub $0x8,%esp 10e982: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e985: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10e98b: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax) 10e992: 75 2c jne 10e9c0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN 10e994: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax) 10e99b: 75 23 jne 10e9c0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 10e99d: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) 10e9a4: 74 1a je 10e9c0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e9a6: a1 50 63 12 00 mov 0x126350,%eax 10e9ab: 48 dec %eax 10e9ac: a3 50 63 12 00 mov %eax,0x126350 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 10e9b1: 50 push %eax 10e9b2: 50 push %eax 10e9b3: 6a ff push $0xffffffff 10e9b5: 52 push %edx 10e9b6: e8 51 08 00 00 call 10f20c <_POSIX_Thread_Exit> 10e9bb: 83 c4 10 add $0x10,%esp } else _Thread_Enable_dispatch(); } 10e9be: c9 leave 10e9bf: c3 ret 10e9c0: c9 leave thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 10e9c1: e9 7c db ff ff jmp 10c542 <_Thread_Enable_dispatch> =============================================================================== 0010fc04 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 10fc04: 55 push %ebp 10fc05: 89 e5 mov %esp,%ebp 10fc07: 57 push %edi 10fc08: 56 push %esi 10fc09: 53 push %ebx 10fc0a: 83 ec 28 sub $0x28,%esp 10fc0d: 8b 55 08 mov 0x8(%ebp),%edx 10fc10: 8b 5d 0c mov 0xc(%ebp),%ebx 10fc13: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10fc16: ff 33 pushl (%ebx) 10fc18: 89 55 e0 mov %edx,-0x20(%ebp) 10fc1b: e8 c4 ff ff ff call 10fbe4 <_POSIX_Priority_Is_valid> 10fc20: 83 c4 10 add $0x10,%esp return EINVAL; 10fc23: be 16 00 00 00 mov $0x16,%esi struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 10fc28: 84 c0 test %al,%al 10fc2a: 8b 55 e0 mov -0x20(%ebp),%edx 10fc2d: 0f 84 a4 00 00 00 je 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 10fc33: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 10fc39: 8b 45 14 mov 0x14(%ebp),%eax 10fc3c: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 10fc42: 85 d2 test %edx,%edx 10fc44: 75 0b jne 10fc51 <_POSIX_Thread_Translate_sched_param+0x4d> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 10fc46: c7 07 01 00 00 00 movl $0x1,(%edi) 10fc4c: e9 83 00 00 00 jmp 10fcd4 <_POSIX_Thread_Translate_sched_param+0xd0> return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 10fc51: 31 f6 xor %esi,%esi if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 10fc53: 83 fa 01 cmp $0x1,%edx 10fc56: 74 7f je 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 10fc58: 83 fa 02 cmp $0x2,%edx 10fc5b: 75 08 jne 10fc65 <_POSIX_Thread_Translate_sched_param+0x61> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 10fc5d: c7 07 02 00 00 00 movl $0x2,(%edi) return 0; 10fc63: eb 72 jmp 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; 10fc65: be 16 00 00 00 mov $0x16,%esi if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 10fc6a: 83 fa 04 cmp $0x4,%edx 10fc6d: 75 68 jne 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> if ( (param->sched_ss_repl_period.tv_sec == 0) && 10fc6f: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10fc73: 75 06 jne 10fc7b <_POSIX_Thread_Translate_sched_param+0x77> 10fc75: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10fc79: 74 5c je 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 10fc7b: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10fc7f: 75 0b jne 10fc8c <_POSIX_Thread_Translate_sched_param+0x88> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; 10fc81: be 16 00 00 00 mov $0x16,%esi if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 10fc86: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10fc8a: 74 4b je 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10fc8c: 83 ec 0c sub $0xc,%esp 10fc8f: 8d 43 08 lea 0x8(%ebx),%eax 10fc92: 50 push %eax 10fc93: e8 0c de ff ff call 10daa4 <_Timespec_To_ticks> 10fc98: 89 45 e4 mov %eax,-0x1c(%ebp) _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 10fc9b: 8d 43 10 lea 0x10(%ebx),%eax 10fc9e: 89 04 24 mov %eax,(%esp) 10fca1: e8 fe dd ff ff call 10daa4 <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10fca6: 83 c4 10 add $0x10,%esp _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 10fca9: be 16 00 00 00 mov $0x16,%esi if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 10fcae: 39 45 e4 cmp %eax,-0x1c(%ebp) 10fcb1: 72 24 jb 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 10fcb3: 83 ec 0c sub $0xc,%esp 10fcb6: ff 73 04 pushl 0x4(%ebx) 10fcb9: e8 26 ff ff ff call 10fbe4 <_POSIX_Priority_Is_valid> 10fcbe: 83 c4 10 add $0x10,%esp 10fcc1: 84 c0 test %al,%al 10fcc3: 74 12 je 10fcd7 <_POSIX_Thread_Translate_sched_param+0xd3> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 10fcc5: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 10fccb: 8b 45 14 mov 0x14(%ebp),%eax 10fcce: c7 00 ed a7 10 00 movl $0x10a7ed,(%eax) return 0; 10fcd4: 66 31 f6 xor %si,%si } return EINVAL; } 10fcd7: 89 f0 mov %esi,%eax 10fcd9: 8d 65 f4 lea -0xc(%ebp),%esp 10fcdc: 5b pop %ebx 10fcdd: 5e pop %esi 10fcde: 5f pop %edi 10fcdf: c9 leave 10fce0: c3 ret =============================================================================== 0010a4f0 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10a4f0: 55 push %ebp 10a4f1: 89 e5 mov %esp,%ebp 10a4f3: 57 push %edi 10a4f4: 56 push %esi 10a4f5: 53 push %ebx 10a4f6: 83 ec 6c sub $0x6c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10a4f9: 8b 3d 40 22 12 00 mov 0x122240,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10a4ff: 8b 15 3c 22 12 00 mov 0x12223c,%edx if ( !user_threads || maximum == 0 ) 10a505: 85 d2 test %edx,%edx 10a507: 74 54 je 10a55d <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a509: 85 ff test %edi,%edi 10a50b: 74 50 je 10a55d <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN 10a50d: 31 db xor %ebx,%ebx for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10a50f: 8d 75 a4 lea -0x5c(%ebp),%esi 10a512: 83 ec 0c sub $0xc,%esp 10a515: 56 push %esi 10a516: 89 55 94 mov %edx,-0x6c(%ebp) 10a519: e8 c6 57 00 00 call 10fce4 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10a51e: 5a pop %edx 10a51f: 59 pop %ecx 10a520: 6a 02 push $0x2 10a522: 56 push %esi 10a523: e8 e4 57 00 00 call 10fd0c (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10a528: 59 pop %ecx 10a529: 58 pop %eax 10a52a: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10a52e: 56 push %esi 10a52f: e8 04 58 00 00 call 10fd38 status = pthread_create( 10a534: 6a 00 push $0x0 10a536: ff 34 df pushl (%edi,%ebx,8) 10a539: 56 push %esi 10a53a: 8d 45 e4 lea -0x1c(%ebp),%eax 10a53d: 50 push %eax 10a53e: e8 e5 fc ff ff call 10a228 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10a543: 83 c4 20 add $0x20,%esp 10a546: 85 c0 test %eax,%eax 10a548: 8b 55 94 mov -0x6c(%ebp),%edx 10a54b: 74 0b je 10a558 <_POSIX_Threads_Initialize_user_threads_body+0x68> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10a54d: 52 push %edx 10a54e: 50 push %eax 10a54f: 6a 01 push $0x1 10a551: 6a 02 push $0x2 10a553: e8 e8 1b 00 00 call 10c140 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 10a558: 43 inc %ebx 10a559: 39 d3 cmp %edx,%ebx 10a55b: 72 b5 jb 10a512 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10a55d: 8d 65 f4 lea -0xc(%ebp),%esp 10a560: 5b pop %ebx 10a561: 5e pop %esi 10a562: 5f pop %edi 10a563: c9 leave 10a564: c3 ret =============================================================================== 0010ed6f <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 10ed6f: 55 push %ebp 10ed70: 89 e5 mov %esp,%ebp 10ed72: 56 push %esi 10ed73: 53 push %ebx 10ed74: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10ed77: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 10ed7d: 83 ec 0c sub $0xc,%esp 10ed80: 8d 86 98 00 00 00 lea 0x98(%esi),%eax 10ed86: 50 push %eax 10ed87: e8 7c 0d 00 00 call 10fb08 <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 10ed8c: 89 43 78 mov %eax,0x78(%ebx) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10ed8f: 0f b6 05 24 12 12 00 movzbl 0x121224,%eax 10ed96: 2b 86 88 00 00 00 sub 0x88(%esi),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 10ed9c: 89 43 18 mov %eax,0x18(%ebx) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10ed9f: 83 c4 10 add $0x10,%esp 10eda2: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx) 10eda6: 75 12 jne 10edba <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 10eda8: 39 43 14 cmp %eax,0x14(%ebx) 10edab: 76 0d jbe 10edba <_POSIX_Threads_Sporadic_budget_TSR+0x4b> _Thread_Change_priority( the_thread, new_priority, true ); 10edad: 52 push %edx 10edae: 6a 01 push $0x1 10edb0: 50 push %eax 10edb1: 53 push %ebx 10edb2: e8 0d d0 ff ff call 10bdc4 <_Thread_Change_priority> 10edb7: 83 c4 10 add $0x10,%esp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 10edba: 83 ec 0c sub $0xc,%esp 10edbd: 8d 86 90 00 00 00 lea 0x90(%esi),%eax 10edc3: 50 push %eax 10edc4: e8 3f 0d 00 00 call 10fb08 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10edc9: 89 86 b4 00 00 00 mov %eax,0xb4(%esi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10edcf: 83 c4 10 add $0x10,%esp _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 10edd2: 81 c6 a8 00 00 00 add $0xa8,%esi 10edd8: 89 75 0c mov %esi,0xc(%ebp) 10eddb: c7 45 08 04 54 12 00 movl $0x125404,0x8(%ebp) } 10ede2: 8d 65 f8 lea -0x8(%ebp),%esp 10ede5: 5b pop %ebx 10ede6: 5e pop %esi 10ede7: c9 leave 10ede8: e9 bf df ff ff jmp 10cdac <_Watchdog_Insert> =============================================================================== 0010eded <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 10eded: 55 push %ebp 10edee: 89 e5 mov %esp,%ebp 10edf0: 83 ec 08 sub $0x8,%esp 10edf3: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10edf6: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 10edfc: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) 10ee03: 0f b6 15 24 12 12 00 movzbl 0x121224,%edx 10ee0a: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 10ee10: 89 50 18 mov %edx,0x18(%eax) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 10ee13: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10ee17: 75 12 jne 10ee2b <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 10ee19: 39 50 14 cmp %edx,0x14(%eax) 10ee1c: 73 0d jae 10ee2b <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 10ee1e: 51 push %ecx 10ee1f: 6a 01 push $0x1 10ee21: 52 push %edx 10ee22: 50 push %eax 10ee23: e8 9c cf ff ff call 10bdc4 <_Thread_Change_priority> 10ee28: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 10ee2b: c9 leave 10ee2c: c3 ret =============================================================================== 0010a2b0 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 10a2b0: 55 push %ebp 10a2b1: 89 e5 mov %esp,%ebp 10a2b3: 53 push %ebx 10a2b4: 83 ec 04 sub $0x4,%esp 10a2b7: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10a2ba: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10a2bd: 83 7b 54 00 cmpl $0x0,0x54(%ebx) 10a2c1: 75 06 jne 10a2c9 <_POSIX_Timer_TSR+0x19> 10a2c3: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 10a2c7: 74 34 je 10a2fd <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 10a2c9: 83 ec 0c sub $0xc,%esp 10a2cc: 53 push %ebx 10a2cd: 68 b0 a2 10 00 push $0x10a2b0 10a2d2: ff 73 08 pushl 0x8(%ebx) 10a2d5: ff 73 64 pushl 0x64(%ebx) 10a2d8: 8d 43 10 lea 0x10(%ebx),%eax 10a2db: 50 push %eax 10a2dc: e8 df 56 00 00 call 10f9c0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10a2e1: 83 c4 20 add $0x20,%esp 10a2e4: 84 c0 test %al,%al 10a2e6: 74 30 je 10a318 <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10a2e8: 83 ec 0c sub $0xc,%esp 10a2eb: 8d 43 6c lea 0x6c(%ebx),%eax 10a2ee: 50 push %eax 10a2ef: e8 5c 14 00 00 call 10b750 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a2f4: c6 43 3c 03 movb $0x3,0x3c(%ebx) 10a2f8: 83 c4 10 add $0x10,%esp 10a2fb: eb 04 jmp 10a301 <_POSIX_Timer_TSR+0x51> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a2fd: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 10a301: 50 push %eax 10a302: 50 push %eax 10a303: ff 73 44 pushl 0x44(%ebx) 10a306: ff 73 38 pushl 0x38(%ebx) 10a309: e8 86 52 00 00 call 10f594 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10a30e: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10a315: 83 c4 10 add $0x10,%esp } 10a318: 8b 5d fc mov -0x4(%ebp),%ebx 10a31b: c9 leave 10a31c: c3 ret =============================================================================== 00110ae8 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 110ae8: 55 push %ebp 110ae9: 89 e5 mov %esp,%ebp 110aeb: 57 push %edi 110aec: 56 push %esi 110aed: 53 push %ebx 110aee: 83 ec 68 sub $0x68,%esp 110af1: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 110af4: 6a 01 push $0x1 110af6: 0f b6 45 10 movzbl 0x10(%ebp),%eax 110afa: 50 push %eax 110afb: 8d 45 dc lea -0x24(%ebp),%eax 110afe: 50 push %eax 110aff: 53 push %ebx 110b00: ff 75 08 pushl 0x8(%ebp) 110b03: e8 8c 00 00 00 call 110b94 <_POSIX_signals_Clear_signals> 110b08: 83 c4 20 add $0x20,%esp is_global, true ) ) return false; 110b0b: 31 c9 xor %ecx,%ecx { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 110b0d: 84 c0 test %al,%al 110b0f: 74 78 je 110b89 <_POSIX_signals_Check_signal+0xa1> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 110b11: 6b d3 0c imul $0xc,%ebx,%edx 110b14: 8b 82 a4 58 12 00 mov 0x1258a4(%edx),%eax 110b1a: 83 f8 01 cmp $0x1,%eax 110b1d: 74 6a je 110b89 <_POSIX_signals_Check_signal+0xa1><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 110b1f: 8b 4d 08 mov 0x8(%ebp),%ecx 110b22: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx 110b28: 89 4d a4 mov %ecx,-0x5c(%ebp) api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 110b2b: 0b 8a a0 58 12 00 or 0x1258a0(%edx),%ecx 110b31: 8b 75 08 mov 0x8(%ebp),%esi 110b34: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 110b3a: 8d 7d b4 lea -0x4c(%ebp),%edi 110b3d: 8b 35 68 58 12 00 mov 0x125868,%esi 110b43: 83 c6 20 add $0x20,%esi 110b46: b9 0a 00 00 00 mov $0xa,%ecx 110b4b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 110b4d: 83 ba 9c 58 12 00 02 cmpl $0x2,0x12589c(%edx) 110b54: 75 09 jne 110b5f <_POSIX_signals_Check_signal+0x77> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 110b56: 52 push %edx 110b57: 6a 00 push $0x0 110b59: 8d 55 dc lea -0x24(%ebp),%edx 110b5c: 52 push %edx 110b5d: eb 03 jmp 110b62 <_POSIX_signals_Check_signal+0x7a> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 110b5f: 83 ec 0c sub $0xc,%esp 110b62: 53 push %ebx 110b63: ff d0 call *%eax break; 110b65: 83 c4 10 add $0x10,%esp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 110b68: 8b 3d 68 58 12 00 mov 0x125868,%edi 110b6e: 83 c7 20 add $0x20,%edi 110b71: 8d 75 b4 lea -0x4c(%ebp),%esi 110b74: b9 0a 00 00 00 mov $0xa,%ecx 110b79: f3 a5 rep movsl %ds:(%esi),%es:(%edi) sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 110b7b: 8b 75 a4 mov -0x5c(%ebp),%esi 110b7e: 8b 4d 08 mov 0x8(%ebp),%ecx 110b81: 89 b1 d0 00 00 00 mov %esi,0xd0(%ecx) return true; 110b87: b1 01 mov $0x1,%cl } 110b89: 88 c8 mov %cl,%al 110b8b: 8d 65 f4 lea -0xc(%ebp),%esp 110b8e: 5b pop %ebx 110b8f: 5e pop %esi 110b90: 5f pop %edi 110b91: c9 leave 110b92: c3 ret =============================================================================== 0011107c <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 11107c: 55 push %ebp 11107d: 89 e5 mov %esp,%ebp 11107f: 53 push %ebx 111080: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 111083: 9c pushf 111084: fa cli 111085: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 111086: 6b c1 0c imul $0xc,%ecx,%eax 111089: 83 b8 9c 58 12 00 02 cmpl $0x2,0x12589c(%eax) 111090: 75 0e jne 1110a0 <_POSIX_signals_Clear_process_signals+0x24> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 111092: 8d 98 98 5a 12 00 lea 0x125a98(%eax),%ebx if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 111098: 39 98 94 5a 12 00 cmp %ebx,0x125a94(%eax) 11109e: 75 0e jne 1110ae <_POSIX_signals_Clear_process_signals+0x32><== NEVER TAKEN 1110a0: 49 dec %ecx 1110a1: b8 fe ff ff ff mov $0xfffffffe,%eax clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 1110a6: d3 c0 rol %cl,%eax 1110a8: 21 05 90 5a 12 00 and %eax,0x125a90 } _ISR_Enable( level ); 1110ae: 52 push %edx 1110af: 9d popf } 1110b0: 5b pop %ebx 1110b1: c9 leave 1110b2: c3 ret =============================================================================== 0010ab58 <_POSIX_signals_Get_lowest>: #include int _POSIX_signals_Get_lowest( sigset_t set ) { 10ab58: 55 push %ebp 10ab59: 89 e5 mov %esp,%ebp 10ab5b: 56 push %esi 10ab5c: 53 push %ebx 10ab5d: 8b 55 08 mov 0x8(%ebp),%edx int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10ab60: b8 1b 00 00 00 mov $0x1b,%eax 10ab65: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_lowest( 10ab6a: 8d 48 ff lea -0x1(%eax),%ecx 10ab6d: 89 de mov %ebx,%esi 10ab6f: d3 e6 shl %cl,%esi ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10ab71: 85 d6 test %edx,%esi 10ab73: 75 1e jne 10ab93 <_POSIX_signals_Get_lowest+0x3b><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10ab75: 40 inc %eax 10ab76: 83 f8 20 cmp $0x20,%eax 10ab79: 75 ef jne 10ab6a <_POSIX_signals_Get_lowest+0x12> 10ab7b: b0 01 mov $0x1,%al 10ab7d: bb 01 00 00 00 mov $0x1,%ebx #include #include #include #include int _POSIX_signals_Get_lowest( 10ab82: 8d 48 ff lea -0x1(%eax),%ecx 10ab85: 89 de mov %ebx,%esi 10ab87: d3 e6 shl %cl,%esi #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10ab89: 85 d6 test %edx,%esi 10ab8b: 75 06 jne 10ab93 <_POSIX_signals_Get_lowest+0x3b> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10ab8d: 40 inc %eax 10ab8e: 83 f8 1b cmp $0x1b,%eax 10ab91: 75 ef jne 10ab82 <_POSIX_signals_Get_lowest+0x2a><== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10ab93: 5b pop %ebx 10ab94: 5e pop %esi 10ab95: c9 leave 10ab96: c3 ret =============================================================================== 00122140 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 122140: 55 push %ebp 122141: 89 e5 mov %esp,%ebp 122143: 57 push %edi 122144: 56 push %esi 122145: 53 push %ebx 122146: 83 ec 0c sub $0xc,%esp 122149: 8b 5d 08 mov 0x8(%ebp),%ebx 12214c: 8b 75 0c mov 0xc(%ebp),%esi POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 12214f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 122155: 8d 4e ff lea -0x1(%esi),%ecx 122158: ba 01 00 00 00 mov $0x1,%edx 12215d: d3 e2 shl %cl,%edx /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 12215f: 8b 4b 10 mov 0x10(%ebx),%ecx 122162: 89 cf mov %ecx,%edi 122164: 81 e7 00 80 00 10 and $0x10008000,%edi 12216a: 81 ff 00 80 00 10 cmp $0x10008000,%edi 122170: 75 58 jne 1221ca <_POSIX_signals_Unblock_thread+0x8a> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 122172: 85 53 30 test %edx,0x30(%ebx) 122175: 75 12 jne 122189 <_POSIX_signals_Unblock_thread+0x49> 122177: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 12217d: f7 d0 not %eax /* * This should only be reached via pthread_kill(). */ return false; 12217f: 31 ff xor %edi,%edi * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 122181: 85 c2 test %eax,%edx 122183: 0f 84 b0 00 00 00 je 122239 <_POSIX_signals_Unblock_thread+0xf9> the_thread->Wait.return_code = EINTR; 122189: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 122190: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 122193: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 122197: 75 12 jne 1221ab <_POSIX_signals_Unblock_thread+0x6b> the_info->si_signo = signo; 122199: 89 30 mov %esi,(%eax) the_info->si_code = SI_USER; 12219b: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 1221a2: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 1221a9: eb 0c jmp 1221b7 <_POSIX_signals_Unblock_thread+0x77> } else { *the_info = *info; 1221ab: b9 03 00 00 00 mov $0x3,%ecx 1221b0: 89 c7 mov %eax,%edi 1221b2: 8b 75 10 mov 0x10(%ebp),%esi 1221b5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 1221b7: 83 ec 0c sub $0xc,%esp 1221ba: 53 push %ebx 1221bb: e8 bc ed fe ff call 110f7c <_Thread_queue_Extract_with_proxy> return true; 1221c0: 83 c4 10 add $0x10,%esp 1221c3: bf 01 00 00 00 mov $0x1,%edi 1221c8: eb 6f jmp 122239 <_POSIX_signals_Unblock_thread+0xf9> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1221ca: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax 1221d0: f7 d0 not %eax } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 1221d2: 31 ff xor %edi,%edi } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1221d4: 85 c2 test %eax,%edx 1221d6: 74 61 je 122239 <_POSIX_signals_Unblock_thread+0xf9> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 1221d8: f7 c1 00 00 00 10 test $0x10000000,%ecx 1221de: 74 3d je 12221d <_POSIX_signals_Unblock_thread+0xdd> the_thread->Wait.return_code = EINTR; 1221e0: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 1221e7: f7 c1 e0 be 03 00 test $0x3bee0,%ecx 1221ed: 74 0b je 1221fa <_POSIX_signals_Unblock_thread+0xba> _Thread_queue_Extract_with_proxy( the_thread ); 1221ef: 83 ec 0c sub $0xc,%esp 1221f2: 53 push %ebx 1221f3: e8 84 ed fe ff call 110f7c <_Thread_queue_Extract_with_proxy> 1221f8: eb 1e jmp 122218 <_POSIX_signals_Unblock_thread+0xd8> else if ( _States_Is_delaying(the_thread->current_state) ) { 1221fa: 80 e1 08 and $0x8,%cl 1221fd: 74 3a je 122239 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 1221ff: 83 ec 0c sub $0xc,%esp 122202: 8d 43 48 lea 0x48(%ebx),%eax 122205: 50 push %eax 122206: e8 81 f4 fe ff call 11168c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 12220b: 58 pop %eax 12220c: 5a pop %edx 12220d: 68 f8 ff 03 10 push $0x1003fff8 122212: 53 push %ebx 122213: e8 2c e4 fe ff call 110644 <_Thread_Clear_state> 122218: 83 c4 10 add $0x10,%esp 12221b: eb 1c jmp 122239 <_POSIX_signals_Unblock_thread+0xf9> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 12221d: 85 c9 test %ecx,%ecx 12221f: 75 18 jne 122239 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 122221: 83 3d d8 b9 12 00 00 cmpl $0x0,0x12b9d8 122228: 74 0f je 122239 <_POSIX_signals_Unblock_thread+0xf9> 12222a: 3b 1d dc b9 12 00 cmp 0x12b9dc,%ebx 122230: 75 07 jne 122239 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN _Thread_Dispatch_necessary = true; 122232: c6 05 e8 b9 12 00 01 movb $0x1,0x12b9e8 } } return false; } 122239: 89 f8 mov %edi,%eax 12223b: 8d 65 f4 lea -0xc(%ebp),%esp 12223e: 5b pop %ebx 12223f: 5e pop %esi 122240: 5f pop %edi 122241: c9 leave 122242: c3 ret =============================================================================== 0010b3a8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10b3a8: 55 push %ebp 10b3a9: 89 e5 mov %esp,%ebp 10b3ab: 53 push %ebx 10b3ac: 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 ); 10b3af: 8d 45 f4 lea -0xc(%ebp),%eax 10b3b2: 50 push %eax 10b3b3: ff 75 08 pushl 0x8(%ebp) 10b3b6: 68 74 83 12 00 push $0x128374 10b3bb: e8 c8 1a 00 00 call 10ce88 <_Objects_Get> 10b3c0: 89 c3 mov %eax,%ebx switch ( location ) { 10b3c2: 83 c4 10 add $0x10,%esp 10b3c5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10b3c9: 75 64 jne 10b42f <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10b3cb: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10b3ce: f6 40 11 40 testb $0x40,0x11(%eax) 10b3d2: 74 18 je 10b3ec <_Rate_monotonic_Timeout+0x44> 10b3d4: 8b 53 08 mov 0x8(%ebx),%edx 10b3d7: 39 50 20 cmp %edx,0x20(%eax) 10b3da: 75 10 jne 10b3ec <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b3dc: 52 push %edx 10b3dd: 52 push %edx 10b3de: 68 f8 ff 03 10 push $0x1003fff8 10b3e3: 50 push %eax 10b3e4: e8 2f 22 00 00 call 10d618 <_Thread_Clear_state> the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 10b3e9: 59 pop %ecx 10b3ea: eb 10 jmp 10b3fc <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 10b3ec: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 10b3f0: 75 2b jne 10b41d <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 10b3f2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 10b3f9: 83 ec 0c sub $0xc,%esp 10b3fc: 53 push %ebx 10b3fd: e8 ec fa ff ff call 10aeee <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b402: 8b 43 3c mov 0x3c(%ebx),%eax 10b405: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b408: 58 pop %eax 10b409: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 10b40a: 83 c3 10 add $0x10,%ebx 10b40d: 53 push %ebx 10b40e: 68 28 85 12 00 push $0x128528 10b413: e8 24 32 00 00 call 10e63c <_Watchdog_Insert> 10b418: 83 c4 10 add $0x10,%esp 10b41b: eb 07 jmp 10b424 <_Rate_monotonic_Timeout+0x7c> } else the_period->state = RATE_MONOTONIC_EXPIRED; 10b41d: 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; 10b424: a1 64 84 12 00 mov 0x128464,%eax 10b429: 48 dec %eax 10b42a: a3 64 84 12 00 mov %eax,0x128464 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b42f: 8b 5d fc mov -0x4(%ebp),%ebx 10b432: c9 leave 10b433: c3 ret =============================================================================== 0010ba0c <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 10ba0c: 55 push %ebp 10ba0d: 89 e5 mov %esp,%ebp 10ba0f: 56 push %esi 10ba10: 53 push %ebx 10ba11: 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; 10ba14: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx ready = sched_info->ready_chain; 10ba1a: 8b 01 mov (%ecx),%eax if ( _Chain_Has_only_one_node( ready ) ) { 10ba1c: 8b 58 08 mov 0x8(%eax),%ebx 10ba1f: 39 18 cmp %ebx,(%eax) 10ba21: 75 32 jne 10ba55 <_Scheduler_priority_Block+0x49> Chain_Node *tail = _Chain_Tail( the_chain ); 10ba23: 8d 58 04 lea 0x4(%eax),%ebx 10ba26: 89 18 mov %ebx,(%eax) head->next = tail; head->previous = NULL; 10ba28: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) tail->previous = head; 10ba2f: 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; 10ba32: 8b 59 04 mov 0x4(%ecx),%ebx 10ba35: 66 8b 03 mov (%ebx),%ax 10ba38: 66 23 41 0e and 0xe(%ecx),%ax 10ba3c: 66 89 03 mov %ax,(%ebx) if ( *the_priority_map->minor == 0 ) 10ba3f: 66 85 c0 test %ax,%ax 10ba42: 75 1b jne 10ba5f <_Scheduler_priority_Block+0x53> _Priority_Major_bit_map &= the_priority_map->block_major; 10ba44: 66 a1 78 58 12 00 mov 0x125878,%ax 10ba4a: 23 41 0c and 0xc(%ecx),%eax 10ba4d: 66 a3 78 58 12 00 mov %ax,0x125878 10ba53: eb 0a jmp 10ba5f <_Scheduler_priority_Block+0x53> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ba55: 8b 0a mov (%edx),%ecx previous = the_node->previous; 10ba57: 8b 42 04 mov 0x4(%edx),%eax next->previous = previous; 10ba5a: 89 41 04 mov %eax,0x4(%ecx) previous->next = next; 10ba5d: 89 08 mov %ecx,(%eax) _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 10ba5f: 3b 15 6c 58 12 00 cmp 0x12586c,%edx 10ba65: 75 43 jne 10baaa <_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 ); 10ba67: 66 8b 35 78 58 12 00 mov 0x125878,%si 10ba6e: 31 c9 xor %ecx,%ecx 10ba70: 89 cb mov %ecx,%ebx 10ba72: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10ba76: 0f b7 db movzwl %bx,%ebx 10ba79: 66 8b b4 1b 7c 58 12 mov 0x12587c(%ebx,%ebx,1),%si 10ba80: 00 10ba81: 66 0f bc ce bsf %si,%cx return (_Priority_Bits_index( major ) << 4) + 10ba85: c1 e3 04 shl $0x4,%ebx 10ba88: 0f b7 c9 movzwl %cx,%ecx 10ba8b: 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 ] ) ) 10ba8e: 6b c0 0c imul $0xc,%eax,%eax 10ba91: 03 05 50 11 12 00 add 0x121150,%eax _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } 10ba97: 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 ); 10ba99: 83 c0 04 add $0x4,%eax return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10ba9c: 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 ] ) ) 10ba9e: 39 c3 cmp %eax,%ebx 10baa0: 74 02 je 10baa4 <_Scheduler_priority_Block+0x98><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); 10baa2: 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( 10baa4: 89 0d 6c 58 12 00 mov %ecx,0x12586c /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 10baaa: 3b 15 68 58 12 00 cmp 0x125868,%edx 10bab0: 75 07 jne 10bab9 <_Scheduler_priority_Block+0xad> _Thread_Dispatch_necessary = true; 10bab2: c6 05 74 58 12 00 01 movb $0x1,0x125874 } 10bab9: 5b pop %ebx 10baba: 5e pop %esi 10babb: c9 leave 10babc: c3 ret =============================================================================== 0010bc0c <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 10bc0c: 55 push %ebp 10bc0d: 89 e5 mov %esp,%ebp 10bc0f: 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 ); 10bc10: 66 8b 1d 78 58 12 00 mov 0x125878,%bx 10bc17: 31 d2 xor %edx,%edx 10bc19: 89 d1 mov %edx,%ecx 10bc1b: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10bc1f: 0f b7 c9 movzwl %cx,%ecx 10bc22: 66 8b 9c 09 7c 58 12 mov 0x12587c(%ecx,%ecx,1),%bx 10bc29: 00 10bc2a: 66 0f bc d3 bsf %bx,%dx return (_Priority_Bits_index( major ) << 4) + 10bc2e: c1 e1 04 shl $0x4,%ecx 10bc31: 0f b7 d2 movzwl %dx,%edx 10bc34: 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 ] ) ) 10bc37: 6b c0 0c imul $0xc,%eax,%eax 10bc3a: 03 05 50 11 12 00 add 0x121150,%eax _Scheduler_priority_Schedule_body(); } 10bc40: 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 ); 10bc42: 83 c0 04 add $0x4,%eax return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 10bc45: 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 ] ) ) 10bc47: 39 c1 cmp %eax,%ecx 10bc49: 74 02 je 10bc4d <_Scheduler_priority_Schedule+0x41><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); 10bc4b: 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( 10bc4d: 89 15 6c 58 12 00 mov %edx,0x12586c 10bc53: 5b pop %ebx 10bc54: c9 leave 10bc55: c3 ret =============================================================================== 0010acb8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10acb8: 55 push %ebp 10acb9: 89 e5 mov %esp,%ebp 10acbb: 56 push %esi 10acbc: 53 push %ebx 10acbd: 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(); 10acc0: 8b 35 b4 4a 12 00 mov 0x124ab4,%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; 10acc6: 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) || 10acc8: 85 c9 test %ecx,%ecx 10acca: 74 57 je 10ad23 <_TOD_Validate+0x6b> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 10accc: b8 40 42 0f 00 mov $0xf4240,%eax 10acd1: 31 d2 xor %edx,%edx 10acd3: f7 f6 div %esi rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10acd5: 39 41 18 cmp %eax,0x18(%ecx) 10acd8: 73 49 jae 10ad23 <_TOD_Validate+0x6b> (the_tod->ticks >= ticks_per_second) || 10acda: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10acde: 77 43 ja 10ad23 <_TOD_Validate+0x6b> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10ace0: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10ace4: 77 3d ja 10ad23 <_TOD_Validate+0x6b> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10ace6: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10acea: 77 37 ja 10ad23 <_TOD_Validate+0x6b> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 10acec: 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) || 10acef: 85 c0 test %eax,%eax 10acf1: 74 30 je 10ad23 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->month == 0) || 10acf3: 83 f8 0c cmp $0xc,%eax 10acf6: 77 2b ja 10ad23 <_TOD_Validate+0x6b> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10acf8: 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) || 10acfa: 81 fe c3 07 00 00 cmp $0x7c3,%esi 10ad00: 76 21 jbe 10ad23 <_TOD_Validate+0x6b> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10ad02: 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) || 10ad05: 85 d2 test %edx,%edx 10ad07: 74 1a je 10ad23 <_TOD_Validate+0x6b> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10ad09: 83 e6 03 and $0x3,%esi 10ad0c: 75 09 jne 10ad17 <_TOD_Validate+0x5f> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10ad0e: 8b 04 85 a4 1c 12 00 mov 0x121ca4(,%eax,4),%eax 10ad15: eb 07 jmp 10ad1e <_TOD_Validate+0x66> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10ad17: 8b 04 85 70 1c 12 00 mov 0x121c70(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10ad1e: 39 c2 cmp %eax,%edx 10ad20: 0f 96 c3 setbe %bl if ( the_tod->day > days_in_month ) return false; return true; } 10ad23: 88 d8 mov %bl,%al 10ad25: 5b pop %ebx 10ad26: 5e pop %esi 10ad27: c9 leave 10ad28: c3 ret =============================================================================== 0010bdc4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10bdc4: 55 push %ebp 10bdc5: 89 e5 mov %esp,%ebp 10bdc7: 57 push %edi 10bdc8: 56 push %esi 10bdc9: 53 push %ebx 10bdca: 83 ec 28 sub $0x28,%esp 10bdcd: 8b 5d 08 mov 0x8(%ebp),%ebx 10bdd0: 8b 75 0c mov 0xc(%ebp),%esi 10bdd3: 8a 45 10 mov 0x10(%ebp),%al 10bdd6: 88 45 e7 mov %al,-0x19(%ebp) States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 10bdd9: 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 ); 10bddc: 53 push %ebx 10bddd: e8 5e 0b 00 00 call 10c940 <_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 ) 10bde2: 83 c4 10 add $0x10,%esp 10bde5: 39 73 14 cmp %esi,0x14(%ebx) 10bde8: 74 0c je 10bdf6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bdea: 50 push %eax 10bdeb: 50 push %eax 10bdec: 56 push %esi 10bded: 53 push %ebx 10bdee: e8 fd 0a 00 00 call 10c8f0 <_Thread_Set_priority> 10bdf3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bdf6: 9c pushf 10bdf7: fa cli 10bdf8: 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; 10bdf9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10bdfc: 83 f8 04 cmp $0x4,%eax 10bdff: 74 2b je 10be2c <_Thread_Change_priority+0x68> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10be01: 83 e7 04 and $0x4,%edi 10be04: 75 08 jne 10be0e <_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); 10be06: 89 c2 mov %eax,%edx 10be08: 83 e2 fb and $0xfffffffb,%edx 10be0b: 89 53 10 mov %edx,0x10(%ebx) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10be0e: 56 push %esi 10be0f: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10be10: a9 e0 be 03 00 test $0x3bee0,%eax 10be15: 74 65 je 10be7c <_Thread_Change_priority+0xb8> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10be17: 89 5d 0c mov %ebx,0xc(%ebp) 10be1a: 8b 43 44 mov 0x44(%ebx),%eax 10be1d: 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 ); } 10be20: 8d 65 f4 lea -0xc(%ebp),%esp 10be23: 5b pop %ebx 10be24: 5e pop %esi 10be25: 5f pop %edi 10be26: 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 ); 10be27: e9 3c 0a 00 00 jmp 10c868 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10be2c: 83 e7 04 and $0x4,%edi 10be2f: 75 26 jne 10be57 <_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 ); 10be31: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) if ( prepend_it ) 10be38: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10be3c: 74 0c je 10be4a <_Thread_Change_priority+0x86> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 10be3e: 83 ec 0c sub $0xc,%esp 10be41: 53 push %ebx 10be42: ff 15 78 11 12 00 call *0x121178 10be48: eb 0a jmp 10be54 <_Thread_Change_priority+0x90> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 10be4a: 83 ec 0c sub $0xc,%esp 10be4d: 53 push %ebx 10be4e: ff 15 74 11 12 00 call *0x121174 10be54: 83 c4 10 add $0x10,%esp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 10be57: 56 push %esi 10be58: 9d popf 10be59: 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(); 10be5a: ff 15 58 11 12 00 call *0x121158 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10be60: a1 68 58 12 00 mov 0x125868,%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() && 10be65: 3b 05 6c 58 12 00 cmp 0x12586c,%eax 10be6b: 74 0d je 10be7a <_Thread_Change_priority+0xb6> 10be6d: 80 78 74 00 cmpb $0x0,0x74(%eax) 10be71: 74 07 je 10be7a <_Thread_Change_priority+0xb6> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 10be73: c6 05 74 58 12 00 01 movb $0x1,0x125874 _ISR_Enable( level ); 10be7a: 56 push %esi 10be7b: 9d popf } 10be7c: 8d 65 f4 lea -0xc(%ebp),%esp 10be7f: 5b pop %ebx 10be80: 5e pop %esi 10be81: 5f pop %edi 10be82: c9 leave 10be83: c3 ret =============================================================================== 0010c028 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c028: 55 push %ebp 10c029: 89 e5 mov %esp,%ebp 10c02b: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c02e: 8d 45 f4 lea -0xc(%ebp),%eax 10c031: 50 push %eax 10c032: ff 75 08 pushl 0x8(%ebp) 10c035: e8 82 01 00 00 call 10c1bc <_Thread_Get> switch ( location ) { 10c03a: 83 c4 10 add $0x10,%esp 10c03d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c041: 75 1b jne 10c05e <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c043: 52 push %edx 10c044: 52 push %edx 10c045: 68 18 00 00 10 push $0x10000018 10c04a: 50 push %eax 10c04b: e8 34 fe ff ff call 10be84 <_Thread_Clear_state> 10c050: a1 40 53 12 00 mov 0x125340,%eax 10c055: 48 dec %eax 10c056: a3 40 53 12 00 mov %eax,0x125340 10c05b: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c05e: c9 leave 10c05f: c3 ret =============================================================================== 0010c060 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c060: 55 push %ebp 10c061: 89 e5 mov %esp,%ebp 10c063: 57 push %edi 10c064: 56 push %esi 10c065: 53 push %ebx 10c066: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c069: 8b 1d 68 58 12 00 mov 0x125868,%ebx _ISR_Disable( level ); 10c06f: 9c pushf 10c070: fa cli 10c071: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c072: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10c075: e9 f9 00 00 00 jmp 10c173 <_Thread_Dispatch+0x113> heir = _Thread_Heir; 10c07a: 8b 35 6c 58 12 00 mov 0x12586c,%esi _Thread_Dispatch_disable_level = 1; 10c080: c7 05 40 53 12 00 01 movl $0x1,0x125340 10c087: 00 00 00 _Thread_Dispatch_necessary = false; 10c08a: c6 05 74 58 12 00 00 movb $0x0,0x125874 _Thread_Executing = heir; 10c091: 89 35 68 58 12 00 mov %esi,0x125868 /* * 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 ) 10c097: 39 de cmp %ebx,%esi 10c099: 0f 84 e2 00 00 00 je 10c181 <_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 ) 10c09f: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c0a3: 75 09 jne 10c0ae <_Thread_Dispatch+0x4e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c0a5: 8b 15 10 53 12 00 mov 0x125310,%edx 10c0ab: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c0ae: 50 push %eax 10c0af: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c0b0: 83 ec 0c sub $0xc,%esp 10c0b3: 8d 45 e0 lea -0x20(%ebp),%eax 10c0b6: 50 push %eax 10c0b7: e8 5c 34 00 00 call 10f518 <_TOD_Get_uptime> _Timestamp_Subtract( 10c0bc: 83 c4 0c add $0xc,%esp 10c0bf: 57 push %edi 10c0c0: 8d 45 e0 lea -0x20(%ebp),%eax 10c0c3: 50 push %eax 10c0c4: 68 f0 53 12 00 push $0x1253f0 10c0c9: e8 72 0a 00 00 call 10cb40 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c0ce: 58 pop %eax 10c0cf: 5a pop %edx 10c0d0: 57 push %edi 10c0d1: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c0d7: 50 push %eax 10c0d8: e8 33 0a 00 00 call 10cb10 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c0dd: 8b 45 e0 mov -0x20(%ebp),%eax 10c0e0: 8b 55 e4 mov -0x1c(%ebp),%edx 10c0e3: a3 f0 53 12 00 mov %eax,0x1253f0 10c0e8: 89 15 f4 53 12 00 mov %edx,0x1253f4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c0ee: a1 c8 53 12 00 mov 0x1253c8,%eax 10c0f3: 83 c4 10 add $0x10,%esp 10c0f6: 85 c0 test %eax,%eax 10c0f8: 74 10 je 10c10a <_Thread_Dispatch+0xaa> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c0fa: 8b 10 mov (%eax),%edx 10c0fc: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c102: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx 10c108: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c10a: 51 push %ecx 10c10b: 51 push %ecx 10c10c: 56 push %esi 10c10d: 53 push %ebx 10c10e: e8 65 0c 00 00 call 10cd78 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c113: 58 pop %eax 10c114: 5a pop %edx 10c115: 81 c6 c8 00 00 00 add $0xc8,%esi 10c11b: 56 push %esi 10c11c: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax 10c122: 50 push %eax 10c123: e8 28 0f 00 00 call 10d050 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c128: 83 c4 10 add $0x10,%esp 10c12b: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx) 10c132: 74 36 je 10c16a <_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 ); 10c134: a1 c4 53 12 00 mov 0x1253c4,%eax 10c139: 39 c3 cmp %eax,%ebx 10c13b: 74 2d je 10c16a <_Thread_Dispatch+0x10a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c13d: 85 c0 test %eax,%eax 10c13f: 74 11 je 10c152 <_Thread_Dispatch+0xf2> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c141: 83 ec 0c sub $0xc,%esp 10c144: 05 e0 00 00 00 add $0xe0,%eax 10c149: 50 push %eax 10c14a: e8 35 0f 00 00 call 10d084 <_CPU_Context_save_fp> 10c14f: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c152: 83 ec 0c sub $0xc,%esp 10c155: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 10c15b: 50 push %eax 10c15c: e8 2d 0f 00 00 call 10d08e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c161: 89 1d c4 53 12 00 mov %ebx,0x1253c4 10c167: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c16a: 8b 1d 68 58 12 00 mov 0x125868,%ebx _ISR_Disable( level ); 10c170: 9c pushf 10c171: fa cli 10c172: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 10c173: 8a 15 74 58 12 00 mov 0x125874,%dl 10c179: 84 d2 test %dl,%dl 10c17b: 0f 85 f9 fe ff ff jne 10c07a <_Thread_Dispatch+0x1a> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 10c181: c7 05 40 53 12 00 00 movl $0x0,0x125340 10c188: 00 00 00 _ISR_Enable( level ); 10c18b: 50 push %eax 10c18c: 9d popf _API_extensions_Run_postswitch(); 10c18d: e8 49 e7 ff ff call 10a8db <_API_extensions_Run_postswitch> } 10c192: 8d 65 f4 lea -0xc(%ebp),%esp 10c195: 5b pop %ebx 10c196: 5e pop %esi 10c197: 5f pop %edi 10c198: c9 leave 10c199: c3 ret =============================================================================== 00110f30 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 110f30: 55 push %ebp 110f31: 89 e5 mov %esp,%ebp 110f33: 53 push %ebx 110f34: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 110f37: 8b 1d 68 58 12 00 mov 0x125868,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 110f3d: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax _ISR_Set_level(level); 110f43: 85 c0 test %eax,%eax 110f45: 74 03 je 110f4a <_Thread_Handler+0x1a> 110f47: fa cli 110f48: eb 01 jmp 110f4b <_Thread_Handler+0x1b> 110f4a: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 110f4b: a0 00 50 12 00 mov 0x125000,%al 110f50: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 110f53: c6 05 00 50 12 00 01 movb $0x1,0x125000 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 110f5a: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx) 110f61: 74 24 je 110f87 <_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 ); 110f63: a1 c4 53 12 00 mov 0x1253c4,%eax 110f68: 39 c3 cmp %eax,%ebx 110f6a: 74 1b je 110f87 <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 110f6c: 85 c0 test %eax,%eax 110f6e: 74 11 je 110f81 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 110f70: 83 ec 0c sub $0xc,%esp 110f73: 05 e0 00 00 00 add $0xe0,%eax 110f78: 50 push %eax 110f79: e8 06 c1 ff ff call 10d084 <_CPU_Context_save_fp> 110f7e: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 110f81: 89 1d c4 53 12 00 mov %ebx,0x1253c4 /* * 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 ); 110f87: 83 ec 0c sub $0xc,%esp 110f8a: 53 push %ebx 110f8b: e8 98 bc ff ff call 10cc28 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 110f90: e8 05 b2 ff ff call 10c19a <_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) */ { 110f95: 83 c4 10 add $0x10,%esp 110f98: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 110f9c: 75 05 jne 110fa3 <_Thread_Handler+0x73> INIT_NAME (); 110f9e: e8 2d c7 00 00 call 11d6d0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 110fa3: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 110fa9: 85 c0 test %eax,%eax 110fab: 75 0b jne 110fb8 <_Thread_Handler+0x88> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 110fad: 83 ec 0c sub $0xc,%esp 110fb0: ff b3 9c 00 00 00 pushl 0x9c(%ebx) 110fb6: eb 0c jmp 110fc4 <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 110fb8: 48 dec %eax 110fb9: 75 15 jne 110fd0 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 110fbb: 83 ec 0c sub $0xc,%esp 110fbe: ff b3 98 00 00 00 pushl 0x98(%ebx) 110fc4: ff 93 90 00 00 00 call *0x90(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 110fca: 89 43 28 mov %eax,0x28(%ebx) 110fcd: 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 ); 110fd0: 83 ec 0c sub $0xc,%esp 110fd3: 53 push %ebx 110fd4: e8 80 bc ff ff call 10cc59 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 110fd9: 83 c4 0c add $0xc,%esp 110fdc: 6a 05 push $0x5 110fde: 6a 01 push $0x1 110fe0: 6a 00 push $0x0 110fe2: e8 51 a2 ff ff call 10b238 <_Internal_error_Occurred> =============================================================================== 0010c22c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c22c: 55 push %ebp 10c22d: 89 e5 mov %esp,%ebp 10c22f: 57 push %edi 10c230: 56 push %esi 10c231: 53 push %ebx 10c232: 83 ec 1c sub $0x1c,%esp 10c235: 8b 5d 0c mov 0xc(%ebp),%ebx 10c238: 8b 4d 10 mov 0x10(%ebp),%ecx 10c23b: 8b 75 14 mov 0x14(%ebp),%esi 10c23e: 8a 55 18 mov 0x18(%ebp),%dl 10c241: 8a 45 20 mov 0x20(%ebp),%al 10c244: 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; 10c247: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx) 10c24e: 00 00 00 10c251: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10c258: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c25b: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 10c262: 00 00 00 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 10c265: 85 c9 test %ecx,%ecx 10c267: 75 31 jne 10c29a <_Thread_Initialize+0x6e> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c269: 57 push %edi 10c26a: 57 push %edi 10c26b: 56 push %esi 10c26c: 53 push %ebx 10c26d: 88 55 e0 mov %dl,-0x20(%ebp) 10c270: e8 fb 06 00 00 call 10c970 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c275: 83 c4 10 add $0x10,%esp 10c278: 39 f0 cmp %esi,%eax 10c27a: 8a 55 e0 mov -0x20(%ebp),%dl 10c27d: 0f 82 bf 01 00 00 jb 10c442 <_Thread_Initialize+0x216> 10c283: 85 c0 test %eax,%eax 10c285: 0f 84 b7 01 00 00 je 10c442 <_Thread_Initialize+0x216><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10c28b: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10c291: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx) 10c298: eb 09 jmp 10c2a3 <_Thread_Initialize+0x77> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10c29a: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx) 10c2a1: 89 f0 mov %esi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c2a3: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx) the_stack->size = size; 10c2a9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 10c2af: 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 ) { 10c2b1: 84 d2 test %dl,%dl 10c2b3: 74 17 je 10c2cc <_Thread_Initialize+0xa0> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c2b5: 83 ec 0c sub $0xc,%esp 10c2b8: 6a 6c push $0x6c 10c2ba: e8 27 0d 00 00 call 10cfe6 <_Workspace_Allocate> 10c2bf: 89 c7 mov %eax,%edi if ( !fp_area ) 10c2c1: 83 c4 10 add $0x10,%esp 10c2c4: 85 c0 test %eax,%eax 10c2c6: 0f 84 23 01 00 00 je 10c3ef <_Thread_Initialize+0x1c3> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c2cc: 89 bb e0 00 00 00 mov %edi,0xe0(%ebx) the_thread->Start.fp_context = fp_area; 10c2d2: 89 bb c0 00 00 00 mov %edi,0xc0(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c2d8: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c2df: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c2e6: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c2ed: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c2f4: a1 d4 53 12 00 mov 0x1253d4,%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; 10c2f9: 31 f6 xor %esi,%esi #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c2fb: 85 c0 test %eax,%eax 10c2fd: 74 1d je 10c31c <_Thread_Initialize+0xf0> extensions_area = _Workspace_Allocate( 10c2ff: 83 ec 0c sub $0xc,%esp 10c302: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c309: 50 push %eax 10c30a: e8 d7 0c 00 00 call 10cfe6 <_Workspace_Allocate> 10c30f: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c311: 83 c4 10 add $0x10,%esp 10c314: 85 c0 test %eax,%eax 10c316: 0f 84 d5 00 00 00 je 10c3f1 <_Thread_Initialize+0x1c5> goto failed; } the_thread->extensions = (void **) extensions_area; 10c31c: 89 b3 f0 00 00 00 mov %esi,0xf0(%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 ) { 10c322: 85 f6 test %esi,%esi 10c324: 74 16 je 10c33c <_Thread_Initialize+0x110> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c326: 8b 15 d4 53 12 00 mov 0x1253d4,%edx 10c32c: 31 c0 xor %eax,%eax 10c32e: eb 08 jmp 10c338 <_Thread_Initialize+0x10c> the_thread->extensions[i] = NULL; 10c330: 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++ ) 10c337: 40 inc %eax 10c338: 39 d0 cmp %edx,%eax 10c33a: 76 f4 jbe 10c330 <_Thread_Initialize+0x104> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c33c: 8a 45 e7 mov -0x19(%ebp),%al 10c33f: 88 83 a0 00 00 00 mov %al,0xa0(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c345: 8b 45 24 mov 0x24(%ebp),%eax 10c348: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.budget_callout = budget_callout; 10c34e: 8b 45 28 mov 0x28(%ebp),%eax 10c351: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) switch ( budget_algorithm ) { 10c357: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10c35b: 75 08 jne 10c365 <_Thread_Initialize+0x139> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c35d: a1 10 53 12 00 mov 0x125310,%eax 10c362: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c365: 8b 45 2c mov 0x2c(%ebp),%eax 10c368: 89 83 ac 00 00 00 mov %eax,0xac(%ebx) the_thread->current_state = STATES_DORMANT; 10c36e: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c375: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c37c: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) the_thread->real_priority = priority; 10c383: 8b 45 1c mov 0x1c(%ebp),%eax 10c386: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c389: 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 ); 10c38f: 83 ec 0c sub $0xc,%esp 10c392: 53 push %ebx 10c393: ff 15 68 11 12 00 call *0x121168 10c399: 89 c2 mov %eax,%edx sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 10c39b: 83 c4 10 add $0x10,%esp 10c39e: 85 c0 test %eax,%eax 10c3a0: 74 51 je 10c3f3 <_Thread_Initialize+0x1c7> goto failed; _Thread_Set_priority( the_thread, priority ); 10c3a2: 51 push %ecx 10c3a3: 51 push %ecx 10c3a4: ff 75 1c pushl 0x1c(%ebp) 10c3a7: 53 push %ebx 10c3a8: 89 45 e0 mov %eax,-0x20(%ebp) 10c3ab: e8 40 05 00 00 call 10c8f0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c3b0: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c3b7: 00 00 00 10c3ba: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c3c1: 00 00 00 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10c3c4: 8b 45 08 mov 0x8(%ebp),%eax 10c3c7: 8b 40 1c mov 0x1c(%eax),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 10c3ca: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c3ce: 89 1c 88 mov %ebx,(%eax,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c3d1: 8b 45 30 mov 0x30(%ebp),%eax 10c3d4: 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 ); 10c3d7: 89 1c 24 mov %ebx,(%esp) 10c3da: e8 e9 08 00 00 call 10ccc8 <_User_extensions_Thread_create> 10c3df: 88 c1 mov %al,%cl if ( extension_status ) 10c3e1: 83 c4 10 add $0x10,%esp return true; 10c3e4: 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 ) 10c3e6: 84 c9 test %cl,%cl 10c3e8: 8b 55 e0 mov -0x20(%ebp),%edx 10c3eb: 74 06 je 10c3f3 <_Thread_Initialize+0x1c7> 10c3ed: eb 55 jmp 10c444 <_Thread_Initialize+0x218> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 10c3ef: 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; 10c3f1: 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 ); 10c3f3: 83 ec 0c sub $0xc,%esp 10c3f6: ff b3 e4 00 00 00 pushl 0xe4(%ebx) 10c3fc: 89 55 e0 mov %edx,-0x20(%ebp) 10c3ff: e8 fb 0b 00 00 call 10cfff <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 10c404: 5a pop %edx 10c405: ff b3 e8 00 00 00 pushl 0xe8(%ebx) 10c40b: e8 ef 0b 00 00 call 10cfff <_Workspace_Free> 10c410: 58 pop %eax 10c411: ff b3 ec 00 00 00 pushl 0xec(%ebx) 10c417: e8 e3 0b 00 00 call 10cfff <_Workspace_Free> _Workspace_Free( extensions_area ); 10c41c: 89 34 24 mov %esi,(%esp) 10c41f: e8 db 0b 00 00 call 10cfff <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 10c424: 89 3c 24 mov %edi,(%esp) 10c427: e8 d3 0b 00 00 call 10cfff <_Workspace_Free> #endif _Workspace_Free( sched ); 10c42c: 8b 55 e0 mov -0x20(%ebp),%edx 10c42f: 89 14 24 mov %edx,(%esp) 10c432: e8 c8 0b 00 00 call 10cfff <_Workspace_Free> _Thread_Stack_Free( the_thread ); 10c437: 89 1c 24 mov %ebx,(%esp) 10c43a: e8 81 05 00 00 call 10c9c0 <_Thread_Stack_Free> return false; 10c43f: 83 c4 10 add $0x10,%esp stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 10c442: 31 c0 xor %eax,%eax _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 10c444: 8d 65 f4 lea -0xc(%ebp),%esp 10c447: 5b pop %ebx 10c448: 5e pop %esi 10c449: 5f pop %edi 10c44a: c9 leave 10c44b: c3 ret =============================================================================== 0010f678 <_Thread_Resume>: */ void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f678: 55 push %ebp 10f679: 89 e5 mov %esp,%ebp 10f67b: 53 push %ebx 10f67c: 83 ec 04 sub $0x4,%esp 10f67f: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f682: 9c pushf 10f683: fa cli 10f684: 5b pop %ebx current_state = the_thread->current_state; 10f685: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f688: f6 c2 02 test $0x2,%dl 10f68b: 74 17 je 10f6a4 <_Thread_Resume+0x2c> <== NEVER TAKEN 10f68d: 83 e2 fd and $0xfffffffd,%edx current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); 10f690: 89 50 10 mov %edx,0x10(%eax) if ( _States_Is_ready( current_state ) ) { 10f693: 85 d2 test %edx,%edx 10f695: 75 0d jne 10f6a4 <_Thread_Resume+0x2c> */ RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Thread_Control *the_thread ) { _Scheduler.Operations.unblock( the_thread ); 10f697: 83 ec 0c sub $0xc,%esp 10f69a: 50 push %eax 10f69b: ff 15 64 41 12 00 call *0x124164 10f6a1: 83 c4 10 add $0x10,%esp _Scheduler_Unblock( the_thread ); } } _ISR_Enable( level ); 10f6a4: 53 push %ebx 10f6a5: 9d popf } 10f6a6: 8b 5d fc mov -0x4(%ebp),%ebx 10f6a9: c9 leave 10f6aa: c3 ret =============================================================================== 0010caa8 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10caa8: 55 push %ebp 10caa9: 89 e5 mov %esp,%ebp 10caab: 53 push %ebx 10caac: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10caaf: 8b 1d 68 58 12 00 mov 0x125868,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10cab5: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10cab9: 74 4d je 10cb08 <_Thread_Tickle_timeslice+0x60> return; if ( !_States_Is_ready( executing->current_state ) ) 10cabb: 83 7b 10 00 cmpl $0x0,0x10(%ebx) 10cabf: 75 47 jne 10cb08 <_Thread_Tickle_timeslice+0x60> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10cac1: 8b 43 7c mov 0x7c(%ebx),%eax 10cac4: 83 f8 01 cmp $0x1,%eax 10cac7: 72 3f jb 10cb08 <_Thread_Tickle_timeslice+0x60> 10cac9: 83 f8 02 cmp $0x2,%eax 10cacc: 76 07 jbe 10cad5 <_Thread_Tickle_timeslice+0x2d> 10cace: 83 f8 03 cmp $0x3,%eax 10cad1: 75 35 jne 10cb08 <_Thread_Tickle_timeslice+0x60><== NEVER TAKEN 10cad3: eb 1b jmp 10caf0 <_Thread_Tickle_timeslice+0x48> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 10cad5: 8b 43 78 mov 0x78(%ebx),%eax 10cad8: 48 dec %eax 10cad9: 89 43 78 mov %eax,0x78(%ebx) 10cadc: 85 c0 test %eax,%eax 10cade: 7f 28 jg 10cb08 <_Thread_Tickle_timeslice+0x60> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 10cae0: ff 15 5c 11 12 00 call *0x12115c * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield( ); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10cae6: a1 10 53 12 00 mov 0x125310,%eax 10caeb: 89 43 78 mov %eax,0x78(%ebx) 10caee: eb 18 jmp 10cb08 <_Thread_Tickle_timeslice+0x60> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 10caf0: 8b 43 78 mov 0x78(%ebx),%eax 10caf3: 48 dec %eax 10caf4: 89 43 78 mov %eax,0x78(%ebx) 10caf7: 85 c0 test %eax,%eax 10caf9: 75 0d jne 10cb08 <_Thread_Tickle_timeslice+0x60> (*executing->budget_callout)( executing ); 10cafb: 83 ec 0c sub $0xc,%esp 10cafe: 53 push %ebx 10caff: ff 93 80 00 00 00 call *0x80(%ebx) 10cb05: 83 c4 10 add $0x10,%esp break; #endif } } 10cb08: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0b: c9 leave 10cb0c: c3 ret =============================================================================== 0010fa60 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 10fa60: 55 push %ebp 10fa61: 89 e5 mov %esp,%ebp 10fa63: 83 ec 08 sub $0x8,%esp 10fa66: 8b 55 08 mov 0x8(%ebp),%edx Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 10fa69: 8b 42 44 mov 0x44(%edx),%eax * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 10fa6c: 8b 48 30 mov 0x30(%eax),%ecx 10fa6f: 85 c9 test %ecx,%ecx 10fa71: 74 1c je 10fa8f <_Thread_queue_Process_timeout+0x2f> 10fa73: 3b 15 68 58 12 00 cmp 0x125868,%edx 10fa79: 75 14 jne 10fa8f <_Thread_queue_Process_timeout+0x2f> _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 10fa7b: 83 f9 03 cmp $0x3,%ecx 10fa7e: 74 21 je 10faa1 <_Thread_queue_Process_timeout+0x41><== NEVER TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10fa80: 8b 48 3c mov 0x3c(%eax),%ecx 10fa83: 89 4a 34 mov %ecx,0x34(%edx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10fa86: c7 40 30 02 00 00 00 movl $0x2,0x30(%eax) 10fa8d: eb 12 jmp 10faa1 <_Thread_queue_Process_timeout+0x41> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 10fa8f: 8b 48 3c mov 0x3c(%eax),%ecx 10fa92: 89 4a 34 mov %ecx,0x34(%edx) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10fa95: 51 push %ecx 10fa96: 51 push %ecx 10fa97: 52 push %edx 10fa98: 50 push %eax 10fa99: e8 da fe ff ff call 10f978 <_Thread_queue_Extract> 10fa9e: 83 c4 10 add $0x10,%esp } } 10faa1: c9 leave 10faa2: c3 ret =============================================================================== 0010c868 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c868: 55 push %ebp 10c869: 89 e5 mov %esp,%ebp 10c86b: 57 push %edi 10c86c: 56 push %esi 10c86d: 53 push %ebx 10c86e: 83 ec 1c sub $0x1c,%esp 10c871: 8b 75 08 mov 0x8(%ebp),%esi 10c874: 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 ) 10c877: 85 f6 test %esi,%esi 10c879: 74 36 je 10c8b1 <_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 ) { 10c87b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c87f: 75 30 jne 10c8b1 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c881: 9c pushf 10c882: fa cli 10c883: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c884: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c88b: 74 22 je 10c8af <_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; 10c88d: 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 ); 10c894: 50 push %eax 10c895: 6a 01 push $0x1 10c897: 57 push %edi 10c898: 56 push %esi 10c899: e8 0a 31 00 00 call 10f9a8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c89e: 83 c4 0c add $0xc,%esp 10c8a1: 8d 45 e4 lea -0x1c(%ebp),%eax 10c8a4: 50 push %eax 10c8a5: 57 push %edi 10c8a6: 56 push %esi 10c8a7: e8 c0 fd ff ff call 10c66c <_Thread_queue_Enqueue_priority> 10c8ac: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c8af: 53 push %ebx 10c8b0: 9d popf } } 10c8b1: 8d 65 f4 lea -0xc(%ebp),%esp 10c8b4: 5b pop %ebx 10c8b5: 5e pop %esi 10c8b6: 5f pop %edi 10c8b7: c9 leave 10c8b8: c3 ret =============================================================================== 0010c8bc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c8bc: 55 push %ebp 10c8bd: 89 e5 mov %esp,%ebp 10c8bf: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c8c2: 8d 45 f4 lea -0xc(%ebp),%eax 10c8c5: 50 push %eax 10c8c6: ff 75 08 pushl 0x8(%ebp) 10c8c9: e8 ee f8 ff ff call 10c1bc <_Thread_Get> switch ( location ) { 10c8ce: 83 c4 10 add $0x10,%esp 10c8d1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c8d5: 75 17 jne 10c8ee <_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 ); 10c8d7: 83 ec 0c sub $0xc,%esp 10c8da: 50 push %eax 10c8db: e8 80 31 00 00 call 10fa60 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c8e0: a1 40 53 12 00 mov 0x125340,%eax 10c8e5: 48 dec %eax 10c8e6: a3 40 53 12 00 mov %eax,0x125340 10c8eb: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c8ee: c9 leave 10c8ef: c3 ret =============================================================================== 00116970 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 116970: 55 push %ebp 116971: 89 e5 mov %esp,%ebp 116973: 57 push %edi 116974: 56 push %esi 116975: 53 push %ebx 116976: 83 ec 4c sub $0x4c,%esp 116979: 8b 5d 08 mov 0x8(%ebp),%ebx ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 11697c: 8d 55 dc lea -0x24(%ebp),%edx 11697f: 8d 45 e0 lea -0x20(%ebp),%eax 116982: 89 45 dc mov %eax,-0x24(%ebp) head->previous = NULL; 116985: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) tail->previous = head; 11698c: 89 55 e4 mov %edx,-0x1c(%ebp) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 11698f: 8d 7d d0 lea -0x30(%ebp),%edi 116992: 8d 4d d4 lea -0x2c(%ebp),%ecx 116995: 89 4d d0 mov %ecx,-0x30(%ebp) head->previous = NULL; 116998: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) tail->previous = head; 11699f: 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 ); 1169a2: 8d 53 30 lea 0x30(%ebx),%edx 1169a5: 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 ); 1169a8: 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; 1169ab: 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; 1169ae: 8d 4d dc lea -0x24(%ebp),%ecx 1169b1: 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; 1169b4: a1 28 f0 13 00 mov 0x13f028,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1169b9: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 1169bc: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1169bf: 51 push %ecx 1169c0: 57 push %edi Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 1169c1: 29 d0 sub %edx,%eax watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1169c3: 50 push %eax 1169c4: ff 75 c0 pushl -0x40(%ebp) 1169c7: e8 b8 39 00 00 call 11a384 <_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(); 1169cc: a1 a0 ef 13 00 mov 0x13efa0,%eax 1169d1: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1169d4: 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 ) { 1169d7: 83 c4 10 add $0x10,%esp 1169da: 39 45 c4 cmp %eax,-0x3c(%ebp) 1169dd: 76 10 jbe 1169ef <_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 ); 1169df: 52 push %edx 1169e0: 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; 1169e1: 8b 55 c4 mov -0x3c(%ebp),%edx 1169e4: 29 c2 sub %eax,%edx _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1169e6: 52 push %edx 1169e7: 56 push %esi 1169e8: e8 97 39 00 00 call 11a384 <_Watchdog_Adjust_to_chain> 1169ed: eb 0f jmp 1169fe <_Timer_server_Body+0x8e> } else if ( snapshot < last_snapshot ) { 1169ef: 73 10 jae 116a01 <_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 ); 1169f1: 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; 1169f2: 2b 45 c4 sub -0x3c(%ebp),%eax _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 1169f5: 50 push %eax 1169f6: 6a 01 push $0x1 1169f8: 56 push %esi 1169f9: e8 1a 39 00 00 call 11a318 <_Watchdog_Adjust> 1169fe: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 116a01: 8b 4d c4 mov -0x3c(%ebp),%ecx 116a04: 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 ); 116a07: 8b 43 78 mov 0x78(%ebx),%eax 116a0a: 83 ec 0c sub $0xc,%esp 116a0d: 50 push %eax 116a0e: e8 fd 08 00 00 call 117310 <_Chain_Get> if ( timer == NULL ) { 116a13: 83 c4 10 add $0x10,%esp 116a16: 85 c0 test %eax,%eax 116a18: 74 29 je 116a43 <_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 ) { 116a1a: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 116a1d: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 116a20: 75 0b jne 116a2d <_Timer_server_Body+0xbd><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116a22: 52 push %edx <== NOT EXECUTED 116a23: 52 push %edx <== NOT EXECUTED 116a24: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116a27: 50 push %eax <== NOT EXECUTED 116a28: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 116a2b: eb 0c jmp 116a39 <_Timer_server_Body+0xc9><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116a2d: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 116a30: 75 d5 jne 116a07 <_Timer_server_Body+0x97><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116a32: 51 push %ecx <== NOT EXECUTED 116a33: 51 push %ecx <== NOT EXECUTED 116a34: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 116a37: 50 push %eax <== NOT EXECUTED 116a38: 56 push %esi <== NOT EXECUTED 116a39: e8 ce 39 00 00 call 11a40c <_Watchdog_Insert> <== NOT EXECUTED 116a3e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 116a41: eb c4 jmp 116a07 <_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 ); 116a43: 9c pushf 116a44: fa cli 116a45: 5a pop %edx tmp = ts->insert_chain; 116a46: 8b 43 78 mov 0x78(%ebx),%eax if ( _Chain_Is_empty( insert_chain ) ) { 116a49: b0 01 mov $0x1,%al 116a4b: 8b 4d b4 mov -0x4c(%ebp),%ecx 116a4e: 39 4d dc cmp %ecx,-0x24(%ebp) 116a51: 75 09 jne 116a5c <_Timer_server_Body+0xec><== NEVER TAKEN ts->insert_chain = NULL; 116a53: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) do_loop = false; 116a5a: 31 c0 xor %eax,%eax } _ISR_Enable( level ); 116a5c: 52 push %edx 116a5d: 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 ) { 116a5e: 84 c0 test %al,%al 116a60: 0f 85 4e ff ff ff jne 1169b4 <_Timer_server_Body+0x44><== NEVER TAKEN 116a66: 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 ) ) { 116a69: 39 45 d0 cmp %eax,-0x30(%ebp) 116a6c: 74 3a je 116aa8 <_Timer_server_Body+0x138> 116a6e: 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 ); 116a71: 9c pushf 116a72: fa cli 116a73: 59 pop %ecx initialized = false; } #endif return status; } 116a74: 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)) 116a77: 3b 45 b0 cmp -0x50(%ebp),%eax 116a7a: 74 25 je 116aa1 <_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; 116a7c: 8b 10 mov (%eax),%edx head->next = new_first; 116a7e: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = head; 116a81: 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 ) { 116a84: 85 c0 test %eax,%eax 116a86: 74 19 je 116aa1 <_Timer_server_Body+0x131><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 116a88: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 116a8f: 51 push %ecx 116a90: 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 ); 116a91: 52 push %edx 116a92: 52 push %edx 116a93: ff 70 24 pushl 0x24(%eax) 116a96: ff 70 20 pushl 0x20(%eax) 116a99: ff 50 1c call *0x1c(%eax) } 116a9c: 83 c4 10 add $0x10,%esp 116a9f: eb d0 jmp 116a71 <_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 ); 116aa1: 51 push %ecx 116aa2: 9d popf 116aa3: e9 06 ff ff ff jmp 1169ae <_Timer_server_Body+0x3e> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 116aa8: c6 43 7c 00 movb $0x0,0x7c(%ebx) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 116aac: e8 23 fe ff ff call 1168d4 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 116ab1: 51 push %ecx 116ab2: 51 push %ecx 116ab3: 6a 08 push $0x8 116ab5: ff 33 pushl (%ebx) 116ab7: e8 fc 32 00 00 call 119db8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 116abc: 89 d8 mov %ebx,%eax 116abe: e8 21 fe ff ff call 1168e4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 116ac3: 89 d8 mov %ebx,%eax 116ac5: e8 60 fe ff ff call 11692a <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 116aca: e8 c3 2a 00 00 call 119592 <_Thread_Enable_dispatch> ts->active = true; 116acf: 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 ); 116ad3: 8d 43 08 lea 0x8(%ebx),%eax 116ad6: 89 04 24 mov %eax,(%esp) 116ad9: e8 4e 3a 00 00 call 11a52c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 116ade: 8d 43 40 lea 0x40(%ebx),%eax 116ae1: 89 04 24 mov %eax,(%esp) 116ae4: e8 43 3a 00 00 call 11a52c <_Watchdog_Remove> 116ae9: 83 c4 10 add $0x10,%esp 116aec: e9 bd fe ff ff jmp 1169ae <_Timer_server_Body+0x3e> =============================================================================== 00116af1 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 116af1: 55 push %ebp 116af2: 89 e5 mov %esp,%ebp 116af4: 57 push %edi 116af5: 56 push %esi 116af6: 53 push %ebx 116af7: 83 ec 2c sub $0x2c,%esp 116afa: 8b 5d 08 mov 0x8(%ebp),%ebx 116afd: 8b 75 0c mov 0xc(%ebp),%esi if ( ts->insert_chain == NULL ) { 116b00: 8b 43 78 mov 0x78(%ebx),%eax 116b03: 85 c0 test %eax,%eax 116b05: 0f 85 de 00 00 00 jne 116be9 <_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(); 116b0b: e8 c4 fd ff ff call 1168d4 <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 116b10: 8b 46 38 mov 0x38(%esi),%eax 116b13: 83 f8 01 cmp $0x1,%eax 116b16: 75 5a jne 116b72 <_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 ); 116b18: 9c pushf 116b19: fa cli 116b1a: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 116b1d: 8b 15 28 f0 13 00 mov 0x13f028,%edx last_snapshot = ts->Interval_watchdogs.last_snapshot; 116b23: 8b 4b 3c mov 0x3c(%ebx),%ecx initialized = false; } #endif return status; } 116b26: 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 ); 116b29: 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 ) ) { 116b2c: 39 f8 cmp %edi,%eax 116b2e: 74 19 je 116b49 <_Timer_server_Schedule_operation_method+0x58> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 116b30: 89 d7 mov %edx,%edi 116b32: 29 cf sub %ecx,%edi 116b34: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 116b37: 8b 78 10 mov 0x10(%eax),%edi if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116b3a: 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) { 116b3c: 3b 7d e4 cmp -0x1c(%ebp),%edi 116b3f: 76 05 jbe 116b46 <_Timer_server_Schedule_operation_method+0x55> delta_interval -= delta; 116b41: 89 f9 mov %edi,%ecx 116b43: 2b 4d e4 sub -0x1c(%ebp),%ecx } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 116b46: 89 48 10 mov %ecx,0x10(%eax) } ts->Interval_watchdogs.last_snapshot = snapshot; 116b49: 89 53 3c mov %edx,0x3c(%ebx) _ISR_Enable( level ); 116b4c: ff 75 e0 pushl -0x20(%ebp) 116b4f: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 116b50: 50 push %eax 116b51: 50 push %eax 116b52: 83 c6 10 add $0x10,%esi 116b55: 56 push %esi 116b56: 8d 43 30 lea 0x30(%ebx),%eax 116b59: 50 push %eax 116b5a: e8 ad 38 00 00 call 11a40c <_Watchdog_Insert> if ( !ts->active ) { 116b5f: 8a 43 7c mov 0x7c(%ebx),%al 116b62: 83 c4 10 add $0x10,%esp 116b65: 84 c0 test %al,%al 116b67: 75 74 jne 116bdd <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_interval_system_watchdog( ts ); 116b69: 89 d8 mov %ebx,%eax 116b6b: e8 74 fd ff ff call 1168e4 <_Timer_server_Reset_interval_system_watchdog> 116b70: eb 6b jmp 116bdd <_Timer_server_Schedule_operation_method+0xec> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 116b72: 83 f8 03 cmp $0x3,%eax 116b75: 75 66 jne 116bdd <_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 ); 116b77: 9c pushf 116b78: fa cli 116b79: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 116b7c: 8b 15 a0 ef 13 00 mov 0x13efa0,%edx last_snapshot = ts->TOD_watchdogs.last_snapshot; 116b82: 8b 43 74 mov 0x74(%ebx),%eax initialized = false; } #endif return status; } 116b85: 8b 4b 68 mov 0x68(%ebx),%ecx 116b88: 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 ) ) { 116b8b: 39 f9 cmp %edi,%ecx 116b8d: 74 27 je 116bb6 <_Timer_server_Schedule_operation_method+0xc5> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 116b8f: 8b 79 10 mov 0x10(%ecx),%edi 116b92: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 116b95: 39 c2 cmp %eax,%edx 116b97: 76 15 jbe 116bae <_Timer_server_Schedule_operation_method+0xbd> /* * We advanced in time. */ delta = snapshot - last_snapshot; 116b99: 89 d7 mov %edx,%edi 116b9b: 29 c7 sub %eax,%edi 116b9d: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 116ba0: 31 c0 xor %eax,%eax if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { 116ba2: 39 7d d4 cmp %edi,-0x2c(%ebp) 116ba5: 76 0c jbe 116bb3 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN delta_interval -= delta; 116ba7: 8b 45 d4 mov -0x2c(%ebp),%eax 116baa: 29 f8 sub %edi,%eax 116bac: eb 05 jmp 116bb3 <_Timer_server_Schedule_operation_method+0xc2> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 116bae: 03 45 d4 add -0x2c(%ebp),%eax delta_interval += delta; 116bb1: 29 d0 sub %edx,%eax } first_watchdog->delta_interval = delta_interval; 116bb3: 89 41 10 mov %eax,0x10(%ecx) } ts->TOD_watchdogs.last_snapshot = snapshot; 116bb6: 89 53 74 mov %edx,0x74(%ebx) _ISR_Enable( level ); 116bb9: ff 75 e0 pushl -0x20(%ebp) 116bbc: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 116bbd: 57 push %edi 116bbe: 57 push %edi 116bbf: 83 c6 10 add $0x10,%esi 116bc2: 56 push %esi 116bc3: 8d 43 68 lea 0x68(%ebx),%eax 116bc6: 50 push %eax 116bc7: e8 40 38 00 00 call 11a40c <_Watchdog_Insert> if ( !ts->active ) { 116bcc: 8a 43 7c mov 0x7c(%ebx),%al 116bcf: 83 c4 10 add $0x10,%esp 116bd2: 84 c0 test %al,%al 116bd4: 75 07 jne 116bdd <_Timer_server_Schedule_operation_method+0xec> _Timer_server_Reset_tod_system_watchdog( ts ); 116bd6: 89 d8 mov %ebx,%eax 116bd8: e8 4d fd ff ff call 11692a <_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 ); } } 116bdd: 8d 65 f4 lea -0xc(%ebp),%esp 116be0: 5b pop %ebx 116be1: 5e pop %esi 116be2: 5f pop %edi 116be3: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 116be4: e9 a9 29 00 00 jmp 119592 <_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 ); 116be9: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED 116bec: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED 116bef: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 116bf2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 116bf5: 5b pop %ebx <== NOT EXECUTED 116bf6: 5e pop %esi <== NOT EXECUTED 116bf7: 5f pop %edi <== NOT EXECUTED 116bf8: 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 ); 116bf9: e9 d6 06 00 00 jmp 1172d4 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010cc8b <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10cc8b: 55 push %ebp 10cc8c: 89 e5 mov %esp,%ebp 10cc8e: 57 push %edi 10cc8f: 56 push %esi 10cc90: 53 push %ebx 10cc91: 83 ec 0c sub $0xc,%esp 10cc94: 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 ); } } 10cc97: 8b 1d 14 55 12 00 mov 0x125514,%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 ); 10cc9d: 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 ); 10cca1: eb 15 jmp 10ccb8 <_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 ) 10cca3: 8b 43 30 mov 0x30(%ebx),%eax 10cca6: 85 c0 test %eax,%eax 10cca8: 74 0b je 10ccb5 <_User_extensions_Fatal+0x2a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10ccaa: 52 push %edx 10ccab: 57 push %edi 10ccac: 56 push %esi 10ccad: ff 75 08 pushl 0x8(%ebp) 10ccb0: ff d0 call *%eax 10ccb2: 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 ) { 10ccb5: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 10ccb8: 81 fb 0c 55 12 00 cmp $0x12550c,%ebx 10ccbe: 75 e3 jne 10cca3 <_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 ); } } 10ccc0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10ccc3: 5b pop %ebx <== NOT EXECUTED 10ccc4: 5e pop %esi <== NOT EXECUTED 10ccc5: 5f pop %edi <== NOT EXECUTED 10ccc6: c9 leave <== NOT EXECUTED 10ccc7: c3 ret <== NOT EXECUTED =============================================================================== 0010cb74 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10cb74: 55 push %ebp 10cb75: 89 e5 mov %esp,%ebp 10cb77: 57 push %edi 10cb78: 56 push %esi 10cb79: 53 push %ebx 10cb7a: 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; 10cb7d: a1 60 12 12 00 mov 0x121260,%eax 10cb82: 89 45 e4 mov %eax,-0x1c(%ebp) initial_extensions = Configuration.User_extension_table; 10cb85: 8b 35 64 12 12 00 mov 0x121264,%esi ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10cb8b: c7 05 0c 55 12 00 10 movl $0x125510,0x12550c 10cb92: 55 12 00 head->previous = NULL; 10cb95: c7 05 10 55 12 00 00 movl $0x0,0x125510 10cb9c: 00 00 00 tail->previous = head; 10cb9f: c7 05 14 55 12 00 0c movl $0x12550c,0x125514 10cba6: 55 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10cba9: c7 05 44 53 12 00 48 movl $0x125348,0x125344 10cbb0: 53 12 00 head->previous = NULL; 10cbb3: c7 05 48 53 12 00 00 movl $0x0,0x125348 10cbba: 00 00 00 tail->previous = head; 10cbbd: c7 05 4c 53 12 00 44 movl $0x125344,0x12534c 10cbc4: 53 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10cbc7: 85 f6 test %esi,%esi 10cbc9: 74 53 je 10cc1e <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 10cbcb: 6b c8 34 imul $0x34,%eax,%ecx 10cbce: 83 ec 0c sub $0xc,%esp 10cbd1: 51 push %ecx 10cbd2: 89 4d e0 mov %ecx,-0x20(%ebp) 10cbd5: e8 3d 04 00 00 call 10d017 <_Workspace_Allocate_or_fatal_error> 10cbda: 89 c3 mov %eax,%ebx number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10cbdc: 31 c0 xor %eax,%eax 10cbde: 8b 4d e0 mov -0x20(%ebp),%ecx 10cbe1: 89 df mov %ebx,%edi 10cbe3: f3 aa rep stos %al,%es:(%edi) 10cbe5: 89 f0 mov %esi,%eax extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10cbe7: 83 c4 10 add $0x10,%esp 10cbea: 31 d2 xor %edx,%edx 10cbec: eb 2b jmp 10cc19 <_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; 10cbee: 8d 7b 14 lea 0x14(%ebx),%edi 10cbf1: 89 c6 mov %eax,%esi 10cbf3: b9 08 00 00 00 mov $0x8,%ecx 10cbf8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10cbfa: 83 ec 0c sub $0xc,%esp 10cbfd: 53 push %ebx 10cbfe: 89 45 dc mov %eax,-0x24(%ebp) 10cc01: 89 55 e0 mov %edx,-0x20(%ebp) 10cc04: e8 3f 2f 00 00 call 10fb48 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10cc09: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10cc0c: 8b 55 e0 mov -0x20(%ebp),%edx 10cc0f: 42 inc %edx 10cc10: 8b 45 dc mov -0x24(%ebp),%eax 10cc13: 83 c0 20 add $0x20,%eax 10cc16: 83 c4 10 add $0x10,%esp 10cc19: 3b 55 e4 cmp -0x1c(%ebp),%edx 10cc1c: 72 d0 jb 10cbee <_User_extensions_Handler_initialization+0x7a> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10cc1e: 8d 65 f4 lea -0xc(%ebp),%esp 10cc21: 5b pop %ebx 10cc22: 5e pop %esi 10cc23: 5f pop %edi 10cc24: c9 leave 10cc25: c3 ret =============================================================================== 0010e4cc <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e4cc: 55 push %ebp 10e4cd: 89 e5 mov %esp,%ebp 10e4cf: 57 push %edi 10e4d0: 56 push %esi 10e4d1: 53 push %ebx 10e4d2: 83 ec 1c sub $0x1c,%esp 10e4d5: 8b 75 08 mov 0x8(%ebp),%esi 10e4d8: 8b 7d 0c mov 0xc(%ebp),%edi 10e4db: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e4de: 9c pushf 10e4df: fa cli 10e4e0: 58 pop %eax } } _ISR_Enable( level ); } 10e4e1: 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 ); 10e4e3: 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 ) ) { 10e4e6: 39 ca cmp %ecx,%edx 10e4e8: 74 44 je 10e52e <_Watchdog_Adjust+0x62> switch ( direction ) { 10e4ea: 85 ff test %edi,%edi 10e4ec: 74 3c je 10e52a <_Watchdog_Adjust+0x5e> 10e4ee: 4f dec %edi 10e4ef: 75 3d jne 10e52e <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e4f1: 01 5a 10 add %ebx,0x10(%edx) break; 10e4f4: eb 38 jmp 10e52e <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 10e4f6: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e4f8: 8b 7a 10 mov 0x10(%edx),%edi 10e4fb: 39 fb cmp %edi,%ebx 10e4fd: 73 07 jae 10e506 <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e4ff: 29 df sub %ebx,%edi 10e501: 89 7a 10 mov %edi,0x10(%edx) break; 10e504: eb 28 jmp 10e52e <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e506: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e50d: 50 push %eax 10e50e: 9d popf _Watchdog_Tickle( header ); 10e50f: 83 ec 0c sub $0xc,%esp 10e512: 56 push %esi 10e513: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e516: e8 a5 01 00 00 call 10e6c0 <_Watchdog_Tickle> _ISR_Disable( level ); 10e51b: 9c pushf 10e51c: fa cli 10e51d: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e51e: 83 c4 10 add $0x10,%esp 10e521: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e524: 39 0e cmp %ecx,(%esi) 10e526: 74 06 je 10e52e <_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; 10e528: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e52a: 85 db test %ebx,%ebx 10e52c: 75 c8 jne 10e4f6 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e52e: 50 push %eax 10e52f: 9d popf } 10e530: 8d 65 f4 lea -0xc(%ebp),%esp 10e533: 5b pop %ebx 10e534: 5e pop %esi 10e535: 5f pop %edi 10e536: c9 leave 10e537: c3 ret =============================================================================== 0010cecc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10cecc: 55 push %ebp 10cecd: 89 e5 mov %esp,%ebp 10cecf: 56 push %esi 10ced0: 53 push %ebx 10ced1: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ced4: 9c pushf 10ced5: fa cli 10ced6: 5e pop %esi previous_state = the_watchdog->state; 10ced7: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ceda: 83 f8 01 cmp $0x1,%eax 10cedd: 74 09 je 10cee8 <_Watchdog_Remove+0x1c> 10cedf: 72 42 jb 10cf23 <_Watchdog_Remove+0x57> 10cee1: 83 f8 03 cmp $0x3,%eax 10cee4: 77 3d ja 10cf23 <_Watchdog_Remove+0x57> <== NEVER TAKEN 10cee6: eb 09 jmp 10cef1 <_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; 10cee8: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ceef: eb 32 jmp 10cf23 <_Watchdog_Remove+0x57> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10cef1: 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 ); } 10cef8: 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) ) 10cefa: 83 39 00 cmpl $0x0,(%ecx) 10cefd: 74 06 je 10cf05 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ceff: 8b 5a 10 mov 0x10(%edx),%ebx 10cf02: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10cf05: 8b 1d 50 54 12 00 mov 0x125450,%ebx 10cf0b: 85 db test %ebx,%ebx 10cf0d: 74 0c je 10cf1b <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10cf0f: 8b 1d 64 58 12 00 mov 0x125864,%ebx 10cf15: 89 1d e8 53 12 00 mov %ebx,0x1253e8 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10cf1b: 8b 5a 04 mov 0x4(%edx),%ebx next->previous = previous; 10cf1e: 89 59 04 mov %ebx,0x4(%ecx) previous->next = next; 10cf21: 89 0b mov %ecx,(%ebx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10cf23: 8b 0d 54 54 12 00 mov 0x125454,%ecx 10cf29: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10cf2c: 56 push %esi 10cf2d: 9d popf return( previous_state ); } 10cf2e: 5b pop %ebx 10cf2f: 5e pop %esi 10cf30: c9 leave 10cf31: c3 ret =============================================================================== 0010e058 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e058: 55 push %ebp 10e059: 89 e5 mov %esp,%ebp 10e05b: 57 push %edi 10e05c: 56 push %esi 10e05d: 53 push %ebx 10e05e: 83 ec 20 sub $0x20,%esp 10e061: 8b 7d 08 mov 0x8(%ebp),%edi 10e064: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e067: 9c pushf 10e068: fa cli 10e069: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e06c: 56 push %esi 10e06d: 57 push %edi 10e06e: 68 f0 17 12 00 push $0x1217f0 10e073: e8 60 aa ff ff call 108ad8 printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 10e078: 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 ); 10e07a: 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 ) ) { 10e07d: 83 c4 10 add $0x10,%esp 10e080: 39 f3 cmp %esi,%ebx 10e082: 74 1d je 10e0a1 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e084: 52 push %edx 10e085: 52 push %edx 10e086: 53 push %ebx 10e087: 6a 00 push $0x0 10e089: e8 32 00 00 00 call 10e0c0 <_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 ) 10e08e: 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 ) ; 10e090: 83 c4 10 add $0x10,%esp 10e093: 39 f3 cmp %esi,%ebx 10e095: 75 ed jne 10e084 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e097: 50 push %eax 10e098: 50 push %eax 10e099: 57 push %edi 10e09a: 68 07 18 12 00 push $0x121807 10e09f: eb 08 jmp 10e0a9 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e0a1: 83 ec 0c sub $0xc,%esp 10e0a4: 68 16 18 12 00 push $0x121816 10e0a9: e8 2a aa ff ff call 108ad8 10e0ae: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e0b1: ff 75 e4 pushl -0x1c(%ebp) 10e0b4: 9d popf } 10e0b5: 8d 65 f4 lea -0xc(%ebp),%esp 10e0b8: 5b pop %ebx 10e0b9: 5e pop %esi 10e0ba: 5f pop %edi 10e0bb: c9 leave 10e0bc: c3 ret =============================================================================== 0010a7b4 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 10a7b4: 55 push %ebp 10a7b5: 89 e5 mov %esp,%ebp 10a7b7: 57 push %edi 10a7b8: 56 push %esi 10a7b9: 53 push %ebx 10a7ba: 83 ec 18 sub $0x18,%esp 10a7bd: 8b 75 08 mov 0x8(%ebp),%esi 10a7c0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 10a7c3: 68 d8 72 12 00 push $0x1272d8 10a7c8: e8 2f 10 00 00 call 10b7fc if (fcntl (fildes, F_GETFD) < 0) { 10a7cd: 5f pop %edi 10a7ce: 58 pop %eax 10a7cf: 6a 01 push $0x1 10a7d1: 56 push %esi 10a7d2: e8 e5 60 00 00 call 1108bc 10a7d7: 83 c4 10 add $0x10,%esp 10a7da: 85 c0 test %eax,%eax 10a7dc: 79 1d jns 10a7fb pthread_mutex_unlock(&aio_request_queue.mutex); 10a7de: 83 ec 0c sub $0xc,%esp 10a7e1: 68 d8 72 12 00 push $0x1272d8 10a7e6: e8 91 10 00 00 call 10b87c rtems_set_errno_and_return_minus_one (EBADF); 10a7eb: e8 7c 8e 00 00 call 11366c <__errno> 10a7f0: c7 00 09 00 00 00 movl $0x9,(%eax) 10a7f6: e9 e3 00 00 00 jmp 10a8de } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 10a7fb: 85 db test %ebx,%ebx 10a7fd: 0f 85 bd 00 00 00 jne 10a8c0 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 10a803: 51 push %ecx 10a804: 6a 00 push $0x0 10a806: 56 push %esi 10a807: 68 20 73 12 00 push $0x127320 10a80c: e8 27 03 00 00 call 10ab38 10a811: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 10a813: 83 c4 10 add $0x10,%esp 10a816: 85 c0 test %eax,%eax 10a818: 75 6c jne 10a886 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10a81a: 81 3d 2c 73 12 00 30 cmpl $0x127330,0x12732c 10a821: 73 12 00 10a824: 0f 84 07 01 00 00 je 10a931 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 10a82a: 52 push %edx 10a82b: 6a 00 push $0x0 10a82d: 56 push %esi 10a82e: 68 2c 73 12 00 push $0x12732c 10a833: e8 00 03 00 00 call 10ab38 10a838: 89 c3 mov %eax,%ebx if (r_chain == NULL) { 10a83a: 83 c4 10 add $0x10,%esp 10a83d: 85 c0 test %eax,%eax 10a83f: 75 17 jne 10a858 pthread_mutex_unlock(&aio_request_queue.mutex); 10a841: 83 ec 0c sub $0xc,%esp 10a844: 68 d8 72 12 00 push $0x1272d8 10a849: e8 2e 10 00 00 call 10b87c return AIO_ALLDONE; 10a84e: 83 c4 10 add $0x10,%esp 10a851: b3 02 mov $0x2,%bl 10a853: e9 21 01 00 00 jmp 10a979 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10a858: 83 ec 0c sub $0xc,%esp 10a85b: 50 push %eax 10a85c: e8 03 27 00 00 call 10cf64 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 10a861: 89 1c 24 mov %ebx,(%esp) 10a864: e8 12 06 00 00 call 10ae7b pthread_mutex_destroy (&r_chain->mutex); 10a869: 8d 73 1c lea 0x1c(%ebx),%esi 10a86c: 89 34 24 mov %esi,(%esp) 10a86f: e8 68 0d 00 00 call 10b5dc pthread_cond_destroy (&r_chain->mutex); 10a874: 89 34 24 mov %esi,(%esp) 10a877: e8 6c 0a 00 00 call 10b2e8 free (r_chain); 10a87c: 89 1c 24 mov %ebx,(%esp) 10a87f: e8 ac d4 ff ff call 107d30 10a884: eb 24 jmp 10a8aa return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 10a886: 8d 70 1c lea 0x1c(%eax),%esi 10a889: 83 ec 0c sub $0xc,%esp 10a88c: 56 push %esi 10a88d: e8 6a 0f 00 00 call 10b7fc 10a892: 89 1c 24 mov %ebx,(%esp) 10a895: e8 ca 26 00 00 call 10cf64 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 10a89a: 89 1c 24 mov %ebx,(%esp) 10a89d: e8 d9 05 00 00 call 10ae7b pthread_mutex_unlock (&r_chain->mutex); 10a8a2: 89 34 24 mov %esi,(%esp) 10a8a5: e8 d2 0f 00 00 call 10b87c pthread_mutex_unlock (&aio_request_queue.mutex); 10a8aa: c7 04 24 d8 72 12 00 movl $0x1272d8,(%esp) 10a8b1: e8 c6 0f 00 00 call 10b87c return AIO_CANCELED; 10a8b6: 83 c4 10 add $0x10,%esp 10a8b9: 31 db xor %ebx,%ebx 10a8bb: e9 b9 00 00 00 jmp 10a979 } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 10a8c0: 8b 3b mov (%ebx),%edi 10a8c2: 39 f7 cmp %esi,%edi 10a8c4: 74 23 je 10a8e9 pthread_mutex_unlock (&aio_request_queue.mutex); 10a8c6: 83 ec 0c sub $0xc,%esp 10a8c9: 68 d8 72 12 00 push $0x1272d8 10a8ce: e8 a9 0f 00 00 call 10b87c rtems_set_errno_and_return_minus_one (EINVAL); 10a8d3: e8 94 8d 00 00 call 11366c <__errno> 10a8d8: c7 00 16 00 00 00 movl $0x16,(%eax) 10a8de: 83 c4 10 add $0x10,%esp 10a8e1: 83 cb ff or $0xffffffff,%ebx 10a8e4: e9 90 00 00 00 jmp 10a979 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 10a8e9: 50 push %eax 10a8ea: 6a 00 push $0x0 10a8ec: 57 push %edi 10a8ed: 68 20 73 12 00 push $0x127320 10a8f2: e8 41 02 00 00 call 10ab38 10a8f7: 89 c6 mov %eax,%esi if (r_chain == NULL) { 10a8f9: 83 c4 10 add $0x10,%esp 10a8fc: 85 c0 test %eax,%eax 10a8fe: 75 48 jne 10a948 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10a900: 81 3d 2c 73 12 00 30 cmpl $0x127330,0x12732c 10a907: 73 12 00 10a90a: 74 25 je 10a931 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 10a90c: 56 push %esi 10a90d: 6a 00 push $0x0 10a90f: 57 push %edi 10a910: 68 2c 73 12 00 push $0x12732c 10a915: e8 1e 02 00 00 call 10ab38 if (r_chain == NULL) { 10a91a: 83 c4 10 add $0x10,%esp 10a91d: 85 c0 test %eax,%eax 10a91f: 74 a5 je 10a8c6 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 10a921: 51 push %ecx 10a922: 51 push %ecx 10a923: 53 push %ebx 10a924: 83 c0 08 add $0x8,%eax 10a927: 50 push %eax 10a928: e8 97 05 00 00 call 10aec4 10a92d: 89 c3 mov %eax,%ebx 10a92f: eb 39 jmp 10a96a pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 10a931: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a934: 68 d8 72 12 00 push $0x1272d8 <== NOT EXECUTED 10a939: e8 3e 0f 00 00 call 10b87c <== NOT EXECUTED return AIO_ALLDONE; 10a93e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a941: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 10a946: eb 31 jmp 10a979 <== NOT EXECUTED } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 10a948: 8d 78 1c lea 0x1c(%eax),%edi 10a94b: 83 ec 0c sub $0xc,%esp 10a94e: 57 push %edi 10a94f: e8 a8 0e 00 00 call 10b7fc result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 10a954: 58 pop %eax 10a955: 5a pop %edx 10a956: 53 push %ebx 10a957: 83 c6 08 add $0x8,%esi 10a95a: 56 push %esi 10a95b: e8 64 05 00 00 call 10aec4 10a960: 89 c3 mov %eax,%ebx pthread_mutex_unlock (&r_chain->mutex); 10a962: 89 3c 24 mov %edi,(%esp) 10a965: e8 12 0f 00 00 call 10b87c pthread_mutex_unlock (&aio_request_queue.mutex); 10a96a: c7 04 24 d8 72 12 00 movl $0x1272d8,(%esp) 10a971: e8 06 0f 00 00 call 10b87c return result; 10a976: 83 c4 10 add $0x10,%esp } return AIO_ALLDONE; } 10a979: 89 d8 mov %ebx,%eax 10a97b: 8d 65 f4 lea -0xc(%ebp),%esp 10a97e: 5b pop %ebx 10a97f: 5e pop %esi 10a980: 5f pop %edi 10a981: c9 leave 10a982: c3 ret =============================================================================== 0010a990 : int aio_fsync( int op, struct aiocb *aiocbp ) { 10a990: 55 push %ebp 10a991: 89 e5 mov %esp,%ebp 10a993: 53 push %ebx 10a994: 83 ec 04 sub $0x4,%esp 10a997: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_aio_request *req; int mode; if (op != O_SYNC) 10a99a: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp) 10a9a1: 74 1b je 10a9be rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10a9a3: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10a9aa: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a9b1: e8 b6 8c 00 00 call 11366c <__errno> 10a9b6: c7 00 16 00 00 00 movl $0x16,(%eax) 10a9bc: eb 74 jmp 10aa32 mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10a9be: 50 push %eax 10a9bf: 50 push %eax 10a9c0: 6a 03 push $0x3 10a9c2: ff 33 pushl (%ebx) 10a9c4: e8 f3 5e 00 00 call 1108bc if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10a9c9: 83 e0 03 and $0x3,%eax 10a9cc: 48 dec %eax 10a9cd: 83 c4 10 add $0x10,%esp 10a9d0: 83 f8 01 cmp $0x1,%eax 10a9d3: 76 1b jbe 10a9f0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10a9d5: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10a9dc: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10a9e3: e8 84 8c 00 00 call 11366c <__errno> 10a9e8: c7 00 09 00 00 00 movl $0x9,(%eax) 10a9ee: eb 42 jmp 10aa32 req = malloc (sizeof (rtems_aio_request)); 10a9f0: 83 ec 0c sub $0xc,%esp 10a9f3: 6a 18 push $0x18 10a9f5: e8 ba d7 ff ff call 1081b4 if (req == NULL) 10a9fa: 83 c4 10 add $0x10,%esp 10a9fd: 85 c0 test %eax,%eax 10a9ff: 75 1b jne 10aa1c <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10aa01: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10aa08: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10aa0f: e8 58 8c 00 00 call 11366c <__errno> <== NOT EXECUTED 10aa14: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10aa1a: eb 16 jmp 10aa32 <== NOT EXECUTED req->aiocbp = aiocbp; 10aa1c: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_SYNC; 10aa1f: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx) return rtems_aio_enqueue (req); 10aa26: 89 45 08 mov %eax,0x8(%ebp) } 10aa29: 8b 5d fc mov -0x4(%ebp),%ebx 10aa2c: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 10aa2d: e9 ef 04 00 00 jmp 10af21 } 10aa32: 83 c8 ff or $0xffffffff,%eax 10aa35: 8b 5d fc mov -0x4(%ebp),%ebx 10aa38: c9 leave 10aa39: c3 ret =============================================================================== 0010b124 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 10b124: 55 push %ebp 10b125: 89 e5 mov %esp,%ebp 10b127: 53 push %ebx 10b128: 83 ec 0c sub $0xc,%esp 10b12b: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10b12e: 6a 03 push $0x3 10b130: ff 33 pushl (%ebx) 10b132: e8 85 57 00 00 call 1108bc if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10b137: 83 e0 03 and $0x3,%eax 10b13a: 83 c4 10 add $0x10,%esp 10b13d: 83 f8 02 cmp $0x2,%eax 10b140: 74 1f je 10b161 10b142: 85 c0 test %eax,%eax 10b144: 74 1b je 10b161 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10b146: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10b14d: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b154: e8 13 85 00 00 call 11366c <__errno> 10b159: c7 00 09 00 00 00 movl $0x9,(%eax) 10b15f: eb 69 jmp 10b1ca if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10b161: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10b165: 75 06 jne 10b16d rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10b167: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10b16b: 79 1b jns 10b188 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10b16d: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10b174: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b17b: e8 ec 84 00 00 call 11366c <__errno> 10b180: c7 00 16 00 00 00 movl $0x16,(%eax) 10b186: eb 42 jmp 10b1ca req = malloc (sizeof (rtems_aio_request)); 10b188: 83 ec 0c sub $0xc,%esp 10b18b: 6a 18 push $0x18 10b18d: e8 22 d0 ff ff call 1081b4 if (req == NULL) 10b192: 83 c4 10 add $0x10,%esp 10b195: 85 c0 test %eax,%eax 10b197: 75 1b jne 10b1b4 <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10b199: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10b1a0: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10b1a7: e8 c0 84 00 00 call 11366c <__errno> <== NOT EXECUTED 10b1ac: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10b1b2: eb 16 jmp 10b1ca <== NOT EXECUTED req->aiocbp = aiocbp; 10b1b4: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_READ; 10b1b7: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx) return rtems_aio_enqueue (req); 10b1be: 89 45 08 mov %eax,0x8(%ebp) } 10b1c1: 8b 5d fc mov -0x4(%ebp),%ebx 10b1c4: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 10b1c5: e9 57 fd ff ff jmp 10af21 } 10b1ca: 83 c8 ff or $0xffffffff,%eax 10b1cd: 8b 5d fc mov -0x4(%ebp),%ebx 10b1d0: c9 leave 10b1d1: c3 ret =============================================================================== 0010b1e0 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 10b1e0: 55 push %ebp 10b1e1: 89 e5 mov %esp,%ebp 10b1e3: 53 push %ebx 10b1e4: 83 ec 0c sub $0xc,%esp 10b1e7: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 10b1ea: 6a 03 push $0x3 10b1ec: ff 33 pushl (%ebx) 10b1ee: e8 c9 56 00 00 call 1108bc if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 10b1f3: 83 e0 03 and $0x3,%eax 10b1f6: 48 dec %eax 10b1f7: 83 c4 10 add $0x10,%esp 10b1fa: 83 f8 01 cmp $0x1,%eax 10b1fd: 76 1b jbe 10b21a rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 10b1ff: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx) 10b206: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b20d: e8 5a 84 00 00 call 11366c <__errno> 10b212: c7 00 09 00 00 00 movl $0x9,(%eax) 10b218: eb 69 jmp 10b283 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 10b21a: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10b21e: 75 06 jne 10b226 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 10b220: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10b224: 79 1b jns 10b241 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 10b226: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx) 10b22d: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) 10b234: e8 33 84 00 00 call 11366c <__errno> 10b239: c7 00 16 00 00 00 movl $0x16,(%eax) 10b23f: eb 42 jmp 10b283 req = malloc (sizeof (rtems_aio_request)); 10b241: 83 ec 0c sub $0xc,%esp 10b244: 6a 18 push $0x18 10b246: e8 69 cf ff ff call 1081b4 if (req == NULL) 10b24b: 83 c4 10 add $0x10,%esp 10b24e: 85 c0 test %eax,%eax 10b250: 75 1b jne 10b26d <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 10b252: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED 10b259: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED 10b260: e8 07 84 00 00 call 11366c <__errno> <== NOT EXECUTED 10b265: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED 10b26b: eb 16 jmp 10b283 <== NOT EXECUTED req->aiocbp = aiocbp; 10b26d: 89 58 14 mov %ebx,0x14(%eax) req->aiocbp->aio_lio_opcode = LIO_WRITE; 10b270: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx) return rtems_aio_enqueue (req); 10b277: 89 45 08 mov %eax,0x8(%ebp) } 10b27a: 8b 5d fc mov -0x4(%ebp),%ebx 10b27d: c9 leave rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 10b27e: e9 9e fc ff ff jmp 10af21 } 10b283: 83 c8 ff or $0xffffffff,%eax 10b286: 8b 5d fc mov -0x4(%ebp),%ebx 10b289: c9 leave 10b28a: c3 ret =============================================================================== 00109f98 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 109f98: 55 push %ebp 109f99: 89 e5 mov %esp,%ebp 109f9b: 83 ec 08 sub $0x8,%esp 109f9e: 8b 45 08 mov 0x8(%ebp),%eax 109fa1: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 109fa4: 85 d2 test %edx,%edx 109fa6: 74 3c je 109fe4 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 109fa8: 83 f8 01 cmp $0x1,%eax 109fab: 75 0b jne 109fb8 _TOD_Get(tp); 109fad: 83 ec 0c sub $0xc,%esp 109fb0: 52 push %edx 109fb1: e8 aa 1b 00 00 call 10bb60 <_TOD_Get> 109fb6: eb 13 jmp 109fcb return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 109fb8: 83 f8 04 cmp $0x4,%eax 109fbb: 74 05 je 109fc2 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 109fbd: 83 f8 02 cmp $0x2,%eax 109fc0: 75 10 jne 109fd2 _TOD_Get_uptime_as_timespec( tp ); 109fc2: 83 ec 0c sub $0xc,%esp 109fc5: 52 push %edx 109fc6: e8 e9 1b 00 00 call 10bbb4 <_TOD_Get_uptime_as_timespec> return 0; 109fcb: 83 c4 10 add $0x10,%esp 109fce: 31 c0 xor %eax,%eax 109fd0: eb 20 jmp 109ff2 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 109fd2: 83 f8 03 cmp $0x3,%eax 109fd5: 75 0d jne 109fe4 rtems_set_errno_and_return_minus_one( ENOSYS ); 109fd7: e8 84 7f 00 00 call 111f60 <__errno> 109fdc: c7 00 58 00 00 00 movl $0x58,(%eax) 109fe2: eb 0b jmp 109fef #endif rtems_set_errno_and_return_minus_one( EINVAL ); 109fe4: e8 77 7f 00 00 call 111f60 <__errno> 109fe9: c7 00 16 00 00 00 movl $0x16,(%eax) 109fef: 83 c8 ff or $0xffffffff,%eax return 0; } 109ff2: c9 leave 109ff3: c3 ret =============================================================================== 00109ff4 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 109ff4: 55 push %ebp 109ff5: 89 e5 mov %esp,%ebp 109ff7: 83 ec 08 sub $0x8,%esp 109ffa: 8b 45 08 mov 0x8(%ebp),%eax 109ffd: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10a000: 85 d2 test %edx,%edx 10a002: 74 44 je 10a048 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10a004: 83 f8 01 cmp $0x1,%eax 10a007: 75 28 jne 10a031 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 10a009: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10a00f: 76 37 jbe 10a048 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a011: a1 e0 74 12 00 mov 0x1274e0,%eax 10a016: 40 inc %eax 10a017: a3 e0 74 12 00 mov %eax,0x1274e0 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10a01c: 83 ec 0c sub $0xc,%esp 10a01f: 52 push %edx 10a020: e8 e7 1b 00 00 call 10bc0c <_TOD_Set> _Thread_Enable_dispatch(); 10a025: e8 30 2f 00 00 call 10cf5a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10a02a: 83 c4 10 add $0x10,%esp 10a02d: 31 c0 xor %eax,%eax 10a02f: eb 25 jmp 10a056 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10a031: 83 f8 02 cmp $0x2,%eax 10a034: 74 05 je 10a03b rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10a036: 83 f8 03 cmp $0x3,%eax 10a039: 75 0d jne 10a048 rtems_set_errno_and_return_minus_one( ENOSYS ); 10a03b: e8 20 7f 00 00 call 111f60 <__errno> 10a040: c7 00 58 00 00 00 movl $0x58,(%eax) 10a046: eb 0b jmp 10a053 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10a048: e8 13 7f 00 00 call 111f60 <__errno> 10a04d: c7 00 16 00 00 00 movl $0x16,(%eax) 10a053: 83 c8 ff or $0xffffffff,%eax return 0; } 10a056: c9 leave 10a057: c3 ret =============================================================================== 00121ef8 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 121ef8: 55 push %ebp 121ef9: 89 e5 mov %esp,%ebp 121efb: 57 push %edi 121efc: 56 push %esi 121efd: 53 push %ebx 121efe: 83 ec 4c sub $0x4c,%esp 121f01: 8b 5d 0c mov 0xc(%ebp),%ebx 121f04: 8b 7d 10 mov 0x10(%ebp),%edi POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 121f07: e8 64 fd ff ff call 121c70 121f0c: 39 45 08 cmp %eax,0x8(%ebp) 121f0f: 74 0d je 121f1e rtems_set_errno_and_return_minus_one( ESRCH ); 121f11: e8 4e 3a ff ff call 115964 <__errno> 121f16: c7 00 03 00 00 00 movl $0x3,(%eax) 121f1c: eb 0f jmp 121f2d /* * Validate the signal passed. */ if ( !sig ) 121f1e: 85 db test %ebx,%ebx 121f20: 75 13 jne 121f35 rtems_set_errno_and_return_minus_one( EINVAL ); 121f22: e8 3d 3a ff ff call 115964 <__errno> 121f27: c7 00 16 00 00 00 movl $0x16,(%eax) 121f2d: 83 c8 ff or $0xffffffff,%eax 121f30: e9 ef 01 00 00 jmp 122124 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 121f35: 8d 4b ff lea -0x1(%ebx),%ecx if ( !is_valid_signo(sig) ) 121f38: 83 f9 1f cmp $0x1f,%ecx 121f3b: 77 e5 ja 121f22 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 121f3d: 6b d3 0c imul $0xc,%ebx,%edx return 0; 121f40: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 121f42: 83 ba 18 ba 12 00 01 cmpl $0x1,0x12ba18(%edx) 121f49: 0f 84 d5 01 00 00 je 122124 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 121f4f: 83 fb 04 cmp $0x4,%ebx 121f52: 74 0a je 121f5e 121f54: 83 fb 08 cmp $0x8,%ebx 121f57: 74 05 je 121f5e 121f59: 83 fb 0b cmp $0xb,%ebx 121f5c: 75 16 jne 121f74 return pthread_kill( pthread_self(), sig ); 121f5e: e8 89 03 00 00 call 1222ec 121f63: 56 push %esi 121f64: 56 push %esi 121f65: 53 push %ebx 121f66: 50 push %eax 121f67: e8 d8 02 00 00 call 122244 121f6c: 83 c4 10 add $0x10,%esp 121f6f: e9 b0 01 00 00 jmp 122124 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 121f74: be 01 00 00 00 mov $0x1,%esi 121f79: d3 e6 shl %cl,%esi /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 121f7b: 89 5d dc mov %ebx,-0x24(%ebp) siginfo->si_code = SI_USER; 121f7e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 121f85: 85 ff test %edi,%edi 121f87: 75 09 jne 121f92 siginfo->si_value.sival_int = 0; 121f89: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 121f90: eb 05 jmp 121f97 } else { siginfo->si_value = *value; 121f92: 8b 07 mov (%edi),%eax 121f94: 89 45 e4 mov %eax,-0x1c(%ebp) 121f97: a1 b4 b4 12 00 mov 0x12b4b4,%eax 121f9c: 40 inc %eax 121f9d: a3 b4 b4 12 00 mov %eax,0x12b4b4 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 121fa2: a1 dc b9 12 00 mov 0x12b9dc,%eax api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 121fa7: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx 121fad: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx 121fb3: f7 d2 not %edx 121fb5: 85 d6 test %edx,%esi 121fb7: 0f 85 ed 00 00 00 jne 1220aa } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 121fbd: 8b 15 9c bb 12 00 mov 0x12bb9c,%edx /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 121fc3: eb 23 jmp 121fe8 !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 121fc5: 89 d0 mov %edx,%eax api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 121fc7: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 121fcd: 85 72 30 test %esi,0x30(%edx) 121fd0: 0f 85 d4 00 00 00 jne 1220aa /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 121fd6: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx 121fdc: f7 d1 not %ecx 121fde: 85 ce test %ecx,%esi 121fe0: 0f 85 c4 00 00 00 jne 1220aa the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 121fe6: 8b 12 mov (%edx),%edx /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 121fe8: 81 fa a0 bb 12 00 cmp $0x12bba0,%edx 121fee: 75 d5 jne 121fc5 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 121ff0: 0f b6 0d 24 72 12 00 movzbl 0x127224,%ecx 121ff7: 41 inc %ecx * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 121ff8: 31 c0 xor %eax,%eax interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 121ffa: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp) /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 122001: 8b 7d cc mov -0x34(%ebp),%edi 122004: 8b 14 bd 8c b4 12 00 mov 0x12b48c(,%edi,4),%edx 12200b: 85 d2 test %edx,%edx 12200d: 0f 84 86 00 00 00 je 122099 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 122013: 8b 52 04 mov 0x4(%edx),%edx */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 122016: 0f b7 7a 10 movzwl 0x10(%edx),%edi 12201a: 89 7d c4 mov %edi,-0x3c(%ebp) object_table = the_info->local_table; 12201d: 8b 52 1c mov 0x1c(%edx),%edx 122020: 89 55 c0 mov %edx,-0x40(%ebp) for ( index = 1 ; index <= maximum ; index++ ) { 122023: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp) 12202a: 89 5d b4 mov %ebx,-0x4c(%ebp) 12202d: eb 5f jmp 12208e the_thread = (Thread_Control *) object_table[ index ]; 12202f: 8b 5d d0 mov -0x30(%ebp),%ebx 122032: 8b 7d c0 mov -0x40(%ebp),%edi 122035: 8b 14 9f mov (%edi,%ebx,4),%edx if ( !the_thread ) 122038: 85 d2 test %edx,%edx 12203a: 74 4f je 12208b /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 12203c: 8b 5a 14 mov 0x14(%edx),%ebx 12203f: 89 5d d4 mov %ebx,-0x2c(%ebp) 122042: 39 cb cmp %ecx,%ebx 122044: 77 45 ja 12208b #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 122046: 8b ba ec 00 00 00 mov 0xec(%edx),%edi 12204c: 8b bf d0 00 00 00 mov 0xd0(%edi),%edi 122052: f7 d7 not %edi 122054: 85 fe test %edi,%esi 122056: 74 33 je 12208b * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 122058: 39 cb cmp %ecx,%ebx 12205a: 72 2a jb 122086 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 12205c: 85 c0 test %eax,%eax 12205e: 74 2b je 12208b <== NEVER TAKEN 122060: 8b 78 10 mov 0x10(%eax),%edi 122063: 89 7d c8 mov %edi,-0x38(%ebp) 122066: 85 ff test %edi,%edi 122068: 74 21 je 12208b <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 12206a: 8b 7a 10 mov 0x10(%edx),%edi 12206d: 85 ff test %edi,%edi 12206f: 74 15 je 122086 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 122071: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp) 122078: 75 11 jne 12208b DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 12207a: 81 e7 00 00 00 10 and $0x10000000,%edi 122080: 74 09 je 12208b 122082: 89 d9 mov %ebx,%ecx 122084: eb 03 jmp 122089 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 122086: 8b 4d d4 mov -0x2c(%ebp),%ecx 122089: 89 d0 mov %edx,%eax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 12208b: ff 45 d0 incl -0x30(%ebp) 12208e: 8b 55 c4 mov -0x3c(%ebp),%edx 122091: 39 55 d0 cmp %edx,-0x30(%ebp) 122094: 76 99 jbe 12202f 122096: 8b 5d b4 mov -0x4c(%ebp),%ebx * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 122099: ff 45 cc incl -0x34(%ebp) 12209c: 83 7d cc 04 cmpl $0x4,-0x34(%ebp) 1220a0: 0f 85 5b ff ff ff jne 122001 } } } } if ( interested ) { 1220a6: 85 c0 test %eax,%eax 1220a8: 74 13 je 1220bd /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1220aa: 51 push %ecx mask = signo_to_mask( sig ); /* * Build up a siginfo structure */ siginfo = &siginfo_struct; 1220ab: 8d 55 dc lea -0x24(%ebp),%edx /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 1220ae: 52 push %edx 1220af: 53 push %ebx 1220b0: 50 push %eax 1220b1: e8 8a 00 00 00 call 122140 <_POSIX_signals_Unblock_thread> 1220b6: 83 c4 10 add $0x10,%esp 1220b9: 84 c0 test %al,%al 1220bb: 75 60 jne 12211d /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 1220bd: 83 ec 0c sub $0xc,%esp 1220c0: 56 push %esi 1220c1: e8 66 00 00 00 call 12212c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 1220c6: 6b db 0c imul $0xc,%ebx,%ebx 1220c9: 83 c4 10 add $0x10,%esp 1220cc: 83 bb 10 ba 12 00 02 cmpl $0x2,0x12ba10(%ebx) 1220d3: 75 48 jne 12211d psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 1220d5: 83 ec 0c sub $0xc,%esp 1220d8: 68 90 bb 12 00 push $0x12bb90 1220dd: e8 5a d0 fe ff call 10f13c <_Chain_Get> if ( !psiginfo ) { 1220e2: 83 c4 10 add $0x10,%esp 1220e5: 85 c0 test %eax,%eax 1220e7: 75 15 jne 1220fe _Thread_Enable_dispatch(); 1220e9: e8 6c e8 fe ff call 11095a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1220ee: e8 71 38 ff ff call 115964 <__errno> 1220f3: c7 00 0b 00 00 00 movl $0xb,(%eax) 1220f9: e9 2f fe ff ff jmp 121f2d } psiginfo->Info = *siginfo; 1220fe: 8d 78 08 lea 0x8(%eax),%edi 122101: 8d 75 dc lea -0x24(%ebp),%esi 122104: b9 03 00 00 00 mov $0x3,%ecx 122109: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 12210b: 52 push %edx 12210c: 52 push %edx 12210d: 50 push %eax 12210e: 81 c3 08 bc 12 00 add $0x12bc08,%ebx 122114: 53 push %ebx 122115: e8 e6 cf fe ff call 10f100 <_Chain_Append> 12211a: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 12211d: e8 38 e8 fe ff call 11095a <_Thread_Enable_dispatch> return 0; 122122: 31 c0 xor %eax,%eax } 122124: 8d 65 f4 lea -0xc(%ebp),%esp 122127: 5b pop %ebx 122128: 5e pop %esi 122129: 5f pop %edi 12212a: c9 leave 12212b: c3 ret =============================================================================== 0010efdc : int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { 10efdc: 55 push %ebp 10efdd: 89 e5 mov %esp,%ebp 10efdf: 8b 55 08 mov 0x8(%ebp),%edx 10efe2: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized || !inheritsched ) return EINVAL; 10efe5: b8 16 00 00 00 mov $0x16,%eax int pthread_attr_getinheritsched( const pthread_attr_t *attr, int *inheritsched ) { if ( !attr || !attr->is_initialized || !inheritsched ) 10efea: 85 d2 test %edx,%edx 10efec: 74 17 je 10f005 <== NEVER TAKEN 10efee: 85 c9 test %ecx,%ecx 10eff0: 74 0e je 10f000 <== NEVER TAKEN 10eff2: 83 3a 00 cmpl $0x0,(%edx) 10eff5: 74 09 je 10f000 <== NEVER TAKEN return EINVAL; *inheritsched = attr->inheritsched; 10eff7: 8b 42 10 mov 0x10(%edx),%eax 10effa: 89 01 mov %eax,(%ecx) return 0; 10effc: 31 c0 xor %eax,%eax 10effe: eb 05 jmp 10f005 const pthread_attr_t *attr, int *inheritsched ) { if ( !attr || !attr->is_initialized || !inheritsched ) return EINVAL; 10f000: b8 16 00 00 00 mov $0x16,%eax *inheritsched = attr->inheritsched; return 0; } 10f005: c9 leave 10f006: c3 ret =============================================================================== 0010f1f8 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 10f1f8: 55 push %ebp 10f1f9: 89 e5 mov %esp,%ebp 10f1fb: 8b 55 08 mov 0x8(%ebp),%edx 10f1fe: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) return EINVAL; 10f201: b8 16 00 00 00 mov $0x16,%eax int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 10f206: 85 d2 test %edx,%edx 10f208: 74 1e je 10f228 10f20a: 83 3a 00 cmpl $0x0,(%edx) 10f20d: 74 19 je 10f228 return EINVAL; switch ( policy ) { 10f20f: 83 f9 04 cmp $0x4,%ecx 10f212: 77 0f ja 10f223 10f214: b0 01 mov $0x1,%al 10f216: d3 e0 shl %cl,%eax 10f218: a8 17 test $0x17,%al 10f21a: 74 07 je 10f223 <== NEVER TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 10f21c: 89 4a 14 mov %ecx,0x14(%edx) return 0; 10f21f: 31 c0 xor %eax,%eax 10f221: eb 05 jmp 10f228 default: return ENOTSUP; 10f223: b8 86 00 00 00 mov $0x86,%eax } } 10f228: c9 leave 10f229: c3 ret =============================================================================== 0010a518 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10a518: 55 push %ebp 10a519: 89 e5 mov %esp,%ebp 10a51b: 57 push %edi 10a51c: 56 push %esi 10a51d: 53 push %ebx 10a51e: 83 ec 1c sub $0x1c,%esp 10a521: 8b 5d 08 mov 0x8(%ebp),%ebx 10a524: 8b 75 10 mov 0x10(%ebp),%esi /* * Error check parameters */ if ( !barrier ) return EINVAL; 10a527: b8 16 00 00 00 mov $0x16,%eax const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10a52c: 85 db test %ebx,%ebx 10a52e: 0f 84 96 00 00 00 je 10a5ca return EINVAL; if ( count == 0 ) 10a534: 85 f6 test %esi,%esi 10a536: 0f 84 8e 00 00 00 je 10a5ca return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10a53c: 8b 7d 0c mov 0xc(%ebp),%edi 10a53f: 85 ff test %edi,%edi 10a541: 75 0f jne 10a552 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10a543: 83 ec 0c sub $0xc,%esp 10a546: 8d 7d d8 lea -0x28(%ebp),%edi 10a549: 57 push %edi 10a54a: e8 19 ff ff ff call 10a468 10a54f: 83 c4 10 add $0x10,%esp /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) return EINVAL; 10a552: b8 16 00 00 00 mov $0x16,%eax } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10a557: 83 3f 00 cmpl $0x0,(%edi) 10a55a: 74 6e je 10a5ca return EINVAL; switch ( the_attr->process_shared ) { 10a55c: 83 7f 04 00 cmpl $0x0,0x4(%edi) 10a560: 75 68 jne 10a5ca <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10a562: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10a569: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a56c: a1 50 63 12 00 mov 0x126350,%eax 10a571: 40 inc %eax 10a572: a3 50 63 12 00 mov %eax,0x126350 * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); 10a577: 83 ec 0c sub $0xc,%esp 10a57a: 68 f4 66 12 00 push $0x1266f4 10a57f: e8 0c 1e 00 00 call 10c390 <_Objects_Allocate> 10a584: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10a586: 83 c4 10 add $0x10,%esp 10a589: 85 c0 test %eax,%eax 10a58b: 75 0c jne 10a599 _Thread_Enable_dispatch(); 10a58d: e8 d0 2c 00 00 call 10d262 <_Thread_Enable_dispatch> return EAGAIN; 10a592: b8 0b 00 00 00 mov $0xb,%eax 10a597: eb 31 jmp 10a5ca } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10a599: 50 push %eax 10a59a: 50 push %eax 10a59b: 8d 45 e0 lea -0x20(%ebp),%eax 10a59e: 50 push %eax 10a59f: 8d 46 10 lea 0x10(%esi),%eax 10a5a2: 50 push %eax 10a5a3: e8 a8 14 00 00 call 10ba50 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10a5a8: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10a5ab: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a5ae: 8b 15 10 67 12 00 mov 0x126710,%edx 10a5b4: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a5b7: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 10a5be: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10a5c0: e8 9d 2c 00 00 call 10d262 <_Thread_Enable_dispatch> return 0; 10a5c5: 83 c4 10 add $0x10,%esp 10a5c8: 31 c0 xor %eax,%eax } 10a5ca: 8d 65 f4 lea -0xc(%ebp),%esp 10a5cd: 5b pop %ebx 10a5ce: 5e pop %esi 10a5cf: 5f pop %edi 10a5d0: c9 leave 10a5d1: c3 ret =============================================================================== 00109ed0 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 109ed0: 55 push %ebp 109ed1: 89 e5 mov %esp,%ebp 109ed3: 56 push %esi 109ed4: 53 push %ebx 109ed5: 8b 5d 08 mov 0x8(%ebp),%ebx 109ed8: 8b 75 0c mov 0xc(%ebp),%esi /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 109edb: 85 db test %ebx,%ebx 109edd: 74 4b je 109f2a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 109edf: a1 48 63 12 00 mov 0x126348,%eax 109ee4: 40 inc %eax 109ee5: a3 48 63 12 00 mov %eax,0x126348 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 109eea: 83 ec 0c sub $0xc,%esp 109eed: 6a 10 push $0x10 109eef: e8 32 3c 00 00 call 10db26 <_Workspace_Allocate> if ( handler ) { 109ef4: 83 c4 10 add $0x10,%esp 109ef7: 85 c0 test %eax,%eax 109ef9: 74 24 je 109f1f <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 109efb: 8b 15 70 68 12 00 mov 0x126870,%edx handler_stack = &thread_support->Cancellation_Handlers; 109f01: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx 109f07: 81 c2 e4 00 00 00 add $0xe4,%edx handler->routine = routine; 109f0d: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 109f10: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 109f13: 51 push %ecx 109f14: 51 push %ecx 109f15: 50 push %eax 109f16: 52 push %edx 109f17: e8 88 15 00 00 call 10b4a4 <_Chain_Append> 109f1c: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 109f1f: 8d 65 f8 lea -0x8(%ebp),%esp 109f22: 5b pop %ebx 109f23: 5e pop %esi 109f24: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 109f25: e9 34 2d 00 00 jmp 10cc5e <_Thread_Enable_dispatch> } 109f2a: 8d 65 f8 lea -0x8(%ebp),%esp 109f2d: 5b pop %ebx 109f2e: 5e pop %esi 109f2f: c9 leave 109f30: c3 ret =============================================================================== 0010ac40 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10ac40: 55 push %ebp 10ac41: 89 e5 mov %esp,%ebp 10ac43: 56 push %esi 10ac44: 53 push %ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10ac45: 8b 5d 0c mov 0xc(%ebp),%ebx 10ac48: 85 db test %ebx,%ebx 10ac4a: 75 05 jne 10ac51 else the_attr = &_POSIX_Condition_variables_Default_attributes; 10ac4c: bb 08 15 12 00 mov $0x121508,%ebx /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return EINVAL; 10ac51: b8 16 00 00 00 mov $0x16,%eax else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10ac56: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10ac5a: 74 76 je 10acd2 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10ac5c: 83 3b 00 cmpl $0x0,(%ebx) 10ac5f: 74 71 je 10acd2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10ac61: a1 60 73 12 00 mov 0x127360,%eax 10ac66: 40 inc %eax 10ac67: a3 60 73 12 00 mov %eax,0x127360 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 10ac6c: 83 ec 0c sub $0xc,%esp 10ac6f: 68 9c 77 12 00 push $0x12779c 10ac74: e8 f7 22 00 00 call 10cf70 <_Objects_Allocate> 10ac79: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10ac7b: 83 c4 10 add $0x10,%esp 10ac7e: 85 c0 test %eax,%eax 10ac80: 75 0c jne 10ac8e _Thread_Enable_dispatch(); 10ac82: e8 bb 31 00 00 call 10de42 <_Thread_Enable_dispatch> return ENOMEM; 10ac87: b8 0c 00 00 00 mov $0xc,%eax 10ac8c: eb 44 jmp 10acd2 } the_cond->process_shared = the_attr->process_shared; 10ac8e: 8b 43 04 mov 0x4(%ebx),%eax 10ac91: 89 46 10 mov %eax,0x10(%esi) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10ac94: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) _Thread_queue_Initialize( 10ac9b: 6a 74 push $0x74 10ac9d: 68 00 08 00 10 push $0x10000800 10aca2: 6a 00 push $0x0 10aca4: 8d 46 18 lea 0x18(%esi),%eax 10aca7: 50 push %eax 10aca8: e8 4f 38 00 00 call 10e4fc <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10acad: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10acb0: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10acb3: 8b 15 b8 77 12 00 mov 0x1277b8,%edx 10acb9: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10acbc: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10acc3: 8b 55 08 mov 0x8(%ebp),%edx 10acc6: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10acc8: e8 75 31 00 00 call 10de42 <_Thread_Enable_dispatch> return 0; 10accd: 83 c4 10 add $0x10,%esp 10acd0: 31 c0 xor %eax,%eax } 10acd2: 8d 65 f8 lea -0x8(%ebp),%esp 10acd5: 5b pop %ebx 10acd6: 5e pop %esi 10acd7: c9 leave 10acd8: c3 ret =============================================================================== 0010aaf4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10aaf4: 55 push %ebp 10aaf5: 89 e5 mov %esp,%ebp 10aaf7: 8b 55 08 mov 0x8(%ebp),%edx if ( !attr || attr->is_initialized == false ) return EINVAL; 10aafa: b8 16 00 00 00 mov $0x16,%eax int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) 10aaff: 85 d2 test %edx,%edx 10ab01: 74 0d je 10ab10 10ab03: 83 3a 00 cmpl $0x0,(%edx) 10ab06: 74 08 je 10ab10 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10ab08: c7 02 00 00 00 00 movl $0x0,(%edx) return 0; 10ab0e: 30 c0 xor %al,%al } 10ab10: c9 leave 10ab11: c3 ret =============================================================================== 0010a228 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10a228: 55 push %ebp 10a229: 89 e5 mov %esp,%ebp 10a22b: 57 push %edi 10a22c: 56 push %esi 10a22d: 53 push %ebx 10a22e: 83 ec 5c sub $0x5c,%esp struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; 10a231: c7 45 b4 0e 00 00 00 movl $0xe,-0x4c(%ebp) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10a238: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a23c: 0f 84 0f 02 00 00 je 10a451 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10a242: 8b 5d 0c mov 0xc(%ebp),%ebx 10a245: 85 db test %ebx,%ebx 10a247: 75 05 jne 10a24e 10a249: bb 74 01 12 00 mov $0x120174,%ebx if ( !the_attr->is_initialized ) return EINVAL; 10a24e: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp) if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; if ( !the_attr->is_initialized ) 10a255: 83 3b 00 cmpl $0x0,(%ebx) 10a258: 0f 84 f3 01 00 00 je 10a451 * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) ) 10a25e: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a262: 74 0e je 10a272 10a264: a1 44 22 12 00 mov 0x122244,%eax 10a269: 39 43 08 cmp %eax,0x8(%ebx) 10a26c: 0f 82 df 01 00 00 jb 10a451 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { 10a272: 8b 43 10 mov 0x10(%ebx),%eax 10a275: 83 f8 01 cmp $0x1,%eax 10a278: 74 0b je 10a285 10a27a: 83 f8 02 cmp $0x2,%eax 10a27d: 0f 85 c7 01 00 00 jne 10a44a 10a283: eb 1f jmp 10a2a4 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a285: a1 78 68 12 00 mov 0x126878,%eax 10a28a: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi schedpolicy = api->schedpolicy; 10a290: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10a296: 89 45 ac mov %eax,-0x54(%ebp) schedparam = api->schedparam; 10a299: 8d 7d c4 lea -0x3c(%ebp),%edi 10a29c: 81 c6 88 00 00 00 add $0x88,%esi 10a2a2: eb 0c jmp 10a2b0 break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10a2a4: 8b 43 14 mov 0x14(%ebx),%eax 10a2a7: 89 45 ac mov %eax,-0x54(%ebp) schedparam = the_attr->schedparam; 10a2aa: 8d 7d c4 lea -0x3c(%ebp),%edi 10a2ad: 8d 73 18 lea 0x18(%ebx),%esi 10a2b0: b9 07 00 00 00 mov $0x7,%ecx 10a2b5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) return ENOTSUP; 10a2b7: c7 45 b4 86 00 00 00 movl $0x86,-0x4c(%ebp) /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 10a2be: 83 7b 0c 00 cmpl $0x0,0xc(%ebx) 10a2c2: 0f 85 89 01 00 00 jne 10a451 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a2c8: 83 ec 0c sub $0xc,%esp 10a2cb: ff 75 c4 pushl -0x3c(%ebp) 10a2ce: e8 11 59 00 00 call 10fbe4 <_POSIX_Priority_Is_valid> 10a2d3: 83 c4 10 add $0x10,%esp return EINVAL; 10a2d6: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp) return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10a2dd: 84 c0 test %al,%al 10a2df: 0f 84 6c 01 00 00 je 10a451 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10a2e5: 8b 45 c4 mov -0x3c(%ebp),%eax 10a2e8: 89 45 a8 mov %eax,-0x58(%ebp) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 10a2eb: 0f b6 3d 48 22 12 00 movzbl 0x122248,%edi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10a2f2: 8d 45 e0 lea -0x20(%ebp),%eax 10a2f5: 50 push %eax 10a2f6: 8d 45 e4 lea -0x1c(%ebp),%eax 10a2f9: 50 push %eax 10a2fa: 8d 45 c4 lea -0x3c(%ebp),%eax 10a2fd: 50 push %eax 10a2fe: ff 75 ac pushl -0x54(%ebp) 10a301: e8 fe 58 00 00 call 10fc04 <_POSIX_Thread_Translate_sched_param> 10a306: 89 45 b4 mov %eax,-0x4c(%ebp) schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10a309: 83 c4 10 add $0x10,%esp 10a30c: 85 c0 test %eax,%eax 10a30e: 0f 85 3d 01 00 00 jne 10a451 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10a314: 83 ec 0c sub $0xc,%esp 10a317: ff 35 f4 63 12 00 pushl 0x1263f4 10a31d: e8 4e 15 00 00 call 10b870 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10a322: c7 04 24 74 65 12 00 movl $0x126574,(%esp) 10a329: e8 a2 1e 00 00 call 10c1d0 <_Objects_Allocate> 10a32e: 89 45 b0 mov %eax,-0x50(%ebp) * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 10a331: 83 c4 10 add $0x10,%esp 10a334: 85 c0 test %eax,%eax 10a336: 75 05 jne 10a33d _RTEMS_Unlock_allocator(); 10a338: 83 ec 0c sub $0xc,%esp 10a33b: eb 53 jmp 10a390 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10a33d: 8b 4d e0 mov -0x20(%ebp),%ecx 10a340: 8b 75 e4 mov -0x1c(%ebp),%esi 10a343: 8b 53 08 mov 0x8(%ebx),%edx 10a346: a1 44 22 12 00 mov 0x122244,%eax 10a34b: d1 e0 shl %eax 10a34d: 39 d0 cmp %edx,%eax 10a34f: 73 02 jae 10a353 10a351: 89 d0 mov %edx,%eax 10a353: 52 push %edx 10a354: 6a 00 push $0x0 10a356: 6a 00 push $0x0 10a358: 51 push %ecx 10a359: 56 push %esi 10a35a: 6a 01 push $0x1 10a35c: 81 e7 ff 00 00 00 and $0xff,%edi 10a362: 2b 7d a8 sub -0x58(%ebp),%edi 10a365: 57 push %edi 10a366: 6a 01 push $0x1 10a368: 50 push %eax 10a369: ff 73 04 pushl 0x4(%ebx) 10a36c: ff 75 b0 pushl -0x50(%ebp) 10a36f: 68 74 65 12 00 push $0x126574 10a374: e8 bb 2d 00 00 call 10d134 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10a379: 83 c4 30 add $0x30,%esp 10a37c: 84 c0 test %al,%al 10a37e: 75 2a jne 10a3aa RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10a380: 56 push %esi 10a381: 56 push %esi 10a382: ff 75 b0 pushl -0x50(%ebp) 10a385: 68 74 65 12 00 push $0x126574 10a38a: e8 35 21 00 00 call 10c4c4 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10a38f: 5b pop %ebx 10a390: ff 35 f4 63 12 00 pushl 0x1263f4 10a396: e8 1d 15 00 00 call 10b8b8 <_API_Mutex_Unlock> return EAGAIN; 10a39b: 83 c4 10 add $0x10,%esp 10a39e: c7 45 b4 0b 00 00 00 movl $0xb,-0x4c(%ebp) 10a3a5: e9 a7 00 00 00 jmp 10a451 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10a3aa: 8b 45 b0 mov -0x50(%ebp),%eax 10a3ad: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx api->Attributes = *the_attr; 10a3b3: b9 10 00 00 00 mov $0x10,%ecx 10a3b8: 89 d7 mov %edx,%edi 10a3ba: 89 de mov %ebx,%esi 10a3bc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10a3be: 8b 43 3c mov 0x3c(%ebx),%eax 10a3c1: 89 42 40 mov %eax,0x40(%edx) api->schedpolicy = schedpolicy; 10a3c4: 8b 45 ac mov -0x54(%ebp),%eax 10a3c7: 89 82 84 00 00 00 mov %eax,0x84(%edx) api->schedparam = schedparam; 10a3cd: 8d ba 88 00 00 00 lea 0x88(%edx),%edi 10a3d3: 8d 75 c4 lea -0x3c(%ebp),%esi 10a3d6: b1 07 mov $0x7,%cl 10a3d8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10a3da: 83 ec 0c sub $0xc,%esp 10a3dd: 6a 00 push $0x0 10a3df: ff 75 14 pushl 0x14(%ebp) 10a3e2: ff 75 10 pushl 0x10(%ebp) 10a3e5: 6a 01 push $0x1 10a3e7: ff 75 b0 pushl -0x50(%ebp) 10a3ea: 89 55 a4 mov %edx,-0x5c(%ebp) 10a3ed: e8 62 35 00 00 call 10d954 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10a3f2: 83 c4 20 add $0x20,%esp 10a3f5: 83 7d ac 04 cmpl $0x4,-0x54(%ebp) 10a3f9: 8b 55 a4 mov -0x5c(%ebp),%edx 10a3fc: 75 2e jne 10a42c _Watchdog_Insert_ticks( 10a3fe: 83 ec 0c sub $0xc,%esp &api->Sporadic_timer, _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) 10a401: 8d 82 90 00 00 00 lea 0x90(%edx),%eax return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10a407: 50 push %eax 10a408: e8 97 36 00 00 call 10daa4 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a40d: 8b 55 a4 mov -0x5c(%ebp),%edx 10a410: 89 82 b4 00 00 00 mov %eax,0xb4(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a416: 58 pop %eax 10a417: 59 pop %ecx 10a418: 81 c2 a8 00 00 00 add $0xa8,%edx 10a41e: 52 push %edx 10a41f: 68 14 64 12 00 push $0x126414 10a424: e8 2f 39 00 00 call 10dd58 <_Watchdog_Insert> 10a429: 83 c4 10 add $0x10,%esp } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10a42c: 8b 45 b0 mov -0x50(%ebp),%eax 10a42f: 8b 50 08 mov 0x8(%eax),%edx 10a432: 8b 45 08 mov 0x8(%ebp),%eax 10a435: 89 10 mov %edx,(%eax) _RTEMS_Unlock_allocator(); 10a437: 83 ec 0c sub $0xc,%esp 10a43a: ff 35 f4 63 12 00 pushl 0x1263f4 10a440: e8 73 14 00 00 call 10b8b8 <_API_Mutex_Unlock> return 0; 10a445: 83 c4 10 add $0x10,%esp 10a448: eb 07 jmp 10a451 schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; break; default: return EINVAL; 10a44a: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp) */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10a451: 8b 45 b4 mov -0x4c(%ebp),%eax 10a454: 8d 65 f4 lea -0xc(%ebp),%esp 10a457: 5b pop %ebx 10a458: 5e pop %esi 10a459: 5f pop %edi 10a45a: c9 leave 10a45b: c3 ret =============================================================================== 00110ce0 : } void pthread_exit( void *value_ptr ) { 110ce0: 55 push %ebp 110ce1: 89 e5 mov %esp,%ebp 110ce3: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 110ce6: ff 75 08 pushl 0x8(%ebp) 110ce9: ff 35 68 58 12 00 pushl 0x125868 110cef: e8 88 ff ff ff call 110c7c <_POSIX_Thread_Exit> 110cf4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110cf7: c9 leave <== NOT EXECUTED 110cf8: c3 ret <== NOT EXECUTED =============================================================================== 0010bf24 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10bf24: 55 push %ebp 10bf25: 89 e5 mov %esp,%ebp 10bf27: 53 push %ebx 10bf28: 83 ec 2c sub $0x2c,%esp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10bf2b: 8d 45 f4 lea -0xc(%ebp),%eax 10bf2e: 50 push %eax 10bf2f: ff 75 0c pushl 0xc(%ebp) 10bf32: e8 b9 00 00 00 call 10bff0 <_POSIX_Absolute_timeout_to_ticks> 10bf37: 89 c3 mov %eax,%ebx int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex)); int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex)); #if defined(_POSIX_TIMEOUTS) int _EXFUN(pthread_mutex_timedlock, 10bf39: 83 c4 0c add $0xc,%esp 10bf3c: 83 f8 03 cmp $0x3,%eax 10bf3f: 0f 94 c2 sete %dl if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10bf42: ff 75 f4 pushl -0xc(%ebp) 10bf45: 0f b6 c2 movzbl %dl,%eax 10bf48: 50 push %eax 10bf49: ff 75 08 pushl 0x8(%ebp) 10bf4c: 88 55 e4 mov %dl,-0x1c(%ebp) 10bf4f: e8 e8 fe ff ff call 10be3c <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { 10bf54: 83 c4 10 add $0x10,%esp 10bf57: 8a 55 e4 mov -0x1c(%ebp),%dl 10bf5a: 84 d2 test %dl,%dl 10bf5c: 75 1d jne 10bf7b 10bf5e: 83 f8 10 cmp $0x10,%eax 10bf61: 75 18 jne 10bf7b <== NEVER TAKEN if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10bf63: 85 db test %ebx,%ebx 10bf65: 74 08 je 10bf6f <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10bf67: 4b dec %ebx 10bf68: 83 fb 01 cmp $0x1,%ebx 10bf6b: 77 0e ja 10bf7b <== NEVER TAKEN 10bf6d: eb 07 jmp 10bf76 * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 10bf6f: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED 10bf74: eb 05 jmp 10bf7b <== NOT EXECUTED if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10bf76: b8 74 00 00 00 mov $0x74,%eax } return lock_status; } 10bf7b: 8b 5d fc mov -0x4(%ebp),%ebx 10bf7e: c9 leave 10bf7f: c3 ret =============================================================================== 0010bb9c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10bb9c: 55 push %ebp 10bb9d: 89 e5 mov %esp,%ebp 10bb9f: 8b 55 08 mov 0x8(%ebp),%edx 10bba2: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) return EINVAL; 10bba5: b8 16 00 00 00 mov $0x16,%eax int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 10bbaa: 85 d2 test %edx,%edx 10bbac: 74 0f je 10bbbd 10bbae: 83 3a 00 cmpl $0x0,(%edx) 10bbb1: 74 0a je 10bbbd return EINVAL; switch ( pshared ) { 10bbb3: 83 f9 01 cmp $0x1,%ecx 10bbb6: 77 05 ja 10bbbd <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10bbb8: 89 4a 04 mov %ecx,0x4(%edx) return 0; 10bbbb: 30 c0 xor %al,%al default: return EINVAL; } } 10bbbd: c9 leave 10bbbe: c3 ret =============================================================================== 00109dc4 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 109dc4: 55 push %ebp 109dc5: 89 e5 mov %esp,%ebp 109dc7: 8b 55 08 mov 0x8(%ebp),%edx 109dca: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr || !attr->is_initialized ) return EINVAL; 109dcd: b8 16 00 00 00 mov $0x16,%eax int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) 109dd2: 85 d2 test %edx,%edx 109dd4: 74 0f je 109de5 109dd6: 83 3a 00 cmpl $0x0,(%edx) 109dd9: 74 0a je 109de5 <== NEVER TAKEN return EINVAL; switch ( type ) { 109ddb: 83 f9 03 cmp $0x3,%ecx 109dde: 77 05 ja 109de5 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 109de0: 89 4a 10 mov %ecx,0x10(%edx) return 0; 109de3: 30 c0 xor %al,%al default: return EINVAL; } } 109de5: c9 leave 109de6: c3 ret =============================================================================== 0010a874 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10a874: 55 push %ebp 10a875: 89 e5 mov %esp,%ebp 10a877: 56 push %esi 10a878: 53 push %ebx 10a879: 83 ec 10 sub $0x10,%esp 10a87c: 8b 5d 08 mov 0x8(%ebp),%ebx 10a87f: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10a882: 85 f6 test %esi,%esi 10a884: 74 51 je 10a8d7 10a886: 85 db test %ebx,%ebx 10a888: 74 4d je 10a8d7 once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 10a88a: 31 c0 xor %eax,%eax ) { if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { 10a88c: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a890: 75 4a jne 10a8dc rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 10a892: 52 push %edx 10a893: 8d 45 f4 lea -0xc(%ebp),%eax 10a896: 50 push %eax 10a897: 68 00 01 00 00 push $0x100 10a89c: 68 00 01 00 00 push $0x100 10a8a1: e8 9e 0a 00 00 call 10b344 if ( !once_control->init_executed ) { 10a8a6: 83 c4 10 add $0x10,%esp 10a8a9: 83 7b 04 00 cmpl $0x0,0x4(%ebx) 10a8ad: 75 0f jne 10a8be <== NEVER TAKEN once_control->is_initialized = true; 10a8af: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10a8b5: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10a8bc: ff d6 call *%esi } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10a8be: 50 push %eax 10a8bf: 8d 45 f4 lea -0xc(%ebp),%eax 10a8c2: 50 push %eax 10a8c3: 68 00 01 00 00 push $0x100 10a8c8: ff 75 f4 pushl -0xc(%ebp) 10a8cb: e8 74 0a 00 00 call 10b344 10a8d0: 83 c4 10 add $0x10,%esp } return 0; 10a8d3: 31 c0 xor %eax,%eax 10a8d5: eb 05 jmp 10a8dc pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 10a8d7: b8 16 00 00 00 mov $0x16,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10a8dc: 8d 65 f8 lea -0x8(%ebp),%esp 10a8df: 5b pop %ebx 10a8e0: 5e pop %esi 10a8e1: c9 leave 10a8e2: c3 ret =============================================================================== 0010b0a0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10b0a0: 55 push %ebp 10b0a1: 89 e5 mov %esp,%ebp 10b0a3: 56 push %esi 10b0a4: 53 push %ebx 10b0a5: 83 ec 10 sub $0x10,%esp 10b0a8: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Error check parameters */ if ( !rwlock ) return EINVAL; 10b0ab: b8 16 00 00 00 mov $0x16,%eax const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10b0b0: 85 db test %ebx,%ebx 10b0b2: 0f 84 8b 00 00 00 je 10b143 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10b0b8: 8b 75 0c mov 0xc(%ebp),%esi 10b0bb: 85 f6 test %esi,%esi 10b0bd: 75 0f jne 10b0ce the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10b0bf: 83 ec 0c sub $0xc,%esp 10b0c2: 8d 75 ec lea -0x14(%ebp),%esi 10b0c5: 56 push %esi 10b0c6: e8 5d 09 00 00 call 10ba28 10b0cb: 83 c4 10 add $0x10,%esp /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) return EINVAL; 10b0ce: b8 16 00 00 00 mov $0x16,%eax } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10b0d3: 83 3e 00 cmpl $0x0,(%esi) 10b0d6: 74 6b je 10b143 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10b0d8: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10b0dc: 75 65 jne 10b143 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; 10b0de: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b0e5: a1 50 83 12 00 mov 0x128350,%eax 10b0ea: 40 inc %eax 10b0eb: a3 50 83 12 00 mov %eax,0x128350 * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); 10b0f0: 83 ec 0c sub $0xc,%esp 10b0f3: 68 34 85 12 00 push $0x128534 10b0f8: e8 33 23 00 00 call 10d430 <_Objects_Allocate> 10b0fd: 89 c6 mov %eax,%esi */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10b0ff: 83 c4 10 add $0x10,%esp 10b102: 85 c0 test %eax,%eax 10b104: 75 0c jne 10b112 _Thread_Enable_dispatch(); 10b106: e8 f7 31 00 00 call 10e302 <_Thread_Enable_dispatch> return EAGAIN; 10b10b: b8 0b 00 00 00 mov $0xb,%eax 10b110: eb 31 jmp 10b143 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10b112: 50 push %eax 10b113: 50 push %eax 10b114: 8d 45 f4 lea -0xc(%ebp),%eax 10b117: 50 push %eax 10b118: 8d 46 10 lea 0x10(%esi),%eax 10b11b: 50 push %eax 10b11c: e8 7b 1b 00 00 call 10cc9c <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10b121: 8b 46 08 mov 0x8(%esi),%eax Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10b124: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10b127: 8b 15 50 85 12 00 mov 0x128550,%edx 10b12d: 89 34 8a mov %esi,(%edx,%ecx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10b130: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10b137: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10b139: e8 c4 31 00 00 call 10e302 <_Thread_Enable_dispatch> return 0; 10b13e: 83 c4 10 add $0x10,%esp 10b141: 31 c0 xor %eax,%eax } 10b143: 8d 65 f8 lea -0x8(%ebp),%esp 10b146: 5b pop %ebx 10b147: 5e pop %esi 10b148: c9 leave 10b149: c3 ret =============================================================================== 0010b1b4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b1b4: 55 push %ebp 10b1b5: 89 e5 mov %esp,%ebp 10b1b7: 57 push %edi 10b1b8: 56 push %esi 10b1b9: 53 push %ebx 10b1ba: 83 ec 2c sub $0x2c,%esp 10b1bd: 8b 7d 08 mov 0x8(%ebp),%edi Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) return EINVAL; 10b1c0: bb 16 00 00 00 mov $0x16,%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b1c5: 85 ff test %edi,%edi 10b1c7: 0f 84 87 00 00 00 je 10b254 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10b1cd: 50 push %eax 10b1ce: 50 push %eax 10b1cf: 8d 45 e0 lea -0x20(%ebp),%eax 10b1d2: 50 push %eax 10b1d3: ff 75 0c pushl 0xc(%ebp) 10b1d6: e8 59 59 00 00 call 110b34 <_POSIX_Absolute_timeout_to_ticks> 10b1db: 89 c6 mov %eax,%esi 10b1dd: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10b1e0: 8d 45 e4 lea -0x1c(%ebp),%eax 10b1e3: 50 push %eax 10b1e4: ff 37 pushl (%edi) 10b1e6: 68 34 85 12 00 push $0x128534 10b1eb: e8 6c 26 00 00 call 10d85c <_Objects_Get> switch ( location ) { 10b1f0: 83 c4 10 add $0x10,%esp 10b1f3: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b1f7: 75 5b jne 10b254 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 10b1f9: 83 fe 03 cmp $0x3,%esi 10b1fc: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10b1ff: 83 ec 0c sub $0xc,%esp 10b202: 6a 00 push $0x0 10b204: ff 75 e0 pushl -0x20(%ebp) 10b207: 0f b6 ca movzbl %dl,%ecx 10b20a: 51 push %ecx 10b20b: ff 37 pushl (%edi) 10b20d: 83 c0 10 add $0x10,%eax 10b210: 50 push %eax 10b211: 88 55 d4 mov %dl,-0x2c(%ebp) 10b214: e8 b7 1a 00 00 call 10ccd0 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b219: 83 c4 20 add $0x20,%esp 10b21c: e8 e1 30 00 00 call 10e302 <_Thread_Enable_dispatch> if ( !do_wait ) { 10b221: 8a 55 d4 mov -0x2c(%ebp),%dl 10b224: 84 d2 test %dl,%dl 10b226: 75 17 jne 10b23f if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10b228: a1 78 88 12 00 mov 0x128878,%eax 10b22d: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b231: 75 0c jne 10b23f if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10b233: 85 f6 test %esi,%esi 10b235: 74 1d je 10b254 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10b237: 4e dec %esi status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10b238: b3 74 mov $0x74,%bl _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10b23a: 83 fe 01 cmp $0x1,%esi 10b23d: 76 15 jbe 10b254 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b23f: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10b242: a1 78 88 12 00 mov 0x128878,%eax status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b247: ff 70 34 pushl 0x34(%eax) 10b24a: e8 bd 00 00 00 call 10b30c <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b24f: 89 c3 mov %eax,%ebx 10b251: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b254: 89 d8 mov %ebx,%eax 10b256: 8d 65 f4 lea -0xc(%ebp),%esp 10b259: 5b pop %ebx 10b25a: 5e pop %esi 10b25b: 5f pop %edi 10b25c: c9 leave 10b25d: c3 ret =============================================================================== 0010b260 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10b260: 55 push %ebp 10b261: 89 e5 mov %esp,%ebp 10b263: 57 push %edi 10b264: 56 push %esi 10b265: 53 push %ebx 10b266: 83 ec 2c sub $0x2c,%esp 10b269: 8b 7d 08 mov 0x8(%ebp),%edi Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) return EINVAL; 10b26c: bb 16 00 00 00 mov $0x16,%ebx Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 10b271: 85 ff test %edi,%edi 10b273: 0f 84 87 00 00 00 je 10b300 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 10b279: 50 push %eax 10b27a: 50 push %eax 10b27b: 8d 45 e0 lea -0x20(%ebp),%eax 10b27e: 50 push %eax 10b27f: ff 75 0c pushl 0xc(%ebp) 10b282: e8 ad 58 00 00 call 110b34 <_POSIX_Absolute_timeout_to_ticks> 10b287: 89 c6 mov %eax,%esi 10b289: 83 c4 0c add $0xc,%esp if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 10b28c: 8d 45 e4 lea -0x1c(%ebp),%eax 10b28f: 50 push %eax 10b290: ff 37 pushl (%edi) 10b292: 68 34 85 12 00 push $0x128534 10b297: e8 c0 25 00 00 call 10d85c <_Objects_Get> switch ( location ) { 10b29c: 83 c4 10 add $0x10,%esp 10b29f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b2a3: 75 5b jne 10b300 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 10b2a5: 83 fe 03 cmp $0x3,%esi 10b2a8: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10b2ab: 83 ec 0c sub $0xc,%esp 10b2ae: 6a 00 push $0x0 10b2b0: ff 75 e0 pushl -0x20(%ebp) 10b2b3: 0f b6 ca movzbl %dl,%ecx 10b2b6: 51 push %ecx 10b2b7: ff 37 pushl (%edi) 10b2b9: 83 c0 10 add $0x10,%eax 10b2bc: 50 push %eax 10b2bd: 88 55 d4 mov %dl,-0x2c(%ebp) 10b2c0: e8 c3 1a 00 00 call 10cd88 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10b2c5: 83 c4 20 add $0x20,%esp 10b2c8: e8 35 30 00 00 call 10e302 <_Thread_Enable_dispatch> if ( !do_wait && 10b2cd: 8a 55 d4 mov -0x2c(%ebp),%dl 10b2d0: 84 d2 test %dl,%dl 10b2d2: 75 17 jne 10b2eb (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10b2d4: a1 78 88 12 00 mov 0x128878,%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10b2d9: 83 78 34 02 cmpl $0x2,0x34(%eax) 10b2dd: 75 0c jne 10b2eb (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 10b2df: 85 f6 test %esi,%esi 10b2e1: 74 1d je 10b300 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10b2e3: 4e dec %esi status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 10b2e4: b3 74 mov $0x74,%bl _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 10b2e6: 83 fe 01 cmp $0x1,%esi 10b2e9: 76 15 jbe 10b300 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b2eb: 83 ec 0c sub $0xc,%esp (CORE_RWLock_Status) _Thread_Executing->Wait.return_code 10b2ee: a1 78 88 12 00 mov 0x128878,%eax if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10b2f3: ff 70 34 pushl 0x34(%eax) 10b2f6: e8 11 00 00 00 call 10b30c <_POSIX_RWLock_Translate_core_RWLock_return_code> 10b2fb: 89 c3 mov %eax,%ebx 10b2fd: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b300: 89 d8 mov %ebx,%eax 10b302: 8d 65 f4 lea -0xc(%ebp),%esp 10b305: 5b pop %ebx 10b306: 5e pop %esi 10b307: 5f pop %edi 10b308: c9 leave 10b309: c3 ret =============================================================================== 0010ba48 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10ba48: 55 push %ebp 10ba49: 89 e5 mov %esp,%ebp 10ba4b: 8b 55 08 mov 0x8(%ebp),%edx 10ba4e: 8b 4d 0c mov 0xc(%ebp),%ecx if ( !attr ) return EINVAL; 10ba51: b8 16 00 00 00 mov $0x16,%eax int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 10ba56: 85 d2 test %edx,%edx 10ba58: 74 0f je 10ba69 return EINVAL; if ( !attr->is_initialized ) 10ba5a: 83 3a 00 cmpl $0x0,(%edx) 10ba5d: 74 0a je 10ba69 return EINVAL; switch ( pshared ) { 10ba5f: 83 f9 01 cmp $0x1,%ecx 10ba62: 77 05 ja 10ba69 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10ba64: 89 4a 04 mov %ecx,0x4(%edx) return 0; 10ba67: 30 c0 xor %al,%al default: return EINVAL; } } 10ba69: c9 leave 10ba6a: c3 ret =============================================================================== 0010c748 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10c748: 55 push %ebp 10c749: 89 e5 mov %esp,%ebp 10c74b: 57 push %edi 10c74c: 56 push %esi 10c74d: 53 push %ebx 10c74e: 83 ec 2c sub $0x2c,%esp 10c751: 8b 75 10 mov 0x10(%ebp),%esi /* * Check all the parameters */ if ( !param ) return EINVAL; 10c754: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp) int rc; /* * Check all the parameters */ if ( !param ) 10c75b: 85 f6 test %esi,%esi 10c75d: 0f 84 00 01 00 00 je 10c863 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10c763: 8d 45 e0 lea -0x20(%ebp),%eax 10c766: 50 push %eax 10c767: 8d 45 e4 lea -0x1c(%ebp),%eax 10c76a: 50 push %eax 10c76b: 56 push %esi 10c76c: ff 75 0c pushl 0xc(%ebp) 10c76f: e8 20 53 00 00 call 111a94 <_POSIX_Thread_Translate_sched_param> 10c774: 89 45 d4 mov %eax,-0x2c(%ebp) policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10c777: 83 c4 10 add $0x10,%esp 10c77a: 85 c0 test %eax,%eax 10c77c: 0f 85 e1 00 00 00 jne 10c863 10c782: 53 push %ebx return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); 10c783: 8d 45 dc lea -0x24(%ebp),%eax 10c786: 50 push %eax 10c787: ff 75 08 pushl 0x8(%ebp) 10c78a: 68 d4 95 12 00 push $0x1295d4 10c78f: e8 80 1c 00 00 call 10e414 <_Objects_Get> 10c794: 89 c2 mov %eax,%edx switch ( location ) { 10c796: 83 c4 10 add $0x10,%esp 10c799: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10c79d: 0f 85 b9 00 00 00 jne 10c85c case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c7a3: 8b 98 ec 00 00 00 mov 0xec(%eax),%ebx if ( api->schedpolicy == SCHED_SPORADIC ) 10c7a9: 83 bb 84 00 00 00 04 cmpl $0x4,0x84(%ebx) 10c7b0: 75 18 jne 10c7ca (void) _Watchdog_Remove( &api->Sporadic_timer ); 10c7b2: 83 ec 0c sub $0xc,%esp 10c7b5: 8d 83 a8 00 00 00 lea 0xa8(%ebx),%eax 10c7bb: 50 push %eax 10c7bc: 89 55 d0 mov %edx,-0x30(%ebp) 10c7bf: e8 58 35 00 00 call 10fd1c <_Watchdog_Remove> 10c7c4: 83 c4 10 add $0x10,%esp 10c7c7: 8b 55 d0 mov -0x30(%ebp),%edx api->schedpolicy = policy; 10c7ca: 8b 45 0c mov 0xc(%ebp),%eax 10c7cd: 89 83 84 00 00 00 mov %eax,0x84(%ebx) api->schedparam = *param; 10c7d3: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi 10c7d9: b9 07 00 00 00 mov $0x7,%ecx 10c7de: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10c7e0: 8b 45 e4 mov -0x1c(%ebp),%eax 10c7e3: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10c7e6: 8b 45 e0 mov -0x20(%ebp),%eax 10c7e9: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10c7ef: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10c7f3: 78 60 js 10c855 <== NEVER TAKEN 10c7f5: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10c7f9: 7e 08 jle 10c803 10c7fb: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10c7ff: 75 54 jne 10c855 <== NEVER TAKEN 10c801: eb 24 jmp 10c827 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c803: a1 80 93 12 00 mov 0x129380,%eax 10c808: 89 42 78 mov %eax,0x78(%edx) 10c80b: 0f b6 05 48 52 12 00 movzbl 0x125248,%eax 10c812: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax the_thread->real_priority = 10c818: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10c81b: 51 push %ecx 10c81c: 6a 01 push $0x1 10c81e: 50 push %eax 10c81f: 52 push %edx 10c820: e8 bf 22 00 00 call 10eae4 <_Thread_Change_priority> 10c825: eb 2b jmp 10c852 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10c827: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax 10c82d: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) _Watchdog_Remove( &api->Sporadic_timer ); 10c833: 83 ec 0c sub $0xc,%esp 10c836: 81 c3 a8 00 00 00 add $0xa8,%ebx 10c83c: 53 push %ebx 10c83d: 89 55 d0 mov %edx,-0x30(%ebp) 10c840: e8 d7 34 00 00 call 10fd1c <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10c845: 58 pop %eax 10c846: 5a pop %edx 10c847: 8b 55 d0 mov -0x30(%ebp),%edx 10c84a: 52 push %edx 10c84b: 6a 00 push $0x0 10c84d: e8 e1 fd ff ff call 10c633 <_POSIX_Threads_Sporadic_budget_TSR> break; 10c852: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10c855: e8 60 26 00 00 call 10eeba <_Thread_Enable_dispatch> return 0; 10c85a: eb 07 jmp 10c863 #endif case OBJECTS_ERROR: break; } return ESRCH; 10c85c: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp) } 10c863: 8b 45 d4 mov -0x2c(%ebp),%eax 10c866: 8d 65 f4 lea -0xc(%ebp),%esp 10c869: 5b pop %ebx 10c86a: 5e pop %esi 10c86b: 5f pop %edi 10c86c: c9 leave 10c86d: c3 ret =============================================================================== 0010a644 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10a644: 55 push %ebp 10a645: 89 e5 mov %esp,%ebp 10a647: 53 push %ebx 10a648: 83 ec 04 sub $0x4,%esp * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10a64b: 83 3d 6c 68 12 00 00 cmpl $0x0,0x12686c 10a652: 75 48 jne 10a69c <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10a654: a1 70 68 12 00 mov 0x126870,%eax 10a659: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax 10a65f: 8b 15 48 63 12 00 mov 0x126348,%edx 10a665: 42 inc %edx 10a666: 89 15 48 63 12 00 mov %edx,0x126348 */ void pthread_testcancel( void ) { POSIX_API_Control *thread_support; bool cancel = false; 10a66c: 31 db xor %ebx,%ebx return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10a66e: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax) 10a675: 75 0a jne 10a681 <== NEVER TAKEN /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); void _EXFUN(pthread_testcancel, (void)); 10a677: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) 10a67e: 0f 95 c3 setne %bl thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10a681: e8 d8 25 00 00 call 10cc5e <_Thread_Enable_dispatch> if ( cancel ) 10a686: 84 db test %bl,%bl 10a688: 74 12 je 10a69c _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10a68a: 50 push %eax 10a68b: 50 push %eax 10a68c: 6a ff push $0xffffffff 10a68e: ff 35 70 68 12 00 pushl 0x126870 10a694: e8 bb 52 00 00 call 10f954 <_POSIX_Thread_Exit> 10a699: 83 c4 10 add $0x10,%esp } 10a69c: 8b 5d fc mov -0x4(%ebp),%ebx 10a69f: c9 leave 10a6a0: c3 ret =============================================================================== 0010af21 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 10af21: 55 push %ebp 10af22: 89 e5 mov %esp,%ebp 10af24: 57 push %edi 10af25: 56 push %esi 10af26: 53 push %ebx 10af27: 83 ec 58 sub $0x58,%esp 10af2a: 8b 5d 08 mov 0x8(%ebp),%ebx struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 10af2d: 68 d8 72 12 00 push $0x1272d8 10af32: e8 c5 08 00 00 call 10b7fc 10af37: 89 45 b4 mov %eax,-0x4c(%ebp) if (result != 0) { 10af3a: 83 c4 10 add $0x10,%esp 10af3d: 85 c0 test %eax,%eax 10af3f: 74 0e je 10af4f <== ALWAYS TAKEN free (req); 10af41: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10af44: 53 push %ebx <== NOT EXECUTED 10af45: e8 e6 cd ff ff call 107d30 <== NOT EXECUTED 10af4a: e9 c6 01 00 00 jmp 10b115 <== NOT EXECUTED return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); 10af4f: e8 a8 10 00 00 call 10bffc 10af54: 57 push %edi 10af55: 8d 55 c4 lea -0x3c(%ebp),%edx 10af58: 52 push %edx 10af59: 8d 55 e0 lea -0x20(%ebp),%edx 10af5c: 52 push %edx 10af5d: 50 push %eax 10af5e: e8 9d 0c 00 00 call 10bc00 req->caller_thread = pthread_self (); 10af63: e8 94 10 00 00 call 10bffc 10af68: 89 43 10 mov %eax,0x10(%ebx) req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 10af6b: 8b 43 14 mov 0x14(%ebx),%eax 10af6e: 8b 55 c4 mov -0x3c(%ebp),%edx 10af71: 2b 50 14 sub 0x14(%eax),%edx 10af74: 89 53 0c mov %edx,0xc(%ebx) req->policy = policy; 10af77: 8b 55 e0 mov -0x20(%ebp),%edx 10af7a: 89 53 08 mov %edx,0x8(%ebx) req->aiocbp->error_code = EINPROGRESS; 10af7d: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax) req->aiocbp->return_value = 0; 10af84: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) if ((aio_request_queue.idle_threads == 0) && 10af8b: 83 c4 10 add $0x10,%esp 10af8e: 83 3d 40 73 12 00 00 cmpl $0x0,0x127340 10af95: 0f 85 b7 00 00 00 jne 10b052 <== NEVER TAKEN 10af9b: 83 3d 3c 73 12 00 04 cmpl $0x4,0x12733c 10afa2: 0f 8f aa 00 00 00 jg 10b052 aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 10afa8: 56 push %esi 10afa9: 6a 01 push $0x1 10afab: ff 30 pushl (%eax) 10afad: 68 20 73 12 00 push $0x127320 10afb2: e8 81 fb ff ff call 10ab38 10afb7: 89 c6 mov %eax,%esi if (r_chain->new_fd == 1) { 10afb9: 83 c4 10 add $0x10,%esp 10afbc: 83 78 18 01 cmpl $0x1,0x18(%eax) 10afc0: 8d 50 08 lea 0x8(%eax),%edx 10afc3: 8d 78 1c lea 0x1c(%eax),%edi 10afc6: 8d 40 20 lea 0x20(%eax),%eax 10afc9: 89 45 b0 mov %eax,-0x50(%ebp) 10afcc: 75 66 jne 10b034 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 10afce: 51 push %ecx 10afcf: 51 push %ecx 10afd0: 53 push %ebx 10afd1: 52 push %edx 10afd2: e8 c9 1f 00 00 call 10cfa0 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 10afd7: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) pthread_mutex_init (&r_chain->mutex, NULL); 10afde: 5b pop %ebx 10afdf: 58 pop %eax 10afe0: 6a 00 push $0x0 10afe2: 57 push %edi 10afe3: e8 f4 06 00 00 call 10b6dc pthread_cond_init (&r_chain->cond, NULL); 10afe8: 5a pop %edx 10afe9: 59 pop %ecx 10afea: 6a 00 push $0x0 10afec: ff 75 b0 pushl -0x50(%ebp) 10afef: e8 a8 03 00 00 call 10b39c AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 10aff4: 56 push %esi 10aff5: 68 14 ac 10 00 push $0x10ac14 10affa: 68 e0 72 12 00 push $0x1272e0 10afff: 8d 45 e4 lea -0x1c(%ebp),%eax 10b002: 50 push %eax 10b003: e8 c4 09 00 00 call 10b9cc 10b008: 89 c3 mov %eax,%ebx rtems_aio_handle, (void *) r_chain); if (result != 0) { 10b00a: 83 c4 20 add $0x20,%esp 10b00d: 85 c0 test %eax,%eax 10b00f: 74 18 je 10b029 <== ALWAYS TAKEN pthread_mutex_unlock (&aio_request_queue.mutex); 10b011: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b014: 68 d8 72 12 00 push $0x1272d8 <== NOT EXECUTED 10b019: e8 5e 08 00 00 call 10b87c <== NOT EXECUTED return result; 10b01e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b021: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED 10b024: e9 ef 00 00 00 jmp 10b118 <== NOT EXECUTED } ++aio_request_queue.active_threads; 10b029: ff 05 3c 73 12 00 incl 0x12733c 10b02f: e9 d4 00 00 00 jmp 10b108 } else { /* put request in the fd chain it belongs to */ pthread_mutex_lock (&r_chain->mutex); 10b034: 83 ec 0c sub $0xc,%esp 10b037: 57 push %edi 10b038: 89 55 ac mov %edx,-0x54(%ebp) 10b03b: e8 bc 07 00 00 call 10b7fc rtems_aio_insert_prio (&r_chain->perfd, req); 10b040: 5e pop %esi 10b041: 58 pop %eax 10b042: 53 push %ebx 10b043: 8b 55 ac mov -0x54(%ebp),%edx 10b046: 52 push %edx 10b047: e8 ec fd ff ff call 10ae38 pthread_cond_signal (&r_chain->cond); 10b04c: 5b pop %ebx 10b04d: ff 75 b0 pushl -0x50(%ebp) 10b050: eb 36 jmp 10b088 else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 10b052: 51 push %ecx 10b053: 6a 00 push $0x0 10b055: ff 30 pushl (%eax) 10b057: 68 20 73 12 00 push $0x127320 10b05c: e8 d7 fa ff ff call 10ab38 10b061: 89 c6 mov %eax,%esi req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 10b063: 83 c4 10 add $0x10,%esp 10b066: 85 c0 test %eax,%eax 10b068: 74 2d je 10b097 { pthread_mutex_lock (&r_chain->mutex); 10b06a: 8d 78 1c lea 0x1c(%eax),%edi 10b06d: 83 ec 0c sub $0xc,%esp 10b070: 57 push %edi 10b071: e8 86 07 00 00 call 10b7fc rtems_aio_insert_prio (&r_chain->perfd, req); 10b076: 58 pop %eax 10b077: 5a pop %edx 10b078: 53 push %ebx 10b079: 8d 46 08 lea 0x8(%esi),%eax 10b07c: 50 push %eax 10b07d: e8 b6 fd ff ff call 10ae38 pthread_cond_signal (&r_chain->cond); 10b082: 83 c6 20 add $0x20,%esi 10b085: 89 34 24 mov %esi,(%esp) 10b088: e8 ab 03 00 00 call 10b438 pthread_mutex_unlock (&r_chain->mutex); 10b08d: 89 3c 24 mov %edi,(%esp) 10b090: e8 e7 07 00 00 call 10b87c 10b095: eb 6e jmp 10b105 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 10b097: 56 push %esi 10b098: 6a 01 push $0x1 10b09a: 8b 43 14 mov 0x14(%ebx),%eax 10b09d: ff 30 pushl (%eax) 10b09f: 68 2c 73 12 00 push $0x12732c 10b0a4: e8 8f fa ff ff call 10ab38 10b0a9: 89 c6 mov %eax,%esi if (r_chain->new_fd == 1) { 10b0ab: 83 c4 10 add $0x10,%esp 10b0ae: 83 78 18 01 cmpl $0x1,0x18(%eax) 10b0b2: 8d 40 08 lea 0x8(%eax),%eax 10b0b5: 75 2c jne 10b0e3 10b0b7: 51 push %ecx 10b0b8: 51 push %ecx 10b0b9: 53 push %ebx 10b0ba: 50 push %eax 10b0bb: e8 e0 1e 00 00 call 10cfa0 <_Chain_Insert> /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 10b0c0: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi) pthread_mutex_init (&r_chain->mutex, NULL); 10b0c7: 58 pop %eax 10b0c8: 5a pop %edx 10b0c9: 6a 00 push $0x0 10b0cb: 8d 46 1c lea 0x1c(%esi),%eax 10b0ce: 50 push %eax 10b0cf: e8 08 06 00 00 call 10b6dc pthread_cond_init (&r_chain->cond, NULL); 10b0d4: 5b pop %ebx 10b0d5: 5f pop %edi 10b0d6: 6a 00 push $0x0 10b0d8: 83 c6 20 add $0x20,%esi 10b0db: 56 push %esi 10b0dc: e8 bb 02 00 00 call 10b39c 10b0e1: eb 09 jmp 10b0ec } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 10b0e3: 51 push %ecx 10b0e4: 51 push %ecx 10b0e5: 53 push %ebx 10b0e6: 50 push %eax 10b0e7: e8 4c fd ff ff call 10ae38 10b0ec: 83 c4 10 add $0x10,%esp if (aio_request_queue.idle_threads > 0) 10b0ef: 83 3d 40 73 12 00 00 cmpl $0x0,0x127340 10b0f6: 7e 10 jle 10b108 <== ALWAYS TAKEN pthread_cond_signal (&aio_request_queue.new_req); 10b0f8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b0fb: 68 dc 72 12 00 push $0x1272dc <== NOT EXECUTED 10b100: e8 33 03 00 00 call 10b438 <== NOT EXECUTED 10b105: 83 c4 10 add $0x10,%esp } } pthread_mutex_unlock (&aio_request_queue.mutex); 10b108: 83 ec 0c sub $0xc,%esp 10b10b: 68 d8 72 12 00 push $0x1272d8 10b110: e8 67 07 00 00 call 10b87c return 0; 10b115: 83 c4 10 add $0x10,%esp } 10b118: 8b 45 b4 mov -0x4c(%ebp),%eax 10b11b: 8d 65 f4 lea -0xc(%ebp),%esp 10b11e: 5b pop %ebx 10b11f: 5e pop %esi 10b120: 5f pop %edi 10b121: c9 leave 10b122: c3 ret =============================================================================== 0010ac14 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 10ac14: 55 push %ebp 10ac15: 89 e5 mov %esp,%ebp 10ac17: 57 push %edi 10ac18: 56 push %esi 10ac19: 53 push %ebx 10ac1a: 83 ec 4c sub $0x4c,%esp rtems_aio_request_chain *r_chain = arg; 10ac1d: 8b 5d 08 mov 0x8(%ebp),%ebx pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); 10ac20: 8d 7d dc lea -0x24(%ebp),%edi /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 10ac23: 8d 43 1c lea 0x1c(%ebx),%eax 10ac26: 89 45 b4 mov %eax,-0x4c(%ebp) 10ac29: 83 ec 0c sub $0xc,%esp 10ac2c: 50 push %eax 10ac2d: e8 ca 0b 00 00 call 10b7fc if (result != 0) 10ac32: 83 c4 10 add $0x10,%esp 10ac35: 85 c0 test %eax,%eax 10ac37: 0f 85 f1 01 00 00 jne 10ae2e <== NEVER TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } 10ac3d: 8b 73 08 mov 0x8(%ebx),%esi RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10ac40: 8d 43 0c lea 0xc(%ebx),%eax /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { 10ac43: 39 c6 cmp %eax,%esi 10ac45: 0f 84 cd 00 00 00 je 10ad18 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 10ac4b: e8 ac 13 00 00 call 10bffc 10ac50: 52 push %edx 10ac51: 8d 55 c0 lea -0x40(%ebp),%edx 10ac54: 52 push %edx 10ac55: 8d 4d e4 lea -0x1c(%ebp),%ecx 10ac58: 51 push %ecx 10ac59: 50 push %eax 10ac5a: e8 a1 0f 00 00 call 10bc00 param.sched_priority = req->priority; 10ac5f: 8b 46 0c mov 0xc(%esi),%eax 10ac62: 89 45 c0 mov %eax,-0x40(%ebp) pthread_setschedparam (pthread_self(), req->policy, ¶m); 10ac65: 8b 56 08 mov 0x8(%esi),%edx 10ac68: 89 55 b0 mov %edx,-0x50(%ebp) 10ac6b: e8 8c 13 00 00 call 10bffc 10ac70: 83 c4 0c add $0xc,%esp 10ac73: 8d 4d c0 lea -0x40(%ebp),%ecx 10ac76: 51 push %ecx 10ac77: 8b 55 b0 mov -0x50(%ebp),%edx 10ac7a: 52 push %edx 10ac7b: 50 push %eax 10ac7c: e8 8b 13 00 00 call 10c00c */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ac81: 89 34 24 mov %esi,(%esp) 10ac84: e8 db 22 00 00 call 10cf64 <_Chain_Extract> rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 10ac89: 59 pop %ecx 10ac8a: ff 75 b4 pushl -0x4c(%ebp) 10ac8d: e8 ea 0b 00 00 call 10b87c switch (req->aiocbp->aio_lio_opcode) { 10ac92: 8b 46 14 mov 0x14(%esi),%eax 10ac95: 83 c4 10 add $0x10,%esp 10ac98: 8b 50 2c mov 0x2c(%eax),%edx 10ac9b: 83 fa 02 cmp $0x2,%edx 10ac9e: 74 20 je 10acc0 10aca0: 83 fa 03 cmp $0x3,%edx 10aca3: 74 36 je 10acdb <== NEVER TAKEN 10aca5: 4a dec %edx 10aca6: 75 45 jne 10aced <== NEVER TAKEN case LIO_READ: AIO_printf ("read\n"); result = pread (req->aiocbp->aio_fildes, 10aca8: 83 ec 0c sub $0xc,%esp 10acab: ff 70 08 pushl 0x8(%eax) 10acae: ff 70 04 pushl 0x4(%eax) 10acb1: ff 70 10 pushl 0x10(%eax) 10acb4: ff 70 0c pushl 0xc(%eax) 10acb7: ff 30 pushl (%eax) 10acb9: e8 e6 93 00 00 call 1140a4 10acbe: eb 16 jmp 10acd6 req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: AIO_printf ("write\n"); result = pwrite (req->aiocbp->aio_fildes, 10acc0: 83 ec 0c sub $0xc,%esp 10acc3: ff 70 08 pushl 0x8(%eax) 10acc6: ff 70 04 pushl 0x4(%eax) 10acc9: ff 70 10 pushl 0x10(%eax) 10accc: ff 70 0c pushl 0xc(%eax) 10accf: ff 30 pushl (%eax) 10acd1: e8 82 94 00 00 call 114158 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 10acd6: 83 c4 20 add $0x20,%esp 10acd9: eb 0d jmp 10ace8 case LIO_SYNC: AIO_printf ("sync\n"); result = fsync (req->aiocbp->aio_fildes); 10acdb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10acde: ff 30 pushl (%eax) <== NOT EXECUTED 10ace0: e8 27 5d 00 00 call 110a0c <== NOT EXECUTED break; 10ace5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: result = -1; } if (result == -1) { 10ace8: 83 f8 ff cmp $0xffffffff,%eax 10aceb: 75 19 jne 10ad06 <== ALWAYS TAKEN req->aiocbp->return_value = -1; 10aced: 8b 76 14 mov 0x14(%esi),%esi <== NOT EXECUTED 10acf0: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED req->aiocbp->error_code = errno; 10acf7: e8 70 89 00 00 call 11366c <__errno> <== NOT EXECUTED 10acfc: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10acfe: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED 10ad01: e9 1d ff ff ff jmp 10ac23 <== NOT EXECUTED } else { req->aiocbp->return_value = result; 10ad06: 8b 56 14 mov 0x14(%esi),%edx 10ad09: 89 42 34 mov %eax,0x34(%edx) req->aiocbp->error_code = 0; 10ad0c: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 10ad13: e9 0b ff ff ff jmp 10ac23 struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); 10ad18: 83 ec 0c sub $0xc,%esp 10ad1b: ff 75 b4 pushl -0x4c(%ebp) 10ad1e: e8 59 0b 00 00 call 10b87c pthread_mutex_lock (&aio_request_queue.mutex); 10ad23: c7 04 24 d8 72 12 00 movl $0x1272d8,(%esp) 10ad2a: e8 cd 0a 00 00 call 10b7fc if (rtems_chain_is_empty (chain)) 10ad2f: 83 c4 10 add $0x10,%esp 10ad32: 39 73 08 cmp %esi,0x8(%ebx) 10ad35: 0f 85 de 00 00 00 jne 10ae19 <== NEVER TAKEN { clock_gettime (CLOCK_REALTIME, &timeout); 10ad3b: 52 push %edx 10ad3c: 52 push %edx 10ad3d: 57 push %edi 10ad3e: 6a 01 push $0x1 10ad40: e8 47 05 00 00 call 10b28c timeout.tv_sec += 3; 10ad45: 83 45 dc 03 addl $0x3,-0x24(%ebp) timeout.tv_nsec = 0; 10ad49: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) result = pthread_cond_timedwait (&r_chain->cond, 10ad50: 8d 73 20 lea 0x20(%ebx),%esi 10ad53: 83 c4 0c add $0xc,%esp 10ad56: 57 push %edi 10ad57: 68 d8 72 12 00 push $0x1272d8 10ad5c: 56 push %esi 10ad5d: e8 46 07 00 00 call 10b4a8 &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { 10ad62: 83 c4 10 add $0x10,%esp 10ad65: 83 f8 74 cmp $0x74,%eax 10ad68: 0f 85 ab 00 00 00 jne 10ae19 <== NEVER TAKEN 10ad6e: 83 ec 0c sub $0xc,%esp 10ad71: 53 push %ebx 10ad72: e8 ed 21 00 00 call 10cf64 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 10ad77: 58 pop %eax 10ad78: ff 75 b4 pushl -0x4c(%ebp) 10ad7b: e8 5c 08 00 00 call 10b5dc pthread_cond_destroy (&r_chain->cond); 10ad80: 89 34 24 mov %esi,(%esp) 10ad83: e8 60 05 00 00 call 10b2e8 free (r_chain); 10ad88: 89 1c 24 mov %ebx,(%esp) 10ad8b: e8 a0 cf ff ff call 107d30 /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { 10ad90: 83 c4 10 add $0x10,%esp 10ad93: 81 3d 2c 73 12 00 30 cmpl $0x127330,0x12732c 10ad9a: 73 12 00 10ad9d: 75 54 jne 10adf3 AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; 10ad9f: ff 05 40 73 12 00 incl 0x127340 --aio_request_queue.active_threads; 10ada5: ff 0d 3c 73 12 00 decl 0x12733c clock_gettime (CLOCK_REALTIME, &timeout); 10adab: 53 push %ebx 10adac: 53 push %ebx 10adad: 57 push %edi 10adae: 6a 01 push $0x1 10adb0: e8 d7 04 00 00 call 10b28c timeout.tv_sec += 3; 10adb5: 83 45 dc 03 addl $0x3,-0x24(%ebp) timeout.tv_nsec = 0; 10adb9: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) result = pthread_cond_timedwait (&aio_request_queue.new_req, 10adc0: 83 c4 0c add $0xc,%esp 10adc3: 57 push %edi 10adc4: 68 d8 72 12 00 push $0x1272d8 10adc9: 68 dc 72 12 00 push $0x1272dc 10adce: e8 d5 06 00 00 call 10b4a8 &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { 10add3: 83 c4 10 add $0x10,%esp 10add6: 83 f8 74 cmp $0x74,%eax 10add9: 75 18 jne 10adf3 <== NEVER TAKEN AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; 10addb: ff 0d 40 73 12 00 decl 0x127340 pthread_mutex_unlock (&aio_request_queue.mutex); 10ade1: 83 ec 0c sub $0xc,%esp 10ade4: 68 d8 72 12 00 push $0x1272d8 10ade9: e8 8e 0a 00 00 call 10b87c return NULL; 10adee: 83 c4 10 add $0x10,%esp 10adf1: eb 3b jmp 10ae2e } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; 10adf3: ff 0d 40 73 12 00 decl 0x127340 ++aio_request_queue.active_threads; 10adf9: ff 05 3c 73 12 00 incl 0x12733c } } AIO_printf ("Thread finished\n"); return NULL; } 10adff: 8b 1d 2c 73 12 00 mov 0x12732c,%ebx 10ae05: 83 ec 0c sub $0xc,%esp 10ae08: 53 push %ebx 10ae09: e8 56 21 00 00 call 10cf64 <_Chain_Extract> node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; rtems_aio_move_to_work (r_chain); 10ae0e: 89 1c 24 mov %ebx,(%esp) 10ae11: e8 cd fd ff ff call 10abe3 10ae16: 83 c4 10 add $0x10,%esp } } /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 10ae19: 83 ec 0c sub $0xc,%esp 10ae1c: 68 d8 72 12 00 push $0x1272d8 10ae21: e8 56 0a 00 00 call 10b87c 10ae26: 83 c4 10 add $0x10,%esp 10ae29: e9 f5 fd ff ff jmp 10ac23 } } AIO_printf ("Thread finished\n"); return NULL; } 10ae2e: 31 c0 xor %eax,%eax 10ae30: 8d 65 f4 lea -0xc(%ebp),%esp 10ae33: 5b pop %ebx 10ae34: 5e pop %esi 10ae35: 5f pop %edi 10ae36: c9 leave 10ae37: c3 ret =============================================================================== 0010aa3c : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 10aa3c: 55 push %ebp 10aa3d: 89 e5 mov %esp,%ebp 10aa3f: 53 push %ebx 10aa40: 83 ec 10 sub $0x10,%esp int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 10aa43: 68 e0 72 12 00 push $0x1272e0 10aa48: e8 33 0f 00 00 call 10b980 10aa4d: 89 c3 mov %eax,%ebx if (result != 0) 10aa4f: 83 c4 10 add $0x10,%esp 10aa52: 85 c0 test %eax,%eax 10aa54: 0f 85 d7 00 00 00 jne 10ab31 <== NEVER TAKEN return result; result = 10aa5a: 51 push %ecx 10aa5b: 51 push %ecx 10aa5c: 6a 00 push $0x0 10aa5e: 68 e0 72 12 00 push $0x1272e0 10aa63: e8 40 0f 00 00 call 10b9a8 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 10aa68: 83 c4 10 add $0x10,%esp 10aa6b: 85 c0 test %eax,%eax 10aa6d: 74 10 je 10aa7f <== ALWAYS TAKEN pthread_attr_destroy (&aio_request_queue.attr); 10aa6f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa72: 68 e0 72 12 00 push $0x1272e0 <== NOT EXECUTED 10aa77: e8 e4 0e 00 00 call 10b960 <== NOT EXECUTED 10aa7c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 10aa7f: 52 push %edx 10aa80: 52 push %edx 10aa81: 6a 00 push $0x0 10aa83: 68 d8 72 12 00 push $0x1272d8 10aa88: e8 4f 0c 00 00 call 10b6dc if (result != 0) 10aa8d: 83 c4 10 add $0x10,%esp 10aa90: 85 c0 test %eax,%eax 10aa92: 74 10 je 10aaa4 <== ALWAYS TAKEN pthread_attr_destroy (&aio_request_queue.attr); 10aa94: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aa97: 68 e0 72 12 00 push $0x1272e0 <== NOT EXECUTED 10aa9c: e8 bf 0e 00 00 call 10b960 <== NOT EXECUTED 10aaa1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 10aaa4: 50 push %eax 10aaa5: 50 push %eax 10aaa6: 6a 00 push $0x0 10aaa8: 68 dc 72 12 00 push $0x1272dc 10aaad: e8 ea 08 00 00 call 10b39c 10aab2: 89 c3 mov %eax,%ebx if (result != 0) { 10aab4: 83 c4 10 add $0x10,%esp 10aab7: 85 c0 test %eax,%eax 10aab9: 74 1c je 10aad7 <== ALWAYS TAKEN pthread_mutex_destroy (&aio_request_queue.mutex); 10aabb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aabe: 68 d8 72 12 00 push $0x1272d8 <== NOT EXECUTED 10aac3: e8 14 0b 00 00 call 10b5dc <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 10aac8: c7 04 24 e0 72 12 00 movl $0x1272e0,(%esp) <== NOT EXECUTED 10aacf: e8 8c 0e 00 00 call 10b960 <== NOT EXECUTED 10aad4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10aad7: c7 05 20 73 12 00 24 movl $0x127324,0x127320 10aade: 73 12 00 head->previous = NULL; 10aae1: c7 05 24 73 12 00 00 movl $0x0,0x127324 10aae8: 00 00 00 tail->previous = head; 10aaeb: c7 05 28 73 12 00 20 movl $0x127320,0x127328 10aaf2: 73 12 00 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 10aaf5: c7 05 2c 73 12 00 30 movl $0x127330,0x12732c 10aafc: 73 12 00 head->previous = NULL; 10aaff: c7 05 30 73 12 00 00 movl $0x0,0x127330 10ab06: 00 00 00 tail->previous = head; 10ab09: c7 05 34 73 12 00 2c movl $0x12732c,0x127334 10ab10: 73 12 00 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 10ab13: c7 05 3c 73 12 00 00 movl $0x0,0x12733c 10ab1a: 00 00 00 aio_request_queue.idle_threads = 0; 10ab1d: c7 05 40 73 12 00 00 movl $0x0,0x127340 10ab24: 00 00 00 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 10ab27: c7 05 38 73 12 00 0b movl $0xb00b,0x127338 10ab2e: b0 00 00 return result; } 10ab31: 89 d8 mov %ebx,%eax 10ab33: 8b 5d fc mov -0x4(%ebp),%ebx 10ab36: c9 leave 10ab37: c3 ret =============================================================================== 0010ae38 : * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 10ae38: 55 push %ebp 10ae39: 89 e5 mov %esp,%ebp 10ae3b: 56 push %esi 10ae3c: 53 push %ebx 10ae3d: 8b 4d 08 mov 0x8(%ebp),%ecx 10ae40: 8b 55 0c mov 0xc(%ebp),%edx } } AIO_printf ("Thread finished\n"); return NULL; } 10ae43: 8b 01 mov (%ecx),%eax 10ae45: 8d 59 04 lea 0x4(%ecx),%ebx rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 10ae48: 39 d8 cmp %ebx,%eax 10ae4a: 74 27 je 10ae73 <== NEVER TAKEN AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 10ae4c: 8b 48 14 mov 0x14(%eax),%ecx 10ae4f: 8b 49 14 mov 0x14(%ecx),%ecx while (req->aiocbp->aio_reqprio > prio && 10ae52: 8b 72 14 mov 0x14(%edx),%esi 10ae55: 8b 76 14 mov 0x14(%esi),%esi 10ae58: eb 08 jmp 10ae62 } } AIO_printf ("Thread finished\n"); return NULL; } 10ae5a: 8b 00 mov (%eax),%eax <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 10ae5c: 8b 48 14 mov 0x14(%eax),%ecx <== NOT EXECUTED 10ae5f: 8b 49 14 mov 0x14(%ecx),%ecx <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 10ae62: 39 ce cmp %ecx,%esi 10ae64: 7e 04 jle 10ae6a <== ALWAYS TAKEN 10ae66: 39 d8 cmp %ebx,%eax <== NOT EXECUTED 10ae68: 75 f0 jne 10ae5a <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); 10ae6a: 89 55 0c mov %edx,0xc(%ebp) 10ae6d: 8b 40 04 mov 0x4(%eax),%eax 10ae70: 89 45 08 mov %eax,0x8(%ebp) } rtems_chain_insert (node->previous, &req->next_prio); } } 10ae73: 5b pop %ebx 10ae74: 5e pop %esi 10ae75: c9 leave 10ae76: e9 25 21 00 00 jmp 10cfa0 <_Chain_Insert> =============================================================================== 0010abe3 : * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { 10abe3: 55 push %ebp 10abe4: 89 e5 mov %esp,%ebp 10abe6: 83 ec 08 sub $0x8,%esp 10abe9: 8b 55 08 mov 0x8(%ebp),%edx } } AIO_printf ("Thread finished\n"); return NULL; } 10abec: a1 20 73 12 00 mov 0x127320,%eax rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 10abf1: 8b 4a 14 mov 0x14(%edx),%ecx 10abf4: eb 02 jmp 10abf8 } } AIO_printf ("Thread finished\n"); return NULL; } 10abf6: 8b 00 mov (%eax),%eax rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 10abf8: 39 48 14 cmp %ecx,0x14(%eax) 10abfb: 7d 07 jge 10ac04 10abfd: 3d 24 73 12 00 cmp $0x127324,%eax 10ac02: 75 f2 jne 10abf6 <== ALWAYS TAKEN 10ac04: 51 push %ecx 10ac05: 51 push %ecx 10ac06: 52 push %edx 10ac07: ff 70 04 pushl 0x4(%eax) 10ac0a: e8 91 23 00 00 call 10cfa0 <_Chain_Insert> 10ac0f: 83 c4 10 add $0x10,%esp node = rtems_chain_next (node); temp = (rtems_aio_request_chain *) node; } rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); } 10ac12: c9 leave 10ac13: c3 ret =============================================================================== 0010aec4 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { 10aec4: 55 push %ebp 10aec5: 89 e5 mov %esp,%ebp 10aec7: 53 push %ebx 10aec8: 83 ec 04 sub $0x4,%esp 10aecb: 8b 55 08 mov 0x8(%ebp),%edx 10aece: 8b 4d 0c mov 0xc(%ebp),%ecx } } AIO_printf ("Thread finished\n"); return NULL; } 10aed1: 8b 1a mov (%edx),%ebx RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 10aed3: 83 c2 04 add $0x4,%edx */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) return AIO_ALLDONE; 10aed6: b8 02 00 00 00 mov $0x2,%eax * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) 10aedb: 39 d3 cmp %edx,%ebx 10aedd: 75 08 jne 10aee7 10aedf: eb 3b jmp 10af1c } } AIO_printf ("Thread finished\n"); return NULL; } 10aee1: 8b 18 mov (%eax),%ebx <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 10aee3: 39 d3 cmp %edx,%ebx <== NOT EXECUTED 10aee5: 74 30 je 10af17 <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; 10aee7: 89 d8 mov %ebx,%eax rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 10aee9: 39 4b 14 cmp %ecx,0x14(%ebx) 10aeec: 75 f3 jne 10aee1 <== NEVER TAKEN 10aeee: 83 ec 0c sub $0xc,%esp 10aef1: 53 push %ebx 10aef2: e8 6d 20 00 00 call 10cf64 <_Chain_Extract> if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 10aef7: 8b 43 14 mov 0x14(%ebx),%eax 10aefa: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax) current->aiocbp->return_value = -1; 10af01: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax) free (current); 10af08: 89 1c 24 mov %ebx,(%esp) 10af0b: e8 20 ce ff ff call 107d30 } return AIO_CANCELED; 10af10: 83 c4 10 add $0x10,%esp 10af13: 31 c0 xor %eax,%eax 10af15: eb 05 jmp 10af1c node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 10af17: b8 01 00 00 00 mov $0x1,%eax current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 10af1c: 8b 5d fc mov -0x4(%ebp),%ebx 10af1f: c9 leave 10af20: c3 ret =============================================================================== 0010ab2c : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10ab2c: 55 push %ebp 10ab2d: 89 e5 mov %esp,%ebp 10ab2f: 56 push %esi 10ab30: 53 push %ebx 10ab31: 8b 5d 10 mov 0x10(%ebp),%ebx 10ab34: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 10ab37: 50 push %eax 10ab38: 50 push %eax 10ab39: ff 75 0c pushl 0xc(%ebp) 10ab3c: ff 75 08 pushl 0x8(%ebp) 10ab3f: e8 94 04 00 00 call 10afd8 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 10ab44: 83 c4 10 add $0x10,%esp 10ab47: 84 c0 test %al,%al 10ab49: 74 11 je 10ab5c <== NEVER TAKEN sc = rtems_event_send( task, events ); 10ab4b: 89 75 0c mov %esi,0xc(%ebp) 10ab4e: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10ab51: 8d 65 f8 lea -0x8(%ebp),%esp 10ab54: 5b pop %ebx 10ab55: 5e pop %esi 10ab56: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 10ab57: e9 d4 f6 ff ff jmp 10a230 } return sc; } 10ab5c: 31 c0 xor %eax,%eax 10ab5e: 8d 65 f8 lea -0x8(%ebp),%esp 10ab61: 5b pop %ebx <== NOT EXECUTED 10ab62: 5e pop %esi <== NOT EXECUTED 10ab63: c9 leave <== NOT EXECUTED 10ab64: c3 ret <== NOT EXECUTED =============================================================================== 0010aba4 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 10aba4: 55 push %ebp 10aba5: 89 e5 mov %esp,%ebp 10aba7: 57 push %edi 10aba8: 56 push %esi 10aba9: 53 push %ebx 10abaa: 83 ec 1c sub $0x1c,%esp 10abad: 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( 10abb0: 8d 75 e4 lea -0x1c(%ebp),%esi 10abb3: eb 13 jmp 10abc8 10abb5: 56 push %esi 10abb6: ff 75 10 pushl 0x10(%ebp) 10abb9: 6a 00 push $0x0 10abbb: 57 push %edi 10abbc: e8 0f f5 ff ff call 10a0d0 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 10abc1: 83 c4 10 add $0x10,%esp 10abc4: 85 c0 test %eax,%eax 10abc6: 75 16 jne 10abde <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10abc8: 83 ec 0c sub $0xc,%esp 10abcb: ff 75 08 pushl 0x8(%ebp) 10abce: e8 a5 04 00 00 call 10b078 <_Chain_Get> 10abd3: 89 c3 mov %eax,%ebx sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 10abd5: 83 c4 10 add $0x10,%esp 10abd8: 85 c0 test %eax,%eax 10abda: 74 d9 je 10abb5 10abdc: 31 c0 xor %eax,%eax timeout, &out ); } *node_ptr = node; 10abde: 8b 55 14 mov 0x14(%ebp),%edx 10abe1: 89 1a mov %ebx,(%edx) return sc; } 10abe3: 8d 65 f4 lea -0xc(%ebp),%esp 10abe6: 5b pop %ebx 10abe7: 5e pop %esi 10abe8: 5f pop %edi 10abe9: c9 leave 10abea: c3 ret =============================================================================== 0010abec : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 10abec: 55 push %ebp 10abed: 89 e5 mov %esp,%ebp 10abef: 56 push %esi 10abf0: 53 push %ebx 10abf1: 8b 5d 10 mov 0x10(%ebp),%ebx 10abf4: 8b 75 14 mov 0x14(%ebp),%esi RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 10abf7: 50 push %eax 10abf8: 50 push %eax 10abf9: ff 75 0c pushl 0xc(%ebp) 10abfc: ff 75 08 pushl 0x8(%ebp) 10abff: e8 b8 04 00 00 call 10b0bc <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 10ac04: 83 c4 10 add $0x10,%esp 10ac07: 84 c0 test %al,%al 10ac09: 74 11 je 10ac1c <== NEVER TAKEN sc = rtems_event_send( task, events ); 10ac0b: 89 75 0c mov %esi,0xc(%ebp) 10ac0e: 89 5d 08 mov %ebx,0x8(%ebp) } return sc; } 10ac11: 8d 65 f8 lea -0x8(%ebp),%esp 10ac14: 5b pop %ebx 10ac15: 5e pop %esi 10ac16: c9 leave { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 10ac17: e9 14 f6 ff ff jmp 10a230 } return sc; } 10ac1c: 31 c0 xor %eax,%eax 10ac1e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10ac21: 5b pop %ebx <== NOT EXECUTED 10ac22: 5e pop %esi <== NOT EXECUTED 10ac23: c9 leave <== NOT EXECUTED 10ac24: c3 ret <== NOT EXECUTED =============================================================================== 0010b714 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 10b714: 55 push %ebp 10b715: 89 e5 mov %esp,%ebp 10b717: 57 push %edi 10b718: 56 push %esi 10b719: 53 push %ebx 10b71a: 83 ec 0c sub $0xc,%esp 10b71d: 8b 5d 08 mov 0x8(%ebp),%ebx 10b720: 8b 75 0c mov 0xc(%ebp),%esi 10b723: 8b 45 10 mov 0x10(%ebp),%eax rtems_device_major_number major_limit = _IO_Number_of_drivers; 10b726: 8b 15 78 8d 12 00 mov 0x128d78,%edx if ( rtems_interrupt_is_in_progress() ) 10b72c: 83 3d 1c 89 12 00 00 cmpl $0x0,0x12891c 10b733: 0f 85 cc 00 00 00 jne 10b805 <== NEVER TAKEN return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10b739: 85 c0 test %eax,%eax 10b73b: 0f 84 cb 00 00 00 je 10b80c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10b741: 89 10 mov %edx,(%eax) if ( driver_table == NULL ) 10b743: 85 f6 test %esi,%esi 10b745: 0f 84 c1 00 00 00 je 10b80c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10b74b: 83 3e 00 cmpl $0x0,(%esi) 10b74e: 0f 85 cc 00 00 00 jne 10b820 10b754: 83 7e 04 00 cmpl $0x0,0x4(%esi) 10b758: 0f 85 c2 00 00 00 jne 10b820 10b75e: e9 a9 00 00 00 jmp 10b80c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b763: 8b 15 f8 83 12 00 mov 0x1283f8,%edx 10b769: 42 inc %edx 10b76a: 89 15 f8 83 12 00 mov %edx,0x1283f8 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10b770: 85 db test %ebx,%ebx 10b772: 75 32 jne 10b7a6 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10b774: 8b 0d 78 8d 12 00 mov 0x128d78,%ecx 10b77a: 8b 15 7c 8d 12 00 mov 0x128d7c,%edx 10b780: eb 15 jmp 10b797 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10b782: 83 3a 00 cmpl $0x0,(%edx) 10b785: 0f 85 9f 00 00 00 jne 10b82a 10b78b: 83 7a 04 00 cmpl $0x0,0x4(%edx) 10b78f: 0f 85 95 00 00 00 jne 10b82a 10b795: eb 04 jmp 10b79b rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10b797: 39 cb cmp %ecx,%ebx 10b799: 72 e7 jb 10b782 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10b79b: 89 18 mov %ebx,(%eax) if ( m != n ) 10b79d: 39 cb cmp %ecx,%ebx 10b79f: 75 30 jne 10b7d1 10b7a1: e9 8d 00 00 00 jmp 10b833 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 10b7a6: 6b d3 18 imul $0x18,%ebx,%edx 10b7a9: 03 15 7c 8d 12 00 add 0x128d7c,%edx static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10b7af: 31 c9 xor %ecx,%ecx 10b7b1: 83 3a 00 cmpl $0x0,(%edx) 10b7b4: 75 09 jne 10b7bf 10b7b6: 31 c9 xor %ecx,%ecx 10b7b8: 83 7a 04 00 cmpl $0x0,0x4(%edx) 10b7bc: 0f 94 c1 sete %cl } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { 10b7bf: 85 c9 test %ecx,%ecx 10b7c1: 75 0c jne 10b7cf _Thread_Enable_dispatch(); 10b7c3: e8 ee 1a 00 00 call 10d2b6 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 10b7c8: b8 0c 00 00 00 mov $0xc,%eax 10b7cd: eb 49 jmp 10b818 } *registered_major = major; 10b7cf: 89 18 mov %ebx,(%eax) } _IO_Driver_address_table [major] = *driver_table; 10b7d1: 6b c3 18 imul $0x18,%ebx,%eax 10b7d4: 03 05 7c 8d 12 00 add 0x128d7c,%eax 10b7da: b9 06 00 00 00 mov $0x6,%ecx 10b7df: 89 c7 mov %eax,%edi 10b7e1: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10b7e3: e8 ce 1a 00 00 call 10d2b6 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10b7e8: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10b7ef: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10b7f6: 89 5d 08 mov %ebx,0x8(%ebp) } 10b7f9: 83 c4 0c add $0xc,%esp 10b7fc: 5b pop %ebx 10b7fd: 5e pop %esi 10b7fe: 5f pop %edi 10b7ff: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10b800: e9 9b 71 00 00 jmp 1129a0 ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 10b805: b8 12 00 00 00 mov $0x12,%eax 10b80a: eb 0c jmp 10b818 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 10b80c: b8 09 00 00 00 mov $0x9,%eax 10b811: eb 05 jmp 10b818 if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 10b813: b8 0a 00 00 00 mov $0xa,%eax _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 10b818: 83 c4 0c add $0xc,%esp 10b81b: 5b pop %ebx 10b81c: 5e pop %esi 10b81d: 5f pop %edi 10b81e: c9 leave 10b81f: c3 ret return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10b820: 39 d3 cmp %edx,%ebx 10b822: 0f 82 3b ff ff ff jb 10b763 10b828: eb e9 jmp 10b813 rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10b82a: 43 inc %ebx 10b82b: 83 c2 18 add $0x18,%edx 10b82e: e9 64 ff ff ff jmp 10b797 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 10b833: e8 7e 1a 00 00 call 10d2b6 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 10b838: b8 05 00 00 00 mov $0x5,%eax if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; 10b83d: eb d9 jmp 10b818 =============================================================================== 0010c744 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10c744: 55 push %ebp 10c745: 89 e5 mov %esp,%ebp 10c747: 57 push %edi 10c748: 56 push %esi 10c749: 53 push %ebx 10c74a: 83 ec 0c sub $0xc,%esp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10c74d: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 10c751: 74 3d je 10c790 <== NEVER TAKEN 10c753: bb 01 00 00 00 mov $0x1,%ebx #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 10c758: 8b 04 9d bc 8f 12 00 mov 0x128fbc(,%ebx,4),%eax 10c75f: 8b 78 04 mov 0x4(%eax),%edi if ( !information ) 10c762: be 01 00 00 00 mov $0x1,%esi 10c767: 85 ff test %edi,%edi 10c769: 75 17 jne 10c782 10c76b: eb 1d jmp 10c78a continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 10c76d: 8b 47 1c mov 0x1c(%edi),%eax 10c770: 8b 04 b0 mov (%eax,%esi,4),%eax if ( !the_thread ) 10c773: 85 c0 test %eax,%eax 10c775: 74 0a je 10c781 <== NEVER TAKEN continue; (*routine)(the_thread); 10c777: 83 ec 0c sub $0xc,%esp 10c77a: 50 push %eax 10c77b: ff 55 08 call *0x8(%ebp) 10c77e: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10c781: 46 inc %esi 10c782: 0f b7 47 10 movzwl 0x10(%edi),%eax 10c786: 39 c6 cmp %eax,%esi 10c788: 76 e3 jbe 10c76d Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10c78a: 43 inc %ebx 10c78b: 83 fb 04 cmp $0x4,%ebx 10c78e: 75 c8 jne 10c758 (*routine)(the_thread); } } } 10c790: 8d 65 f4 lea -0xc(%ebp),%esp 10c793: 5b pop %ebx 10c794: 5e pop %esi 10c795: 5f pop %edi 10c796: c9 leave 10c797: c3 ret =============================================================================== 001147ec : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1147ec: 55 push %ebp 1147ed: 89 e5 mov %esp,%ebp 1147ef: 57 push %edi 1147f0: 56 push %esi 1147f1: 53 push %ebx 1147f2: 83 ec 1c sub $0x1c,%esp 1147f5: 8b 75 0c mov 0xc(%ebp),%esi 1147f8: 8b 55 10 mov 0x10(%ebp),%edx 1147fb: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 1147fe: b8 03 00 00 00 mov $0x3,%eax rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 114803: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 114807: 0f 84 ce 00 00 00 je 1148db return RTEMS_INVALID_NAME; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 11480d: b0 09 mov $0x9,%al register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) 11480f: 85 f6 test %esi,%esi 114811: 0f 84 c4 00 00 00 je 1148db return RTEMS_INVALID_ADDRESS; if ( !id ) 114817: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp) 11481b: 0f 84 ba 00 00 00 je 1148db <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114821: 85 ff test %edi,%edi 114823: 0f 84 ad 00 00 00 je 1148d6 114829: 85 d2 test %edx,%edx 11482b: 0f 84 a5 00 00 00 je 1148d6 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 114831: b0 08 mov $0x8,%al return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 114833: 39 fa cmp %edi,%edx 114835: 0f 82 a0 00 00 00 jb 1148db 11483b: f7 c7 03 00 00 00 test $0x3,%edi 114841: 0f 85 94 00 00 00 jne 1148db !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; 114847: 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 ) ) 114849: f7 c6 03 00 00 00 test $0x3,%esi 11484f: 0f 85 86 00 00 00 jne 1148db 114855: a1 14 ef 13 00 mov 0x13ef14,%eax 11485a: 40 inc %eax 11485b: a3 14 ef 13 00 mov %eax,0x13ef14 * 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 ); 114860: 83 ec 0c sub $0xc,%esp 114863: 68 a4 ed 13 00 push $0x13eda4 114868: 89 55 e4 mov %edx,-0x1c(%ebp) 11486b: e8 14 3e 00 00 call 118684 <_Objects_Allocate> 114870: 89 c3 mov %eax,%ebx _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 114872: 83 c4 10 add $0x10,%esp 114875: 85 c0 test %eax,%eax 114877: 8b 55 e4 mov -0x1c(%ebp),%edx 11487a: 75 0c jne 114888 _Thread_Enable_dispatch(); 11487c: e8 11 4d 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 114881: b8 05 00 00 00 mov $0x5,%eax 114886: eb 53 jmp 1148db _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 114888: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 11488b: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 11488e: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 114891: 8b 45 18 mov 0x18(%ebp),%eax 114894: 89 43 1c mov %eax,0x1c(%ebx) the_partition->number_of_used_blocks = 0; 114897: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) _Chain_Initialize( &the_partition->Memory, starting_address, 11489e: 57 push %edi 11489f: 89 d0 mov %edx,%eax 1148a1: 31 d2 xor %edx,%edx 1148a3: f7 f7 div %edi 1148a5: 50 push %eax 1148a6: 56 push %esi 1148a7: 8d 43 24 lea 0x24(%ebx),%eax 1148aa: 50 push %eax 1148ab: e8 84 2a 00 00 call 117334 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 1148b0: 8b 43 08 mov 0x8(%ebx),%eax Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 1148b3: 0f b7 c8 movzwl %ax,%ecx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1148b6: 8b 15 c0 ed 13 00 mov 0x13edc0,%edx 1148bc: 89 1c 8a mov %ebx,(%edx,%ecx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1148bf: 8b 55 08 mov 0x8(%ebp),%edx 1148c2: 89 53 0c mov %edx,0xc(%ebx) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1148c5: 8b 55 1c mov 0x1c(%ebp),%edx 1148c8: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1148ca: e8 c3 4c 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1148cf: 83 c4 10 add $0x10,%esp 1148d2: 31 c0 xor %eax,%eax 1148d4: eb 05 jmp 1148db 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; 1148d6: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1148db: 8d 65 f4 lea -0xc(%ebp),%esp 1148de: 5b pop %ebx 1148df: 5e pop %esi 1148e0: 5f pop %edi 1148e1: c9 leave 1148e2: c3 ret =============================================================================== 0010b031 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10b031: 55 push %ebp 10b032: 89 e5 mov %esp,%ebp 10b034: 57 push %edi 10b035: 56 push %esi 10b036: 53 push %ebx 10b037: 83 ec 30 sub $0x30,%esp 10b03a: 8b 75 08 mov 0x8(%ebp),%esi 10b03d: 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 ); 10b040: 8d 45 e4 lea -0x1c(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 10b043: 50 push %eax 10b044: 56 push %esi 10b045: 68 74 83 12 00 push $0x128374 10b04a: e8 39 1e 00 00 call 10ce88 <_Objects_Get> 10b04f: 89 c7 mov %eax,%edi switch ( location ) { 10b051: 83 c4 10 add $0x10,%esp 10b054: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10b058: 0f 85 3b 01 00 00 jne 10b199 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 10b05e: a1 8c 89 12 00 mov 0x12898c,%eax 10b063: 39 47 40 cmp %eax,0x40(%edi) 10b066: 74 0f je 10b077 _Thread_Enable_dispatch(); 10b068: e8 c1 28 00 00 call 10d92e <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 10b06d: be 17 00 00 00 mov $0x17,%esi 10b072: e9 27 01 00 00 jmp 10b19e } if ( length == RTEMS_PERIOD_STATUS ) { 10b077: 85 db test %ebx,%ebx 10b079: 75 1b jne 10b096 switch ( the_period->state ) { 10b07b: 8b 47 38 mov 0x38(%edi),%eax 10b07e: 31 f6 xor %esi,%esi 10b080: 83 f8 04 cmp $0x4,%eax 10b083: 77 07 ja 10b08c <== NEVER TAKEN 10b085: 8b 34 85 e0 15 12 00 mov 0x1215e0(,%eax,4),%esi case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10b08c: e8 9d 28 00 00 call 10d92e <_Thread_Enable_dispatch> return( return_value ); 10b091: e9 08 01 00 00 jmp 10b19e } _ISR_Disable( level ); 10b096: 9c pushf 10b097: fa cli 10b098: 8f 45 d4 popl -0x2c(%ebp) if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 10b09b: 8b 47 38 mov 0x38(%edi),%eax 10b09e: 85 c0 test %eax,%eax 10b0a0: 75 4c jne 10b0ee _ISR_Enable( level ); 10b0a2: ff 75 d4 pushl -0x2c(%ebp) 10b0a5: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10b0a6: 83 ec 0c sub $0xc,%esp 10b0a9: 57 push %edi 10b0aa: e8 3f fe ff ff call 10aeee <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10b0af: 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; 10b0b6: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10b0bd: c7 47 2c a8 b3 10 00 movl $0x10b3a8,0x2c(%edi) the_watchdog->id = id; 10b0c4: 89 77 30 mov %esi,0x30(%edi) the_watchdog->user_data = user_data; 10b0c7: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10b0ce: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b0d1: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b0d4: 58 pop %eax 10b0d5: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b0d6: 83 c7 10 add $0x10,%edi 10b0d9: 57 push %edi 10b0da: 68 28 85 12 00 push $0x128528 10b0df: e8 58 35 00 00 call 10e63c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b0e4: e8 45 28 00 00 call 10d92e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b0e9: 83 c4 10 add $0x10,%esp 10b0ec: eb 65 jmp 10b153 } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 10b0ee: 83 f8 02 cmp $0x2,%eax 10b0f1: 75 64 jne 10b157 /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10b0f3: 83 ec 0c sub $0xc,%esp 10b0f6: 57 push %edi 10b0f7: e8 5a fe ff ff call 10af56 <_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; 10b0fc: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi) the_period->next_length = length; 10b103: 89 5f 3c mov %ebx,0x3c(%edi) _ISR_Enable( level ); 10b106: ff 75 d4 pushl -0x2c(%ebp) 10b109: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10b10a: a1 8c 89 12 00 mov 0x12898c,%eax 10b10f: 8b 57 08 mov 0x8(%edi),%edx 10b112: 89 50 20 mov %edx,0x20(%eax) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b115: 5b pop %ebx 10b116: 5e pop %esi 10b117: 68 00 40 00 00 push $0x4000 10b11c: 50 push %eax 10b11d: e8 7a 2f 00 00 call 10e09c <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10b122: 9c pushf 10b123: fa cli 10b124: 5a pop %edx local_state = the_period->state; 10b125: 8b 47 38 mov 0x38(%edi),%eax the_period->state = RATE_MONOTONIC_ACTIVE; 10b128: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) _ISR_Enable( level ); 10b12f: 52 push %edx 10b130: 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 ) 10b131: 83 c4 10 add $0x10,%esp 10b134: 83 f8 03 cmp $0x3,%eax 10b137: 75 15 jne 10b14e _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10b139: 51 push %ecx 10b13a: 51 push %ecx 10b13b: 68 00 40 00 00 push $0x4000 10b140: ff 35 8c 89 12 00 pushl 0x12898c 10b146: e8 cd 24 00 00 call 10d618 <_Thread_Clear_state> 10b14b: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 10b14e: e8 db 27 00 00 call 10d92e <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10b153: 31 f6 xor %esi,%esi 10b155: eb 47 jmp 10b19e #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b157: be 04 00 00 00 mov $0x4,%esi _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 10b15c: 83 f8 04 cmp $0x4,%eax 10b15f: 75 3d jne 10b19e <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10b161: 83 ec 0c sub $0xc,%esp 10b164: 57 push %edi 10b165: e8 ec fd ff ff call 10af56 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10b16a: ff 75 d4 pushl -0x2c(%ebp) 10b16d: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10b16e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi) the_period->next_length = length; 10b175: 89 5f 3c mov %ebx,0x3c(%edi) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b178: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b17b: 58 pop %eax 10b17c: 5a pop %edx _Watchdog_Insert_ticks( &the_period->Timer, length ); 10b17d: 83 c7 10 add $0x10,%edi 10b180: 57 push %edi 10b181: 68 28 85 12 00 push $0x128528 10b186: e8 b1 34 00 00 call 10e63c <_Watchdog_Insert> _Thread_Enable_dispatch(); 10b18b: e8 9e 27 00 00 call 10d92e <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; 10b190: 83 c4 10 add $0x10,%esp 10b193: 66 be 06 00 mov $0x6,%si 10b197: eb 05 jmp 10b19e #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10b199: be 04 00 00 00 mov $0x4,%esi } 10b19e: 89 f0 mov %esi,%eax 10b1a0: 8d 65 f4 lea -0xc(%ebp),%esp 10b1a3: 5b pop %ebx 10b1a4: 5e pop %esi 10b1a5: 5f pop %edi 10b1a6: c9 leave 10b1a7: c3 ret =============================================================================== 0010b1a8 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10b1a8: 55 push %ebp 10b1a9: 89 e5 mov %esp,%ebp 10b1ab: 57 push %edi 10b1ac: 56 push %esi 10b1ad: 53 push %ebx 10b1ae: 83 ec 7c sub $0x7c,%esp 10b1b1: 8b 5d 08 mov 0x8(%ebp),%ebx 10b1b4: 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 ) 10b1b7: 85 ff test %edi,%edi 10b1b9: 0f 84 2b 01 00 00 je 10b2ea <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10b1bf: 52 push %edx 10b1c0: 52 push %edx 10b1c1: 68 f4 15 12 00 push $0x1215f4 10b1c6: 53 push %ebx 10b1c7: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10b1c9: 5e pop %esi 10b1ca: 58 pop %eax 10b1cb: 68 12 16 12 00 push $0x121612 10b1d0: 53 push %ebx 10b1d1: ff d7 call *%edi (*print)( context, "--- Wall times are in seconds ---\n" ); 10b1d3: 5a pop %edx 10b1d4: 59 pop %ecx 10b1d5: 68 34 16 12 00 push $0x121634 10b1da: 53 push %ebx 10b1db: ff d7 call *%edi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10b1dd: 5e pop %esi 10b1de: 58 pop %eax 10b1df: 68 57 16 12 00 push $0x121657 10b1e4: 53 push %ebx 10b1e5: ff d7 call *%edi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10b1e7: 5a pop %edx 10b1e8: 59 pop %ecx 10b1e9: 68 a2 16 12 00 push $0x1216a2 10b1ee: 53 push %ebx 10b1ef: 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 ; 10b1f1: 8b 35 7c 83 12 00 mov 0x12837c,%esi 10b1f7: 83 c4 10 add $0x10,%esp 10b1fa: e9 df 00 00 00 jmp 10b2de id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10b1ff: 50 push %eax 10b200: 50 push %eax 10b201: 8d 45 88 lea -0x78(%ebp),%eax 10b204: 50 push %eax 10b205: 56 push %esi 10b206: e8 b5 56 00 00 call 1108c0 if ( status != RTEMS_SUCCESSFUL ) 10b20b: 83 c4 10 add $0x10,%esp 10b20e: 85 c0 test %eax,%eax 10b210: 0f 85 c7 00 00 00 jne 10b2dd #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 ); 10b216: 51 push %ecx 10b217: 51 push %ecx 10b218: 8d 55 c0 lea -0x40(%ebp),%edx 10b21b: 52 push %edx 10b21c: 56 push %esi 10b21d: e8 42 57 00 00 call 110964 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10b222: 83 c4 0c add $0xc,%esp 10b225: 8d 45 e3 lea -0x1d(%ebp),%eax 10b228: 50 push %eax 10b229: 6a 05 push $0x5 10b22b: ff 75 c0 pushl -0x40(%ebp) 10b22e: e8 01 02 00 00 call 10b434 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10b233: 58 pop %eax 10b234: 5a pop %edx 10b235: ff 75 8c pushl -0x74(%ebp) 10b238: ff 75 88 pushl -0x78(%ebp) 10b23b: 8d 55 e3 lea -0x1d(%ebp),%edx 10b23e: 52 push %edx 10b23f: 56 push %esi 10b240: 68 ee 16 12 00 push $0x1216ee 10b245: 53 push %ebx 10b246: ff d7 call *%edi ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10b248: 8b 45 88 mov -0x78(%ebp),%eax 10b24b: 83 c4 20 add $0x20,%esp 10b24e: 85 c0 test %eax,%eax 10b250: 75 0f jne 10b261 (*print)( context, "\n" ); 10b252: 51 push %ecx 10b253: 51 push %ecx 10b254: 68 58 19 12 00 push $0x121958 10b259: 53 push %ebx 10b25a: ff d7 call *%edi continue; 10b25c: 83 c4 10 add $0x10,%esp 10b25f: eb 7c jmp 10b2dd 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 ); 10b261: 52 push %edx 10b262: 8d 55 d8 lea -0x28(%ebp),%edx 10b265: 52 push %edx 10b266: 50 push %eax 10b267: 8d 45 a0 lea -0x60(%ebp),%eax 10b26a: 50 push %eax 10b26b: e8 a0 30 00 00 call 10e310 <_Timespec_Divide_by_integer> (*print)( context, 10b270: 8b 45 dc mov -0x24(%ebp),%eax 10b273: b9 e8 03 00 00 mov $0x3e8,%ecx 10b278: 99 cltd 10b279: f7 f9 idiv %ecx 10b27b: 50 push %eax 10b27c: ff 75 d8 pushl -0x28(%ebp) 10b27f: 8b 45 9c mov -0x64(%ebp),%eax 10b282: 99 cltd 10b283: f7 f9 idiv %ecx 10b285: 50 push %eax 10b286: ff 75 98 pushl -0x68(%ebp) 10b289: 8b 45 94 mov -0x6c(%ebp),%eax 10b28c: 99 cltd 10b28d: f7 f9 idiv %ecx 10b28f: 50 push %eax 10b290: ff 75 90 pushl -0x70(%ebp) 10b293: 68 05 17 12 00 push $0x121705 10b298: 53 push %ebx 10b299: 89 4d 84 mov %ecx,-0x7c(%ebp) 10b29c: 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); 10b29e: 83 c4 2c add $0x2c,%esp 10b2a1: 8d 55 d8 lea -0x28(%ebp),%edx 10b2a4: 52 push %edx 10b2a5: 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; 10b2a8: 8d 45 b8 lea -0x48(%ebp),%eax _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10b2ab: 50 push %eax 10b2ac: e8 5f 30 00 00 call 10e310 <_Timespec_Divide_by_integer> (*print)( context, 10b2b1: 8b 45 dc mov -0x24(%ebp),%eax 10b2b4: 8b 4d 84 mov -0x7c(%ebp),%ecx 10b2b7: 99 cltd 10b2b8: f7 f9 idiv %ecx 10b2ba: 50 push %eax 10b2bb: ff 75 d8 pushl -0x28(%ebp) 10b2be: 8b 45 b4 mov -0x4c(%ebp),%eax 10b2c1: 99 cltd 10b2c2: f7 f9 idiv %ecx 10b2c4: 50 push %eax 10b2c5: ff 75 b0 pushl -0x50(%ebp) 10b2c8: 8b 45 ac mov -0x54(%ebp),%eax 10b2cb: 99 cltd 10b2cc: f7 f9 idiv %ecx 10b2ce: 50 push %eax 10b2cf: ff 75 a8 pushl -0x58(%ebp) 10b2d2: 68 24 17 12 00 push $0x121724 10b2d7: 53 push %ebx 10b2d8: ff d7 call *%edi 10b2da: 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++ ) { 10b2dd: 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 ; 10b2de: 3b 35 80 83 12 00 cmp 0x128380,%esi 10b2e4: 0f 86 15 ff ff ff jbe 10b1ff the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 10b2ea: 8d 65 f4 lea -0xc(%ebp),%esp 10b2ed: 5b pop %ebx 10b2ee: 5e pop %esi 10b2ef: 5f pop %edi 10b2f0: c9 leave 10b2f1: c3 ret =============================================================================== 00115b4c : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 115b4c: 55 push %ebp 115b4d: 89 e5 mov %esp,%ebp 115b4f: 53 push %ebx 115b50: 83 ec 14 sub $0x14,%esp 115b53: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 115b56: 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 ) 115b5b: 85 db test %ebx,%ebx 115b5d: 74 6d je 115bcc return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 115b5f: 50 push %eax 115b60: 50 push %eax 115b61: 8d 45 f4 lea -0xc(%ebp),%eax 115b64: 50 push %eax 115b65: ff 75 08 pushl 0x8(%ebp) 115b68: e8 47 3a 00 00 call 1195b4 <_Thread_Get> switch ( location ) { 115b6d: 83 c4 10 add $0x10,%esp 115b70: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 115b74: 75 51 jne 115bc7 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 115b76: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 115b7c: 83 7a 0c 00 cmpl $0x0,0xc(%edx) 115b80: 74 39 je 115bbb if ( asr->is_enabled ) { 115b82: 80 7a 08 00 cmpb $0x0,0x8(%edx) 115b86: 74 22 je 115baa rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115b88: 9c pushf 115b89: fa cli 115b8a: 59 pop %ecx *signal_set |= signals; 115b8b: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 115b8e: 51 push %ecx 115b8f: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 115b90: 83 3d 40 f4 13 00 00 cmpl $0x0,0x13f440 115b97: 74 19 je 115bb2 115b99: 3b 05 44 f4 13 00 cmp 0x13f444,%eax 115b9f: 75 11 jne 115bb2 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 115ba1: c6 05 50 f4 13 00 01 movb $0x1,0x13f450 115ba8: eb 08 jmp 115bb2 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 115baa: 9c pushf 115bab: fa cli 115bac: 58 pop %eax *signal_set |= signals; 115bad: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 115bb0: 50 push %eax 115bb1: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 115bb2: e8 db 39 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 115bb7: 31 c0 xor %eax,%eax 115bb9: eb 11 jmp 115bcc } _Thread_Enable_dispatch(); 115bbb: e8 d2 39 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; 115bc0: b8 0b 00 00 00 mov $0xb,%eax 115bc5: eb 05 jmp 115bcc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 115bc7: b8 04 00 00 00 mov $0x4,%eax } 115bcc: 8b 5d fc mov -0x4(%ebp),%ebx 115bcf: c9 leave 115bd0: c3 ret =============================================================================== 00110cfc : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 110cfc: 55 push %ebp 110cfd: 89 e5 mov %esp,%ebp 110cff: 57 push %edi 110d00: 56 push %esi 110d01: 53 push %ebx 110d02: 83 ec 1c sub $0x1c,%esp 110d05: 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; 110d08: 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 ) 110d0d: 85 c9 test %ecx,%ecx 110d0f: 0f 84 fb 00 00 00 je 110e10 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 110d15: 8b 35 68 58 12 00 mov 0x125868,%esi api = executing->API_Extensions[ THREAD_API_RTEMS ]; 110d1b: 8b 9e e8 00 00 00 mov 0xe8(%esi),%ebx asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 110d21: 80 7e 74 01 cmpb $0x1,0x74(%esi) 110d25: 19 ff sbb %edi,%edi 110d27: 81 e7 00 01 00 00 and $0x100,%edi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 110d2d: 83 7e 7c 00 cmpl $0x0,0x7c(%esi) 110d31: 74 06 je 110d39 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 110d33: 81 cf 00 02 00 00 or $0x200,%edi old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 110d39: 80 7b 08 01 cmpb $0x1,0x8(%ebx) 110d3d: 19 d2 sbb %edx,%edx 110d3f: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= _ISR_Get_level(); 110d45: 89 55 e4 mov %edx,-0x1c(%ebp) 110d48: 89 4d e0 mov %ecx,-0x20(%ebp) 110d4b: e8 65 c6 ff ff call 10d3b5 <_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; 110d50: 8b 55 e4 mov -0x1c(%ebp),%edx 110d53: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); 110d55: 09 f8 or %edi,%eax 110d57: 8b 4d e0 mov -0x20(%ebp),%ecx 110d5a: 89 01 mov %eax,(%ecx) *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 110d5c: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 110d63: 74 0b je 110d70 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 110d65: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp) 110d6c: 0f 94 46 74 sete 0x74(%esi) if ( mask & RTEMS_TIMESLICE_MASK ) { 110d70: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 110d77: 74 21 je 110d9a if ( _Modes_Is_timeslice(mode_set) ) { 110d79: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 110d80: 74 11 je 110d93 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 110d82: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 110d89: a1 10 53 12 00 mov 0x125310,%eax 110d8e: 89 46 78 mov %eax,0x78(%esi) 110d91: eb 07 jmp 110d9a } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 110d93: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 110d9a: f6 45 0c 01 testb $0x1,0xc(%ebp) 110d9e: 74 0a je 110daa */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 110da0: f6 45 08 01 testb $0x1,0x8(%ebp) 110da4: 74 03 je 110da9 110da6: fa cli 110da7: eb 01 jmp 110daa 110da9: fb sti /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 110daa: 31 c9 xor %ecx,%ecx if ( mask & RTEMS_ASR_MASK ) { 110dac: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 110db3: 74 2a je 110ddf * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 110db5: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp) 110dbc: 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 ) { 110dbf: 3a 43 08 cmp 0x8(%ebx),%al 110dc2: 74 1b je 110ddf asr->is_enabled = is_asr_enabled; 110dc4: 88 43 08 mov %al,0x8(%ebx) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 110dc7: 9c pushf 110dc8: fa cli 110dc9: 58 pop %eax _signals = information->signals_pending; 110dca: 8b 53 18 mov 0x18(%ebx),%edx information->signals_pending = information->signals_posted; 110dcd: 8b 4b 14 mov 0x14(%ebx),%ecx 110dd0: 89 4b 18 mov %ecx,0x18(%ebx) information->signals_posted = _signals; 110dd3: 89 53 14 mov %edx,0x14(%ebx) _ISR_Enable( _level ); 110dd6: 50 push %eax 110dd7: 9d popf /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 110dd8: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 110ddc: 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; 110ddf: 31 c0 xor %eax,%eax needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 110de1: 83 3d 9c 54 12 00 03 cmpl $0x3,0x12549c 110de8: 75 26 jne 110e10 <== NEVER TAKEN bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 110dea: 8b 15 68 58 12 00 mov 0x125868,%edx if ( are_signals_pending || 110df0: 84 c9 test %cl,%cl 110df2: 75 0e jne 110e02 110df4: 3b 15 6c 58 12 00 cmp 0x12586c,%edx 110dfa: 74 14 je 110e10 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 110dfc: 80 7a 74 00 cmpb $0x0,0x74(%edx) 110e00: 74 0e je 110e10 <== NEVER TAKEN _Thread_Dispatch_necessary = true; 110e02: c6 05 74 58 12 00 01 movb $0x1,0x125874 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 110e09: e8 52 b2 ff ff call 10c060 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 110e0e: 31 c0 xor %eax,%eax } 110e10: 83 c4 1c add $0x1c,%esp 110e13: 5b pop %ebx 110e14: 5e pop %esi 110e15: 5f pop %edi 110e16: c9 leave 110e17: c3 ret =============================================================================== 0010dd30 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10dd30: 55 push %ebp 10dd31: 89 e5 mov %esp,%ebp 10dd33: 56 push %esi 10dd34: 53 push %ebx 10dd35: 83 ec 10 sub $0x10,%esp 10dd38: 8b 5d 0c mov 0xc(%ebp),%ebx 10dd3b: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dd3e: 85 db test %ebx,%ebx 10dd40: 74 10 je 10dd52 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 ) ); 10dd42: 0f b6 15 24 42 12 00 movzbl 0x124224,%edx !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 10dd49: b8 13 00 00 00 mov $0x13,%eax ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10dd4e: 39 d3 cmp %edx,%ebx 10dd50: 77 52 ja 10dda4 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 10dd52: 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 ) 10dd57: 85 f6 test %esi,%esi 10dd59: 74 49 je 10dda4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10dd5b: 51 push %ecx 10dd5c: 51 push %ecx 10dd5d: 8d 45 f4 lea -0xc(%ebp),%eax 10dd60: 50 push %eax 10dd61: ff 75 08 pushl 0x8(%ebp) 10dd64: e8 bf 1e 00 00 call 10fc28 <_Thread_Get> switch ( location ) { 10dd69: 83 c4 10 add $0x10,%esp 10dd6c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10dd70: 75 2d jne 10dd9f case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10dd72: 8b 50 14 mov 0x14(%eax),%edx 10dd75: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10dd77: 85 db test %ebx,%ebx 10dd79: 74 1b je 10dd96 the_thread->real_priority = new_priority; 10dd7b: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10dd7e: 83 78 1c 00 cmpl $0x0,0x1c(%eax) 10dd82: 74 05 je 10dd89 10dd84: 39 58 14 cmp %ebx,0x14(%eax) 10dd87: 76 0d jbe 10dd96 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 10dd89: 52 push %edx 10dd8a: 6a 00 push $0x0 10dd8c: 53 push %ebx 10dd8d: 50 push %eax 10dd8e: e8 9d 1a 00 00 call 10f830 <_Thread_Change_priority> 10dd93: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 10dd96: e8 6b 1e 00 00 call 10fc06 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 10dd9b: 31 c0 xor %eax,%eax 10dd9d: eb 05 jmp 10dda4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 10dd9f: b8 04 00 00 00 mov $0x4,%eax } 10dda4: 8d 65 f8 lea -0x8(%ebp),%esp 10dda7: 5b pop %ebx 10dda8: 5e pop %esi 10dda9: c9 leave 10ddaa: c3 ret =============================================================================== 00116398 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 116398: 55 push %ebp 116399: 89 e5 mov %esp,%ebp 11639b: 83 ec 1c sub $0x1c,%esp Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); 11639e: 8d 45 f4 lea -0xc(%ebp),%eax Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 1163a1: 50 push %eax 1163a2: ff 75 08 pushl 0x8(%ebp) 1163a5: 68 5c f8 13 00 push $0x13f85c 1163aa: e8 3d 27 00 00 call 118aec <_Objects_Get> switch ( location ) { 1163af: 83 c4 10 add $0x10,%esp 1163b2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1163b6: 75 1e jne 1163d6 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 1163b8: 83 78 38 04 cmpl $0x4,0x38(%eax) 1163bc: 74 0f je 1163cd <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 1163be: 83 ec 0c sub $0xc,%esp 1163c1: 83 c0 10 add $0x10,%eax 1163c4: 50 push %eax 1163c5: e8 62 41 00 00 call 11a52c <_Watchdog_Remove> 1163ca: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 1163cd: e8 c0 31 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1163d2: 31 c0 xor %eax,%eax 1163d4: eb 05 jmp 1163db #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1163d6: b8 04 00 00 00 mov $0x4,%eax } 1163db: c9 leave 1163dc: c3 ret =============================================================================== 001167f8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1167f8: 55 push %ebp 1167f9: 89 e5 mov %esp,%ebp 1167fb: 57 push %edi 1167fc: 56 push %esi 1167fd: 53 push %ebx 1167fe: 83 ec 1c sub $0x1c,%esp 116801: 8b 7d 0c mov 0xc(%ebp),%edi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 116804: 8b 35 9c f8 13 00 mov 0x13f89c,%esi if ( !timer_server ) return RTEMS_INCORRECT_STATE; 11680a: 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 ) 11680f: 85 f6 test %esi,%esi 116811: 0f 84 b1 00 00 00 je 1168c8 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 116817: b3 0b mov $0xb,%bl Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 116819: 80 3d 28 ef 13 00 00 cmpb $0x0,0x13ef28 116820: 0f 84 a2 00 00 00 je 1168c8 <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 116826: b3 09 mov $0x9,%bl return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 116828: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 11682c: 0f 84 96 00 00 00 je 1168c8 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116832: 83 ec 0c sub $0xc,%esp 116835: 57 push %edi 116836: e8 b5 d6 ff ff call 113ef0 <_TOD_Validate> 11683b: 83 c4 10 add $0x10,%esp return RTEMS_INVALID_CLOCK; 11683e: b3 14 mov $0x14,%bl return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 116840: 84 c0 test %al,%al 116842: 0f 84 80 00 00 00 je 1168c8 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 116848: 83 ec 0c sub $0xc,%esp 11684b: 57 push %edi 11684c: e8 37 d6 ff ff call 113e88 <_TOD_To_seconds> 116851: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 116853: 83 c4 10 add $0x10,%esp 116856: 3b 05 a0 ef 13 00 cmp 0x13efa0,%eax 11685c: 76 6a jbe 1168c8 11685e: 51 push %ecx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); 11685f: 8d 45 e4 lea -0x1c(%ebp),%eax 116862: 50 push %eax 116863: ff 75 08 pushl 0x8(%ebp) 116866: 68 5c f8 13 00 push $0x13f85c 11686b: e8 7c 22 00 00 call 118aec <_Objects_Get> 116870: 89 c3 mov %eax,%ebx switch ( location ) { 116872: 83 c4 10 add $0x10,%esp 116875: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 116879: 75 48 jne 1168c3 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11687b: 83 ec 0c sub $0xc,%esp 11687e: 8d 40 10 lea 0x10(%eax),%eax 116881: 50 push %eax 116882: e8 a5 3c 00 00 call 11a52c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 116887: 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; 11688e: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) the_watchdog->routine = routine; 116895: 8b 45 10 mov 0x10(%ebp),%eax 116898: 89 43 2c mov %eax,0x2c(%ebx) the_watchdog->id = id; 11689b: 8b 45 08 mov 0x8(%ebp),%eax 11689e: 89 43 30 mov %eax,0x30(%ebx) the_watchdog->user_data = user_data; 1168a1: 8b 45 14 mov 0x14(%ebp),%eax 1168a4: 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(); 1168a7: 2b 3d a0 ef 13 00 sub 0x13efa0,%edi 1168ad: 89 7b 1c mov %edi,0x1c(%ebx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1168b0: 58 pop %eax 1168b1: 5a pop %edx 1168b2: 53 push %ebx 1168b3: 56 push %esi 1168b4: ff 56 04 call *0x4(%esi) _Thread_Enable_dispatch(); 1168b7: e8 d6 2c 00 00 call 119592 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 1168bc: 83 c4 10 add $0x10,%esp 1168bf: 31 db xor %ebx,%ebx 1168c1: eb 05 jmp 1168c8 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 1168c3: bb 04 00 00 00 mov $0x4,%ebx } 1168c8: 89 d8 mov %ebx,%eax 1168ca: 8d 65 f4 lea -0xc(%ebp),%esp 1168cd: 5b pop %ebx 1168ce: 5e pop %esi 1168cf: 5f pop %edi 1168d0: c9 leave 1168d1: c3 ret =============================================================================== 0010a8f4 : #include int sched_get_priority_max( int policy ) { 10a8f4: 55 push %ebp 10a8f5: 89 e5 mov %esp,%ebp 10a8f7: 83 ec 08 sub $0x8,%esp 10a8fa: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10a8fd: 83 f9 04 cmp $0x4,%ecx 10a900: 77 0b ja 10a90d 10a902: b8 01 00 00 00 mov $0x1,%eax 10a907: d3 e0 shl %cl,%eax 10a909: a8 17 test $0x17,%al 10a90b: 75 10 jne 10a91d <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a90d: e8 ba 73 00 00 call 111ccc <__errno> 10a912: c7 00 16 00 00 00 movl $0x16,(%eax) 10a918: 83 c8 ff or $0xffffffff,%eax 10a91b: eb 08 jmp 10a925 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10a91d: 0f b6 05 48 22 12 00 movzbl 0x122248,%eax 10a924: 48 dec %eax } 10a925: c9 leave 10a926: c3 ret =============================================================================== 0010a928 : #include int sched_get_priority_min( int policy ) { 10a928: 55 push %ebp 10a929: 89 e5 mov %esp,%ebp 10a92b: 83 ec 08 sub $0x8,%esp 10a92e: 8b 4d 08 mov 0x8(%ebp),%ecx switch ( policy ) { 10a931: 83 f9 04 cmp $0x4,%ecx 10a934: 77 11 ja 10a947 10a936: ba 01 00 00 00 mov $0x1,%edx 10a93b: d3 e2 shl %cl,%edx default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 10a93d: b8 01 00 00 00 mov $0x1,%eax int sched_get_priority_min( int policy ) { switch ( policy ) { 10a942: 80 e2 17 and $0x17,%dl 10a945: 75 0e jne 10a955 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10a947: e8 80 73 00 00 call 111ccc <__errno> 10a94c: c7 00 16 00 00 00 movl $0x16,(%eax) 10a952: 83 c8 ff or $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10a955: c9 leave 10a956: c3 ret =============================================================================== 0010a958 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10a958: 55 push %ebp 10a959: 89 e5 mov %esp,%ebp 10a95b: 56 push %esi 10a95c: 53 push %ebx 10a95d: 8b 75 08 mov 0x8(%ebp),%esi 10a960: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10a963: 85 f6 test %esi,%esi 10a965: 74 16 je 10a97d <== NEVER TAKEN 10a967: e8 b4 d0 ff ff call 107a20 10a96c: 39 c6 cmp %eax,%esi 10a96e: 74 0d je 10a97d rtems_set_errno_and_return_minus_one( ESRCH ); 10a970: e8 57 73 00 00 call 111ccc <__errno> 10a975: c7 00 03 00 00 00 movl $0x3,(%eax) 10a97b: eb 0f jmp 10a98c if ( !interval ) 10a97d: 85 db test %ebx,%ebx 10a97f: 75 10 jne 10a991 rtems_set_errno_and_return_minus_one( EINVAL ); 10a981: e8 46 73 00 00 call 111ccc <__errno> 10a986: c7 00 16 00 00 00 movl $0x16,(%eax) 10a98c: 83 c8 ff or $0xffffffff,%eax 10a98f: eb 13 jmp 10a9a4 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10a991: 50 push %eax 10a992: 50 push %eax 10a993: 53 push %ebx 10a994: ff 35 20 63 12 00 pushl 0x126320 10a99a: e8 a9 30 00 00 call 10da48 <_Timespec_From_ticks> return 0; 10a99f: 83 c4 10 add $0x10,%esp 10a9a2: 31 c0 xor %eax,%eax } 10a9a4: 8d 65 f8 lea -0x8(%ebp),%esp 10a9a7: 5b pop %ebx 10a9a8: 5e pop %esi 10a9a9: c9 leave 10a9aa: c3 ret =============================================================================== 0010cff0 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 10cff0: 55 push %ebp 10cff1: 89 e5 mov %esp,%ebp 10cff3: 53 push %ebx 10cff4: 83 ec 14 sub $0x14,%esp 10cff7: 8b 5d 08 mov 0x8(%ebp),%ebx int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 10cffa: 85 db test %ebx,%ebx 10cffc: 75 10 jne 10d00e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10cffe: e8 d5 7f 00 00 call 114fd8 <__errno> 10d003: c7 00 16 00 00 00 movl $0x16,(%eax) 10d009: 83 c8 ff or $0xffffffff,%eax 10d00c: eb 21 jmp 10d02f status = _POSIX_Semaphore_Create_support( 10d00e: 8d 45 f4 lea -0xc(%ebp),%eax 10d011: 50 push %eax 10d012: ff 75 10 pushl 0x10(%ebp) 10d015: ff 75 0c pushl 0xc(%ebp) 10d018: 6a 00 push $0x0 10d01a: e8 bd 58 00 00 call 1128dc <_POSIX_Semaphore_Create_support> pshared, value, &the_semaphore ); if ( status != -1 ) 10d01f: 83 c4 10 add $0x10,%esp 10d022: 83 f8 ff cmp $0xffffffff,%eax 10d025: 74 08 je 10d02f *sem = the_semaphore->Object.id; 10d027: 8b 55 f4 mov -0xc(%ebp),%edx 10d02a: 8b 52 08 mov 0x8(%edx),%edx 10d02d: 89 13 mov %edx,(%ebx) return status; } 10d02f: 8b 5d fc mov -0x4(%ebp),%ebx 10d032: c9 leave 10d033: c3 ret =============================================================================== 0010d034 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10d034: 55 push %ebp 10d035: 89 e5 mov %esp,%ebp 10d037: 57 push %edi 10d038: 56 push %esi 10d039: 53 push %ebx 10d03a: 83 ec 2c sub $0x2c,%esp 10d03d: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d040: a1 e8 ae 12 00 mov 0x12aee8,%eax 10d045: 40 inc %eax 10d046: a3 e8 ae 12 00 mov %eax,0x12aee8 va_list arg; mode_t mode; unsigned int value = 0; 10d04b: 31 ff xor %edi,%edi POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10d04d: 8b 45 0c mov 0xc(%ebp),%eax 10d050: 25 00 02 00 00 and $0x200,%eax 10d055: 89 45 d4 mov %eax,-0x2c(%ebp) 10d058: 74 03 je 10d05d va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 10d05a: 8b 7d 14 mov 0x14(%ebp),%edi va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 10d05d: 52 push %edx 10d05e: 52 push %edx 10d05f: 8d 45 e4 lea -0x1c(%ebp),%eax 10d062: 50 push %eax 10d063: 56 push %esi 10d064: e8 a7 59 00 00 call 112a10 <_POSIX_Semaphore_Name_to_id> 10d069: 89 c3 mov %eax,%ebx * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 10d06b: 83 c4 10 add $0x10,%esp 10d06e: 85 c0 test %eax,%eax 10d070: 74 19 je 10d08b /* * Unless provided a valid name that did not already exist * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 10d072: 83 f8 02 cmp $0x2,%eax 10d075: 75 06 jne 10d07d <== NEVER TAKEN 10d077: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10d07b: 75 59 jne 10d0d6 _Thread_Enable_dispatch(); 10d07d: e8 30 28 00 00 call 10f8b2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10d082: e8 51 7f 00 00 call 114fd8 <__errno> 10d087: 89 18 mov %ebx,(%eax) 10d089: eb 1f jmp 10d0aa /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10d08b: 8b 45 0c mov 0xc(%ebp),%eax 10d08e: 25 00 0a 00 00 and $0xa00,%eax 10d093: 3d 00 0a 00 00 cmp $0xa00,%eax 10d098: 75 15 jne 10d0af _Thread_Enable_dispatch(); 10d09a: e8 13 28 00 00 call 10f8b2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10d09f: e8 34 7f 00 00 call 114fd8 <__errno> 10d0a4: c7 00 11 00 00 00 movl $0x11,(%eax) 10d0aa: 83 c8 ff or $0xffffffff,%eax 10d0ad: eb 4a jmp 10d0f9 10d0af: 50 push %eax } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10d0b0: 8d 45 dc lea -0x24(%ebp),%eax 10d0b3: 50 push %eax 10d0b4: ff 75 e4 pushl -0x1c(%ebp) 10d0b7: 68 8c b1 12 00 push $0x12b18c 10d0bc: e8 d7 1c 00 00 call 10ed98 <_Objects_Get> 10d0c1: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10d0c4: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10d0c7: e8 e6 27 00 00 call 10f8b2 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10d0cc: e8 e1 27 00 00 call 10f8b2 <_Thread_Enable_dispatch> goto return_id; 10d0d1: 83 c4 10 add $0x10,%esp 10d0d4: eb 1d jmp 10d0f3 /* * At this point, the semaphore does not exist and everything has been * checked. We should go ahead and create a semaphore. */ status =_POSIX_Semaphore_Create_support( 10d0d6: 8d 45 e0 lea -0x20(%ebp),%eax 10d0d9: 50 push %eax 10d0da: 57 push %edi 10d0db: 6a 00 push $0x0 10d0dd: 56 push %esi 10d0de: e8 f9 57 00 00 call 1128dc <_POSIX_Semaphore_Create_support> 10d0e3: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10d0e5: e8 c8 27 00 00 call 10f8b2 <_Thread_Enable_dispatch> if ( status == -1 ) 10d0ea: 83 c4 10 add $0x10,%esp return SEM_FAILED; 10d0ed: 83 c8 ff or $0xffffffff,%eax * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 10d0f0: 43 inc %ebx 10d0f1: 74 06 je 10d0f9 return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 10d0f3: 8b 45 e0 mov -0x20(%ebp),%eax 10d0f6: 83 c0 08 add $0x8,%eax #endif return id; } 10d0f9: 8d 65 f4 lea -0xc(%ebp),%esp 10d0fc: 5b pop %ebx 10d0fd: 5e pop %esi 10d0fe: 5f pop %edi 10d0ff: c9 leave 10d100: c3 ret =============================================================================== 0010a7d0 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10a7d0: 55 push %ebp 10a7d1: 89 e5 mov %esp,%ebp 10a7d3: 57 push %edi 10a7d4: 56 push %esi 10a7d5: 53 push %ebx 10a7d6: 83 ec 1c sub $0x1c,%esp 10a7d9: 8b 5d 08 mov 0x8(%ebp),%ebx 10a7dc: 8b 55 0c mov 0xc(%ebp),%edx 10a7df: 8b 45 10 mov 0x10(%ebp),%eax ISR_Level level; if ( oact ) 10a7e2: 85 c0 test %eax,%eax 10a7e4: 74 12 je 10a7f8 *oact = _POSIX_signals_Vectors[ sig ]; 10a7e6: 6b f3 0c imul $0xc,%ebx,%esi 10a7e9: 81 c6 3c 7a 12 00 add $0x127a3c,%esi 10a7ef: b9 03 00 00 00 mov $0x3,%ecx 10a7f4: 89 c7 mov %eax,%edi 10a7f6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10a7f8: 85 db test %ebx,%ebx 10a7fa: 74 0d je 10a809 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10a7fc: 8d 43 ff lea -0x1(%ebx),%eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10a7ff: 83 f8 1f cmp $0x1f,%eax 10a802: 77 05 ja 10a809 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10a804: 83 fb 09 cmp $0x9,%ebx 10a807: 75 10 jne 10a819 rtems_set_errno_and_return_minus_one( EINVAL ); 10a809: e8 52 77 00 00 call 111f60 <__errno> 10a80e: c7 00 16 00 00 00 movl $0x16,(%eax) 10a814: 83 c8 ff or $0xffffffff,%eax 10a817: eb 57 jmp 10a870 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10a819: 31 c0 xor %eax,%eax /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10a81b: 85 d2 test %edx,%edx 10a81d: 74 51 je 10a870 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 10a81f: 9c pushf 10a820: fa cli 10a821: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10a824: 83 7a 08 00 cmpl $0x0,0x8(%edx) 10a828: 75 1a jne 10a844 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 10a82a: 6b f3 0c imul $0xc,%ebx,%esi 10a82d: 8d 86 3c 7a 12 00 lea 0x127a3c(%esi),%eax 10a833: 81 c6 c4 11 12 00 add $0x1211c4,%esi 10a839: b9 03 00 00 00 mov $0x3,%ecx 10a83e: 89 c7 mov %eax,%edi 10a840: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a842: eb 26 jmp 10a86a } else { _POSIX_signals_Clear_process_signals( sig ); 10a844: 83 ec 0c sub $0xc,%esp 10a847: 53 push %ebx 10a848: 89 55 e0 mov %edx,-0x20(%ebp) 10a84b: e8 ac 4e 00 00 call 10f6fc <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10a850: 6b db 0c imul $0xc,%ebx,%ebx 10a853: 81 c3 3c 7a 12 00 add $0x127a3c,%ebx 10a859: b9 03 00 00 00 mov $0x3,%ecx 10a85e: 8b 55 e0 mov -0x20(%ebp),%edx 10a861: 89 df mov %ebx,%edi 10a863: 89 d6 mov %edx,%esi 10a865: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10a867: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10a86a: ff 75 e4 pushl -0x1c(%ebp) 10a86d: 9d popf * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 10a86e: 31 c0 xor %eax,%eax } 10a870: 8d 65 f4 lea -0xc(%ebp),%esp 10a873: 5b pop %ebx 10a874: 5e pop %esi 10a875: 5f pop %edi 10a876: c9 leave 10a877: c3 ret =============================================================================== 0010ab97 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10ab97: 55 push %ebp 10ab98: 89 e5 mov %esp,%ebp 10ab9a: 57 push %edi 10ab9b: 56 push %esi 10ab9c: 53 push %ebx 10ab9d: 83 ec 3c sub $0x3c,%esp 10aba0: 8b 75 08 mov 0x8(%ebp),%esi 10aba3: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10aba6: 85 f6 test %esi,%esi 10aba8: 74 24 je 10abce /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10abaa: 85 db test %ebx,%ebx 10abac: 74 30 je 10abde if ( !_Timespec_Is_valid( timeout ) ) 10abae: 83 ec 0c sub $0xc,%esp 10abb1: 53 push %ebx 10abb2: e8 4d 31 00 00 call 10dd04 <_Timespec_Is_valid> 10abb7: 83 c4 10 add $0x10,%esp 10abba: 84 c0 test %al,%al 10abbc: 74 10 je 10abce rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10abbe: 83 ec 0c sub $0xc,%esp 10abc1: 53 push %ebx 10abc2: e8 95 31 00 00 call 10dd5c <_Timespec_To_ticks> if ( !interval ) 10abc7: 83 c4 10 add $0x10,%esp 10abca: 85 c0 test %eax,%eax 10abcc: 75 12 jne 10abe0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10abce: e8 35 79 00 00 call 112508 <__errno> 10abd3: c7 00 16 00 00 00 movl $0x16,(%eax) 10abd9: e9 39 01 00 00 jmp 10ad17 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; 10abde: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10abe0: 8b 7d 0c mov 0xc(%ebp),%edi 10abe3: 85 ff test %edi,%edi 10abe5: 75 03 jne 10abea 10abe7: 8d 7d dc lea -0x24(%ebp),%edi the_thread = _Thread_Executing; 10abea: 8b 15 c8 78 12 00 mov 0x1278c8,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10abf0: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx 10abf6: 89 4d d4 mov %ecx,-0x2c(%ebp) * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10abf9: 9c pushf 10abfa: fa cli 10abfb: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10abfe: 8b 1e mov (%esi),%ebx 10ac00: 89 5d c4 mov %ebx,-0x3c(%ebp) 10ac03: 8b 5d d4 mov -0x2c(%ebp),%ebx 10ac06: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx 10ac0c: 85 4d c4 test %ecx,-0x3c(%ebp) 10ac0f: 74 32 je 10ac43 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); 10ac11: 83 ec 0c sub $0xc,%esp 10ac14: 51 push %ecx 10ac15: e8 3e ff ff ff call 10ab58 <_POSIX_signals_Get_lowest> 10ac1a: 89 07 mov %eax,(%edi) _POSIX_signals_Clear_signals( 10ac1c: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10ac23: 6a 00 push $0x0 10ac25: 57 push %edi 10ac26: 50 push %eax 10ac27: 53 push %ebx 10ac28: e8 1b 51 00 00 call 10fd48 <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10ac2d: ff 75 d0 pushl -0x30(%ebp) 10ac30: 9d popf the_info->si_code = SI_USER; 10ac31: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10ac38: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return the_info->si_signo; 10ac3f: 8b 1f mov (%edi),%ebx 10ac41: eb 3d jmp 10ac80 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10ac43: 8b 0d f0 7a 12 00 mov 0x127af0,%ecx 10ac49: 85 4d c4 test %ecx,-0x3c(%ebp) 10ac4c: 74 3a je 10ac88 signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); 10ac4e: 83 ec 0c sub $0xc,%esp 10ac51: 51 push %ecx 10ac52: e8 01 ff ff ff call 10ab58 <_POSIX_signals_Get_lowest> 10ac57: 89 c3 mov %eax,%ebx _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10ac59: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10ac60: 6a 01 push $0x1 10ac62: 57 push %edi 10ac63: 50 push %eax 10ac64: ff 75 d4 pushl -0x2c(%ebp) 10ac67: e8 dc 50 00 00 call 10fd48 <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10ac6c: ff 75 d0 pushl -0x30(%ebp) 10ac6f: 9d popf the_info->si_signo = signo; 10ac70: 89 1f mov %ebx,(%edi) the_info->si_code = SI_USER; 10ac72: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi) the_info->si_value.sival_int = 0; 10ac79: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi) return signo; 10ac80: 83 c4 20 add $0x20,%esp 10ac83: e9 92 00 00 00 jmp 10ad1a } the_info->si_signo = -1; 10ac88: c7 07 ff ff ff ff movl $0xffffffff,(%edi) 10ac8e: 8b 0d a0 73 12 00 mov 0x1273a0,%ecx 10ac94: 41 inc %ecx 10ac95: 89 0d a0 73 12 00 mov %ecx,0x1273a0 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10ac9b: c7 42 44 88 7a 12 00 movl $0x127a88,0x44(%edx) the_thread->Wait.return_code = EINTR; 10aca2: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10aca9: 8b 0e mov (%esi),%ecx 10acab: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10acae: 89 7a 28 mov %edi,0x28(%edx) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10acb1: c7 05 b8 7a 12 00 01 movl $0x1,0x127ab8 10acb8: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10acbb: ff 75 d0 pushl -0x30(%ebp) 10acbe: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10acbf: 52 push %edx 10acc0: 68 80 da 10 00 push $0x10da80 10acc5: 50 push %eax 10acc6: 68 88 7a 12 00 push $0x127a88 10accb: e8 d4 2a 00 00 call 10d7a4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10acd0: e8 89 26 00 00 call 10d35e <_Thread_Enable_dispatch> /* * When the thread is set free by a signal, it is need to eliminate * the signal. */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); 10acd5: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10acdc: 6a 00 push $0x0 10acde: 57 push %edi 10acdf: ff 37 pushl (%edi) 10ace1: ff 75 d4 pushl -0x2c(%ebp) 10ace4: e8 5f 50 00 00 call 10fd48 <_POSIX_signals_Clear_signals> /* Set errno only if return code is not EINTR or * if EINTR was caused by a signal being caught, which * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) 10ace9: 83 c4 20 add $0x20,%esp 10acec: a1 c8 78 12 00 mov 0x1278c8,%eax 10acf1: 83 78 34 04 cmpl $0x4,0x34(%eax) 10acf5: 75 10 jne 10ad07 || !(*set & signo_to_mask( the_info->si_signo )) ) { 10acf7: 8b 1f mov (%edi),%ebx 10acf9: 8d 4b ff lea -0x1(%ebx),%ecx 10acfc: b8 01 00 00 00 mov $0x1,%eax 10ad01: d3 e0 shl %cl,%eax 10ad03: 85 06 test %eax,(%esi) 10ad05: 75 13 jne 10ad1a errno = _Thread_Executing->Wait.return_code; 10ad07: e8 fc 77 00 00 call 112508 <__errno> 10ad0c: 8b 15 c8 78 12 00 mov 0x1278c8,%edx 10ad12: 8b 52 34 mov 0x34(%edx),%edx 10ad15: 89 10 mov %edx,(%eax) return -1; 10ad17: 83 cb ff or $0xffffffff,%ebx } return the_info->si_signo; } 10ad1a: 89 d8 mov %ebx,%eax 10ad1c: 8d 65 f4 lea -0xc(%ebp),%esp 10ad1f: 5b pop %ebx 10ad20: 5e pop %esi 10ad21: 5f pop %edi 10ad22: c9 leave 10ad23: c3 ret =============================================================================== 0010ca18 : int sigwait( const sigset_t *set, int *sig ) { 10ca18: 55 push %ebp 10ca19: 89 e5 mov %esp,%ebp 10ca1b: 53 push %ebx 10ca1c: 83 ec 08 sub $0x8,%esp 10ca1f: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10ca22: 6a 00 push $0x0 10ca24: 6a 00 push $0x0 10ca26: ff 75 08 pushl 0x8(%ebp) 10ca29: e8 45 fe ff ff call 10c873 10ca2e: 89 c2 mov %eax,%edx if ( status != -1 ) { 10ca30: 83 c4 10 add $0x10,%esp 10ca33: 83 f8 ff cmp $0xffffffff,%eax 10ca36: 74 0a je 10ca42 if ( sig ) *sig = status; return 0; 10ca38: 31 c0 xor %eax,%eax int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 10ca3a: 85 db test %ebx,%ebx 10ca3c: 74 0b je 10ca49 <== NEVER TAKEN *sig = status; 10ca3e: 89 13 mov %edx,(%ebx) 10ca40: eb 07 jmp 10ca49 return 0; } return errno; 10ca42: e8 e9 72 00 00 call 113d30 <__errno> 10ca47: 8b 00 mov (%eax),%eax } 10ca49: 8b 5d fc mov -0x4(%ebp),%ebx 10ca4c: c9 leave 10ca4d: c3 ret =============================================================================== 0010a030 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10a030: 55 push %ebp 10a031: 89 e5 mov %esp,%ebp 10a033: 56 push %esi 10a034: 53 push %ebx 10a035: 8b 5d 0c mov 0xc(%ebp),%ebx 10a038: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10a03b: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10a03f: 75 1d jne 10a05e rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10a041: 85 f6 test %esi,%esi 10a043: 74 19 je 10a05e /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10a045: 85 db test %ebx,%ebx 10a047: 74 22 je 10a06b /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10a049: 8b 03 mov (%ebx),%eax 10a04b: 48 dec %eax 10a04c: 83 f8 01 cmp $0x1,%eax 10a04f: 77 0d ja 10a05e <== NEVER TAKEN ( evp->sigev_notify != SIGEV_SIGNAL ) ) { /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !evp->sigev_signo ) 10a051: 8b 43 04 mov 0x4(%ebx),%eax 10a054: 85 c0 test %eax,%eax 10a056: 74 06 je 10a05e <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 10a058: 48 dec %eax rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10a059: 83 f8 1f cmp $0x1f,%eax 10a05c: 76 0d jbe 10a06b <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 10a05e: e8 89 7c 00 00 call 111cec <__errno> 10a063: c7 00 16 00 00 00 movl $0x16,(%eax) 10a069: eb 2f jmp 10a09a rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10a06b: a1 b4 73 12 00 mov 0x1273b4,%eax 10a070: 40 inc %eax 10a071: a3 b4 73 12 00 mov %eax,0x1273b4 * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void ) { return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information ); 10a076: 83 ec 0c sub $0xc,%esp 10a079: 68 98 76 12 00 push $0x127698 10a07e: e8 75 1b 00 00 call 10bbf8 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10a083: 83 c4 10 add $0x10,%esp 10a086: 85 c0 test %eax,%eax 10a088: 75 18 jne 10a0a2 _Thread_Enable_dispatch(); 10a08a: e8 3b 2a 00 00 call 10caca <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10a08f: e8 58 7c 00 00 call 111cec <__errno> 10a094: c7 00 0b 00 00 00 movl $0xb,(%eax) 10a09a: 83 c8 ff or $0xffffffff,%eax 10a09d: e9 83 00 00 00 jmp 10a125 } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 10a0a2: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10a0a6: 8b 15 dc 78 12 00 mov 0x1278dc,%edx 10a0ac: 8b 52 08 mov 0x8(%edx),%edx 10a0af: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10a0b2: 85 db test %ebx,%ebx 10a0b4: 74 11 je 10a0c7 ptimer->inf.sigev_notify = evp->sigev_notify; 10a0b6: 8b 13 mov (%ebx),%edx 10a0b8: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10a0bb: 8b 53 04 mov 0x4(%ebx),%edx 10a0be: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10a0c1: 8b 53 08 mov 0x8(%ebx),%edx 10a0c4: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10a0c7: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10a0ce: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10a0d5: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10a0dc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10a0e3: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a0ea: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10a0f1: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10a0f8: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10a0ff: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 10a106: 8b 50 08 mov 0x8(%eax),%edx Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 10a109: 0f b7 da movzwl %dx,%ebx #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10a10c: 8b 0d b4 76 12 00 mov 0x1276b4,%ecx 10a112: 89 04 99 mov %eax,(%ecx,%ebx,4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 10a115: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; 10a11c: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10a11e: e8 a7 29 00 00 call 10caca <_Thread_Enable_dispatch> return 0; 10a123: 31 c0 xor %eax,%eax } 10a125: 8d 65 f8 lea -0x8(%ebp),%esp 10a128: 5b pop %ebx 10a129: 5e pop %esi 10a12a: c9 leave 10a12b: c3 ret =============================================================================== 0010a12c : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10a12c: 55 push %ebp 10a12d: 89 e5 mov %esp,%ebp 10a12f: 57 push %edi 10a130: 56 push %esi 10a131: 53 push %ebx 10a132: 83 ec 2c sub $0x2c,%esp 10a135: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10a138: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10a13c: 0f 84 58 01 00 00 je 10a29a <== NEVER TAKEN /* * First, it verifies if the structure "value" is correct * if the number of nanoseconds is not correct return EINVAL */ if ( !_Timespec_Is_valid( &(value->it_value) ) ) { 10a142: 83 ec 0c sub $0xc,%esp 10a145: 8b 45 10 mov 0x10(%ebp),%eax 10a148: 83 c0 08 add $0x8,%eax 10a14b: 50 push %eax 10a14c: e8 43 33 00 00 call 10d494 <_Timespec_Is_valid> 10a151: 83 c4 10 add $0x10,%esp 10a154: 84 c0 test %al,%al 10a156: 0f 84 3e 01 00 00 je 10a29a rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { 10a15c: 83 ec 0c sub $0xc,%esp 10a15f: ff 75 10 pushl 0x10(%ebp) 10a162: e8 2d 33 00 00 call 10d494 <_Timespec_Is_valid> 10a167: 83 c4 10 add $0x10,%esp 10a16a: 84 c0 test %al,%al 10a16c: 0f 84 28 01 00 00 je 10a29a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10a172: 85 db test %ebx,%ebx 10a174: 74 09 je 10a17f 10a176: 83 fb 04 cmp $0x4,%ebx 10a179: 0f 85 1b 01 00 00 jne 10a29a rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10a17f: 8d 7d cc lea -0x34(%ebp),%edi 10a182: b9 04 00 00 00 mov $0x4,%ecx 10a187: 8b 75 10 mov 0x10(%ebp),%esi 10a18a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 10a18c: 83 fb 04 cmp $0x4,%ebx 10a18f: 75 2f jne 10a1c0 struct timespec now; _TOD_Get( &now ); 10a191: 83 ec 0c sub $0xc,%esp 10a194: 8d 5d dc lea -0x24(%ebp),%ebx 10a197: 53 push %ebx 10a198: e8 b3 15 00 00 call 10b750 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10a19d: 59 pop %ecx 10a19e: 5e pop %esi 10a19f: 8d 75 d4 lea -0x2c(%ebp),%esi 10a1a2: 56 push %esi 10a1a3: 53 push %ebx 10a1a4: e8 c7 32 00 00 call 10d470 <_Timespec_Greater_than> 10a1a9: 83 c4 10 add $0x10,%esp 10a1ac: 84 c0 test %al,%al 10a1ae: 0f 85 e6 00 00 00 jne 10a29a rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10a1b4: 52 push %edx 10a1b5: 56 push %esi 10a1b6: 56 push %esi 10a1b7: 53 push %ebx 10a1b8: e8 fb 32 00 00 call 10d4b8 <_Timespec_Subtract> 10a1bd: 83 c4 10 add $0x10,%esp timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); 10a1c0: 50 push %eax /* If the function reaches this point, then it will be necessary to do * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); 10a1c1: 8d 45 e4 lea -0x1c(%ebp),%eax 10a1c4: 50 push %eax 10a1c5: ff 75 08 pushl 0x8(%ebp) 10a1c8: 68 98 76 12 00 push $0x127698 10a1cd: e8 52 1e 00 00 call 10c024 <_Objects_Get> 10a1d2: 89 c3 mov %eax,%ebx switch ( location ) { 10a1d4: 83 c4 10 add $0x10,%esp 10a1d7: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 10a1db: 0f 85 b9 00 00 00 jne 10a29a case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { 10a1e1: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 10a1e5: 75 3b jne 10a222 10a1e7: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) 10a1eb: 75 35 jne 10a222 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10a1ed: 83 ec 0c sub $0xc,%esp 10a1f0: 8d 40 10 lea 0x10(%eax),%eax 10a1f3: 50 push %eax 10a1f4: e8 8b 36 00 00 call 10d884 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10a1f9: 83 c4 10 add $0x10,%esp 10a1fc: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a200: 74 0d je 10a20f *ovalue = ptimer->timer_data; 10a202: 8d 73 54 lea 0x54(%ebx),%esi 10a205: b9 04 00 00 00 mov $0x4,%ecx 10a20a: 8b 7d 14 mov 0x14(%ebp),%edi 10a20d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10a20f: 8d 7b 54 lea 0x54(%ebx),%edi 10a212: 8d 75 cc lea -0x34(%ebp),%esi 10a215: b9 04 00 00 00 mov $0x4,%ecx 10a21a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10a21c: c6 43 3c 04 movb $0x4,0x3c(%ebx) 10a220: eb 35 jmp 10a257 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10a222: 83 ec 0c sub $0xc,%esp 10a225: ff 75 10 pushl 0x10(%ebp) 10a228: e8 bf 32 00 00 call 10d4ec <_Timespec_To_ticks> 10a22d: 89 43 64 mov %eax,0x64(%ebx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10a230: 8d 45 d4 lea -0x2c(%ebp),%eax 10a233: 89 04 24 mov %eax,(%esp) 10a236: e8 b1 32 00 00 call 10d4ec <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10a23b: 89 1c 24 mov %ebx,(%esp) 10a23e: 68 b0 a2 10 00 push $0x10a2b0 10a243: ff 73 08 pushl 0x8(%ebx) 10a246: 50 push %eax 10a247: 8d 43 10 lea 0x10(%ebx),%eax 10a24a: 50 push %eax 10a24b: e8 70 57 00 00 call 10f9c0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10a250: 83 c4 20 add $0x20,%esp 10a253: 84 c0 test %al,%al 10a255: 75 07 jne 10a25e _Thread_Enable_dispatch(); 10a257: e8 6e 28 00 00 call 10caca <_Thread_Enable_dispatch> 10a25c: eb 38 jmp 10a296 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10a25e: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10a262: 74 0d je 10a271 *ovalue = ptimer->timer_data; 10a264: 8d 73 54 lea 0x54(%ebx),%esi 10a267: b9 04 00 00 00 mov $0x4,%ecx 10a26c: 8b 7d 14 mov 0x14(%ebp),%edi 10a26f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10a271: 8d 7b 54 lea 0x54(%ebx),%edi 10a274: 8d 75 cc lea -0x34(%ebp),%esi 10a277: b9 04 00 00 00 mov $0x4,%ecx 10a27c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10a27e: c6 43 3c 03 movb $0x3,0x3c(%ebx) _TOD_Get( &ptimer->time ); 10a282: 83 ec 0c sub $0xc,%esp 10a285: 83 c3 6c add $0x6c,%ebx 10a288: 53 push %ebx 10a289: e8 c2 14 00 00 call 10b750 <_TOD_Get> _Thread_Enable_dispatch(); 10a28e: e8 37 28 00 00 call 10caca <_Thread_Enable_dispatch> return 0; 10a293: 83 c4 10 add $0x10,%esp 10a296: 31 c0 xor %eax,%eax 10a298: eb 0e jmp 10a2a8 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10a29a: e8 4d 7a 00 00 call 111cec <__errno> 10a29f: c7 00 16 00 00 00 movl $0x16,(%eax) 10a2a5: 83 c8 ff or $0xffffffff,%eax } 10a2a8: 8d 65 f4 lea -0xc(%ebp),%esp 10a2ab: 5b pop %ebx 10a2ac: 5e pop %esi 10a2ad: 5f pop %edi 10a2ae: c9 leave 10a2af: c3 ret =============================================================================== 00109f6c : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 109f6c: 55 push %ebp 109f6d: 89 e5 mov %esp,%ebp 109f6f: 57 push %edi 109f70: 56 push %esi 109f71: 53 push %ebx 109f72: 83 ec 1c sub $0x1c,%esp 109f75: 8b 75 08 mov 0x8(%ebp),%esi /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 109f78: 83 3d a0 6c 12 00 00 cmpl $0x0,0x126ca0 109f7f: 75 2c jne 109fad Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 109f81: c7 05 8c 6c 12 00 00 movl $0x0,0x126c8c 109f88: 00 00 00 the_watchdog->routine = routine; 109f8b: c7 05 a0 6c 12 00 34 movl $0x109f34,0x126ca0 109f92: 9f 10 00 the_watchdog->id = id; 109f95: c7 05 a4 6c 12 00 00 movl $0x0,0x126ca4 109f9c: 00 00 00 the_watchdog->user_data = user_data; 109f9f: c7 05 a8 6c 12 00 00 movl $0x0,0x126ca8 109fa6: 00 00 00 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 109fa9: 31 db xor %ebx,%ebx 109fab: eb 4f jmp 109ffc if ( !the_timer->routine ) { _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 109fad: 83 ec 0c sub $0xc,%esp 109fb0: 68 84 6c 12 00 push $0x126c84 109fb5: e8 b2 34 00 00 call 10d46c <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 109fba: 83 e8 02 sub $0x2,%eax 109fbd: 83 c4 10 add $0x10,%esp useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 109fc0: 31 db xor %ebx,%ebx _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 109fc2: 83 f8 01 cmp $0x1,%eax 109fc5: 77 35 ja 109ffc <== NEVER TAKEN * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 109fc7: a1 98 6c 12 00 mov 0x126c98,%eax 109fcc: 03 05 90 6c 12 00 add 0x126c90,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 109fd2: 57 push %edi 109fd3: 57 push %edi 109fd4: 8d 55 e0 lea -0x20(%ebp),%edx 109fd7: 52 push %edx * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 109fd8: 2b 05 9c 6c 12 00 sub 0x126c9c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 109fde: 50 push %eax 109fdf: e8 28 30 00 00 call 10d00c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 109fe4: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx remaining += tp.tv_nsec / 1000; 109feb: 8b 45 e4 mov -0x1c(%ebp),%eax 109fee: bf e8 03 00 00 mov $0x3e8,%edi 109ff3: 99 cltd 109ff4: f7 ff idiv %edi 109ff6: 8d 1c 08 lea (%eax,%ecx,1),%ebx 109ff9: 83 c4 10 add $0x10,%esp /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 109ffc: 85 f6 test %esi,%esi 109ffe: 74 44 je 10a044 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10a000: b9 40 42 0f 00 mov $0xf4240,%ecx 10a005: 89 f0 mov %esi,%eax 10a007: 31 d2 xor %edx,%edx 10a009: f7 f1 div %ecx 10a00b: 89 45 e0 mov %eax,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10a00e: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx 10a014: 89 55 e4 mov %edx,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10a017: 83 ec 0c sub $0xc,%esp 10a01a: 8d 75 e0 lea -0x20(%ebp),%esi 10a01d: 56 push %esi 10a01e: e8 45 30 00 00 call 10d068 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10a023: 89 34 24 mov %esi,(%esp) 10a026: e8 3d 30 00 00 call 10d068 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a02b: a3 90 6c 12 00 mov %eax,0x126c90 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a030: 59 pop %ecx 10a031: 5e pop %esi 10a032: 68 84 6c 12 00 push $0x126c84 10a037: 68 74 64 12 00 push $0x126474 10a03c: e8 0b 33 00 00 call 10d34c <_Watchdog_Insert> 10a041: 83 c4 10 add $0x10,%esp } return remaining; } 10a044: 89 d8 mov %ebx,%eax 10a046: 8d 65 f4 lea -0xc(%ebp),%esp 10a049: 5b pop %ebx 10a04a: 5e pop %esi 10a04b: 5f pop %edi 10a04c: c9 leave 10a04d: c3 ret