RTEMS 4.11Annotated Report
Sat Mar 19 19:26:05 2011
0010e26c <_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
)
{
10e26c: 55 push %ebp
10e26d: 89 e5 mov %esp,%ebp
10e26f: 57 push %edi
10e270: 56 push %esi
10e271: 53 push %ebx
10e272: 83 ec 1c sub $0x1c,%esp
10e275: 8b 5d 08 mov 0x8(%ebp),%ebx
10e278: 8b 7d 10 mov 0x10(%ebp),%edi
10e27b: 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;
10e27e: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
10e281: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
10e288: 89 53 4c mov %edx,0x4c(%ebx)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
10e28b: 89 d0 mov %edx,%eax
10e28d: f6 c2 03 test $0x3,%dl
10e290: 74 0c je 10e29e <_CORE_message_queue_Initialize+0x32>
allocated_message_size += sizeof(uint32_t);
10e292: 83 c0 04 add $0x4,%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
10e295: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
return false;
10e298: 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)
10e29a: 39 d0 cmp %edx,%eax
10e29c: 72 68 jb 10e306 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
10e29e: 8d 50 10 lea 0x10(%eax),%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
10e2a1: 89 d1 mov %edx,%ecx
10e2a3: 0f af cf imul %edi,%ecx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
10e2a6: 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)
10e2a8: 39 c1 cmp %eax,%ecx
10e2aa: 72 5a jb 10e306 <_CORE_message_queue_Initialize+0x9a><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
10e2ac: 83 ec 0c sub $0xc,%esp
10e2af: 51 push %ecx
10e2b0: 89 55 e4 mov %edx,-0x1c(%ebp)
10e2b3: e8 36 e1 ff ff call 10c3ee <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
10e2b8: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
10e2bb: 83 c4 10 add $0x10,%esp
10e2be: 85 c0 test %eax,%eax
10e2c0: 8b 55 e4 mov -0x1c(%ebp),%edx
10e2c3: 74 41 je 10e306 <_CORE_message_queue_Initialize+0x9a>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
10e2c5: 52 push %edx
10e2c6: 57 push %edi
10e2c7: 50 push %eax
10e2c8: 8d 43 60 lea 0x60(%ebx),%eax
10e2cb: 50 push %eax
10e2cc: e8 df fe ff ff call 10e1b0 <_Chain_Initialize>
Chain_Node *tail = _Chain_Tail( the_chain );
10e2d1: 8d 43 54 lea 0x54(%ebx),%eax
10e2d4: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
10e2d7: 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 );
10e2de: 8d 43 50 lea 0x50(%ebx),%eax
10e2e1: 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(
10e2e4: 6a 06 push $0x6
10e2e6: 68 80 00 00 00 push $0x80
10e2eb: 8b 45 0c mov 0xc(%ebp),%eax
10e2ee: 83 38 01 cmpl $0x1,(%eax)
10e2f1: 0f 94 c0 sete %al
10e2f4: 0f b6 c0 movzbl %al,%eax
10e2f7: 50 push %eax
10e2f8: 53 push %ebx
10e2f9: e8 4e d9 ff ff call 10bc4c <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
10e2fe: 83 c4 20 add $0x20,%esp
10e301: be 01 00 00 00 mov $0x1,%esi
}
10e306: 89 f0 mov %esi,%eax
10e308: 8d 65 f4 lea -0xc(%ebp),%esp
10e30b: 5b pop %ebx
10e30c: 5e pop %esi
10e30d: 5f pop %edi
10e30e: c9 leave
10e30f: c3 ret
0010e310 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
10e310: 55 push %ebp
10e311: 89 e5 mov %esp,%ebp
10e313: 57 push %edi
10e314: 56 push %esi
10e315: 53 push %ebx
10e316: 83 ec 2c sub $0x2c,%esp
10e319: 8b 45 08 mov 0x8(%ebp),%eax
10e31c: 8b 55 0c mov 0xc(%ebp),%edx
10e31f: 89 55 dc mov %edx,-0x24(%ebp)
10e322: 8b 55 10 mov 0x10(%ebp),%edx
10e325: 89 55 e4 mov %edx,-0x1c(%ebp)
10e328: 8b 7d 14 mov 0x14(%ebp),%edi
10e32b: 8b 55 1c mov 0x1c(%ebp),%edx
10e32e: 89 55 d4 mov %edx,-0x2c(%ebp)
10e331: 8a 55 18 mov 0x18(%ebp),%dl
10e334: 88 55 db mov %dl,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
10e337: 8b 0d 5c 34 12 00 mov 0x12345c,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10e33d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
10e344: 9c pushf
10e345: fa cli
10e346: 8f 45 e0 popl -0x20(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10e349: 8b 50 50 mov 0x50(%eax),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10e34c: 8d 58 54 lea 0x54(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
10e34f: 39 da cmp %ebx,%edx
10e351: 74 47 je 10e39a <_CORE_message_queue_Seize+0x8a>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
10e353: 8b 32 mov (%edx),%esi
head->next = new_first;
10e355: 89 70 50 mov %esi,0x50(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10e358: 8d 58 50 lea 0x50(%eax),%ebx
10e35b: 89 5e 04 mov %ebx,0x4(%esi)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
10e35e: 85 d2 test %edx,%edx
10e360: 74 38 je 10e39a <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
10e362: ff 48 48 decl 0x48(%eax)
_ISR_Enable( level );
10e365: ff 75 e0 pushl -0x20(%ebp)
10e368: 9d popf
*size_p = the_message->Contents.size;
10e369: 8b 4a 08 mov 0x8(%edx),%ecx
10e36c: 89 0f mov %ecx,(%edi)
_Thread_Executing->Wait.count =
10e36e: 8b 0d 5c 34 12 00 mov 0x12345c,%ecx
10e374: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
10e37b: 8d 72 0c lea 0xc(%edx),%esi
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10e37e: 8b 0f mov (%edi),%ecx
10e380: 8b 7d e4 mov -0x1c(%ebp),%edi
10e383: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
10e385: 89 55 0c mov %edx,0xc(%ebp)
10e388: 83 c0 60 add $0x60,%eax
10e38b: 89 45 08 mov %eax,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10e38e: 83 c4 2c add $0x2c,%esp
10e391: 5b pop %ebx
10e392: 5e pop %esi
10e393: 5f pop %edi
10e394: c9 leave
10e395: e9 ca bb ff ff jmp 109f64 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
10e39a: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10e39e: 75 13 jne 10e3b3 <_CORE_message_queue_Seize+0xa3>
_ISR_Enable( level );
10e3a0: ff 75 e0 pushl -0x20(%ebp)
10e3a3: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
10e3a4: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10e3ab: 83 c4 2c add $0x2c,%esp
10e3ae: 5b pop %ebx
10e3af: 5e pop %esi
10e3b0: 5f pop %edi
10e3b1: c9 leave
10e3b2: c3 ret
10e3b3: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10e3ba: 89 41 44 mov %eax,0x44(%ecx)
executing->Wait.id = id;
10e3bd: 8b 55 dc mov -0x24(%ebp),%edx
10e3c0: 89 51 20 mov %edx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
10e3c3: 8b 55 e4 mov -0x1c(%ebp),%edx
10e3c6: 89 51 2c mov %edx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
10e3c9: 89 79 28 mov %edi,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
10e3cc: ff 75 e0 pushl -0x20(%ebp)
10e3cf: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10e3d0: c7 45 10 fc bc 10 00 movl $0x10bcfc,0x10(%ebp)
10e3d7: 8b 55 d4 mov -0x2c(%ebp),%edx
10e3da: 89 55 0c mov %edx,0xc(%ebp)
10e3dd: 89 45 08 mov %eax,0x8(%ebp)
}
10e3e0: 83 c4 2c add $0x2c,%esp
10e3e3: 5b pop %ebx
10e3e4: 5e pop %esi
10e3e5: 5f pop %edi
10e3e6: 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 );
10e3e7: e9 34 d6 ff ff jmp 10ba20 <_Thread_queue_Enqueue_with_handler>
0010a0b9 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10a0b9: 55 push %ebp
10a0ba: 89 e5 mov %esp,%ebp
10a0bc: 53 push %ebx
10a0bd: 83 ec 14 sub $0x14,%esp
10a0c0: 8b 5d 08 mov 0x8(%ebp),%ebx
10a0c3: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10a0c6: a1 44 32 12 00 mov 0x123244,%eax
10a0cb: 85 c0 test %eax,%eax
10a0cd: 74 19 je 10a0e8 <_CORE_mutex_Seize+0x2f>
10a0cf: 84 d2 test %dl,%dl
10a0d1: 74 15 je 10a0e8 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10a0d3: 83 3d 9c 33 12 00 01 cmpl $0x1,0x12339c
10a0da: 76 0c jbe 10a0e8 <_CORE_mutex_Seize+0x2f>
10a0dc: 53 push %ebx
10a0dd: 6a 12 push $0x12
10a0df: 6a 00 push $0x0
10a0e1: 6a 00 push $0x0
10a0e3: e8 dc 05 00 00 call 10a6c4 <_Internal_error_Occurred>
10a0e8: 51 push %ecx
10a0e9: 51 push %ecx
10a0ea: 8d 45 18 lea 0x18(%ebp),%eax
10a0ed: 50 push %eax
10a0ee: 53 push %ebx
10a0ef: 88 55 f4 mov %dl,-0xc(%ebp)
10a0f2: e8 89 43 00 00 call 10e480 <_CORE_mutex_Seize_interrupt_trylock>
10a0f7: 83 c4 10 add $0x10,%esp
10a0fa: 85 c0 test %eax,%eax
10a0fc: 8a 55 f4 mov -0xc(%ebp),%dl
10a0ff: 74 48 je 10a149 <_CORE_mutex_Seize+0x90>
10a101: 84 d2 test %dl,%dl
10a103: 75 12 jne 10a117 <_CORE_mutex_Seize+0x5e>
10a105: ff 75 18 pushl 0x18(%ebp)
10a108: 9d popf
10a109: a1 5c 34 12 00 mov 0x12345c,%eax
10a10e: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10a115: eb 32 jmp 10a149 <_CORE_mutex_Seize+0x90>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10a117: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10a11e: a1 5c 34 12 00 mov 0x12345c,%eax
10a123: 89 58 44 mov %ebx,0x44(%eax)
10a126: 8b 55 0c mov 0xc(%ebp),%edx
10a129: 89 50 20 mov %edx,0x20(%eax)
10a12c: a1 44 32 12 00 mov 0x123244,%eax
10a131: 40 inc %eax
10a132: a3 44 32 12 00 mov %eax,0x123244
10a137: ff 75 18 pushl 0x18(%ebp)
10a13a: 9d popf
10a13b: 50 push %eax
10a13c: 50 push %eax
10a13d: ff 75 14 pushl 0x14(%ebp)
10a140: 53 push %ebx
10a141: e8 26 ff ff ff call 10a06c <_CORE_mutex_Seize_interrupt_blocking>
10a146: 83 c4 10 add $0x10,%esp
}
10a149: 8b 5d fc mov -0x4(%ebp),%ebx
10a14c: c9 leave
10a14d: c3 ret
0010a274 <_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
)
{
10a274: 55 push %ebp
10a275: 89 e5 mov %esp,%ebp
10a277: 53 push %ebx
10a278: 83 ec 10 sub $0x10,%esp
10a27b: 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)) ) {
10a27e: 53 push %ebx
10a27f: e8 90 16 00 00 call 10b914 <_Thread_queue_Dequeue>
10a284: 89 c2 mov %eax,%edx
10a286: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a289: 31 c0 xor %eax,%eax
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10a28b: 85 d2 test %edx,%edx
10a28d: 75 15 jne 10a2a4 <_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 );
10a28f: 9c pushf
10a290: fa cli
10a291: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a292: 8b 53 48 mov 0x48(%ebx),%edx
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10a295: 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 )
10a297: 3b 53 40 cmp 0x40(%ebx),%edx
10a29a: 73 06 jae 10a2a2 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10a29c: 42 inc %edx
10a29d: 89 53 48 mov %edx,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a2a0: 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 );
10a2a2: 51 push %ecx
10a2a3: 9d popf
}
return status;
}
10a2a4: 8b 5d fc mov -0x4(%ebp),%ebx
10a2a7: c9 leave
10a2a8: c3 ret
001093c0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
1093c0: 55 push %ebp
1093c1: 89 e5 mov %esp,%ebp
1093c3: 57 push %edi
1093c4: 56 push %esi
1093c5: 53 push %ebx
1093c6: 83 ec 2c sub $0x2c,%esp
1093c9: 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 ];
1093cc: 8b bb e4 00 00 00 mov 0xe4(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
1093d2: 8b 43 30 mov 0x30(%ebx),%eax
1093d5: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
1093d8: 9c pushf
1093d9: fa cli
1093da: 58 pop %eax
pending_events = api->pending_events;
1093db: 8b 17 mov (%edi),%edx
1093dd: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
1093e0: 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 ) ) {
1093e3: 21 f2 and %esi,%edx
1093e5: 75 07 jne 1093ee <_Event_Surrender+0x2e>
_ISR_Enable( level );
1093e7: 50 push %eax
1093e8: 9d popf
return;
1093e9: e9 af 00 00 00 jmp 10949d <_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() &&
1093ee: 83 3d 58 34 12 00 00 cmpl $0x0,0x123458
1093f5: 74 49 je 109440 <_Event_Surrender+0x80>
1093f7: 3b 1d 5c 34 12 00 cmp 0x12345c,%ebx
1093fd: 75 41 jne 109440 <_Event_Surrender+0x80>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
1093ff: 8b 0d 90 34 12 00 mov 0x123490,%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 ) &&
109405: 83 f9 02 cmp $0x2,%ecx
109408: 74 09 je 109413 <_Event_Surrender+0x53> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10940a: 8b 0d 90 34 12 00 mov 0x123490,%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) ||
109410: 49 dec %ecx
109411: 75 2d jne 109440 <_Event_Surrender+0x80>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109413: 39 f2 cmp %esi,%edx
109415: 74 06 je 10941d <_Event_Surrender+0x5d>
109417: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10941b: 74 1f je 10943c <_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) );
10941d: 89 d6 mov %edx,%esi
10941f: f7 d6 not %esi
109421: 23 75 d4 and -0x2c(%ebp),%esi
109424: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109426: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10942d: 8b 4b 28 mov 0x28(%ebx),%ecx
109430: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109432: c7 05 90 34 12 00 03 movl $0x3,0x123490
109439: 00 00 00
}
_ISR_Enable( level );
10943c: 50 push %eax
10943d: 9d popf
return;
10943e: eb 5d jmp 10949d <_Event_Surrender+0xdd>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109440: f6 43 11 01 testb $0x1,0x11(%ebx)
109444: 74 55 je 10949b <_Event_Surrender+0xdb>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109446: 39 f2 cmp %esi,%edx
109448: 74 06 je 109450 <_Event_Surrender+0x90>
10944a: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10944e: 74 4b je 10949b <_Event_Surrender+0xdb> <== NEVER TAKEN
109450: 89 d6 mov %edx,%esi
109452: f7 d6 not %esi
109454: 23 75 d4 and -0x2c(%ebp),%esi
109457: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109459: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109460: 8b 4b 28 mov 0x28(%ebx),%ecx
109463: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109465: 50 push %eax
109466: 9d popf
109467: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109468: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10946c: 74 06 je 109474 <_Event_Surrender+0xb4>
_ISR_Enable( level );
10946e: 50 push %eax
10946f: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109470: 51 push %ecx
109471: 51 push %ecx
109472: eb 17 jmp 10948b <_Event_Surrender+0xcb>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109474: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10947b: 50 push %eax
10947c: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10947d: 83 ec 0c sub $0xc,%esp
109480: 8d 43 48 lea 0x48(%ebx),%eax
109483: 50 push %eax
109484: e8 4b 2e 00 00 call 10c2d4 <_Watchdog_Remove>
109489: 58 pop %eax
10948a: 5a pop %edx
10948b: 68 f8 ff 03 10 push $0x1003fff8
109490: 53 push %ebx
109491: e8 52 1e 00 00 call 10b2e8 <_Thread_Clear_state>
109496: 83 c4 10 add $0x10,%esp
109499: eb 02 jmp 10949d <_Event_Surrender+0xdd>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10949b: 50 push %eax
10949c: 9d popf
}
10949d: 8d 65 f4 lea -0xc(%ebp),%esp
1094a0: 5b pop %ebx
1094a1: 5e pop %esi
1094a2: 5f pop %edi
1094a3: c9 leave
1094a4: c3 ret
001094a8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
1094a8: 55 push %ebp
1094a9: 89 e5 mov %esp,%ebp
1094ab: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
1094ae: 8d 45 f4 lea -0xc(%ebp),%eax
1094b1: 50 push %eax
1094b2: ff 75 08 pushl 0x8(%ebp)
1094b5: e8 66 21 00 00 call 10b620 <_Thread_Get>
switch ( location ) {
1094ba: 83 c4 10 add $0x10,%esp
1094bd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1094c1: 75 49 jne 10950c <_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 );
1094c3: 9c pushf
1094c4: fa cli
1094c5: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
1094c6: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
1094cd: 3b 05 5c 34 12 00 cmp 0x12345c,%eax
1094d3: 75 13 jne 1094e8 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
1094d5: 8b 0d 90 34 12 00 mov 0x123490,%ecx
1094db: 49 dec %ecx
1094dc: 75 0a jne 1094e8 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
1094de: c7 05 90 34 12 00 02 movl $0x2,0x123490
1094e5: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
1094e8: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
1094ef: 52 push %edx
1094f0: 9d popf
1094f1: 52 push %edx
1094f2: 52 push %edx
1094f3: 68 f8 ff 03 10 push $0x1003fff8
1094f8: 50 push %eax
1094f9: e8 ea 1d 00 00 call 10b2e8 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
1094fe: a1 44 32 12 00 mov 0x123244,%eax
109503: 48 dec %eax
109504: a3 44 32 12 00 mov %eax,0x123244
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
109509: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10950c: c9 leave
10950d: c3 ret
0010ea57 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10ea57: 55 push %ebp
10ea58: 89 e5 mov %esp,%ebp
10ea5a: 57 push %edi
10ea5b: 56 push %esi
10ea5c: 53 push %ebx
10ea5d: 83 ec 4c sub $0x4c,%esp
10ea60: 8b 5d 08 mov 0x8(%ebp),%ebx
10ea63: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10ea66: 8b 43 20 mov 0x20(%ebx),%eax
10ea69: 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;
10ea6c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
10ea73: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
10ea7a: 8b 53 10 mov 0x10(%ebx),%edx
10ea7d: 89 55 c4 mov %edx,-0x3c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10ea80: 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;
10ea83: 8b 7b 30 mov 0x30(%ebx),%edi
10ea86: 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;
10ea89: 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 ) {
10ea8b: 8b 7d 0c mov 0xc(%ebp),%edi
10ea8e: 01 cf add %ecx,%edi
10ea90: 0f 82 d4 01 00 00 jb 10ec6a <_Heap_Extend+0x213>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
10ea96: 52 push %edx
10ea97: 52 push %edx
10ea98: 8d 55 e0 lea -0x20(%ebp),%edx
10ea9b: 52 push %edx
10ea9c: 8d 55 e4 lea -0x1c(%ebp),%edx
10ea9f: 52 push %edx
10eaa0: 50 push %eax
10eaa1: ff 75 c4 pushl -0x3c(%ebp)
10eaa4: 51 push %ecx
10eaa5: ff 75 0c pushl 0xc(%ebp)
10eaa8: e8 3a bd ff ff call 10a7e7 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10eaad: 83 c4 20 add $0x20,%esp
10eab0: 84 c0 test %al,%al
10eab2: 0f 84 b2 01 00 00 je 10ec6a <_Heap_Extend+0x213>
10eab8: 8b 4d c0 mov -0x40(%ebp),%ecx
10eabb: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10eac2: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10eac9: 31 f6 xor %esi,%esi
10eacb: 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;
10ead2: 8b 43 18 mov 0x18(%ebx),%eax
10ead5: 89 5d b8 mov %ebx,-0x48(%ebp)
10ead8: eb 02 jmp 10eadc <_Heap_Extend+0x85>
10eada: 89 c8 mov %ecx,%eax
uintptr_t const sub_area_end = start_block->prev_size;
10eadc: 8b 19 mov (%ecx),%ebx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10eade: 39 c7 cmp %eax,%edi
10eae0: 76 09 jbe 10eaeb <_Heap_Extend+0x94>
10eae2: 39 5d 0c cmp %ebx,0xc(%ebp)
10eae5: 0f 82 7d 01 00 00 jb 10ec68 <_Heap_Extend+0x211>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eaeb: 39 c7 cmp %eax,%edi
10eaed: 74 06 je 10eaf5 <_Heap_Extend+0x9e>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eaef: 39 df cmp %ebx,%edi
10eaf1: 72 07 jb 10eafa <_Heap_Extend+0xa3>
10eaf3: eb 08 jmp 10eafd <_Heap_Extend+0xa6>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10eaf5: 89 4d d0 mov %ecx,-0x30(%ebp)
10eaf8: eb 03 jmp 10eafd <_Heap_Extend+0xa6>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10eafa: 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);
10eafd: 8d 43 f8 lea -0x8(%ebx),%eax
10eb00: 89 45 d4 mov %eax,-0x2c(%ebp)
10eb03: 89 d8 mov %ebx,%eax
10eb05: 31 d2 xor %edx,%edx
10eb07: 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);
10eb0a: 29 55 d4 sub %edx,-0x2c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10eb0d: 3b 5d 0c cmp 0xc(%ebp),%ebx
10eb10: 75 07 jne 10eb19 <_Heap_Extend+0xc2>
start_block->prev_size = extend_area_end;
10eb12: 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 )
10eb14: 8b 75 d4 mov -0x2c(%ebp),%esi
10eb17: eb 08 jmp 10eb21 <_Heap_Extend+0xca>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10eb19: 73 06 jae 10eb21 <_Heap_Extend+0xca>
10eb1b: 8b 55 d4 mov -0x2c(%ebp),%edx
10eb1e: 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;
10eb21: 8b 45 d4 mov -0x2c(%ebp),%eax
10eb24: 8b 48 04 mov 0x4(%eax),%ecx
10eb27: 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);
10eb2a: 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 );
10eb2c: 3b 4d c0 cmp -0x40(%ebp),%ecx
10eb2f: 75 a9 jne 10eada <_Heap_Extend+0x83>
10eb31: 8b 5d b8 mov -0x48(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
10eb34: 8b 55 0c mov 0xc(%ebp),%edx
10eb37: 3b 53 18 cmp 0x18(%ebx),%edx
10eb3a: 73 05 jae 10eb41 <_Heap_Extend+0xea>
heap->area_begin = extend_area_begin;
10eb3c: 89 53 18 mov %edx,0x18(%ebx)
10eb3f: eb 08 jmp 10eb49 <_Heap_Extend+0xf2>
} else if ( heap->area_end < extend_area_end ) {
10eb41: 39 7b 1c cmp %edi,0x1c(%ebx)
10eb44: 73 03 jae 10eb49 <_Heap_Extend+0xf2>
heap->area_end = extend_area_end;
10eb46: 89 7b 1c mov %edi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10eb49: 8b 45 e0 mov -0x20(%ebp),%eax
10eb4c: 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 =
10eb4f: 89 c1 mov %eax,%ecx
10eb51: 29 d1 sub %edx,%ecx
10eb53: 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;
10eb56: 89 3a mov %edi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10eb58: 83 c9 01 or $0x1,%ecx
10eb5b: 89 4a 04 mov %ecx,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10eb5e: 8b 4d d4 mov -0x2c(%ebp),%ecx
10eb61: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10eb63: 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 ) {
10eb6a: 39 53 20 cmp %edx,0x20(%ebx)
10eb6d: 76 05 jbe 10eb74 <_Heap_Extend+0x11d>
heap->first_block = extend_first_block;
10eb6f: 89 53 20 mov %edx,0x20(%ebx)
10eb72: eb 08 jmp 10eb7c <_Heap_Extend+0x125>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10eb74: 39 43 24 cmp %eax,0x24(%ebx)
10eb77: 73 03 jae 10eb7c <_Heap_Extend+0x125>
heap->last_block = extend_last_block;
10eb79: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10eb7c: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10eb80: 74 3b je 10ebbd <_Heap_Extend+0x166>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10eb82: 8b 43 10 mov 0x10(%ebx),%eax
10eb85: 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 );
10eb88: 8b 4d 0c mov 0xc(%ebp),%ecx
10eb8b: 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;
10eb8e: 89 c8 mov %ecx,%eax
10eb90: 31 d2 xor %edx,%edx
10eb92: f7 75 d4 divl -0x2c(%ebp)
if ( remainder != 0 ) {
10eb95: 85 d2 test %edx,%edx
10eb97: 74 05 je 10eb9e <_Heap_Extend+0x147>
return value - remainder + alignment;
10eb99: 03 4d d4 add -0x2c(%ebp),%ecx
10eb9c: 29 d1 sub %edx,%ecx
uintptr_t const new_first_block_begin =
10eb9e: 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;
10eba1: 8b 45 d0 mov -0x30(%ebp),%eax
10eba4: 8b 00 mov (%eax),%eax
10eba6: 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 =
10eba9: 8b 45 d0 mov -0x30(%ebp),%eax
10ebac: 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;
10ebae: 83 c8 01 or $0x1,%eax
10ebb1: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10ebb4: 89 d8 mov %ebx,%eax
10ebb6: e8 81 fe ff ff call 10ea3c <_Heap_Free_block>
10ebbb: eb 14 jmp 10ebd1 <_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 ) {
10ebbd: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10ebc1: 74 0e je 10ebd1 <_Heap_Extend+0x17a>
_Heap_Link_below(
10ebc3: 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;
10ebc6: 8b 45 c8 mov -0x38(%ebp),%eax
10ebc9: 29 d0 sub %edx,%eax
10ebcb: 83 c8 01 or $0x1,%eax
10ebce: 89 42 04 mov %eax,0x4(%edx)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10ebd1: 85 f6 test %esi,%esi
10ebd3: 74 30 je 10ec05 <_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,
10ebd5: 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(
10ebd8: 29 f7 sub %esi,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10ebda: 89 f8 mov %edi,%eax
10ebdc: 31 d2 xor %edx,%edx
10ebde: f7 73 10 divl 0x10(%ebx)
10ebe1: 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)
10ebe3: 8b 46 04 mov 0x4(%esi),%eax
10ebe6: 29 f8 sub %edi,%eax
| HEAP_PREV_BLOCK_USED;
10ebe8: 83 c8 01 or $0x1,%eax
10ebeb: 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;
10ebef: 8b 46 04 mov 0x4(%esi),%eax
10ebf2: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10ebf5: 09 f8 or %edi,%eax
10ebf7: 89 46 04 mov %eax,0x4(%esi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10ebfa: 89 f2 mov %esi,%edx
10ebfc: 89 d8 mov %ebx,%eax
10ebfe: e8 39 fe ff ff call 10ea3c <_Heap_Free_block>
10ec03: eb 21 jmp 10ec26 <_Heap_Extend+0x1cf>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10ec05: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10ec09: 74 1b je 10ec26 <_Heap_Extend+0x1cf>
_Heap_Link_above(
10ec0b: 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 );
10ec0e: 8b 45 e4 mov -0x1c(%ebp),%eax
10ec11: 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;
10ec14: 8b 7d cc mov -0x34(%ebp),%edi
10ec17: 8b 57 04 mov 0x4(%edi),%edx
10ec1a: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
10ec1d: 09 d0 or %edx,%eax
10ec1f: 89 47 04 mov %eax,0x4(%edi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10ec22: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10ec26: 85 f6 test %esi,%esi
10ec28: 75 10 jne 10ec3a <_Heap_Extend+0x1e3>
10ec2a: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10ec2e: 75 0a jne 10ec3a <_Heap_Extend+0x1e3>
_Heap_Free_block( heap, extend_first_block );
10ec30: 8b 55 e4 mov -0x1c(%ebp),%edx
10ec33: 89 d8 mov %ebx,%eax
10ec35: e8 02 fe ff ff call 10ea3c <_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
10ec3a: 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(
10ec3d: 8b 43 20 mov 0x20(%ebx),%eax
10ec40: 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;
10ec42: 8b 4a 04 mov 0x4(%edx),%ecx
10ec45: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
10ec48: 09 c8 or %ecx,%eax
10ec4a: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10ec4d: 8b 43 30 mov 0x30(%ebx),%eax
10ec50: 2b 45 bc sub -0x44(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10ec53: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
10ec56: 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 )
10ec5b: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10ec5f: 74 09 je 10ec6a <_Heap_Extend+0x213> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10ec61: 8b 55 14 mov 0x14(%ebp),%edx
10ec64: 89 02 mov %eax,(%edx)
10ec66: eb 02 jmp 10ec6a <_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;
10ec68: 31 f6 xor %esi,%esi
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
10ec6a: 89 f0 mov %esi,%eax
10ec6c: 8d 65 f4 lea -0xc(%ebp),%esp
10ec6f: 5b pop %ebx
10ec70: 5e pop %esi
10ec71: 5f pop %edi
10ec72: c9 leave
10ec73: c3 ret
0010e70c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10e70c: 55 push %ebp
10e70d: 89 e5 mov %esp,%ebp
10e70f: 57 push %edi
10e710: 56 push %esi
10e711: 53 push %ebx
10e712: 83 ec 14 sub $0x14,%esp
10e715: 8b 4d 08 mov 0x8(%ebp),%ecx
10e718: 8b 55 0c mov 0xc(%ebp),%edx
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
10e71b: b0 01 mov $0x1,%al
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
10e71d: 85 d2 test %edx,%edx
10e71f: 0f 84 4b 01 00 00 je 10e870 <_Heap_Free+0x164>
10e725: 8d 5a f8 lea -0x8(%edx),%ebx
10e728: 89 d0 mov %edx,%eax
10e72a: 31 d2 xor %edx,%edx
10e72c: 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);
10e72f: 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
10e731: 8b 41 20 mov 0x20(%ecx),%eax
10e734: 89 45 ec mov %eax,-0x14(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10e737: 31 d2 xor %edx,%edx
10e739: 39 c3 cmp %eax,%ebx
10e73b: 72 08 jb 10e745 <_Heap_Free+0x39>
10e73d: 31 d2 xor %edx,%edx
10e73f: 39 59 24 cmp %ebx,0x24(%ecx)
10e742: 0f 93 c2 setae %dl
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10e745: 31 c0 xor %eax,%eax
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10e747: 85 d2 test %edx,%edx
10e749: 0f 84 21 01 00 00 je 10e870 <_Heap_Free+0x164>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10e74f: 8b 43 04 mov 0x4(%ebx),%eax
10e752: 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;
10e755: 89 c6 mov %eax,%esi
10e757: 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);
10e75a: 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;
10e75d: 31 ff xor %edi,%edi
10e75f: 3b 55 ec cmp -0x14(%ebp),%edx
10e762: 72 0a jb 10e76e <_Heap_Free+0x62> <== NEVER TAKEN
10e764: 31 c0 xor %eax,%eax
10e766: 39 51 24 cmp %edx,0x24(%ecx)
10e769: 0f 93 c0 setae %al
10e76c: 89 c7 mov %eax,%edi
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
return false;
10e76e: 31 c0 xor %eax,%eax
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10e770: 85 ff test %edi,%edi
10e772: 0f 84 f8 00 00 00 je 10e870 <_Heap_Free+0x164> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10e778: 8b 7a 04 mov 0x4(%edx),%edi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
10e77b: f7 c7 01 00 00 00 test $0x1,%edi
10e781: 0f 84 e9 00 00 00 je 10e870 <_Heap_Free+0x164> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10e787: 83 e7 fe and $0xfffffffe,%edi
10e78a: 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
10e78d: 8b 41 24 mov 0x24(%ecx),%eax
10e790: 89 45 e4 mov %eax,-0x1c(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10e793: 31 c0 xor %eax,%eax
10e795: 3b 55 e4 cmp -0x1c(%ebp),%edx
10e798: 74 0a je 10e7a4 <_Heap_Free+0x98>
10e79a: 31 c0 xor %eax,%eax
10e79c: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
10e7a1: 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
10e7a4: 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 ) ) {
10e7a7: f6 45 f0 01 testb $0x1,-0x10(%ebp)
10e7ab: 75 62 jne 10e80f <_Heap_Free+0x103>
uintptr_t const prev_size = block->prev_size;
10e7ad: 8b 03 mov (%ebx),%eax
10e7af: 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);
10e7b2: 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;
10e7b4: 31 ff xor %edi,%edi
10e7b6: 3b 5d ec cmp -0x14(%ebp),%ebx
10e7b9: 72 0a jb 10e7c5 <_Heap_Free+0xb9> <== NEVER TAKEN
10e7bb: 31 c0 xor %eax,%eax
10e7bd: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10e7c0: 0f 93 c0 setae %al
10e7c3: 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 );
10e7c5: 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 ) ) {
10e7c7: 85 ff test %edi,%edi
10e7c9: 0f 84 a1 00 00 00 je 10e870 <_Heap_Free+0x164> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
10e7cf: f6 43 04 01 testb $0x1,0x4(%ebx)
10e7d3: 0f 84 97 00 00 00 je 10e870 <_Heap_Free+0x164> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10e7d9: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10e7dd: 74 1a je 10e7f9 <_Heap_Free+0xed>
uintptr_t const size = block_size + prev_size + next_block_size;
10e7df: 8b 45 e8 mov -0x18(%ebp),%eax
10e7e2: 8d 04 06 lea (%esi,%eax,1),%eax
10e7e5: 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;
10e7e8: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = block->prev;
10e7eb: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10e7ee: 89 7a 08 mov %edi,0x8(%edx)
next->prev = prev;
10e7f1: 89 57 0c mov %edx,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10e7f4: ff 49 38 decl 0x38(%ecx)
10e7f7: eb 33 jmp 10e82c <_Heap_Free+0x120>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
10e7f9: 8b 45 f0 mov -0x10(%ebp),%eax
10e7fc: 8d 04 06 lea (%esi,%eax,1),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10e7ff: 89 c7 mov %eax,%edi
10e801: 83 cf 01 or $0x1,%edi
10e804: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10e807: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10e80b: 89 02 mov %eax,(%edx)
10e80d: eb 56 jmp 10e865 <_Heap_Free+0x159>
}
} else if ( next_is_free ) { /* coalesce next */
10e80f: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10e813: 74 24 je 10e839 <_Heap_Free+0x12d>
uintptr_t const size = block_size + next_block_size;
10e815: 8b 45 e8 mov -0x18(%ebp),%eax
10e818: 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;
10e81a: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = old_block->prev;
10e81d: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10e820: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10e823: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10e826: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10e829: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10e82c: 89 c2 mov %eax,%edx
10e82e: 83 ca 01 or $0x1,%edx
10e831: 89 53 04 mov %edx,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10e834: 89 04 03 mov %eax,(%ebx,%eax,1)
10e837: eb 2c jmp 10e865 <_Heap_Free+0x159>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10e839: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10e83c: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10e83f: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10e842: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10e845: 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;
10e848: 89 f0 mov %esi,%eax
10e84a: 83 c8 01 or $0x1,%eax
10e84d: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10e850: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10e854: 89 32 mov %esi,(%edx)
/* Statistics */
++stats->free_blocks;
10e856: 8b 41 38 mov 0x38(%ecx),%eax
10e859: 40 inc %eax
10e85a: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10e85d: 39 41 3c cmp %eax,0x3c(%ecx)
10e860: 73 03 jae 10e865 <_Heap_Free+0x159>
stats->max_free_blocks = stats->free_blocks;
10e862: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10e865: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10e868: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10e86b: 01 71 30 add %esi,0x30(%ecx)
return( true );
10e86e: b0 01 mov $0x1,%al
}
10e870: 83 c4 14 add $0x14,%esp
10e873: 5b pop %ebx
10e874: 5e pop %esi
10e875: 5f pop %edi
10e876: c9 leave
10e877: c3 ret
0011c048 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
11c048: 55 push %ebp
11c049: 89 e5 mov %esp,%ebp
11c04b: 57 push %edi
11c04c: 56 push %esi
11c04d: 53 push %ebx
11c04e: 83 ec 2c sub $0x2c,%esp
11c051: 8b 5d 08 mov 0x8(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11c054: 8b 4d 0c mov 0xc(%ebp),%ecx
11c057: 83 e9 08 sub $0x8,%ecx
11c05a: 8b 45 0c mov 0xc(%ebp),%eax
11c05d: 31 d2 xor %edx,%edx
11c05f: 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);
11c062: 29 d1 sub %edx,%ecx
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
11c064: 8b 45 14 mov 0x14(%ebp),%eax
11c067: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
11c06d: 8b 55 18 mov 0x18(%ebp),%edx
11c070: c7 02 00 00 00 00 movl $0x0,(%edx)
new_alloc_size,
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
11c076: b8 02 00 00 00 mov $0x2,%eax
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;
11c07b: 39 4b 20 cmp %ecx,0x20(%ebx)
11c07e: 0f 87 a4 00 00 00 ja 11c128 <_Heap_Resize_block+0xe0>
11c084: 39 4b 24 cmp %ecx,0x24(%ebx)
11c087: 0f 82 9b 00 00 00 jb 11c128 <_Heap_Resize_block+0xe0><== 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;
11c08d: 8b 51 04 mov 0x4(%ecx),%edx
11c090: 83 e2 fe and $0xfffffffe,%edx
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
11c093: 8d 3c 11 lea (%ecx,%edx,1),%edi
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
11c096: 89 f8 mov %edi,%eax
11c098: 2b 45 0c sub 0xc(%ebp),%eax
11c09b: 83 c0 04 add $0x4,%eax
11c09e: 89 45 e4 mov %eax,-0x1c(%ebp)
11c0a1: 8b 77 04 mov 0x4(%edi),%esi
11c0a4: 83 e6 fe and $0xfffffffe,%esi
11c0a7: 89 75 d4 mov %esi,-0x2c(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
11c0aa: f6 44 37 04 01 testb $0x1,0x4(%edi,%esi,1)
11c0af: 0f 94 45 e3 sete -0x1d(%ebp)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
11c0b3: 8b 75 14 mov 0x14(%ebp),%esi
11c0b6: 89 06 mov %eax,(%esi)
if ( next_block_is_free ) {
11c0b8: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
11c0bc: 74 0b je 11c0c9 <_Heap_Resize_block+0x81>
block_size += next_block_size;
11c0be: 03 55 d4 add -0x2c(%ebp),%edx
alloc_size += next_block_size;
11c0c1: 8b 75 d4 mov -0x2c(%ebp),%esi
11c0c4: 01 f0 add %esi,%eax
11c0c6: 89 45 e4 mov %eax,-0x1c(%ebp)
}
if ( new_alloc_size > alloc_size ) {
return HEAP_RESIZE_UNSATISFIED;
11c0c9: b8 01 00 00 00 mov $0x1,%eax
if ( next_block_is_free ) {
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
11c0ce: 8b 75 e4 mov -0x1c(%ebp),%esi
11c0d1: 39 75 10 cmp %esi,0x10(%ebp)
11c0d4: 77 52 ja 11c128 <_Heap_Resize_block+0xe0>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
11c0d6: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
11c0da: 74 25 je 11c101 <_Heap_Resize_block+0xb9>
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;
11c0dc: 8b 41 04 mov 0x4(%ecx),%eax
11c0df: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
11c0e2: 09 d0 or %edx,%eax
11c0e4: 89 41 04 mov %eax,0x4(%ecx)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
11c0e7: 8b 47 08 mov 0x8(%edi),%eax
Heap_Block *prev = block->prev;
11c0ea: 8b 7f 0c mov 0xc(%edi),%edi
prev->next = next;
11c0ed: 89 47 08 mov %eax,0x8(%edi)
next->prev = prev;
11c0f0: 89 78 0c mov %edi,0xc(%eax)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
11c0f3: 83 4c 11 04 01 orl $0x1,0x4(%ecx,%edx,1)
/* Statistics */
--stats->free_blocks;
11c0f8: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
11c0fb: 8b 45 d4 mov -0x2c(%ebp),%eax
11c0fe: 29 43 30 sub %eax,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
11c101: ff 75 10 pushl 0x10(%ebp)
11c104: ff 75 0c pushl 0xc(%ebp)
11c107: 51 push %ecx
11c108: 53 push %ebx
11c109: e8 d8 e4 fe ff call 10a5e6 <_Heap_Block_allocate>
- 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;
11c10e: 8b 50 04 mov 0x4(%eax),%edx
11c111: 83 e2 fe and $0xfffffffe,%edx
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
11c114: 2b 45 0c sub 0xc(%ebp),%eax
11c117: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
11c11b: 8b 55 18 mov 0x18(%ebp),%edx
11c11e: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
11c120: ff 43 54 incl 0x54(%ebx)
11c123: 83 c4 10 add $0x10,%esp
return HEAP_RESIZE_SUCCESSFUL;
11c126: 31 c0 xor %eax,%eax
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
11c128: 8d 65 f4 lea -0xc(%ebp),%esp
11c12b: 5b pop %ebx
11c12c: 5e pop %esi
11c12d: 5f pop %edi
11c12e: c9 leave
11c12f: c3 ret
0011c130 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11c130: 55 push %ebp
11c131: 89 e5 mov %esp,%ebp
11c133: 57 push %edi
11c134: 56 push %esi
11c135: 53 push %ebx
11c136: 8b 5d 08 mov 0x8(%ebp),%ebx
11c139: 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);
11c13c: 8d 4e f8 lea -0x8(%esi),%ecx
11c13f: 89 f0 mov %esi,%eax
11c141: 31 d2 xor %edx,%edx
11c143: 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);
11c146: 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
11c148: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11c14b: 31 ff xor %edi,%edi
11c14d: 39 d1 cmp %edx,%ecx
11c14f: 72 0a jb 11c15b <_Heap_Size_of_alloc_area+0x2b>
11c151: 31 c0 xor %eax,%eax
11c153: 39 4b 24 cmp %ecx,0x24(%ebx)
11c156: 0f 93 c0 setae %al
11c159: 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;
11c15b: 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 ) ) {
11c15d: 85 ff test %edi,%edi
11c15f: 74 30 je 11c191 <_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;
11c161: 8b 41 04 mov 0x4(%ecx),%eax
11c164: 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);
11c167: 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;
11c169: 31 ff xor %edi,%edi
11c16b: 39 d1 cmp %edx,%ecx
11c16d: 72 0a jb 11c179 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
11c16f: 31 c0 xor %eax,%eax
11c171: 39 4b 24 cmp %ecx,0x24(%ebx)
11c174: 0f 93 c0 setae %al
11c177: 89 c7 mov %eax,%edi
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11c179: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11c17b: 85 ff test %edi,%edi
11c17d: 74 12 je 11c191 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11c17f: f6 41 04 01 testb $0x1,0x4(%ecx)
11c183: 74 0c je 11c191 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11c185: 29 f1 sub %esi,%ecx
11c187: 8d 51 04 lea 0x4(%ecx),%edx
11c18a: 8b 45 10 mov 0x10(%ebp),%eax
11c18d: 89 10 mov %edx,(%eax)
return true;
11c18f: b0 01 mov $0x1,%al
}
11c191: 5b pop %ebx
11c192: 5e pop %esi
11c193: 5f pop %edi
11c194: c9 leave
11c195: c3 ret
0010b0de <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b0de: 55 push %ebp
10b0df: 89 e5 mov %esp,%ebp
10b0e1: 57 push %edi
10b0e2: 56 push %esi
10b0e3: 53 push %ebx
10b0e4: 83 ec 4c sub $0x4c,%esp
10b0e7: 8b 75 08 mov 0x8(%ebp),%esi
10b0ea: 8b 5d 0c mov 0xc(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10b0ed: 8b 46 10 mov 0x10(%esi),%eax
10b0f0: 89 45 d8 mov %eax,-0x28(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10b0f3: 8b 4e 14 mov 0x14(%esi),%ecx
10b0f6: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *const first_block = heap->first_block;
10b0f9: 8b 46 20 mov 0x20(%esi),%eax
10b0fc: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_block = heap->last_block;
10b0ff: 8b 4e 24 mov 0x24(%esi),%ecx
10b102: 89 4d c8 mov %ecx,-0x38(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b105: c7 45 e4 a0 b0 10 00 movl $0x10b0a0,-0x1c(%ebp)
10b10c: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b110: 74 07 je 10b119 <_Heap_Walk+0x3b>
10b112: c7 45 e4 a5 b0 10 00 movl $0x10b0a5,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
10b119: 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() ) ) {
10b11b: 83 3d 44 64 12 00 03 cmpl $0x3,0x126444
10b122: 0f 85 e8 02 00 00 jne 10b410 <_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)(
10b128: 52 push %edx
10b129: ff 76 0c pushl 0xc(%esi)
10b12c: ff 76 08 pushl 0x8(%esi)
10b12f: ff 75 c8 pushl -0x38(%ebp)
10b132: ff 75 d0 pushl -0x30(%ebp)
10b135: ff 76 1c pushl 0x1c(%esi)
10b138: ff 76 18 pushl 0x18(%esi)
10b13b: ff 75 d4 pushl -0x2c(%ebp)
10b13e: ff 75 d8 pushl -0x28(%ebp)
10b141: 68 4d eb 11 00 push $0x11eb4d
10b146: 6a 00 push $0x0
10b148: 53 push %ebx
10b149: 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 ) {
10b14c: 83 c4 30 add $0x30,%esp
10b14f: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10b153: 75 0b jne 10b160 <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10b155: 50 push %eax
10b156: 68 de eb 11 00 push $0x11ebde
10b15b: e9 6b 02 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b160: f6 45 d8 03 testb $0x3,-0x28(%ebp)
10b164: 74 0d je 10b173 <_Heap_Walk+0x95>
(*printer)(
10b166: ff 75 d8 pushl -0x28(%ebp)
10b169: 68 f1 eb 11 00 push $0x11ebf1
10b16e: e9 58 02 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b173: 8b 45 d4 mov -0x2c(%ebp),%eax
10b176: 31 d2 xor %edx,%edx
10b178: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b17b: 85 d2 test %edx,%edx
10b17d: 74 0d je 10b18c <_Heap_Walk+0xae>
(*printer)(
10b17f: ff 75 d4 pushl -0x2c(%ebp)
10b182: 68 0f ec 11 00 push $0x11ec0f
10b187: e9 3f 02 00 00 jmp 10b3cb <_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;
10b18c: 8b 45 d0 mov -0x30(%ebp),%eax
10b18f: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b192: 31 d2 xor %edx,%edx
10b194: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if (
10b197: 85 d2 test %edx,%edx
10b199: 74 0d je 10b1a8 <_Heap_Walk+0xca>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10b19b: ff 75 d0 pushl -0x30(%ebp)
10b19e: 68 33 ec 11 00 push $0x11ec33
10b1a3: e9 23 02 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10b1a8: 8b 45 d0 mov -0x30(%ebp),%eax
10b1ab: f6 40 04 01 testb $0x1,0x4(%eax)
10b1af: 75 0b jne 10b1bc <_Heap_Walk+0xde>
(*printer)(
10b1b1: 57 push %edi
10b1b2: 68 64 ec 11 00 push $0x11ec64
10b1b7: e9 0f 02 00 00 jmp 10b3cb <_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;
10b1bc: 8b 4d c8 mov -0x38(%ebp),%ecx
10b1bf: 8b 79 04 mov 0x4(%ecx),%edi
10b1c2: 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);
10b1c5: 01 cf add %ecx,%edi
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10b1c7: f6 47 04 01 testb $0x1,0x4(%edi)
10b1cb: 75 0b jne 10b1d8 <_Heap_Walk+0xfa>
(*printer)(
10b1cd: 56 push %esi
10b1ce: 68 92 ec 11 00 push $0x11ec92
10b1d3: e9 f3 01 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
);
return false;
}
if (
10b1d8: 3b 7d d0 cmp -0x30(%ebp),%edi
10b1db: 74 0b je 10b1e8 <_Heap_Walk+0x10a>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10b1dd: 51 push %ecx
10b1de: 68 a7 ec 11 00 push $0x11eca7
10b1e3: e9 e3 01 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10b1e8: 8b 46 10 mov 0x10(%esi),%eax
10b1eb: 89 45 e0 mov %eax,-0x20(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10b1ee: 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 );
10b1f1: 89 75 dc mov %esi,-0x24(%ebp)
10b1f4: eb 75 jmp 10b26b <_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;
10b1f6: 31 c0 xor %eax,%eax
10b1f8: 39 4e 20 cmp %ecx,0x20(%esi)
10b1fb: 77 08 ja 10b205 <_Heap_Walk+0x127>
10b1fd: 31 c0 xor %eax,%eax
10b1ff: 39 4e 24 cmp %ecx,0x24(%esi)
10b202: 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 ) ) {
10b205: 85 c0 test %eax,%eax
10b207: 75 0b jne 10b214 <_Heap_Walk+0x136>
(*printer)(
10b209: 51 push %ecx
10b20a: 68 d6 ec 11 00 push $0x11ecd6
10b20f: e9 b7 01 00 00 jmp 10b3cb <_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;
10b214: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b217: 31 d2 xor %edx,%edx
10b219: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10b21c: 85 d2 test %edx,%edx
10b21e: 74 0b je 10b22b <_Heap_Walk+0x14d>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10b220: 51 push %ecx
10b221: 68 f6 ec 11 00 push $0x11ecf6
10b226: e9 a0 01 00 00 jmp 10b3cb <_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;
10b22b: 8b 41 04 mov 0x4(%ecx),%eax
10b22e: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10b231: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10b236: 74 0b je 10b243 <_Heap_Walk+0x165>
(*printer)(
10b238: 51 push %ecx
10b239: 68 26 ed 11 00 push $0x11ed26
10b23e: e9 88 01 00 00 jmp 10b3cb <_Heap_Walk+0x2ed>
);
return false;
}
if ( free_block->prev != prev_block ) {
10b243: 8b 41 0c mov 0xc(%ecx),%eax
10b246: 3b 45 dc cmp -0x24(%ebp),%eax
10b249: 74 1a je 10b265 <_Heap_Walk+0x187>
(*printer)(
10b24b: 83 ec 0c sub $0xc,%esp
10b24e: 50 push %eax
10b24f: 51 push %ecx
10b250: 68 42 ed 11 00 push $0x11ed42
10b255: 6a 01 push $0x1
10b257: 53 push %ebx
10b258: ff 55 e4 call *-0x1c(%ebp)
10b25b: 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;
10b25e: 31 c0 xor %eax,%eax
10b260: e9 ab 01 00 00 jmp 10b410 <_Heap_Walk+0x332>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10b265: 89 4d dc mov %ecx,-0x24(%ebp)
10b268: 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 ) {
10b26b: 39 f1 cmp %esi,%ecx
10b26d: 75 87 jne 10b1f6 <_Heap_Walk+0x118>
10b26f: 89 5d dc mov %ebx,-0x24(%ebp)
10b272: eb 02 jmp 10b276 <_Heap_Walk+0x198>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b274: 89 df mov %ebx,%edi
return true;
}
10b276: 8b 4f 04 mov 0x4(%edi),%ecx
10b279: 89 4d cc mov %ecx,-0x34(%ebp)
10b27c: 83 e1 fe and $0xfffffffe,%ecx
10b27f: 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);
10b282: 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;
10b285: 31 c0 xor %eax,%eax
10b287: 39 5e 20 cmp %ebx,0x20(%esi)
10b28a: 77 08 ja 10b294 <_Heap_Walk+0x1b6> <== NEVER TAKEN
10b28c: 31 c0 xor %eax,%eax
10b28e: 39 5e 24 cmp %ebx,0x24(%esi)
10b291: 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 ) ) {
10b294: 85 c0 test %eax,%eax
10b296: 75 11 jne 10b2a9 <_Heap_Walk+0x1cb>
10b298: 89 d9 mov %ebx,%ecx
10b29a: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b29d: 83 ec 0c sub $0xc,%esp
10b2a0: 51 push %ecx
10b2a1: 57 push %edi
10b2a2: 68 74 ed 11 00 push $0x11ed74
10b2a7: eb ac jmp 10b255 <_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;
10b2a9: 3b 7d c8 cmp -0x38(%ebp),%edi
10b2ac: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b2af: 8b 45 e0 mov -0x20(%ebp),%eax
10b2b2: 31 d2 xor %edx,%edx
10b2b4: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10b2b7: 85 d2 test %edx,%edx
10b2b9: 74 15 je 10b2d0 <_Heap_Walk+0x1f2>
10b2bb: 84 c9 test %cl,%cl
10b2bd: 74 11 je 10b2d0 <_Heap_Walk+0x1f2>
10b2bf: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b2c2: 83 ec 0c sub $0xc,%esp
10b2c5: ff 75 e0 pushl -0x20(%ebp)
10b2c8: 57 push %edi
10b2c9: 68 a1 ed 11 00 push $0x11eda1
10b2ce: eb 85 jmp 10b255 <_Heap_Walk+0x177>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10b2d0: 8b 45 d4 mov -0x2c(%ebp),%eax
10b2d3: 39 45 e0 cmp %eax,-0x20(%ebp)
10b2d6: 73 18 jae 10b2f0 <_Heap_Walk+0x212>
10b2d8: 84 c9 test %cl,%cl
10b2da: 74 14 je 10b2f0 <_Heap_Walk+0x212> <== NEVER TAKEN
10b2dc: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b2df: 52 push %edx
10b2e0: 52 push %edx
10b2e1: 50 push %eax
10b2e2: ff 75 e0 pushl -0x20(%ebp)
10b2e5: 57 push %edi
10b2e6: 68 cf ed 11 00 push $0x11edcf
10b2eb: e9 65 ff ff ff jmp 10b255 <_Heap_Walk+0x177>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10b2f0: 39 fb cmp %edi,%ebx
10b2f2: 77 18 ja 10b30c <_Heap_Walk+0x22e>
10b2f4: 84 c9 test %cl,%cl
10b2f6: 74 14 je 10b30c <_Heap_Walk+0x22e>
10b2f8: 89 d9 mov %ebx,%ecx
10b2fa: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b2fd: 83 ec 0c sub $0xc,%esp
10b300: 51 push %ecx
10b301: 57 push %edi
10b302: 68 fa ed 11 00 push $0x11edfa
10b307: e9 49 ff ff ff jmp 10b255 <_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;
10b30c: 8b 4d cc mov -0x34(%ebp),%ecx
10b30f: 83 e1 01 and $0x1,%ecx
10b312: 89 4d c4 mov %ecx,-0x3c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10b315: f6 43 04 01 testb $0x1,0x4(%ebx)
10b319: 0f 85 ba 00 00 00 jne 10b3d9 <_Heap_Walk+0x2fb>
block = next_block;
} while ( block != first_block );
return true;
}
10b31f: 8b 46 08 mov 0x8(%esi),%eax
10b322: 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 ?
10b325: 8b 4f 08 mov 0x8(%edi),%ecx
10b328: 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)(
10b32b: ba 1a eb 11 00 mov $0x11eb1a,%edx
10b330: 3b 4e 0c cmp 0xc(%esi),%ecx
10b333: 74 0e je 10b343 <_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)" : "")
10b335: ba 65 ea 11 00 mov $0x11ea65,%edx
10b33a: 39 f1 cmp %esi,%ecx
10b33c: 75 05 jne 10b343 <_Heap_Walk+0x265>
10b33e: ba 29 eb 11 00 mov $0x11eb29,%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 ?
10b343: 8b 47 0c mov 0xc(%edi),%eax
10b346: 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)(
10b349: b8 33 eb 11 00 mov $0x11eb33,%eax
10b34e: 8b 4d c0 mov -0x40(%ebp),%ecx
10b351: 39 4d cc cmp %ecx,-0x34(%ebp)
10b354: 74 0f je 10b365 <_Heap_Walk+0x287>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10b356: b8 65 ea 11 00 mov $0x11ea65,%eax
10b35b: 39 75 cc cmp %esi,-0x34(%ebp)
10b35e: 75 05 jne 10b365 <_Heap_Walk+0x287>
10b360: b8 43 eb 11 00 mov $0x11eb43,%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)(
10b365: 83 ec 0c sub $0xc,%esp
10b368: 52 push %edx
10b369: ff 75 b4 pushl -0x4c(%ebp)
10b36c: 50 push %eax
10b36d: ff 75 cc pushl -0x34(%ebp)
10b370: ff 75 e0 pushl -0x20(%ebp)
10b373: 57 push %edi
10b374: 68 2e ee 11 00 push $0x11ee2e
10b379: 6a 00 push $0x0
10b37b: ff 75 dc pushl -0x24(%ebp)
10b37e: 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 ) {
10b381: 8b 03 mov (%ebx),%eax
10b383: 83 c4 30 add $0x30,%esp
10b386: 39 45 e0 cmp %eax,-0x20(%ebp)
10b389: 74 16 je 10b3a1 <_Heap_Walk+0x2c3>
10b38b: 89 d9 mov %ebx,%ecx
10b38d: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b390: 56 push %esi
10b391: 51 push %ecx
10b392: 50 push %eax
10b393: ff 75 e0 pushl -0x20(%ebp)
10b396: 57 push %edi
10b397: 68 63 ee 11 00 push $0x11ee63
10b39c: e9 b4 fe ff ff jmp 10b255 <_Heap_Walk+0x177>
);
return false;
}
if ( !prev_used ) {
10b3a1: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b3a5: 75 0b jne 10b3b2 <_Heap_Walk+0x2d4>
10b3a7: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b3aa: 57 push %edi
10b3ab: 68 9c ee 11 00 push $0x11ee9c
10b3b0: eb 19 jmp 10b3cb <_Heap_Walk+0x2ed>
block = next_block;
} while ( block != first_block );
return true;
}
10b3b2: 8b 46 08 mov 0x8(%esi),%eax
10b3b5: eb 07 jmp 10b3be <_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 ) {
10b3b7: 39 f8 cmp %edi,%eax
10b3b9: 74 4a je 10b405 <_Heap_Walk+0x327>
return true;
}
free_block = free_block->next;
10b3bb: 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 ) {
10b3be: 39 f0 cmp %esi,%eax
10b3c0: 75 f5 jne 10b3b7 <_Heap_Walk+0x2d9>
10b3c2: 8b 5d dc mov -0x24(%ebp),%ebx
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10b3c5: 57 push %edi
10b3c6: 68 07 ef 11 00 push $0x11ef07
10b3cb: 6a 01 push $0x1
10b3cd: 53 push %ebx
10b3ce: ff 55 e4 call *-0x1c(%ebp)
10b3d1: 83 c4 10 add $0x10,%esp
10b3d4: e9 85 fe ff ff jmp 10b25e <_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) {
10b3d9: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b3dd: 74 0e je 10b3ed <_Heap_Walk+0x30f>
(*printer)(
10b3df: 83 ec 0c sub $0xc,%esp
10b3e2: ff 75 e0 pushl -0x20(%ebp)
10b3e5: 57 push %edi
10b3e6: 68 cb ee 11 00 push $0x11eecb
10b3eb: eb 0d jmp 10b3fa <_Heap_Walk+0x31c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10b3ed: 51 push %ecx
10b3ee: 51 push %ecx
10b3ef: ff 37 pushl (%edi)
10b3f1: ff 75 e0 pushl -0x20(%ebp)
10b3f4: 57 push %edi
10b3f5: 68 e2 ee 11 00 push $0x11eee2
10b3fa: 6a 00 push $0x0
10b3fc: ff 75 dc pushl -0x24(%ebp)
10b3ff: ff 55 e4 call *-0x1c(%ebp)
10b402: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b405: 3b 5d d0 cmp -0x30(%ebp),%ebx
10b408: 0f 85 66 fe ff ff jne 10b274 <_Heap_Walk+0x196>
return true;
10b40e: b0 01 mov $0x1,%al
}
10b410: 8d 65 f4 lea -0xc(%ebp),%esp
10b413: 5b pop %ebx
10b414: 5e pop %esi
10b415: 5f pop %edi
10b416: c9 leave
10b417: c3 ret
0010a6c4 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10a6c4: 55 push %ebp
10a6c5: 89 e5 mov %esp,%ebp
10a6c7: 53 push %ebx
10a6c8: 83 ec 08 sub $0x8,%esp
10a6cb: 8b 45 08 mov 0x8(%ebp),%eax
10a6ce: 8b 55 0c mov 0xc(%ebp),%edx
10a6d1: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10a6d4: a3 d8 32 12 00 mov %eax,0x1232d8
_Internal_errors_What_happened.is_internal = is_internal;
10a6d9: 88 15 dc 32 12 00 mov %dl,0x1232dc
_Internal_errors_What_happened.the_error = the_error;
10a6df: 89 1d e0 32 12 00 mov %ebx,0x1232e0
_User_extensions_Fatal( the_source, is_internal, the_error );
10a6e5: 53 push %ebx
10a6e6: 0f b6 d2 movzbl %dl,%edx
10a6e9: 52 push %edx
10a6ea: 50 push %eax
10a6eb: e8 a3 19 00 00 call 10c093 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10a6f0: c7 05 9c 33 12 00 05 movl $0x5,0x12339c <== NOT EXECUTED
10a6f7: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10a6fa: fa cli <== NOT EXECUTED
10a6fb: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a6fd: f4 hlt <== NOT EXECUTED
10a6fe: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a701: eb fe jmp 10a701 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010a754 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10a754: 55 push %ebp
10a755: 89 e5 mov %esp,%ebp
10a757: 56 push %esi
10a758: 53 push %ebx
10a759: 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;
10a75c: 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 )
10a75e: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10a762: 74 53 je 10a7b7 <_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 );
10a764: 8d 73 20 lea 0x20(%ebx),%esi
10a767: 83 ec 0c sub $0xc,%esp
10a76a: 56 push %esi
10a76b: e8 30 f8 ff ff call 109fa0 <_Chain_Get>
10a770: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10a772: 83 c4 10 add $0x10,%esp
10a775: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10a779: 74 3c je 10a7b7 <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10a77b: 85 c0 test %eax,%eax
10a77d: 75 1a jne 10a799 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10a77f: 83 ec 0c sub $0xc,%esp
10a782: 53 push %ebx
10a783: e8 60 00 00 00 call 10a7e8 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10a788: 89 34 24 mov %esi,(%esp)
10a78b: e8 10 f8 ff ff call 109fa0 <_Chain_Get>
10a790: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10a792: 83 c4 10 add $0x10,%esp
10a795: 85 c0 test %eax,%eax
10a797: 74 1e je 10a7b7 <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10a799: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10a79d: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10a7a1: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10a7a3: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10a7a7: 31 d2 xor %edx,%edx
10a7a9: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10a7ab: c1 e0 02 shl $0x2,%eax
10a7ae: 03 43 30 add 0x30(%ebx),%eax
10a7b1: ff 08 decl (%eax)
information->inactive--;
10a7b3: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10a7b7: 89 c8 mov %ecx,%eax
10a7b9: 8d 65 f8 lea -0x8(%ebp),%esp
10a7bc: 5b pop %ebx
10a7bd: 5e pop %esi
10a7be: c9 leave
10a7bf: c3 ret
0010aad8 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10aad8: 55 push %ebp
10aad9: 89 e5 mov %esp,%ebp
10aadb: 57 push %edi
10aadc: 56 push %esi
10aadd: 53 push %ebx
10aade: 83 ec 0c sub $0xc,%esp
10aae1: 8b 75 08 mov 0x8(%ebp),%esi
10aae4: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10aae7: 31 db xor %ebx,%ebx
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10aae9: 66 85 ff test %di,%di
10aaec: 74 37 je 10ab25 <_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 );
10aaee: 83 ec 0c sub $0xc,%esp
10aaf1: 56 push %esi
10aaf2: e8 81 3d 00 00 call 10e878 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10aaf7: 83 c4 10 add $0x10,%esp
10aafa: 85 c0 test %eax,%eax
10aafc: 74 27 je 10ab25 <_Objects_Get_information+0x4d>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10aafe: 0f b7 ff movzwl %di,%edi
10ab01: 39 c7 cmp %eax,%edi
10ab03: 77 20 ja 10ab25 <_Objects_Get_information+0x4d>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ab05: 8b 04 b5 1c 32 12 00 mov 0x12321c(,%esi,4),%eax
10ab0c: 85 c0 test %eax,%eax
10ab0e: 74 15 je 10ab25 <_Objects_Get_information+0x4d><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ab10: 8b 1c b8 mov (%eax,%edi,4),%ebx
if ( !info )
10ab13: 85 db test %ebx,%ebx
10ab15: 74 0e je 10ab25 <_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;
10ab17: 31 c0 xor %eax,%eax
10ab19: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx)
10ab1e: 0f 95 c0 setne %al
10ab21: f7 d8 neg %eax
10ab23: 21 c3 and %eax,%ebx
#endif
return info;
}
10ab25: 89 d8 mov %ebx,%eax
10ab27: 8d 65 f4 lea -0xc(%ebp),%esp
10ab2a: 5b pop %ebx
10ab2b: 5e pop %esi
10ab2c: 5f pop %edi
10ab2d: c9 leave
10ab2e: c3 ret
001180c8 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1180c8: 55 push %ebp
1180c9: 89 e5 mov %esp,%ebp
1180cb: 53 push %ebx
1180cc: 8b 55 08 mov 0x8(%ebp),%edx
1180cf: 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;
1180d2: b8 01 00 00 00 mov $0x1,%eax
1180d7: 2b 42 08 sub 0x8(%edx),%eax
1180da: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1180dd: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1180e1: 39 c3 cmp %eax,%ebx
1180e3: 72 12 jb 1180f7 <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1180e5: 8b 52 1c mov 0x1c(%edx),%edx
1180e8: 8b 04 82 mov (%edx,%eax,4),%eax
1180eb: 85 c0 test %eax,%eax
1180ed: 74 08 je 1180f7 <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1180ef: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1180f5: eb 08 jmp 1180ff <_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;
1180f7: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
1180fd: 31 c0 xor %eax,%eax
}
1180ff: 5b pop %ebx
118100: c9 leave
118101: c3 ret
0010bcf4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10bcf4: 55 push %ebp
10bcf5: 89 e5 mov %esp,%ebp
10bcf7: 53 push %ebx
10bcf8: 83 ec 14 sub $0x14,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bcfb: 8b 45 08 mov 0x8(%ebp),%eax
10bcfe: 85 c0 test %eax,%eax
10bd00: 75 08 jne 10bd0a <_Objects_Id_to_name+0x16>
10bd02: a1 88 67 12 00 mov 0x126788,%eax
10bd07: 8b 40 08 mov 0x8(%eax),%eax
10bd0a: 89 c2 mov %eax,%edx
10bd0c: c1 ea 18 shr $0x18,%edx
10bd0f: 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 )
10bd12: 8d 4a ff lea -0x1(%edx),%ecx
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10bd15: bb 03 00 00 00 mov $0x3,%ebx
10bd1a: 83 f9 02 cmp $0x2,%ecx
10bd1d: 77 30 ja 10bd4f <_Objects_Id_to_name+0x5b>
10bd1f: eb 35 jmp 10bd56 <_Objects_Id_to_name+0x62>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10bd21: 89 c1 mov %eax,%ecx
10bd23: 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 ];
10bd26: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10bd29: 85 d2 test %edx,%edx
10bd2b: 74 22 je 10bd4f <_Objects_Id_to_name+0x5b><== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10bd2d: 51 push %ecx
10bd2e: 8d 4d f4 lea -0xc(%ebp),%ecx
10bd31: 51 push %ecx
10bd32: 50 push %eax
10bd33: 52 push %edx
10bd34: e8 63 ff ff ff call 10bc9c <_Objects_Get>
if ( !the_object )
10bd39: 83 c4 10 add $0x10,%esp
10bd3c: 85 c0 test %eax,%eax
10bd3e: 74 0f je 10bd4f <_Objects_Id_to_name+0x5b>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10bd40: 8b 50 0c mov 0xc(%eax),%edx
10bd43: 8b 45 0c mov 0xc(%ebp),%eax
10bd46: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10bd48: e8 3d 0a 00 00 call 10c78a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10bd4d: 31 db xor %ebx,%ebx
}
10bd4f: 89 d8 mov %ebx,%eax
10bd51: 8b 5d fc mov -0x4(%ebp),%ebx
10bd54: c9 leave
10bd55: 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 ] )
10bd56: 8b 14 95 48 65 12 00 mov 0x126548(,%edx,4),%edx
10bd5d: 85 d2 test %edx,%edx
10bd5f: 75 c0 jne 10bd21 <_Objects_Id_to_name+0x2d>
10bd61: eb ec jmp 10bd4f <_Objects_Id_to_name+0x5b>
0010df2d <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10df2d: 55 push %ebp
10df2e: 89 e5 mov %esp,%ebp
10df30: 57 push %edi
10df31: 56 push %esi
10df32: 53 push %ebx
10df33: 83 ec 1c sub $0x1c,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10df36: 8b 45 08 mov 0x8(%ebp),%eax
10df39: 8b 98 e4 00 00 00 mov 0xe4(%eax),%ebx
if ( !api )
10df3f: 85 db test %ebx,%ebx
10df41: 74 45 je 10df88 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10df43: 9c pushf
10df44: fa cli
10df45: 58 pop %eax
signal_set = asr->signals_posted;
10df46: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10df49: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10df50: 50 push %eax
10df51: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10df52: 85 ff test %edi,%edi
10df54: 74 32 je 10df88 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
10df56: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10df59: 50 push %eax
10df5a: 8d 75 e4 lea -0x1c(%ebp),%esi
10df5d: 56 push %esi
10df5e: 68 ff ff 00 00 push $0xffff
10df63: ff 73 10 pushl 0x10(%ebx)
10df66: e8 5d 1a 00 00 call 10f9c8 <rtems_task_mode>
(*asr->handler)( signal_set );
10df6b: 89 3c 24 mov %edi,(%esp)
10df6e: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10df71: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10df74: 83 c4 0c add $0xc,%esp
10df77: 56 push %esi
10df78: 68 ff ff 00 00 push $0xffff
10df7d: ff 75 e4 pushl -0x1c(%ebp)
10df80: e8 43 1a 00 00 call 10f9c8 <rtems_task_mode>
10df85: 83 c4 10 add $0x10,%esp
}
10df88: 8d 65 f4 lea -0xc(%ebp),%esp
10df8b: 5b pop %ebx
10df8c: 5e pop %esi
10df8d: 5f pop %edi
10df8e: c9 leave
10df8f: c3 ret
0010a978 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10a978: 55 push %ebp
10a979: 89 e5 mov %esp,%ebp
10a97b: 53 push %ebx
10a97c: 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 );
10a97f: 8d 45 f4 lea -0xc(%ebp),%eax
10a982: 50 push %eax
10a983: ff 75 08 pushl 0x8(%ebp)
10a986: 68 bc 6a 12 00 push $0x126abc
10a98b: e8 5c 19 00 00 call 10c2ec <_Objects_Get>
10a990: 89 c3 mov %eax,%ebx
switch ( location ) {
10a992: 83 c4 10 add $0x10,%esp
10a995: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10a999: 75 64 jne 10a9ff <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10a99b: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10a99e: f6 40 11 40 testb $0x40,0x11(%eax)
10a9a2: 74 18 je 10a9bc <_Rate_monotonic_Timeout+0x44>
10a9a4: 8b 53 08 mov 0x8(%ebx),%edx
10a9a7: 39 50 20 cmp %edx,0x20(%eax)
10a9aa: 75 10 jne 10a9bc <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10a9ac: 52 push %edx
10a9ad: 52 push %edx
10a9ae: 68 f8 ff 03 10 push $0x1003fff8
10a9b3: 50 push %eax
10a9b4: e8 9b 20 00 00 call 10ca54 <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10a9b9: 59 pop %ecx
10a9ba: eb 10 jmp 10a9cc <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10a9bc: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10a9c0: 75 2b jne 10a9ed <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10a9c2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10a9c9: 83 ec 0c sub $0xc,%esp
10a9cc: 53 push %ebx
10a9cd: e8 ec fa ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a9d2: 8b 43 3c mov 0x3c(%ebx),%eax
10a9d5: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a9d8: 58 pop %eax
10a9d9: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10a9da: 83 c3 10 add $0x10,%ebx
10a9dd: 53 push %ebx
10a9de: 68 68 6c 12 00 push $0x126c68
10a9e3: e8 f8 2f 00 00 call 10d9e0 <_Watchdog_Insert>
10a9e8: 83 c4 10 add $0x10,%esp
10a9eb: eb 07 jmp 10a9f4 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10a9ed: 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;
10a9f4: a1 a8 6b 12 00 mov 0x126ba8,%eax
10a9f9: 48 dec %eax
10a9fa: a3 a8 6b 12 00 mov %eax,0x126ba8
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a9ff: 8b 5d fc mov -0x4(%ebp),%ebx
10aa02: c9 leave
10aa03: c3 ret
0010ae70 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10ae70: 55 push %ebp
10ae71: 89 e5 mov %esp,%ebp
10ae73: 56 push %esi
10ae74: 53 push %ebx
10ae75: 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;
10ae78: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx
ready = sched_info->ready_chain;
10ae7e: 8b 01 mov (%ecx),%eax
if ( _Chain_Has_only_one_node( ready ) ) {
10ae80: 8b 58 08 mov 0x8(%eax),%ebx
10ae83: 39 18 cmp %ebx,(%eax)
10ae85: 75 32 jne 10aeb9 <_Scheduler_priority_Block+0x49>
Chain_Node *tail = _Chain_Tail( the_chain );
10ae87: 8d 58 04 lea 0x4(%eax),%ebx
10ae8a: 89 18 mov %ebx,(%eax)
head->next = tail;
head->previous = NULL;
10ae8c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10ae93: 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;
10ae96: 8b 59 04 mov 0x4(%ecx),%ebx
10ae99: 66 8b 03 mov (%ebx),%ax
10ae9c: 66 23 41 0e and 0xe(%ecx),%ax
10aea0: 66 89 03 mov %ax,(%ebx)
if ( *the_priority_map->minor == 0 )
10aea3: 66 85 c0 test %ax,%ax
10aea6: 75 1b jne 10aec3 <_Scheduler_priority_Block+0x53>
_Priority_Major_bit_map &= the_priority_map->block_major;
10aea8: 66 a1 6c 34 12 00 mov 0x12346c,%ax
10aeae: 23 41 0c and 0xc(%ecx),%eax
10aeb1: 66 a3 6c 34 12 00 mov %ax,0x12346c
10aeb7: eb 0a jmp 10aec3 <_Scheduler_priority_Block+0x53>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10aeb9: 8b 0a mov (%edx),%ecx
previous = the_node->previous;
10aebb: 8b 42 04 mov 0x4(%edx),%eax
next->previous = previous;
10aebe: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10aec1: 89 08 mov %ecx,(%eax)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10aec3: 3b 15 60 34 12 00 cmp 0x123460,%edx
10aec9: 75 43 jne 10af0e <_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 );
10aecb: 66 8b 35 6c 34 12 00 mov 0x12346c,%si
10aed2: 31 c9 xor %ecx,%ecx
10aed4: 89 cb mov %ecx,%ebx
10aed6: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10aeda: 0f b7 db movzwl %bx,%ebx
10aedd: 66 8b b4 1b 70 34 12 mov 0x123470(%ebx,%ebx,1),%si
10aee4: 00
10aee5: 66 0f bc ce bsf %si,%cx
return (_Priority_Bits_index( major ) << 4) +
10aee9: c1 e3 04 shl $0x4,%ebx
10aeec: 0f b7 c9 movzwl %cx,%ecx
10aeef: 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 ] ) )
10aef2: 6b c0 0c imul $0xc,%eax,%eax
10aef5: 03 05 50 f1 11 00 add 0x11f150,%eax
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
10aefb: 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 );
10aefd: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10af00: 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 ] ) )
10af02: 39 c3 cmp %eax,%ebx
10af04: 74 02 je 10af08 <_Scheduler_priority_Block+0x98><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10af06: 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(
10af08: 89 0d 60 34 12 00 mov %ecx,0x123460
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10af0e: 3b 15 5c 34 12 00 cmp 0x12345c,%edx
10af14: 75 07 jne 10af1d <_Scheduler_priority_Block+0xad>
_Thread_Dispatch_necessary = true;
10af16: c6 05 68 34 12 00 01 movb $0x1,0x123468
}
10af1d: 5b pop %ebx
10af1e: 5e pop %esi
10af1f: c9 leave
10af20: c3 ret
0010b070 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
10b070: 55 push %ebp
10b071: 89 e5 mov %esp,%ebp
10b073: 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 );
10b074: 66 8b 1d 6c 34 12 00 mov 0x12346c,%bx
10b07b: 31 d2 xor %edx,%edx
10b07d: 89 d1 mov %edx,%ecx
10b07f: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b083: 0f b7 c9 movzwl %cx,%ecx
10b086: 66 8b 9c 09 70 34 12 mov 0x123470(%ecx,%ecx,1),%bx
10b08d: 00
10b08e: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10b092: c1 e1 04 shl $0x4,%ecx
10b095: 0f b7 d2 movzwl %dx,%edx
10b098: 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 ] ) )
10b09b: 6b c0 0c imul $0xc,%eax,%eax
10b09e: 03 05 50 f1 11 00 add 0x11f150,%eax
_Scheduler_priority_Schedule_body();
}
10b0a4: 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 );
10b0a6: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10b0a9: 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 ] ) )
10b0ab: 39 c1 cmp %eax,%ecx
10b0ad: 74 02 je 10b0b1 <_Scheduler_priority_Schedule+0x41><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10b0af: 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(
10b0b1: 89 15 60 34 12 00 mov %edx,0x123460
10b0b7: 5b pop %ebx
10b0b8: c9 leave
10b0b9: c3 ret
0010b17c <_Scheduler_priority_Yield>:
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
10b17c: 55 push %ebp
10b17d: 89 e5 mov %esp,%ebp
10b17f: 56 push %esi
10b180: 53 push %ebx
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10b181: a1 5c 34 12 00 mov 0x12345c,%eax
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
10b186: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
10b18c: 8b 12 mov (%edx),%edx
_ISR_Disable( level );
10b18e: 9c pushf
10b18f: fa cli
10b190: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10b191: 8b 5a 08 mov 0x8(%edx),%ebx
10b194: 39 1a cmp %ebx,(%edx)
10b196: 74 2e je 10b1c6 <_Scheduler_priority_Yield+0x4a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10b198: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10b19a: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10b19d: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10b1a0: 89 33 mov %esi,(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10b1a2: 8b 5a 08 mov 0x8(%edx),%ebx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10b1a5: 8d 72 04 lea 0x4(%edx),%esi
10b1a8: 89 30 mov %esi,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10b1aa: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10b1ad: 89 03 mov %eax,(%ebx)
the_node->previous = old_last;
10b1af: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10b1b2: 51 push %ecx
10b1b3: 9d popf
10b1b4: fa cli
if ( _Thread_Is_heir( executing ) )
10b1b5: 3b 05 60 34 12 00 cmp 0x123460,%eax
10b1bb: 75 11 jne 10b1ce <_Scheduler_priority_Yield+0x52><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
10b1bd: 8b 02 mov (%edx),%eax
10b1bf: a3 60 34 12 00 mov %eax,0x123460
10b1c4: eb 08 jmp 10b1ce <_Scheduler_priority_Yield+0x52>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10b1c6: 3b 05 60 34 12 00 cmp 0x123460,%eax
10b1cc: 74 07 je 10b1d5 <_Scheduler_priority_Yield+0x59><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
10b1ce: c6 05 68 34 12 00 01 movb $0x1,0x123468
_ISR_Enable( level );
10b1d5: 51 push %ecx
10b1d6: 9d popf
}
10b1d7: 5b pop %ebx
10b1d8: 5e pop %esi
10b1d9: c9 leave
10b1da: c3 ret
0010a370 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10a370: 55 push %ebp
10a371: 89 e5 mov %esp,%ebp
10a373: 56 push %esi
10a374: 53 push %ebx
10a375: 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();
10a378: 8b 35 34 22 12 00 mov 0x122234,%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;
10a37e: 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) ||
10a380: 85 c9 test %ecx,%ecx
10a382: 74 57 je 10a3db <_TOD_Validate+0x6b> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10a384: b8 40 42 0f 00 mov $0xf4240,%eax
10a389: 31 d2 xor %edx,%edx
10a38b: f7 f6 div %esi
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a38d: 39 41 18 cmp %eax,0x18(%ecx)
10a390: 73 49 jae 10a3db <_TOD_Validate+0x6b>
(the_tod->ticks >= ticks_per_second) ||
10a392: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10a396: 77 43 ja 10a3db <_TOD_Validate+0x6b>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10a398: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10a39c: 77 3d ja 10a3db <_TOD_Validate+0x6b>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10a39e: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10a3a2: 77 37 ja 10a3db <_TOD_Validate+0x6b>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10a3a4: 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) ||
10a3a7: 85 c0 test %eax,%eax
10a3a9: 74 30 je 10a3db <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->month == 0) ||
10a3ab: 83 f8 0c cmp $0xc,%eax
10a3ae: 77 2b ja 10a3db <_TOD_Validate+0x6b>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a3b0: 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) ||
10a3b2: 81 fe c3 07 00 00 cmp $0x7c3,%esi
10a3b8: 76 21 jbe 10a3db <_TOD_Validate+0x6b>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10a3ba: 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) ||
10a3bd: 85 d2 test %edx,%edx
10a3bf: 74 1a je 10a3db <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10a3c1: 83 e6 03 and $0x3,%esi
10a3c4: 75 09 jne 10a3cf <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10a3c6: 8b 04 85 c4 03 12 00 mov 0x1203c4(,%eax,4),%eax
10a3cd: eb 07 jmp 10a3d6 <_TOD_Validate+0x66>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10a3cf: 8b 04 85 90 03 12 00 mov 0x120390(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10a3d6: 39 c2 cmp %eax,%edx
10a3d8: 0f 96 c3 setbe %bl
if ( the_tod->day > days_in_month )
return false;
return true;
}
10a3db: 88 d8 mov %bl,%al
10a3dd: 5b pop %ebx
10a3de: 5e pop %esi
10a3df: c9 leave
10a3e0: c3 ret
0010b228 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b228: 55 push %ebp
10b229: 89 e5 mov %esp,%ebp
10b22b: 57 push %edi
10b22c: 56 push %esi
10b22d: 53 push %ebx
10b22e: 83 ec 28 sub $0x28,%esp
10b231: 8b 5d 08 mov 0x8(%ebp),%ebx
10b234: 8b 75 0c mov 0xc(%ebp),%esi
10b237: 8a 45 10 mov 0x10(%ebp),%al
10b23a: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10b23d: 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 );
10b240: 53 push %ebx
10b241: e8 3a 0b 00 00 call 10bd80 <_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 )
10b246: 83 c4 10 add $0x10,%esp
10b249: 39 73 14 cmp %esi,0x14(%ebx)
10b24c: 74 0c je 10b25a <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b24e: 50 push %eax
10b24f: 50 push %eax
10b250: 56 push %esi
10b251: 53 push %ebx
10b252: e8 d9 0a 00 00 call 10bd30 <_Thread_Set_priority>
10b257: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b25a: 9c pushf
10b25b: fa cli
10b25c: 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;
10b25d: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b260: 83 f8 04 cmp $0x4,%eax
10b263: 74 2b je 10b290 <_Thread_Change_priority+0x68>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b265: 83 e7 04 and $0x4,%edi
10b268: 75 08 jne 10b272 <_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);
10b26a: 89 c2 mov %eax,%edx
10b26c: 83 e2 fb and $0xfffffffb,%edx
10b26f: 89 53 10 mov %edx,0x10(%ebx)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10b272: 56 push %esi
10b273: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b274: a9 e0 be 03 00 test $0x3bee0,%eax
10b279: 74 65 je 10b2e0 <_Thread_Change_priority+0xb8>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b27b: 89 5d 0c mov %ebx,0xc(%ebp)
10b27e: 8b 43 44 mov 0x44(%ebx),%eax
10b281: 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 );
}
10b284: 8d 65 f4 lea -0xc(%ebp),%esp
10b287: 5b pop %ebx
10b288: 5e pop %esi
10b289: 5f pop %edi
10b28a: 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 );
10b28b: e9 18 0a 00 00 jmp 10bca8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b290: 83 e7 04 and $0x4,%edi
10b293: 75 26 jne 10b2bb <_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 );
10b295: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10b29c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b2a0: 74 0c je 10b2ae <_Thread_Change_priority+0x86>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10b2a2: 83 ec 0c sub $0xc,%esp
10b2a5: 53 push %ebx
10b2a6: ff 15 78 f1 11 00 call *0x11f178
10b2ac: eb 0a jmp 10b2b8 <_Thread_Change_priority+0x90>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10b2ae: 83 ec 0c sub $0xc,%esp
10b2b1: 53 push %ebx
10b2b2: ff 15 74 f1 11 00 call *0x11f174
10b2b8: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10b2bb: 56 push %esi
10b2bc: 9d popf
10b2bd: 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();
10b2be: ff 15 58 f1 11 00 call *0x11f158
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10b2c4: a1 5c 34 12 00 mov 0x12345c,%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() &&
10b2c9: 3b 05 60 34 12 00 cmp 0x123460,%eax
10b2cf: 74 0d je 10b2de <_Thread_Change_priority+0xb6>
10b2d1: 80 78 74 00 cmpb $0x0,0x74(%eax)
10b2d5: 74 07 je 10b2de <_Thread_Change_priority+0xb6>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10b2d7: c6 05 68 34 12 00 01 movb $0x1,0x123468
_ISR_Enable( level );
10b2de: 56 push %esi
10b2df: 9d popf
}
10b2e0: 8d 65 f4 lea -0xc(%ebp),%esp
10b2e3: 5b pop %ebx
10b2e4: 5e pop %esi
10b2e5: 5f pop %edi
10b2e6: c9 leave
10b2e7: c3 ret
0010b48c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10b48c: 55 push %ebp
10b48d: 89 e5 mov %esp,%ebp
10b48f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10b492: 8d 45 f4 lea -0xc(%ebp),%eax
10b495: 50 push %eax
10b496: ff 75 08 pushl 0x8(%ebp)
10b499: e8 82 01 00 00 call 10b620 <_Thread_Get>
switch ( location ) {
10b49e: 83 c4 10 add $0x10,%esp
10b4a1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b4a5: 75 1b jne 10b4c2 <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10b4a7: 52 push %edx
10b4a8: 52 push %edx
10b4a9: 68 18 00 00 10 push $0x10000018
10b4ae: 50 push %eax
10b4af: e8 34 fe ff ff call 10b2e8 <_Thread_Clear_state>
10b4b4: a1 44 32 12 00 mov 0x123244,%eax
10b4b9: 48 dec %eax
10b4ba: a3 44 32 12 00 mov %eax,0x123244
10b4bf: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10b4c2: c9 leave
10b4c3: c3 ret
0010b4c4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10b4c4: 55 push %ebp
10b4c5: 89 e5 mov %esp,%ebp
10b4c7: 57 push %edi
10b4c8: 56 push %esi
10b4c9: 53 push %ebx
10b4ca: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10b4cd: 8b 1d 5c 34 12 00 mov 0x12345c,%ebx
_ISR_Disable( level );
10b4d3: 9c pushf
10b4d4: fa cli
10b4d5: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10b4d6: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b4d9: e9 f9 00 00 00 jmp 10b5d7 <_Thread_Dispatch+0x113>
heir = _Thread_Heir;
10b4de: 8b 35 60 34 12 00 mov 0x123460,%esi
_Thread_Dispatch_disable_level = 1;
10b4e4: c7 05 44 32 12 00 01 movl $0x1,0x123244
10b4eb: 00 00 00
_Thread_Dispatch_necessary = false;
10b4ee: c6 05 68 34 12 00 00 movb $0x0,0x123468
_Thread_Executing = heir;
10b4f5: 89 35 5c 34 12 00 mov %esi,0x12345c
/*
* 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 )
10b4fb: 39 de cmp %ebx,%esi
10b4fd: 0f 84 e2 00 00 00 je 10b5e5 <_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 )
10b503: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10b507: 75 09 jne 10b512 <_Thread_Dispatch+0x4e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10b509: 8b 15 18 32 12 00 mov 0x123218,%edx
10b50f: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10b512: 50 push %eax
10b513: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10b514: 83 ec 0c sub $0xc,%esp
10b517: 8d 45 e0 lea -0x20(%ebp),%eax
10b51a: 50 push %eax
10b51b: e8 34 30 00 00 call 10e554 <_TOD_Get_uptime>
_Timestamp_Subtract(
10b520: 83 c4 0c add $0xc,%esp
10b523: 57 push %edi
10b524: 8d 45 e0 lea -0x20(%ebp),%eax
10b527: 50 push %eax
10b528: 68 f0 32 12 00 push $0x1232f0
10b52d: e8 16 0a 00 00 call 10bf48 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10b532: 58 pop %eax
10b533: 5a pop %edx
10b534: 57 push %edi
10b535: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10b53b: 50 push %eax
10b53c: e8 d7 09 00 00 call 10bf18 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10b541: 8b 45 e0 mov -0x20(%ebp),%eax
10b544: 8b 55 e4 mov -0x1c(%ebp),%edx
10b547: a3 f0 32 12 00 mov %eax,0x1232f0
10b54c: 89 15 f4 32 12 00 mov %edx,0x1232f4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10b552: a1 c8 32 12 00 mov 0x1232c8,%eax
10b557: 83 c4 10 add $0x10,%esp
10b55a: 85 c0 test %eax,%eax
10b55c: 74 10 je 10b56e <_Thread_Dispatch+0xaa> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10b55e: 8b 10 mov (%eax),%edx
10b560: 89 93 e0 00 00 00 mov %edx,0xe0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10b566: 8b 96 e0 00 00 00 mov 0xe0(%esi),%edx
10b56c: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10b56e: 51 push %ecx
10b56f: 51 push %ecx
10b570: 56 push %esi
10b571: 53 push %ebx
10b572: e8 09 0c 00 00 call 10c180 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10b577: 58 pop %eax
10b578: 5a pop %edx
10b579: 81 c6 c4 00 00 00 add $0xc4,%esi
10b57f: 56 push %esi
10b580: 8d 83 c4 00 00 00 lea 0xc4(%ebx),%eax
10b586: 50 push %eax
10b587: e8 c4 0e 00 00 call 10c450 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10b58c: 83 c4 10 add $0x10,%esp
10b58f: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx)
10b596: 74 36 je 10b5ce <_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 );
10b598: a1 c4 32 12 00 mov 0x1232c4,%eax
10b59d: 39 c3 cmp %eax,%ebx
10b59f: 74 2d je 10b5ce <_Thread_Dispatch+0x10a>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10b5a1: 85 c0 test %eax,%eax
10b5a3: 74 11 je 10b5b6 <_Thread_Dispatch+0xf2>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10b5a5: 83 ec 0c sub $0xc,%esp
10b5a8: 05 dc 00 00 00 add $0xdc,%eax
10b5ad: 50 push %eax
10b5ae: e8 d1 0e 00 00 call 10c484 <_CPU_Context_save_fp>
10b5b3: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10b5b6: 83 ec 0c sub $0xc,%esp
10b5b9: 8d 83 dc 00 00 00 lea 0xdc(%ebx),%eax
10b5bf: 50 push %eax
10b5c0: e8 c9 0e 00 00 call 10c48e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10b5c5: 89 1d c4 32 12 00 mov %ebx,0x1232c4
10b5cb: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10b5ce: 8b 1d 5c 34 12 00 mov 0x12345c,%ebx
_ISR_Disable( level );
10b5d4: 9c pushf
10b5d5: fa cli
10b5d6: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b5d7: 8a 15 68 34 12 00 mov 0x123468,%dl
10b5dd: 84 d2 test %dl,%dl
10b5df: 0f 85 f9 fe ff ff jne 10b4de <_Thread_Dispatch+0x1a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10b5e5: c7 05 44 32 12 00 00 movl $0x0,0x123244
10b5ec: 00 00 00
_ISR_Enable( level );
10b5ef: 50 push %eax
10b5f0: 9d popf
_API_extensions_Run_postswitch();
10b5f1: e8 69 e8 ff ff call 109e5f <_API_extensions_Run_postswitch>
}
10b5f6: 8d 65 f4 lea -0xc(%ebp),%esp
10b5f9: 5b pop %ebx
10b5fa: 5e pop %esi
10b5fb: 5f pop %edi
10b5fc: c9 leave
10b5fd: c3 ret
0010fc2c <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
10fc2c: 55 push %ebp
10fc2d: 89 e5 mov %esp,%ebp
10fc2f: 53 push %ebx
10fc30: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
10fc33: 8b 1d 5c 34 12 00 mov 0x12345c,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
10fc39: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
10fc3f: 85 c0 test %eax,%eax
10fc41: 74 03 je 10fc46 <_Thread_Handler+0x1a>
10fc43: fa cli
10fc44: eb 01 jmp 10fc47 <_Thread_Handler+0x1b>
10fc46: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
10fc47: a0 0c 2f 12 00 mov 0x122f0c,%al
10fc4c: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
10fc4f: c6 05 0c 2f 12 00 01 movb $0x1,0x122f0c
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10fc56: 83 bb dc 00 00 00 00 cmpl $0x0,0xdc(%ebx)
10fc5d: 74 24 je 10fc83 <_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 );
10fc5f: a1 c4 32 12 00 mov 0x1232c4,%eax
10fc64: 39 c3 cmp %eax,%ebx
10fc66: 74 1b je 10fc83 <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10fc68: 85 c0 test %eax,%eax
10fc6a: 74 11 je 10fc7d <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10fc6c: 83 ec 0c sub $0xc,%esp
10fc6f: 05 dc 00 00 00 add $0xdc,%eax
10fc74: 50 push %eax
10fc75: e8 0a c8 ff ff call 10c484 <_CPU_Context_save_fp>
10fc7a: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
10fc7d: 89 1d c4 32 12 00 mov %ebx,0x1232c4
/*
* 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 );
10fc83: 83 ec 0c sub $0xc,%esp
10fc86: 53 push %ebx
10fc87: e8 a4 c3 ff ff call 10c030 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
10fc8c: e8 6d b9 ff ff call 10b5fe <_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) */ {
10fc91: 83 c4 10 add $0x10,%esp
10fc94: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
10fc98: 75 05 jne 10fc9f <_Thread_Handler+0x73>
INIT_NAME ();
10fc9a: e8 f1 c6 00 00 call 11c390 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
10fc9f: 83 bb 94 00 00 00 00 cmpl $0x0,0x94(%ebx)
10fca6: 75 15 jne 10fcbd <_Thread_Handler+0x91> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
10fca8: 83 ec 0c sub $0xc,%esp
10fcab: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
10fcb1: ff 93 90 00 00 00 call *0x90(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
10fcb7: 89 43 28 mov %eax,0x28(%ebx)
10fcba: 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 );
10fcbd: 83 ec 0c sub $0xc,%esp
10fcc0: 53 push %ebx
10fcc1: e8 9b c3 ff ff call 10c061 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
10fcc6: 83 c4 0c add $0xc,%esp
10fcc9: 6a 05 push $0x5
10fccb: 6a 01 push $0x1
10fccd: 6a 00 push $0x0
10fccf: e8 f0 a9 ff ff call 10a6c4 <_Internal_error_Occurred>
0010b694 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10b694: 55 push %ebp
10b695: 89 e5 mov %esp,%ebp
10b697: 57 push %edi
10b698: 56 push %esi
10b699: 53 push %ebx
10b69a: 83 ec 24 sub $0x24,%esp
10b69d: 8b 5d 0c mov 0xc(%ebp),%ebx
10b6a0: 8b 75 14 mov 0x14(%ebp),%esi
10b6a3: 8a 55 18 mov 0x18(%ebp),%dl
10b6a6: 8a 45 20 mov 0x20(%ebp),%al
10b6a9: 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;
10b6ac: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10b6b3: 00 00 00
10b6b6: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10b6bd: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10b6c0: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10b6c7: 00 00 00
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10b6ca: 56 push %esi
10b6cb: 53 push %ebx
10b6cc: 88 55 e0 mov %dl,-0x20(%ebp)
10b6cf: e8 dc 06 00 00 call 10bdb0 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10b6d4: 83 c4 10 add $0x10,%esp
10b6d7: 39 f0 cmp %esi,%eax
10b6d9: 8a 55 e0 mov -0x20(%ebp),%dl
10b6dc: 0f 82 9f 01 00 00 jb 10b881 <_Thread_Initialize+0x1ed>
10b6e2: 85 c0 test %eax,%eax
10b6e4: 0f 84 97 01 00 00 je 10b881 <_Thread_Initialize+0x1ed><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10b6ea: 8b 8b c0 00 00 00 mov 0xc0(%ebx),%ecx
10b6f0: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx)
the_stack->size = size;
10b6f6: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10b6fc: 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 ) {
10b6fe: 84 d2 test %dl,%dl
10b700: 74 17 je 10b719 <_Thread_Initialize+0x85>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10b702: 83 ec 0c sub $0xc,%esp
10b705: 6a 6c push $0x6c
10b707: e8 e2 0c 00 00 call 10c3ee <_Workspace_Allocate>
10b70c: 89 c7 mov %eax,%edi
if ( !fp_area )
10b70e: 83 c4 10 add $0x10,%esp
10b711: 85 c0 test %eax,%eax
10b713: 0f 84 15 01 00 00 je 10b82e <_Thread_Initialize+0x19a>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10b719: 89 bb dc 00 00 00 mov %edi,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10b71f: 89 bb bc 00 00 00 mov %edi,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b725: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b72c: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10b733: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10b73a: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b741: a1 d4 32 12 00 mov 0x1232d4,%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;
10b746: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b748: 85 c0 test %eax,%eax
10b74a: 74 1d je 10b769 <_Thread_Initialize+0xd5>
extensions_area = _Workspace_Allocate(
10b74c: 83 ec 0c sub $0xc,%esp
10b74f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10b756: 50 push %eax
10b757: e8 92 0c 00 00 call 10c3ee <_Workspace_Allocate>
10b75c: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10b75e: 83 c4 10 add $0x10,%esp
10b761: 85 c0 test %eax,%eax
10b763: 0f 84 c7 00 00 00 je 10b830 <_Thread_Initialize+0x19c>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10b769: 89 b3 ec 00 00 00 mov %esi,0xec(%ebx)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
10b76f: 85 f6 test %esi,%esi
10b771: 74 16 je 10b789 <_Thread_Initialize+0xf5>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10b773: 8b 15 d4 32 12 00 mov 0x1232d4,%edx
10b779: 31 c0 xor %eax,%eax
10b77b: eb 08 jmp 10b785 <_Thread_Initialize+0xf1>
the_thread->extensions[i] = NULL;
10b77d: 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++ )
10b784: 40 inc %eax
10b785: 39 d0 cmp %edx,%eax
10b787: 76 f4 jbe 10b77d <_Thread_Initialize+0xe9>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10b789: 8a 45 e7 mov -0x19(%ebp),%al
10b78c: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10b792: 8b 45 24 mov 0x24(%ebp),%eax
10b795: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10b79b: 8b 45 28 mov 0x28(%ebp),%eax
10b79e: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10b7a4: 8b 45 2c mov 0x2c(%ebp),%eax
10b7a7: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10b7ad: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10b7b4: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10b7bb: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10b7c2: 8b 45 1c mov 0x1c(%ebp),%eax
10b7c5: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10b7c8: 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 );
10b7ce: 83 ec 0c sub $0xc,%esp
10b7d1: 53 push %ebx
10b7d2: ff 15 68 f1 11 00 call *0x11f168
10b7d8: 89 c2 mov %eax,%edx
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10b7da: 83 c4 10 add $0x10,%esp
10b7dd: 85 c0 test %eax,%eax
10b7df: 74 51 je 10b832 <_Thread_Initialize+0x19e>
goto failed;
_Thread_Set_priority( the_thread, priority );
10b7e1: 51 push %ecx
10b7e2: 51 push %ecx
10b7e3: ff 75 1c pushl 0x1c(%ebp)
10b7e6: 53 push %ebx
10b7e7: 89 45 e0 mov %eax,-0x20(%ebp)
10b7ea: e8 41 05 00 00 call 10bd30 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10b7ef: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10b7f6: 00 00 00
10b7f9: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10b800: 00 00 00
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b803: 8b 45 08 mov 0x8(%ebp),%eax
10b806: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b809: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b80d: 89 1c 88 mov %ebx,(%eax,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b810: 8b 45 30 mov 0x30(%ebp),%eax
10b813: 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 );
10b816: 89 1c 24 mov %ebx,(%esp)
10b819: e8 b2 08 00 00 call 10c0d0 <_User_extensions_Thread_create>
10b81e: 88 c1 mov %al,%cl
if ( extension_status )
10b820: 83 c4 10 add $0x10,%esp
return true;
10b823: 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 )
10b825: 84 c9 test %cl,%cl
10b827: 8b 55 e0 mov -0x20(%ebp),%edx
10b82a: 74 06 je 10b832 <_Thread_Initialize+0x19e>
10b82c: eb 55 jmp 10b883 <_Thread_Initialize+0x1ef>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10b82e: 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;
10b830: 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 );
10b832: 83 ec 0c sub $0xc,%esp
10b835: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10b83b: 89 55 e0 mov %edx,-0x20(%ebp)
10b83e: e8 c4 0b 00 00 call 10c407 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10b843: 5a pop %edx
10b844: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10b84a: e8 b8 0b 00 00 call 10c407 <_Workspace_Free>
10b84f: 58 pop %eax
10b850: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
10b856: e8 ac 0b 00 00 call 10c407 <_Workspace_Free>
_Workspace_Free( extensions_area );
10b85b: 89 34 24 mov %esi,(%esp)
10b85e: e8 a4 0b 00 00 call 10c407 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10b863: 89 3c 24 mov %edi,(%esp)
10b866: e8 9c 0b 00 00 call 10c407 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10b86b: 8b 55 e0 mov -0x20(%ebp),%edx
10b86e: 89 14 24 mov %edx,(%esp)
10b871: e8 91 0b 00 00 call 10c407 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10b876: 89 1c 24 mov %ebx,(%esp)
10b879: e8 82 05 00 00 call 10be00 <_Thread_Stack_Free>
return false;
10b87e: 83 c4 10 add $0x10,%esp
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10b881: 31 c0 xor %eax,%eax
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b883: 8d 65 f4 lea -0xc(%ebp),%esp
10b886: 5b pop %ebx
10b887: 5e pop %esi
10b888: 5f pop %edi
10b889: c9 leave
10b88a: c3 ret
0010eaa8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
10eaa8: 55 push %ebp
10eaa9: 89 e5 mov %esp,%ebp
10eaab: 83 ec 08 sub $0x8,%esp
10eaae: 8b 55 08 mov 0x8(%ebp),%edx
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
10eab1: 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 &&
10eab4: 8b 48 30 mov 0x30(%eax),%ecx
10eab7: 85 c9 test %ecx,%ecx
10eab9: 74 1c je 10ead7 <_Thread_queue_Process_timeout+0x2f>
10eabb: 3b 15 5c 34 12 00 cmp 0x12345c,%edx
10eac1: 75 14 jne 10ead7 <_Thread_queue_Process_timeout+0x2f><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
10eac3: 83 f9 03 cmp $0x3,%ecx
10eac6: 74 21 je 10eae9 <_Thread_queue_Process_timeout+0x41>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
10eac8: 8b 48 3c mov 0x3c(%eax),%ecx
10eacb: 89 4a 34 mov %ecx,0x34(%edx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10eace: c7 40 30 02 00 00 00 movl $0x2,0x30(%eax)
10ead5: eb 12 jmp 10eae9 <_Thread_queue_Process_timeout+0x41>
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
10ead7: 8b 48 3c mov 0x3c(%eax),%ecx
10eada: 89 4a 34 mov %ecx,0x34(%edx)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10eadd: 51 push %ecx
10eade: 51 push %ecx
10eadf: 52 push %edx
10eae0: 50 push %eax
10eae1: e8 da fe ff ff call 10e9c0 <_Thread_queue_Extract>
10eae6: 83 c4 10 add $0x10,%esp
}
}
10eae9: c9 leave
10eaea: c3 ret
0010bca8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10bca8: 55 push %ebp
10bca9: 89 e5 mov %esp,%ebp
10bcab: 57 push %edi
10bcac: 56 push %esi
10bcad: 53 push %ebx
10bcae: 83 ec 1c sub $0x1c,%esp
10bcb1: 8b 75 08 mov 0x8(%ebp),%esi
10bcb4: 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 )
10bcb7: 85 f6 test %esi,%esi
10bcb9: 74 36 je 10bcf1 <_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 ) {
10bcbb: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10bcbf: 75 30 jne 10bcf1 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10bcc1: 9c pushf
10bcc2: fa cli
10bcc3: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10bcc4: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10bccb: 74 22 je 10bcef <_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;
10bccd: 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 );
10bcd4: 50 push %eax
10bcd5: 6a 01 push $0x1
10bcd7: 57 push %edi
10bcd8: 56 push %esi
10bcd9: e8 12 2d 00 00 call 10e9f0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10bcde: 83 c4 0c add $0xc,%esp
10bce1: 8d 45 e4 lea -0x1c(%ebp),%eax
10bce4: 50 push %eax
10bce5: 57 push %edi
10bce6: 56 push %esi
10bce7: e8 c0 fd ff ff call 10baac <_Thread_queue_Enqueue_priority>
10bcec: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10bcef: 53 push %ebx
10bcf0: 9d popf
}
}
10bcf1: 8d 65 f4 lea -0xc(%ebp),%esp
10bcf4: 5b pop %ebx
10bcf5: 5e pop %esi
10bcf6: 5f pop %edi
10bcf7: c9 leave
10bcf8: c3 ret
0010bcfc <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bcfc: 55 push %ebp
10bcfd: 89 e5 mov %esp,%ebp
10bcff: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bd02: 8d 45 f4 lea -0xc(%ebp),%eax
10bd05: 50 push %eax
10bd06: ff 75 08 pushl 0x8(%ebp)
10bd09: e8 12 f9 ff ff call 10b620 <_Thread_Get>
switch ( location ) {
10bd0e: 83 c4 10 add $0x10,%esp
10bd11: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bd15: 75 17 jne 10bd2e <_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 );
10bd17: 83 ec 0c sub $0xc,%esp
10bd1a: 50 push %eax
10bd1b: e8 88 2d 00 00 call 10eaa8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10bd20: a1 44 32 12 00 mov 0x123244,%eax
10bd25: 48 dec %eax
10bd26: a3 44 32 12 00 mov %eax,0x123244
10bd2b: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10bd2e: c9 leave
10bd2f: c3 ret
00116084 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116084: 55 push %ebp
116085: 89 e5 mov %esp,%ebp
116087: 57 push %edi
116088: 56 push %esi
116089: 53 push %ebx
11608a: 83 ec 4c sub $0x4c,%esp
11608d: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116090: 8d 55 dc lea -0x24(%ebp),%edx
116093: 8d 45 e0 lea -0x20(%ebp),%eax
116096: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
116099: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
1160a0: 89 55 e4 mov %edx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1160a3: 8d 7d d0 lea -0x30(%ebp),%edi
1160a6: 8d 4d d4 lea -0x2c(%ebp),%ecx
1160a9: 89 4d d0 mov %ecx,-0x30(%ebp)
head->previous = NULL;
1160ac: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
1160b3: 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 );
1160b6: 8d 53 30 lea 0x30(%ebx),%edx
1160b9: 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 );
1160bc: 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;
1160bf: 89 45 b4 mov %eax,-0x4c(%ebp)
{
/*
* 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;
1160c2: 8d 45 dc lea -0x24(%ebp),%eax
1160c5: 89 43 78 mov %eax,0x78(%ebx)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
1160c8: a1 48 c7 13 00 mov 0x13c748,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160cd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
1160d0: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d3: 51 push %ecx
1160d4: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160d5: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d7: 50 push %eax
1160d8: ff 75 c0 pushl -0x40(%ebp)
1160db: e8 c8 37 00 00 call 1198a8 <_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();
1160e0: 8b 15 c0 c6 13 00 mov 0x13c6c0,%edx
1160e6: 89 55 c4 mov %edx,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
1160e9: 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 ) {
1160ec: 83 c4 10 add $0x10,%esp
1160ef: 39 c2 cmp %eax,%edx
1160f1: 76 0d jbe 116100 <_Timer_server_Body+0x7c>
/*
* 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 );
1160f3: 51 push %ecx
1160f4: 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;
1160f5: 29 c2 sub %eax,%edx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160f7: 52 push %edx
1160f8: 56 push %esi
1160f9: e8 aa 37 00 00 call 1198a8 <_Watchdog_Adjust_to_chain>
1160fe: eb 0f jmp 11610f <_Timer_server_Body+0x8b>
} else if ( snapshot < last_snapshot ) {
116100: 73 10 jae 116112 <_Timer_server_Body+0x8e>
/*
* 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 );
116102: 52 push %edx
} 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;
116103: 2b 45 c4 sub -0x3c(%ebp),%eax
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
116106: 50 push %eax
116107: 6a 01 push $0x1
116109: 56 push %esi
11610a: e8 2d 37 00 00 call 11983c <_Watchdog_Adjust>
11610f: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116112: 8b 45 c4 mov -0x3c(%ebp),%eax
116115: 89 43 74 mov %eax,0x74(%ebx)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
116118: 8b 43 78 mov 0x78(%ebx),%eax
11611b: 83 ec 0c sub $0xc,%esp
11611e: 50 push %eax
11611f: e8 b4 08 00 00 call 1169d8 <_Chain_Get>
if ( timer == NULL ) {
116124: 83 c4 10 add $0x10,%esp
116127: 85 c0 test %eax,%eax
116129: 74 29 je 116154 <_Timer_server_Body+0xd0><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11612b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11612e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116131: 75 0b jne 11613e <_Timer_server_Body+0xba><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116133: 51 push %ecx <== NOT EXECUTED
116134: 51 push %ecx <== NOT EXECUTED
116135: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116138: 50 push %eax <== NOT EXECUTED
116139: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
11613c: eb 0c jmp 11614a <_Timer_server_Body+0xc6><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11613e: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116141: 75 d5 jne 116118 <_Timer_server_Body+0x94><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116143: 52 push %edx <== NOT EXECUTED
116144: 52 push %edx <== NOT EXECUTED
116145: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116148: 50 push %eax <== NOT EXECUTED
116149: 56 push %esi <== NOT EXECUTED
11614a: e8 e1 37 00 00 call 119930 <_Watchdog_Insert> <== NOT EXECUTED
11614f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116152: eb c4 jmp 116118 <_Timer_server_Body+0x94><== 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 );
116154: 9c pushf
116155: fa cli
116156: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116157: 8b 55 b4 mov -0x4c(%ebp),%edx
11615a: 39 55 dc cmp %edx,-0x24(%ebp)
11615d: 75 13 jne 116172 <_Timer_server_Body+0xee><== NEVER TAKEN
ts->insert_chain = NULL;
11615f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116166: 50 push %eax
116167: 9d popf
116168: 8d 55 d4 lea -0x2c(%ebp),%edx
_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 ) ) {
11616b: 39 55 d0 cmp %edx,-0x30(%ebp)
11616e: 75 09 jne 116179 <_Timer_server_Body+0xf5>
116170: eb 49 jmp 1161bb <_Timer_server_Body+0x137>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116172: 50 push %eax <== NOT EXECUTED
116173: 9d popf <== NOT EXECUTED
116174: e9 4f ff ff ff jmp 1160c8 <_Timer_server_Body+0x44><== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
116179: 9c pushf
11617a: fa cli
11617b: 8f 45 c4 popl -0x3c(%ebp)
initialized = false;
}
#endif
return status;
}
11617e: 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))
116181: 39 d0 cmp %edx,%eax
116183: 74 2d je 1161b2 <_Timer_server_Body+0x12e>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116185: 8b 08 mov (%eax),%ecx
head->next = new_first;
116187: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = head;
11618a: 89 79 04 mov %edi,0x4(%ecx)
* 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 ) {
11618d: 85 c0 test %eax,%eax
11618f: 74 21 je 1161b2 <_Timer_server_Body+0x12e><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116191: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116198: ff 75 c4 pushl -0x3c(%ebp)
11619b: 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 );
11619c: 51 push %ecx
11619d: 51 push %ecx
11619e: ff 70 24 pushl 0x24(%eax)
1161a1: ff 70 20 pushl 0x20(%eax)
1161a4: 89 55 bc mov %edx,-0x44(%ebp)
1161a7: ff 50 1c call *0x1c(%eax)
}
1161aa: 83 c4 10 add $0x10,%esp
1161ad: 8b 55 bc mov -0x44(%ebp),%edx
1161b0: eb c7 jmp 116179 <_Timer_server_Body+0xf5>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
1161b2: ff 75 c4 pushl -0x3c(%ebp)
1161b5: 9d popf
1161b6: e9 07 ff ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
1161bb: c6 43 7c 00 movb $0x0,0x7c(%ebx)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
1161bf: e8 24 fe ff ff call 115fe8 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
1161c4: 51 push %ecx
1161c5: 51 push %ecx
1161c6: 6a 08 push $0x8
1161c8: ff 33 pushl (%ebx)
1161ca: e8 81 31 00 00 call 119350 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1161cf: 89 d8 mov %ebx,%eax
1161d1: e8 22 fe ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
1161d6: 89 d8 mov %ebx,%eax
1161d8: e8 61 fe ff ff call 11603e <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1161dd: e8 a0 29 00 00 call 118b82 <_Thread_Enable_dispatch>
ts->active = true;
1161e2: 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 );
1161e6: 8d 43 08 lea 0x8(%ebx),%eax
1161e9: 89 04 24 mov %eax,(%esp)
1161ec: e8 5f 38 00 00 call 119a50 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1161f1: 8d 43 40 lea 0x40(%ebx),%eax
1161f4: 89 04 24 mov %eax,(%esp)
1161f7: e8 54 38 00 00 call 119a50 <_Watchdog_Remove>
1161fc: 83 c4 10 add $0x10,%esp
1161ff: e9 be fe ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
00116204 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116204: 55 push %ebp
116205: 89 e5 mov %esp,%ebp
116207: 57 push %edi
116208: 56 push %esi
116209: 53 push %ebx
11620a: 83 ec 2c sub $0x2c,%esp
11620d: 8b 5d 08 mov 0x8(%ebp),%ebx
116210: 8b 75 0c mov 0xc(%ebp),%esi
if ( ts->insert_chain == NULL ) {
116213: 8b 43 78 mov 0x78(%ebx),%eax
116216: 85 c0 test %eax,%eax
116218: 0f 85 de 00 00 00 jne 1162fc <_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();
11621e: e8 c5 fd ff ff call 115fe8 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116223: 8b 46 38 mov 0x38(%esi),%eax
116226: 83 f8 01 cmp $0x1,%eax
116229: 75 5a jne 116285 <_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 );
11622b: 9c pushf
11622c: fa cli
11622d: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116230: 8b 15 48 c7 13 00 mov 0x13c748,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116236: 8b 4b 3c mov 0x3c(%ebx),%ecx
initialized = false;
}
#endif
return status;
}
116239: 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 );
11623c: 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 ) ) {
11623f: 39 f8 cmp %edi,%eax
116241: 74 19 je 11625c <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116243: 89 d7 mov %edx,%edi
116245: 29 cf sub %ecx,%edi
116247: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
11624a: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11624d: 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) {
11624f: 3b 7d e4 cmp -0x1c(%ebp),%edi
116252: 76 05 jbe 116259 <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116254: 89 f9 mov %edi,%ecx
116256: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116259: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11625c: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11625f: ff 75 e0 pushl -0x20(%ebp)
116262: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116263: 50 push %eax
116264: 50 push %eax
116265: 83 c6 10 add $0x10,%esi
116268: 56 push %esi
116269: 8d 43 30 lea 0x30(%ebx),%eax
11626c: 50 push %eax
11626d: e8 be 36 00 00 call 119930 <_Watchdog_Insert>
if ( !ts->active ) {
116272: 8a 43 7c mov 0x7c(%ebx),%al
116275: 83 c4 10 add $0x10,%esp
116278: 84 c0 test %al,%al
11627a: 75 74 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_interval_system_watchdog( ts );
11627c: 89 d8 mov %ebx,%eax
11627e: e8 75 fd ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
116283: eb 6b jmp 1162f0 <_Timer_server_Schedule_operation_method+0xec>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116285: 83 f8 03 cmp $0x3,%eax
116288: 75 66 jne 1162f0 <_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 );
11628a: 9c pushf
11628b: fa cli
11628c: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11628f: 8b 15 c0 c6 13 00 mov 0x13c6c0,%edx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116295: 8b 43 74 mov 0x74(%ebx),%eax
initialized = false;
}
#endif
return status;
}
116298: 8b 4b 68 mov 0x68(%ebx),%ecx
11629b: 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 ) ) {
11629e: 39 f9 cmp %edi,%ecx
1162a0: 74 27 je 1162c9 <_Timer_server_Schedule_operation_method+0xc5>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1162a2: 8b 79 10 mov 0x10(%ecx),%edi
1162a5: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
1162a8: 39 c2 cmp %eax,%edx
1162aa: 76 15 jbe 1162c1 <_Timer_server_Schedule_operation_method+0xbd>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1162ac: 89 d7 mov %edx,%edi
1162ae: 29 c7 sub %eax,%edi
1162b0: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1162b3: 31 c0 xor %eax,%eax
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
1162b5: 39 7d d4 cmp %edi,-0x2c(%ebp)
1162b8: 76 0c jbe 1162c6 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN
delta_interval -= delta;
1162ba: 8b 45 d4 mov -0x2c(%ebp),%eax
1162bd: 29 f8 sub %edi,%eax
1162bf: eb 05 jmp 1162c6 <_Timer_server_Schedule_operation_method+0xc2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1162c1: 03 45 d4 add -0x2c(%ebp),%eax
delta_interval += delta;
1162c4: 29 d0 sub %edx,%eax
}
first_watchdog->delta_interval = delta_interval;
1162c6: 89 41 10 mov %eax,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
1162c9: 89 53 74 mov %edx,0x74(%ebx)
_ISR_Enable( level );
1162cc: ff 75 e0 pushl -0x20(%ebp)
1162cf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1162d0: 57 push %edi
1162d1: 57 push %edi
1162d2: 83 c6 10 add $0x10,%esi
1162d5: 56 push %esi
1162d6: 8d 43 68 lea 0x68(%ebx),%eax
1162d9: 50 push %eax
1162da: e8 51 36 00 00 call 119930 <_Watchdog_Insert>
if ( !ts->active ) {
1162df: 8a 43 7c mov 0x7c(%ebx),%al
1162e2: 83 c4 10 add $0x10,%esp
1162e5: 84 c0 test %al,%al
1162e7: 75 07 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_tod_system_watchdog( ts );
1162e9: 89 d8 mov %ebx,%eax
1162eb: e8 4e fd ff ff call 11603e <_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 );
}
}
1162f0: 8d 65 f4 lea -0xc(%ebp),%esp
1162f3: 5b pop %ebx
1162f4: 5e pop %esi
1162f5: 5f pop %edi
1162f6: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
1162f7: e9 86 28 00 00 jmp 118b82 <_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 );
1162fc: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
1162ff: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
116302: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116305: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116308: 5b pop %ebx <== NOT EXECUTED
116309: 5e pop %esi <== NOT EXECUTED
11630a: 5f pop %edi <== NOT EXECUTED
11630b: 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 );
11630c: e9 8b 06 00 00 jmp 11699c <_Chain_Append> <== NOT EXECUTED
0010c093 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c093: 55 push %ebp
10c094: 89 e5 mov %esp,%ebp
10c096: 57 push %edi
10c097: 56 push %esi
10c098: 53 push %ebx
10c099: 83 ec 0c sub $0xc,%esp
10c09c: 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 );
}
}
10c09f: 8b 1d 14 34 12 00 mov 0x123414,%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 );
10c0a5: 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 );
10c0a9: eb 15 jmp 10c0c0 <_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 )
10c0ab: 8b 43 30 mov 0x30(%ebx),%eax
10c0ae: 85 c0 test %eax,%eax
10c0b0: 74 0b je 10c0bd <_User_extensions_Fatal+0x2a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10c0b2: 52 push %edx
10c0b3: 57 push %edi
10c0b4: 56 push %esi
10c0b5: ff 75 08 pushl 0x8(%ebp)
10c0b8: ff d0 call *%eax
10c0ba: 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 ) {
10c0bd: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10c0c0: 81 fb 0c 34 12 00 cmp $0x12340c,%ebx
10c0c6: 75 e3 jne 10c0ab <_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 );
}
}
10c0c8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c0cb: 5b pop %ebx <== NOT EXECUTED
10c0cc: 5e pop %esi <== NOT EXECUTED
10c0cd: 5f pop %edi <== NOT EXECUTED
10c0ce: c9 leave <== NOT EXECUTED
10c0cf: c3 ret <== NOT EXECUTED
0010bf7c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10bf7c: 55 push %ebp
10bf7d: 89 e5 mov %esp,%ebp
10bf7f: 57 push %edi
10bf80: 56 push %esi
10bf81: 53 push %ebx
10bf82: 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;
10bf85: a1 60 f2 11 00 mov 0x11f260,%eax
10bf8a: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10bf8d: 8b 35 64 f2 11 00 mov 0x11f264,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bf93: c7 05 0c 34 12 00 10 movl $0x123410,0x12340c
10bf9a: 34 12 00
head->previous = NULL;
10bf9d: c7 05 10 34 12 00 00 movl $0x0,0x123410
10bfa4: 00 00 00
tail->previous = head;
10bfa7: c7 05 14 34 12 00 0c movl $0x12340c,0x123414
10bfae: 34 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bfb1: c7 05 48 32 12 00 4c movl $0x12324c,0x123248
10bfb8: 32 12 00
head->previous = NULL;
10bfbb: c7 05 4c 32 12 00 00 movl $0x0,0x12324c
10bfc2: 00 00 00
tail->previous = head;
10bfc5: c7 05 50 32 12 00 48 movl $0x123248,0x123250
10bfcc: 32 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10bfcf: 85 f6 test %esi,%esi
10bfd1: 74 53 je 10c026 <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10bfd3: 6b c8 34 imul $0x34,%eax,%ecx
10bfd6: 83 ec 0c sub $0xc,%esp
10bfd9: 51 push %ecx
10bfda: 89 4d e0 mov %ecx,-0x20(%ebp)
10bfdd: e8 3d 04 00 00 call 10c41f <_Workspace_Allocate_or_fatal_error>
10bfe2: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10bfe4: 31 c0 xor %eax,%eax
10bfe6: 8b 4d e0 mov -0x20(%ebp),%ecx
10bfe9: 89 df mov %ebx,%edi
10bfeb: f3 aa rep stos %al,%es:(%edi)
10bfed: 89 f0 mov %esi,%eax
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10bfef: 83 c4 10 add $0x10,%esp
10bff2: 31 d2 xor %edx,%edx
10bff4: eb 2b jmp 10c021 <_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;
10bff6: 8d 7b 14 lea 0x14(%ebx),%edi
10bff9: 89 c6 mov %eax,%esi
10bffb: b9 08 00 00 00 mov $0x8,%ecx
10c000: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c002: 83 ec 0c sub $0xc,%esp
10c005: 53 push %ebx
10c006: 89 45 dc mov %eax,-0x24(%ebp)
10c009: 89 55 e0 mov %edx,-0x20(%ebp)
10c00c: e8 03 2b 00 00 call 10eb14 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c011: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c014: 8b 55 e0 mov -0x20(%ebp),%edx
10c017: 42 inc %edx
10c018: 8b 45 dc mov -0x24(%ebp),%eax
10c01b: 83 c0 20 add $0x20,%eax
10c01e: 83 c4 10 add $0x10,%esp
10c021: 3b 55 e4 cmp -0x1c(%ebp),%edx
10c024: 72 d0 jb 10bff6 <_User_extensions_Handler_initialization+0x7a>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c026: 8d 65 f4 lea -0xc(%ebp),%esp
10c029: 5b pop %ebx
10c02a: 5e pop %esi
10c02b: 5f pop %edi
10c02c: c9 leave
10c02d: c3 ret
0010d818 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10d818: 55 push %ebp
10d819: 89 e5 mov %esp,%ebp
10d81b: 57 push %edi
10d81c: 56 push %esi
10d81d: 53 push %ebx
10d81e: 83 ec 1c sub $0x1c,%esp
10d821: 8b 75 08 mov 0x8(%ebp),%esi
10d824: 8b 7d 0c mov 0xc(%ebp),%edi
10d827: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10d82a: 9c pushf
10d82b: fa cli
10d82c: 58 pop %eax
}
}
_ISR_Enable( level );
}
10d82d: 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 );
10d82f: 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 ) ) {
10d832: 39 ca cmp %ecx,%edx
10d834: 74 44 je 10d87a <_Watchdog_Adjust+0x62>
switch ( direction ) {
10d836: 85 ff test %edi,%edi
10d838: 74 3c je 10d876 <_Watchdog_Adjust+0x5e>
10d83a: 4f dec %edi
10d83b: 75 3d jne 10d87a <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10d83d: 01 5a 10 add %ebx,0x10(%edx)
break;
10d840: eb 38 jmp 10d87a <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10d842: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10d844: 8b 7a 10 mov 0x10(%edx),%edi
10d847: 39 fb cmp %edi,%ebx
10d849: 73 07 jae 10d852 <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10d84b: 29 df sub %ebx,%edi
10d84d: 89 7a 10 mov %edi,0x10(%edx)
break;
10d850: eb 28 jmp 10d87a <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10d852: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10d859: 50 push %eax
10d85a: 9d popf
_Watchdog_Tickle( header );
10d85b: 83 ec 0c sub $0xc,%esp
10d85e: 56 push %esi
10d85f: 89 4d e4 mov %ecx,-0x1c(%ebp)
10d862: e8 a5 01 00 00 call 10da0c <_Watchdog_Tickle>
_ISR_Disable( level );
10d867: 9c pushf
10d868: fa cli
10d869: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10d86a: 83 c4 10 add $0x10,%esp
10d86d: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d870: 39 0e cmp %ecx,(%esi)
10d872: 74 06 je 10d87a <_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;
10d874: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10d876: 85 db test %ebx,%ebx
10d878: 75 c8 jne 10d842 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10d87a: 50 push %eax
10d87b: 9d popf
}
10d87c: 8d 65 f4 lea -0xc(%ebp),%esp
10d87f: 5b pop %ebx
10d880: 5e pop %esi
10d881: 5f pop %edi
10d882: c9 leave
10d883: c3 ret
0010c2d4 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10c2d4: 55 push %ebp
10c2d5: 89 e5 mov %esp,%ebp
10c2d7: 56 push %esi
10c2d8: 53 push %ebx
10c2d9: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10c2dc: 9c pushf
10c2dd: fa cli
10c2de: 5e pop %esi
previous_state = the_watchdog->state;
10c2df: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10c2e2: 83 f8 01 cmp $0x1,%eax
10c2e5: 74 09 je 10c2f0 <_Watchdog_Remove+0x1c>
10c2e7: 72 42 jb 10c32b <_Watchdog_Remove+0x57>
10c2e9: 83 f8 03 cmp $0x3,%eax
10c2ec: 77 3d ja 10c32b <_Watchdog_Remove+0x57> <== NEVER TAKEN
10c2ee: eb 09 jmp 10c2f9 <_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;
10c2f0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10c2f7: eb 32 jmp 10c32b <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10c2f9: 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 );
}
10c300: 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) )
10c302: 83 39 00 cmpl $0x0,(%ecx)
10c305: 74 06 je 10c30d <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10c307: 8b 5a 10 mov 0x10(%edx),%ebx
10c30a: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10c30d: 8b 1d 50 33 12 00 mov 0x123350,%ebx
10c313: 85 db test %ebx,%ebx
10c315: 74 0c je 10c323 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10c317: 8b 1d 58 34 12 00 mov 0x123458,%ebx
10c31d: 89 1d e8 32 12 00 mov %ebx,0x1232e8
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c323: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10c326: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10c329: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10c32b: 8b 0d 54 33 12 00 mov 0x123354,%ecx
10c331: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10c334: 56 push %esi
10c335: 9d popf
return( previous_state );
}
10c336: 5b pop %ebx
10c337: 5e pop %esi
10c338: c9 leave
10c339: c3 ret
0010d400 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10d400: 55 push %ebp
10d401: 89 e5 mov %esp,%ebp
10d403: 57 push %edi
10d404: 56 push %esi
10d405: 53 push %ebx
10d406: 83 ec 20 sub $0x20,%esp
10d409: 8b 7d 08 mov 0x8(%ebp),%edi
10d40c: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10d40f: 9c pushf
10d410: fa cli
10d411: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10d414: 56 push %esi
10d415: 57 push %edi
10d416: 68 4c ff 11 00 push $0x11ff4c
10d41b: e8 3c ad ff ff call 10815c <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10d420: 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 );
10d422: 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 ) ) {
10d425: 83 c4 10 add $0x10,%esp
10d428: 39 f3 cmp %esi,%ebx
10d42a: 74 1d je 10d449 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10d42c: 52 push %edx
10d42d: 52 push %edx
10d42e: 53 push %ebx
10d42f: 6a 00 push $0x0
10d431: e8 32 00 00 00 call 10d468 <_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 )
10d436: 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 ) ;
10d438: 83 c4 10 add $0x10,%esp
10d43b: 39 f3 cmp %esi,%ebx
10d43d: 75 ed jne 10d42c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10d43f: 50 push %eax
10d440: 50 push %eax
10d441: 57 push %edi
10d442: 68 63 ff 11 00 push $0x11ff63
10d447: eb 08 jmp 10d451 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10d449: 83 ec 0c sub $0xc,%esp
10d44c: 68 72 ff 11 00 push $0x11ff72
10d451: e8 06 ad ff ff call 10815c <printk>
10d456: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10d459: ff 75 e4 pushl -0x1c(%ebp)
10d45c: 9d popf
}
10d45d: 8d 65 f4 lea -0xc(%ebp),%esp
10d460: 5b pop %ebx
10d461: 5e pop %esi
10d462: 5f pop %edi
10d463: c9 leave
10d464: c3 ret
0010c33c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10c33c: 55 push %ebp
10c33d: 89 e5 mov %esp,%ebp
10c33f: 57 push %edi
10c340: 56 push %esi
10c341: 53 push %ebx
10c342: 83 ec 1c sub $0x1c,%esp
10c345: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10c348: 9c pushf
10c349: fa cli
10c34a: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c34b: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c34d: 8d 47 04 lea 0x4(%edi),%eax
10c350: 89 45 e4 mov %eax,-0x1c(%ebp)
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
10c353: 39 c3 cmp %eax,%ebx
10c355: 74 40 je 10c397 <_Watchdog_Tickle+0x5b>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10c357: 8b 43 10 mov 0x10(%ebx),%eax
10c35a: 85 c0 test %eax,%eax
10c35c: 74 08 je 10c366 <_Watchdog_Tickle+0x2a>
the_watchdog->delta_interval--;
10c35e: 48 dec %eax
10c35f: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10c362: 85 c0 test %eax,%eax
10c364: 75 31 jne 10c397 <_Watchdog_Tickle+0x5b>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10c366: 83 ec 0c sub $0xc,%esp
10c369: 53 push %ebx
10c36a: e8 65 ff ff ff call 10c2d4 <_Watchdog_Remove>
_ISR_Enable( level );
10c36f: 56 push %esi
10c370: 9d popf
switch( watchdog_state ) {
10c371: 83 c4 10 add $0x10,%esp
10c374: 83 f8 02 cmp $0x2,%eax
10c377: 75 0e jne 10c387 <_Watchdog_Tickle+0x4b> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10c379: 50 push %eax
10c37a: 50 push %eax
10c37b: ff 73 24 pushl 0x24(%ebx)
10c37e: ff 73 20 pushl 0x20(%ebx)
10c381: ff 53 1c call *0x1c(%ebx)
the_watchdog->id,
the_watchdog->user_data
);
break;
10c384: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10c387: 9c pushf
10c388: fa cli
10c389: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c38a: 8b 1f mov (%edi),%ebx
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10c38c: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10c38f: 74 06 je 10c397 <_Watchdog_Tickle+0x5b>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10c391: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10c395: eb cd jmp 10c364 <_Watchdog_Tickle+0x28>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10c397: 56 push %esi
10c398: 9d popf
}
10c399: 8d 65 f4 lea -0xc(%ebp),%esp
10c39c: 5b pop %ebx
10c39d: 5e pop %esi
10c39e: 5f pop %edi
10c39f: c9 leave
10c3a0: c3 ret
0010a244 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10a244: 55 push %ebp
10a245: 89 e5 mov %esp,%ebp
10a247: 57 push %edi
10a248: 56 push %esi
10a249: 53 push %ebx
10a24a: 83 ec 1c sub $0x1c,%esp
10a24d: 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(
10a250: 8d 75 e4 lea -0x1c(%ebp),%esi
10a253: eb 13 jmp 10a268 <rtems_chain_get_with_wait+0x24>
10a255: 56 push %esi
10a256: ff 75 10 pushl 0x10(%ebp)
10a259: 6a 00 push $0x0
10a25b: 57 push %edi
10a25c: e8 b3 f5 ff ff call 109814 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10a261: 83 c4 10 add $0x10,%esp
10a264: 85 c0 test %eax,%eax
10a266: 75 16 jne 10a27e <rtems_chain_get_with_wait+0x3a><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10a268: 83 ec 0c sub $0xc,%esp
10a26b: ff 75 08 pushl 0x8(%ebp)
10a26e: e8 59 04 00 00 call 10a6cc <_Chain_Get>
10a273: 89 c3 mov %eax,%ebx
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10a275: 83 c4 10 add $0x10,%esp
10a278: 85 c0 test %eax,%eax
10a27a: 74 d9 je 10a255 <rtems_chain_get_with_wait+0x11>
10a27c: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10a27e: 8b 55 14 mov 0x14(%ebp),%edx
10a281: 89 1a mov %ebx,(%edx)
return sc;
}
10a283: 8d 65 f4 lea -0xc(%ebp),%esp
10a286: 5b pop %ebx
10a287: 5e pop %esi
10a288: 5f pop %edi
10a289: c9 leave
10a28a: c3 ret
0010fae4 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
10fae4: 55 push %ebp
10fae5: 89 e5 mov %esp,%ebp
10fae7: 53 push %ebx
10fae8: 83 ec 04 sub $0x4,%esp
10faeb: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
10faee: 3b 05 d4 34 12 00 cmp 0x1234d4,%eax
10faf4: 73 15 jae 10fb0b <rtems_io_close+0x27> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
10faf6: 6b d0 18 imul $0x18,%eax,%edx
10faf9: 03 15 d8 34 12 00 add 0x1234d8,%edx
10faff: 8b 52 08 mov 0x8(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb02: 85 d2 test %edx,%edx
10fb04: 74 0c je 10fb12 <rtems_io_close+0x2e>
}
10fb06: 59 pop %ecx
10fb07: 5b pop %ebx
10fb08: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb09: ff e2 jmp *%edx
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
10fb0b: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10fb10: eb 02 jmp 10fb14 <rtems_io_close+0x30> <== NOT EXECUTED
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb12: 31 c0 xor %eax,%eax
}
10fb14: 5a pop %edx
10fb15: 5b pop %ebx
10fb16: c9 leave
10fb17: c3 ret
0010fb18 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
10fb18: 55 push %ebp
10fb19: 89 e5 mov %esp,%ebp
10fb1b: 53 push %ebx
10fb1c: 83 ec 04 sub $0x4,%esp
10fb1f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
10fb22: 3b 05 d4 34 12 00 cmp 0x1234d4,%eax
10fb28: 73 15 jae 10fb3f <rtems_io_control+0x27> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
10fb2a: 6b d0 18 imul $0x18,%eax,%edx
10fb2d: 03 15 d8 34 12 00 add 0x1234d8,%edx
10fb33: 8b 52 14 mov 0x14(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb36: 85 d2 test %edx,%edx
10fb38: 74 0c je 10fb46 <rtems_io_control+0x2e>
}
10fb3a: 59 pop %ecx
10fb3b: 5b pop %ebx
10fb3c: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb3d: ff e2 jmp *%edx
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
10fb3f: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10fb44: eb 02 jmp 10fb48 <rtems_io_control+0x30> <== NOT EXECUTED
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb46: 31 c0 xor %eax,%eax
}
10fb48: 5a pop %edx
10fb49: 5b pop %ebx
10fb4a: c9 leave
10fb4b: c3 ret
0010fb80 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
10fb80: 55 push %ebp
10fb81: 89 e5 mov %esp,%ebp
10fb83: 53 push %ebx
10fb84: 83 ec 04 sub $0x4,%esp
10fb87: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
10fb8a: 3b 05 d4 34 12 00 cmp 0x1234d4,%eax
10fb90: 73 15 jae 10fba7 <rtems_io_read+0x27> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
10fb92: 6b d0 18 imul $0x18,%eax,%edx
10fb95: 03 15 d8 34 12 00 add 0x1234d8,%edx
10fb9b: 8b 52 0c mov 0xc(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fb9e: 85 d2 test %edx,%edx
10fba0: 74 0c je 10fbae <rtems_io_read+0x2e>
}
10fba2: 59 pop %ecx
10fba3: 5b pop %ebx
10fba4: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fba5: ff e2 jmp *%edx
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
10fba7: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10fbac: eb 02 jmp 10fbb0 <rtems_io_read+0x30> <== NOT EXECUTED
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fbae: 31 c0 xor %eax,%eax
}
10fbb0: 5a pop %edx
10fbb1: 5b pop %ebx
10fbb2: c9 leave
10fbb3: c3 ret
0010fbb4 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
10fbb4: 55 push %ebp
10fbb5: 89 e5 mov %esp,%ebp
10fbb7: 53 push %ebx
10fbb8: 83 ec 04 sub $0x4,%esp
10fbbb: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
10fbbe: 3b 05 d4 34 12 00 cmp 0x1234d4,%eax
10fbc4: 73 15 jae 10fbdb <rtems_io_write+0x27> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
10fbc6: 6b d0 18 imul $0x18,%eax,%edx
10fbc9: 03 15 d8 34 12 00 add 0x1234d8,%edx
10fbcf: 8b 52 10 mov 0x10(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fbd2: 85 d2 test %edx,%edx
10fbd4: 74 0c je 10fbe2 <rtems_io_write+0x2e>
}
10fbd6: 59 pop %ecx
10fbd7: 5b pop %ebx
10fbd8: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fbd9: ff e2 jmp *%edx
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
10fbdb: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
10fbe0: eb 02 jmp 10fbe4 <rtems_io_write+0x30> <== NOT EXECUTED
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
10fbe2: 31 c0 xor %eax,%eax
}
10fbe4: 5a pop %edx
10fbe5: 5b pop %ebx
10fbe6: c9 leave
10fbe7: c3 ret
0010bc14 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
10bc14: 55 push %ebp
10bc15: 89 e5 mov %esp,%ebp
10bc17: 57 push %edi
10bc18: 56 push %esi
10bc19: 53 push %ebx
10bc1a: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10bc1d: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10bc21: 74 41 je 10bc64 <rtems_iterate_over_all_threads+0x50><== NEVER TAKEN
10bc23: bb 01 00 00 00 mov $0x1,%ebx
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
10bc28: 8b 04 9d 40 66 12 00 mov 0x126640(,%ebx,4),%eax
10bc2f: 85 c0 test %eax,%eax
10bc31: 74 2b je 10bc5e <rtems_iterate_over_all_threads+0x4a>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10bc33: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10bc36: be 01 00 00 00 mov $0x1,%esi
10bc3b: 85 ff test %edi,%edi
10bc3d: 75 17 jne 10bc56 <rtems_iterate_over_all_threads+0x42>
10bc3f: eb 1d jmp 10bc5e <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10bc41: 8b 47 1c mov 0x1c(%edi),%eax
10bc44: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10bc47: 85 c0 test %eax,%eax
10bc49: 74 0a je 10bc55 <rtems_iterate_over_all_threads+0x41><== NEVER TAKEN
continue;
(*routine)(the_thread);
10bc4b: 83 ec 0c sub $0xc,%esp
10bc4e: 50 push %eax
10bc4f: ff 55 08 call *0x8(%ebp)
10bc52: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10bc55: 46 inc %esi
10bc56: 0f b7 47 10 movzwl 0x10(%edi),%eax
10bc5a: 39 c6 cmp %eax,%esi
10bc5c: 76 e3 jbe 10bc41 <rtems_iterate_over_all_threads+0x2d>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10bc5e: 43 inc %ebx
10bc5f: 83 fb 04 cmp $0x4,%ebx
10bc62: 75 c4 jne 10bc28 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10bc64: 8d 65 f4 lea -0xc(%ebp),%esp
10bc67: 5b pop %ebx
10bc68: 5e pop %esi
10bc69: 5f pop %edi
10bc6a: c9 leave
10bc6b: c3 ret
0010afec <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
10afec: 55 push %ebp
10afed: 89 e5 mov %esp,%ebp
10afef: 83 ec 08 sub $0x8,%esp
10aff2: 8b 55 08 mov 0x8(%ebp),%edx
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
10aff5: 83 fa 01 cmp $0x1,%edx
10aff8: 74 11 je 10b00b <rtems_object_get_api_class_name+0x1f><== NEVER TAKEN
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
10affa: b8 2f 0f 12 00 mov $0x120f2f,%eax
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
10afff: 83 fa 02 cmp $0x2,%edx
10b002: 75 27 jne 10b02b <rtems_object_get_api_class_name+0x3f>
api_assoc = rtems_object_api_classic_assoc;
10b004: b8 60 50 12 00 mov $0x125060,%eax
10b009: eb 05 jmp 10b010 <rtems_object_get_api_class_name+0x24>
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
10b00b: b8 48 50 12 00 mov $0x125048,%eax
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
10b010: 52 push %edx
10b011: 52 push %edx
10b012: ff 75 0c pushl 0xc(%ebp)
10b015: 50 push %eax
10b016: e8 dd 43 00 00 call 10f3f8 <rtems_assoc_ptr_by_local>
10b01b: 89 c2 mov %eax,%edx
if ( class_assoc )
10b01d: 83 c4 10 add $0x10,%esp
return class_assoc->name;
return "BAD CLASS";
10b020: b8 37 0f 12 00 mov $0x120f37,%eax
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
10b025: 85 d2 test %edx,%edx
10b027: 74 02 je 10b02b <rtems_object_get_api_class_name+0x3f>
return class_assoc->name;
10b029: 8b 02 mov (%edx),%eax
return "BAD CLASS";
}
10b02b: c9 leave
10b02c: c3 ret
00113f00 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
113f00: 55 push %ebp
113f01: 89 e5 mov %esp,%ebp
113f03: 57 push %edi
113f04: 56 push %esi
113f05: 53 push %ebx
113f06: 83 ec 1c sub $0x1c,%esp
113f09: 8b 75 0c mov 0xc(%ebp),%esi
113f0c: 8b 55 10 mov 0x10(%ebp),%edx
113f0f: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
113f12: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
113f17: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
113f1b: 0f 84 ce 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
113f21: b0 09 mov $0x9,%al
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
113f23: 85 f6 test %esi,%esi
113f25: 0f 84 c4 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_ADDRESS;
if ( !id )
113f2b: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
113f2f: 0f 84 ba 00 00 00 je 113fef <rtems_partition_create+0xef><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f35: 85 ff test %edi,%edi
113f37: 0f 84 ad 00 00 00 je 113fea <rtems_partition_create+0xea>
113f3d: 85 d2 test %edx,%edx
113f3f: 0f 84 a5 00 00 00 je 113fea <rtems_partition_create+0xea>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
113f45: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f47: 39 fa cmp %edi,%edx
113f49: 0f 82 a0 00 00 00 jb 113fef <rtems_partition_create+0xef>
113f4f: f7 c7 03 00 00 00 test $0x3,%edi
113f55: 0f 85 94 00 00 00 jne 113fef <rtems_partition_create+0xef>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
113f5b: 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 ) )
113f5d: f7 c6 03 00 00 00 test $0x3,%esi
113f63: 0f 85 86 00 00 00 jne 113fef <rtems_partition_create+0xef>
113f69: a1 38 c6 13 00 mov 0x13c638,%eax
113f6e: 40 inc %eax
113f6f: a3 38 c6 13 00 mov %eax,0x13c638
* 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 );
113f74: 83 ec 0c sub $0xc,%esp
113f77: 68 cc c4 13 00 push $0x13c4cc
113f7c: 89 55 e4 mov %edx,-0x1c(%ebp)
113f7f: e8 18 3d 00 00 call 117c9c <_Objects_Allocate>
113f84: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
113f86: 83 c4 10 add $0x10,%esp
113f89: 85 c0 test %eax,%eax
113f8b: 8b 55 e4 mov -0x1c(%ebp),%edx
113f8e: 75 0c jne 113f9c <rtems_partition_create+0x9c>
_Thread_Enable_dispatch();
113f90: e8 ed 4b 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113f95: b8 05 00 00 00 mov $0x5,%eax
113f9a: eb 53 jmp 113fef <rtems_partition_create+0xef>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
113f9c: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
113f9f: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
113fa2: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
113fa5: 8b 45 18 mov 0x18(%ebp),%eax
113fa8: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
113fab: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
113fb2: 57 push %edi
113fb3: 89 d0 mov %edx,%eax
113fb5: 31 d2 xor %edx,%edx
113fb7: f7 f7 div %edi
113fb9: 50 push %eax
113fba: 56 push %esi
113fbb: 8d 43 24 lea 0x24(%ebx),%eax
113fbe: 50 push %eax
113fbf: e8 38 2a 00 00 call 1169fc <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113fc4: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113fc7: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113fca: 8b 15 e8 c4 13 00 mov 0x13c4e8,%edx
113fd0: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
113fd3: 8b 55 08 mov 0x8(%ebp),%edx
113fd6: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
113fd9: 8b 55 1c mov 0x1c(%ebp),%edx
113fdc: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
113fde: e8 9f 4b 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113fe3: 83 c4 10 add $0x10,%esp
113fe6: 31 c0 xor %eax,%eax
113fe8: eb 05 jmp 113fef <rtems_partition_create+0xef>
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;
113fea: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113fef: 8d 65 f4 lea -0xc(%ebp),%esp
113ff2: 5b pop %ebx
113ff3: 5e pop %esi
113ff4: 5f pop %edi
113ff5: c9 leave
113ff6: c3 ret
0010a601 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10a601: 55 push %ebp
10a602: 89 e5 mov %esp,%ebp
10a604: 57 push %edi
10a605: 56 push %esi
10a606: 53 push %ebx
10a607: 83 ec 30 sub $0x30,%esp
10a60a: 8b 75 08 mov 0x8(%ebp),%esi
10a60d: 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 );
10a610: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10a613: 50 push %eax
10a614: 56 push %esi
10a615: 68 bc 6a 12 00 push $0x126abc
10a61a: e8 cd 1c 00 00 call 10c2ec <_Objects_Get>
10a61f: 89 c7 mov %eax,%edi
switch ( location ) {
10a621: 83 c4 10 add $0x10,%esp
10a624: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a628: 0f 85 3b 01 00 00 jne 10a769 <rtems_rate_monotonic_period+0x168>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10a62e: a1 c0 6d 12 00 mov 0x126dc0,%eax
10a633: 39 47 40 cmp %eax,0x40(%edi)
10a636: 74 0f je 10a647 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
10a638: e8 2d 27 00 00 call 10cd6a <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10a63d: be 17 00 00 00 mov $0x17,%esi
10a642: e9 27 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10a647: 85 db test %ebx,%ebx
10a649: 75 1b jne 10a666 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
10a64b: 8b 47 38 mov 0x38(%edi),%eax
10a64e: 31 f6 xor %esi,%esi
10a650: 83 f8 04 cmp $0x4,%eax
10a653: 77 07 ja 10a65c <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
10a655: 8b 34 85 40 fd 11 00 mov 0x11fd40(,%eax,4),%esi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10a65c: e8 09 27 00 00 call 10cd6a <_Thread_Enable_dispatch>
return( return_value );
10a661: e9 08 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
_ISR_Disable( level );
10a666: 9c pushf
10a667: fa cli
10a668: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10a66b: 8b 47 38 mov 0x38(%edi),%eax
10a66e: 85 c0 test %eax,%eax
10a670: 75 4c jne 10a6be <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
10a672: ff 75 d4 pushl -0x2c(%ebp)
10a675: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10a676: 83 ec 0c sub $0xc,%esp
10a679: 57 push %edi
10a67a: e8 3f fe ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10a67f: 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;
10a686: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10a68d: c7 47 2c 78 a9 10 00 movl $0x10a978,0x2c(%edi)
the_watchdog->id = id;
10a694: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10a697: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10a69e: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a6a1: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a6a4: 58 pop %eax
10a6a5: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a6a6: 83 c7 10 add $0x10,%edi
10a6a9: 57 push %edi
10a6aa: 68 68 6c 12 00 push $0x126c68
10a6af: e8 2c 33 00 00 call 10d9e0 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a6b4: e8 b1 26 00 00 call 10cd6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a6b9: 83 c4 10 add $0x10,%esp
10a6bc: eb 65 jmp 10a723 <rtems_rate_monotonic_period+0x122>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10a6be: 83 f8 02 cmp $0x2,%eax
10a6c1: 75 64 jne 10a727 <rtems_rate_monotonic_period+0x126>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10a6c3: 83 ec 0c sub $0xc,%esp
10a6c6: 57 push %edi
10a6c7: e8 5a fe ff ff call 10a526 <_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;
10a6cc: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10a6d3: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10a6d6: ff 75 d4 pushl -0x2c(%ebp)
10a6d9: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10a6da: a1 c0 6d 12 00 mov 0x126dc0,%eax
10a6df: 8b 57 08 mov 0x8(%edi),%edx
10a6e2: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a6e5: 5b pop %ebx
10a6e6: 5e pop %esi
10a6e7: 68 00 40 00 00 push $0x4000
10a6ec: 50 push %eax
10a6ed: e8 c2 2d 00 00 call 10d4b4 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10a6f2: 9c pushf
10a6f3: fa cli
10a6f4: 5a pop %edx
local_state = the_period->state;
10a6f5: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10a6f8: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10a6ff: 52 push %edx
10a700: 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 )
10a701: 83 c4 10 add $0x10,%esp
10a704: 83 f8 03 cmp $0x3,%eax
10a707: 75 15 jne 10a71e <rtems_rate_monotonic_period+0x11d>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a709: 51 push %ecx
10a70a: 51 push %ecx
10a70b: 68 00 40 00 00 push $0x4000
10a710: ff 35 c0 6d 12 00 pushl 0x126dc0
10a716: e8 39 23 00 00 call 10ca54 <_Thread_Clear_state>
10a71b: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10a71e: e8 47 26 00 00 call 10cd6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a723: 31 f6 xor %esi,%esi
10a725: eb 47 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a727: be 04 00 00 00 mov $0x4,%esi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10a72c: 83 f8 04 cmp $0x4,%eax
10a72f: 75 3d jne 10a76e <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10a731: 83 ec 0c sub $0xc,%esp
10a734: 57 push %edi
10a735: e8 ec fd ff ff call 10a526 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10a73a: ff 75 d4 pushl -0x2c(%ebp)
10a73d: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10a73e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10a745: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a748: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a74b: 58 pop %eax
10a74c: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a74d: 83 c7 10 add $0x10,%edi
10a750: 57 push %edi
10a751: 68 68 6c 12 00 push $0x126c68
10a756: e8 85 32 00 00 call 10d9e0 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a75b: e8 0a 26 00 00 call 10cd6a <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10a760: 83 c4 10 add $0x10,%esp
10a763: 66 be 06 00 mov $0x6,%si
10a767: eb 05 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a769: be 04 00 00 00 mov $0x4,%esi
}
10a76e: 89 f0 mov %esi,%eax
10a770: 8d 65 f4 lea -0xc(%ebp),%esp
10a773: 5b pop %ebx
10a774: 5e pop %esi
10a775: 5f pop %edi
10a776: c9 leave
10a777: c3 ret
0010a778 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10a778: 55 push %ebp
10a779: 89 e5 mov %esp,%ebp
10a77b: 57 push %edi
10a77c: 56 push %esi
10a77d: 53 push %ebx
10a77e: 83 ec 7c sub $0x7c,%esp
10a781: 8b 5d 08 mov 0x8(%ebp),%ebx
10a784: 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 )
10a787: 85 ff test %edi,%edi
10a789: 0f 84 2b 01 00 00 je 10a8ba <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10a78f: 52 push %edx
10a790: 52 push %edx
10a791: 68 54 fd 11 00 push $0x11fd54
10a796: 53 push %ebx
10a797: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10a799: 5e pop %esi
10a79a: 58 pop %eax
10a79b: 68 72 fd 11 00 push $0x11fd72
10a7a0: 53 push %ebx
10a7a1: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10a7a3: 5a pop %edx
10a7a4: 59 pop %ecx
10a7a5: 68 94 fd 11 00 push $0x11fd94
10a7aa: 53 push %ebx
10a7ab: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10a7ad: 5e pop %esi
10a7ae: 58 pop %eax
10a7af: 68 b7 fd 11 00 push $0x11fdb7
10a7b4: 53 push %ebx
10a7b5: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10a7b7: 5a pop %edx
10a7b8: 59 pop %ecx
10a7b9: 68 02 fe 11 00 push $0x11fe02
10a7be: 53 push %ebx
10a7bf: 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 ;
10a7c1: 8b 35 c4 6a 12 00 mov 0x126ac4,%esi
10a7c7: 83 c4 10 add $0x10,%esp
10a7ca: e9 df 00 00 00 jmp 10a8ae <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10a7cf: 50 push %eax
10a7d0: 50 push %eax
10a7d1: 8d 45 88 lea -0x78(%ebp),%eax
10a7d4: 50 push %eax
10a7d5: 56 push %esi
10a7d6: e8 fd 4e 00 00 call 10f6d8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10a7db: 83 c4 10 add $0x10,%esp
10a7de: 85 c0 test %eax,%eax
10a7e0: 0f 85 c7 00 00 00 jne 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
#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 );
10a7e6: 51 push %ecx
10a7e7: 51 push %ecx
10a7e8: 8d 55 c0 lea -0x40(%ebp),%edx
10a7eb: 52 push %edx
10a7ec: 56 push %esi
10a7ed: e8 8a 4f 00 00 call 10f77c <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10a7f2: 83 c4 0c add $0xc,%esp
10a7f5: 8d 45 e3 lea -0x1d(%ebp),%eax
10a7f8: 50 push %eax
10a7f9: 6a 05 push $0x5
10a7fb: ff 75 c0 pushl -0x40(%ebp)
10a7fe: e8 01 02 00 00 call 10aa04 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10a803: 58 pop %eax
10a804: 5a pop %edx
10a805: ff 75 8c pushl -0x74(%ebp)
10a808: ff 75 88 pushl -0x78(%ebp)
10a80b: 8d 55 e3 lea -0x1d(%ebp),%edx
10a80e: 52 push %edx
10a80f: 56 push %esi
10a810: 68 4e fe 11 00 push $0x11fe4e
10a815: 53 push %ebx
10a816: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10a818: 8b 45 88 mov -0x78(%ebp),%eax
10a81b: 83 c4 20 add $0x20,%esp
10a81e: 85 c0 test %eax,%eax
10a820: 75 0f jne 10a831 <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10a822: 51 push %ecx
10a823: 51 push %ecx
10a824: 68 b4 00 12 00 push $0x1200b4
10a829: 53 push %ebx
10a82a: ff d7 call *%edi
continue;
10a82c: 83 c4 10 add $0x10,%esp
10a82f: eb 7c jmp 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
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 );
10a831: 52 push %edx
10a832: 8d 55 d8 lea -0x28(%ebp),%edx
10a835: 52 push %edx
10a836: 50 push %eax
10a837: 8d 45 a0 lea -0x60(%ebp),%eax
10a83a: 50 push %eax
10a83b: e8 74 2e 00 00 call 10d6b4 <_Timespec_Divide_by_integer>
(*print)( context,
10a840: 8b 45 dc mov -0x24(%ebp),%eax
10a843: b9 e8 03 00 00 mov $0x3e8,%ecx
10a848: 99 cltd
10a849: f7 f9 idiv %ecx
10a84b: 50 push %eax
10a84c: ff 75 d8 pushl -0x28(%ebp)
10a84f: 8b 45 9c mov -0x64(%ebp),%eax
10a852: 99 cltd
10a853: f7 f9 idiv %ecx
10a855: 50 push %eax
10a856: ff 75 98 pushl -0x68(%ebp)
10a859: 8b 45 94 mov -0x6c(%ebp),%eax
10a85c: 99 cltd
10a85d: f7 f9 idiv %ecx
10a85f: 50 push %eax
10a860: ff 75 90 pushl -0x70(%ebp)
10a863: 68 65 fe 11 00 push $0x11fe65
10a868: 53 push %ebx
10a869: 89 4d 84 mov %ecx,-0x7c(%ebp)
10a86c: 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);
10a86e: 83 c4 2c add $0x2c,%esp
10a871: 8d 55 d8 lea -0x28(%ebp),%edx
10a874: 52 push %edx
10a875: 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;
10a878: 8d 45 b8 lea -0x48(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10a87b: 50 push %eax
10a87c: e8 33 2e 00 00 call 10d6b4 <_Timespec_Divide_by_integer>
(*print)( context,
10a881: 8b 45 dc mov -0x24(%ebp),%eax
10a884: 8b 4d 84 mov -0x7c(%ebp),%ecx
10a887: 99 cltd
10a888: f7 f9 idiv %ecx
10a88a: 50 push %eax
10a88b: ff 75 d8 pushl -0x28(%ebp)
10a88e: 8b 45 b4 mov -0x4c(%ebp),%eax
10a891: 99 cltd
10a892: f7 f9 idiv %ecx
10a894: 50 push %eax
10a895: ff 75 b0 pushl -0x50(%ebp)
10a898: 8b 45 ac mov -0x54(%ebp),%eax
10a89b: 99 cltd
10a89c: f7 f9 idiv %ecx
10a89e: 50 push %eax
10a89f: ff 75 a8 pushl -0x58(%ebp)
10a8a2: 68 84 fe 11 00 push $0x11fe84
10a8a7: 53 push %ebx
10a8a8: ff d7 call *%edi
10a8aa: 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++ ) {
10a8ad: 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 ;
10a8ae: 3b 35 c8 6a 12 00 cmp 0x126ac8,%esi
10a8b4: 0f 86 15 ff ff ff jbe 10a7cf <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10a8ba: 8d 65 f4 lea -0xc(%ebp),%esp
10a8bd: 5b pop %ebx
10a8be: 5e pop %esi
10a8bf: 5f pop %edi
10a8c0: c9 leave
10a8c1: c3 ret
0011494c <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
11494c: 55 push %ebp
11494d: 89 e5 mov %esp,%ebp
11494f: 56 push %esi
114950: 53 push %ebx
114951: 83 ec 1c sub $0x1c,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
114954: ff 35 d8 c6 13 00 pushl 0x13c6d8
11495a: e8 c5 1f 00 00 call 116924 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
11495f: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
114962: 8d 45 f4 lea -0xc(%ebp),%eax
114965: 50 push %eax
114966: ff 75 08 pushl 0x8(%ebp)
114969: 68 4c c5 13 00 push $0x13c54c
11496e: e8 55 37 00 00 call 1180c8 <_Objects_Get_no_protection>
114973: 89 c6 mov %eax,%esi
switch ( location ) {
114975: 83 c4 10 add $0x10,%esp
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
114978: bb 04 00 00 00 mov $0x4,%ebx
Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11497d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
114981: 75 2a jne 1149ad <rtems_region_delete+0x61>
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
return_status = RTEMS_RESOURCE_IN_USE;
114983: bb 0c 00 00 00 mov $0xc,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
114988: 83 78 64 00 cmpl $0x0,0x64(%eax)
11498c: 75 1f jne 1149ad <rtems_region_delete+0x61><== NEVER TAKEN
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
11498e: 51 push %ecx
11498f: 51 push %ecx
114990: 50 push %eax
114991: 68 4c c5 13 00 push $0x13c54c
114996: e8 6d 33 00 00 call 117d08 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
11499b: 58 pop %eax
11499c: 5a pop %edx
11499d: 56 push %esi
11499e: 68 4c c5 13 00 push $0x13c54c
1149a3: e8 e8 35 00 00 call 117f90 <_Objects_Free>
1149a8: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_SUCCESSFUL;
1149ab: 30 db xor %bl,%bl
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1149ad: 83 ec 0c sub $0xc,%esp
1149b0: ff 35 d8 c6 13 00 pushl 0x13c6d8
1149b6: e8 b1 1f 00 00 call 11696c <_API_Mutex_Unlock>
return return_status;
}
1149bb: 89 d8 mov %ebx,%eax
1149bd: 8d 65 f8 lea -0x8(%ebp),%esp
1149c0: 5b pop %ebx
1149c1: 5e pop %esi
1149c2: c9 leave
1149c3: c3 ret
001149c4 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
1149c4: 55 push %ebp
1149c5: 89 e5 mov %esp,%ebp
1149c7: 57 push %edi
1149c8: 56 push %esi
1149c9: 53 push %ebx
1149ca: 83 ec 1c sub $0x1c,%esp
1149cd: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
1149d0: be 09 00 00 00 mov $0x9,%esi
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
1149d5: 85 ff test %edi,%edi
1149d7: 74 69 je 114a42 <rtems_region_extend+0x7e>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1149d9: 83 ec 0c sub $0xc,%esp
1149dc: ff 35 d8 c6 13 00 pushl 0x13c6d8
1149e2: e8 3d 1f 00 00 call 116924 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
1149e7: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1149ea: 8d 45 e0 lea -0x20(%ebp),%eax
1149ed: 50 push %eax
1149ee: ff 75 08 pushl 0x8(%ebp)
1149f1: 68 4c c5 13 00 push $0x13c54c
1149f6: e8 cd 36 00 00 call 1180c8 <_Objects_Get_no_protection>
1149fb: 89 c3 mov %eax,%ebx
switch ( location ) {
1149fd: 83 c4 10 add $0x10,%esp
114a00: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
114a04: 75 26 jne 114a2c <rtems_region_extend+0x68><== NEVER TAKEN
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
114a06: 8d 45 e4 lea -0x1c(%ebp),%eax
114a09: 50 push %eax
114a0a: ff 75 10 pushl 0x10(%ebp)
114a0d: 57 push %edi
114a0e: 8d 43 68 lea 0x68(%ebx),%eax
114a11: 50 push %eax
114a12: e8 74 29 00 00 call 11738b <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
114a17: 83 c4 10 add $0x10,%esp
114a1a: 84 c0 test %al,%al
114a1c: 74 13 je 114a31 <rtems_region_extend+0x6d>
the_region->length += amount_extended;
114a1e: 8b 45 e4 mov -0x1c(%ebp),%eax
114a21: 01 43 54 add %eax,0x54(%ebx)
the_region->maximum_segment_size += amount_extended;
114a24: 01 43 5c add %eax,0x5c(%ebx)
return_status = RTEMS_SUCCESSFUL;
114a27: 66 31 f6 xor %si,%si
114a2a: eb 05 jmp 114a31 <rtems_region_extend+0x6d>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
114a2c: be 04 00 00 00 mov $0x4,%esi <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
114a31: 83 ec 0c sub $0xc,%esp
114a34: ff 35 d8 c6 13 00 pushl 0x13c6d8
114a3a: e8 2d 1f 00 00 call 11696c <_API_Mutex_Unlock>
return return_status;
114a3f: 83 c4 10 add $0x10,%esp
}
114a42: 89 f0 mov %esi,%eax
114a44: 8d 65 f4 lea -0xc(%ebp),%esp
114a47: 5b pop %ebx
114a48: 5e pop %esi
114a49: 5f pop %edi
114a4a: c9 leave
114a4b: c3 ret
00114c58 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
114c58: 55 push %ebp
114c59: 89 e5 mov %esp,%ebp
114c5b: 56 push %esi
114c5c: 53 push %ebx
114c5d: 83 ec 20 sub $0x20,%esp
114c60: 8b 5d 0c mov 0xc(%ebp),%ebx
114c63: 8b 75 10 mov 0x10(%ebp),%esi
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
114c66: b8 09 00 00 00 mov $0x9,%eax
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
114c6b: 85 db test %ebx,%ebx
114c6d: 74 6a je 114cd9 <rtems_region_get_segment_size+0x81><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
114c6f: 85 f6 test %esi,%esi
114c71: 74 66 je 114cd9 <rtems_region_get_segment_size+0x81><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
114c73: 83 ec 0c sub $0xc,%esp
114c76: ff 35 d8 c6 13 00 pushl 0x13c6d8
114c7c: e8 a3 1c 00 00 call 116924 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
114c81: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
114c84: 8d 45 f4 lea -0xc(%ebp),%eax
114c87: 50 push %eax
114c88: ff 75 08 pushl 0x8(%ebp)
114c8b: 68 4c c5 13 00 push $0x13c54c
114c90: e8 33 34 00 00 call 1180c8 <_Objects_Get_no_protection>
switch ( location ) {
114c95: 83 c4 10 add $0x10,%esp
114c98: 8b 55 f4 mov -0xc(%ebp),%edx
114c9b: 85 d2 test %edx,%edx
114c9d: 74 0d je 114cac <rtems_region_get_segment_size+0x54><== ALWAYS TAKEN
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
114c9f: 31 c0 xor %eax,%eax
114ca1: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
114ca4: 0f 94 c0 sete %al <== NOT EXECUTED
114ca7: c1 e0 02 shl $0x2,%eax <== NOT EXECUTED
114caa: eb 16 jmp 114cc2 <rtems_region_get_segment_size+0x6a><== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
114cac: 52 push %edx
114cad: 56 push %esi
114cae: 53 push %ebx
114caf: 83 c0 68 add $0x68,%eax
114cb2: 50 push %eax
114cb3: e8 ec 2e 00 00 call 117ba4 <_Heap_Size_of_alloc_area>
114cb8: 83 c4 10 add $0x10,%esp
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
114cbb: 3c 01 cmp $0x1,%al
114cbd: 19 c0 sbb %eax,%eax
114cbf: 83 e0 09 and $0x9,%eax
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
114cc2: 83 ec 0c sub $0xc,%esp
114cc5: ff 35 d8 c6 13 00 pushl 0x13c6d8
114ccb: 89 45 e4 mov %eax,-0x1c(%ebp)
114cce: e8 99 1c 00 00 call 11696c <_API_Mutex_Unlock>
return return_status;
114cd3: 83 c4 10 add $0x10,%esp
114cd6: 8b 45 e4 mov -0x1c(%ebp),%eax
}
114cd9: 8d 65 f8 lea -0x8(%ebp),%esp
114cdc: 5b pop %ebx
114cdd: 5e pop %esi
114cde: c9 leave
114cdf: c3 ret
00114d04 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
114d04: 55 push %ebp
114d05: 89 e5 mov %esp,%ebp
114d07: 57 push %edi
114d08: 56 push %esi
114d09: 53 push %ebx
114d0a: 83 ec 1c sub $0x1c,%esp
114d0d: 8b 75 14 mov 0x14(%ebp),%esi
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
114d10: b8 09 00 00 00 mov $0x9,%eax
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114d15: 85 f6 test %esi,%esi
114d17: 0f 84 9d 00 00 00 je 114dba <rtems_region_resize_segment+0xb6><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
114d1d: 83 ec 0c sub $0xc,%esp
114d20: ff 35 d8 c6 13 00 pushl 0x13c6d8
114d26: e8 f9 1b 00 00 call 116924 <_API_Mutex_Lock>
114d2b: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
114d2e: 8d 45 e0 lea -0x20(%ebp),%eax
114d31: 50 push %eax
114d32: ff 75 08 pushl 0x8(%ebp)
114d35: 68 4c c5 13 00 push $0x13c54c
114d3a: e8 89 33 00 00 call 1180c8 <_Objects_Get_no_protection>
114d3f: 89 c3 mov %eax,%ebx
switch ( location ) {
114d41: 83 c4 10 add $0x10,%esp
114d44: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
114d48: 75 5a jne 114da4 <rtems_region_resize_segment+0xa0><== NEVER TAKEN
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
114d4a: 83 ec 0c sub $0xc,%esp
114d4d: 8d 45 e4 lea -0x1c(%ebp),%eax
114d50: 50 push %eax
114d51: 8d 45 dc lea -0x24(%ebp),%eax
114d54: 50 push %eax
114d55: ff 75 10 pushl 0x10(%ebp)
114d58: ff 75 0c pushl 0xc(%ebp)
114d5b: 8d 43 68 lea 0x68(%ebx),%eax
114d5e: 50 push %eax
114d5f: e8 58 2d 00 00 call 117abc <_Heap_Resize_block>
114d64: 89 c7 mov %eax,%edi
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
114d66: 8b 45 dc mov -0x24(%ebp),%eax
114d69: 89 06 mov %eax,(%esi)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
114d6b: 83 c4 20 add $0x20,%esp
114d6e: 85 ff test %edi,%edi
114d70: 75 10 jne 114d82 <rtems_region_resize_segment+0x7e>
_Region_Process_queue( the_region ); /* unlocks allocator */
114d72: 83 ec 0c sub $0xc,%esp
114d75: 53 push %ebx
114d76: e8 c9 66 00 00 call 11b444 <_Region_Process_queue>
114d7b: 83 c4 10 add $0x10,%esp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
114d7e: 31 c0 xor %eax,%eax
114d80: eb 38 jmp 114dba <rtems_region_resize_segment+0xb6>
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
114d82: 83 ec 0c sub $0xc,%esp
114d85: ff 35 d8 c6 13 00 pushl 0x13c6d8
114d8b: e8 dc 1b 00 00 call 11696c <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
114d90: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
114d93: 31 c0 xor %eax,%eax
114d95: 83 ff 01 cmp $0x1,%edi
114d98: 0f 94 c0 sete %al
114d9b: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax
114da2: eb 16 jmp 114dba <rtems_region_resize_segment+0xb6>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
114da4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
114da7: ff 35 d8 c6 13 00 pushl 0x13c6d8 <== NOT EXECUTED
114dad: e8 ba 1b 00 00 call 11696c <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
114db2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
114db5: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
}
114dba: 8d 65 f4 lea -0xc(%ebp),%esp
114dbd: 5b pop %ebx
114dbe: 5e pop %esi
114dbf: 5f pop %edi
114dc0: c9 leave
114dc1: c3 ret
00114dc4 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
114dc4: 55 push %ebp
114dc5: 89 e5 mov %esp,%ebp
114dc7: 56 push %esi
114dc8: 53 push %ebx
114dc9: 83 ec 1c sub $0x1c,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
114dcc: ff 35 d8 c6 13 00 pushl 0x13c6d8
114dd2: e8 4d 1b 00 00 call 116924 <_API_Mutex_Lock>
114dd7: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
114dda: 8d 45 f4 lea -0xc(%ebp),%eax
114ddd: 50 push %eax
114dde: ff 75 08 pushl 0x8(%ebp)
114de1: 68 4c c5 13 00 push $0x13c54c
114de6: e8 dd 32 00 00 call 1180c8 <_Objects_Get_no_protection>
114deb: 89 c3 mov %eax,%ebx
switch ( location ) {
114ded: 83 c4 10 add $0x10,%esp
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
114df0: be 04 00 00 00 mov $0x4,%esi
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
114df5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
114df9: 75 2e jne 114e29 <rtems_region_return_segment+0x65><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
114dfb: 50 push %eax
114dfc: 50 push %eax
114dfd: ff 75 0c pushl 0xc(%ebp)
114e00: 8d 43 68 lea 0x68(%ebx),%eax
114e03: 50 push %eax
114e04: e8 9f 27 00 00 call 1175a8 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
114e09: 83 c4 10 add $0x10,%esp
return_status = RTEMS_INVALID_ADDRESS;
114e0c: be 09 00 00 00 mov $0x9,%esi
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
114e11: 84 c0 test %al,%al
114e13: 74 14 je 114e29 <rtems_region_return_segment+0x65><== NEVER TAKEN
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
114e15: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
114e18: 83 ec 0c sub $0xc,%esp
114e1b: 53 push %ebx
114e1c: e8 23 66 00 00 call 11b444 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
114e21: 83 c4 10 add $0x10,%esp
114e24: 66 31 f6 xor %si,%si
114e27: eb 11 jmp 114e3a <rtems_region_return_segment+0x76>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
114e29: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
114e2c: ff 35 d8 c6 13 00 pushl 0x13c6d8 <== NOT EXECUTED
114e32: e8 35 1b 00 00 call 11696c <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
114e37: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
114e3a: 89 f0 mov %esi,%eax
114e3c: 8d 65 f8 lea -0x8(%ebp),%esp
114e3f: 5b pop %ebx
114e40: 5e pop %esi
114e41: c9 leave
114e42: c3 ret
00115260 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115260: 55 push %ebp
115261: 89 e5 mov %esp,%ebp
115263: 53 push %ebx
115264: 83 ec 14 sub $0x14,%esp
115267: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
11526a: 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 )
11526f: 85 db test %ebx,%ebx
115271: 74 6d je 1152e0 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115273: 50 push %eax
115274: 50 push %eax
115275: 8d 45 f4 lea -0xc(%ebp),%eax
115278: 50 push %eax
115279: ff 75 08 pushl 0x8(%ebp)
11527c: e8 23 39 00 00 call 118ba4 <_Thread_Get>
switch ( location ) {
115281: 83 c4 10 add $0x10,%esp
115284: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115288: 75 51 jne 1152db <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11528a: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115290: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115294: 74 39 je 1152cf <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
115296: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11529a: 74 22 je 1152be <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11529c: 9c pushf
11529d: fa cli
11529e: 59 pop %ecx
*signal_set |= signals;
11529f: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
1152a2: 51 push %ecx
1152a3: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1152a4: 83 3d 54 c8 13 00 00 cmpl $0x0,0x13c854
1152ab: 74 19 je 1152c6 <rtems_signal_send+0x66>
1152ad: 3b 05 58 c8 13 00 cmp 0x13c858,%eax
1152b3: 75 11 jne 1152c6 <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1152b5: c6 05 64 c8 13 00 01 movb $0x1,0x13c864
1152bc: eb 08 jmp 1152c6 <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1152be: 9c pushf
1152bf: fa cli
1152c0: 58 pop %eax
*signal_set |= signals;
1152c1: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
1152c4: 50 push %eax
1152c5: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
1152c6: e8 b7 38 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1152cb: 31 c0 xor %eax,%eax
1152cd: eb 11 jmp 1152e0 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
1152cf: e8 ae 38 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
1152d4: b8 0b 00 00 00 mov $0xb,%eax
1152d9: eb 05 jmp 1152e0 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1152db: b8 04 00 00 00 mov $0x4,%eax
}
1152e0: 8b 5d fc mov -0x4(%ebp),%ebx
1152e3: c9 leave
1152e4: c3 ret
0010f9c8 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10f9c8: 55 push %ebp
10f9c9: 89 e5 mov %esp,%ebp
10f9cb: 57 push %edi
10f9cc: 56 push %esi
10f9cd: 53 push %ebx
10f9ce: 83 ec 1c sub $0x1c,%esp
10f9d1: 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;
10f9d4: 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 )
10f9d9: 85 c9 test %ecx,%ecx
10f9db: 0f 84 fb 00 00 00 je 10fadc <rtems_task_mode+0x114>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10f9e1: 8b 35 5c 34 12 00 mov 0x12345c,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10f9e7: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10f9ed: 80 7e 74 01 cmpb $0x1,0x74(%esi)
10f9f1: 19 ff sbb %edi,%edi
10f9f3: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10f9f9: 83 7e 7c 00 cmpl $0x0,0x7c(%esi)
10f9fd: 74 06 je 10fa05 <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
10f9ff: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
10fa05: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
10fa09: 19 d2 sbb %edx,%edx
10fa0b: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
10fa11: 89 55 e4 mov %edx,-0x1c(%ebp)
10fa14: 89 4d e0 mov %ecx,-0x20(%ebp)
10fa17: e8 99 cd ff ff call 10c7b5 <_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;
10fa1c: 8b 55 e4 mov -0x1c(%ebp),%edx
10fa1f: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
10fa21: 09 f8 or %edi,%eax
10fa23: 8b 4d e0 mov -0x20(%ebp),%ecx
10fa26: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10fa28: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10fa2f: 74 0b je 10fa3c <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
10fa31: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
10fa38: 0f 94 46 74 sete 0x74(%esi)
if ( mask & RTEMS_TIMESLICE_MASK ) {
10fa3c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10fa43: 74 21 je 10fa66 <rtems_task_mode+0x9e>
if ( _Modes_Is_timeslice(mode_set) ) {
10fa45: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
10fa4c: 74 11 je 10fa5f <rtems_task_mode+0x97>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10fa4e: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10fa55: a1 18 32 12 00 mov 0x123218,%eax
10fa5a: 89 46 78 mov %eax,0x78(%esi)
10fa5d: eb 07 jmp 10fa66 <rtems_task_mode+0x9e>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10fa5f: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fa66: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fa6a: 74 0a je 10fa76 <rtems_task_mode+0xae>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
10fa6c: f6 45 08 01 testb $0x1,0x8(%ebp)
10fa70: 74 03 je 10fa75 <rtems_task_mode+0xad>
10fa72: fa cli
10fa73: eb 01 jmp 10fa76 <rtems_task_mode+0xae>
10fa75: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10fa76: 31 c9 xor %ecx,%ecx
if ( mask & RTEMS_ASR_MASK ) {
10fa78: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10fa7f: 74 2a je 10faab <rtems_task_mode+0xe3>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
10fa81: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
10fa88: 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 ) {
10fa8b: 3a 43 08 cmp 0x8(%ebx),%al
10fa8e: 74 1b je 10faab <rtems_task_mode+0xe3>
asr->is_enabled = is_asr_enabled;
10fa90: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
10fa93: 9c pushf
10fa94: fa cli
10fa95: 58 pop %eax
_signals = information->signals_pending;
10fa96: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
10fa99: 8b 4b 14 mov 0x14(%ebx),%ecx
10fa9c: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
10fa9f: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
10faa2: 50 push %eax
10faa3: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
10faa4: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10faa8: 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;
10faab: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
10faad: 83 3d 9c 33 12 00 03 cmpl $0x3,0x12339c
10fab4: 75 26 jne 10fadc <rtems_task_mode+0x114>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
10fab6: 8b 15 5c 34 12 00 mov 0x12345c,%edx
if ( are_signals_pending ||
10fabc: 84 c9 test %cl,%cl
10fabe: 75 0e jne 10face <rtems_task_mode+0x106>
10fac0: 3b 15 60 34 12 00 cmp 0x123460,%edx
10fac6: 74 14 je 10fadc <rtems_task_mode+0x114>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
10fac8: 80 7a 74 00 cmpb $0x0,0x74(%edx)
10facc: 74 0e je 10fadc <rtems_task_mode+0x114> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
10face: c6 05 68 34 12 00 01 movb $0x1,0x123468
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
10fad5: e8 ea b9 ff ff call 10b4c4 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
10fada: 31 c0 xor %eax,%eax
}
10fadc: 83 c4 1c add $0x1c,%esp
10fadf: 5b pop %ebx
10fae0: 5e pop %esi
10fae1: 5f pop %edi
10fae2: c9 leave
10fae3: c3 ret
0010d300 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10d300: 55 push %ebp
10d301: 89 e5 mov %esp,%ebp
10d303: 56 push %esi
10d304: 53 push %ebx
10d305: 83 ec 10 sub $0x10,%esp
10d308: 8b 5d 0c mov 0xc(%ebp),%ebx
10d30b: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d30e: 85 db test %ebx,%ebx
10d310: 74 10 je 10d322 <rtems_task_set_priority+0x22>
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 ) );
10d312: 0f b6 15 64 37 12 00 movzbl 0x123764,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10d319: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d31e: 39 d3 cmp %edx,%ebx
10d320: 77 52 ja 10d374 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10d322: 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 )
10d327: 85 f6 test %esi,%esi
10d329: 74 49 je 10d374 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10d32b: 51 push %ecx
10d32c: 51 push %ecx
10d32d: 8d 45 f4 lea -0xc(%ebp),%eax
10d330: 50 push %eax
10d331: ff 75 08 pushl 0x8(%ebp)
10d334: e8 e7 1c 00 00 call 10f020 <_Thread_Get>
switch ( location ) {
10d339: 83 c4 10 add $0x10,%esp
10d33c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10d340: 75 2d jne 10d36f <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10d342: 8b 50 14 mov 0x14(%eax),%edx
10d345: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10d347: 85 db test %ebx,%ebx
10d349: 74 1b je 10d366 <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10d34b: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10d34e: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10d352: 74 05 je 10d359 <rtems_task_set_priority+0x59>
10d354: 39 58 14 cmp %ebx,0x14(%eax)
10d357: 76 0d jbe 10d366 <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10d359: 52 push %edx
10d35a: 6a 00 push $0x0
10d35c: 53 push %ebx
10d35d: 50 push %eax
10d35e: e8 c5 18 00 00 call 10ec28 <_Thread_Change_priority>
10d363: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10d366: e8 93 1c 00 00 call 10effe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d36b: 31 c0 xor %eax,%eax
10d36d: eb 05 jmp 10d374 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d36f: b8 04 00 00 00 mov $0x4,%eax
}
10d374: 8d 65 f8 lea -0x8(%ebp),%esp
10d377: 5b pop %ebx
10d378: 5e pop %esi
10d379: c9 leave
10d37a: c3 ret
00115aac <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
115aac: 55 push %ebp
115aad: 89 e5 mov %esp,%ebp
115aaf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115ab2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
115ab5: 50 push %eax
115ab6: ff 75 08 pushl 0x8(%ebp)
115ab9: 68 d0 c8 13 00 push $0x13c8d0
115abe: e8 41 26 00 00 call 118104 <_Objects_Get>
switch ( location ) {
115ac3: 83 c4 10 add $0x10,%esp
115ac6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115aca: 75 1e jne 115aea <rtems_timer_cancel+0x3e><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
115acc: 83 78 38 04 cmpl $0x4,0x38(%eax)
115ad0: 74 0f je 115ae1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
115ad2: 83 ec 0c sub $0xc,%esp
115ad5: 83 c0 10 add $0x10,%eax
115ad8: 50 push %eax
115ad9: e8 72 3f 00 00 call 119a50 <_Watchdog_Remove>
115ade: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
115ae1: e8 9c 30 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ae6: 31 c0 xor %eax,%eax
115ae8: eb 05 jmp 115aef <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115aea: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
}
115aef: c9 leave
115af0: c3 ret
00109fb8 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
109fb8: 55 push %ebp
109fb9: 89 e5 mov %esp,%ebp
109fbb: 57 push %edi
109fbc: 56 push %esi
109fbd: 53 push %ebx
109fbe: 83 ec 0c sub $0xc,%esp
109fc1: 8b 75 08 mov 0x8(%ebp),%esi
109fc4: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
109fc7: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
109fcc: 85 f6 test %esi,%esi
109fce: 74 6f je 10a03f <rtems_timer_create+0x87><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
109fd0: b0 09 mov $0x9,%al
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
109fd2: 85 db test %ebx,%ebx
109fd4: 74 69 je 10a03f <rtems_timer_create+0x87><== NEVER TAKEN
109fd6: a1 b0 53 12 00 mov 0x1253b0,%eax
109fdb: 40 inc %eax
109fdc: a3 b0 53 12 00 mov %eax,0x1253b0
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
109fe1: 83 ec 0c sub $0xc,%esp
109fe4: 68 00 56 12 00 push $0x125600
109fe9: e8 8a 0c 00 00 call 10ac78 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
109fee: 83 c4 10 add $0x10,%esp
109ff1: 85 c0 test %eax,%eax
109ff3: 75 0c jne 10a001 <rtems_timer_create+0x49><== ALWAYS TAKEN
_Thread_Enable_dispatch();
109ff5: e8 bc 1a 00 00 call 10bab6 <_Thread_Enable_dispatch><== NOT EXECUTED
return RTEMS_TOO_MANY;
109ffa: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED
109fff: eb 3e jmp 10a03f <rtems_timer_create+0x87><== NOT EXECUTED
}
the_timer->the_class = TIMER_DORMANT;
10a001: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10a008: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10a00f: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10a016: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10a01d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a024: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10a027: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a02a: 8b 0d 1c 56 12 00 mov 0x12561c,%ecx
10a030: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10a033: 89 70 0c mov %esi,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10a036: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10a038: e8 79 1a 00 00 call 10bab6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a03d: 31 c0 xor %eax,%eax
}
10a03f: 8d 65 f4 lea -0xc(%ebp),%esp
10a042: 5b pop %ebx
10a043: 5e pop %esi
10a044: 5f pop %edi
10a045: c9 leave
10a046: c3 ret
00115b84 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
115b84: 55 push %ebp
115b85: 89 e5 mov %esp,%ebp
115b87: 53 push %ebx
115b88: 83 ec 18 sub $0x18,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115b8b: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
115b8e: 50 push %eax
115b8f: ff 75 08 pushl 0x8(%ebp)
115b92: 68 d0 c8 13 00 push $0x13c8d0
115b97: e8 68 25 00 00 call 118104 <_Objects_Get>
115b9c: 89 c3 mov %eax,%ebx
switch ( location ) {
115b9e: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115ba1: b8 04 00 00 00 mov $0x4,%eax
{
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
115ba6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115baa: 75 2f jne 115bdb <rtems_timer_delete+0x57><== NEVER TAKEN
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
115bac: 51 push %ecx
115bad: 51 push %ecx
115bae: 53 push %ebx
115baf: 68 d0 c8 13 00 push $0x13c8d0
115bb4: e8 4f 21 00 00 call 117d08 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
115bb9: 8d 43 10 lea 0x10(%ebx),%eax
115bbc: 89 04 24 mov %eax,(%esp)
115bbf: e8 8c 3e 00 00 call 119a50 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
115bc4: 58 pop %eax
115bc5: 5a pop %edx
115bc6: 53 push %ebx
115bc7: 68 d0 c8 13 00 push $0x13c8d0
115bcc: e8 bf 23 00 00 call 117f90 <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
115bd1: e8 ac 2f 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115bd6: 83 c4 10 add $0x10,%esp
115bd9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115bdb: 8b 5d fc mov -0x4(%ebp),%ebx
115bde: c9 leave
115bdf: c3 ret
0010a048 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10a048: 55 push %ebp
10a049: 89 e5 mov %esp,%ebp
10a04b: 57 push %edi
10a04c: 56 push %esi
10a04d: 53 push %ebx
10a04e: 83 ec 1c sub $0x1c,%esp
10a051: 8b 7d 08 mov 0x8(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
10a054: b8 0a 00 00 00 mov $0xa,%eax
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10a059: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10a05d: 0f 84 85 00 00 00 je 10a0e8 <rtems_timer_fire_after+0xa0><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10a063: b0 09 mov $0x9,%al
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
10a065: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10a069: 74 7d je 10a0e8 <rtems_timer_fire_after+0xa0><== NEVER TAKEN
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
10a06b: 52 push %edx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
10a06c: 8d 45 e4 lea -0x1c(%ebp),%eax
10a06f: 50 push %eax
10a070: 57 push %edi
10a071: 68 00 56 12 00 push $0x125600
10a076: e8 29 10 00 00 call 10b0a4 <_Objects_Get>
10a07b: 89 c3 mov %eax,%ebx
switch ( location ) {
10a07d: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a080: b8 04 00 00 00 mov $0x4,%eax
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10a085: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a089: 75 5d jne 10a0e8 <rtems_timer_fire_after+0xa0><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10a08b: 8d 73 10 lea 0x10(%ebx),%esi
10a08e: 83 ec 0c sub $0xc,%esp
10a091: 56 push %esi
10a092: e8 f5 26 00 00 call 10c78c <_Watchdog_Remove>
_ISR_Disable( level );
10a097: 9c pushf
10a098: fa cli
10a099: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
10a09a: 83 c4 10 add $0x10,%esp
10a09d: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10a0a1: 74 09 je 10a0ac <rtems_timer_fire_after+0x64>
_ISR_Enable( level );
10a0a3: 50 push %eax
10a0a4: 9d popf
_Thread_Enable_dispatch();
10a0a5: e8 0c 1a 00 00 call 10bab6 <_Thread_Enable_dispatch>
10a0aa: eb 3a jmp 10a0e6 <rtems_timer_fire_after+0x9e>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
10a0ac: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10a0b3: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
10a0ba: 8b 55 10 mov 0x10(%ebp),%edx
10a0bd: 89 53 2c mov %edx,0x2c(%ebx)
the_watchdog->id = id;
10a0c0: 89 7b 30 mov %edi,0x30(%ebx)
the_watchdog->user_data = user_data;
10a0c3: 8b 55 14 mov 0x14(%ebp),%edx
10a0c6: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10a0c9: 50 push %eax
10a0ca: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a0cb: 8b 45 0c mov 0xc(%ebp),%eax
10a0ce: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a0d1: 50 push %eax
10a0d2: 50 push %eax
10a0d3: 56 push %esi
10a0d4: 68 70 54 12 00 push $0x125470
10a0d9: e8 8e 25 00 00 call 10c66c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10a0de: e8 d3 19 00 00 call 10bab6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a0e3: 83 c4 10 add $0x10,%esp
10a0e6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a0e8: 8d 65 f4 lea -0xc(%ebp),%esp
10a0eb: 5b pop %ebx
10a0ec: 5e pop %esi
10a0ed: 5f pop %edi
10a0ee: c9 leave
10a0ef: c3 ret
00115c88 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
115c88: 55 push %ebp
115c89: 89 e5 mov %esp,%ebp
115c8b: 57 push %edi
115c8c: 56 push %esi
115c8d: 53 push %ebx
115c8e: 83 ec 1c sub $0x1c,%esp
115c91: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
115c94: b8 0b 00 00 00 mov $0xb,%eax
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
115c99: 80 3d 48 c6 13 00 00 cmpb $0x0,0x13c648
115ca0: 0f 84 b0 00 00 00 je 115d56 <rtems_timer_fire_when+0xce>
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
115ca6: 83 ec 0c sub $0xc,%esp
115ca9: 53 push %ebx
115caa: e8 55 d9 ff ff call 113604 <_TOD_Validate>
115caf: 88 c2 mov %al,%dl
115cb1: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
115cb4: b8 14 00 00 00 mov $0x14,%eax
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
115cb9: 84 d2 test %dl,%dl
115cbb: 0f 84 95 00 00 00 je 115d56 <rtems_timer_fire_when+0xce><== NEVER TAKEN
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
115cc1: b0 09 mov $0x9,%al
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
115cc3: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
115cc7: 0f 84 89 00 00 00 je 115d56 <rtems_timer_fire_when+0xce><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
115ccd: 83 ec 0c sub $0xc,%esp
115cd0: 53 push %ebx
115cd1: e8 c6 d8 ff ff call 11359c <_TOD_To_seconds>
115cd6: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
115cd8: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
115cdb: b8 14 00 00 00 mov $0x14,%eax
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
115ce0: 3b 3d c0 c6 13 00 cmp 0x13c6c0,%edi
115ce6: 76 6e jbe 115d56 <rtems_timer_fire_when+0xce><== NEVER TAKEN
115ce8: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
115ce9: 8d 45 e4 lea -0x1c(%ebp),%eax
115cec: 50 push %eax
115ced: ff 75 08 pushl 0x8(%ebp)
115cf0: 68 d0 c8 13 00 push $0x13c8d0
115cf5: e8 0a 24 00 00 call 118104 <_Objects_Get>
115cfa: 89 c3 mov %eax,%ebx
switch ( location ) {
115cfc: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115cff: b8 04 00 00 00 mov $0x4,%eax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
115d04: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
115d08: 75 4c jne 115d56 <rtems_timer_fire_when+0xce><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
115d0a: 8d 73 10 lea 0x10(%ebx),%esi
115d0d: 83 ec 0c sub $0xc,%esp
115d10: 56 push %esi
115d11: e8 3a 3d 00 00 call 119a50 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
115d16: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
115d1d: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
115d24: 8b 45 10 mov 0x10(%ebp),%eax
115d27: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
115d2a: 8b 45 08 mov 0x8(%ebp),%eax
115d2d: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
115d30: 8b 45 14 mov 0x14(%ebp),%eax
115d33: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
115d36: 2b 3d c0 c6 13 00 sub 0x13c6c0,%edi
115d3c: 89 7b 1c mov %edi,0x1c(%ebx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
115d3f: 58 pop %eax
115d40: 5a pop %edx
115d41: 56 push %esi
115d42: 68 ec c6 13 00 push $0x13c6ec
115d47: e8 e4 3b 00 00 call 119930 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
115d4c: e8 31 2e 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115d51: 83 c4 10 add $0x10,%esp
115d54: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115d56: 8d 65 f4 lea -0xc(%ebp),%esp
115d59: 5b pop %ebx
115d5a: 5e pop %esi
115d5b: 5f pop %edi
115d5c: c9 leave
115d5d: c3 ret
00115d60 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
115d60: 55 push %ebp
115d61: 89 e5 mov %esp,%ebp
115d63: 53 push %ebx
115d64: 83 ec 14 sub $0x14,%esp
115d67: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
115d6a: b8 09 00 00 00 mov $0x9,%eax
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
115d6f: 85 db test %ebx,%ebx
115d71: 74 40 je 115db3 <rtems_timer_get_information+0x53><== NEVER TAKEN
115d73: 50 push %eax
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
115d74: 8d 45 f4 lea -0xc(%ebp),%eax
115d77: 50 push %eax
115d78: ff 75 08 pushl 0x8(%ebp)
115d7b: 68 d0 c8 13 00 push $0x13c8d0
115d80: e8 7f 23 00 00 call 118104 <_Objects_Get>
switch ( location ) {
115d85: 83 c4 10 add $0x10,%esp
115d88: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115d8c: 75 20 jne 115dae <rtems_timer_get_information+0x4e><== NEVER TAKEN
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
115d8e: 8b 50 38 mov 0x38(%eax),%edx
115d91: 89 13 mov %edx,(%ebx)
the_info->initial = the_timer->Ticker.initial;
115d93: 8b 50 1c mov 0x1c(%eax),%edx
115d96: 89 53 04 mov %edx,0x4(%ebx)
the_info->start_time = the_timer->Ticker.start_time;
115d99: 8b 50 24 mov 0x24(%eax),%edx
115d9c: 89 53 08 mov %edx,0x8(%ebx)
the_info->stop_time = the_timer->Ticker.stop_time;
115d9f: 8b 40 28 mov 0x28(%eax),%eax
115da2: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
115da5: e8 d8 2d 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115daa: 31 c0 xor %eax,%eax
115dac: eb 05 jmp 115db3 <rtems_timer_get_information+0x53>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115dae: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
}
115db3: 8b 5d fc mov -0x4(%ebp),%ebx
115db6: c9 leave
115db7: c3 ret
00116311 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
116311: 55 push %ebp
116312: 89 e5 mov %esp,%ebp
116314: 53 push %ebx
116315: 83 ec 24 sub $0x24,%esp
116318: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
11631b: 31 c0 xor %eax,%eax
11631d: 85 d2 test %edx,%edx
11631f: 74 0f je 116330 <rtems_timer_initiate_server+0x1f><== NEVER TAKEN
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
116321: 0f b6 05 24 42 13 00 movzbl 0x134224,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
116328: 39 c2 cmp %eax,%edx
11632a: 0f 96 c0 setbe %al
11632d: 0f b6 c0 movzbl %al,%eax
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
116330: 85 c0 test %eax,%eax
116332: 75 0d jne 116341 <rtems_timer_initiate_server+0x30>
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
116334: b0 13 mov $0x13,%al
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
116336: 42 inc %edx
116337: 0f 85 4b 01 00 00 jne 116488 <rtems_timer_initiate_server+0x177>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
11633d: 31 db xor %ebx,%ebx
11633f: eb 02 jmp 116343 <rtems_timer_initiate_server+0x32>
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
116341: 89 d3 mov %edx,%ebx
}
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
116343: e8 a0 fc ff ff call 115fe8 <_Thread_Disable_dispatch>
tmpInitialized = initialized;
116348: 8a 15 f8 7f 13 00 mov 0x137ff8,%dl
initialized = true;
11634e: c6 05 f8 7f 13 00 01 movb $0x1,0x137ff8
_Thread_Enable_dispatch();
116355: 88 55 e4 mov %dl,-0x1c(%ebp)
116358: e8 25 28 00 00 call 118b82 <_Thread_Enable_dispatch>
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
11635d: b8 0e 00 00 00 mov $0xe,%eax
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
116362: 8a 55 e4 mov -0x1c(%ebp),%dl
116365: 84 d2 test %dl,%dl
116367: 0f 85 1b 01 00 00 jne 116488 <rtems_timer_initiate_server+0x177>
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
11636d: 51 push %ecx
11636e: 51 push %ecx
11636f: 8d 45 f4 lea -0xc(%ebp),%eax
116372: 50 push %eax
116373: 8b 45 10 mov 0x10(%ebp),%eax
116376: 80 cc 80 or $0x80,%ah
116379: 50 push %eax
11637a: 68 00 01 00 00 push $0x100
11637f: ff 75 0c pushl 0xc(%ebp)
116382: 53 push %ebx
116383: 68 45 4d 49 54 push $0x54494d45
116388: e8 5b ef ff ff call 1152e8 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
11638d: 83 c4 20 add $0x20,%esp
116390: 85 c0 test %eax,%eax
116392: 74 0c je 1163a0 <rtems_timer_initiate_server+0x8f><== ALWAYS TAKEN
initialized = false;
116394: c6 05 f8 7f 13 00 00 movb $0x0,0x137ff8 <== NOT EXECUTED
return status;
11639b: e9 e8 00 00 00 jmp 116488 <rtems_timer_initiate_server+0x177><== NOT EXECUTED
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
1163a0: 8b 45 f4 mov -0xc(%ebp),%eax
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
1163a3: 0f b7 c8 movzwl %ax,%ecx
1163a6: 8b 15 e8 c5 13 00 mov 0x13c5e8,%edx
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
1163ac: 8b 14 8a mov (%edx,%ecx,4),%edx
1163af: 89 15 78 7f 13 00 mov %edx,0x137f78
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1163b5: c7 05 a8 7f 13 00 ac movl $0x137fac,0x137fa8
1163bc: 7f 13 00
head->previous = NULL;
1163bf: c7 05 ac 7f 13 00 00 movl $0x0,0x137fac
1163c6: 00 00 00
tail->previous = head;
1163c9: c7 05 b0 7f 13 00 a8 movl $0x137fa8,0x137fb0
1163d0: 7f 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1163d3: c7 05 e0 7f 13 00 e4 movl $0x137fe4,0x137fe0
1163da: 7f 13 00
head->previous = NULL;
1163dd: c7 05 e4 7f 13 00 00 movl $0x0,0x137fe4
1163e4: 00 00 00
tail->previous = head;
1163e7: c7 05 e8 7f 13 00 e0 movl $0x137fe0,0x137fe8
1163ee: 7f 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1163f1: c7 05 88 7f 13 00 00 movl $0x0,0x137f88
1163f8: 00 00 00
the_watchdog->routine = routine;
1163fb: c7 05 9c 7f 13 00 10 movl $0x118a10,0x137f9c
116402: 8a 11 00
the_watchdog->id = id;
116405: a3 a0 7f 13 00 mov %eax,0x137fa0
the_watchdog->user_data = user_data;
11640a: c7 05 a4 7f 13 00 00 movl $0x0,0x137fa4
116411: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
116414: c7 05 c0 7f 13 00 00 movl $0x0,0x137fc0
11641b: 00 00 00
the_watchdog->routine = routine;
11641e: c7 05 d4 7f 13 00 10 movl $0x118a10,0x137fd4
116425: 8a 11 00
the_watchdog->id = id;
116428: a3 d8 7f 13 00 mov %eax,0x137fd8
the_watchdog->user_data = user_data;
11642d: c7 05 dc 7f 13 00 00 movl $0x0,0x137fdc
116434: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
116437: c7 05 7c 7f 13 00 04 movl $0x116204,0x137f7c
11643e: 62 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
116441: 8b 15 48 c7 13 00 mov 0x13c748,%edx
116447: 89 15 b4 7f 13 00 mov %edx,0x137fb4
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11644d: 8b 15 c0 c6 13 00 mov 0x13c6c0,%edx
116453: 89 15 ec 7f 13 00 mov %edx,0x137fec
ts->insert_chain = NULL;
116459: c7 05 f0 7f 13 00 00 movl $0x0,0x137ff0
116460: 00 00 00
ts->active = false;
116463: c6 05 f4 7f 13 00 00 movb $0x0,0x137ff4
/*
* The default timer server is now available.
*/
_Timer_server = ts;
11646a: c7 05 10 c9 13 00 78 movl $0x137f78,0x13c910
116471: 7f 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
116474: 52 push %edx
116475: 68 78 7f 13 00 push $0x137f78
11647a: 68 84 60 11 00 push $0x116084
11647f: 50 push %eax
116480: e8 47 f4 ff ff call 1158cc <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
116485: 83 c4 10 add $0x10,%esp
}
116488: 8b 5d fc mov -0x4(%ebp),%ebx
11648b: c9 leave
11648c: c3 ret
00115ddc <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
115ddc: 55 push %ebp
115ddd: 89 e5 mov %esp,%ebp
115ddf: 56 push %esi
115de0: 53 push %ebx
115de1: 83 ec 14 sub $0x14,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
115de4: 8d 45 f4 lea -0xc(%ebp),%eax
115de7: 50 push %eax
115de8: ff 75 08 pushl 0x8(%ebp)
115deb: 68 d0 c8 13 00 push $0x13c8d0
115df0: e8 0f 23 00 00 call 118104 <_Objects_Get>
115df5: 89 c3 mov %eax,%ebx
switch ( location ) {
115df7: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115dfa: be 04 00 00 00 mov $0x4,%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
115dff: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115e03: 75 4d jne 115e52 <rtems_timer_reset+0x76><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
115e05: 8b 40 38 mov 0x38(%eax),%eax
115e08: 85 c0 test %eax,%eax
115e0a: 75 1b jne 115e27 <rtems_timer_reset+0x4b>
_Watchdog_Remove( &the_timer->Ticker );
115e0c: 83 c3 10 add $0x10,%ebx
115e0f: 83 ec 0c sub $0xc,%esp
115e12: 53 push %ebx
115e13: e8 38 3c 00 00 call 119a50 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
115e18: 59 pop %ecx
115e19: 5e pop %esi
115e1a: 53 push %ebx
115e1b: 68 f8 c6 13 00 push $0x13c6f8
115e20: e8 0b 3b 00 00 call 119930 <_Watchdog_Insert>
115e25: eb 21 jmp 115e48 <rtems_timer_reset+0x6c>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
115e27: be 0b 00 00 00 mov $0xb,%esi
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
115e2c: 48 dec %eax
115e2d: 75 1e jne 115e4d <rtems_timer_reset+0x71><== NEVER TAKEN
Timer_server_Control *timer_server = _Timer_server;
115e2f: 8b 35 10 c9 13 00 mov 0x13c910,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
115e35: 83 ec 0c sub $0xc,%esp
115e38: 8d 43 10 lea 0x10(%ebx),%eax
115e3b: 50 push %eax
115e3c: e8 0f 3c 00 00 call 119a50 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
115e41: 58 pop %eax
115e42: 5a pop %edx
115e43: 53 push %ebx
115e44: 56 push %esi
115e45: ff 56 04 call *0x4(%esi)
115e48: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
115e4b: 31 f6 xor %esi,%esi
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
115e4d: e8 30 2d 00 00 call 118b82 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115e52: 89 f0 mov %esi,%eax
115e54: 8d 65 f8 lea -0x8(%ebp),%esp
115e57: 5b pop %ebx
115e58: 5e pop %esi
115e59: c9 leave
115e5a: c3 ret
00115e5c <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
115e5c: 55 push %ebp
115e5d: 89 e5 mov %esp,%ebp
115e5f: 57 push %edi
115e60: 56 push %esi
115e61: 53 push %ebx
115e62: 83 ec 1c sub $0x1c,%esp
115e65: 8b 7d 08 mov 0x8(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
115e68: 8b 35 10 c9 13 00 mov 0x13c910,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
115e6e: b8 0e 00 00 00 mov $0xe,%eax
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
115e73: 85 f6 test %esi,%esi
115e75: 0f 84 87 00 00 00 je 115f02 <rtems_timer_server_fire_after+0xa6><== NEVER TAKEN
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
115e7b: b0 09 mov $0x9,%al
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
115e7d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
115e81: 74 7f je 115f02 <rtems_timer_server_fire_after+0xa6><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
115e83: b0 0a mov $0xa,%al
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
115e85: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
115e89: 74 77 je 115f02 <rtems_timer_server_fire_after+0xa6><== NEVER TAKEN
115e8b: 52 push %edx
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
115e8c: 8d 45 e4 lea -0x1c(%ebp),%eax
115e8f: 50 push %eax
115e90: 57 push %edi
115e91: 68 d0 c8 13 00 push $0x13c8d0
115e96: e8 69 22 00 00 call 118104 <_Objects_Get>
115e9b: 89 c3 mov %eax,%ebx
switch ( location ) {
115e9d: 83 c4 10 add $0x10,%esp
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115ea0: b8 04 00 00 00 mov $0x4,%eax
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
115ea5: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
115ea9: 75 57 jne 115f02 <rtems_timer_server_fire_after+0xa6><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
115eab: 83 ec 0c sub $0xc,%esp
115eae: 8d 43 10 lea 0x10(%ebx),%eax
115eb1: 50 push %eax
115eb2: e8 99 3b 00 00 call 119a50 <_Watchdog_Remove>
_ISR_Disable( level );
115eb7: 9c pushf
115eb8: fa cli
115eb9: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
115eba: 83 c4 10 add $0x10,%esp
115ebd: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
115ec1: 74 09 je 115ecc <rtems_timer_server_fire_after+0x70>
_ISR_Enable( level );
115ec3: 50 push %eax
115ec4: 9d popf
_Thread_Enable_dispatch();
115ec5: e8 b8 2c 00 00 call 118b82 <_Thread_Enable_dispatch>
115eca: eb 34 jmp 115f00 <rtems_timer_server_fire_after+0xa4>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
115ecc: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
115ed3: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
115eda: 8b 55 10 mov 0x10(%ebp),%edx
115edd: 89 53 2c mov %edx,0x2c(%ebx)
the_watchdog->id = id;
115ee0: 89 7b 30 mov %edi,0x30(%ebx)
the_watchdog->user_data = user_data;
115ee3: 8b 55 14 mov 0x14(%ebp),%edx
115ee6: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
115ee9: 8b 55 0c mov 0xc(%ebp),%edx
115eec: 89 53 1c mov %edx,0x1c(%ebx)
_ISR_Enable( level );
115eef: 50 push %eax
115ef0: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
115ef1: 50 push %eax
115ef2: 50 push %eax
115ef3: 53 push %ebx
115ef4: 56 push %esi
115ef5: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
115ef8: e8 85 2c 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115efd: 83 c4 10 add $0x10,%esp
115f00: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f02: 8d 65 f4 lea -0xc(%ebp),%esp
115f05: 5b pop %ebx
115f06: 5e pop %esi
115f07: 5f pop %edi
115f08: c9 leave
115f09: c3 ret
00115f0c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
115f0c: 55 push %ebp
115f0d: 89 e5 mov %esp,%ebp
115f0f: 57 push %edi
115f10: 56 push %esi
115f11: 53 push %ebx
115f12: 83 ec 1c sub $0x1c,%esp
115f15: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
115f18: 8b 35 10 c9 13 00 mov 0x13c910,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
115f1e: 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 )
115f23: 85 f6 test %esi,%esi
115f25: 0f 84 b1 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
115f2b: b3 0b mov $0xb,%bl
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
115f2d: 80 3d 48 c6 13 00 00 cmpb $0x0,0x13c648
115f34: 0f 84 a2 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
115f3a: b3 09 mov $0x9,%bl
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
115f3c: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
115f40: 0f 84 96 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f46: 83 ec 0c sub $0xc,%esp
115f49: 57 push %edi
115f4a: e8 b5 d6 ff ff call 113604 <_TOD_Validate>
115f4f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
115f52: b3 14 mov $0x14,%bl
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f54: 84 c0 test %al,%al
115f56: 0f 84 80 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
115f5c: 83 ec 0c sub $0xc,%esp
115f5f: 57 push %edi
115f60: e8 37 d6 ff ff call 11359c <_TOD_To_seconds>
115f65: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
115f67: 83 c4 10 add $0x10,%esp
115f6a: 3b 05 c0 c6 13 00 cmp 0x13c6c0,%eax
115f70: 76 6a jbe 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
115f72: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
115f73: 8d 45 e4 lea -0x1c(%ebp),%eax
115f76: 50 push %eax
115f77: ff 75 08 pushl 0x8(%ebp)
115f7a: 68 d0 c8 13 00 push $0x13c8d0
115f7f: e8 80 21 00 00 call 118104 <_Objects_Get>
115f84: 89 c3 mov %eax,%ebx
switch ( location ) {
115f86: 83 c4 10 add $0x10,%esp
115f89: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
115f8d: 75 48 jne 115fd7 <rtems_timer_server_fire_when+0xcb><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
115f8f: 83 ec 0c sub $0xc,%esp
115f92: 8d 40 10 lea 0x10(%eax),%eax
115f95: 50 push %eax
115f96: e8 b5 3a 00 00 call 119a50 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
115f9b: 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;
115fa2: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
115fa9: 8b 45 10 mov 0x10(%ebp),%eax
115fac: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
115faf: 8b 45 08 mov 0x8(%ebp),%eax
115fb2: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
115fb5: 8b 45 14 mov 0x14(%ebp),%eax
115fb8: 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();
115fbb: 2b 3d c0 c6 13 00 sub 0x13c6c0,%edi
115fc1: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
115fc4: 58 pop %eax
115fc5: 5a pop %edx
115fc6: 53 push %ebx
115fc7: 56 push %esi
115fc8: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
115fcb: e8 b2 2b 00 00 call 118b82 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fd0: 83 c4 10 add $0x10,%esp
115fd3: 31 db xor %ebx,%ebx
115fd5: eb 05 jmp 115fdc <rtems_timer_server_fire_when+0xd0>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fd7: bb 04 00 00 00 mov $0x4,%ebx <== NOT EXECUTED
}
115fdc: 89 d8 mov %ebx,%eax
115fde: 8d 65 f4 lea -0xc(%ebp),%esp
115fe1: 5b pop %ebx
115fe2: 5e pop %esi
115fe3: 5f pop %edi
115fe4: c9 leave
115fe5: c3 ret