RTEMS 4.10Annotated Report
Fri May 21 23:09:10 2010
00117450 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
117450: 55 push %ebp
117451: 89 e5 mov %esp,%ebp
117453: 57 push %edi
117454: 56 push %esi
117455: 53 push %ebx
117456: 83 ec 1c sub $0x1c,%esp
117459: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11745c: b8 01 00 00 00 mov $0x1,%eax
117461: 8b 55 10 mov 0x10(%ebp),%edx
117464: 3b 53 4c cmp 0x4c(%ebx),%edx
117467: 77 4c ja 1174b5 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
117469: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
117470: 83 7b 48 00 cmpl $0x0,0x48(%ebx)
117474: 74 23 je 117499 <_CORE_message_queue_Broadcast+0x49>
*count = 0;
117476: 8b 45 1c mov 0x1c(%ebp),%eax
117479: c7 00 00 00 00 00 movl $0x0,(%eax)
11747f: eb 32 jmp 1174b3 <_CORE_message_queue_Broadcast+0x63>
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
117481: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
117484: 8b 42 2c mov 0x2c(%edx),%eax
117487: 89 c7 mov %eax,%edi
117489: 8b 75 0c mov 0xc(%ebp),%esi
11748c: 8b 4d 10 mov 0x10(%ebp),%ecx
11748f: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
117491: 8b 42 28 mov 0x28(%edx),%eax
117494: 8b 55 10 mov 0x10(%ebp),%edx
117497: 89 10 mov %edx,(%eax)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
117499: 83 ec 0c sub $0xc,%esp
11749c: 53 push %ebx
11749d: e8 ae 20 00 00 call 119550 <_Thread_queue_Dequeue>
1174a2: 89 c2 mov %eax,%edx
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
1174a4: 83 c4 10 add $0x10,%esp
1174a7: 85 c0 test %eax,%eax
1174a9: 75 d6 jne 117481 <_CORE_message_queue_Broadcast+0x31>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
1174ab: 8b 55 e4 mov -0x1c(%ebp),%edx
1174ae: 8b 45 1c mov 0x1c(%ebp),%eax
1174b1: 89 10 mov %edx,(%eax)
1174b3: 31 c0 xor %eax,%eax
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
1174b5: 8d 65 f4 lea -0xc(%ebp),%esp
1174b8: 5b pop %ebx
1174b9: 5e pop %esi
1174ba: 5f pop %edi
1174bb: c9 leave
1174bc: c3 ret
00112334 <_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
)
{
112334: 55 push %ebp
112335: 89 e5 mov %esp,%ebp
112337: 57 push %edi
112338: 56 push %esi
112339: 53 push %ebx
11233a: 83 ec 0c sub $0xc,%esp
11233d: 8b 5d 08 mov 0x8(%ebp),%ebx
112340: 8b 75 10 mov 0x10(%ebp),%esi
112343: 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;
112346: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
112349: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
112350: 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)) {
112353: 89 d0 mov %edx,%eax
112355: f6 c2 03 test $0x3,%dl
112358: 74 0a je 112364 <_CORE_message_queue_Initialize+0x30>
allocated_message_size += sizeof(uint32_t);
11235a: 8d 42 04 lea 0x4(%edx),%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
11235d: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
112360: 39 d0 cmp %edx,%eax
112362: 72 5f jb 1123c3 <_CORE_message_queue_Initialize+0x8f><== 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));
112364: 8d 78 10 lea 0x10(%eax),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
112367: 89 fa mov %edi,%edx
112369: 0f af d6 imul %esi,%edx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
11236c: 39 c2 cmp %eax,%edx
11236e: 72 53 jb 1123c3 <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
112370: 83 ec 0c sub $0xc,%esp
112373: 52 push %edx
112374: e8 03 25 00 00 call 11487c <_Workspace_Allocate>
112379: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
11237c: 83 c4 10 add $0x10,%esp
11237f: 85 c0 test %eax,%eax
112381: 74 40 je 1123c3 <_CORE_message_queue_Initialize+0x8f>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
112383: 57 push %edi
112384: 56 push %esi
112385: 50 push %eax
112386: 8d 43 60 lea 0x60(%ebx),%eax
112389: 50 push %eax
11238a: e8 25 3d 00 00 call 1160b4 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11238f: 8d 43 54 lea 0x54(%ebx),%eax
112392: 89 43 50 mov %eax,0x50(%ebx)
the_chain->permanent_null = NULL;
112395: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_chain->last = _Chain_Head(the_chain);
11239c: 8d 43 50 lea 0x50(%ebx),%eax
11239f: 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(
1123a2: 6a 06 push $0x6
1123a4: 68 80 00 00 00 push $0x80
1123a9: 8b 45 0c mov 0xc(%ebp),%eax
1123ac: 83 38 01 cmpl $0x1,(%eax)
1123af: 0f 94 c0 sete %al
1123b2: 0f b6 c0 movzbl %al,%eax
1123b5: 50 push %eax
1123b6: 53 push %ebx
1123b7: e8 cc 1b 00 00 call 113f88 <_Thread_queue_Initialize>
1123bc: b0 01 mov $0x1,%al
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
1123be: 83 c4 20 add $0x20,%esp
1123c1: eb 02 jmp 1123c5 <_CORE_message_queue_Initialize+0x91>
1123c3: 31 c0 xor %eax,%eax
}
1123c5: 8d 65 f4 lea -0xc(%ebp),%esp
1123c8: 5b pop %ebx
1123c9: 5e pop %esi
1123ca: 5f pop %edi
1123cb: c9 leave
1123cc: c3 ret
001123d0 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
1123d0: 55 push %ebp
1123d1: 89 e5 mov %esp,%ebp
1123d3: 57 push %edi
1123d4: 56 push %esi
1123d5: 53 push %ebx
1123d6: 83 ec 2c sub $0x2c,%esp
1123d9: 8b 45 08 mov 0x8(%ebp),%eax
1123dc: 8b 55 0c mov 0xc(%ebp),%edx
1123df: 89 55 dc mov %edx,-0x24(%ebp)
1123e2: 8b 55 10 mov 0x10(%ebp),%edx
1123e5: 89 55 e0 mov %edx,-0x20(%ebp)
1123e8: 8b 7d 14 mov 0x14(%ebp),%edi
1123eb: 8b 55 1c mov 0x1c(%ebp),%edx
1123ee: 89 55 d4 mov %edx,-0x2c(%ebp)
1123f1: 8a 55 18 mov 0x18(%ebp),%dl
1123f4: 88 55 db mov %dl,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
1123f7: 8b 0d a0 b3 12 00 mov 0x12b3a0,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
1123fd: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
112404: 9c pushf
112405: fa cli
112406: 8f 45 e4 popl -0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
112409: 8b 50 50 mov 0x50(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11240c: 8d 58 54 lea 0x54(%eax),%ebx
11240f: 39 da cmp %ebx,%edx
112411: 74 47 je 11245a <_CORE_message_queue_Seize+0x8a>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
112413: 8b 32 mov (%edx),%esi
the_chain->first = new_first;
112415: 89 70 50 mov %esi,0x50(%eax)
new_first->previous = _Chain_Head(the_chain);
112418: 8d 58 50 lea 0x50(%eax),%ebx
11241b: 89 5e 04 mov %ebx,0x4(%esi)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
11241e: 85 d2 test %edx,%edx
112420: 74 38 je 11245a <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
112422: ff 48 48 decl 0x48(%eax)
_ISR_Enable( level );
112425: ff 75 e4 pushl -0x1c(%ebp)
112428: 9d popf
*size_p = the_message->Contents.size;
112429: 8b 4a 08 mov 0x8(%edx),%ecx
11242c: 89 0f mov %ecx,(%edi)
_Thread_Executing->Wait.count =
11242e: 8b 0d a0 b3 12 00 mov 0x12b3a0,%ecx
112434: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11243b: 8d 72 0c lea 0xc(%edx),%esi
11243e: 8b 0f mov (%edi),%ecx
112440: 8b 7d e0 mov -0x20(%ebp),%edi
112443: 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 );
112445: 89 55 0c mov %edx,0xc(%ebp)
112448: 83 c0 60 add $0x60,%eax
11244b: 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 );
}
11244e: 83 c4 2c add $0x2c,%esp
112451: 5b pop %ebx
112452: 5e pop %esi
112453: 5f pop %edi
112454: c9 leave
112455: e9 5a fe ff ff jmp 1122b4 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
11245a: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
11245e: 75 13 jne 112473 <_CORE_message_queue_Seize+0xa3>
_ISR_Enable( level );
112460: ff 75 e4 pushl -0x1c(%ebp)
112463: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
112464: 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 );
}
11246b: 83 c4 2c add $0x2c,%esp
11246e: 5b pop %ebx
11246f: 5e pop %esi
112470: 5f pop %edi
112471: c9 leave
112472: c3 ret
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
112473: 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;
11247a: 89 41 44 mov %eax,0x44(%ecx)
executing->Wait.id = id;
11247d: 8b 55 dc mov -0x24(%ebp),%edx
112480: 89 51 20 mov %edx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
112483: 8b 55 e0 mov -0x20(%ebp),%edx
112486: 89 51 2c mov %edx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
112489: 89 79 28 mov %edi,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
11248c: ff 75 e4 pushl -0x1c(%ebp)
11248f: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
112490: c7 45 10 2c 40 11 00 movl $0x11402c,0x10(%ebp)
112497: 8b 55 d4 mov -0x2c(%ebp),%edx
11249a: 89 55 0c mov %edx,0xc(%ebp)
11249d: 89 45 08 mov %eax,0x8(%ebp)
}
1124a0: 83 c4 2c add $0x2c,%esp
1124a3: 5b pop %ebx
1124a4: 5e pop %esi
1124a5: 5f pop %edi
1124a6: 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 );
1124a7: e9 c4 18 00 00 jmp 113d70 <_Thread_queue_Enqueue_with_handler>
0010a9d5 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10a9d5: 55 push %ebp
10a9d6: 89 e5 mov %esp,%ebp
10a9d8: 53 push %ebx
10a9d9: 83 ec 14 sub $0x14,%esp
10a9dc: 8b 5d 08 mov 0x8(%ebp),%ebx
10a9df: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10a9e2: a1 54 3a 12 00 mov 0x123a54,%eax
10a9e7: 85 c0 test %eax,%eax
10a9e9: 74 19 je 10aa04 <_CORE_mutex_Seize+0x2f>
10a9eb: 84 d2 test %dl,%dl
10a9ed: 74 15 je 10aa04 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10a9ef: 83 3d ec 3b 12 00 01 cmpl $0x1,0x123bec
10a9f6: 76 0c jbe 10aa04 <_CORE_mutex_Seize+0x2f>
10a9f8: 53 push %ebx
10a9f9: 6a 13 push $0x13
10a9fb: 6a 00 push $0x0
10a9fd: 6a 00 push $0x0
10a9ff: e8 60 05 00 00 call 10af64 <_Internal_error_Occurred>
10aa04: 51 push %ecx
10aa05: 51 push %ecx
10aa06: 8d 45 18 lea 0x18(%ebp),%eax
10aa09: 50 push %eax
10aa0a: 53 push %ebx
10aa0b: 88 55 f4 mov %dl,-0xc(%ebp)
10aa0e: e8 4d 3a 00 00 call 10e460 <_CORE_mutex_Seize_interrupt_trylock>
10aa13: 83 c4 10 add $0x10,%esp
10aa16: 85 c0 test %eax,%eax
10aa18: 8a 55 f4 mov -0xc(%ebp),%dl
10aa1b: 74 48 je 10aa65 <_CORE_mutex_Seize+0x90>
10aa1d: 84 d2 test %dl,%dl
10aa1f: 75 12 jne 10aa33 <_CORE_mutex_Seize+0x5e>
10aa21: ff 75 18 pushl 0x18(%ebp)
10aa24: 9d popf
10aa25: a1 10 3b 12 00 mov 0x123b10,%eax
10aa2a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10aa31: eb 32 jmp 10aa65 <_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;
10aa33: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10aa3a: a1 10 3b 12 00 mov 0x123b10,%eax
10aa3f: 89 58 44 mov %ebx,0x44(%eax)
10aa42: 8b 55 0c mov 0xc(%ebp),%edx
10aa45: 89 50 20 mov %edx,0x20(%eax)
10aa48: a1 54 3a 12 00 mov 0x123a54,%eax
10aa4d: 40 inc %eax
10aa4e: a3 54 3a 12 00 mov %eax,0x123a54
10aa53: ff 75 18 pushl 0x18(%ebp)
10aa56: 9d popf
10aa57: 50 push %eax
10aa58: 50 push %eax
10aa59: ff 75 14 pushl 0x14(%ebp)
10aa5c: 53 push %ebx
10aa5d: e8 26 ff ff ff call 10a988 <_CORE_mutex_Seize_interrupt_blocking>
10aa62: 83 c4 10 add $0x10,%esp
}
10aa65: 8b 5d fc mov -0x4(%ebp),%ebx
10aa68: c9 leave
10aa69: c3 ret
0010e460 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
10e460: 55 push %ebp
10e461: 89 e5 mov %esp,%ebp
10e463: 53 push %ebx
10e464: 83 ec 04 sub $0x4,%esp
10e467: 8b 45 08 mov 0x8(%ebp),%eax
10e46a: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10e46d: 8b 15 10 3b 12 00 mov 0x123b10,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
10e473: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
10e47a: 83 78 50 00 cmpl $0x0,0x50(%eax)
10e47e: 0f 84 87 00 00 00 je 10e50b <_CORE_mutex_Seize_interrupt_trylock+0xab>
the_mutex->lock = CORE_MUTEX_LOCKED;
10e484: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
10e48b: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
10e48e: 8b 5a 08 mov 0x8(%edx),%ebx
10e491: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
10e494: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10e49b: 8b 58 48 mov 0x48(%eax),%ebx
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10e49e: 83 fb 02 cmp $0x2,%ebx
10e4a1: 74 05 je 10e4a8 <_CORE_mutex_Seize_interrupt_trylock+0x48>
10e4a3: 83 fb 03 cmp $0x3,%ebx
10e4a6: 75 08 jne 10e4b0 <_CORE_mutex_Seize_interrupt_trylock+0x50>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
10e4a8: ff 42 1c incl 0x1c(%edx)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
10e4ab: 83 fb 03 cmp $0x3,%ebx
10e4ae: 74 05 je 10e4b5 <_CORE_mutex_Seize_interrupt_trylock+0x55>
_ISR_Enable( *level_p );
10e4b0: ff 31 pushl (%ecx)
10e4b2: 9d popf
10e4b3: eb 7b jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0>
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
10e4b5: 8b 5a 14 mov 0x14(%edx),%ebx
if ( current == ceiling ) {
10e4b8: 3b 58 4c cmp 0x4c(%eax),%ebx
10e4bb: 75 05 jne 10e4c2 <_CORE_mutex_Seize_interrupt_trylock+0x62>
_ISR_Enable( *level_p );
10e4bd: ff 31 pushl (%ecx)
10e4bf: 9d popf
10e4c0: eb 6e jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0>
return 0;
}
if ( current > ceiling ) {
10e4c2: 76 2a jbe 10e4ee <_CORE_mutex_Seize_interrupt_trylock+0x8e>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e4c4: 8b 15 54 3a 12 00 mov 0x123a54,%edx
10e4ca: 42 inc %edx
10e4cb: 89 15 54 3a 12 00 mov %edx,0x123a54
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
10e4d1: ff 31 pushl (%ecx)
10e4d3: 9d popf
_Thread_Change_priority(
10e4d4: 52 push %edx
10e4d5: 6a 00 push $0x0
10e4d7: ff 70 4c pushl 0x4c(%eax)
10e4da: ff 70 5c pushl 0x5c(%eax)
10e4dd: e8 56 d2 ff ff call 10b738 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
10e4e2: e8 ee d6 ff ff call 10bbd5 <_Thread_Enable_dispatch>
10e4e7: 31 c0 xor %eax,%eax
10e4e9: 83 c4 10 add $0x10,%esp
10e4ec: eb 4b jmp 10e539 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
10e4ee: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10e4f5: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
10e4fc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
10e503: ff 4a 1c decl 0x1c(%edx)
_ISR_Enable( *level_p );
10e506: ff 31 pushl (%ecx)
10e508: 9d popf
10e509: eb 25 jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
10e50b: 8b 58 5c mov 0x5c(%eax),%ebx
10e50e: 39 d3 cmp %edx,%ebx
10e510: 75 22 jne 10e534 <_CORE_mutex_Seize_interrupt_trylock+0xd4>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
10e512: 8b 50 40 mov 0x40(%eax),%edx
10e515: 85 d2 test %edx,%edx
10e517: 74 05 je 10e51e <_CORE_mutex_Seize_interrupt_trylock+0xbe>
10e519: 4a dec %edx
10e51a: 75 18 jne 10e534 <_CORE_mutex_Seize_interrupt_trylock+0xd4><== ALWAYS TAKEN
10e51c: eb 08 jmp 10e526 <_CORE_mutex_Seize_interrupt_trylock+0xc6><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
10e51e: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
10e521: ff 31 pushl (%ecx)
10e523: 9d popf
10e524: eb 0a jmp 10e530 <_CORE_mutex_Seize_interrupt_trylock+0xd0>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
10e526: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED
_ISR_Enable( *level_p );
10e52d: ff 31 pushl (%ecx) <== NOT EXECUTED
10e52f: 9d popf <== NOT EXECUTED
10e530: 31 c0 xor %eax,%eax
10e532: eb 05 jmp 10e539 <_CORE_mutex_Seize_interrupt_trylock+0xd9>
10e534: b8 01 00 00 00 mov $0x1,%eax
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
10e539: 8b 5d fc mov -0x4(%ebp),%ebx
10e53c: c9 leave
10e53d: c3 ret
0010ab98 <_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
)
{
10ab98: 55 push %ebp
10ab99: 89 e5 mov %esp,%ebp
10ab9b: 53 push %ebx
10ab9c: 83 ec 10 sub $0x10,%esp
10ab9f: 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)) ) {
10aba2: 53 push %ebx
10aba3: e8 b4 13 00 00 call 10bf5c <_Thread_queue_Dequeue>
10aba8: 89 c2 mov %eax,%edx
10abaa: 83 c4 10 add $0x10,%esp
10abad: 31 c0 xor %eax,%eax
10abaf: 85 d2 test %edx,%edx
10abb1: 75 15 jne 10abc8 <_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 );
10abb3: 9c pushf
10abb4: fa cli
10abb5: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10abb6: 8b 53 48 mov 0x48(%ebx),%edx
10abb9: b0 04 mov $0x4,%al
10abbb: 3b 53 40 cmp 0x40(%ebx),%edx
10abbe: 73 06 jae 10abc6 <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10abc0: 42 inc %edx
10abc1: 89 53 48 mov %edx,0x48(%ebx)
10abc4: 30 c0 xor %al,%al
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10abc6: 51 push %ecx
10abc7: 9d popf
}
return status;
}
10abc8: 8b 5d fc mov -0x4(%ebp),%ebx
10abcb: c9 leave
10abcc: c3 ret
00109a78 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109a78: 55 push %ebp
109a79: 89 e5 mov %esp,%ebp
109a7b: 57 push %edi
109a7c: 56 push %esi
109a7d: 53 push %ebx
109a7e: 83 ec 1c sub $0x1c,%esp
109a81: 8b 45 08 mov 0x8(%ebp),%eax
109a84: 8b 75 0c mov 0xc(%ebp),%esi
109a87: 8b 55 10 mov 0x10(%ebp),%edx
109a8a: 89 55 dc mov %edx,-0x24(%ebp)
109a8d: 8b 4d 14 mov 0x14(%ebp),%ecx
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
109a90: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
109a96: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
109a9d: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi
_ISR_Disable( level );
109aa3: 9c pushf
109aa4: fa cli
109aa5: 8f 45 e4 popl -0x1c(%ebp)
pending_events = api->pending_events;
109aa8: 8b 17 mov (%edi),%edx
109aaa: 89 55 e0 mov %edx,-0x20(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
109aad: 21 c2 and %eax,%edx
109aaf: 74 1b je 109acc <_Event_Seize+0x54>
109ab1: 39 c2 cmp %eax,%edx
109ab3: 74 08 je 109abd <_Event_Seize+0x45>
109ab5: f7 c6 02 00 00 00 test $0x2,%esi
109abb: 74 0f je 109acc <_Event_Seize+0x54> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
109abd: 89 d0 mov %edx,%eax
109abf: f7 d0 not %eax
109ac1: 23 45 e0 and -0x20(%ebp),%eax
109ac4: 89 07 mov %eax,(%edi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
109ac6: ff 75 e4 pushl -0x1c(%ebp)
109ac9: 9d popf
109aca: eb 13 jmp 109adf <_Event_Seize+0x67>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
109acc: f7 c6 01 00 00 00 test $0x1,%esi
109ad2: 74 12 je 109ae6 <_Event_Seize+0x6e>
_ISR_Enable( level );
109ad4: ff 75 e4 pushl -0x1c(%ebp)
109ad7: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
109ad8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
109adf: 89 11 mov %edx,(%ecx)
return;
109ae1: e9 91 00 00 00 jmp 109b77 <_Event_Seize+0xff>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
109ae6: 89 73 30 mov %esi,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
109ae9: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
109aec: 89 4b 28 mov %ecx,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
109aef: c7 05 a8 3c 12 00 01 movl $0x1,0x123ca8
109af6: 00 00 00
_ISR_Enable( level );
109af9: ff 75 e4 pushl -0x1c(%ebp)
109afc: 9d popf
if ( ticks ) {
109afd: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
109b01: 74 34 je 109b37 <_Event_Seize+0xbf>
_Watchdog_Initialize(
109b03: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
109b06: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
109b0d: c7 43 64 b4 9c 10 00 movl $0x109cb4,0x64(%ebx)
the_watchdog->id = id;
109b14: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
109b17: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109b1e: 8b 45 dc mov -0x24(%ebp),%eax
109b21: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109b24: 52 push %edx
109b25: 52 push %edx
109b26: 8d 43 48 lea 0x48(%ebx),%eax
109b29: 50 push %eax
109b2a: 68 30 3b 12 00 push $0x123b30
109b2f: e8 24 2e 00 00 call 10c958 <_Watchdog_Insert>
109b34: 83 c4 10 add $0x10,%esp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
109b37: 50 push %eax
109b38: 50 push %eax
109b39: 68 00 01 00 00 push $0x100
109b3e: 53 push %ebx
109b3f: e8 74 28 00 00 call 10c3b8 <_Thread_Set_state>
_ISR_Disable( level );
109b44: 9c pushf
109b45: fa cli
109b46: 5a pop %edx
sync_state = _Event_Sync_state;
109b47: a1 a8 3c 12 00 mov 0x123ca8,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
109b4c: c7 05 a8 3c 12 00 00 movl $0x0,0x123ca8
109b53: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
109b56: 83 c4 10 add $0x10,%esp
109b59: 83 f8 01 cmp $0x1,%eax
109b5c: 75 04 jne 109b62 <_Event_Seize+0xea>
_ISR_Enable( level );
109b5e: 52 push %edx
109b5f: 9d popf
109b60: eb 15 jmp 109b77 <_Event_Seize+0xff>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109b62: 89 55 10 mov %edx,0x10(%ebp)
109b65: 89 5d 0c mov %ebx,0xc(%ebp)
109b68: 89 45 08 mov %eax,0x8(%ebp)
}
109b6b: 8d 65 f4 lea -0xc(%ebp),%esp
109b6e: 5b pop %ebx
109b6f: 5e pop %esi
109b70: 5f pop %edi
109b71: c9 leave
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109b72: e9 75 1b 00 00 jmp 10b6ec <_Thread_blocking_operation_Cancel>
}
109b77: 8d 65 f4 lea -0xc(%ebp),%esp
109b7a: 5b pop %ebx
109b7b: 5e pop %esi
109b7c: 5f pop %edi
109b7d: c9 leave
109b7e: c3 ret
00109bcc <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109bcc: 55 push %ebp
109bcd: 89 e5 mov %esp,%ebp
109bcf: 57 push %edi
109bd0: 56 push %esi
109bd1: 53 push %ebx
109bd2: 83 ec 2c sub $0x2c,%esp
109bd5: 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 ];
109bd8: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
109bde: 8b 43 30 mov 0x30(%ebx),%eax
109be1: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
109be4: 9c pushf
109be5: fa cli
109be6: 58 pop %eax
pending_events = api->pending_events;
109be7: 8b 17 mov (%edi),%edx
109be9: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
109bec: 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 ) ) {
109bef: 21 f2 and %esi,%edx
109bf1: 75 07 jne 109bfa <_Event_Surrender+0x2e>
_ISR_Enable( level );
109bf3: 50 push %eax
109bf4: 9d popf
return;
109bf5: e9 b0 00 00 00 jmp 109caa <_Event_Surrender+0xde>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
109bfa: 8b 0d ec 3a 12 00 mov 0x123aec,%ecx
109c00: 85 c9 test %ecx,%ecx
109c02: 74 49 je 109c4d <_Event_Surrender+0x81>
109c04: 3b 1d 10 3b 12 00 cmp 0x123b10,%ebx
109c0a: 75 41 jne 109c4d <_Event_Surrender+0x81>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109c0c: 8b 0d a8 3c 12 00 mov 0x123ca8,%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() &&
109c12: 83 f9 02 cmp $0x2,%ecx
109c15: 74 09 je 109c20 <_Event_Surrender+0x54> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
109c17: 8b 0d a8 3c 12 00 mov 0x123ca8,%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() &&
109c1d: 49 dec %ecx
109c1e: 75 2d jne 109c4d <_Event_Surrender+0x81>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109c20: 39 f2 cmp %esi,%edx
109c22: 74 06 je 109c2a <_Event_Surrender+0x5e>
109c24: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109c28: 74 1f je 109c49 <_Event_Surrender+0x7d> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
109c2a: 89 d6 mov %edx,%esi
109c2c: f7 d6 not %esi
109c2e: 23 75 d4 and -0x2c(%ebp),%esi
109c31: 89 37 mov %esi,(%edi)
the_thread->Wait.count = 0;
109c33: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109c3a: 8b 4b 28 mov 0x28(%ebx),%ecx
109c3d: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109c3f: c7 05 a8 3c 12 00 03 movl $0x3,0x123ca8
109c46: 00 00 00
}
_ISR_Enable( level );
109c49: 50 push %eax
109c4a: 9d popf
return;
109c4b: eb 5d jmp 109caa <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109c4d: f6 43 11 01 testb $0x1,0x11(%ebx)
109c51: 74 55 je 109ca8 <_Event_Surrender+0xdc>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109c53: 39 f2 cmp %esi,%edx
109c55: 74 06 je 109c5d <_Event_Surrender+0x91>
109c57: f6 45 e0 02 testb $0x2,-0x20(%ebp)
109c5b: 74 4b je 109ca8 <_Event_Surrender+0xdc> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
109c5d: 89 d6 mov %edx,%esi
109c5f: f7 d6 not %esi
109c61: 23 75 d4 and -0x2c(%ebp),%esi
109c64: 89 37 mov %esi,(%edi)
the_thread->Wait.count = 0;
109c66: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109c6d: 8b 4b 28 mov 0x28(%ebx),%ecx
109c70: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109c72: 50 push %eax
109c73: 9d popf
109c74: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109c75: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109c79: 74 06 je 109c81 <_Event_Surrender+0xb5>
_ISR_Enable( level );
109c7b: 50 push %eax
109c7c: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109c7d: 51 push %ecx
109c7e: 51 push %ecx
109c7f: eb 17 jmp 109c98 <_Event_Surrender+0xcc>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109c81: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
109c88: 50 push %eax
109c89: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109c8a: 83 ec 0c sub $0xc,%esp
109c8d: 8d 43 48 lea 0x48(%ebx),%eax
109c90: 50 push %eax
109c91: e8 da 2d 00 00 call 10ca70 <_Watchdog_Remove>
109c96: 58 pop %eax
109c97: 5a pop %edx
109c98: 68 f8 ff 03 10 push $0x1003fff8
109c9d: 53 push %ebx
109c9e: e8 b5 1b 00 00 call 10b858 <_Thread_Clear_state>
109ca3: 83 c4 10 add $0x10,%esp
109ca6: eb 02 jmp 109caa <_Event_Surrender+0xde>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109ca8: 50 push %eax
109ca9: 9d popf
}
109caa: 8d 65 f4 lea -0xc(%ebp),%esp
109cad: 5b pop %ebx
109cae: 5e pop %esi
109caf: 5f pop %edi
109cb0: c9 leave
109cb1: c3 ret
00109cb4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
109cb4: 55 push %ebp
109cb5: 89 e5 mov %esp,%ebp
109cb7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
109cba: 8d 45 f4 lea -0xc(%ebp),%eax
109cbd: 50 push %eax
109cbe: ff 75 08 pushl 0x8(%ebp)
109cc1: e8 32 1f 00 00 call 10bbf8 <_Thread_Get>
switch ( location ) {
109cc6: 83 c4 10 add $0x10,%esp
109cc9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
109ccd: 75 49 jne 109d18 <_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 );
109ccf: 9c pushf
109cd0: fa cli
109cd1: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
109cd2: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
109cd9: 3b 05 10 3b 12 00 cmp 0x123b10,%eax
109cdf: 75 13 jne 109cf4 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
109ce1: 8b 0d a8 3c 12 00 mov 0x123ca8,%ecx
109ce7: 49 dec %ecx
109ce8: 75 0a jne 109cf4 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
109cea: c7 05 a8 3c 12 00 02 movl $0x2,0x123ca8
109cf1: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
109cf4: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
109cfb: 52 push %edx
109cfc: 9d popf
109cfd: 52 push %edx
109cfe: 52 push %edx
109cff: 68 f8 ff 03 10 push $0x1003fff8
109d04: 50 push %eax
109d05: e8 4e 1b 00 00 call 10b858 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
109d0a: a1 54 3a 12 00 mov 0x123a54,%eax
109d0f: 48 dec %eax
109d10: a3 54 3a 12 00 mov %eax,0x123a54
109d15: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
109d18: c9 leave
109d19: c3 ret
0010e5f8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
10e5f8: 55 push %ebp
10e5f9: 89 e5 mov %esp,%ebp
10e5fb: 57 push %edi
10e5fc: 56 push %esi
10e5fd: 53 push %ebx
10e5fe: 83 ec 2c sub $0x2c,%esp
10e601: 8b 75 08 mov 0x8(%ebp),%esi
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e604: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
10e607: 8b 46 10 mov 0x10(%esi),%eax
10e60a: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
10e60d: 8b 45 0c mov 0xc(%ebp),%eax
10e610: 83 c0 04 add $0x4,%eax
10e613: 89 45 cc mov %eax,-0x34(%ebp)
10e616: 0f 82 2f 01 00 00 jb 10e74b <_Heap_Allocate_aligned_with_boundary+0x153>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
10e61c: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10e620: 74 18 je 10e63a <_Heap_Allocate_aligned_with_boundary+0x42>
if ( boundary < alloc_size ) {
10e622: 8b 45 0c mov 0xc(%ebp),%eax
10e625: 39 45 14 cmp %eax,0x14(%ebp)
10e628: 0f 82 1d 01 00 00 jb 10e74b <_Heap_Allocate_aligned_with_boundary+0x153>
return NULL;
}
if ( alignment == 0 ) {
10e62e: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10e632: 75 06 jne 10e63a <_Heap_Allocate_aligned_with_boundary+0x42>
10e634: 8b 45 e0 mov -0x20(%ebp),%eax
10e637: 89 45 10 mov %eax,0x10(%ebp)
10e63a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
10e641: 8b 45 e0 mov -0x20(%ebp),%eax
10e644: 83 c0 07 add $0x7,%eax
10e647: 89 45 c8 mov %eax,-0x38(%ebp)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
10e64a: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp)
10e651: 8b 45 0c mov 0xc(%ebp),%eax
10e654: 29 45 d8 sub %eax,-0x28(%ebp)
10e657: 89 f7 mov %esi,%edi
10e659: e9 ba 00 00 00 jmp 10e718 <_Heap_Allocate_aligned_with_boundary+0x120>
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
10e65e: ff 45 e4 incl -0x1c(%ebp)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
10e661: 8b 59 04 mov 0x4(%ecx),%ebx
10e664: 3b 5d cc cmp -0x34(%ebp),%ebx
10e667: 0f 86 a8 00 00 00 jbe 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d>
if ( alignment == 0 ) {
10e66d: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
10e671: 8d 41 08 lea 0x8(%ecx),%eax
10e674: 89 45 dc mov %eax,-0x24(%ebp)
10e677: 75 07 jne 10e680 <_Heap_Allocate_aligned_with_boundary+0x88>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e679: 89 c3 mov %eax,%ebx
10e67b: e9 91 00 00 00 jmp 10e711 <_Heap_Allocate_aligned_with_boundary+0x119>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
10e680: 8b 47 14 mov 0x14(%edi),%eax
10e683: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
10e686: 83 e3 fe and $0xfffffffe,%ebx
10e689: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
10e68c: 8b 75 c8 mov -0x38(%ebp),%esi
10e68f: 29 c6 sub %eax,%esi
10e691: 01 de add %ebx,%esi
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
10e693: 03 5d d8 add -0x28(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10e696: 89 d8 mov %ebx,%eax
10e698: 31 d2 xor %edx,%edx
10e69a: f7 75 10 divl 0x10(%ebp)
10e69d: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
10e69f: 39 f3 cmp %esi,%ebx
10e6a1: 76 0b jbe 10e6ae <_Heap_Allocate_aligned_with_boundary+0xb6>
10e6a3: 89 f0 mov %esi,%eax
10e6a5: 31 d2 xor %edx,%edx
10e6a7: f7 75 10 divl 0x10(%ebp)
10e6aa: 89 f3 mov %esi,%ebx
10e6ac: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
10e6ae: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10e6b2: 74 3f je 10e6f3 <_Heap_Allocate_aligned_with_boundary+0xfb>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
10e6b4: 8b 45 0c mov 0xc(%ebp),%eax
10e6b7: 8d 34 03 lea (%ebx,%eax,1),%esi
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
10e6ba: 8b 45 dc mov -0x24(%ebp),%eax
10e6bd: 03 45 0c add 0xc(%ebp),%eax
10e6c0: 89 45 d0 mov %eax,-0x30(%ebp)
10e6c3: eb 19 jmp 10e6de <_Heap_Allocate_aligned_with_boundary+0xe6>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
10e6c5: 3b 55 d0 cmp -0x30(%ebp),%edx
10e6c8: 72 4b jb 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d>
return 0;
}
alloc_begin = boundary_line - alloc_size;
10e6ca: 89 d3 mov %edx,%ebx
10e6cc: 2b 5d 0c sub 0xc(%ebp),%ebx
10e6cf: 89 d8 mov %ebx,%eax
10e6d1: 31 d2 xor %edx,%edx
10e6d3: f7 75 10 divl 0x10(%ebp)
10e6d6: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
10e6d8: 8b 45 0c mov 0xc(%ebp),%eax
10e6db: 8d 34 03 lea (%ebx,%eax,1),%esi
10e6de: 89 f0 mov %esi,%eax
10e6e0: 31 d2 xor %edx,%edx
10e6e2: f7 75 14 divl 0x14(%ebp)
10e6e5: 89 f0 mov %esi,%eax
10e6e7: 29 d0 sub %edx,%eax
10e6e9: 89 c2 mov %eax,%edx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
10e6eb: 39 f0 cmp %esi,%eax
10e6ed: 73 04 jae 10e6f3 <_Heap_Allocate_aligned_with_boundary+0xfb>
10e6ef: 39 c3 cmp %eax,%ebx
10e6f1: 72 d2 jb 10e6c5 <_Heap_Allocate_aligned_with_boundary+0xcd>
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
10e6f3: 3b 5d dc cmp -0x24(%ebp),%ebx
10e6f6: 72 1d jb 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d>
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
10e6f8: be f8 ff ff ff mov $0xfffffff8,%esi
10e6fd: 29 ce sub %ecx,%esi
10e6ff: 01 de add %ebx,%esi
10e701: 89 d8 mov %ebx,%eax
10e703: 31 d2 xor %edx,%edx
10e705: f7 75 e0 divl -0x20(%ebp)
if ( free_size >= min_block_size || free_size == 0 ) {
10e708: 29 d6 sub %edx,%esi
10e70a: 74 05 je 10e711 <_Heap_Allocate_aligned_with_boundary+0x119>
10e70c: 3b 75 d4 cmp -0x2c(%ebp),%esi
10e70f: 72 04 jb 10e715 <_Heap_Allocate_aligned_with_boundary+0x11d>
boundary
);
}
}
if ( alloc_begin != 0 ) {
10e711: 85 db test %ebx,%ebx
10e713: 75 11 jne 10e726 <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN
break;
}
block = block->next;
10e715: 8b 49 08 mov 0x8(%ecx),%ecx
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
10e718: 39 f9 cmp %edi,%ecx
10e71a: 0f 85 3e ff ff ff jne 10e65e <_Heap_Allocate_aligned_with_boundary+0x66>
10e720: 89 fe mov %edi,%esi
10e722: 31 db xor %ebx,%ebx
10e724: eb 16 jmp 10e73c <_Heap_Allocate_aligned_with_boundary+0x144>
10e726: 89 fe mov %edi,%esi
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
10e728: 8b 45 e4 mov -0x1c(%ebp),%eax
10e72b: 01 47 4c add %eax,0x4c(%edi)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
10e72e: ff 75 0c pushl 0xc(%ebp)
10e731: 53 push %ebx
10e732: 51 push %ecx
10e733: 57 push %edi
10e734: e8 4f c7 ff ff call 10ae88 <_Heap_Block_allocate>
10e739: 83 c4 10 add $0x10,%esp
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
10e73c: 8b 45 e4 mov -0x1c(%ebp),%eax
10e73f: 39 46 44 cmp %eax,0x44(%esi)
10e742: 73 03 jae 10e747 <_Heap_Allocate_aligned_with_boundary+0x14f>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
10e744: 89 46 44 mov %eax,0x44(%esi)
}
return (void *) alloc_begin;
10e747: 89 d8 mov %ebx,%eax
10e749: eb 02 jmp 10e74d <_Heap_Allocate_aligned_with_boundary+0x155>
10e74b: 31 c0 xor %eax,%eax
}
10e74d: 8d 65 f4 lea -0xc(%ebp),%esp
10e750: 5b pop %ebx
10e751: 5e pop %esi
10e752: 5f pop %edi
10e753: c9 leave
10e754: c3 ret
00111a34 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
111a34: 55 push %ebp
111a35: 89 e5 mov %esp,%ebp
111a37: 56 push %esi
111a38: 53 push %ebx
111a39: 8b 4d 08 mov 0x8(%ebp),%ecx
111a3c: 8b 55 0c mov 0xc(%ebp),%edx
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
111a3f: 8b 71 1c mov 0x1c(%ecx),%esi
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
111a42: 8b 59 24 mov 0x24(%ecx),%ebx
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
111a45: 39 f2 cmp %esi,%edx
111a47: 73 0a jae 111a53 <_Heap_Extend+0x1f>
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
111a49: b8 01 00 00 00 mov $0x1,%eax
111a4e: 3b 51 18 cmp 0x18(%ecx),%edx
111a51: 73 5f jae 111ab2 <_Heap_Extend+0x7e>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
111a53: b8 02 00 00 00 mov $0x2,%eax
111a58: 39 f2 cmp %esi,%edx
111a5a: 75 56 jne 111ab2 <_Heap_Extend+0x7e>
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
111a5c: 03 55 10 add 0x10(%ebp),%edx
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
111a5f: 89 51 1c mov %edx,0x1c(%ecx)
extend_size = new_heap_area_end
111a62: 29 da sub %ebx,%edx
111a64: 8d 72 f8 lea -0x8(%edx),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111a67: 89 f0 mov %esi,%eax
111a69: 31 d2 xor %edx,%edx
111a6b: f7 71 10 divl 0x10(%ecx)
111a6e: 29 d6 sub %edx,%esi
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
111a70: 8b 45 14 mov 0x14(%ebp),%eax
111a73: 89 30 mov %esi,(%eax)
if( extend_size >= heap->min_block_size ) {
111a75: 31 c0 xor %eax,%eax
111a77: 3b 71 14 cmp 0x14(%ecx),%esi
111a7a: 72 36 jb 111ab2 <_Heap_Extend+0x7e> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111a7c: 8d 14 1e lea (%esi,%ebx,1),%edx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
111a7f: 8b 43 04 mov 0x4(%ebx),%eax
111a82: 83 e0 01 and $0x1,%eax
111a85: 09 f0 or %esi,%eax
111a87: 89 43 04 mov %eax,0x4(%ebx)
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
111a8a: 8b 41 20 mov 0x20(%ecx),%eax
111a8d: 29 d0 sub %edx,%eax
111a8f: 83 c8 01 or $0x1,%eax
111a92: 89 42 04 mov %eax,0x4(%edx)
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
111a95: 89 51 24 mov %edx,0x24(%ecx)
/* Statistics */
stats->size += extend_size;
111a98: 01 71 2c add %esi,0x2c(%ecx)
++stats->used_blocks;
111a9b: ff 41 40 incl 0x40(%ecx)
--stats->frees; /* Do not count subsequent call as actual free() */
111a9e: ff 49 50 decl 0x50(%ecx)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
111aa1: 50 push %eax
111aa2: 50 push %eax
111aa3: 83 c3 08 add $0x8,%ebx
111aa6: 53 push %ebx
111aa7: 51 push %ecx
111aa8: e8 27 be ff ff call 10d8d4 <_Heap_Free>
111aad: 31 c0 xor %eax,%eax
111aaf: 83 c4 10 add $0x10,%esp
}
return HEAP_EXTEND_SUCCESSFUL;
}
111ab2: 8d 65 f8 lea -0x8(%ebp),%esp
111ab5: 5b pop %ebx
111ab6: 5e pop %esi
111ab7: c9 leave
111ab8: c3 ret
0010e758 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10e758: 55 push %ebp
10e759: 89 e5 mov %esp,%ebp
10e75b: 57 push %edi
10e75c: 56 push %esi
10e75d: 53 push %ebx
10e75e: 83 ec 14 sub $0x14,%esp
10e761: 8b 4d 08 mov 0x8(%ebp),%ecx
10e764: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
10e767: 8d 58 f8 lea -0x8(%eax),%ebx
10e76a: 31 d2 xor %edx,%edx
10e76c: f7 71 10 divl 0x10(%ecx)
10e76f: 29 d3 sub %edx,%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;
10e771: 8b 41 20 mov 0x20(%ecx),%eax
10e774: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10e777: 31 c0 xor %eax,%eax
10e779: 3b 5d f0 cmp -0x10(%ebp),%ebx
10e77c: 72 08 jb 10e786 <_Heap_Free+0x2e>
10e77e: 31 c0 xor %eax,%eax
10e780: 39 59 24 cmp %ebx,0x24(%ecx)
10e783: 0f 93 c0 setae %al
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10e786: 85 c0 test %eax,%eax
10e788: 0f 84 2d 01 00 00 je 10e8bb <_Heap_Free+0x163>
- 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;
10e78e: 8b 7b 04 mov 0x4(%ebx),%edi
10e791: 89 fa mov %edi,%edx
10e793: 83 e2 fe and $0xfffffffe,%edx
10e796: 89 55 e0 mov %edx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10e799: 8d 04 13 lea (%ebx,%edx,1),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10e79c: 31 f6 xor %esi,%esi
10e79e: 3b 45 f0 cmp -0x10(%ebp),%eax
10e7a1: 72 0e jb 10e7b1 <_Heap_Free+0x59> <== NEVER TAKEN
10e7a3: 39 41 24 cmp %eax,0x24(%ecx)
10e7a6: 0f 93 c2 setae %dl
10e7a9: 89 d6 mov %edx,%esi
10e7ab: 81 e6 ff 00 00 00 and $0xff,%esi
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10e7b1: 85 f6 test %esi,%esi
10e7b3: 0f 84 02 01 00 00 je 10e8bb <_Heap_Free+0x163> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10e7b9: 8b 70 04 mov 0x4(%eax),%esi
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10e7bc: f7 c6 01 00 00 00 test $0x1,%esi
10e7c2: 0f 84 f3 00 00 00 je 10e8bb <_Heap_Free+0x163> <== 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;
10e7c8: 83 e6 fe and $0xfffffffe,%esi
10e7cb: 89 75 e8 mov %esi,-0x18(%ebp)
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10e7ce: 8b 51 24 mov 0x24(%ecx),%edx
10e7d1: 89 55 e4 mov %edx,-0x1c(%ebp)
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10e7d4: 31 f6 xor %esi,%esi
10e7d6: 39 d0 cmp %edx,%eax
10e7d8: 74 0d je 10e7e7 <_Heap_Free+0x8f>
10e7da: 8b 55 e8 mov -0x18(%ebp),%edx
10e7dd: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi
10e7e1: 83 e6 01 and $0x1,%esi
10e7e4: 83 f6 01 xor $0x1,%esi
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10e7e7: 83 e7 01 and $0x1,%edi
10e7ea: 75 64 jne 10e850 <_Heap_Free+0xf8>
uintptr_t const prev_size = block->prev_size;
10e7ec: 8b 13 mov (%ebx),%edx
10e7ee: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10e7f1: 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
10e7f3: 31 ff xor %edi,%edi
10e7f5: 3b 5d f0 cmp -0x10(%ebp),%ebx
10e7f8: 72 0e jb 10e808 <_Heap_Free+0xb0> <== NEVER TAKEN
10e7fa: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10e7fd: 0f 93 c2 setae %dl
10e800: 89 d7 mov %edx,%edi
10e802: 81 e7 ff 00 00 00 and $0xff,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10e808: 85 ff test %edi,%edi
10e80a: 0f 84 ab 00 00 00 je 10e8bb <_Heap_Free+0x163> <== 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) ) {
10e810: f6 43 04 01 testb $0x1,0x4(%ebx)
10e814: 0f 84 a1 00 00 00 je 10e8bb <_Heap_Free+0x163> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10e81a: 89 f2 mov %esi,%edx
10e81c: 84 d2 test %dl,%dl
10e81e: 74 1a je 10e83a <_Heap_Free+0xe2>
uintptr_t const size = block_size + prev_size + next_block_size;
10e820: 8b 75 e0 mov -0x20(%ebp),%esi
10e823: 03 75 e8 add -0x18(%ebp),%esi
10e826: 03 75 ec add -0x14(%ebp),%esi
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10e829: 8b 78 08 mov 0x8(%eax),%edi
Heap_Block *prev = block->prev;
10e82c: 8b 40 0c mov 0xc(%eax),%eax
prev->next = next;
10e82f: 89 78 08 mov %edi,0x8(%eax)
next->prev = prev;
10e832: 89 47 0c mov %eax,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10e835: ff 49 38 decl 0x38(%ecx)
10e838: eb 34 jmp 10e86e <_Heap_Free+0x116>
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;
10e83a: 8b 75 e0 mov -0x20(%ebp),%esi
10e83d: 03 75 ec add -0x14(%ebp),%esi
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10e840: 89 f7 mov %esi,%edi
10e842: 83 cf 01 or $0x1,%edi
10e845: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10e848: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = size;
10e84c: 89 30 mov %esi,(%eax)
10e84e: eb 5b jmp 10e8ab <_Heap_Free+0x153>
}
} else if ( next_is_free ) { /* coalesce next */
10e850: 89 f2 mov %esi,%edx
10e852: 84 d2 test %dl,%dl
10e854: 74 25 je 10e87b <_Heap_Free+0x123>
uintptr_t const size = block_size + next_block_size;
10e856: 8b 75 e8 mov -0x18(%ebp),%esi
10e859: 03 75 e0 add -0x20(%ebp),%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10e85c: 8b 78 08 mov 0x8(%eax),%edi
Heap_Block *prev = old_block->prev;
10e85f: 8b 40 0c mov 0xc(%eax),%eax
new_block->next = next;
10e862: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10e865: 89 43 0c mov %eax,0xc(%ebx)
next->prev = new_block;
10e868: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10e86b: 89 58 08 mov %ebx,0x8(%eax)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10e86e: 89 f0 mov %esi,%eax
10e870: 83 c8 01 or $0x1,%eax
10e873: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10e876: 89 34 33 mov %esi,(%ebx,%esi,1)
10e879: eb 30 jmp 10e8ab <_Heap_Free+0x153>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10e87b: 8b 71 08 mov 0x8(%ecx),%esi
new_block->next = next;
10e87e: 89 73 08 mov %esi,0x8(%ebx)
new_block->prev = block_before;
10e881: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10e884: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10e887: 89 5e 0c mov %ebx,0xc(%esi)
} 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;
10e88a: 8b 75 e0 mov -0x20(%ebp),%esi
10e88d: 83 ce 01 or $0x1,%esi
10e890: 89 73 04 mov %esi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10e893: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = block_size;
10e897: 8b 55 e0 mov -0x20(%ebp),%edx
10e89a: 89 10 mov %edx,(%eax)
/* Statistics */
++stats->free_blocks;
10e89c: 8b 41 38 mov 0x38(%ecx),%eax
10e89f: 40 inc %eax
10e8a0: 89 41 38 mov %eax,0x38(%ecx)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
10e8a3: 39 41 3c cmp %eax,0x3c(%ecx)
10e8a6: 73 03 jae 10e8ab <_Heap_Free+0x153>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
10e8a8: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10e8ab: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10e8ae: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10e8b1: 8b 45 e0 mov -0x20(%ebp),%eax
10e8b4: 01 41 30 add %eax,0x30(%ecx)
10e8b7: b0 01 mov $0x1,%al
return( true );
10e8b9: eb 02 jmp 10e8bd <_Heap_Free+0x165>
10e8bb: 31 c0 xor %eax,%eax
}
10e8bd: 83 c4 14 add $0x14,%esp
10e8c0: 5b pop %ebx
10e8c1: 5e pop %esi
10e8c2: 5f pop %edi
10e8c3: c9 leave
10e8c4: c3 ret
0011bc40 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11bc40: 55 push %ebp
11bc41: 89 e5 mov %esp,%ebp
11bc43: 56 push %esi
11bc44: 53 push %ebx
11bc45: 8b 5d 08 mov 0x8(%ebp),%ebx
11bc48: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
11bc4b: 8d 4e f8 lea -0x8(%esi),%ecx
11bc4e: 89 f0 mov %esi,%eax
11bc50: 31 d2 xor %edx,%edx
11bc52: f7 73 10 divl 0x10(%ebx)
11bc55: 29 d1 sub %edx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11bc57: 8b 53 20 mov 0x20(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
11bc5a: 31 c0 xor %eax,%eax
11bc5c: 39 d1 cmp %edx,%ecx
11bc5e: 72 08 jb 11bc68 <_Heap_Size_of_alloc_area+0x28>
11bc60: 31 c0 xor %eax,%eax
11bc62: 39 4b 24 cmp %ecx,0x24(%ebx)
11bc65: 0f 93 c0 setae %al
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 ) ) {
11bc68: 85 c0 test %eax,%eax
11bc6a: 74 2e je 11bc9a <_Heap_Size_of_alloc_area+0x5a>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11bc6c: 8b 41 04 mov 0x4(%ecx),%eax
11bc6f: 83 e0 fe and $0xfffffffe,%eax
11bc72: 01 c1 add %eax,%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
11bc74: 31 c0 xor %eax,%eax
11bc76: 39 d1 cmp %edx,%ecx
11bc78: 72 08 jb 11bc82 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN
11bc7a: 31 c0 xor %eax,%eax
11bc7c: 39 4b 24 cmp %ecx,0x24(%ebx)
11bc7f: 0f 93 c0 setae %al
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11bc82: 85 c0 test %eax,%eax
11bc84: 74 14 je 11bc9a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN
11bc86: f6 41 04 01 testb $0x1,0x4(%ecx)
11bc8a: 74 0e je 11bc9a <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
11bc8c: 29 f1 sub %esi,%ecx
11bc8e: 8d 51 04 lea 0x4(%ecx),%edx
11bc91: 8b 45 10 mov 0x10(%ebp),%eax
11bc94: 89 10 mov %edx,(%eax)
11bc96: b0 01 mov $0x1,%al
return true;
11bc98: eb 02 jmp 11bc9c <_Heap_Size_of_alloc_area+0x5c>
11bc9a: 31 c0 xor %eax,%eax
}
11bc9c: 5b pop %ebx
11bc9d: 5e pop %esi
11bc9e: c9 leave
11bc9f: c3 ret
0010b975 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b975: 55 push %ebp
10b976: 89 e5 mov %esp,%ebp
10b978: 57 push %edi
10b979: 56 push %esi
10b97a: 53 push %ebx
10b97b: 83 ec 4c sub $0x4c,%esp
10b97e: 8b 7d 08 mov 0x8(%ebp),%edi
10b981: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t const page_size = heap->page_size;
10b984: 8b 4f 10 mov 0x10(%edi),%ecx
uintptr_t const min_block_size = heap->min_block_size;
10b987: 8b 47 14 mov 0x14(%edi),%eax
10b98a: 89 45 dc mov %eax,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10b98d: 8b 57 24 mov 0x24(%edi),%edx
10b990: 89 55 d0 mov %edx,-0x30(%ebp)
Heap_Block *block = heap->first_block;
10b993: 8b 5f 20 mov 0x20(%edi),%ebx
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b996: c7 45 e4 87 bc 10 00 movl $0x10bc87,-0x1c(%ebp)
10b99d: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b9a1: 75 07 jne 10b9aa <_Heap_Walk+0x35>
10b9a3: c7 45 e4 70 b9 10 00 movl $0x10b970,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10b9aa: 83 3d 94 53 12 00 03 cmpl $0x3,0x125394
10b9b1: 0f 85 c6 02 00 00 jne 10bc7d <_Heap_Walk+0x308>
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)(
10b9b7: 50 push %eax
10b9b8: ff 77 0c pushl 0xc(%edi)
10b9bb: ff 77 08 pushl 0x8(%edi)
10b9be: ff 75 d0 pushl -0x30(%ebp)
10b9c1: 53 push %ebx
10b9c2: ff 77 1c pushl 0x1c(%edi)
10b9c5: ff 77 18 pushl 0x18(%edi)
10b9c8: ff 75 dc pushl -0x24(%ebp)
10b9cb: 51 push %ecx
10b9cc: 68 a8 e6 11 00 push $0x11e6a8
10b9d1: 6a 00 push $0x0
10b9d3: 56 push %esi
10b9d4: 89 4d bc mov %ecx,-0x44(%ebp)
10b9d7: 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 ) {
10b9da: 83 c4 30 add $0x30,%esp
10b9dd: 8b 4d bc mov -0x44(%ebp),%ecx
10b9e0: 85 c9 test %ecx,%ecx
10b9e2: 75 0b jne 10b9ef <_Heap_Walk+0x7a>
(*printer)( source, true, "page size is zero\n" );
10b9e4: 53 push %ebx
10b9e5: 68 39 e7 11 00 push $0x11e739
10b9ea: e9 5b 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b9ef: f6 c1 03 test $0x3,%cl
10b9f2: 74 0b je 10b9ff <_Heap_Walk+0x8a>
(*printer)(
10b9f4: 51 push %ecx
10b9f5: 68 4c e7 11 00 push $0x11e74c
10b9fa: e9 4b 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b9ff: 8b 45 dc mov -0x24(%ebp),%eax
10ba02: 31 d2 xor %edx,%edx
10ba04: f7 f1 div %ecx
10ba06: 85 d2 test %edx,%edx
10ba08: 74 0d je 10ba17 <_Heap_Walk+0xa2>
(*printer)(
10ba0a: ff 75 dc pushl -0x24(%ebp)
10ba0d: 68 6a e7 11 00 push $0x11e76a
10ba12: e9 33 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if (
10ba17: 8d 43 08 lea 0x8(%ebx),%eax
10ba1a: 31 d2 xor %edx,%edx
10ba1c: f7 f1 div %ecx
10ba1e: 85 d2 test %edx,%edx
10ba20: 74 0b je 10ba2d <_Heap_Walk+0xb8>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10ba22: 53 push %ebx
10ba23: 68 8e e7 11 00 push $0x11e78e
10ba28: e9 1d 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10ba2d: f6 43 04 01 testb $0x1,0x4(%ebx)
10ba31: 75 0b jne 10ba3e <_Heap_Walk+0xc9>
(*printer)(
10ba33: 51 push %ecx
10ba34: 68 bf e7 11 00 push $0x11e7bf
10ba39: e9 0c 02 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if ( first_block->prev_size != page_size ) {
10ba3e: 8b 03 mov (%ebx),%eax
10ba40: 89 45 d4 mov %eax,-0x2c(%ebp)
10ba43: 39 c8 cmp %ecx,%eax
10ba45: 74 0f je 10ba56 <_Heap_Walk+0xe1>
(*printer)(
10ba47: 83 ec 0c sub $0xc,%esp
10ba4a: 51 push %ecx
10ba4b: 50 push %eax
10ba4c: 68 ed e7 11 00 push $0x11e7ed
10ba51: e9 3d 01 00 00 jmp 10bb93 <_Heap_Walk+0x21e>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10ba56: 8b 55 d0 mov -0x30(%ebp),%edx
10ba59: 8b 42 04 mov 0x4(%edx),%eax
10ba5c: 83 e0 fe and $0xfffffffe,%eax
10ba5f: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1)
10ba64: 75 0b jne 10ba71 <_Heap_Walk+0xfc>
(*printer)(
10ba66: 52 push %edx
10ba67: 68 18 e8 11 00 push $0x11e818
10ba6c: e9 d9 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10ba71: 8b 4f 10 mov 0x10(%edi),%ecx
10ba74: 89 4d d8 mov %ecx,-0x28(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10ba77: 8b 4f 08 mov 0x8(%edi),%ecx
10ba7a: 89 7d e0 mov %edi,-0x20(%ebp)
10ba7d: eb 6a jmp 10bae9 <_Heap_Walk+0x174>
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
10ba7f: 31 c0 xor %eax,%eax
10ba81: 39 4f 20 cmp %ecx,0x20(%edi)
10ba84: 77 08 ja 10ba8e <_Heap_Walk+0x119>
10ba86: 31 c0 xor %eax,%eax
10ba88: 39 4f 24 cmp %ecx,0x24(%edi)
10ba8b: 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 ) ) {
10ba8e: 85 c0 test %eax,%eax
10ba90: 75 0b jne 10ba9d <_Heap_Walk+0x128>
(*printer)(
10ba92: 51 push %ecx
10ba93: 68 2d e8 11 00 push $0x11e82d
10ba98: e9 ad 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if (
10ba9d: 8d 41 08 lea 0x8(%ecx),%eax
10baa0: 31 d2 xor %edx,%edx
10baa2: f7 75 d8 divl -0x28(%ebp)
10baa5: 85 d2 test %edx,%edx
10baa7: 74 0b je 10bab4 <_Heap_Walk+0x13f>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10baa9: 51 push %ecx
10baaa: 68 4d e8 11 00 push $0x11e84d
10baaf: e9 96 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10bab4: 8b 41 04 mov 0x4(%ecx),%eax
10bab7: 83 e0 fe and $0xfffffffe,%eax
10baba: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10babf: 74 0b je 10bacc <_Heap_Walk+0x157>
(*printer)(
10bac1: 51 push %ecx
10bac2: 68 7d e8 11 00 push $0x11e87d
10bac7: e9 7e 01 00 00 jmp 10bc4a <_Heap_Walk+0x2d5>
);
return false;
}
if ( free_block->prev != prev_block ) {
10bacc: 8b 41 0c mov 0xc(%ecx),%eax
10bacf: 3b 45 e0 cmp -0x20(%ebp),%eax
10bad2: 74 0f je 10bae3 <_Heap_Walk+0x16e>
(*printer)(
10bad4: 83 ec 0c sub $0xc,%esp
10bad7: 50 push %eax
10bad8: 51 push %ecx
10bad9: 68 99 e8 11 00 push $0x11e899
10bade: e9 b0 00 00 00 jmp 10bb93 <_Heap_Walk+0x21e>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10bae3: 89 4d e0 mov %ecx,-0x20(%ebp)
10bae6: 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 ) {
10bae9: 39 f9 cmp %edi,%ecx
10baeb: 75 92 jne 10ba7f <_Heap_Walk+0x10a>
10baed: 89 75 e0 mov %esi,-0x20(%ebp)
10baf0: e9 7f 01 00 00 jmp 10bc74 <_Heap_Walk+0x2ff>
- 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;
10baf5: 8b 43 04 mov 0x4(%ebx),%eax
10baf8: 89 c1 mov %eax,%ecx
10bafa: 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);
10bafd: 8d 34 0b lea (%ebx,%ecx,1),%esi
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
10bb00: a8 01 test $0x1,%al
10bb02: 74 0c je 10bb10 <_Heap_Walk+0x19b>
(*printer)(
10bb04: 83 ec 0c sub $0xc,%esp
10bb07: 51 push %ecx
10bb08: 53 push %ebx
10bb09: 68 cb e8 11 00 push $0x11e8cb
10bb0e: eb 0b jmp 10bb1b <_Heap_Walk+0x1a6>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10bb10: 50 push %eax
10bb11: 50 push %eax
10bb12: ff 33 pushl (%ebx)
10bb14: 51 push %ecx
10bb15: 53 push %ebx
10bb16: 68 e2 e8 11 00 push $0x11e8e2
10bb1b: 6a 00 push $0x0
10bb1d: ff 75 e0 pushl -0x20(%ebp)
10bb20: 89 4d bc mov %ecx,-0x44(%ebp)
10bb23: ff 55 e4 call *-0x1c(%ebp)
10bb26: 83 c4 20 add $0x20,%esp
10bb29: 8b 4d bc mov -0x44(%ebp),%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10bb2c: 31 c0 xor %eax,%eax
10bb2e: 39 77 20 cmp %esi,0x20(%edi)
10bb31: 77 08 ja 10bb3b <_Heap_Walk+0x1c6> <== NEVER TAKEN
10bb33: 31 c0 xor %eax,%eax
10bb35: 39 77 24 cmp %esi,0x24(%edi)
10bb38: 0f 93 c0 setae %al
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10bb3b: 85 c0 test %eax,%eax
10bb3d: 75 11 jne 10bb50 <_Heap_Walk+0x1db>
10bb3f: 89 f1 mov %esi,%ecx
10bb41: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bb44: 83 ec 0c sub $0xc,%esp
10bb47: 51 push %ecx
10bb48: 53 push %ebx
10bb49: 68 07 e9 11 00 push $0x11e907
10bb4e: eb 43 jmp 10bb93 <_Heap_Walk+0x21e>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
10bb50: 89 c8 mov %ecx,%eax
10bb52: 31 d2 xor %edx,%edx
10bb54: f7 75 d4 divl -0x2c(%ebp)
10bb57: 85 d2 test %edx,%edx
10bb59: 74 0f je 10bb6a <_Heap_Walk+0x1f5>
10bb5b: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bb5e: 83 ec 0c sub $0xc,%esp
10bb61: 51 push %ecx
10bb62: 53 push %ebx
10bb63: 68 34 e9 11 00 push $0x11e934
10bb68: eb 29 jmp 10bb93 <_Heap_Walk+0x21e>
);
return false;
}
if ( block_size < min_block_size ) {
10bb6a: 3b 4d dc cmp -0x24(%ebp),%ecx
10bb6d: 73 11 jae 10bb80 <_Heap_Walk+0x20b>
10bb6f: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bb72: 57 push %edi
10bb73: 57 push %edi
10bb74: ff 75 dc pushl -0x24(%ebp)
10bb77: 51 push %ecx
10bb78: 53 push %ebx
10bb79: 68 62 e9 11 00 push $0x11e962
10bb7e: eb 13 jmp 10bb93 <_Heap_Walk+0x21e>
);
return false;
}
if ( next_block_begin <= block_begin ) {
10bb80: 39 de cmp %ebx,%esi
10bb82: 77 1f ja 10bba3 <_Heap_Walk+0x22e>
10bb84: 89 f1 mov %esi,%ecx
10bb86: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bb89: 83 ec 0c sub $0xc,%esp
10bb8c: 51 push %ecx
10bb8d: 53 push %ebx
10bb8e: 68 8d e9 11 00 push $0x11e98d
10bb93: 6a 01 push $0x1
10bb95: 56 push %esi
10bb96: ff 55 e4 call *-0x1c(%ebp)
10bb99: 31 c0 xor %eax,%eax
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
10bb9b: 83 c4 20 add $0x20,%esp
10bb9e: e9 dc 00 00 00 jmp 10bc7f <_Heap_Walk+0x30a>
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10bba3: f6 46 04 01 testb $0x1,0x4(%esi)
10bba7: 0f 85 c5 00 00 00 jne 10bc72 <_Heap_Walk+0x2fd>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10bbad: 8b 47 08 mov 0x8(%edi),%eax
10bbb0: 89 45 c0 mov %eax,-0x40(%ebp)
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;
10bbb3: 8b 53 04 mov 0x4(%ebx),%edx
10bbb6: 89 55 c4 mov %edx,-0x3c(%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;
10bbb9: 83 e2 fe and $0xfffffffe,%edx
10bbbc: 89 55 cc mov %edx,-0x34(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10bbbf: 01 da add %ebx,%edx
10bbc1: 89 55 c8 mov %edx,-0x38(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10bbc4: 8b 4b 08 mov 0x8(%ebx),%ecx
10bbc7: 89 4d b4 mov %ecx,-0x4c(%ebp)
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
10bbca: ba c1 e9 11 00 mov $0x11e9c1,%edx
10bbcf: 3b 4f 0c cmp 0xc(%edi),%ecx
10bbd2: 74 0e je 10bbe2 <_Heap_Walk+0x26d>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10bbd4: ba cb e9 11 00 mov $0x11e9cb,%edx
10bbd9: 39 f9 cmp %edi,%ecx
10bbdb: 74 05 je 10bbe2 <_Heap_Walk+0x26d>
10bbdd: ba f6 e5 11 00 mov $0x11e5f6,%edx
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)(
10bbe2: 8b 43 0c mov 0xc(%ebx),%eax
10bbe5: 89 45 d8 mov %eax,-0x28(%ebp)
10bbe8: b8 d5 e9 11 00 mov $0x11e9d5,%eax
10bbed: 8b 4d c0 mov -0x40(%ebp),%ecx
10bbf0: 39 4d d8 cmp %ecx,-0x28(%ebp)
10bbf3: 74 0f je 10bc04 <_Heap_Walk+0x28f>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
10bbf5: b8 e0 e9 11 00 mov $0x11e9e0,%eax
10bbfa: 39 7d d8 cmp %edi,-0x28(%ebp)
10bbfd: 74 05 je 10bc04 <_Heap_Walk+0x28f>
10bbff: b8 f6 e5 11 00 mov $0x11e5f6,%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)(
10bc04: 52 push %edx
10bc05: ff 75 b4 pushl -0x4c(%ebp)
10bc08: 50 push %eax
10bc09: ff 75 d8 pushl -0x28(%ebp)
10bc0c: 53 push %ebx
10bc0d: 68 ea e9 11 00 push $0x11e9ea
10bc12: 6a 00 push $0x0
10bc14: ff 75 e0 pushl -0x20(%ebp)
10bc17: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10bc1a: 8b 55 c8 mov -0x38(%ebp),%edx
10bc1d: 8b 02 mov (%edx),%eax
10bc1f: 83 c4 20 add $0x20,%esp
10bc22: 39 45 cc cmp %eax,-0x34(%ebp)
10bc25: 74 14 je 10bc3b <_Heap_Walk+0x2c6>
10bc27: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bc2a: 51 push %ecx
10bc2b: 52 push %edx
10bc2c: 50 push %eax
10bc2d: ff 75 cc pushl -0x34(%ebp)
10bc30: 53 push %ebx
10bc31: 68 16 ea 11 00 push $0x11ea16
10bc36: e9 58 ff ff ff jmp 10bb93 <_Heap_Walk+0x21e>
);
return false;
}
if ( !prev_used ) {
10bc3b: f6 45 c4 01 testb $0x1,-0x3c(%ebp)
10bc3f: 75 16 jne 10bc57 <_Heap_Walk+0x2e2>
10bc41: 8b 75 e0 mov -0x20(%ebp),%esi
(*printer)(
10bc44: 53 push %ebx
10bc45: 68 4f ea 11 00 push $0x11ea4f
10bc4a: 6a 01 push $0x1
10bc4c: 56 push %esi
10bc4d: ff 55 e4 call *-0x1c(%ebp)
10bc50: 31 c0 xor %eax,%eax
10bc52: 83 c4 10 add $0x10,%esp
10bc55: eb 28 jmp 10bc7f <_Heap_Walk+0x30a>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10bc57: 8b 47 08 mov 0x8(%edi),%eax
10bc5a: eb 07 jmp 10bc63 <_Heap_Walk+0x2ee>
{
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 ) {
10bc5c: 39 d8 cmp %ebx,%eax
10bc5e: 74 12 je 10bc72 <_Heap_Walk+0x2fd>
return true;
}
free_block = free_block->next;
10bc60: 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 ) {
10bc63: 39 f8 cmp %edi,%eax
10bc65: 75 f5 jne 10bc5c <_Heap_Walk+0x2e7>
10bc67: 8b 75 e0 mov -0x20(%ebp),%esi
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10bc6a: 53 push %ebx
10bc6b: 68 7e ea 11 00 push $0x11ea7e
10bc70: eb d8 jmp 10bc4a <_Heap_Walk+0x2d5>
)
{
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 ) {
10bc72: 89 f3 mov %esi,%ebx
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10bc74: 3b 5d d0 cmp -0x30(%ebp),%ebx
10bc77: 0f 85 78 fe ff ff jne 10baf5 <_Heap_Walk+0x180>
10bc7d: b0 01 mov $0x1,%al
block = next_block;
}
return true;
}
10bc7f: 8d 65 f4 lea -0xc(%ebp),%esp
10bc82: 5b pop %ebx
10bc83: 5e pop %esi
10bc84: 5f pop %edi
10bc85: c9 leave
10bc86: c3 ret
0010af64 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10af64: 55 push %ebp
10af65: 89 e5 mov %esp,%ebp
10af67: 53 push %ebx
10af68: 83 ec 08 sub $0x8,%esp
10af6b: 8b 45 08 mov 0x8(%ebp),%eax
10af6e: 8b 55 0c mov 0xc(%ebp),%edx
10af71: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10af74: a3 f8 3a 12 00 mov %eax,0x123af8
_Internal_errors_What_happened.is_internal = is_internal;
10af79: 88 15 fc 3a 12 00 mov %dl,0x123afc
_Internal_errors_What_happened.the_error = the_error;
10af7f: 89 1d 00 3b 12 00 mov %ebx,0x123b00
_User_extensions_Fatal( the_source, is_internal, the_error );
10af85: 53 push %ebx
10af86: 0f b6 d2 movzbl %dl,%edx
10af89: 52 push %edx
10af8a: 50 push %eax
10af8b: e8 ab 18 00 00 call 10c83b <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10af90: c7 05 ec 3b 12 00 05 movl $0x5,0x123bec <== NOT EXECUTED
10af97: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10af9a: fa cli <== NOT EXECUTED
10af9b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10af9d: f4 hlt <== NOT EXECUTED
10af9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10afa1: eb fe jmp 10afa1 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010affc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10affc: 55 push %ebp
10affd: 89 e5 mov %esp,%ebp
10afff: 56 push %esi
10b000: 53 push %ebx
10b001: 8b 5d 08 mov 0x8(%ebp),%ebx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10b004: 31 c9 xor %ecx,%ecx
10b006: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10b00a: 74 53 je 10b05f <_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 );
10b00c: 8d 73 20 lea 0x20(%ebx),%esi
10b00f: 83 ec 0c sub $0xc,%esp
10b012: 56 push %esi
10b013: e8 0c f8 ff ff call 10a824 <_Chain_Get>
10b018: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b01a: 83 c4 10 add $0x10,%esp
10b01d: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b021: 74 3c je 10b05f <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b023: 85 c0 test %eax,%eax
10b025: 75 1a jne 10b041 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10b027: 83 ec 0c sub $0xc,%esp
10b02a: 53 push %ebx
10b02b: e8 60 00 00 00 call 10b090 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b030: 89 34 24 mov %esi,(%esp)
10b033: e8 ec f7 ff ff call 10a824 <_Chain_Get>
10b038: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b03a: 83 c4 10 add $0x10,%esp
10b03d: 85 c0 test %eax,%eax
10b03f: 74 1e je 10b05f <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10b041: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10b045: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10b049: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10b04b: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b04f: 31 d2 xor %edx,%edx
10b051: f7 f6 div %esi
10b053: c1 e0 02 shl $0x2,%eax
10b056: 03 43 30 add 0x30(%ebx),%eax
10b059: ff 08 decl (%eax)
information->inactive--;
10b05b: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10b05f: 89 c8 mov %ecx,%eax
10b061: 8d 65 f8 lea -0x8(%ebp),%esp
10b064: 5b pop %ebx
10b065: 5e pop %esi
10b066: c9 leave
10b067: c3 ret
0010b090 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10b090: 55 push %ebp
10b091: 89 e5 mov %esp,%ebp
10b093: 57 push %edi
10b094: 56 push %esi
10b095: 53 push %ebx
10b096: 83 ec 4c sub $0x4c,%esp
10b099: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
10b09c: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10b0a0: 89 45 c8 mov %eax,-0x38(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10b0a3: 8b 4b 34 mov 0x34(%ebx),%ecx
10b0a6: 85 c9 test %ecx,%ecx
10b0a8: 75 0e jne 10b0b8 <_Objects_Extend_information+0x28>
10b0aa: 89 45 d4 mov %eax,-0x2c(%ebp)
10b0ad: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b0b4: 31 d2 xor %edx,%edx
10b0b6: eb 31 jmp 10b0e9 <_Objects_Extend_information+0x59>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10b0b8: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10b0bc: 8b 43 10 mov 0x10(%ebx),%eax
10b0bf: 31 d2 xor %edx,%edx
10b0c1: 66 f7 f6 div %si
10b0c4: 0f b7 d0 movzwl %ax,%edx
10b0c7: 8b 7d c8 mov -0x38(%ebp),%edi
10b0ca: 89 7d d4 mov %edi,-0x2c(%ebp)
10b0cd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10b0d4: 31 c0 xor %eax,%eax
for ( ; block < block_count; block++ ) {
10b0d6: eb 0a jmp 10b0e2 <_Objects_Extend_information+0x52>
if ( information->object_blocks[ block ] == NULL )
10b0d8: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4)
10b0dc: 74 08 je 10b0e6 <_Objects_Extend_information+0x56>
10b0de: 01 75 d4 add %esi,-0x2c(%ebp)
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10b0e1: 40 inc %eax
10b0e2: 39 d0 cmp %edx,%eax
10b0e4: 72 f2 jb 10b0d8 <_Objects_Extend_information+0x48>
10b0e6: 89 45 cc mov %eax,-0x34(%ebp)
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10b0e9: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10b0ed: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10b0f1: 8d 0c 08 lea (%eax,%ecx,1),%ecx
10b0f4: 89 4d b8 mov %ecx,-0x48(%ebp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10b0f7: 81 f9 ff ff 00 00 cmp $0xffff,%ecx
10b0fd: 0f 87 db 01 00 00 ja 10b2de <_Objects_Extend_information+0x24e><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10b103: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10b107: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b10b: 74 1e je 10b12b <_Objects_Extend_information+0x9b>
new_object_block = _Workspace_Allocate( block_size );
10b10d: 83 ec 0c sub $0xc,%esp
10b110: 50 push %eax
10b111: 89 55 b4 mov %edx,-0x4c(%ebp)
10b114: e8 53 1a 00 00 call 10cb6c <_Workspace_Allocate>
10b119: 89 45 bc mov %eax,-0x44(%ebp)
if ( !new_object_block )
10b11c: 83 c4 10 add $0x10,%esp
10b11f: 85 c0 test %eax,%eax
10b121: 8b 55 b4 mov -0x4c(%ebp),%edx
10b124: 75 1a jne 10b140 <_Objects_Extend_information+0xb0>
10b126: e9 b3 01 00 00 jmp 10b2de <_Objects_Extend_information+0x24e>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10b12b: 83 ec 0c sub $0xc,%esp
10b12e: 50 push %eax
10b12f: 89 55 b4 mov %edx,-0x4c(%ebp)
10b132: e8 09 1a 00 00 call 10cb40 <_Workspace_Allocate_or_fatal_error>
10b137: 89 45 bc mov %eax,-0x44(%ebp)
10b13a: 83 c4 10 add $0x10,%esp
10b13d: 8b 55 b4 mov -0x4c(%ebp),%edx
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
10b140: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10b144: 39 45 d4 cmp %eax,-0x2c(%ebp)
10b147: 0f 82 14 01 00 00 jb 10b261 <_Objects_Extend_information+0x1d1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10b14d: 8d 72 01 lea 0x1(%edx),%esi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10b150: 83 ec 0c sub $0xc,%esp
10b153: 8b 4d b8 mov -0x48(%ebp),%ecx
10b156: 03 4d c8 add -0x38(%ebp),%ecx
10b159: 8d 04 76 lea (%esi,%esi,2),%eax
10b15c: 8d 04 01 lea (%ecx,%eax,1),%eax
10b15f: c1 e0 02 shl $0x2,%eax
10b162: 50 push %eax
10b163: 89 55 b4 mov %edx,-0x4c(%ebp)
10b166: e8 01 1a 00 00 call 10cb6c <_Workspace_Allocate>
if ( !object_blocks ) {
10b16b: 83 c4 10 add $0x10,%esp
10b16e: 85 c0 test %eax,%eax
10b170: 8b 55 b4 mov -0x4c(%ebp),%edx
10b173: 75 13 jne 10b188 <_Objects_Extend_information+0xf8>
_Workspace_Free( new_object_block );
10b175: 83 ec 0c sub $0xc,%esp
10b178: ff 75 bc pushl -0x44(%ebp)
10b17b: e8 05 1a 00 00 call 10cb85 <_Workspace_Free>
return;
10b180: 83 c4 10 add $0x10,%esp
10b183: e9 56 01 00 00 jmp 10b2de <_Objects_Extend_information+0x24e>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
10b188: 8d 0c b0 lea (%eax,%esi,4),%ecx
10b18b: 89 4d c0 mov %ecx,-0x40(%ebp)
10b18e: 8d 34 f0 lea (%eax,%esi,8),%esi
10b191: 89 75 c4 mov %esi,-0x3c(%ebp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10b194: 0f b7 73 10 movzwl 0x10(%ebx),%esi
10b198: 31 c9 xor %ecx,%ecx
10b19a: 3b 75 c8 cmp -0x38(%ebp),%esi
10b19d: 76 3e jbe 10b1dd <_Objects_Extend_information+0x14d>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
10b19f: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
10b1a6: 89 75 d0 mov %esi,-0x30(%ebp)
10b1a9: 8b 73 34 mov 0x34(%ebx),%esi
10b1ac: 89 c7 mov %eax,%edi
10b1ae: 8b 4d d0 mov -0x30(%ebp),%ecx
10b1b1: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10b1b3: 8b 73 30 mov 0x30(%ebx),%esi
10b1b6: 8b 7d c0 mov -0x40(%ebp),%edi
10b1b9: 8b 4d d0 mov -0x30(%ebp),%ecx
10b1bc: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b1be: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10b1c2: 03 4d c8 add -0x38(%ebp),%ecx
10b1c5: c1 e1 02 shl $0x2,%ecx
10b1c8: 8b 73 1c mov 0x1c(%ebx),%esi
10b1cb: 8b 7d c4 mov -0x3c(%ebp),%edi
10b1ce: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10b1d0: eb 10 jmp 10b1e2 <_Objects_Extend_information+0x152>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10b1d2: 8b 7d c4 mov -0x3c(%ebp),%edi
10b1d5: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b1dc: 41 inc %ecx
10b1dd: 3b 4d c8 cmp -0x38(%ebp),%ecx
10b1e0: 72 f0 jb 10b1d2 <_Objects_Extend_information+0x142>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10b1e2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
inactive_per_block[block_count] = 0;
10b1e9: 8b 4d c0 mov -0x40(%ebp),%ecx
10b1ec: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b1f3: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b1f7: 8b 75 d4 mov -0x2c(%ebp),%esi
10b1fa: 01 d6 add %edx,%esi
10b1fc: 8b 7d d4 mov -0x2c(%ebp),%edi
10b1ff: 8b 55 c4 mov -0x3c(%ebp),%edx
10b202: 8d 0c ba lea (%edx,%edi,4),%ecx
10b205: 89 fa mov %edi,%edx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b207: eb 0a jmp 10b213 <_Objects_Extend_information+0x183>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10b209: c7 01 00 00 00 00 movl $0x0,(%ecx)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b20f: 42 inc %edx
10b210: 83 c1 04 add $0x4,%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10b213: 39 f2 cmp %esi,%edx
10b215: 72 f2 jb 10b209 <_Objects_Extend_information+0x179>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b217: 9c pushf
10b218: fa cli
10b219: 5e pop %esi
old_tables = information->object_blocks;
10b21a: 8b 53 34 mov 0x34(%ebx),%edx
information->object_blocks = object_blocks;
10b21d: 89 43 34 mov %eax,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10b220: 8b 4d c0 mov -0x40(%ebp),%ecx
10b223: 89 4b 30 mov %ecx,0x30(%ebx)
information->local_table = local_table;
10b226: 8b 7d c4 mov -0x3c(%ebp),%edi
10b229: 89 7b 1c mov %edi,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10b22c: 8b 45 b8 mov -0x48(%ebp),%eax
10b22f: 66 89 43 10 mov %ax,0x10(%ebx)
information->maximum_id = _Objects_Build_id(
10b233: 8b 03 mov (%ebx),%eax
10b235: c1 e0 18 shl $0x18,%eax
10b238: 0d 00 00 01 00 or $0x10000,%eax
10b23d: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10b241: c1 e1 1b shl $0x1b,%ecx
10b244: 09 c8 or %ecx,%eax
10b246: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx
10b24a: 09 c8 or %ecx,%eax
10b24c: 89 43 0c mov %eax,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b24f: 56 push %esi
10b250: 9d popf
if ( old_tables )
10b251: 85 d2 test %edx,%edx
10b253: 74 0c je 10b261 <_Objects_Extend_information+0x1d1>
_Workspace_Free( old_tables );
10b255: 83 ec 0c sub $0xc,%esp
10b258: 52 push %edx
10b259: e8 27 19 00 00 call 10cb85 <_Workspace_Free>
10b25e: 83 c4 10 add $0x10,%esp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10b261: 8b 55 cc mov -0x34(%ebp),%edx
10b264: c1 e2 02 shl $0x2,%edx
10b267: 89 55 d0 mov %edx,-0x30(%ebp)
10b26a: 8b 43 34 mov 0x34(%ebx),%eax
10b26d: 8b 75 bc mov -0x44(%ebp),%esi
10b270: 8b 4d cc mov -0x34(%ebp),%ecx
10b273: 89 34 88 mov %esi,(%eax,%ecx,4)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b276: ff 73 18 pushl 0x18(%ebx)
10b279: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b27d: 52 push %edx
10b27e: ff 34 88 pushl (%eax,%ecx,4)
10b281: 8d 45 dc lea -0x24(%ebp),%eax
10b284: 50 push %eax
10b285: 89 45 b4 mov %eax,-0x4c(%ebp)
10b288: e8 57 31 00 00 call 10e3e4 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b28d: 8d 7b 20 lea 0x20(%ebx),%edi
10b290: 8b 75 d4 mov -0x2c(%ebp),%esi
10b293: eb 23 jmp 10b2b8 <_Objects_Extend_information+0x228>
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
10b295: 8b 13 mov (%ebx),%edx
10b297: c1 e2 18 shl $0x18,%edx
10b29a: 81 ca 00 00 01 00 or $0x10000,%edx
10b2a0: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10b2a4: c1 e1 1b shl $0x1b,%ecx
10b2a7: 09 ca or %ecx,%edx
10b2a9: 09 f2 or %esi,%edx
10b2ab: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b2ae: 52 push %edx
10b2af: 52 push %edx
10b2b0: 50 push %eax
10b2b1: 57 push %edi
10b2b2: e8 49 f5 ff ff call 10a800 <_Chain_Append>
index++;
10b2b7: 46 inc %esi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10b2b8: 8d 45 dc lea -0x24(%ebp),%eax
10b2bb: 89 04 24 mov %eax,(%esp)
10b2be: e8 61 f5 ff ff call 10a824 <_Chain_Get>
10b2c3: 83 c4 10 add $0x10,%esp
10b2c6: 85 c0 test %eax,%eax
10b2c8: 75 cb jne 10b295 <_Objects_Extend_information+0x205>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b2ca: 8b 43 30 mov 0x30(%ebx),%eax
10b2cd: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10b2d1: 8b 4d d0 mov -0x30(%ebp),%ecx
10b2d4: 89 14 08 mov %edx,(%eax,%ecx,1)
information->inactive =
10b2d7: 8b 43 14 mov 0x14(%ebx),%eax
10b2da: 66 01 43 2c add %ax,0x2c(%ebx)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
10b2de: 8d 65 f4 lea -0xc(%ebp),%esp
10b2e1: 5b pop %ebx
10b2e2: 5e pop %esi
10b2e3: 5f pop %edi
10b2e4: c9 leave
10b2e5: c3 ret
0010b378 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10b378: 55 push %ebp
10b379: 89 e5 mov %esp,%ebp
10b37b: 56 push %esi
10b37c: 53 push %ebx
10b37d: 8b 75 08 mov 0x8(%ebp),%esi
10b380: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10b383: 85 db test %ebx,%ebx
10b385: 74 2d je 10b3b4 <_Objects_Get_information+0x3c>
/*
* 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 );
10b387: 83 ec 0c sub $0xc,%esp
10b38a: 56 push %esi
10b38b: e8 38 35 00 00 call 10e8c8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10b390: 83 c4 10 add $0x10,%esp
10b393: 85 c0 test %eax,%eax
10b395: 74 1d je 10b3b4 <_Objects_Get_information+0x3c>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10b397: 39 c3 cmp %eax,%ebx
10b399: 77 19 ja 10b3b4 <_Objects_Get_information+0x3c>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10b39b: 8b 04 b5 28 3a 12 00 mov 0x123a28(,%esi,4),%eax
10b3a2: 85 c0 test %eax,%eax
10b3a4: 74 0e je 10b3b4 <_Objects_Get_information+0x3c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10b3a6: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10b3a9: 85 c0 test %eax,%eax
10b3ab: 74 09 je 10b3b6 <_Objects_Get_information+0x3e><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
10b3ad: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10b3b2: 75 02 jne 10b3b6 <_Objects_Get_information+0x3e>
10b3b4: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10b3b6: 8d 65 f8 lea -0x8(%ebp),%esp
10b3b9: 5b pop %ebx
10b3ba: 5e pop %esi
10b3bb: c9 leave
10b3bc: c3 ret
0010c90c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10c90c: 55 push %ebp
10c90d: 89 e5 mov %esp,%ebp
10c90f: 57 push %edi
10c910: 56 push %esi
10c911: 53 push %ebx
10c912: 83 ec 2c sub $0x2c,%esp
10c915: 8b 75 0c mov 0xc(%ebp),%esi
10c918: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10c91b: 85 f6 test %esi,%esi
10c91d: 0f 84 95 00 00 00 je 10c9b8 <_Objects_Get_name_as_string+0xac><== NEVER TAKEN
return NULL;
if ( name == NULL )
10c923: 85 db test %ebx,%ebx
10c925: 0f 84 8f 00 00 00 je 10c9ba <_Objects_Get_name_as_string+0xae><== NEVER TAKEN
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10c92b: 8b 7d 08 mov 0x8(%ebp),%edi
10c92e: 85 ff test %edi,%edi
10c930: 75 08 jne 10c93a <_Objects_Get_name_as_string+0x2e>
10c932: a1 74 ea 12 00 mov 0x12ea74,%eax
10c937: 8b 78 08 mov 0x8(%eax),%edi
information = _Objects_Get_information_id( tmpId );
10c93a: 83 ec 0c sub $0xc,%esp
10c93d: 57 push %edi
10c93e: e8 11 ff ff ff call 10c854 <_Objects_Get_information_id>
if ( !information )
10c943: 83 c4 10 add $0x10,%esp
10c946: 85 c0 test %eax,%eax
10c948: 74 6e je 10c9b8 <_Objects_Get_name_as_string+0xac><== NEVER TAKEN
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10c94a: 52 push %edx
10c94b: 8d 55 e4 lea -0x1c(%ebp),%edx
10c94e: 52 push %edx
10c94f: 57 push %edi
10c950: 50 push %eax
10c951: e8 6e 00 00 00 call 10c9c4 <_Objects_Get>
switch ( location ) {
10c956: 83 c4 10 add $0x10,%esp
10c959: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10c95d: 75 59 jne 10c9b8 <_Objects_Get_name_as_string+0xac>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10c95f: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
10c962: 89 c2 mov %eax,%edx
10c964: c1 ea 18 shr $0x18,%edx
10c967: 88 55 df mov %dl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10c96a: 89 c2 mov %eax,%edx
10c96c: c1 ea 10 shr $0x10,%edx
10c96f: 88 55 e0 mov %dl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10c972: 89 c2 mov %eax,%edx
10c974: c1 ea 08 shr $0x8,%edx
10c977: 88 55 e1 mov %dl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10c97a: 88 45 e2 mov %al,-0x1e(%ebp)
lname[ 4 ] = '\0';
10c97d: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
10c981: 89 d8 mov %ebx,%eax
10c983: 31 d2 xor %edx,%edx
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10c985: 4e dec %esi
10c986: 89 75 d4 mov %esi,-0x2c(%ebp)
10c989: eb 16 jmp 10c9a1 <_Objects_Get_name_as_string+0x95>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10c98b: 0f b6 f1 movzbl %cl,%esi
10c98e: 8b 3d 6c 4a 12 00 mov 0x124a6c,%edi
10c994: f6 44 37 01 97 testb $0x97,0x1(%edi,%esi,1)
10c999: 75 02 jne 10c99d <_Objects_Get_name_as_string+0x91>
10c99b: b1 2a mov $0x2a,%cl
10c99d: 88 08 mov %cl,(%eax)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10c99f: 42 inc %edx
10c9a0: 40 inc %eax
10c9a1: 3b 55 d4 cmp -0x2c(%ebp),%edx
10c9a4: 73 08 jae 10c9ae <_Objects_Get_name_as_string+0xa2>
10c9a6: 8a 4c 15 df mov -0x21(%ebp,%edx,1),%cl
10c9aa: 84 c9 test %cl,%cl
10c9ac: 75 dd jne 10c98b <_Objects_Get_name_as_string+0x7f>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
10c9ae: c6 00 00 movb $0x0,(%eax)
_Thread_Enable_dispatch();
10c9b1: e8 d3 07 00 00 call 10d189 <_Thread_Enable_dispatch>
return name;
10c9b6: eb 02 jmp 10c9ba <_Objects_Get_name_as_string+0xae>
10c9b8: 31 db xor %ebx,%ebx
}
return NULL; /* unreachable path */
}
10c9ba: 89 d8 mov %ebx,%eax
10c9bc: 8d 65 f4 lea -0xc(%ebp),%esp
10c9bf: 5b pop %ebx
10c9c0: 5e pop %esi
10c9c1: 5f pop %edi
10c9c2: c9 leave
10c9c3: c3 ret
00118930 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
118930: 55 push %ebp
118931: 89 e5 mov %esp,%ebp
118933: 53 push %ebx
118934: 8b 55 08 mov 0x8(%ebp),%edx
118937: 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;
11893a: b8 01 00 00 00 mov $0x1,%eax
11893f: 2b 42 08 sub 0x8(%edx),%eax
118942: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
118945: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
118949: 39 c3 cmp %eax,%ebx
11894b: 72 12 jb 11895f <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11894d: 8b 52 1c mov 0x1c(%edx),%edx
118950: 8b 04 82 mov (%edx,%eax,4),%eax
118953: 85 c0 test %eax,%eax
118955: 74 08 je 11895f <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
118957: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
11895d: eb 08 jmp 118967 <_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;
11895f: c7 01 01 00 00 00 movl $0x1,(%ecx)
118965: 31 c0 xor %eax,%eax
return NULL;
}
118967: 5b pop %ebx
118968: c9 leave
118969: c3 ret
0010c564 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10c564: 55 push %ebp
10c565: 89 e5 mov %esp,%ebp
10c567: 83 ec 18 sub $0x18,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10c56a: 8b 45 08 mov 0x8(%ebp),%eax
10c56d: 85 c0 test %eax,%eax
10c56f: 75 08 jne 10c579 <_Objects_Id_to_name+0x15>
10c571: a1 7c 52 12 00 mov 0x12527c,%eax
10c576: 8b 40 08 mov 0x8(%eax),%eax
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10c579: 89 c2 mov %eax,%edx
10c57b: c1 ea 18 shr $0x18,%edx
10c57e: 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 )
10c581: 8d 4a ff lea -0x1(%edx),%ecx
10c584: 83 f9 03 cmp $0x3,%ecx
10c587: 77 32 ja 10c5bb <_Objects_Id_to_name+0x57>
10c589: eb 37 jmp 10c5c2 <_Objects_Id_to_name+0x5e>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10c58b: 89 c1 mov %eax,%ecx
10c58d: c1 e9 1b shr $0x1b,%ecx
10c590: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10c593: 85 d2 test %edx,%edx
10c595: 74 24 je 10c5bb <_Objects_Id_to_name+0x57><== 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 );
10c597: 51 push %ecx
10c598: 8d 4d f4 lea -0xc(%ebp),%ecx
10c59b: 51 push %ecx
10c59c: 50 push %eax
10c59d: 52 push %edx
10c59e: e8 69 ff ff ff call 10c50c <_Objects_Get>
if ( !the_object )
10c5a3: 83 c4 10 add $0x10,%esp
10c5a6: 85 c0 test %eax,%eax
10c5a8: 74 11 je 10c5bb <_Objects_Id_to_name+0x57>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10c5aa: 8b 50 0c mov 0xc(%eax),%edx
10c5ad: 8b 45 0c mov 0xc(%ebp),%eax
10c5b0: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c5b2: e8 86 07 00 00 call 10cd3d <_Thread_Enable_dispatch>
10c5b7: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10c5b9: eb 05 jmp 10c5c0 <_Objects_Id_to_name+0x5c>
10c5bb: b8 03 00 00 00 mov $0x3,%eax
}
10c5c0: c9 leave
10c5c1: 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 ] )
10c5c2: 8b 14 95 94 51 12 00 mov 0x125194(,%edx,4),%edx
10c5c9: 85 d2 test %edx,%edx
10c5cb: 75 be jne 10c58b <_Objects_Id_to_name+0x27>
10c5cd: eb ec jmp 10c5bb <_Objects_Id_to_name+0x57>
0010b468 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10b468: 55 push %ebp
10b469: 89 e5 mov %esp,%ebp
10b46b: 57 push %edi
10b46c: 56 push %esi
10b46d: 53 push %ebx
10b46e: 83 ec 1c sub $0x1c,%esp
10b471: 8b 45 08 mov 0x8(%ebp),%eax
10b474: 8b 55 0c mov 0xc(%ebp),%edx
10b477: 8b 75 10 mov 0x10(%ebp),%esi
10b47a: 8b 5d 14 mov 0x14(%ebp),%ebx
10b47d: 8b 4d 20 mov 0x20(%ebp),%ecx
10b480: 89 4d e4 mov %ecx,-0x1c(%ebp)
10b483: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10b487: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10b489: 66 89 70 04 mov %si,0x4(%eax)
information->size = size;
10b48d: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10b490: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10b497: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10b49e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10b4a5: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10b4ab: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10b4b1: 8b 3c 95 28 3a 12 00 mov 0x123a28(,%edx,4),%edi
10b4b8: 89 04 b7 mov %eax,(%edi,%esi,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10b4bb: 89 df mov %ebx,%edi
10b4bd: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10b4c0: 89 f9 mov %edi,%ecx
10b4c2: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10b4c5: 89 d9 mov %ebx,%ecx
10b4c7: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10b4cd: 85 ff test %edi,%edi
10b4cf: 74 10 je 10b4e1 <_Objects_Initialize_information+0x79>
10b4d1: 85 c9 test %ecx,%ecx
10b4d3: 75 0c jne 10b4e1 <_Objects_Initialize_information+0x79>
_Internal_error_Occurred(
10b4d5: 50 push %eax
10b4d6: 6a 14 push $0x14
10b4d8: 6a 01 push $0x1
10b4da: 6a 00 push $0x0
10b4dc: e8 83 fa ff ff call 10af64 <_Internal_error_Occurred>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10b4e1: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10b4e5: c7 40 1c f0 36 12 00 movl $0x1236f0,0x1c(%eax)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
10b4ec: c1 e2 18 shl $0x18,%edx
10b4ef: 81 ca 00 00 01 00 or $0x10000,%edx
10b4f5: c1 e6 1b shl $0x1b,%esi
10b4f8: 09 f2 or %esi,%edx
10b4fa: 85 c9 test %ecx,%ecx
10b4fc: 0f 95 c3 setne %bl
10b4ff: 89 de mov %ebx,%esi
10b501: 81 e6 ff 00 00 00 and $0xff,%esi
10b507: 09 f2 or %esi,%edx
10b509: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10b50c: 8b 55 e4 mov -0x1c(%ebp),%edx
10b50f: f6 c2 03 test $0x3,%dl
10b512: 74 06 je 10b51a <_Objects_Initialize_information+0xb2><== ALWAYS TAKEN
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10b514: 83 c2 04 add $0x4,%edx <== NOT EXECUTED
10b517: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10b51a: 66 89 50 38 mov %dx,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10b51e: 8d 50 24 lea 0x24(%eax),%edx
10b521: 89 50 20 mov %edx,0x20(%eax)
the_chain->permanent_null = NULL;
10b524: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
the_chain->last = _Chain_Head(the_chain);
10b52b: 8d 50 20 lea 0x20(%eax),%edx
10b52e: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10b531: 85 c9 test %ecx,%ecx
10b533: 74 0f je 10b544 <_Objects_Initialize_information+0xdc>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b535: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b538: 8d 65 f4 lea -0xc(%ebp),%esp
10b53b: 5b pop %ebx
10b53c: 5e pop %esi
10b53d: 5f pop %edi
10b53e: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10b53f: e9 4c fb ff ff jmp 10b090 <_Objects_Extend_information>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10b544: 8d 65 f4 lea -0xc(%ebp),%esp
10b547: 5b pop %ebx
10b548: 5e pop %esi
10b549: 5f pop %edi
10b54a: c9 leave
10b54b: c3 ret
0010e18e <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10e18e: 55 push %ebp
10e18f: 89 e5 mov %esp,%ebp
10e191: 57 push %edi
10e192: 56 push %esi
10e193: 53 push %ebx
10e194: 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 ];
10e197: 8b 45 08 mov 0x8(%ebp),%eax
10e19a: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx
if ( !api )
10e1a0: 85 db test %ebx,%ebx
10e1a2: 74 45 je 10e1e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10e1a4: 9c pushf
10e1a5: fa cli
10e1a6: 58 pop %eax
signal_set = asr->signals_posted;
10e1a7: 8b 7b 14 mov 0x14(%ebx),%edi
asr->signals_posted = 0;
10e1aa: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
10e1b1: 50 push %eax
10e1b2: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10e1b3: 85 ff test %edi,%edi
10e1b5: 74 32 je 10e1e9 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
return;
asr->nest_level += 1;
10e1b7: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e1ba: 50 push %eax
10e1bb: 8d 75 e4 lea -0x1c(%ebp),%esi
10e1be: 56 push %esi
10e1bf: 68 ff ff 00 00 push $0xffff
10e1c4: ff 73 10 pushl 0x10(%ebx)
10e1c7: e8 4c 19 00 00 call 10fb18 <rtems_task_mode>
(*asr->handler)( signal_set );
10e1cc: 89 3c 24 mov %edi,(%esp)
10e1cf: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
10e1d2: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10e1d5: 83 c4 0c add $0xc,%esp
10e1d8: 56 push %esi
10e1d9: 68 ff ff 00 00 push $0xffff
10e1de: ff 75 e4 pushl -0x1c(%ebp)
10e1e1: e8 32 19 00 00 call 10fb18 <rtems_task_mode>
10e1e6: 83 c4 10 add $0x10,%esp
}
10e1e9: 8d 65 f4 lea -0xc(%ebp),%esp
10e1ec: 5b pop %ebx
10e1ed: 5e pop %esi
10e1ee: 5f pop %edi
10e1ef: c9 leave
10e1f0: c3 ret
0010b1e8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b1e8: 55 push %ebp
10b1e9: 89 e5 mov %esp,%ebp
10b1eb: 53 push %ebx
10b1ec: 83 ec 18 sub $0x18,%esp
10b1ef: 8d 45 f4 lea -0xc(%ebp),%eax
10b1f2: 50 push %eax
10b1f3: ff 75 08 pushl 0x8(%ebp)
10b1f6: 68 40 65 12 00 push $0x126540
10b1fb: e8 2c 19 00 00 call 10cb2c <_Objects_Get>
10b200: 89 c3 mov %eax,%ebx
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10b202: 83 c4 10 add $0x10,%esp
10b205: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b209: 75 64 jne 10b26f <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b20b: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b20e: f6 40 11 40 testb $0x40,0x11(%eax)
10b212: 74 18 je 10b22c <_Rate_monotonic_Timeout+0x44>
the_thread->Wait.id == the_period->Object.id ) {
10b214: 8b 50 20 mov 0x20(%eax),%edx
10b217: 3b 53 08 cmp 0x8(%ebx),%edx
10b21a: 75 10 jne 10b22c <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b21c: 52 push %edx
10b21d: 52 push %edx
10b21e: 68 f8 ff 03 10 push $0x1003fff8
10b223: 50 push %eax
10b224: e8 4b 1d 00 00 call 10cf74 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b229: 59 pop %ecx
10b22a: eb 10 jmp 10b23c <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10b22c: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b230: 75 2b jne 10b25d <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10b232: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10b239: 83 ec 0c sub $0xc,%esp
10b23c: 53 push %ebx
10b23d: e8 56 fa ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b242: 8b 43 3c mov 0x3c(%ebx),%eax
10b245: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b248: 58 pop %eax
10b249: 5a pop %edx
10b24a: 83 c3 10 add $0x10,%ebx
10b24d: 53 push %ebx
10b24e: 68 14 67 12 00 push $0x126714
10b253: e8 e0 2f 00 00 call 10e238 <_Watchdog_Insert>
10b258: 83 c4 10 add $0x10,%esp
10b25b: eb 07 jmp 10b264 <_Rate_monotonic_Timeout+0x7c>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b25d: 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;
10b264: a1 38 66 12 00 mov 0x126638,%eax
10b269: 48 dec %eax
10b26a: a3 38 66 12 00 mov %eax,0x126638
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b26f: 8b 5d fc mov -0x4(%ebp),%ebx
10b272: c9 leave
10b273: c3 ret
0010ab10 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10ab10: 55 push %ebp
10ab11: 89 e5 mov %esp,%ebp
10ab13: 53 push %ebx
10ab14: 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();
10ab17: 8b 1d 64 2c 12 00 mov 0x122c64,%ebx
if ((!the_tod) ||
10ab1d: 85 c9 test %ecx,%ecx
10ab1f: 74 59 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
10ab21: b8 40 42 0f 00 mov $0xf4240,%eax
10ab26: 31 d2 xor %edx,%edx
10ab28: f7 f3 div %ebx
10ab2a: 39 41 18 cmp %eax,0x18(%ecx)
10ab2d: 73 4b jae 10ab7a <_TOD_Validate+0x6a>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10ab2f: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10ab33: 77 45 ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10ab35: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10ab39: 77 3f ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10ab3b: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10ab3f: 77 39 ja 10ab7a <_TOD_Validate+0x6a>
(the_tod->month == 0) ||
10ab41: 8b 41 04 mov 0x4(%ecx),%eax
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10ab44: 85 c0 test %eax,%eax
10ab46: 74 32 je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
10ab48: 83 f8 0c cmp $0xc,%eax
10ab4b: 77 2d ja 10ab7a <_TOD_Validate+0x6a>
(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) ||
10ab4d: 8b 19 mov (%ecx),%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) ||
10ab4f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx
10ab55: 76 23 jbe 10ab7a <_TOD_Validate+0x6a>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10ab57: 8b 51 08 mov 0x8(%ecx),%edx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10ab5a: 85 d2 test %edx,%edx
10ab5c: 74 1c je 10ab7a <_TOD_Validate+0x6a> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10ab5e: 80 e3 03 and $0x3,%bl
10ab61: 75 09 jne 10ab6c <_TOD_Validate+0x5c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10ab63: 8b 04 85 60 ff 11 00 mov 0x11ff60(,%eax,4),%eax
10ab6a: eb 07 jmp 10ab73 <_TOD_Validate+0x63>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ab6c: 8b 04 85 2c ff 11 00 mov 0x11ff2c(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10ab73: 39 c2 cmp %eax,%edx
10ab75: 0f 96 c0 setbe %al
10ab78: eb 02 jmp 10ab7c <_TOD_Validate+0x6c>
10ab7a: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ab7c: 5b pop %ebx
10ab7d: c9 leave
10ab7e: c3 ret
0010b738 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b738: 55 push %ebp
10b739: 89 e5 mov %esp,%ebp
10b73b: 57 push %edi
10b73c: 56 push %esi
10b73d: 53 push %ebx
10b73e: 83 ec 28 sub $0x28,%esp
10b741: 8b 5d 08 mov 0x8(%ebp),%ebx
10b744: 8b 7d 0c mov 0xc(%ebp),%edi
10b747: 8a 45 10 mov 0x10(%ebp),%al
10b74a: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10b74d: 8b 73 10 mov 0x10(%ebx),%esi
/*
* 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 );
10b750: 53 push %ebx
10b751: e8 32 0d 00 00 call 10c488 <_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 )
10b756: 83 c4 10 add $0x10,%esp
10b759: 39 7b 14 cmp %edi,0x14(%ebx)
10b75c: 74 0c je 10b76a <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b75e: 50 push %eax
10b75f: 50 push %eax
10b760: 57 push %edi
10b761: 53 push %ebx
10b762: e8 e9 0b 00 00 call 10c350 <_Thread_Set_priority>
10b767: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b76a: 9c pushf
10b76b: fa cli
10b76c: 59 pop %ecx
/*
* 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;
10b76d: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b770: 83 f8 04 cmp $0x4,%eax
10b773: 74 2f je 10b7a4 <_Thread_Change_priority+0x6c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b775: 83 e6 04 and $0x4,%esi
10b778: 75 08 jne 10b782 <_Thread_Change_priority+0x4a><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10b77a: 89 c2 mov %eax,%edx
10b77c: 83 e2 fb and $0xfffffffb,%edx
10b77f: 89 53 10 mov %edx,0x10(%ebx)
_ISR_Enable( level );
10b782: 51 push %ecx
10b783: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b784: a9 e0 be 03 00 test $0x3bee0,%eax
10b789: 0f 84 c0 00 00 00 je 10b84f <_Thread_Change_priority+0x117>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b78f: 89 5d 0c mov %ebx,0xc(%ebp)
10b792: 8b 43 44 mov 0x44(%ebx),%eax
10b795: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10b798: 8d 65 f4 lea -0xc(%ebp),%esp
10b79b: 5b pop %ebx
10b79c: 5e pop %esi
10b79d: 5f pop %edi
10b79e: 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 );
10b79f: e9 24 0b 00 00 jmp 10c2c8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b7a4: 83 e6 04 and $0x4,%esi
10b7a7: 75 53 jne 10b7fc <_Thread_Change_priority+0xc4><== 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 );
10b7a9: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10b7b0: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10b7b6: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx
10b7bd: 66 09 10 or %dx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10b7c0: 66 a1 04 3b 12 00 mov 0x123b04,%ax
10b7c6: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10b7cc: 66 a3 04 3b 12 00 mov %ax,0x123b04
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10b7d2: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b7d6: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10b7dc: 74 0e je 10b7ec <_Thread_Change_priority+0xb4>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10b7de: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10b7e1: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10b7e3: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10b7e5: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10b7e7: 89 5a 04 mov %ebx,0x4(%edx)
10b7ea: eb 10 jmp 10b7fc <_Thread_Change_priority+0xc4>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10b7ec: 8d 50 04 lea 0x4(%eax),%edx
10b7ef: 89 13 mov %edx,(%ebx)
old_last_node = the_chain->last;
10b7f1: 8b 50 08 mov 0x8(%eax),%edx
the_chain->last = the_node;
10b7f4: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10b7f7: 89 1a mov %ebx,(%edx)
the_node->previous = old_last_node;
10b7f9: 89 53 04 mov %edx,0x4(%ebx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10b7fc: 51 push %ecx
10b7fd: 9d popf
10b7fe: fa cli
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10b7ff: 66 8b 1d 04 3b 12 00 mov 0x123b04,%bx
10b806: 31 c0 xor %eax,%eax
10b808: 89 c2 mov %eax,%edx
10b80a: 66 0f bc d3 bsf %bx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b80e: 0f b7 d2 movzwl %dx,%edx
10b811: 66 8b 9c 12 7c 3b 12 mov 0x123b7c(%edx,%edx,1),%bx
10b818: 00
10b819: 66 0f bc c3 bsf %bx,%ax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10b81d: c1 e2 04 shl $0x4,%edx
10b820: 0f b7 c0 movzwl %ax,%eax
10b823: 01 c2 add %eax,%edx
10b825: 6b d2 0c imul $0xc,%edx,%edx
10b828: 8b 1d 1c 3a 12 00 mov 0x123a1c,%ebx
10b82e: 8b 14 1a mov (%edx,%ebx,1),%edx
10b831: 89 15 e0 3a 12 00 mov %edx,0x123ae0
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10b837: a1 10 3b 12 00 mov 0x123b10,%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.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
10b83c: 39 d0 cmp %edx,%eax
10b83e: 74 0d je 10b84d <_Thread_Change_priority+0x115>
_Thread_Executing->is_preemptible )
10b840: 80 78 75 00 cmpb $0x0,0x75(%eax)
10b844: 74 07 je 10b84d <_Thread_Change_priority+0x115>
_Context_Switch_necessary = true;
10b846: c6 05 20 3b 12 00 01 movb $0x1,0x123b20
_ISR_Enable( level );
10b84d: 51 push %ecx
10b84e: 9d popf
}
10b84f: 8d 65 f4 lea -0xc(%ebp),%esp
10b852: 5b pop %ebx
10b853: 5e pop %esi
10b854: 5f pop %edi
10b855: c9 leave
10b856: c3 ret
0010b858 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10b858: 55 push %ebp
10b859: 89 e5 mov %esp,%ebp
10b85b: 53 push %ebx
10b85c: 8b 45 08 mov 0x8(%ebp),%eax
10b85f: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10b862: 9c pushf
10b863: fa cli
10b864: 59 pop %ecx
current_state = the_thread->current_state;
10b865: 8b 58 10 mov 0x10(%eax),%ebx
if ( current_state & state ) {
10b868: 85 da test %ebx,%edx
10b86a: 74 71 je 10b8dd <_Thread_Clear_state+0x85>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b86c: f7 d2 not %edx
10b86e: 21 da and %ebx,%edx
current_state =
10b870: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10b873: 85 d2 test %edx,%edx
10b875: 75 66 jne 10b8dd <_Thread_Clear_state+0x85>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10b877: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10b87d: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10b884: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10b887: 66 8b 15 04 3b 12 00 mov 0x123b04,%dx
10b88e: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10b894: 66 89 15 04 3b 12 00 mov %dx,0x123b04
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10b89b: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10b8a1: 8d 5a 04 lea 0x4(%edx),%ebx
10b8a4: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10b8a6: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10b8a9: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10b8ac: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10b8ae: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10b8b1: 51 push %ecx
10b8b2: 9d popf
10b8b3: fa cli
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10b8b4: 8b 50 14 mov 0x14(%eax),%edx
10b8b7: 8b 1d e0 3a 12 00 mov 0x123ae0,%ebx
10b8bd: 3b 53 14 cmp 0x14(%ebx),%edx
10b8c0: 73 1b jae 10b8dd <_Thread_Clear_state+0x85>
_Thread_Heir = the_thread;
10b8c2: a3 e0 3a 12 00 mov %eax,0x123ae0
if ( _Thread_Executing->is_preemptible ||
10b8c7: a1 10 3b 12 00 mov 0x123b10,%eax
10b8cc: 80 78 75 00 cmpb $0x0,0x75(%eax)
10b8d0: 75 04 jne 10b8d6 <_Thread_Clear_state+0x7e>
10b8d2: 85 d2 test %edx,%edx
10b8d4: 75 07 jne 10b8dd <_Thread_Clear_state+0x85><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10b8d6: c6 05 20 3b 12 00 01 movb $0x1,0x123b20
}
}
}
_ISR_Enable( level );
10b8dd: 51 push %ecx
10b8de: 9d popf
}
10b8df: 5b pop %ebx
10b8e0: c9 leave
10b8e1: c3 ret
0010ba58 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10ba58: 55 push %ebp
10ba59: 89 e5 mov %esp,%ebp
10ba5b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ba5e: 8d 45 f4 lea -0xc(%ebp),%eax
10ba61: 50 push %eax
10ba62: ff 75 08 pushl 0x8(%ebp)
10ba65: e8 8e 01 00 00 call 10bbf8 <_Thread_Get>
switch ( location ) {
10ba6a: 83 c4 10 add $0x10,%esp
10ba6d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10ba71: 75 1b jne 10ba8e <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10ba73: 52 push %edx
10ba74: 52 push %edx
10ba75: 68 18 00 00 10 push $0x10000018
10ba7a: 50 push %eax
10ba7b: e8 d8 fd ff ff call 10b858 <_Thread_Clear_state>
10ba80: a1 54 3a 12 00 mov 0x123a54,%eax
10ba85: 48 dec %eax
10ba86: a3 54 3a 12 00 mov %eax,0x123a54
10ba8b: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10ba8e: c9 leave
10ba8f: c3 ret
0010ba90 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10ba90: 55 push %ebp
10ba91: 89 e5 mov %esp,%ebp
10ba93: 57 push %edi
10ba94: 56 push %esi
10ba95: 53 push %ebx
10ba96: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10ba99: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx
_ISR_Disable( level );
10ba9f: 9c pushf
10baa0: fa cli
10baa1: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10baa2: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10baa5: e9 f1 00 00 00 jmp 10bb9b <_Thread_Dispatch+0x10b>
heir = _Thread_Heir;
10baaa: 8b 35 e0 3a 12 00 mov 0x123ae0,%esi
_Thread_Dispatch_disable_level = 1;
10bab0: c7 05 54 3a 12 00 01 movl $0x1,0x123a54
10bab7: 00 00 00
_Context_Switch_necessary = false;
10baba: c6 05 20 3b 12 00 00 movb $0x0,0x123b20
_Thread_Executing = heir;
10bac1: 89 35 10 3b 12 00 mov %esi,0x123b10
#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 )
10bac7: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10bacb: 75 09 jne 10bad6 <_Thread_Dispatch+0x46>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bacd: 8b 15 20 3a 12 00 mov 0x123a20,%edx
10bad3: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10bad6: 50 push %eax
10bad7: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10bad8: 83 ec 0c sub $0xc,%esp
10badb: 8d 45 e0 lea -0x20(%ebp),%eax
10bade: 50 push %eax
10badf: e8 b8 2a 00 00 call 10e59c <_TOD_Get_uptime>
_Timestamp_Subtract(
10bae4: 83 c4 0c add $0xc,%esp
10bae7: 57 push %edi
10bae8: 8d 45 e0 lea -0x20(%ebp),%eax
10baeb: 50 push %eax
10baec: 68 18 3b 12 00 push $0x123b18
10baf1: e8 fe 0b 00 00 call 10c6f4 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10baf6: 58 pop %eax
10baf7: 5a pop %edx
10baf8: 57 push %edi
10baf9: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10baff: 50 push %eax
10bb00: e8 bf 0b 00 00 call 10c6c4 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10bb05: 8b 45 e0 mov -0x20(%ebp),%eax
10bb08: 8b 55 e4 mov -0x1c(%ebp),%edx
10bb0b: a3 18 3b 12 00 mov %eax,0x123b18
10bb10: 89 15 1c 3b 12 00 mov %edx,0x123b1c
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10bb16: a1 dc 3a 12 00 mov 0x123adc,%eax
10bb1b: 83 c4 10 add $0x10,%esp
10bb1e: 85 c0 test %eax,%eax
10bb20: 74 10 je 10bb32 <_Thread_Dispatch+0xa2> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10bb22: 8b 10 mov (%eax),%edx
10bb24: 89 93 ec 00 00 00 mov %edx,0xec(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10bb2a: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx
10bb30: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10bb32: 51 push %ecx
10bb33: 51 push %ecx
10bb34: 56 push %esi
10bb35: 53 push %ebx
10bb36: e8 e9 0d 00 00 call 10c924 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10bb3b: 58 pop %eax
10bb3c: 5a pop %edx
10bb3d: 81 c6 d0 00 00 00 add $0xd0,%esi
10bb43: 56 push %esi
10bb44: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax
10bb4a: 50 push %eax
10bb4b: e8 a0 10 00 00 call 10cbf0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10bb50: 83 c4 10 add $0x10,%esp
10bb53: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx)
10bb5a: 74 36 je 10bb92 <_Thread_Dispatch+0x102>
#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 );
10bb5c: a1 d8 3a 12 00 mov 0x123ad8,%eax
10bb61: 39 c3 cmp %eax,%ebx
10bb63: 74 2d je 10bb92 <_Thread_Dispatch+0x102>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10bb65: 85 c0 test %eax,%eax
10bb67: 74 11 je 10bb7a <_Thread_Dispatch+0xea>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10bb69: 83 ec 0c sub $0xc,%esp
10bb6c: 05 e8 00 00 00 add $0xe8,%eax
10bb71: 50 push %eax
10bb72: e8 ad 10 00 00 call 10cc24 <_CPU_Context_save_fp>
10bb77: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10bb7a: 83 ec 0c sub $0xc,%esp
10bb7d: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax
10bb83: 50 push %eax
10bb84: e8 a5 10 00 00 call 10cc2e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10bb89: 89 1d d8 3a 12 00 mov %ebx,0x123ad8
10bb8f: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10bb92: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx
_ISR_Disable( level );
10bb98: 9c pushf
10bb99: fa cli
10bb9a: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10bb9b: 8a 15 20 3b 12 00 mov 0x123b20,%dl
10bba1: 84 d2 test %dl,%dl
10bba3: 0f 85 01 ff ff ff jne 10baaa <_Thread_Dispatch+0x1a>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10bba9: c7 05 54 3a 12 00 00 movl $0x0,0x123a54
10bbb0: 00 00 00
_ISR_Enable( level );
10bbb3: 50 push %eax
10bbb4: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10bbb5: 83 3d f4 3a 12 00 00 cmpl $0x0,0x123af4
10bbbc: 75 06 jne 10bbc4 <_Thread_Dispatch+0x134><== NEVER TAKEN
executing->do_post_task_switch_extension ) {
10bbbe: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10bbc2: 74 09 je 10bbcd <_Thread_Dispatch+0x13d>
executing->do_post_task_switch_extension = false;
10bbc4: c6 43 74 00 movb $0x0,0x74(%ebx)
_API_extensions_Run_postswitch();
10bbc8: e8 1e eb ff ff call 10a6eb <_API_extensions_Run_postswitch>
}
}
10bbcd: 8d 65 f4 lea -0xc(%ebp),%esp
10bbd0: 5b pop %ebx
10bbd1: 5e pop %esi
10bbd2: 5f pop %edi
10bbd3: c9 leave
10bbd4: c3 ret
0010fe08 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
10fe08: 55 push %ebp
10fe09: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
10fe0b: a1 10 3b 12 00 mov 0x123b10,%eax
if ( !_States_Is_ready( executing->current_state ) ||
10fe10: 83 78 10 00 cmpl $0x0,0x10(%eax)
10fe14: 75 0e jne 10fe24 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN
10fe16: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax
10fe1c: 74 11 je 10fe2f <_Thread_Evaluate_mode+0x27>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
10fe1e: 80 78 75 00 cmpb $0x0,0x75(%eax)
10fe22: 74 0b je 10fe2f <_Thread_Evaluate_mode+0x27><== NEVER TAKEN
_Context_Switch_necessary = true;
10fe24: c6 05 20 3b 12 00 01 movb $0x1,0x123b20
10fe2b: b0 01 mov $0x1,%al
return true;
10fe2d: eb 02 jmp 10fe31 <_Thread_Evaluate_mode+0x29>
10fe2f: 31 c0 xor %eax,%eax
}
return false;
}
10fe31: c9 leave
10fe32: c3 ret
0010fe34 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
10fe34: 55 push %ebp
10fe35: 89 e5 mov %esp,%ebp
10fe37: 53 push %ebx
10fe38: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
10fe3b: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
10fe41: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
10fe47: 85 c0 test %eax,%eax
10fe49: 74 03 je 10fe4e <_Thread_Handler+0x1a>
10fe4b: fa cli
10fe4c: eb 01 jmp 10fe4f <_Thread_Handler+0x1b>
10fe4e: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
10fe4f: a0 00 37 12 00 mov 0x123700,%al
10fe54: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
10fe57: c6 05 00 37 12 00 01 movb $0x1,0x123700
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10fe5e: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx)
10fe65: 74 24 je 10fe8b <_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 );
10fe67: a1 d8 3a 12 00 mov 0x123ad8,%eax
10fe6c: 39 c3 cmp %eax,%ebx
10fe6e: 74 1b je 10fe8b <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10fe70: 85 c0 test %eax,%eax
10fe72: 74 11 je 10fe85 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10fe74: 83 ec 0c sub $0xc,%esp
10fe77: 05 e8 00 00 00 add $0xe8,%eax
10fe7c: 50 push %eax
10fe7d: e8 a2 cd ff ff call 10cc24 <_CPU_Context_save_fp>
10fe82: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
10fe85: 89 1d d8 3a 12 00 mov %ebx,0x123ad8
/*
* 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 );
10fe8b: 83 ec 0c sub $0xc,%esp
10fe8e: 53 push %ebx
10fe8f: e8 44 c9 ff ff call 10c7d8 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
10fe94: e8 3c bd ff ff call 10bbd5 <_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) */ {
10fe99: 83 c4 10 add $0x10,%esp
10fe9c: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
10fea0: 75 05 jne 10fea7 <_Thread_Handler+0x73>
INIT_NAME ();
10fea2: e8 f9 bf 00 00 call 11bea0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
10fea7: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx)
10feae: 75 15 jne 10fec5 <_Thread_Handler+0x91> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
10feb0: 83 ec 0c sub $0xc,%esp
10feb3: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
10feb9: ff 93 9c 00 00 00 call *0x9c(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
10febf: 89 43 28 mov %eax,0x28(%ebx)
10fec2: 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 );
10fec5: 83 ec 0c sub $0xc,%esp
10fec8: 53 push %ebx
10fec9: e8 3b c9 ff ff call 10c809 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
10fece: 83 c4 0c add $0xc,%esp
10fed1: 6a 06 push $0x6
10fed3: 6a 01 push $0x1
10fed5: 6a 00 push $0x0
10fed7: e8 88 b0 ff ff call 10af64 <_Internal_error_Occurred>
0010bc6c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10bc6c: 55 push %ebp
10bc6d: 89 e5 mov %esp,%ebp
10bc6f: 57 push %edi
10bc70: 56 push %esi
10bc71: 53 push %ebx
10bc72: 83 ec 24 sub $0x24,%esp
10bc75: 8b 5d 0c mov 0xc(%ebp),%ebx
10bc78: 8b 75 14 mov 0x14(%ebp),%esi
10bc7b: 8a 55 18 mov 0x18(%ebp),%dl
10bc7e: 8a 45 20 mov 0x20(%ebp),%al
10bc81: 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;
10bc84: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10bc8b: 00 00 00
10bc8e: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10bc95: 00 00 00
10bc98: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx)
10bc9f: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10bca2: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10bca9: 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 );
10bcac: 56 push %esi
10bcad: 53 push %ebx
10bcae: 88 55 e0 mov %dl,-0x20(%ebp)
10bcb1: e8 46 08 00 00 call 10c4fc <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10bcb6: 83 c4 10 add $0x10,%esp
10bcb9: 39 f0 cmp %esi,%eax
10bcbb: 8a 55 e0 mov -0x20(%ebp),%dl
10bcbe: 72 04 jb 10bcc4 <_Thread_Initialize+0x58>
10bcc0: 85 c0 test %eax,%eax
10bcc2: 75 07 jne 10bccb <_Thread_Initialize+0x5f><== ALWAYS TAKEN
10bcc4: 31 c0 xor %eax,%eax
10bcc6: e9 b9 01 00 00 jmp 10be84 <_Thread_Initialize+0x218>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10bccb: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx
10bcd1: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx)
the_stack->size = size;
10bcd7: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10bcdd: 31 ff xor %edi,%edi
10bcdf: 84 d2 test %dl,%dl
10bce1: 74 19 je 10bcfc <_Thread_Initialize+0x90>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10bce3: 83 ec 0c sub $0xc,%esp
10bce6: 6a 6c push $0x6c
10bce8: e8 7f 0e 00 00 call 10cb6c <_Workspace_Allocate>
10bced: 89 c7 mov %eax,%edi
if ( !fp_area )
10bcef: 83 c4 10 add $0x10,%esp
10bcf2: 31 f6 xor %esi,%esi
10bcf4: 85 c0 test %eax,%eax
10bcf6: 0f 84 02 01 00 00 je 10bdfe <_Thread_Initialize+0x192>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10bcfc: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx)
the_thread->Start.fp_context = fp_area;
10bd02: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10bd08: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10bd0f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10bd16: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10bd1d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10bd24: a1 f0 3a 12 00 mov 0x123af0,%eax
10bd29: 31 f6 xor %esi,%esi
10bd2b: 85 c0 test %eax,%eax
10bd2d: 74 1d je 10bd4c <_Thread_Initialize+0xe0>
extensions_area = _Workspace_Allocate(
10bd2f: 83 ec 0c sub $0xc,%esp
10bd32: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10bd39: 50 push %eax
10bd3a: e8 2d 0e 00 00 call 10cb6c <_Workspace_Allocate>
10bd3f: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10bd41: 83 c4 10 add $0x10,%esp
10bd44: 85 c0 test %eax,%eax
10bd46: 0f 84 b2 00 00 00 je 10bdfe <_Thread_Initialize+0x192>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10bd4c: 89 b3 fc 00 00 00 mov %esi,0xfc(%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 ) {
10bd52: 85 f6 test %esi,%esi
10bd54: 74 1c je 10bd72 <_Thread_Initialize+0x106>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10bd56: 8b 0d f0 3a 12 00 mov 0x123af0,%ecx
10bd5c: 31 c0 xor %eax,%eax
10bd5e: eb 0e jmp 10bd6e <_Thread_Initialize+0x102>
the_thread->extensions[i] = NULL;
10bd60: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx
10bd66: c7 04 82 00 00 00 00 movl $0x0,(%edx,%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++ )
10bd6d: 40 inc %eax
10bd6e: 39 c8 cmp %ecx,%eax
10bd70: 76 ee jbe 10bd60 <_Thread_Initialize+0xf4>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10bd72: 8a 45 e7 mov -0x19(%ebp),%al
10bd75: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10bd7b: 8b 45 24 mov 0x24(%ebp),%eax
10bd7e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10bd84: 8b 45 28 mov 0x28(%ebp),%eax
10bd87: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10bd8d: 8b 45 2c mov 0x2c(%ebp),%eax
10bd90: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10bd96: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10bd9d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10bda4: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
10bdab: 8b 45 1c mov 0x1c(%ebp),%eax
10bdae: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10bdb1: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10bdb7: 52 push %edx
10bdb8: 52 push %edx
10bdb9: 50 push %eax
10bdba: 53 push %ebx
10bdbb: e8 90 05 00 00 call 10c350 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10bdc0: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10bdc7: 00 00 00
10bdca: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10bdd1: 00 00 00
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bdd4: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10bdd8: 8b 45 08 mov 0x8(%ebp),%eax
10bddb: 8b 40 1c mov 0x1c(%eax),%eax
10bdde: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bde1: 8b 45 30 mov 0x30(%ebp),%eax
10bde4: 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 );
10bde7: 89 1c 24 mov %ebx,(%esp)
10bdea: e8 89 0a 00 00 call 10c878 <_User_extensions_Thread_create>
10bdef: 88 c2 mov %al,%dl
if ( extension_status )
10bdf1: 83 c4 10 add $0x10,%esp
10bdf4: b0 01 mov $0x1,%al
10bdf6: 84 d2 test %dl,%dl
10bdf8: 0f 85 86 00 00 00 jne 10be84 <_Thread_Initialize+0x218>
return true;
failed:
if ( the_thread->libc_reent )
10bdfe: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10be04: 85 c0 test %eax,%eax
10be06: 74 0c je 10be14 <_Thread_Initialize+0x1a8>
_Workspace_Free( the_thread->libc_reent );
10be08: 83 ec 0c sub $0xc,%esp
10be0b: 50 push %eax
10be0c: e8 74 0d 00 00 call 10cb85 <_Workspace_Free>
10be11: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10be14: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10be1a: 85 c0 test %eax,%eax
10be1c: 74 0c je 10be2a <_Thread_Initialize+0x1be>
_Workspace_Free( the_thread->API_Extensions[i] );
10be1e: 83 ec 0c sub $0xc,%esp
10be21: 50 push %eax
10be22: e8 5e 0d 00 00 call 10cb85 <_Workspace_Free>
10be27: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10be2a: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10be30: 85 c0 test %eax,%eax
10be32: 74 0c je 10be40 <_Thread_Initialize+0x1d4><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10be34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be37: 50 push %eax <== NOT EXECUTED
10be38: e8 48 0d 00 00 call 10cb85 <_Workspace_Free> <== NOT EXECUTED
10be3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10be40: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
10be46: 85 c0 test %eax,%eax
10be48: 74 0c je 10be56 <_Thread_Initialize+0x1ea><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10be4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be4d: 50 push %eax <== NOT EXECUTED
10be4e: e8 32 0d 00 00 call 10cb85 <_Workspace_Free> <== NOT EXECUTED
10be53: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10be56: 85 f6 test %esi,%esi
10be58: 74 0c je 10be66 <_Thread_Initialize+0x1fa>
(void) _Workspace_Free( extensions_area );
10be5a: 83 ec 0c sub $0xc,%esp
10be5d: 56 push %esi
10be5e: e8 22 0d 00 00 call 10cb85 <_Workspace_Free>
10be63: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10be66: 85 ff test %edi,%edi
10be68: 74 0c je 10be76 <_Thread_Initialize+0x20a>
(void) _Workspace_Free( fp_area );
10be6a: 83 ec 0c sub $0xc,%esp
10be6d: 57 push %edi
10be6e: e8 12 0d 00 00 call 10cb85 <_Workspace_Free>
10be73: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10be76: 83 ec 0c sub $0xc,%esp
10be79: 53 push %ebx
10be7a: e8 cd 06 00 00 call 10c54c <_Thread_Stack_Free>
10be7f: 31 c0 xor %eax,%eax
return false;
10be81: 83 c4 10 add $0x10,%esp
}
10be84: 8d 65 f4 lea -0xc(%ebp),%esp
10be87: 5b pop %ebx
10be88: 5e pop %esi
10be89: 5f pop %edi
10be8a: c9 leave
10be8b: c3 ret
0010ebe8 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
10ebe8: 55 push %ebp
10ebe9: 89 e5 mov %esp,%ebp
10ebeb: 56 push %esi
10ebec: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10ebed: a1 10 3b 12 00 mov 0x123b10,%eax
ready = executing->ready;
10ebf2: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10ebf8: 9c pushf
10ebf9: fa cli
10ebfa: 59 pop %ecx
if ( _Chain_Has_only_one_node( ready ) ) {
10ebfb: 8b 1a mov (%edx),%ebx
10ebfd: 3b 5a 08 cmp 0x8(%edx),%ebx
10ec00: 75 04 jne 10ec06 <_Thread_Reset_timeslice+0x1e>
_ISR_Enable( level );
10ec02: 51 push %ecx
10ec03: 9d popf
return;
10ec04: eb 35 jmp 10ec3b <_Thread_Reset_timeslice+0x53>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ec06: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10ec08: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10ec0b: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10ec0e: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10ec10: 8d 5a 04 lea 0x4(%edx),%ebx
10ec13: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10ec15: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10ec18: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10ec1b: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10ec1d: 89 58 04 mov %ebx,0x4(%eax)
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10ec20: 51 push %ecx
10ec21: 9d popf
10ec22: fa cli
if ( _Thread_Is_heir( executing ) )
10ec23: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax
10ec29: 75 07 jne 10ec32 <_Thread_Reset_timeslice+0x4a><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
10ec2b: 8b 02 mov (%edx),%eax
10ec2d: a3 e0 3a 12 00 mov %eax,0x123ae0
_Context_Switch_necessary = true;
10ec32: c6 05 20 3b 12 00 01 movb $0x1,0x123b20
_ISR_Enable( level );
10ec39: 51 push %ecx
10ec3a: 9d popf
}
10ec3b: 5b pop %ebx
10ec3c: 5e pop %esi
10ec3d: c9 leave
10ec3e: c3 ret
0010f744 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10f744: 55 push %ebp
10f745: 89 e5 mov %esp,%ebp
10f747: 53 push %ebx
10f748: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10f74b: 9c pushf
10f74c: fa cli
10f74d: 59 pop %ecx
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
10f74e: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
10f751: f6 c2 02 test $0x2,%dl
10f754: 74 70 je 10f7c6 <_Thread_Resume+0x82> <== NEVER TAKEN
10f756: 83 e2 fd and $0xfffffffd,%edx
current_state =
10f759: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
10f75c: 85 d2 test %edx,%edx
10f75e: 75 66 jne 10f7c6 <_Thread_Resume+0x82>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10f760: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10f766: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
10f76d: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10f770: 66 8b 15 1c 85 12 00 mov 0x12851c,%dx
10f777: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10f77d: 66 89 15 1c 85 12 00 mov %dx,0x12851c
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10f784: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10f78a: 8d 5a 04 lea 0x4(%edx),%ebx
10f78d: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10f78f: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10f792: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10f795: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10f797: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
10f79a: 51 push %ecx
10f79b: 9d popf
10f79c: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10f79d: 8b 50 14 mov 0x14(%eax),%edx
10f7a0: 8b 1d f8 84 12 00 mov 0x1284f8,%ebx
10f7a6: 3b 53 14 cmp 0x14(%ebx),%edx
10f7a9: 73 1b jae 10f7c6 <_Thread_Resume+0x82>
_Thread_Heir = the_thread;
10f7ab: a3 f8 84 12 00 mov %eax,0x1284f8
if ( _Thread_Executing->is_preemptible ||
10f7b0: a1 28 85 12 00 mov 0x128528,%eax
10f7b5: 80 78 75 00 cmpb $0x0,0x75(%eax)
10f7b9: 75 04 jne 10f7bf <_Thread_Resume+0x7b>
10f7bb: 85 d2 test %edx,%edx
10f7bd: 75 07 jne 10f7c6 <_Thread_Resume+0x82> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10f7bf: c6 05 38 85 12 00 01 movb $0x1,0x128538
}
}
}
_ISR_Enable( level );
10f7c6: 51 push %ecx
10f7c7: 9d popf
}
10f7c8: 5b pop %ebx
10f7c9: c9 leave
10f7ca: c3 ret
0010c664 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10c664: 55 push %ebp
10c665: 89 e5 mov %esp,%ebp
10c667: 56 push %esi
10c668: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10c669: a1 10 3b 12 00 mov 0x123b10,%eax
ready = executing->ready;
10c66e: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10c674: 9c pushf
10c675: fa cli
10c676: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10c677: 8b 1a mov (%edx),%ebx
10c679: 3b 5a 08 cmp 0x8(%edx),%ebx
10c67c: 74 2e je 10c6ac <_Thread_Yield_processor+0x48>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10c67e: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10c680: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10c683: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10c686: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10c688: 8d 5a 04 lea 0x4(%edx),%ebx
10c68b: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10c68d: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10c690: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10c693: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10c695: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10c698: 51 push %ecx
10c699: 9d popf
10c69a: fa cli
if ( _Thread_Is_heir( executing ) )
10c69b: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax
10c6a1: 75 11 jne 10c6b4 <_Thread_Yield_processor+0x50><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
10c6a3: 8b 02 mov (%edx),%eax
10c6a5: a3 e0 3a 12 00 mov %eax,0x123ae0
10c6aa: eb 08 jmp 10c6b4 <_Thread_Yield_processor+0x50>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10c6ac: 3b 05 e0 3a 12 00 cmp 0x123ae0,%eax
10c6b2: 74 07 je 10c6bb <_Thread_Yield_processor+0x57><== ALWAYS TAKEN
_Context_Switch_necessary = true;
10c6b4: c6 05 20 3b 12 00 01 movb $0x1,0x123b20
_ISR_Enable( level );
10c6bb: 51 push %ecx
10c6bc: 9d popf
}
10c6bd: 5b pop %ebx
10c6be: 5e pop %esi
10c6bf: c9 leave
10c6c0: c3 ret
0010c0ec <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
10c0ec: 55 push %ebp
10c0ed: 89 e5 mov %esp,%ebp
10c0ef: 57 push %edi
10c0f0: 56 push %esi
10c0f1: 53 push %ebx
10c0f2: 83 ec 10 sub $0x10,%esp
10c0f5: 8b 4d 08 mov 0x8(%ebp),%ecx
10c0f8: 8b 45 0c mov 0xc(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10c0fb: 8d 50 3c lea 0x3c(%eax),%edx
10c0fe: 89 50 38 mov %edx,0x38(%eax)
the_chain->permanent_null = NULL;
10c101: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax)
the_chain->last = _Chain_Head(the_chain);
10c108: 8d 50 38 lea 0x38(%eax),%edx
10c10b: 89 50 40 mov %edx,0x40(%eax)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10c10e: 8b 58 14 mov 0x14(%eax),%ebx
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
10c111: 89 de mov %ebx,%esi
10c113: c1 ee 06 shr $0x6,%esi
10c116: 6b f6 0c imul $0xc,%esi,%esi
10c119: 8d 34 31 lea (%ecx,%esi,1),%esi
block_state = the_thread_queue->state;
10c11c: 8b 79 38 mov 0x38(%ecx),%edi
if ( _Thread_queue_Is_reverse_search( priority ) )
10c11f: f6 c3 20 test $0x20,%bl
10c122: 75 70 jne 10c194 <_Thread_queue_Enqueue_priority+0xa8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10c124: 8d 56 04 lea 0x4(%esi),%edx
10c127: 89 55 e8 mov %edx,-0x18(%ebp)
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10c12a: 9c pushf
10c12b: fa cli
10c12c: 8f 45 f0 popl -0x10(%ebp)
search_thread = (Thread_Control *) header->first;
10c12f: 8b 16 mov (%esi),%edx
10c131: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp)
10c138: 89 75 e4 mov %esi,-0x1c(%ebp)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c13b: eb 1f jmp 10c15c <_Thread_queue_Enqueue_priority+0x70>
search_priority = search_thread->current_priority;
10c13d: 8b 72 14 mov 0x14(%edx),%esi
10c140: 89 75 ec mov %esi,-0x14(%ebp)
if ( priority <= search_priority )
10c143: 39 f3 cmp %esi,%ebx
10c145: 76 1a jbe 10c161 <_Thread_queue_Enqueue_priority+0x75>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10c147: ff 75 f0 pushl -0x10(%ebp)
10c14a: 9d popf
10c14b: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c14c: 85 7a 10 test %edi,0x10(%edx)
10c14f: 75 09 jne 10c15a <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN
10c151: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED
_ISR_Enable( level );
10c154: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
10c157: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10c158: eb d0 jmp 10c12a <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10c15a: 8b 12 mov (%edx),%edx
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c15c: 3b 55 e8 cmp -0x18(%ebp),%edx
10c15f: 75 dc jne 10c13d <_Thread_queue_Enqueue_priority+0x51>
10c161: 8b 75 f0 mov -0x10(%ebp),%esi
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10c164: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c168: 0f 85 a9 00 00 00 jne 10c217 <_Thread_queue_Enqueue_priority+0x12b>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c16e: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c175: 3b 5d ec cmp -0x14(%ebp),%ebx
10c178: 0f 84 82 00 00 00 je 10c200 <_Thread_queue_Enqueue_priority+0x114>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10c17e: 8b 5a 04 mov 0x4(%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c181: 89 10 mov %edx,(%eax)
the_node->previous = previous_node;
10c183: 89 58 04 mov %ebx,0x4(%eax)
previous_node->next = the_node;
10c186: 89 03 mov %eax,(%ebx)
search_node->previous = the_node;
10c188: 89 42 04 mov %eax,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10c18b: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c18e: ff 75 f0 pushl -0x10(%ebp)
10c191: 9d popf
10c192: eb 65 jmp 10c1f9 <_Thread_queue_Enqueue_priority+0x10d>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10c194: 0f b6 15 d4 fa 11 00 movzbl 0x11fad4,%edx
10c19b: 42 inc %edx
10c19c: 89 55 ec mov %edx,-0x14(%ebp)
_ISR_Disable( level );
10c19f: 9c pushf
10c1a0: fa cli
10c1a1: 8f 45 f0 popl -0x10(%ebp)
search_thread = (Thread_Control *) header->last;
10c1a4: 8b 56 08 mov 0x8(%esi),%edx
10c1a7: 89 75 e8 mov %esi,-0x18(%ebp)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c1aa: eb 20 jmp 10c1cc <_Thread_queue_Enqueue_priority+0xe0>
search_priority = search_thread->current_priority;
10c1ac: 8b 72 14 mov 0x14(%edx),%esi
10c1af: 89 75 ec mov %esi,-0x14(%ebp)
if ( priority >= search_priority )
10c1b2: 39 f3 cmp %esi,%ebx
10c1b4: 73 1b jae 10c1d1 <_Thread_queue_Enqueue_priority+0xe5>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10c1b6: ff 75 f0 pushl -0x10(%ebp)
10c1b9: 9d popf
10c1ba: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c1bb: 85 7a 10 test %edi,0x10(%edx)
10c1be: 75 09 jne 10c1c9 <_Thread_queue_Enqueue_priority+0xdd>
10c1c0: 8b 75 e8 mov -0x18(%ebp),%esi
_ISR_Enable( level );
10c1c3: ff 75 f0 pushl -0x10(%ebp)
10c1c6: 9d popf
goto restart_reverse_search;
10c1c7: eb cb jmp 10c194 <_Thread_queue_Enqueue_priority+0xa8>
}
search_thread = (Thread_Control *)
10c1c9: 8b 52 04 mov 0x4(%edx),%edx
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c1cc: 3b 55 e8 cmp -0x18(%ebp),%edx
10c1cf: 75 db jne 10c1ac <_Thread_queue_Enqueue_priority+0xc0>
10c1d1: 8b 75 f0 mov -0x10(%ebp),%esi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10c1d4: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c1d8: 75 3d jne 10c217 <_Thread_queue_Enqueue_priority+0x12b>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c1da: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c1e1: 3b 5d ec cmp -0x14(%ebp),%ebx
10c1e4: 74 1a je 10c200 <_Thread_queue_Enqueue_priority+0x114>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10c1e6: 8b 1a mov (%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10c1e8: 89 18 mov %ebx,(%eax)
the_node->previous = search_node;
10c1ea: 89 50 04 mov %edx,0x4(%eax)
search_node->next = the_node;
10c1ed: 89 02 mov %eax,(%edx)
next_node->previous = the_node;
10c1ef: 89 43 04 mov %eax,0x4(%ebx)
the_thread->Wait.queue = the_thread_queue;
10c1f2: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c1f5: ff 75 f0 pushl -0x10(%ebp)
10c1f8: 9d popf
10c1f9: b8 01 00 00 00 mov $0x1,%eax
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c1fe: eb 1f jmp 10c21f <_Thread_queue_Enqueue_priority+0x133>
10c200: 83 c2 3c add $0x3c,%edx
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
10c203: 8b 5a 04 mov 0x4(%edx),%ebx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c206: 89 10 mov %edx,(%eax)
the_node->previous = previous_node;
10c208: 89 58 04 mov %ebx,0x4(%eax)
previous_node->next = the_node;
10c20b: 89 03 mov %eax,(%ebx)
search_node->previous = the_node;
10c20d: 89 42 04 mov %eax,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10c210: 89 48 44 mov %ecx,0x44(%eax)
_ISR_Enable( level );
10c213: 56 push %esi
10c214: 9d popf
10c215: eb e2 jmp 10c1f9 <_Thread_queue_Enqueue_priority+0x10d>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
10c217: 8b 45 10 mov 0x10(%ebp),%eax
10c21a: 89 30 mov %esi,(%eax)
return the_thread_queue->sync_state;
10c21c: 8b 41 30 mov 0x30(%ecx),%eax
}
10c21f: 83 c4 10 add $0x10,%esp
10c222: 5b pop %ebx
10c223: 5e pop %esi
10c224: 5f pop %edi
10c225: c9 leave
10c226: c3 ret
0010c2c8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10c2c8: 55 push %ebp
10c2c9: 89 e5 mov %esp,%ebp
10c2cb: 57 push %edi
10c2cc: 56 push %esi
10c2cd: 53 push %ebx
10c2ce: 83 ec 1c sub $0x1c,%esp
10c2d1: 8b 75 08 mov 0x8(%ebp),%esi
10c2d4: 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 )
10c2d7: 85 f6 test %esi,%esi
10c2d9: 74 36 je 10c311 <_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 ) {
10c2db: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10c2df: 75 30 jne 10c311 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10c2e1: 9c pushf
10c2e2: fa cli
10c2e3: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10c2e4: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10c2eb: 74 22 je 10c30f <_Thread_queue_Requeue+0x47><== NEVER TAKEN
10c2ed: 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 );
10c2f4: 50 push %eax
10c2f5: 6a 01 push $0x1
10c2f7: 57 push %edi
10c2f8: 56 push %esi
10c2f9: e8 46 27 00 00 call 10ea44 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10c2fe: 83 c4 0c add $0xc,%esp
10c301: 8d 45 e4 lea -0x1c(%ebp),%eax
10c304: 50 push %eax
10c305: 57 push %edi
10c306: 56 push %esi
10c307: e8 e0 fd ff ff call 10c0ec <_Thread_queue_Enqueue_priority>
10c30c: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c30f: 53 push %ebx
10c310: 9d popf
}
}
10c311: 8d 65 f4 lea -0xc(%ebp),%esp
10c314: 5b pop %ebx
10c315: 5e pop %esi
10c316: 5f pop %edi
10c317: c9 leave
10c318: c3 ret
0010c31c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10c31c: 55 push %ebp
10c31d: 89 e5 mov %esp,%ebp
10c31f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c322: 8d 45 f4 lea -0xc(%ebp),%eax
10c325: 50 push %eax
10c326: ff 75 08 pushl 0x8(%ebp)
10c329: e8 ca f8 ff ff call 10bbf8 <_Thread_Get>
switch ( location ) {
10c32e: 83 c4 10 add $0x10,%esp
10c331: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c335: 75 17 jne 10c34e <_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 );
10c337: 83 ec 0c sub $0xc,%esp
10c33a: 50 push %eax
10c33b: e8 bc 27 00 00 call 10eafc <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c340: a1 54 3a 12 00 mov 0x123a54,%eax
10c345: 48 dec %eax
10c346: a3 54 3a 12 00 mov %eax,0x123a54
10c34b: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c34e: c9 leave
10c34f: c3 ret
00116c50 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116c50: 55 push %ebp
116c51: 89 e5 mov %esp,%ebp
116c53: 57 push %edi
116c54: 56 push %esi
116c55: 53 push %ebx
116c56: 83 ec 4c sub $0x4c,%esp
116c59: 8b 5d 08 mov 0x8(%ebp),%ebx
116c5c: 8d 45 dc lea -0x24(%ebp),%eax
116c5f: 8d 55 e0 lea -0x20(%ebp),%edx
116c62: 89 55 b4 mov %edx,-0x4c(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
116c65: 89 55 dc mov %edx,-0x24(%ebp)
the_chain->permanent_null = NULL;
116c68: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_chain->last = _Chain_Head(the_chain);
116c6f: 89 45 e4 mov %eax,-0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116c72: 8d 75 d0 lea -0x30(%ebp),%esi
116c75: 8d 55 d4 lea -0x2c(%ebp),%edx
116c78: 89 55 b0 mov %edx,-0x50(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
116c7b: 89 55 d0 mov %edx,-0x30(%ebp)
the_chain->permanent_null = NULL;
116c7e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
116c85: 89 75 d8 mov %esi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116c88: 8d 53 30 lea 0x30(%ebx),%edx
116c8b: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* 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 );
116c8e: 8d 7b 68 lea 0x68(%ebx),%edi
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
116c91: 8d 4b 08 lea 0x8(%ebx),%ecx
116c94: 89 4d b8 mov %ecx,-0x48(%ebp)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116c97: 8d 53 40 lea 0x40(%ebx),%edx
116c9a: 89 55 bc mov %edx,-0x44(%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;
116c9d: 8d 4d dc lea -0x24(%ebp),%ecx
116ca0: 89 4b 78 mov %ecx,0x78(%ebx)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
116ca3: a1 94 c6 13 00 mov 0x13c694,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
116ca8: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
116cab: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
116cae: 51 push %ecx
116caf: 8d 4d d0 lea -0x30(%ebp),%ecx
116cb2: 51 push %ecx
116cb3: 29 d0 sub %edx,%eax
116cb5: 50 push %eax
116cb6: ff 75 c0 pushl -0x40(%ebp)
116cb9: e8 56 35 00 00 call 11a214 <_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();
116cbe: a1 d8 c5 13 00 mov 0x13c5d8,%eax
116cc3: 89 45 c4 mov %eax,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
116cc6: 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 ) {
116cc9: 83 c4 10 add $0x10,%esp
116ccc: 39 45 c4 cmp %eax,-0x3c(%ebp)
116ccf: 76 13 jbe 116ce4 <_Timer_server_Body+0x94>
/*
* 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 );
116cd1: 52 push %edx
116cd2: 8d 55 d0 lea -0x30(%ebp),%edx
116cd5: 52 push %edx
116cd6: 8b 4d c4 mov -0x3c(%ebp),%ecx
116cd9: 29 c1 sub %eax,%ecx
116cdb: 51 push %ecx
116cdc: 57 push %edi
116cdd: e8 32 35 00 00 call 11a214 <_Watchdog_Adjust_to_chain>
116ce2: eb 0f jmp 116cf3 <_Timer_server_Body+0xa3>
} else if ( snapshot < last_snapshot ) {
116ce4: 73 10 jae 116cf6 <_Timer_server_Body+0xa6>
/*
* 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 );
116ce6: 51 push %ecx
116ce7: 2b 45 c4 sub -0x3c(%ebp),%eax
116cea: 50 push %eax
116ceb: 6a 01 push $0x1
116ced: 57 push %edi
116cee: e8 b5 34 00 00 call 11a1a8 <_Watchdog_Adjust>
116cf3: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116cf6: 8b 45 c4 mov -0x3c(%ebp),%eax
116cf9: 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 );
116cfc: 8b 43 78 mov 0x78(%ebx),%eax
116cff: 83 ec 0c sub $0xc,%esp
116d02: 50 push %eax
116d03: e8 ec 06 00 00 call 1173f4 <_Chain_Get>
if ( timer == NULL ) {
116d08: 83 c4 10 add $0x10,%esp
116d0b: 85 c0 test %eax,%eax
116d0d: 74 29 je 116d38 <_Timer_server_Body+0xe8>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116d0f: 8b 50 38 mov 0x38(%eax),%edx
116d12: 83 fa 01 cmp $0x1,%edx
116d15: 75 0b jne 116d22 <_Timer_server_Body+0xd2>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116d17: 52 push %edx
116d18: 52 push %edx
116d19: 83 c0 10 add $0x10,%eax
116d1c: 50 push %eax
116d1d: ff 75 c0 pushl -0x40(%ebp)
116d20: eb 0c jmp 116d2e <_Timer_server_Body+0xde>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116d22: 83 fa 03 cmp $0x3,%edx
116d25: 75 d5 jne 116cfc <_Timer_server_Body+0xac><== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116d27: 51 push %ecx
116d28: 51 push %ecx
116d29: 83 c0 10 add $0x10,%eax
116d2c: 50 push %eax
116d2d: 57 push %edi
116d2e: e8 69 35 00 00 call 11a29c <_Watchdog_Insert>
116d33: 83 c4 10 add $0x10,%esp
116d36: eb c4 jmp 116cfc <_Timer_server_Body+0xac>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
116d38: 9c pushf
116d39: fa cli
116d3a: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116d3b: 8b 55 b4 mov -0x4c(%ebp),%edx
116d3e: 39 55 dc cmp %edx,-0x24(%ebp)
116d41: 75 13 jne 116d56 <_Timer_server_Body+0x106><== NEVER TAKEN
ts->insert_chain = NULL;
116d43: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116d4a: 50 push %eax
116d4b: 9d popf
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
116d4c: 8b 4d b0 mov -0x50(%ebp),%ecx
116d4f: 39 4d d0 cmp %ecx,-0x30(%ebp)
116d52: 75 09 jne 116d5d <_Timer_server_Body+0x10d>
116d54: eb 3e jmp 116d94 <_Timer_server_Body+0x144>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116d56: 50 push %eax <== NOT EXECUTED
116d57: 9d popf <== NOT EXECUTED
116d58: e9 46 ff ff ff jmp 116ca3 <_Timer_server_Body+0x53><== 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 );
116d5d: 9c pushf
116d5e: fa cli
116d5f: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116d60: 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))
116d63: 3b 45 b0 cmp -0x50(%ebp),%eax
116d66: 74 25 je 116d8d <_Timer_server_Body+0x13d>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
116d68: 8b 08 mov (%eax),%ecx
the_chain->first = new_first;
116d6a: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
116d6d: 89 71 04 mov %esi,0x4(%ecx)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
116d70: 85 c0 test %eax,%eax
116d72: 74 19 je 116d8d <_Timer_server_Body+0x13d><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116d74: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116d7b: 52 push %edx
116d7c: 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 );
116d7d: 52 push %edx
116d7e: 52 push %edx
116d7f: ff 70 24 pushl 0x24(%eax)
116d82: ff 70 20 pushl 0x20(%eax)
116d85: ff 50 1c call *0x1c(%eax)
}
116d88: 83 c4 10 add $0x10,%esp
116d8b: eb d0 jmp 116d5d <_Timer_server_Body+0x10d>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
116d8d: 52 push %edx
116d8e: 9d popf
116d8f: e9 09 ff ff ff jmp 116c9d <_Timer_server_Body+0x4d>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
116d94: c6 43 7c 00 movb $0x0,0x7c(%ebx)
116d98: a1 48 c5 13 00 mov 0x13c548,%eax
116d9d: 40 inc %eax
116d9e: a3 48 c5 13 00 mov %eax,0x13c548
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
116da3: 50 push %eax
116da4: 50 push %eax
116da5: 6a 08 push $0x8
116da7: ff 33 pushl (%ebx)
116da9: e8 0a 2d 00 00 call 119ab8 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
116dae: 89 d8 mov %ebx,%eax
116db0: e8 0f fe ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
116db5: 89 d8 mov %ebx,%eax
116db7: e8 4e fe ff ff call 116c0a <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
116dbc: e8 dc 23 00 00 call 11919d <_Thread_Enable_dispatch>
ts->active = true;
116dc1: 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 );
116dc5: 59 pop %ecx
116dc6: ff 75 b8 pushl -0x48(%ebp)
116dc9: e8 e6 35 00 00 call 11a3b4 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
116dce: 5a pop %edx
116dcf: ff 75 bc pushl -0x44(%ebp)
116dd2: e8 dd 35 00 00 call 11a3b4 <_Watchdog_Remove>
116dd7: 83 c4 10 add $0x10,%esp
116dda: e9 be fe ff ff jmp 116c9d <_Timer_server_Body+0x4d>
00116ddf <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116ddf: 55 push %ebp
116de0: 89 e5 mov %esp,%ebp
116de2: 57 push %edi
116de3: 56 push %esi
116de4: 53 push %ebx
116de5: 83 ec 2c sub $0x2c,%esp
116de8: 8b 5d 08 mov 0x8(%ebp),%ebx
116deb: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
116dee: 8b 53 78 mov 0x78(%ebx),%edx
116df1: 85 d2 test %edx,%edx
116df3: 0f 85 e6 00 00 00 jne 116edf <_Timer_server_Schedule_operation_method+0x100>
116df9: 8b 15 48 c5 13 00 mov 0x13c548,%edx
116dff: 42 inc %edx
116e00: 89 15 48 c5 13 00 mov %edx,0x13c548
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116e06: 8b 50 38 mov 0x38(%eax),%edx
116e09: 83 fa 01 cmp $0x1,%edx
116e0c: 75 5a jne 116e68 <_Timer_server_Schedule_operation_method+0x89>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116e0e: 9c pushf
116e0f: fa cli
116e10: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116e13: 8b 0d 94 c6 13 00 mov 0x13c694,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116e19: 8b 73 3c mov 0x3c(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116e1c: 8b 53 30 mov 0x30(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116e1f: 8d 7b 34 lea 0x34(%ebx),%edi
116e22: 39 fa cmp %edi,%edx
116e24: 74 19 je 116e3f <_Timer_server_Schedule_operation_method+0x60>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116e26: 89 cf mov %ecx,%edi
116e28: 29 f7 sub %esi,%edi
116e2a: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
116e2d: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
116e30: 31 f6 xor %esi,%esi
116e32: 3b 7d e4 cmp -0x1c(%ebp),%edi
116e35: 76 05 jbe 116e3c <_Timer_server_Schedule_operation_method+0x5d>
delta_interval -= delta;
116e37: 89 fe mov %edi,%esi
116e39: 2b 75 e4 sub -0x1c(%ebp),%esi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116e3c: 89 72 10 mov %esi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
116e3f: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
116e42: ff 75 e0 pushl -0x20(%ebp)
116e45: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116e46: 57 push %edi
116e47: 57 push %edi
116e48: 83 c0 10 add $0x10,%eax
116e4b: 50 push %eax
116e4c: 8d 43 30 lea 0x30(%ebx),%eax
116e4f: 50 push %eax
116e50: e8 47 34 00 00 call 11a29c <_Watchdog_Insert>
if ( !ts->active ) {
116e55: 8a 43 7c mov 0x7c(%ebx),%al
116e58: 83 c4 10 add $0x10,%esp
116e5b: 84 c0 test %al,%al
116e5d: 75 74 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
_Timer_server_Reset_interval_system_watchdog( ts );
116e5f: 89 d8 mov %ebx,%eax
116e61: e8 5e fd ff ff call 116bc4 <_Timer_server_Reset_interval_system_watchdog>
116e66: eb 6b jmp 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116e68: 83 fa 03 cmp $0x3,%edx
116e6b: 75 66 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
116e6d: 9c pushf
116e6e: fa cli
116e6f: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
116e72: 8b 0d d8 c5 13 00 mov 0x13c5d8,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116e78: 8b 53 74 mov 0x74(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
116e7b: 8b 73 68 mov 0x68(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
116e7e: 8d 7b 6c lea 0x6c(%ebx),%edi
116e81: 39 fe cmp %edi,%esi
116e83: 74 27 je 116eac <_Timer_server_Schedule_operation_method+0xcd>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
116e85: 8b 7e 10 mov 0x10(%esi),%edi
116e88: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
116e8b: 39 d1 cmp %edx,%ecx
116e8d: 76 15 jbe 116ea4 <_Timer_server_Schedule_operation_method+0xc5>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
116e8f: 89 cf mov %ecx,%edi
116e91: 29 d7 sub %edx,%edi
116e93: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
116e96: 31 d2 xor %edx,%edx
116e98: 39 7d d4 cmp %edi,-0x2c(%ebp)
116e9b: 76 0c jbe 116ea9 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN
delta_interval -= delta;
116e9d: 8b 55 d4 mov -0x2c(%ebp),%edx
116ea0: 29 fa sub %edi,%edx
116ea2: eb 05 jmp 116ea9 <_Timer_server_Schedule_operation_method+0xca>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
116ea4: 03 55 d4 add -0x2c(%ebp),%edx
delta_interval += delta;
116ea7: 29 ca sub %ecx,%edx
}
first_watchdog->delta_interval = delta_interval;
116ea9: 89 56 10 mov %edx,0x10(%esi)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
116eac: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
116eaf: ff 75 e0 pushl -0x20(%ebp)
116eb2: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116eb3: 56 push %esi
116eb4: 56 push %esi
116eb5: 83 c0 10 add $0x10,%eax
116eb8: 50 push %eax
116eb9: 8d 43 68 lea 0x68(%ebx),%eax
116ebc: 50 push %eax
116ebd: e8 da 33 00 00 call 11a29c <_Watchdog_Insert>
if ( !ts->active ) {
116ec2: 8a 43 7c mov 0x7c(%ebx),%al
116ec5: 83 c4 10 add $0x10,%esp
116ec8: 84 c0 test %al,%al
116eca: 75 07 jne 116ed3 <_Timer_server_Schedule_operation_method+0xf4>
_Timer_server_Reset_tod_system_watchdog( ts );
116ecc: 89 d8 mov %ebx,%eax
116ece: e8 37 fd ff ff call 116c0a <_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 );
}
}
116ed3: 8d 65 f4 lea -0xc(%ebp),%esp
116ed6: 5b pop %ebx
116ed7: 5e pop %esi
116ed8: 5f pop %edi
116ed9: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
116eda: e9 be 22 00 00 jmp 11919d <_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 );
116edf: 8b 53 78 mov 0x78(%ebx),%edx
116ee2: 89 45 0c mov %eax,0xc(%ebp)
116ee5: 89 55 08 mov %edx,0x8(%ebp)
}
}
116ee8: 8d 65 f4 lea -0xc(%ebp),%esp
116eeb: 5b pop %ebx
116eec: 5e pop %esi
116eed: 5f pop %edi
116eee: c9 leave
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
116eef: e9 dc 04 00 00 jmp 1173d0 <_Chain_Append>
0010df8c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10df8c: 55 push %ebp
10df8d: 89 e5 mov %esp,%ebp
10df8f: 53 push %ebx
10df90: 8b 4d 08 mov 0x8(%ebp),%ecx
10df93: 8b 55 0c mov 0xc(%ebp),%edx
if ( lhs->tv_sec > rhs->tv_sec )
10df96: 8b 1a mov (%edx),%ebx
10df98: b0 01 mov $0x1,%al
10df9a: 39 19 cmp %ebx,(%ecx)
10df9c: 7f 0f jg 10dfad <_Timespec_Greater_than+0x21>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
10df9e: 7d 04 jge 10dfa4 <_Timespec_Greater_than+0x18><== ALWAYS TAKEN
10dfa0: 31 c0 xor %eax,%eax <== NOT EXECUTED
10dfa2: eb 09 jmp 10dfad <_Timespec_Greater_than+0x21><== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
10dfa4: 8b 41 04 mov 0x4(%ecx),%eax
10dfa7: 3b 42 04 cmp 0x4(%edx),%eax
10dfaa: 0f 9f c0 setg %al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
10dfad: 5b pop %ebx
10dfae: c9 leave
10dfaf: c3 ret
0010c809 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10c809: 55 push %ebp
10c80a: 89 e5 mov %esp,%ebp
10c80c: 56 push %esi
10c80d: 53 push %ebx
10c80e: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10c811: 8b 1d 6c 3c 12 00 mov 0x123c6c,%ebx
10c817: eb 13 jmp 10c82c <_User_extensions_Thread_exitted+0x23>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10c819: 8b 43 2c mov 0x2c(%ebx),%eax
10c81c: 85 c0 test %eax,%eax
10c81e: 74 09 je 10c829 <_User_extensions_Thread_exitted+0x20>
(*the_extension->Callouts.thread_exitted)( executing );
10c820: 83 ec 0c sub $0xc,%esp
10c823: 56 push %esi
10c824: ff d0 call *%eax
10c826: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10c829: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10c82c: 81 fb 64 3c 12 00 cmp $0x123c64,%ebx
10c832: 75 e5 jne 10c819 <_User_extensions_Thread_exitted+0x10>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10c834: 8d 65 f8 lea -0x8(%ebp),%esp
10c837: 5b pop %ebx
10c838: 5e pop %esi
10c839: c9 leave
10c83a: c3 ret
0010e198 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10e198: 55 push %ebp
10e199: 89 e5 mov %esp,%ebp
10e19b: 57 push %edi
10e19c: 56 push %esi
10e19d: 53 push %ebx
10e19e: 83 ec 1c sub $0x1c,%esp
10e1a1: 8b 75 08 mov 0x8(%ebp),%esi
10e1a4: 8b 7d 0c mov 0xc(%ebp),%edi
10e1a7: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10e1aa: 9c pushf
10e1ab: fa cli
10e1ac: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10e1ad: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e1af: 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 ) ) {
10e1b2: 39 ca cmp %ecx,%edx
10e1b4: 74 44 je 10e1fa <_Watchdog_Adjust+0x62>
switch ( direction ) {
10e1b6: 85 ff test %edi,%edi
10e1b8: 74 3c je 10e1f6 <_Watchdog_Adjust+0x5e>
10e1ba: 4f dec %edi
10e1bb: 75 3d jne 10e1fa <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10e1bd: 01 5a 10 add %ebx,0x10(%edx)
break;
10e1c0: eb 38 jmp 10e1fa <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
10e1c2: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10e1c4: 8b 7a 10 mov 0x10(%edx),%edi
10e1c7: 39 fb cmp %edi,%ebx
10e1c9: 73 07 jae 10e1d2 <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10e1cb: 29 df sub %ebx,%edi
10e1cd: 89 7a 10 mov %edi,0x10(%edx)
break;
10e1d0: eb 28 jmp 10e1fa <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10e1d2: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10e1d9: 50 push %eax
10e1da: 9d popf
_Watchdog_Tickle( header );
10e1db: 83 ec 0c sub $0xc,%esp
10e1de: 56 push %esi
10e1df: 89 4d e4 mov %ecx,-0x1c(%ebp)
10e1e2: e8 9d 01 00 00 call 10e384 <_Watchdog_Tickle>
_ISR_Disable( level );
10e1e7: 9c pushf
10e1e8: fa cli
10e1e9: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10e1ea: 83 c4 10 add $0x10,%esp
10e1ed: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e1f0: 39 0e cmp %ecx,(%esi)
10e1f2: 74 06 je 10e1fa <_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;
10e1f4: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e1f6: 85 db test %ebx,%ebx
10e1f8: 75 c8 jne 10e1c2 <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10e1fa: 50 push %eax
10e1fb: 9d popf
}
10e1fc: 8d 65 f4 lea -0xc(%ebp),%esp
10e1ff: 5b pop %ebx
10e200: 5e pop %esi
10e201: 5f pop %edi
10e202: c9 leave
10e203: c3 ret
0010ca70 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10ca70: 55 push %ebp
10ca71: 89 e5 mov %esp,%ebp
10ca73: 56 push %esi
10ca74: 53 push %ebx
10ca75: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10ca78: 9c pushf
10ca79: fa cli
10ca7a: 5e pop %esi
previous_state = the_watchdog->state;
10ca7b: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10ca7e: 83 f8 01 cmp $0x1,%eax
10ca81: 74 09 je 10ca8c <_Watchdog_Remove+0x1c>
10ca83: 72 44 jb 10cac9 <_Watchdog_Remove+0x59>
10ca85: 83 f8 03 cmp $0x3,%eax
10ca88: 77 3f ja 10cac9 <_Watchdog_Remove+0x59> <== NEVER TAKEN
10ca8a: eb 09 jmp 10ca95 <_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;
10ca8c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ca93: eb 34 jmp 10cac9 <_Watchdog_Remove+0x59>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10ca95: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
10ca9c: 8b 0a mov (%edx),%ecx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10ca9e: 83 39 00 cmpl $0x0,(%ecx)
10caa1: 74 06 je 10caa9 <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10caa3: 8b 5a 10 mov 0x10(%edx),%ebx
10caa6: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10caa9: 8b 0d 9c 3b 12 00 mov 0x123b9c,%ecx
10caaf: 85 c9 test %ecx,%ecx
10cab1: 74 0c je 10cabf <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10cab3: 8b 0d ec 3a 12 00 mov 0x123aec,%ecx
10cab9: 89 0d 0c 3b 12 00 mov %ecx,0x123b0c
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10cabf: 8b 1a mov (%edx),%ebx
previous = the_node->previous;
10cac1: 8b 4a 04 mov 0x4(%edx),%ecx
next->previous = previous;
10cac4: 89 4b 04 mov %ecx,0x4(%ebx)
previous->next = next;
10cac7: 89 19 mov %ebx,(%ecx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10cac9: 8b 0d a0 3b 12 00 mov 0x123ba0,%ecx
10cacf: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10cad2: 56 push %esi
10cad3: 9d popf
return( previous_state );
}
10cad4: 5b pop %ebx
10cad5: 5e pop %esi
10cad6: c9 leave
10cad7: c3 ret
0010dd14 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10dd14: 55 push %ebp
10dd15: 89 e5 mov %esp,%ebp
10dd17: 57 push %edi
10dd18: 56 push %esi
10dd19: 53 push %ebx
10dd1a: 83 ec 20 sub $0x20,%esp
10dd1d: 8b 7d 08 mov 0x8(%ebp),%edi
10dd20: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10dd23: 9c pushf
10dd24: fa cli
10dd25: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10dd28: 56 push %esi
10dd29: 57 push %edi
10dd2a: 68 e4 fa 11 00 push $0x11fae4
10dd2f: e8 e4 ab ff ff call 108918 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10dd34: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10dd36: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10dd39: 83 c4 10 add $0x10,%esp
10dd3c: 39 f3 cmp %esi,%ebx
10dd3e: 74 1d je 10dd5d <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10dd40: 52 push %edx
10dd41: 52 push %edx
10dd42: 53 push %ebx
10dd43: 6a 00 push $0x0
10dd45: e8 32 00 00 00 call 10dd7c <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
10dd4a: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
10dd4c: 83 c4 10 add $0x10,%esp
10dd4f: 39 f3 cmp %esi,%ebx
10dd51: 75 ed jne 10dd40 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10dd53: 50 push %eax
10dd54: 50 push %eax
10dd55: 57 push %edi
10dd56: 68 fb fa 11 00 push $0x11fafb
10dd5b: eb 08 jmp 10dd65 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10dd5d: 83 ec 0c sub $0xc,%esp
10dd60: 68 0a fb 11 00 push $0x11fb0a
10dd65: e8 ae ab ff ff call 108918 <printk>
10dd6a: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10dd6d: ff 75 e4 pushl -0x1c(%ebp)
10dd70: 9d popf
}
10dd71: 8d 65 f4 lea -0xc(%ebp),%esp
10dd74: 5b pop %ebx
10dd75: 5e pop %esi
10dd76: 5f pop %edi
10dd77: c9 leave
10dd78: c3 ret
0010c4a0 <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)
{
10c4a0: 55 push %ebp
10c4a1: 89 e5 mov %esp,%ebp
10c4a3: 57 push %edi
10c4a4: 56 push %esi
10c4a5: 53 push %ebx
10c4a6: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c4a9: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10c4ad: 74 41 je 10c4f0 <rtems_iterate_over_all_threads+0x50><== NEVER TAKEN
10c4af: bb 01 00 00 00 mov $0x1,%ebx
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10c4b4: 8b 04 9d 8c e9 12 00 mov 0x12e98c(,%ebx,4),%eax
10c4bb: 85 c0 test %eax,%eax
10c4bd: 74 2b je 10c4ea <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10c4bf: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10c4c2: be 01 00 00 00 mov $0x1,%esi
10c4c7: 85 ff test %edi,%edi
10c4c9: 75 17 jne 10c4e2 <rtems_iterate_over_all_threads+0x42>
10c4cb: eb 1d jmp 10c4ea <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10c4cd: 8b 47 1c mov 0x1c(%edi),%eax
10c4d0: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10c4d3: 85 c0 test %eax,%eax
10c4d5: 74 0a je 10c4e1 <rtems_iterate_over_all_threads+0x41><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c4d7: 83 ec 0c sub $0xc,%esp
10c4da: 50 push %eax
10c4db: ff 55 08 call *0x8(%ebp)
10c4de: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10c4e1: 46 inc %esi
10c4e2: 0f b7 47 10 movzwl 0x10(%edi),%eax
10c4e6: 39 c6 cmp %eax,%esi
10c4e8: 76 e3 jbe 10c4cd <rtems_iterate_over_all_threads+0x2d>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10c4ea: 43 inc %ebx
10c4eb: 83 fb 05 cmp $0x5,%ebx
10c4ee: 75 c4 jne 10c4b4 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10c4f0: 8d 65 f4 lea -0xc(%ebp),%esp
10c4f3: 5b pop %ebx
10c4f4: 5e pop %esi
10c4f5: 5f pop %edi
10c4f6: c9 leave
10c4f7: c3 ret
00114910 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
114910: 55 push %ebp
114911: 89 e5 mov %esp,%ebp
114913: 57 push %edi
114914: 56 push %esi
114915: 53 push %ebx
114916: 83 ec 1c sub $0x1c,%esp
114919: 8b 75 0c mov 0xc(%ebp),%esi
11491c: 8b 55 10 mov 0x10(%ebp),%edx
11491f: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
114922: b8 03 00 00 00 mov $0x3,%eax
114927: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
11492b: 0f 84 cf 00 00 00 je 114a00 <rtems_partition_create+0xf0>
return RTEMS_INVALID_NAME;
if ( !starting_address )
114931: 85 f6 test %esi,%esi
114933: 0f 84 bb 00 00 00 je 1149f4 <rtems_partition_create+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
114939: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
11493d: 0f 84 b1 00 00 00 je 1149f4 <rtems_partition_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
114943: 85 ff test %edi,%edi
114945: 0f 84 b0 00 00 00 je 1149fb <rtems_partition_create+0xeb>
11494b: 85 d2 test %edx,%edx
11494d: 0f 84 a8 00 00 00 je 1149fb <rtems_partition_create+0xeb>
114953: 39 fa cmp %edi,%edx
114955: 0f 82 a0 00 00 00 jb 1149fb <rtems_partition_create+0xeb>
11495b: f7 c7 03 00 00 00 test $0x3,%edi
114961: 0f 85 94 00 00 00 jne 1149fb <rtems_partition_create+0xeb>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
114967: f7 c6 03 00 00 00 test $0x3,%esi
11496d: 0f 85 81 00 00 00 jne 1149f4 <rtems_partition_create+0xe4>
114973: a1 48 c5 13 00 mov 0x13c548,%eax
114978: 40 inc %eax
114979: a3 48 c5 13 00 mov %eax,0x13c548
* 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 );
11497e: 83 ec 0c sub $0xc,%esp
114981: 68 d0 c3 13 00 push $0x13c3d0
114986: 89 55 e4 mov %edx,-0x1c(%ebp)
114989: e8 8e 3b 00 00 call 11851c <_Objects_Allocate>
11498e: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
114990: 83 c4 10 add $0x10,%esp
114993: 85 c0 test %eax,%eax
114995: 8b 55 e4 mov -0x1c(%ebp),%edx
114998: 75 0c jne 1149a6 <rtems_partition_create+0x96>
_Thread_Enable_dispatch();
11499a: e8 fe 47 00 00 call 11919d <_Thread_Enable_dispatch>
11499f: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1149a4: eb 5a jmp 114a00 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1149a6: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
1149a9: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
1149ac: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
1149af: 8b 45 18 mov 0x18(%ebp),%eax
1149b2: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
1149b5: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
1149bc: 57 push %edi
1149bd: 89 d0 mov %edx,%eax
1149bf: 31 d2 xor %edx,%edx
1149c1: f7 f7 div %edi
1149c3: 50 push %eax
1149c4: 56 push %esi
1149c5: 8d 43 24 lea 0x24(%ebx),%eax
1149c8: 50 push %eax
1149c9: e8 4a 2a 00 00 call 117418 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1149ce: 8b 43 08 mov 0x8(%ebx),%eax
1149d1: 0f b7 c8 movzwl %ax,%ecx
1149d4: 8b 15 ec c3 13 00 mov 0x13c3ec,%edx
1149da: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1149dd: 8b 55 08 mov 0x8(%ebp),%edx
1149e0: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1149e3: 8b 55 1c mov 0x1c(%ebp),%edx
1149e6: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1149e8: e8 b0 47 00 00 call 11919d <_Thread_Enable_dispatch>
1149ed: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1149ef: 83 c4 10 add $0x10,%esp
1149f2: eb 0c jmp 114a00 <rtems_partition_create+0xf0>
1149f4: b8 09 00 00 00 mov $0x9,%eax
1149f9: eb 05 jmp 114a00 <rtems_partition_create+0xf0>
1149fb: b8 08 00 00 00 mov $0x8,%eax
}
114a00: 8d 65 f4 lea -0xc(%ebp),%esp
114a03: 5b pop %ebx
114a04: 5e pop %esi
114a05: 5f pop %edi
114a06: c9 leave
114a07: c3 ret
0010ae6d <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10ae6d: 55 push %ebp
10ae6e: 89 e5 mov %esp,%ebp
10ae70: 57 push %edi
10ae71: 56 push %esi
10ae72: 53 push %ebx
10ae73: 83 ec 30 sub $0x30,%esp
10ae76: 8b 75 08 mov 0x8(%ebp),%esi
10ae79: 8b 5d 0c mov 0xc(%ebp),%ebx
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
10ae7c: 8d 45 e4 lea -0x1c(%ebp),%eax
10ae7f: 50 push %eax
10ae80: 56 push %esi
10ae81: 68 40 65 12 00 push $0x126540
10ae86: e8 a1 1c 00 00 call 10cb2c <_Objects_Get>
10ae8b: 89 c7 mov %eax,%edi
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10ae8d: 83 c4 10 add $0x10,%esp
10ae90: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10ae94: 0f 85 40 01 00 00 jne 10afda <rtems_rate_monotonic_period+0x16d>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10ae9a: 8b 40 40 mov 0x40(%eax),%eax
10ae9d: 3b 05 f4 66 12 00 cmp 0x1266f4,%eax
10aea3: 74 0f je 10aeb4 <rtems_rate_monotonic_period+0x47>
_Thread_Enable_dispatch();
10aea5: e8 47 24 00 00 call 10d2f1 <_Thread_Enable_dispatch>
10aeaa: bb 17 00 00 00 mov $0x17,%ebx
return RTEMS_NOT_OWNER_OF_RESOURCE;
10aeaf: e9 2b 01 00 00 jmp 10afdf <rtems_rate_monotonic_period+0x172>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10aeb4: 85 db test %ebx,%ebx
10aeb6: 75 19 jne 10aed1 <rtems_rate_monotonic_period+0x64>
switch ( the_period->state ) {
10aeb8: 8b 47 38 mov 0x38(%edi),%eax
10aebb: 83 f8 04 cmp $0x4,%eax
10aebe: 77 07 ja 10aec7 <rtems_rate_monotonic_period+0x5a><== NEVER TAKEN
10aec0: 8b 1c 85 c4 f7 11 00 mov 0x11f7c4(,%eax,4),%ebx
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10aec7: e8 25 24 00 00 call 10d2f1 <_Thread_Enable_dispatch>
return( return_value );
10aecc: e9 0e 01 00 00 jmp 10afdf <rtems_rate_monotonic_period+0x172>
}
_ISR_Disable( level );
10aed1: 9c pushf
10aed2: fa cli
10aed3: 8f 45 d4 popl -0x2c(%ebp)
switch ( the_period->state ) {
10aed6: 8b 47 38 mov 0x38(%edi),%eax
10aed9: 83 f8 02 cmp $0x2,%eax
10aedc: 74 5f je 10af3d <rtems_rate_monotonic_period+0xd0>
10aede: 83 f8 04 cmp $0x4,%eax
10aee1: 0f 84 ba 00 00 00 je 10afa1 <rtems_rate_monotonic_period+0x134>
10aee7: 85 c0 test %eax,%eax
10aee9: 0f 85 eb 00 00 00 jne 10afda <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10aeef: ff 75 d4 pushl -0x2c(%ebp)
10aef2: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10aef3: 83 ec 0c sub $0xc,%esp
10aef6: 57 push %edi
10aef7: e8 9c fd ff ff call 10ac98 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10aefc: 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;
10af03: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10af0a: c7 47 2c e8 b1 10 00 movl $0x10b1e8,0x2c(%edi)
the_watchdog->id = id;
10af11: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10af14: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10af1b: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10af1e: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10af21: 5b pop %ebx
10af22: 5e pop %esi
10af23: 83 c7 10 add $0x10,%edi
10af26: 57 push %edi
10af27: 68 14 67 12 00 push $0x126714
10af2c: e8 07 33 00 00 call 10e238 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10af31: e8 bb 23 00 00 call 10d2f1 <_Thread_Enable_dispatch>
10af36: 31 db xor %ebx,%ebx
10af38: e9 98 00 00 00 jmp 10afd5 <rtems_rate_monotonic_period+0x168>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10af3d: 83 ec 0c sub $0xc,%esp
10af40: 57 push %edi
10af41: e8 4c fe ff ff call 10ad92 <_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;
10af46: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10af4d: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10af50: ff 75 d4 pushl -0x2c(%ebp)
10af53: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10af54: a1 f4 66 12 00 mov 0x1266f4,%eax
10af59: 8b 57 08 mov 0x8(%edi),%edx
10af5c: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10af5f: 5a pop %edx
10af60: 59 pop %ecx
10af61: 68 00 40 00 00 push $0x4000
10af66: 50 push %eax
10af67: e8 94 2b 00 00 call 10db00 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10af6c: 9c pushf
10af6d: fa cli
10af6e: 5a pop %edx
local_state = the_period->state;
10af6f: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10af72: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10af79: 52 push %edx
10af7a: 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 )
10af7b: 83 c4 10 add $0x10,%esp
10af7e: 83 f8 03 cmp $0x3,%eax
10af81: 75 15 jne 10af98 <rtems_rate_monotonic_period+0x12b>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10af83: 56 push %esi
10af84: 56 push %esi
10af85: 68 00 40 00 00 push $0x4000
10af8a: ff 35 f4 66 12 00 pushl 0x1266f4
10af90: e8 df 1f 00 00 call 10cf74 <_Thread_Clear_state>
10af95: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10af98: e8 54 23 00 00 call 10d2f1 <_Thread_Enable_dispatch>
10af9d: 31 db xor %ebx,%ebx
return RTEMS_SUCCESSFUL;
10af9f: eb 3e jmp 10afdf <rtems_rate_monotonic_period+0x172>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10afa1: 83 ec 0c sub $0xc,%esp
10afa4: 57 push %edi
10afa5: e8 e8 fd ff ff call 10ad92 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10afaa: ff 75 d4 pushl -0x2c(%ebp)
10afad: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10afae: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10afb5: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10afb8: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10afbb: 59 pop %ecx
10afbc: 5b pop %ebx
10afbd: 83 c7 10 add $0x10,%edi
10afc0: 57 push %edi
10afc1: 68 14 67 12 00 push $0x126714
10afc6: e8 6d 32 00 00 call 10e238 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10afcb: e8 21 23 00 00 call 10d2f1 <_Thread_Enable_dispatch>
10afd0: bb 06 00 00 00 mov $0x6,%ebx
return RTEMS_TIMEOUT;
10afd5: 83 c4 10 add $0x10,%esp
10afd8: eb 05 jmp 10afdf <rtems_rate_monotonic_period+0x172>
10afda: bb 04 00 00 00 mov $0x4,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10afdf: 89 d8 mov %ebx,%eax
10afe1: 8d 65 f4 lea -0xc(%ebp),%esp
10afe4: 5b pop %ebx
10afe5: 5e pop %esi
10afe6: 5f pop %edi
10afe7: c9 leave
10afe8: c3 ret
0010afec <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10afec: 55 push %ebp
10afed: 89 e5 mov %esp,%ebp
10afef: 57 push %edi
10aff0: 56 push %esi
10aff1: 53 push %ebx
10aff2: 83 ec 7c sub $0x7c,%esp
10aff5: 8b 5d 08 mov 0x8(%ebp),%ebx
10aff8: 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 )
10affb: 85 ff test %edi,%edi
10affd: 0f 84 2b 01 00 00 je 10b12e <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b003: 52 push %edx
10b004: 52 push %edx
10b005: 68 d8 f7 11 00 push $0x11f7d8
10b00a: 53 push %ebx
10b00b: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10b00d: 5e pop %esi
10b00e: 58 pop %eax
10b00f: 68 f6 f7 11 00 push $0x11f7f6
10b014: 53 push %ebx
10b015: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10b017: 5a pop %edx
10b018: 59 pop %ecx
10b019: 68 18 f8 11 00 push $0x11f818
10b01e: 53 push %ebx
10b01f: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b021: 5e pop %esi
10b022: 58 pop %eax
10b023: 68 3b f8 11 00 push $0x11f83b
10b028: 53 push %ebx
10b029: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b02b: 5a pop %edx
10b02c: 59 pop %ecx
10b02d: 68 86 f8 11 00 push $0x11f886
10b032: 53 push %ebx
10b033: 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 ;
10b035: 8b 35 48 65 12 00 mov 0x126548,%esi
10b03b: 83 c4 10 add $0x10,%esp
10b03e: e9 df 00 00 00 jmp 10b122 <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b043: 50 push %eax
10b044: 50 push %eax
10b045: 8d 45 88 lea -0x78(%ebp),%eax
10b048: 50 push %eax
10b049: 56 push %esi
10b04a: e8 55 49 00 00 call 10f9a4 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b04f: 83 c4 10 add $0x10,%esp
10b052: 85 c0 test %eax,%eax
10b054: 0f 85 c7 00 00 00 jne 10b121 <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
10b05a: 51 push %ecx
10b05b: 51 push %ecx
10b05c: 8d 55 c0 lea -0x40(%ebp),%edx
10b05f: 52 push %edx
10b060: 56 push %esi
10b061: e8 e2 49 00 00 call 10fa48 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10b066: 83 c4 0c add $0xc,%esp
10b069: 8d 45 e3 lea -0x1d(%ebp),%eax
10b06c: 50 push %eax
10b06d: 6a 05 push $0x5
10b06f: ff 75 c0 pushl -0x40(%ebp)
10b072: e8 fd 01 00 00 call 10b274 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b077: 58 pop %eax
10b078: 5a pop %edx
10b079: ff 75 8c pushl -0x74(%ebp)
10b07c: ff 75 88 pushl -0x78(%ebp)
10b07f: 8d 55 e3 lea -0x1d(%ebp),%edx
10b082: 52 push %edx
10b083: 56 push %esi
10b084: 68 d2 f8 11 00 push $0x11f8d2
10b089: 53 push %ebx
10b08a: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b08c: 8b 45 88 mov -0x78(%ebp),%eax
10b08f: 83 c4 20 add $0x20,%esp
10b092: 85 c0 test %eax,%eax
10b094: 75 0f jne 10b0a5 <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10b096: 51 push %ecx
10b097: 51 push %ecx
10b098: 68 4c fb 11 00 push $0x11fb4c
10b09d: 53 push %ebx
10b09e: ff d7 call *%edi
continue;
10b0a0: 83 c4 10 add $0x10,%esp
10b0a3: eb 7c jmp 10b121 <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 );
10b0a5: 52 push %edx
10b0a6: 8d 55 d8 lea -0x28(%ebp),%edx
10b0a9: 52 push %edx
10b0aa: 50 push %eax
10b0ab: 8d 45 a0 lea -0x60(%ebp),%eax
10b0ae: 50 push %eax
10b0af: e8 58 2e 00 00 call 10df0c <_Timespec_Divide_by_integer>
(*print)( context,
10b0b4: 8b 45 dc mov -0x24(%ebp),%eax
10b0b7: b9 e8 03 00 00 mov $0x3e8,%ecx
10b0bc: 99 cltd
10b0bd: f7 f9 idiv %ecx
10b0bf: 50 push %eax
10b0c0: ff 75 d8 pushl -0x28(%ebp)
10b0c3: 8b 45 9c mov -0x64(%ebp),%eax
10b0c6: 99 cltd
10b0c7: f7 f9 idiv %ecx
10b0c9: 50 push %eax
10b0ca: ff 75 98 pushl -0x68(%ebp)
10b0cd: 8b 45 94 mov -0x6c(%ebp),%eax
10b0d0: 99 cltd
10b0d1: f7 f9 idiv %ecx
10b0d3: 50 push %eax
10b0d4: ff 75 90 pushl -0x70(%ebp)
10b0d7: 68 e9 f8 11 00 push $0x11f8e9
10b0dc: 53 push %ebx
10b0dd: 89 4d 84 mov %ecx,-0x7c(%ebp)
10b0e0: 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);
10b0e2: 83 c4 2c add $0x2c,%esp
10b0e5: 8d 55 d8 lea -0x28(%ebp),%edx
10b0e8: 52 push %edx
10b0e9: ff 75 88 pushl -0x78(%ebp)
10b0ec: 8d 45 b8 lea -0x48(%ebp),%eax
10b0ef: 50 push %eax
10b0f0: e8 17 2e 00 00 call 10df0c <_Timespec_Divide_by_integer>
(*print)( context,
10b0f5: 8b 45 dc mov -0x24(%ebp),%eax
10b0f8: 8b 4d 84 mov -0x7c(%ebp),%ecx
10b0fb: 99 cltd
10b0fc: f7 f9 idiv %ecx
10b0fe: 50 push %eax
10b0ff: ff 75 d8 pushl -0x28(%ebp)
10b102: 8b 45 b4 mov -0x4c(%ebp),%eax
10b105: 99 cltd
10b106: f7 f9 idiv %ecx
10b108: 50 push %eax
10b109: ff 75 b0 pushl -0x50(%ebp)
10b10c: 8b 45 ac mov -0x54(%ebp),%eax
10b10f: 99 cltd
10b110: f7 f9 idiv %ecx
10b112: 50 push %eax
10b113: ff 75 a8 pushl -0x58(%ebp)
10b116: 68 08 f9 11 00 push $0x11f908
10b11b: 53 push %ebx
10b11c: ff d7 call *%edi
10b11e: 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++ ) {
10b121: 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 ;
10b122: 3b 35 4c 65 12 00 cmp 0x12654c,%esi
10b128: 0f 86 15 ff ff ff jbe 10b043 <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b12e: 8d 65 f4 lea -0xc(%ebp),%esp
10b131: 5b pop %ebx
10b132: 5e pop %esi
10b133: 5f pop %edi
10b134: c9 leave
10b135: c3 ret
00115cb8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115cb8: 55 push %ebp
115cb9: 89 e5 mov %esp,%ebp
115cbb: 53 push %ebx
115cbc: 83 ec 14 sub $0x14,%esp
115cbf: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
115cc2: b8 0a 00 00 00 mov $0xa,%eax
115cc7: 85 db test %ebx,%ebx
115cc9: 74 71 je 115d3c <rtems_signal_send+0x84>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115ccb: 50 push %eax
115ccc: 50 push %eax
115ccd: 8d 45 f4 lea -0xc(%ebp),%eax
115cd0: 50 push %eax
115cd1: ff 75 08 pushl 0x8(%ebp)
115cd4: e8 13 35 00 00 call 1191ec <_Thread_Get>
115cd9: 89 c1 mov %eax,%ecx
switch ( location ) {
115cdb: 83 c4 10 add $0x10,%esp
115cde: b8 04 00 00 00 mov $0x4,%eax
115ce3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115ce7: 75 53 jne 115d3c <rtems_signal_send+0x84>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
115ce9: 8b 91 f0 00 00 00 mov 0xf0(%ecx),%edx
asr = &api->Signal;
115cef: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115cf3: 74 3d je 115d32 <rtems_signal_send+0x7a>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
115cf5: 80 7a 08 00 cmpb $0x0,0x8(%edx)
115cf9: 74 26 je 115d21 <rtems_signal_send+0x69>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115cfb: 9c pushf
115cfc: fa cli
115cfd: 58 pop %eax
*signal_set |= signals;
115cfe: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
115d01: 50 push %eax
115d02: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
115d03: c6 41 74 01 movb $0x1,0x74(%ecx)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
115d07: a1 e0 c5 13 00 mov 0x13c5e0,%eax
115d0c: 85 c0 test %eax,%eax
115d0e: 74 19 je 115d29 <rtems_signal_send+0x71>
115d10: 3b 0d 04 c6 13 00 cmp 0x13c604,%ecx
115d16: 75 11 jne 115d29 <rtems_signal_send+0x71><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
115d18: c6 05 98 c6 13 00 01 movb $0x1,0x13c698
115d1f: eb 08 jmp 115d29 <rtems_signal_send+0x71>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
115d21: 9c pushf
115d22: fa cli
115d23: 58 pop %eax
*signal_set |= signals;
115d24: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
115d27: 50 push %eax
115d28: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
115d29: e8 6f 34 00 00 call 11919d <_Thread_Enable_dispatch>
115d2e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
115d30: eb 0a jmp 115d3c <rtems_signal_send+0x84>
}
_Thread_Enable_dispatch();
115d32: e8 66 34 00 00 call 11919d <_Thread_Enable_dispatch>
115d37: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115d3c: 8b 5d fc mov -0x4(%ebp),%ebx
115d3f: c9 leave
115d40: c3 ret
0010fb18 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10fb18: 55 push %ebp
10fb19: 89 e5 mov %esp,%ebp
10fb1b: 57 push %edi
10fb1c: 56 push %esi
10fb1d: 53 push %ebx
10fb1e: 83 ec 1c sub $0x1c,%esp
10fb21: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fb24: b8 09 00 00 00 mov $0x9,%eax
10fb29: 85 c9 test %ecx,%ecx
10fb2b: 0f 84 f4 00 00 00 je 10fc25 <rtems_task_mode+0x10d>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10fb31: 8b 1d 10 3b 12 00 mov 0x123b10,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10fb37: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10fb3d: 80 7b 75 01 cmpb $0x1,0x75(%ebx)
10fb41: 19 ff sbb %edi,%edi
10fb43: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10fb49: 83 7b 7c 00 cmpl $0x0,0x7c(%ebx)
10fb4d: 74 06 je 10fb55 <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
10fb4f: 81 cf 00 02 00 00 or $0x200,%edi
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10fb55: 80 7e 08 01 cmpb $0x1,0x8(%esi)
10fb59: 19 d2 sbb %edx,%edx
10fb5b: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
10fb61: 89 55 e4 mov %edx,-0x1c(%ebp)
10fb64: 89 4d e0 mov %ecx,-0x20(%ebp)
10fb67: e8 6f d2 ff ff call 10cddb <_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;
10fb6c: 8b 55 e4 mov -0x1c(%ebp),%edx
10fb6f: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
10fb71: 09 f8 or %edi,%eax
10fb73: 8b 4d e0 mov -0x20(%ebp),%ecx
10fb76: 89 01 mov %eax,(%ecx)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10fb78: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10fb7f: 74 0f je 10fb90 <rtems_task_mode+0x78>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
10fb81: 8b 45 08 mov 0x8(%ebp),%eax
10fb84: c1 e8 08 shr $0x8,%eax
10fb87: 83 f0 01 xor $0x1,%eax
10fb8a: 83 e0 01 and $0x1,%eax
10fb8d: 88 43 75 mov %al,0x75(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
10fb90: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10fb97: 74 21 je 10fbba <rtems_task_mode+0xa2>
if ( _Modes_Is_timeslice(mode_set) ) {
10fb99: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
10fba0: 74 11 je 10fbb3 <rtems_task_mode+0x9b>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10fba2: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10fba9: a1 20 3a 12 00 mov 0x123a20,%eax
10fbae: 89 43 78 mov %eax,0x78(%ebx)
10fbb1: eb 07 jmp 10fbba <rtems_task_mode+0xa2>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10fbb3: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fbba: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fbbe: 74 0a je 10fbca <rtems_task_mode+0xb2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
10fbc0: f6 45 08 01 testb $0x1,0x8(%ebp)
10fbc4: 74 03 je 10fbc9 <rtems_task_mode+0xb1>
10fbc6: fa cli
10fbc7: eb 01 jmp 10fbca <rtems_task_mode+0xb2>
10fbc9: fb sti
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
10fbca: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10fbd1: 74 33 je 10fc06 <rtems_task_mode+0xee>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
10fbd3: 8b 45 08 mov 0x8(%ebp),%eax
10fbd6: c1 e8 0a shr $0xa,%eax
10fbd9: 83 f0 01 xor $0x1,%eax
10fbdc: 83 e0 01 and $0x1,%eax
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10fbdf: 3a 46 08 cmp 0x8(%esi),%al
10fbe2: 74 22 je 10fc06 <rtems_task_mode+0xee>
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
10fbe4: 88 46 08 mov %al,0x8(%esi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
10fbe7: 9c pushf
10fbe8: fa cli
10fbe9: 58 pop %eax
_signals = information->signals_pending;
10fbea: 8b 56 18 mov 0x18(%esi),%edx
information->signals_pending = information->signals_posted;
10fbed: 8b 4e 14 mov 0x14(%esi),%ecx
10fbf0: 89 4e 18 mov %ecx,0x18(%esi)
information->signals_posted = _signals;
10fbf3: 89 56 14 mov %edx,0x14(%esi)
_ISR_Enable( _level );
10fbf6: 50 push %eax
10fbf7: 9d popf
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10fbf8: 83 7e 14 00 cmpl $0x0,0x14(%esi)
10fbfc: 74 08 je 10fc06 <rtems_task_mode+0xee>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
10fbfe: c6 43 74 01 movb $0x1,0x74(%ebx)
10fc02: b3 01 mov $0x1,%bl
10fc04: eb 02 jmp 10fc08 <rtems_task_mode+0xf0>
10fc06: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
10fc08: 83 3d ec 3b 12 00 03 cmpl $0x3,0x123bec
10fc0f: 75 12 jne 10fc23 <rtems_task_mode+0x10b> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
10fc11: e8 f2 01 00 00 call 10fe08 <_Thread_Evaluate_mode>
10fc16: 84 c0 test %al,%al
10fc18: 75 04 jne 10fc1e <rtems_task_mode+0x106>
10fc1a: 84 db test %bl,%bl
10fc1c: 74 05 je 10fc23 <rtems_task_mode+0x10b>
_Thread_Dispatch();
10fc1e: e8 6d be ff ff call 10ba90 <_Thread_Dispatch>
10fc23: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10fc25: 83 c4 1c add $0x1c,%esp
10fc28: 5b pop %ebx
10fc29: 5e pop %esi
10fc2a: 5f pop %edi
10fc2b: c9 leave
10fc2c: c3 ret
0010e178 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10e178: 55 push %ebp
10e179: 89 e5 mov %esp,%ebp
10e17b: 56 push %esi
10e17c: 53 push %ebx
10e17d: 83 ec 10 sub $0x10,%esp
10e180: 8b 5d 0c mov 0xc(%ebp),%ebx
10e183: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10e186: 85 db test %ebx,%ebx
10e188: 74 10 je 10e19a <rtems_task_set_priority+0x22>
10e18a: 0f b6 05 d4 4a 12 00 movzbl 0x124ad4,%eax
10e191: ba 13 00 00 00 mov $0x13,%edx
10e196: 39 c3 cmp %eax,%ebx
10e198: 77 50 ja 10e1ea <rtems_task_set_priority+0x72>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10e19a: ba 09 00 00 00 mov $0x9,%edx
10e19f: 85 f6 test %esi,%esi
10e1a1: 74 47 je 10e1ea <rtems_task_set_priority+0x72>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10e1a3: 51 push %ecx
10e1a4: 51 push %ecx
10e1a5: 8d 45 f4 lea -0xc(%ebp),%eax
10e1a8: 50 push %eax
10e1a9: ff 75 08 pushl 0x8(%ebp)
10e1ac: e8 17 1b 00 00 call 10fcc8 <_Thread_Get>
switch ( location ) {
10e1b1: 83 c4 10 add $0x10,%esp
10e1b4: ba 04 00 00 00 mov $0x4,%edx
10e1b9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10e1bd: 75 2b jne 10e1ea <rtems_task_set_priority+0x72>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10e1bf: 8b 50 14 mov 0x14(%eax),%edx
10e1c2: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10e1c4: 85 db test %ebx,%ebx
10e1c6: 74 1b je 10e1e3 <rtems_task_set_priority+0x6b>
the_thread->real_priority = new_priority;
10e1c8: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10e1cb: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e1cf: 74 05 je 10e1d6 <rtems_task_set_priority+0x5e>
the_thread->current_priority > new_priority )
10e1d1: 39 58 14 cmp %ebx,0x14(%eax)
10e1d4: 76 0d jbe 10e1e3 <rtems_task_set_priority+0x6b><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
10e1d6: 52 push %edx
10e1d7: 6a 00 push $0x0
10e1d9: 53 push %ebx
10e1da: 50 push %eax
10e1db: e8 fc 15 00 00 call 10f7dc <_Thread_Change_priority>
10e1e0: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10e1e3: e8 91 1a 00 00 call 10fc79 <_Thread_Enable_dispatch>
10e1e8: 31 d2 xor %edx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10e1ea: 89 d0 mov %edx,%eax
10e1ec: 8d 65 f8 lea -0x8(%ebp),%esp
10e1ef: 5b pop %ebx
10e1f0: 5e pop %esi
10e1f1: c9 leave
10e1f2: c3 ret
00116500 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
116500: 55 push %ebp
116501: 89 e5 mov %esp,%ebp
116503: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
116506: 8d 45 f4 lea -0xc(%ebp),%eax
116509: 50 push %eax
11650a: ff 75 08 pushl 0x8(%ebp)
11650d: 68 e8 c7 13 00 push $0x13c7e8
116512: e8 55 24 00 00 call 11896c <_Objects_Get>
116517: 89 c2 mov %eax,%edx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
116519: 83 c4 10 add $0x10,%esp
11651c: b8 04 00 00 00 mov $0x4,%eax
116521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
116525: 75 1c jne 116543 <rtems_timer_cancel+0x43>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
116527: 83 7a 38 04 cmpl $0x4,0x38(%edx)
11652b: 74 0f je 11653c <rtems_timer_cancel+0x3c><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11652d: 83 ec 0c sub $0xc,%esp
116530: 83 c2 10 add $0x10,%edx
116533: 52 push %edx
116534: e8 7b 3e 00 00 call 11a3b4 <_Watchdog_Remove>
116539: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
11653c: e8 5c 2c 00 00 call 11919d <_Thread_Enable_dispatch>
116541: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116543: c9 leave
116544: c3 ret
00116968 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
116968: 55 push %ebp
116969: 89 e5 mov %esp,%ebp
11696b: 57 push %edi
11696c: 56 push %esi
11696d: 53 push %ebx
11696e: 83 ec 1c sub $0x1c,%esp
116971: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
116974: 8b 35 28 c8 13 00 mov 0x13c828,%esi
if ( !timer_server )
11697a: b8 0e 00 00 00 mov $0xe,%eax
11697f: 85 f6 test %esi,%esi
116981: 0f 84 b4 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
116987: b0 0b mov $0xb,%al
116989: 80 3d 5c c5 13 00 00 cmpb $0x0,0x13c55c
116990: 0f 84 a5 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
116996: b0 09 mov $0x9,%al
116998: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
11699c: 0f 84 99 00 00 00 je 116a3b <rtems_timer_server_fire_when+0xd3>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
1169a2: 83 ec 0c sub $0xc,%esp
1169a5: 53 push %ebx
1169a6: e8 61 d6 ff ff call 11400c <_TOD_Validate>
1169ab: 83 c4 10 add $0x10,%esp
1169ae: 84 c0 test %al,%al
1169b0: 0f 84 80 00 00 00 je 116a36 <rtems_timer_server_fire_when+0xce>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
1169b6: 83 ec 0c sub $0xc,%esp
1169b9: 53 push %ebx
1169ba: e8 e5 d5 ff ff call 113fa4 <_TOD_To_seconds>
1169bf: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
1169c1: 83 c4 10 add $0x10,%esp
1169c4: 3b 05 d8 c5 13 00 cmp 0x13c5d8,%eax
1169ca: 76 6a jbe 116a36 <rtems_timer_server_fire_when+0xce>
1169cc: 51 push %ecx
1169cd: 8d 45 e4 lea -0x1c(%ebp),%eax
1169d0: 50 push %eax
1169d1: ff 75 08 pushl 0x8(%ebp)
1169d4: 68 e8 c7 13 00 push $0x13c7e8
1169d9: e8 8e 1f 00 00 call 11896c <_Objects_Get>
1169de: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1169e0: 83 c4 10 add $0x10,%esp
1169e3: b8 04 00 00 00 mov $0x4,%eax
1169e8: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
1169ec: 75 4d jne 116a3b <rtems_timer_server_fire_when+0xd3>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1169ee: 83 ec 0c sub $0xc,%esp
1169f1: 8d 43 10 lea 0x10(%ebx),%eax
1169f4: 50 push %eax
1169f5: e8 ba 39 00 00 call 11a3b4 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
1169fa: 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;
116a01: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
116a08: 8b 45 10 mov 0x10(%ebp),%eax
116a0b: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
116a0e: 8b 45 08 mov 0x8(%ebp),%eax
116a11: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
116a14: 8b 45 14 mov 0x14(%ebp),%eax
116a17: 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();
116a1a: 2b 3d d8 c5 13 00 sub 0x13c5d8,%edi
116a20: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
116a23: 58 pop %eax
116a24: 5a pop %edx
116a25: 53 push %ebx
116a26: 56 push %esi
116a27: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
116a2a: e8 6e 27 00 00 call 11919d <_Thread_Enable_dispatch>
116a2f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116a31: 83 c4 10 add $0x10,%esp
116a34: eb 05 jmp 116a3b <rtems_timer_server_fire_when+0xd3>
116a36: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a3b: 8d 65 f4 lea -0xc(%ebp),%esp
116a3e: 5b pop %ebx
116a3f: 5e pop %esi
116a40: 5f pop %edi
116a41: c9 leave
116a42: c3 ret