RTEMS 4.11Annotated Report
Wed Sep 12 23:43:20 2012
0010c214 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10c214: 53 push %ebx
10c215: 83 ec 08 sub $0x8,%esp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10c218: 8b 1d f8 f7 12 00 mov 0x12f7f8,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c21e: 81 fb fc f7 12 00 cmp $0x12f7fc,%ebx
10c224: 74 0f je 10c235 <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN
10c226: 66 90 xchg %ax,%ax
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10c228: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c22b: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c22d: 81 fb fc f7 12 00 cmp $0x12f7fc,%ebx
10c233: 75 f3 jne 10c228 <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10c235: 83 c4 08 add $0x8,%esp
10c238: 5b pop %ebx
10c239: c3 ret
0010c23c <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10c23c: 53 push %ebx
10c23d: 83 ec 18 sub $0x18,%esp
10c240: 8b 1d f8 f7 12 00 mov 0x12f7f8,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c246: 81 fb fc f7 12 00 cmp $0x12f7fc,%ebx
10c24c: 74 17 je 10c265 <_API_extensions_Run_postswitch+0x29><== NEVER TAKEN
10c24e: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10c250: a1 6c f8 12 00 mov 0x12f86c,%eax
10c255: 89 04 24 mov %eax,(%esp)
10c258: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c25b: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c25d: 81 fb fc f7 12 00 cmp $0x12f7fc,%ebx
10c263: 75 eb jne 10c250 <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10c265: 83 c4 18 add $0x18,%esp
10c268: 5b pop %ebx
10c269: c3 ret
00110c74 <_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
)
{
110c74: 57 push %edi
110c75: 56 push %esi
110c76: 53 push %ebx
110c77: 83 ec 20 sub $0x20,%esp
110c7a: 8b 5c 24 30 mov 0x30(%esp),%ebx
110c7e: 8b 74 24 38 mov 0x38(%esp),%esi
110c82: 8b 44 24 3c mov 0x3c(%esp),%eax
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
110c86: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
110c89: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
110c90: 89 43 4c mov %eax,0x4c(%ebx)
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
110c93: a8 03 test $0x3,%al
110c95: 74 15 je 110cac <_CORE_message_queue_Initialize+0x38>
allocated_message_size += sizeof(uintptr_t);
110c97: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
110c9a: 83 e2 fc and $0xfffffffc,%edx
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
110c9d: 39 d0 cmp %edx,%eax
110c9f: 76 0d jbe 110cae <_CORE_message_queue_Initialize+0x3a>
return false;
110ca1: 31 c0 xor %eax,%eax
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
110ca3: 83 c4 20 add $0x20,%esp
110ca6: 5b pop %ebx
110ca7: 5e pop %esi
110ca8: 5f pop %edi
110ca9: c3 ret
110caa: 66 90 xchg %ax,%ax
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
110cac: 89 c2 mov %eax,%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
110cae: 8d 7a 10 lea 0x10(%edx),%edi
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
110cb1: 89 f0 mov %esi,%eax
110cb3: f7 e7 mul %edi
110cb5: 89 44 24 18 mov %eax,0x18(%esp)
110cb9: 89 54 24 1c mov %edx,0x1c(%esp)
if ( x > SIZE_MAX )
110cbd: 85 d2 test %edx,%edx
110cbf: 7f e0 jg 110ca1 <_CORE_message_queue_Initialize+0x2d>
return false;
*c = (size_t) x;
110cc1: 89 04 24 mov %eax,(%esp)
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
110cc4: e8 33 df ff ff call 10ebfc <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
110cc9: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
110ccc: 85 c0 test %eax,%eax
110cce: 74 d1 je 110ca1 <_CORE_message_queue_Initialize+0x2d><== NEVER TAKEN
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
110cd0: 89 7c 24 0c mov %edi,0xc(%esp)
110cd4: 89 74 24 08 mov %esi,0x8(%esp)
110cd8: 89 44 24 04 mov %eax,0x4(%esp)
110cdc: 8d 43 60 lea 0x60(%ebx),%eax
110cdf: 89 04 24 mov %eax,(%esp)
110ce2: e8 e5 b6 ff ff call 10c3cc <_Chain_Initialize>
Chain_Node *tail = _Chain_Tail( the_chain );
110ce7: 8d 43 50 lea 0x50(%ebx),%eax
110cea: 8d 53 54 lea 0x54(%ebx),%edx
110ced: 89 53 50 mov %edx,0x50(%ebx)
head->next = tail;
head->previous = NULL;
110cf0: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
110cf7: 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(
110cfa: c7 44 24 0c 06 00 00 movl $0x6,0xc(%esp)
110d01: 00
110d02: c7 44 24 08 80 00 00 movl $0x80,0x8(%esp)
110d09: 00
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
110d0a: 8b 44 24 34 mov 0x34(%esp),%eax
110d0e: 83 38 01 cmpl $0x1,(%eax)
110d11: 0f 94 c0 sete %al
110d14: 0f b6 c0 movzbl %al,%eax
110d17: 89 44 24 04 mov %eax,0x4(%esp)
110d1b: 89 1c 24 mov %ebx,(%esp)
110d1e: e8 89 d7 ff ff call 10e4ac <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
110d23: b0 01 mov $0x1,%al
}
110d25: 83 c4 20 add $0x20,%esp
110d28: 5b pop %ebx
110d29: 5e pop %esi
110d2a: 5f pop %edi
110d2b: c3 ret
0010c548 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c548: 56 push %esi
10c549: 53 push %ebx
10c54a: 83 ec 14 sub $0x14,%esp
10c54d: 8b 74 24 20 mov 0x20(%esp),%esi
10c551: 8a 5c 24 28 mov 0x28(%esp),%bl
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
10c555: a1 04 f6 12 00 mov 0x12f604,%eax
10c55a: 85 c0 test %eax,%eax
10c55c: 74 6e je 10c5cc <_CORE_mutex_Seize+0x84>
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c55e: 84 db test %bl,%bl
10c560: 0f 84 95 00 00 00 je 10c5fb <_CORE_mutex_Seize+0xb3>
10c566: 83 3d 60 f7 12 00 01 cmpl $0x1,0x12f760
10c56d: 0f 87 9e 00 00 00 ja 10c611 <_CORE_mutex_Seize+0xc9>
10c573: 8d 44 24 30 lea 0x30(%esp),%eax
10c577: 89 44 24 04 mov %eax,0x4(%esp)
10c57b: 89 34 24 mov %esi,(%esp)
10c57e: e8 35 49 00 00 call 110eb8 <_CORE_mutex_Seize_interrupt_trylock>
10c583: 85 c0 test %eax,%eax
10c585: 74 3c je 10c5c3 <_CORE_mutex_Seize+0x7b><== ALWAYS TAKEN
10c587: 90 nop
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;
10c588: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
10c58f: a1 6c f8 12 00 mov 0x12f86c,%eax
10c594: 89 70 44 mov %esi,0x44(%eax)
10c597: 8b 54 24 24 mov 0x24(%esp),%edx
10c59b: 89 50 20 mov %edx,0x20(%eax)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c59e: a1 04 f6 12 00 mov 0x12f604,%eax
10c5a3: 40 inc %eax
10c5a4: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10c5a9: a1 04 f6 12 00 mov 0x12f604,%eax
10c5ae: ff 74 24 30 pushl 0x30(%esp)
10c5b2: 9d popf
10c5b3: 8b 44 24 2c mov 0x2c(%esp),%eax
10c5b7: 89 44 24 04 mov %eax,0x4(%esp)
10c5bb: 89 34 24 mov %esi,(%esp)
10c5be: e8 11 ff ff ff call 10c4d4 <_CORE_mutex_Seize_interrupt_blocking>
}
10c5c3: 83 c4 14 add $0x14,%esp
10c5c6: 5b pop %ebx
10c5c7: 5e pop %esi
10c5c8: c3 ret
10c5c9: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c5cc: 8d 44 24 30 lea 0x30(%esp),%eax
10c5d0: 89 44 24 04 mov %eax,0x4(%esp)
10c5d4: 89 34 24 mov %esi,(%esp)
10c5d7: e8 dc 48 00 00 call 110eb8 <_CORE_mutex_Seize_interrupt_trylock>
10c5dc: 85 c0 test %eax,%eax
10c5de: 74 e3 je 10c5c3 <_CORE_mutex_Seize+0x7b>
10c5e0: 84 db test %bl,%bl
10c5e2: 75 a4 jne 10c588 <_CORE_mutex_Seize+0x40>
10c5e4: ff 74 24 30 pushl 0x30(%esp)
10c5e8: 9d popf
10c5e9: a1 6c f8 12 00 mov 0x12f86c,%eax
10c5ee: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c5f5: 83 c4 14 add $0x14,%esp
10c5f8: 5b pop %ebx
10c5f9: 5e pop %esi
10c5fa: c3 ret
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c5fb: 8d 44 24 30 lea 0x30(%esp),%eax
10c5ff: 89 44 24 04 mov %eax,0x4(%esp)
10c603: 89 34 24 mov %esi,(%esp)
10c606: e8 ad 48 00 00 call 110eb8 <_CORE_mutex_Seize_interrupt_trylock>
10c60b: 85 c0 test %eax,%eax
10c60d: 75 d5 jne 10c5e4 <_CORE_mutex_Seize+0x9c><== NEVER TAKEN
10c60f: eb b2 jmp 10c5c3 <_CORE_mutex_Seize+0x7b>
10c611: c7 44 24 08 12 00 00 movl $0x12,0x8(%esp)
10c618: 00
10c619: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c620: 00
10c621: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c628: e8 93 05 00 00 call 10cbc0 <_Internal_error_Occurred>
0010c768 <_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
)
{
10c768: 53 push %ebx
10c769: 83 ec 18 sub $0x18,%esp
10c76c: 8b 5c 24 20 mov 0x20(%esp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10c770: 89 1c 24 mov %ebx,(%esp)
10c773: e8 c4 19 00 00 call 10e13c <_Thread_queue_Dequeue>
10c778: 85 c0 test %eax,%eax
10c77a: 74 08 je 10c784 <_CORE_semaphore_Surrender+0x1c>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c77c: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c77e: 83 c4 18 add $0x18,%esp
10c781: 5b pop %ebx
10c782: c3 ret
10c783: 90 nop
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c784: 9c pushf
10c785: fa cli
10c786: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c787: 8b 43 48 mov 0x48(%ebx),%eax
10c78a: 3b 43 40 cmp 0x40(%ebx),%eax
10c78d: 72 0d jb 10c79c <_CORE_semaphore_Surrender+0x34><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c78f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c794: 52 push %edx
10c795: 9d popf
}
return status;
}
10c796: 83 c4 18 add $0x18,%esp
10c799: 5b pop %ebx
10c79a: c3 ret
10c79b: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c79c: 40 inc %eax
10c79d: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c7a0: 31 c0 xor %eax,%eax
10c7a2: eb f0 jmp 10c794 <_CORE_semaphore_Surrender+0x2c>
0010c3cc <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10c3cc: 55 push %ebp
10c3cd: 57 push %edi
10c3ce: 56 push %esi
10c3cf: 53 push %ebx
10c3d0: 8b 74 24 14 mov 0x14(%esp),%esi
10c3d4: 8b 44 24 1c mov 0x1c(%esp),%eax
10c3d8: 8b 5c 24 20 mov 0x20(%esp),%ebx
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c3dc: 8d 6e 04 lea 0x4(%esi),%ebp
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
10c3df: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
while ( count-- ) {
10c3e6: 8d 78 ff lea -0x1(%eax),%edi
10c3e9: 85 c0 test %eax,%eax
10c3eb: 74 2b je 10c418 <_Chain_Initialize+0x4c><== NEVER TAKEN
10c3ed: 89 f9 mov %edi,%ecx
10c3ef: 8b 44 24 18 mov 0x18(%esp),%eax
10c3f3: 89 f2 mov %esi,%edx
10c3f5: 8d 76 00 lea 0x0(%esi),%esi
current->next = next;
10c3f8: 89 02 mov %eax,(%edx)
next->previous = current;
10c3fa: 89 50 04 mov %edx,0x4(%eax)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c3fd: 49 dec %ecx
10c3fe: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
10c400: 01 d8 add %ebx,%eax
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c402: 83 f9 ff cmp $0xffffffff,%ecx
10c405: 75 f1 jne 10c3f8 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
10c407: 0f af df imul %edi,%ebx
10c40a: 03 5c 24 18 add 0x18(%esp),%ebx
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
10c40e: 89 2b mov %ebp,(%ebx)
tail->previous = current;
10c410: 89 5e 08 mov %ebx,0x8(%esi)
}
10c413: 5b pop %ebx
10c414: 5e pop %esi
10c415: 5f pop %edi
10c416: 5d pop %ebp
10c417: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
10c418: 89 f3 mov %esi,%ebx <== NOT EXECUTED
10c41a: eb f2 jmp 10c40e <_Chain_Initialize+0x42><== NOT EXECUTED
0010b544 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b544: 55 push %ebp
10b545: 57 push %edi
10b546: 56 push %esi
10b547: 53 push %ebx
10b548: 83 ec 2c sub $0x2c,%esp
10b54b: 8b 5c 24 40 mov 0x40(%esp),%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 ];
10b54f: 8b 8b e0 00 00 00 mov 0xe0(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b555: 8b 6b 30 mov 0x30(%ebx),%ebp
_ISR_Disable( level );
10b558: 9c pushf
10b559: fa cli
10b55a: 5e pop %esi
pending_events = api->pending_events;
10b55b: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b55d: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b560: 89 c7 mov %eax,%edi
10b562: 21 d7 and %edx,%edi
10b564: 89 7c 24 18 mov %edi,0x18(%esp)
10b568: 0f 84 ae 00 00 00 je 10b61c <_Event_Surrender+0xd8>
/*
* 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() &&
10b56e: 8b 3d 68 f8 12 00 mov 0x12f868,%edi
10b574: 85 ff test %edi,%edi
10b576: 74 08 je 10b580 <_Event_Surrender+0x3c>
10b578: 3b 1d 6c f8 12 00 cmp 0x12f86c,%ebx
10b57e: 74 58 je 10b5d8 <_Event_Surrender+0x94>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b580: f6 43 11 01 testb $0x1,0x11(%ebx)
10b584: 0f 84 92 00 00 00 je 10b61c <_Event_Surrender+0xd8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b58a: 3b 44 24 18 cmp 0x18(%esp),%eax
10b58e: 74 09 je 10b599 <_Event_Surrender+0x55>
10b590: 83 e5 02 and $0x2,%ebp
10b593: 0f 84 83 00 00 00 je 10b61c <_Event_Surrender+0xd8> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b599: 8b 44 24 18 mov 0x18(%esp),%eax
10b59d: f7 d0 not %eax
10b59f: 21 d0 and %edx,%eax
10b5a1: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b5a3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b5aa: 8b 43 28 mov 0x28(%ebx),%eax
10b5ad: 8b 7c 24 18 mov 0x18(%esp),%edi
10b5b1: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
10b5b3: 56 push %esi
10b5b4: 9d popf
10b5b5: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b5b6: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b5ba: 74 6c je 10b628 <_Event_Surrender+0xe4>
_ISR_Enable( level );
10b5bc: 56 push %esi
10b5bd: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b5be: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b5c5: 10
10b5c6: 89 1c 24 mov %ebx,(%esp)
10b5c9: e8 36 24 00 00 call 10da04 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
10b5ce: 83 c4 2c add $0x2c,%esp
10b5d1: 5b pop %ebx
10b5d2: 5e pop %esi
10b5d3: 5f pop %edi
10b5d4: 5d pop %ebp
10b5d5: c3 ret
10b5d6: 66 90 xchg %ax,%ax
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b5d8: 8b 3d e0 f8 12 00 mov 0x12f8e0,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
10b5de: 83 ff 02 cmp $0x2,%edi
10b5e1: 74 09 je 10b5ec <_Event_Surrender+0xa8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b5e3: 8b 3d e0 f8 12 00 mov 0x12f8e0,%edi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b5e9: 4f dec %edi
10b5ea: 75 94 jne 10b580 <_Event_Surrender+0x3c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b5ec: 3b 44 24 18 cmp 0x18(%esp),%eax
10b5f0: 74 05 je 10b5f7 <_Event_Surrender+0xb3>
10b5f2: 83 e5 02 and $0x2,%ebp
10b5f5: 74 25 je 10b61c <_Event_Surrender+0xd8> <== NEVER TAKEN
10b5f7: 8b 44 24 18 mov 0x18(%esp),%eax
10b5fb: f7 d0 not %eax
10b5fd: 21 d0 and %edx,%eax
10b5ff: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b601: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b608: 8b 43 28 mov 0x28(%ebx),%eax
10b60b: 8b 54 24 18 mov 0x18(%esp),%edx
10b60f: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b611: c7 05 e0 f8 12 00 03 movl $0x3,0x12f8e0
10b618: 00 00 00
10b61b: 90 nop
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b61c: 56 push %esi
10b61d: 9d popf
}
10b61e: 83 c4 2c add $0x2c,%esp
10b621: 5b pop %ebx
10b622: 5e pop %esi
10b623: 5f pop %edi
10b624: 5d pop %ebp
10b625: c3 ret
10b626: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b628: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b62f: 56 push %esi
10b630: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b631: 8d 43 48 lea 0x48(%ebx),%eax
10b634: 89 04 24 mov %eax,(%esp)
10b637: e8 6c 34 00 00 call 10eaa8 <_Watchdog_Remove>
10b63c: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b643: 10
10b644: 89 1c 24 mov %ebx,(%esp)
10b647: e8 b8 23 00 00 call 10da04 <_Thread_Clear_state>
10b64c: eb d0 jmp 10b61e <_Event_Surrender+0xda>
0010b650 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b650: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b653: 8d 44 24 1c lea 0x1c(%esp),%eax
10b657: 89 44 24 04 mov %eax,0x4(%esp)
10b65b: 8b 44 24 30 mov 0x30(%esp),%eax
10b65f: 89 04 24 mov %eax,(%esp)
10b662: e8 61 27 00 00 call 10ddc8 <_Thread_Get>
switch ( location ) {
10b667: 8b 54 24 1c mov 0x1c(%esp),%edx
10b66b: 85 d2 test %edx,%edx
10b66d: 75 3b jne 10b6aa <_Event_Timeout+0x5a> <== 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 );
10b66f: 9c pushf
10b670: fa cli
10b671: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b672: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b679: 3b 05 6c f8 12 00 cmp 0x12f86c,%eax
10b67f: 74 2f je 10b6b0 <_Event_Timeout+0x60>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b681: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b688: 52 push %edx
10b689: 9d popf
10b68a: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b691: 10
10b692: 89 04 24 mov %eax,(%esp)
10b695: e8 6a 23 00 00 call 10da04 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10b69a: a1 04 f6 12 00 mov 0x12f604,%eax
10b69f: 48 dec %eax
10b6a0: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10b6a5: a1 04 f6 12 00 mov 0x12f604,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b6aa: 83 c4 2c add $0x2c,%esp
10b6ad: c3 ret
10b6ae: 66 90 xchg %ax,%ax
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b6b0: 8b 0d e0 f8 12 00 mov 0x12f8e0,%ecx
10b6b6: 49 dec %ecx
10b6b7: 75 c8 jne 10b681 <_Event_Timeout+0x31>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b6b9: c7 05 e0 f8 12 00 02 movl $0x2,0x12f8e0
10b6c0: 00 00 00
10b6c3: eb bc jmp 10b681 <_Event_Timeout+0x31>
00110fd4 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
110fd4: 55 push %ebp
110fd5: 57 push %edi
110fd6: 56 push %esi
110fd7: 53 push %ebx
110fd8: 83 ec 3c sub $0x3c,%esp
110fdb: 8b 6c 24 54 mov 0x54(%esp),%ebp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
110fdf: 8d 45 04 lea 0x4(%ebp),%eax
110fe2: 89 44 24 10 mov %eax,0x10(%esp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
110fe6: 8b 54 24 50 mov 0x50(%esp),%edx
110fea: 8b 52 10 mov 0x10(%edx),%edx
110fed: 89 54 24 18 mov %edx,0x18(%esp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
110ff1: 39 c5 cmp %eax,%ebp
110ff3: 0f 87 ab 01 00 00 ja 1111a4 <_Heap_Allocate_aligned_with_boundary+0x1d0>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
110ff9: 8b 5c 24 5c mov 0x5c(%esp),%ebx
110ffd: 85 db test %ebx,%ebx
110fff: 0f 85 77 01 00 00 jne 11117c <_Heap_Allocate_aligned_with_boundary+0x1a8>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
111005: 8b 54 24 50 mov 0x50(%esp),%edx
111009: 8b 72 08 mov 0x8(%edx),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
11100c: 31 ff xor %edi,%edi
11100e: 39 f2 cmp %esi,%edx
111010: 74 4a je 11105c <_Heap_Allocate_aligned_with_boundary+0x88>
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;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111012: 8b 44 24 18 mov 0x18(%esp),%eax
111016: 83 c0 07 add $0x7,%eax
111019: 89 44 24 24 mov %eax,0x24(%esp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
11101d: c7 44 24 14 04 00 00 movl $0x4,0x14(%esp)
111024: 00
111025: 29 6c 24 14 sub %ebp,0x14(%esp)
111029: eb 1e jmp 111049 <_Heap_Allocate_aligned_with_boundary+0x75>
11102b: 90 nop
* 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 ) {
if ( alignment == 0 ) {
11102c: 8b 54 24 58 mov 0x58(%esp),%edx
111030: 85 d2 test %edx,%edx
111032: 75 40 jne 111074 <_Heap_Allocate_aligned_with_boundary+0xa0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111034: 8d 5e 08 lea 0x8(%esi),%ebx
);
}
}
/* Statistics */
++search_count;
111037: 47 inc %edi
if ( alloc_begin != 0 ) {
111038: 85 db test %ebx,%ebx
11103a: 0f 85 14 01 00 00 jne 111154 <_Heap_Allocate_aligned_with_boundary+0x180><== ALWAYS TAKEN
break;
}
block = block->next;
111040: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111043: 39 74 24 50 cmp %esi,0x50(%esp)
111047: 74 13 je 11105c <_Heap_Allocate_aligned_with_boundary+0x88>
/*
* 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 ) {
111049: 8b 5e 04 mov 0x4(%esi),%ebx
11104c: 39 5c 24 10 cmp %ebx,0x10(%esp)
111050: 72 da jb 11102c <_Heap_Allocate_aligned_with_boundary+0x58>
);
}
}
/* Statistics */
++search_count;
111052: 47 inc %edi
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
111053: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111056: 39 74 24 50 cmp %esi,0x50(%esp)
11105a: 75 ed jne 111049 <_Heap_Allocate_aligned_with_boundary+0x75>
);
}
}
/* Statistics */
++search_count;
11105c: 31 c0 xor %eax,%eax
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
11105e: 8b 54 24 50 mov 0x50(%esp),%edx
111062: 39 7a 44 cmp %edi,0x44(%edx)
111065: 73 03 jae 11106a <_Heap_Allocate_aligned_with_boundary+0x96>
stats->max_search = search_count;
111067: 89 7a 44 mov %edi,0x44(%edx)
}
return (void *) alloc_begin;
}
11106a: 83 c4 3c add $0x3c,%esp
11106d: 5b pop %ebx
11106e: 5e pop %esi
11106f: 5f pop %edi
111070: 5d pop %ebp
111071: c3 ret
111072: 66 90 xchg %ax,%ax
111074: 8b 54 24 50 mov 0x50(%esp),%edx
111078: 8b 52 14 mov 0x14(%edx),%edx
11107b: 89 54 24 1c mov %edx,0x1c(%esp)
- 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;
11107f: 83 e3 fe and $0xfffffffe,%ebx
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
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;
111082: 01 f3 add %esi,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111084: 8d 46 08 lea 0x8(%esi),%eax
111087: 89 44 24 20 mov %eax,0x20(%esp)
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;
11108b: 8b 4c 24 24 mov 0x24(%esp),%ecx
11108f: 29 d1 sub %edx,%ecx
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;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111091: 01 d9 add %ebx,%ecx
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
111093: 03 5c 24 14 add 0x14(%esp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111097: 89 d8 mov %ebx,%eax
111099: 31 d2 xor %edx,%edx
11109b: f7 74 24 58 divl 0x58(%esp)
11109f: 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 ) {
1110a1: 39 d9 cmp %ebx,%ecx
1110a3: 73 0c jae 1110b1 <_Heap_Allocate_aligned_with_boundary+0xdd>
1110a5: 89 c8 mov %ecx,%eax
1110a7: 31 d2 xor %edx,%edx
1110a9: f7 74 24 58 divl 0x58(%esp)
1110ad: 89 cb mov %ecx,%ebx
1110af: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
1110b1: 8b 44 24 5c mov 0x5c(%esp),%eax
1110b5: 85 c0 test %eax,%eax
1110b7: 74 64 je 11111d <_Heap_Allocate_aligned_with_boundary+0x149>
/* 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;
1110b9: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
1110bc: 8b 54 24 20 mov 0x20(%esp),%edx
1110c0: 01 ea add %ebp,%edx
1110c2: 89 54 24 28 mov %edx,0x28(%esp)
1110c6: 89 c8 mov %ecx,%eax
1110c8: 31 d2 xor %edx,%edx
1110ca: f7 74 24 5c divl 0x5c(%esp)
1110ce: 89 c8 mov %ecx,%eax
1110d0: 29 d0 sub %edx,%eax
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
1110d2: 39 c3 cmp %eax,%ebx
1110d4: 73 47 jae 11111d <_Heap_Allocate_aligned_with_boundary+0x149>
1110d6: 39 c1 cmp %eax,%ecx
1110d8: 76 43 jbe 11111d <_Heap_Allocate_aligned_with_boundary+0x149>
if ( boundary_line < boundary_floor ) {
1110da: 39 44 24 28 cmp %eax,0x28(%esp)
1110de: 77 68 ja 111148 <_Heap_Allocate_aligned_with_boundary+0x174>
1110e0: 89 74 24 2c mov %esi,0x2c(%esp)
1110e4: 8b 74 24 28 mov 0x28(%esp),%esi
1110e8: eb 0e jmp 1110f8 <_Heap_Allocate_aligned_with_boundary+0x124>
1110ea: 66 90 xchg %ax,%ax
/* 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 ) {
1110ec: 39 c1 cmp %eax,%ecx
1110ee: 76 29 jbe 111119 <_Heap_Allocate_aligned_with_boundary+0x145>
if ( boundary_line < boundary_floor ) {
1110f0: 39 c6 cmp %eax,%esi
1110f2: 0f 87 a0 00 00 00 ja 111198 <_Heap_Allocate_aligned_with_boundary+0x1c4><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
1110f8: 89 c3 mov %eax,%ebx
1110fa: 29 eb sub %ebp,%ebx
1110fc: 89 d8 mov %ebx,%eax
1110fe: 31 d2 xor %edx,%edx
111100: f7 74 24 58 divl 0x58(%esp)
111104: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
111106: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
111109: 89 c8 mov %ecx,%eax
11110b: 31 d2 xor %edx,%edx
11110d: f7 74 24 5c divl 0x5c(%esp)
111111: 89 c8 mov %ecx,%eax
111113: 29 d0 sub %edx,%eax
/* 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 ) {
111115: 39 c3 cmp %eax,%ebx
111117: 72 d3 jb 1110ec <_Heap_Allocate_aligned_with_boundary+0x118>
111119: 8b 74 24 2c mov 0x2c(%esp),%esi
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 ) {
11111d: 39 5c 24 20 cmp %ebx,0x20(%esp)
111121: 77 25 ja 111148 <_Heap_Allocate_aligned_with_boundary+0x174>
111123: b9 f8 ff ff ff mov $0xfffffff8,%ecx
111128: 29 f1 sub %esi,%ecx
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11112a: 01 d9 add %ebx,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11112c: 89 d8 mov %ebx,%eax
11112e: 31 d2 xor %edx,%edx
111130: f7 74 24 18 divl 0x18(%esp)
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;
111134: 29 d1 sub %edx,%ecx
if ( free_size >= min_block_size || free_size == 0 ) {
111136: 39 4c 24 1c cmp %ecx,0x1c(%esp)
11113a: 0f 86 f7 fe ff ff jbe 111037 <_Heap_Allocate_aligned_with_boundary+0x63>
111140: 85 c9 test %ecx,%ecx
111142: 0f 84 ef fe ff ff je 111037 <_Heap_Allocate_aligned_with_boundary+0x63>
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 ) {
if ( boundary_line < boundary_floor ) {
return 0;
111148: 31 db xor %ebx,%ebx
);
}
}
/* Statistics */
++search_count;
11114a: 47 inc %edi
if ( alloc_begin != 0 ) {
11114b: 85 db test %ebx,%ebx
11114d: 0f 84 ed fe ff ff je 111040 <_Heap_Allocate_aligned_with_boundary+0x6c><== ALWAYS TAKEN
111153: 90 nop
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
111154: 8b 44 24 50 mov 0x50(%esp),%eax
111158: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
11115b: 01 78 4c add %edi,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
11115e: 89 6c 24 0c mov %ebp,0xc(%esp)
111162: 89 5c 24 08 mov %ebx,0x8(%esp)
111166: 89 74 24 04 mov %esi,0x4(%esp)
11116a: 89 04 24 mov %eax,(%esp)
11116d: e8 6a b9 ff ff call 10cadc <_Heap_Block_allocate>
111172: 89 d8 mov %ebx,%eax
111174: e9 e5 fe ff ff jmp 11105e <_Heap_Allocate_aligned_with_boundary+0x8a>
111179: 8d 76 00 lea 0x0(%esi),%esi
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
11117c: 3b 6c 24 5c cmp 0x5c(%esp),%ebp
111180: 77 22 ja 1111a4 <_Heap_Allocate_aligned_with_boundary+0x1d0>
return NULL;
}
if ( alignment == 0 ) {
111182: 8b 4c 24 58 mov 0x58(%esp),%ecx
111186: 85 c9 test %ecx,%ecx
111188: 0f 85 77 fe ff ff jne 111005 <_Heap_Allocate_aligned_with_boundary+0x31>
alignment = page_size;
11118e: 89 54 24 58 mov %edx,0x58(%esp)
111192: e9 6e fe ff ff jmp 111005 <_Heap_Allocate_aligned_with_boundary+0x31>
111197: 90 nop
111198: 8b 74 24 2c mov 0x2c(%esp),%esi <== NOT EXECUTED
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 ) {
if ( boundary_line < boundary_floor ) {
return 0;
11119c: 31 db xor %ebx,%ebx <== NOT EXECUTED
11119e: e9 94 fe ff ff jmp 111037 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
1111a3: 90 nop <== NOT EXECUTED
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
/* Integer overflow occured */
return NULL;
1111a4: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
1111a6: 83 c4 3c add $0x3c,%esp
1111a9: 5b pop %ebx
1111aa: 5e pop %esi
1111ab: 5f pop %edi
1111ac: 5d pop %ebp
1111ad: c3 ret
0011120c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
11120c: 55 push %ebp
11120d: 57 push %edi
11120e: 56 push %esi
11120f: 53 push %ebx
111210: 83 ec 5c sub $0x5c,%esp
111213: 8b 7c 24 70 mov 0x70(%esp),%edi
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
111217: 8b 4f 20 mov 0x20(%edi),%ecx
11121a: 89 4c 24 28 mov %ecx,0x28(%esp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
11121e: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
111225: 00
Heap_Block *extend_last_block = NULL;
111226: c7 44 24 4c 00 00 00 movl $0x0,0x4c(%esp)
11122d: 00
uintptr_t const page_size = heap->page_size;
11122e: 8b 4f 10 mov 0x10(%edi),%ecx
111231: 89 4c 24 24 mov %ecx,0x24(%esp)
uintptr_t const min_block_size = heap->min_block_size;
111235: 8b 47 14 mov 0x14(%edi),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
111238: 8b 4f 30 mov 0x30(%edi),%ecx
11123b: 89 4c 24 2c mov %ecx,0x2c(%esp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
11123f: 8b 6c 24 74 mov 0x74(%esp),%ebp
111243: 03 6c 24 78 add 0x78(%esp),%ebp
111247: 73 0b jae 111254 <_Heap_Extend+0x48>
return false;
111249: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
11124b: 83 c4 5c add $0x5c,%esp
11124e: 5b pop %ebx
11124f: 5e pop %esi
111250: 5f pop %edi
111251: 5d pop %ebp
111252: c3 ret
111253: 90 nop
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
111254: 8d 54 24 4c lea 0x4c(%esp),%edx
111258: 89 54 24 14 mov %edx,0x14(%esp)
11125c: 8d 54 24 48 lea 0x48(%esp),%edx
111260: 89 54 24 10 mov %edx,0x10(%esp)
111264: 89 44 24 0c mov %eax,0xc(%esp)
111268: 8b 4c 24 24 mov 0x24(%esp),%ecx
11126c: 89 4c 24 08 mov %ecx,0x8(%esp)
111270: 8b 44 24 78 mov 0x78(%esp),%eax
111274: 89 44 24 04 mov %eax,0x4(%esp)
111278: 8b 4c 24 74 mov 0x74(%esp),%ecx
11127c: 89 0c 24 mov %ecx,(%esp)
11127f: e8 38 b7 ff ff call 10c9bc <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
111284: 84 c0 test %al,%al
111286: 74 c1 je 111249 <_Heap_Extend+0x3d>
111288: 8b 5c 24 28 mov 0x28(%esp),%ebx
11128c: c7 44 24 34 00 00 00 movl $0x0,0x34(%esp)
111293: 00
111294: c7 44 24 38 00 00 00 movl $0x0,0x38(%esp)
11129b: 00
11129c: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp)
1112a3: 00
1112a4: c7 44 24 30 00 00 00 movl $0x0,0x30(%esp)
1112ab: 00
1112ac: 89 7c 24 3c mov %edi,0x3c(%esp)
1112b0: eb 28 jmp 1112da <_Heap_Extend+0xce>
1112b2: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
1112b4: 39 cd cmp %ecx,%ebp
1112b6: 73 04 jae 1112bc <_Heap_Extend+0xb0>
1112b8: 89 5c 24 38 mov %ebx,0x38(%esp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
1112bc: 3b 4c 24 74 cmp 0x74(%esp),%ecx
1112c0: 74 4f je 111311 <_Heap_Extend+0x105>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
1112c2: 39 4c 24 74 cmp %ecx,0x74(%esp)
1112c6: 76 04 jbe 1112cc <_Heap_Extend+0xc0>
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 )
1112c8: 89 74 24 34 mov %esi,0x34(%esp)
- 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;
1112cc: 8b 5e 04 mov 0x4(%esi),%ebx
1112cf: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1112d2: 01 f3 add %esi,%ebx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
1112d4: 39 5c 24 28 cmp %ebx,0x28(%esp)
1112d8: 74 4b je 111325 <_Heap_Extend+0x119>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
1112da: 3b 5c 24 28 cmp 0x28(%esp),%ebx
1112de: 0f 84 40 01 00 00 je 111424 <_Heap_Extend+0x218>
1112e4: 89 df mov %ebx,%edi
uintptr_t const sub_area_end = start_block->prev_size;
1112e6: 8b 0b mov (%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1112e8: 8d 71 f8 lea -0x8(%ecx),%esi
1112eb: 89 c8 mov %ecx,%eax
1112ed: 31 d2 xor %edx,%edx
1112ef: f7 74 24 24 divl 0x24(%esp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
1112f3: 29 d6 sub %edx,%esi
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
1112f5: 39 4c 24 74 cmp %ecx,0x74(%esp)
1112f9: 73 08 jae 111303 <_Heap_Extend+0xf7>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
1112fb: 39 ef cmp %ebp,%edi
1112fd: 0f 82 46 ff ff ff jb 111249 <_Heap_Extend+0x3d>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
111303: 39 ef cmp %ebp,%edi
111305: 75 ad jne 1112b4 <_Heap_Extend+0xa8>
111307: 89 5c 24 30 mov %ebx,0x30(%esp)
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
11130b: 3b 4c 24 74 cmp 0x74(%esp),%ecx
11130f: 75 b1 jne 1112c2 <_Heap_Extend+0xb6> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
111311: 89 2b mov %ebp,(%ebx)
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 )
111313: 89 74 24 20 mov %esi,0x20(%esp)
- 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;
111317: 8b 5e 04 mov 0x4(%esi),%ebx
11131a: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11131d: 01 f3 add %esi,%ebx
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
11131f: 39 5c 24 28 cmp %ebx,0x28(%esp)
111323: 75 b5 jne 1112da <_Heap_Extend+0xce> <== NEVER TAKEN
111325: 8b 7c 24 3c mov 0x3c(%esp),%edi
if ( extend_area_begin < heap->area_begin ) {
111329: 8b 4c 24 74 mov 0x74(%esp),%ecx
11132d: 3b 4f 18 cmp 0x18(%edi),%ecx
111330: 0f 82 fa 00 00 00 jb 111430 <_Heap_Extend+0x224>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
111336: 3b 6f 1c cmp 0x1c(%edi),%ebp
111339: 76 03 jbe 11133e <_Heap_Extend+0x132>
heap->area_end = extend_area_end;
11133b: 89 6f 1c mov %ebp,0x1c(%edi)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
11133e: 8b 54 24 4c mov 0x4c(%esp),%edx
111342: 8b 44 24 48 mov 0x48(%esp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
111346: 89 d1 mov %edx,%ecx
111348: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
11134a: 89 28 mov %ebp,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
11134c: 89 cb mov %ecx,%ebx
11134e: 83 cb 01 or $0x1,%ebx
111351: 89 58 04 mov %ebx,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
111354: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
111356: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
11135d: 39 47 20 cmp %eax,0x20(%edi)
111360: 0f 86 d2 00 00 00 jbe 111438 <_Heap_Extend+0x22c>
heap->first_block = extend_first_block;
111366: 89 47 20 mov %eax,0x20(%edi)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
111369: 8b 44 24 30 mov 0x30(%esp),%eax
11136d: 85 c0 test %eax,%eax
11136f: 0f 84 d7 00 00 00 je 11144c <_Heap_Extend+0x240>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
111375: 8b 4f 10 mov 0x10(%edi),%ecx
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
111378: 8b 5c 24 74 mov 0x74(%esp),%ebx
11137c: 83 c3 08 add $0x8,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
11137f: 89 d8 mov %ebx,%eax
111381: 31 d2 xor %edx,%edx
111383: f7 f1 div %ecx
if ( remainder != 0 ) {
111385: 85 d2 test %edx,%edx
111387: 74 04 je 11138d <_Heap_Extend+0x181>
return value - remainder + alignment;
111389: 01 cb add %ecx,%ebx
11138b: 29 d3 sub %edx,%ebx
uintptr_t const new_first_block_begin =
11138d: 8d 53 f8 lea -0x8(%ebx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
111390: 8b 4c 24 30 mov 0x30(%esp),%ecx
111394: 8b 01 mov (%ecx),%eax
111396: 89 43 f8 mov %eax,-0x8(%ebx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
111399: 89 c8 mov %ecx,%eax
11139b: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
11139d: 83 c8 01 or $0x1,%eax
1113a0: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
1113a3: 89 f8 mov %edi,%eax
1113a5: e8 46 fe ff ff call 1111f0 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
1113aa: 8b 5c 24 20 mov 0x20(%esp),%ebx
1113ae: 85 db test %ebx,%ebx
1113b0: 0f 84 b6 00 00 00 je 11146c <_Heap_Extend+0x260>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
1113b6: 8d 4d f8 lea -0x8(%ebp),%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
1113b9: 2b 4c 24 20 sub 0x20(%esp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1113bd: 89 c8 mov %ecx,%eax
1113bf: 31 d2 xor %edx,%edx
1113c1: f7 77 10 divl 0x10(%edi)
1113c4: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
1113c6: 8b 54 24 20 mov 0x20(%esp),%edx
1113ca: 8b 42 04 mov 0x4(%edx),%eax
1113cd: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
1113cf: 83 c8 01 or $0x1,%eax
1113d2: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
1113d6: 8b 42 04 mov 0x4(%edx),%eax
1113d9: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
1113dc: 09 c8 or %ecx,%eax
1113de: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
1113e1: 89 f8 mov %edi,%eax
1113e3: e8 08 fe ff ff call 1111f0 <_Heap_Free_block>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
1113e8: 8b 57 24 mov 0x24(%edi),%edx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
1113eb: 8b 42 04 mov 0x4(%edx),%eax
1113ee: 83 e0 01 and $0x1,%eax
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
1113f1: 8b 4f 20 mov 0x20(%edi),%ecx
1113f4: 29 d1 sub %edx,%ecx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
1113f6: 09 c8 or %ecx,%eax
1113f8: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
1113fb: 8b 47 30 mov 0x30(%edi),%eax
1113fe: 2b 44 24 2c sub 0x2c(%esp),%eax
/* Statistics */
stats->size += extended_size;
111402: 01 47 2c add %eax,0x2c(%edi)
if ( extended_size_ptr != NULL )
111405: 8b 54 24 7c mov 0x7c(%esp),%edx
111409: 85 d2 test %edx,%edx
11140b: 0f 84 a3 00 00 00 je 1114b4 <_Heap_Extend+0x2a8> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111411: 8b 4c 24 7c mov 0x7c(%esp),%ecx
111415: 89 01 mov %eax,(%ecx)
return true;
111417: b0 01 mov $0x1,%al
}
111419: 83 c4 5c add $0x5c,%esp
11141c: 5b pop %ebx
11141d: 5e pop %esi
11141e: 5f pop %edi
11141f: 5d pop %ebp
111420: c3 ret
111421: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111424: 8b 4c 24 3c mov 0x3c(%esp),%ecx
111428: 8b 79 18 mov 0x18(%ecx),%edi
11142b: e9 b6 fe ff ff jmp 1112e6 <_Heap_Extend+0xda>
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
111430: 89 4f 18 mov %ecx,0x18(%edi)
111433: e9 06 ff ff ff jmp 11133e <_Heap_Extend+0x132>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
111438: 39 57 24 cmp %edx,0x24(%edi)
11143b: 0f 83 28 ff ff ff jae 111369 <_Heap_Extend+0x15d>
heap->last_block = extend_last_block;
111441: 89 57 24 mov %edx,0x24(%edi)
111444: e9 20 ff ff ff jmp 111369 <_Heap_Extend+0x15d>
111449: 8d 76 00 lea 0x0(%esi),%esi
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
11144c: 8b 74 24 38 mov 0x38(%esp),%esi
111450: 85 f6 test %esi,%esi
111452: 0f 84 52 ff ff ff je 1113aa <_Heap_Extend+0x19e>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
111458: 8b 44 24 38 mov 0x38(%esp),%eax
11145c: 29 d0 sub %edx,%eax
11145e: 83 c8 01 or $0x1,%eax
111461: 89 42 04 mov %eax,0x4(%edx)
111464: e9 41 ff ff ff jmp 1113aa <_Heap_Extend+0x19e>
111469: 8d 76 00 lea 0x0(%esi),%esi
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
11146c: 8b 4c 24 34 mov 0x34(%esp),%ecx
111470: 85 c9 test %ecx,%ecx
111472: 74 23 je 111497 <_Heap_Extend+0x28b>
_Heap_Link_above(
111474: 8b 4c 24 4c mov 0x4c(%esp),%ecx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111478: 8b 54 24 34 mov 0x34(%esp),%edx
11147c: 8b 42 04 mov 0x4(%edx),%eax
11147f: 83 e0 01 and $0x1,%eax
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
111482: 8b 54 24 48 mov 0x48(%esp),%edx
111486: 2b 54 24 34 sub 0x34(%esp),%edx
block->size_and_flag = size | flag;
11148a: 09 d0 or %edx,%eax
11148c: 8b 54 24 34 mov 0x34(%esp),%edx
111490: 89 42 04 mov %eax,0x4(%edx)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
111493: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111497: 83 7c 24 30 00 cmpl $0x0,0x30(%esp)
11149c: 0f 85 46 ff ff ff jne 1113e8 <_Heap_Extend+0x1dc>
_Heap_Free_block( heap, extend_first_block );
1114a2: 8b 54 24 48 mov 0x48(%esp),%edx
1114a6: 89 f8 mov %edi,%eax
1114a8: e8 43 fd ff ff call 1111f0 <_Heap_Free_block>
1114ad: e9 36 ff ff ff jmp 1113e8 <_Heap_Extend+0x1dc>
1114b2: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
1114b4: b0 01 mov $0x1,%al <== NOT EXECUTED
1114b6: e9 90 fd ff ff jmp 11124b <_Heap_Extend+0x3f> <== NOT EXECUTED
001111b0 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
1111b0: 55 push %ebp
1111b1: 57 push %edi
1111b2: 56 push %esi
1111b3: 53 push %ebx
1111b4: 83 ec 0c sub $0xc,%esp
1111b7: 8b 4c 24 20 mov 0x20(%esp),%ecx
1111bb: 8b 44 24 24 mov 0x24(%esp),%eax
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
1111bf: 85 c0 test %eax,%eax
1111c1: 0f 84 a1 00 00 00 je 111268 <_Heap_Free+0xb8>
1111c7: 8d 58 f8 lea -0x8(%eax),%ebx
1111ca: 31 d2 xor %edx,%edx
1111cc: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
1111cf: 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
1111d1: 8b 41 20 mov 0x20(%ecx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1111d4: 39 c3 cmp %eax,%ebx
1111d6: 72 1c jb 1111f4 <_Heap_Free+0x44>
1111d8: 8b 71 24 mov 0x24(%ecx),%esi
1111db: 39 f3 cmp %esi,%ebx
1111dd: 77 15 ja 1111f4 <_Heap_Free+0x44>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1111df: 8b 53 04 mov 0x4(%ebx),%edx
1111e2: 89 14 24 mov %edx,(%esp)
- 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;
1111e5: 89 d7 mov %edx,%edi
1111e7: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1111ea: 8d 14 1f lea (%edi,%ebx,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
1111ed: 39 d0 cmp %edx,%eax
1111ef: 76 0f jbe 111200 <_Heap_Free+0x50> <== ALWAYS TAKEN
1111f1: 8d 76 00 lea 0x0(%esi),%esi
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
1111f4: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1111f6: 83 c4 0c add $0xc,%esp
1111f9: 5b pop %ebx
1111fa: 5e pop %esi
1111fb: 5f pop %edi
1111fc: 5d pop %ebp
1111fd: c3 ret
1111fe: 66 90 xchg %ax,%ax
111200: 39 d6 cmp %edx,%esi
111202: 72 f0 jb 1111f4 <_Heap_Free+0x44> <== NEVER TAKEN
111204: 8b 6a 04 mov 0x4(%edx),%ebp
111207: 89 6c 24 04 mov %ebp,0x4(%esp)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
11120b: 83 e5 01 and $0x1,%ebp
11120e: 74 e4 je 1111f4 <_Heap_Free+0x44> <== 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;
111210: 8b 6c 24 04 mov 0x4(%esp),%ebp
111214: 83 e5 fe and $0xfffffffe,%ebp
111217: 89 6c 24 04 mov %ebp,0x4(%esp)
return true;
}
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 ));
11121b: 39 d6 cmp %edx,%esi
11121d: 74 53 je 111272 <_Heap_Free+0xc2>
11121f: f6 44 2a 04 01 testb $0x1,0x4(%edx,%ebp,1)
111224: 75 4c jne 111272 <_Heap_Free+0xc2>
if ( !_Heap_Is_prev_used( block ) ) {
111226: f6 04 24 01 testb $0x1,(%esp)
11122a: 0f 84 df 00 00 00 je 11130f <_Heap_Free+0x15f>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
111230: 8b 6c 24 04 mov 0x4(%esp),%ebp
111234: 01 fd add %edi,%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111236: 8b 72 08 mov 0x8(%edx),%esi
111239: 8b 42 0c mov 0xc(%edx),%eax
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
11123c: 89 73 08 mov %esi,0x8(%ebx)
new_block->prev = prev;
11123f: 89 43 0c mov %eax,0xc(%ebx)
next->prev = new_block;
111242: 89 5e 0c mov %ebx,0xc(%esi)
prev->next = new_block;
111245: 89 58 08 mov %ebx,0x8(%eax)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111248: 89 e8 mov %ebp,%eax
11124a: 83 c8 01 or $0x1,%eax
11124d: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
111250: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
111254: ff 49 40 decl 0x40(%ecx)
++stats->frees;
111257: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
11125a: 01 79 30 add %edi,0x30(%ecx)
return( true );
11125d: b0 01 mov $0x1,%al
}
11125f: 83 c4 0c add $0xc,%esp
111262: 5b pop %ebx
111263: 5e pop %esi
111264: 5f pop %edi
111265: 5d pop %ebp
111266: c3 ret
111267: 90 nop
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
111268: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
11126a: 83 c4 0c add $0xc,%esp
11126d: 5b pop %ebx
11126e: 5e pop %esi
11126f: 5f pop %edi
111270: 5d pop %ebp
111271: c3 ret
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 ));
if ( !_Heap_Is_prev_used( block ) ) {
111272: f6 04 24 01 testb $0x1,(%esp)
111276: 75 4d jne 1112c5 <_Heap_Free+0x115>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
111278: c6 44 24 0b 00 movb $0x0,0xb(%esp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
11127d: 8b 2b mov (%ebx),%ebp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11127f: 29 eb sub %ebp,%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;
111281: 39 d8 cmp %ebx,%eax
111283: 0f 87 6b ff ff ff ja 1111f4 <_Heap_Free+0x44> <== NEVER TAKEN
111289: 39 de cmp %ebx,%esi
11128b: 0f 82 63 ff ff ff jb 1111f4 <_Heap_Free+0x44> <== 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) ) {
111291: f6 43 04 01 testb $0x1,0x4(%ebx)
111295: 0f 84 59 ff ff ff je 1111f4 <_Heap_Free+0x44> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
11129b: 01 fd add %edi,%ebp
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
11129d: 80 7c 24 0b 00 cmpb $0x0,0xb(%esp)
1112a2: 74 58 je 1112fc <_Heap_Free+0x14c>
uintptr_t const size = block_size + prev_size + next_block_size;
1112a4: 03 6c 24 04 add 0x4(%esp),%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1112a8: 8b 42 08 mov 0x8(%edx),%eax
1112ab: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
1112ae: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
1112b1: 89 50 0c mov %edx,0xc(%eax)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
1112b4: ff 49 38 decl 0x38(%ecx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1112b7: 89 e8 mov %ebp,%eax
1112b9: 83 c8 01 or $0x1,%eax
1112bc: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
1112bf: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
1112c3: eb 8f jmp 111254 <_Heap_Free+0xa4>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
1112c5: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
1112c8: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
1112cb: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
1112ce: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
1112d1: 89 58 0c mov %ebx,0xc(%eax)
next_block->prev_size = size;
} 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;
1112d4: 89 f8 mov %edi,%eax
1112d6: 83 c8 01 or $0x1,%eax
1112d9: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1112dc: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
1112e0: 89 3a mov %edi,(%edx)
/* Statistics */
++stats->free_blocks;
1112e2: 8b 41 38 mov 0x38(%ecx),%eax
1112e5: 40 inc %eax
1112e6: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
1112e9: 3b 41 3c cmp 0x3c(%ecx),%eax
1112ec: 0f 86 62 ff ff ff jbe 111254 <_Heap_Free+0xa4>
stats->max_free_blocks = stats->free_blocks;
1112f2: 89 41 3c mov %eax,0x3c(%ecx)
1112f5: e9 5a ff ff ff jmp 111254 <_Heap_Free+0xa4>
1112fa: 66 90 xchg %ax,%ax
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;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1112fc: 89 e8 mov %ebp,%eax
1112fe: 83 c8 01 or $0x1,%eax
111301: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111304: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
111308: 89 2a mov %ebp,(%edx)
11130a: e9 45 ff ff ff jmp 111254 <_Heap_Free+0xa4>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
11130f: c6 44 24 0b 01 movb $0x1,0xb(%esp)
111314: e9 64 ff ff ff jmp 11127d <_Heap_Free+0xcd>
00115330 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
115330: 55 push %ebp
115331: 57 push %edi
115332: 56 push %esi
115333: 53 push %ebx
115334: 8b 6c 24 14 mov 0x14(%esp),%ebp
115338: 8b 7c 24 18 mov 0x18(%esp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
11533c: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
115342: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
115349: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
115350: 8b 55 08 mov 0x8(%ebp),%edx
for(the_block = _Heap_Free_list_first(the_heap);
115353: 39 d5 cmp %edx,%ebp
115355: 74 30 je 115387 <_Heap_Get_free_information+0x57><== NEVER TAKEN
115357: bb 01 00 00 00 mov $0x1,%ebx
11535c: 31 f6 xor %esi,%esi
11535e: 31 c9 xor %ecx,%ecx
115360: eb 07 jmp 115369 <_Heap_Get_free_information+0x39>
115362: 66 90 xchg %ax,%ax
115364: 8b 77 04 mov 0x4(%edi),%esi
115367: 89 c3 mov %eax,%ebx
- 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;
115369: 8b 42 04 mov 0x4(%edx),%eax
11536c: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
11536f: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
115371: 39 f0 cmp %esi,%eax
115373: 76 03 jbe 115378 <_Heap_Get_free_information+0x48>
info->largest = the_size;
115375: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
115378: 8b 52 08 mov 0x8(%edx),%edx
11537b: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
11537e: 39 d5 cmp %edx,%ebp
115380: 75 e2 jne 115364 <_Heap_Get_free_information+0x34>
115382: 89 1f mov %ebx,(%edi)
115384: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115387: 5b pop %ebx
115388: 5e pop %esi
115389: 5f pop %edi
11538a: 5d pop %ebp
11538b: c3 ret
0010e818 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
10e818: 55 push %ebp
10e819: 57 push %edi
10e81a: 56 push %esi
10e81b: 53 push %ebx
10e81c: 83 ec 1c sub $0x1c,%esp
10e81f: 8b 5c 24 30 mov 0x30(%esp),%ebx
10e823: 8b 7c 24 34 mov 0x34(%esp),%edi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e827: 8b 44 24 38 mov 0x38(%esp),%eax
10e82b: 85 c0 test %eax,%eax
10e82d: 0f 84 9f 00 00 00 je 10e8d2 <_Heap_Greedy_allocate+0xba>
10e833: 31 ed xor %ebp,%ebp
10e835: 31 f6 xor %esi,%esi
10e837: 90 nop
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
10e838: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10e83f: 00
10e840: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10e847: 00
10e848: 8b 04 af mov (%edi,%ebp,4),%eax
10e84b: 89 44 24 04 mov %eax,0x4(%esp)
10e84f: 89 1c 24 mov %ebx,(%esp)
10e852: e8 59 6d 00 00 call 1155b0 <_Heap_Allocate_aligned_with_boundary>
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
10e857: 85 c0 test %eax,%eax
10e859: 74 0f je 10e86a <_Heap_Greedy_allocate+0x52><== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10e85b: 8d 48 f8 lea -0x8(%eax),%ecx
10e85e: 31 d2 xor %edx,%edx
10e860: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10e863: 29 d1 sub %edx,%ecx
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
10e865: 89 71 08 mov %esi,0x8(%ecx)
10e868: 89 ce mov %ecx,%esi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e86a: 45 inc %ebp
10e86b: 3b 6c 24 38 cmp 0x38(%esp),%ebp
10e86f: 75 c7 jne 10e838 <_Heap_Greedy_allocate+0x20>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e871: 8b 7b 08 mov 0x8(%ebx),%edi
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e874: 39 fb cmp %edi,%ebx
10e876: 74 5e je 10e8d6 <_Heap_Greedy_allocate+0xbe><== NEVER TAKEN
10e878: 31 ed xor %ebp,%ebp
10e87a: eb 02 jmp 10e87e <_Heap_Greedy_allocate+0x66>
10e87c: 89 c7 mov %eax,%edi
- 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;
10e87e: 8b 47 04 mov 0x4(%edi),%eax
10e881: 83 e0 fe and $0xfffffffe,%eax
_Heap_Block_allocate(
10e884: 83 e8 08 sub $0x8,%eax
10e887: 89 44 24 0c mov %eax,0xc(%esp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e88b: 8d 47 08 lea 0x8(%edi),%eax
10e88e: 89 44 24 08 mov %eax,0x8(%esp)
10e892: 89 7c 24 04 mov %edi,0x4(%esp)
10e896: 89 1c 24 mov %ebx,(%esp)
10e899: e8 ce 02 00 00 call 10eb6c <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
10e89e: 89 6f 08 mov %ebp,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e8a1: 8b 43 08 mov 0x8(%ebx),%eax
10e8a4: 89 fd mov %edi,%ebp
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e8a6: 39 c3 cmp %eax,%ebx
10e8a8: 75 d2 jne 10e87c <_Heap_Greedy_allocate+0x64>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e8aa: 85 f6 test %esi,%esi
10e8ac: 74 1a je 10e8c8 <_Heap_Greedy_allocate+0xb0>
10e8ae: 66 90 xchg %ax,%ax
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e8b0: 8b 6e 08 mov 0x8(%esi),%ebp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e8b3: 83 c6 08 add $0x8,%esi
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e8b6: 89 74 24 04 mov %esi,0x4(%esp)
10e8ba: 89 1c 24 mov %ebx,(%esp)
10e8bd: e8 ca 6e 00 00 call 11578c <_Heap_Free>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e8c2: 89 ee mov %ebp,%esi
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e8c4: 85 f6 test %esi,%esi
10e8c6: 75 e8 jne 10e8b0 <_Heap_Greedy_allocate+0x98>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
10e8c8: 89 f8 mov %edi,%eax
10e8ca: 83 c4 1c add $0x1c,%esp
10e8cd: 5b pop %ebx
10e8ce: 5e pop %esi
10e8cf: 5f pop %edi
10e8d0: 5d pop %ebp
10e8d1: c3 ret
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
10e8d2: 31 f6 xor %esi,%esi
10e8d4: eb 9b jmp 10e871 <_Heap_Greedy_allocate+0x59>
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e8d6: 31 ff xor %edi,%edi <== NOT EXECUTED
10e8d8: eb ea jmp 10e8c4 <_Heap_Greedy_allocate+0xac><== NOT EXECUTED
0010e8dc <_Heap_Greedy_free>:
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
10e8dc: 56 push %esi
10e8dd: 53 push %ebx
10e8de: 83 ec 14 sub $0x14,%esp
10e8e1: 8b 74 24 20 mov 0x20(%esp),%esi
10e8e5: 8b 44 24 24 mov 0x24(%esp),%eax
while ( blocks != NULL ) {
10e8e9: 85 c0 test %eax,%eax
10e8eb: 74 1b je 10e908 <_Heap_Greedy_free+0x2c><== NEVER TAKEN
10e8ed: 8d 76 00 lea 0x0(%esi),%esi
Heap_Block *current = blocks;
blocks = blocks->next;
10e8f0: 8b 58 08 mov 0x8(%eax),%ebx
10e8f3: 83 c0 08 add $0x8,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e8f6: 89 44 24 04 mov %eax,0x4(%esp)
10e8fa: 89 34 24 mov %esi,(%esp)
10e8fd: e8 8a 6e 00 00 call 11578c <_Heap_Free>
)
{
while ( blocks != NULL ) {
Heap_Block *current = blocks;
blocks = blocks->next;
10e902: 89 d8 mov %ebx,%eax
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
while ( blocks != NULL ) {
10e904: 85 db test %ebx,%ebx
10e906: 75 e8 jne 10e8f0 <_Heap_Greedy_free+0x14>
Heap_Block *current = blocks;
blocks = blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
}
10e908: 83 c4 14 add $0x14,%esp
10e90b: 5b pop %ebx
10e90c: 5e pop %esi
10e90d: c3 ret
001153e0 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
1153e0: 55 push %ebp
1153e1: 57 push %edi
1153e2: 56 push %esi
1153e3: 53 push %ebx
1153e4: 83 ec 1c sub $0x1c,%esp
1153e7: 8b 54 24 30 mov 0x30(%esp),%edx
1153eb: 8b 7c 24 34 mov 0x34(%esp),%edi
1153ef: 8b 74 24 38 mov 0x38(%esp),%esi
Heap_Block *current = heap->first_block;
1153f3: 8b 42 20 mov 0x20(%edx),%eax
Heap_Block *end = heap->last_block;
1153f6: 8b 5a 24 mov 0x24(%edx),%ebx
bool stop = false;
while ( !stop && current != end ) {
1153f9: 39 d8 cmp %ebx,%eax
1153fb: 75 09 jne 115406 <_Heap_Iterate+0x26> <== ALWAYS TAKEN
1153fd: eb 2b jmp 11542a <_Heap_Iterate+0x4a> <== NOT EXECUTED
1153ff: 90 nop <== NOT EXECUTED
115400: 89 e8 mov %ebp,%eax
115402: 39 eb cmp %ebp,%ebx
115404: 74 24 je 11542a <_Heap_Iterate+0x4a>
115406: 8b 50 04 mov 0x4(%eax),%edx
115409: 83 e2 fe and $0xfffffffe,%edx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11540c: 8d 2c 10 lea (%eax,%edx,1),%ebp
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
11540f: 89 74 24 0c mov %esi,0xc(%esp)
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;
115413: 8b 4d 04 mov 0x4(%ebp),%ecx
115416: 83 e1 01 and $0x1,%ecx
115419: 89 4c 24 08 mov %ecx,0x8(%esp)
11541d: 89 54 24 04 mov %edx,0x4(%esp)
115421: 89 04 24 mov %eax,(%esp)
115424: ff d7 call *%edi
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
115426: 84 c0 test %al,%al
115428: 74 d6 je 115400 <_Heap_Iterate+0x20> <== ALWAYS TAKEN
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
11542a: 83 c4 1c add $0x1c,%esp
11542d: 5b pop %ebx
11542e: 5e pop %esi
11542f: 5f pop %edi
115430: 5d pop %ebp
115431: c3 ret
00111428 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
111428: 56 push %esi
111429: 53 push %ebx
11142a: 8b 5c 24 0c mov 0xc(%esp),%ebx
11142e: 8b 74 24 10 mov 0x10(%esp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111432: 8d 4e f8 lea -0x8(%esi),%ecx
111435: 89 f0 mov %esi,%eax
111437: 31 d2 xor %edx,%edx
111439: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11143c: 29 d1 sub %edx,%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
11143e: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111441: 39 c1 cmp %eax,%ecx
111443: 72 07 jb 11144c <_Heap_Size_of_alloc_area+0x24>
111445: 8b 53 24 mov 0x24(%ebx),%edx
111448: 39 d1 cmp %edx,%ecx
11144a: 76 08 jbe 111454 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
11144c: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
11144e: 5b pop %ebx
11144f: 5e pop %esi
111450: c3 ret
111451: 8d 76 00 lea 0x0(%esi),%esi
- 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;
111454: 8b 59 04 mov 0x4(%ecx),%ebx
111457: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11145a: 01 d9 add %ebx,%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;
11145c: 39 c8 cmp %ecx,%eax
11145e: 77 ec ja 11144c <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
111460: 39 ca cmp %ecx,%edx
111462: 72 e8 jb 11144c <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
111464: f6 41 04 01 testb $0x1,0x4(%ecx)
111468: 74 e2 je 11144c <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11146a: 29 f1 sub %esi,%ecx
11146c: 8d 51 04 lea 0x4(%ecx),%edx
11146f: 8b 44 24 14 mov 0x14(%esp),%eax
111473: 89 10 mov %edx,(%eax)
return true;
111475: b0 01 mov $0x1,%al
}
111477: 5b pop %ebx
111478: 5e pop %esi
111479: c3 ret
0010d4bc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d4bc: 55 push %ebp
10d4bd: 57 push %edi
10d4be: 56 push %esi
10d4bf: 53 push %ebx
10d4c0: 83 ec 5c sub $0x5c,%esp
10d4c3: 8b 5c 24 70 mov 0x70(%esp),%ebx
uintptr_t const page_size = heap->page_size;
10d4c7: 8b 4b 10 mov 0x10(%ebx),%ecx
10d4ca: 89 4c 24 30 mov %ecx,0x30(%esp)
uintptr_t const min_block_size = heap->min_block_size;
10d4ce: 8b 43 14 mov 0x14(%ebx),%eax
10d4d1: 89 44 24 38 mov %eax,0x38(%esp)
Heap_Block *const first_block = heap->first_block;
10d4d5: 8b 4b 20 mov 0x20(%ebx),%ecx
10d4d8: 89 4c 24 34 mov %ecx,0x34(%esp)
Heap_Block *const last_block = heap->last_block;
10d4dc: 8b 4b 24 mov 0x24(%ebx),%ecx
10d4df: 89 4c 24 3c mov %ecx,0x3c(%esp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d4e3: 80 7c 24 78 00 cmpb $0x0,0x78(%esp)
10d4e8: 74 1a je 10d504 <_Heap_Walk+0x48>
10d4ea: bd 74 d4 10 00 mov $0x10d474,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d4ef: 83 3d 00 2a 13 00 03 cmpl $0x3,0x132a00
10d4f6: 74 1a je 10d512 <_Heap_Walk+0x56> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d4f8: b0 01 mov $0x1,%al
}
10d4fa: 83 c4 5c add $0x5c,%esp
10d4fd: 5b pop %ebx
10d4fe: 5e pop %esi
10d4ff: 5f pop %edi
10d500: 5d pop %ebp
10d501: c3 ret
10d502: 66 90 xchg %ax,%ax
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d504: bd 70 d4 10 00 mov $0x10d470,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d509: 83 3d 00 2a 13 00 03 cmpl $0x3,0x132a00
10d510: 75 e6 jne 10d4f8 <_Heap_Walk+0x3c>
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)(
10d512: 8b 43 0c mov 0xc(%ebx),%eax
10d515: 89 44 24 28 mov %eax,0x28(%esp)
10d519: 8b 43 08 mov 0x8(%ebx),%eax
10d51c: 89 44 24 24 mov %eax,0x24(%esp)
10d520: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10d524: 89 4c 24 20 mov %ecx,0x20(%esp)
10d528: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d52c: 89 4c 24 1c mov %ecx,0x1c(%esp)
10d530: 8b 43 1c mov 0x1c(%ebx),%eax
10d533: 89 44 24 18 mov %eax,0x18(%esp)
10d537: 8b 43 18 mov 0x18(%ebx),%eax
10d53a: 89 44 24 14 mov %eax,0x14(%esp)
10d53e: 8b 44 24 38 mov 0x38(%esp),%eax
10d542: 89 44 24 10 mov %eax,0x10(%esp)
10d546: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d54a: 89 4c 24 0c mov %ecx,0xc(%esp)
10d54e: c7 44 24 08 50 28 12 movl $0x122850,0x8(%esp)
10d555: 00
10d556: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d55d: 00
10d55e: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d562: 89 0c 24 mov %ecx,(%esp)
10d565: ff d5 call *%ebp
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d567: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d56b: 85 c9 test %ecx,%ecx
10d56d: 0f 84 a1 00 00 00 je 10d614 <_Heap_Walk+0x158>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d573: f6 44 24 30 03 testb $0x3,0x30(%esp)
10d578: 0f 85 b6 00 00 00 jne 10d634 <_Heap_Walk+0x178>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d57e: 8b 44 24 38 mov 0x38(%esp),%eax
10d582: 31 d2 xor %edx,%edx
10d584: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d588: 85 d2 test %edx,%edx
10d58a: 0f 85 cc 00 00 00 jne 10d65c <_Heap_Walk+0x1a0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d590: 8b 44 24 34 mov 0x34(%esp),%eax
10d594: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d597: 31 d2 xor %edx,%edx
10d599: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if (
10d59d: 85 d2 test %edx,%edx
10d59f: 0f 85 df 00 00 00 jne 10d684 <_Heap_Walk+0x1c8>
block = next_block;
} while ( block != first_block );
return true;
}
10d5a5: 8b 44 24 34 mov 0x34(%esp),%eax
10d5a9: 8b 48 04 mov 0x4(%eax),%ecx
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d5ac: f6 c1 01 test $0x1,%cl
10d5af: 0f 84 f7 00 00 00 je 10d6ac <_Heap_Walk+0x1f0>
- 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;
10d5b5: 8b 54 24 3c mov 0x3c(%esp),%edx
10d5b9: 8b 42 04 mov 0x4(%edx),%eax
10d5bc: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d5bf: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d5c1: f6 40 04 01 testb $0x1,0x4(%eax)
10d5c5: 74 2d je 10d5f4 <_Heap_Walk+0x138>
);
return false;
}
if (
10d5c7: 39 44 24 34 cmp %eax,0x34(%esp)
10d5cb: 0f 84 fb 00 00 00 je 10d6cc <_Heap_Walk+0x210>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d5d1: c7 44 24 08 6c 29 12 movl $0x12296c,0x8(%esp)
10d5d8: 00
10d5d9: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d5e0: 00
10d5e1: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d5e5: 89 0c 24 mov %ecx,(%esp)
10d5e8: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d5ea: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d5ec: 83 c4 5c add $0x5c,%esp
10d5ef: 5b pop %ebx
10d5f0: 5e pop %esi
10d5f1: 5f pop %edi
10d5f2: 5d pop %ebp
10d5f3: c3 ret
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d5f4: c7 44 24 08 05 28 12 movl $0x122805,0x8(%esp)
10d5fb: 00
10d5fc: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d603: 00
10d604: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d608: 89 0c 24 mov %ecx,(%esp)
10d60b: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d60d: 31 c0 xor %eax,%eax
10d60f: eb db jmp 10d5ec <_Heap_Walk+0x130>
10d611: 8d 76 00 lea 0x0(%esi),%esi
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d614: c7 44 24 08 d4 27 12 movl $0x1227d4,0x8(%esp)
10d61b: 00
10d61c: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d623: 00
10d624: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d628: 89 0c 24 mov %ecx,(%esp)
10d62b: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d62d: 31 c0 xor %eax,%eax
10d62f: eb bb jmp 10d5ec <_Heap_Walk+0x130>
10d631: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d634: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d638: 89 4c 24 0c mov %ecx,0xc(%esp)
10d63c: c7 44 24 08 e7 27 12 movl $0x1227e7,0x8(%esp)
10d643: 00
10d644: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d64b: 00
10d64c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d650: 89 0c 24 mov %ecx,(%esp)
10d653: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d655: 31 c0 xor %eax,%eax
10d657: eb 93 jmp 10d5ec <_Heap_Walk+0x130>
10d659: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d65c: 8b 44 24 38 mov 0x38(%esp),%eax
10d660: 89 44 24 0c mov %eax,0xc(%esp)
10d664: c7 44 24 08 e4 28 12 movl $0x1228e4,0x8(%esp)
10d66b: 00
10d66c: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d673: 00
10d674: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d678: 89 0c 24 mov %ecx,(%esp)
10d67b: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d67d: 31 c0 xor %eax,%eax
10d67f: e9 68 ff ff ff jmp 10d5ec <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d684: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d688: 89 4c 24 0c mov %ecx,0xc(%esp)
10d68c: c7 44 24 08 08 29 12 movl $0x122908,0x8(%esp)
10d693: 00
10d694: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d69b: 00
10d69c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6a0: 89 0c 24 mov %ecx,(%esp)
10d6a3: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6a5: 31 c0 xor %eax,%eax
10d6a7: e9 40 ff ff ff jmp 10d5ec <_Heap_Walk+0x130>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d6ac: c7 44 24 08 3c 29 12 movl $0x12293c,0x8(%esp)
10d6b3: 00
10d6b4: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6bb: 00
10d6bc: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6c0: 89 0c 24 mov %ecx,(%esp)
10d6c3: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6c5: 31 c0 xor %eax,%eax
10d6c7: e9 20 ff ff ff jmp 10d5ec <_Heap_Walk+0x130>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d6cc: 8b 43 10 mov 0x10(%ebx),%eax
10d6cf: 89 44 24 40 mov %eax,0x40(%esp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d6d3: 8b 73 08 mov 0x8(%ebx),%esi
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 ) {
10d6d6: 39 f3 cmp %esi,%ebx
10d6d8: 0f 84 f3 03 00 00 je 10dad1 <_Heap_Walk+0x615>
block = next_block;
} while ( block != first_block );
return true;
}
10d6de: 8b 43 20 mov 0x20(%ebx),%eax
10d6e1: 89 44 24 48 mov %eax,0x48(%esp)
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;
10d6e5: 39 f0 cmp %esi,%eax
10d6e7: 76 27 jbe 10d710 <_Heap_Walk+0x254> <== ALWAYS TAKEN
10d6e9: 8d 76 00 lea 0x0(%esi),%esi
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 ) ) {
(*printer)(
10d6ec: 89 74 24 0c mov %esi,0xc(%esp)
10d6f0: c7 44 24 08 9c 29 12 movl $0x12299c,0x8(%esp)
10d6f7: 00
10d6f8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6ff: 00
10d700: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d704: 89 0c 24 mov %ecx,(%esp)
10d707: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d709: 31 c0 xor %eax,%eax
10d70b: e9 dc fe ff ff jmp 10d5ec <_Heap_Walk+0x130>
10d710: 8b 53 24 mov 0x24(%ebx),%edx
10d713: 89 54 24 44 mov %edx,0x44(%esp)
10d717: 39 f2 cmp %esi,%edx
10d719: 72 d1 jb 10d6ec <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d71b: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d71e: 31 d2 xor %edx,%edx
10d720: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d724: 85 d2 test %edx,%edx
10d726: 0f 85 a2 00 00 00 jne 10d7ce <_Heap_Walk+0x312> <== 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;
10d72c: 8b 46 04 mov 0x4(%esi),%eax
10d72f: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d732: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d737: 75 71 jne 10d7aa <_Heap_Walk+0x2ee> <== NEVER TAKEN
10d739: 89 da mov %ebx,%edx
10d73b: 89 f7 mov %esi,%edi
10d73d: 89 4c 24 4c mov %ecx,0x4c(%esp)
10d741: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d745: eb 34 jmp 10d77b <_Heap_Walk+0x2bf>
10d747: 90 nop
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d748: 8b 76 08 mov 0x8(%esi),%esi
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 ) {
10d74b: 39 f3 cmp %esi,%ebx
10d74d: 0f 84 9f 00 00 00 je 10d7f2 <_Heap_Walk+0x336>
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;
10d753: 39 ce cmp %ecx,%esi
10d755: 72 95 jb 10d6ec <_Heap_Walk+0x230>
10d757: 3b 74 24 44 cmp 0x44(%esp),%esi
10d75b: 77 8f ja 10d6ec <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d75d: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d760: 31 d2 xor %edx,%edx
10d762: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d766: 85 d2 test %edx,%edx
10d768: 75 64 jne 10d7ce <_Heap_Walk+0x312>
10d76a: 89 fa mov %edi,%edx
- 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;
10d76c: 8b 46 04 mov 0x4(%esi),%eax
10d76f: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d772: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d777: 75 31 jne 10d7aa <_Heap_Walk+0x2ee>
10d779: 89 f7 mov %esi,%edi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d77b: 8b 46 0c mov 0xc(%esi),%eax
10d77e: 39 d0 cmp %edx,%eax
10d780: 74 c6 je 10d748 <_Heap_Walk+0x28c>
(*printer)(
10d782: 89 44 24 10 mov %eax,0x10(%esp)
10d786: 89 74 24 0c mov %esi,0xc(%esp)
10d78a: c7 44 24 08 ec 29 12 movl $0x1229ec,0x8(%esp)
10d791: 00
10d792: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d799: 00
10d79a: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d79e: 89 0c 24 mov %ecx,(%esp)
10d7a1: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d7a3: 31 c0 xor %eax,%eax
10d7a5: e9 42 fe ff ff jmp 10d5ec <_Heap_Walk+0x130>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d7aa: 89 74 24 0c mov %esi,0xc(%esp)
10d7ae: c7 44 24 08 1a 28 12 movl $0x12281a,0x8(%esp)
10d7b5: 00
10d7b6: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d7bd: 00
10d7be: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d7c2: 89 0c 24 mov %ecx,(%esp)
10d7c5: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d7c7: 31 c0 xor %eax,%eax
10d7c9: e9 1e fe ff ff jmp 10d5ec <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d7ce: 89 74 24 0c mov %esi,0xc(%esp)
10d7d2: c7 44 24 08 bc 29 12 movl $0x1229bc,0x8(%esp)
10d7d9: 00
10d7da: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d7e1: 00
10d7e2: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d7e6: 89 0c 24 mov %ecx,(%esp)
10d7e9: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d7eb: 31 c0 xor %eax,%eax
10d7ed: e9 fa fd ff ff jmp 10d5ec <_Heap_Walk+0x130>
10d7f2: 8b 4c 24 4c mov 0x4c(%esp),%ecx
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d7f6: 8b 74 24 34 mov 0x34(%esp),%esi
10d7fa: 89 6c 24 44 mov %ebp,0x44(%esp)
10d7fe: 8b 44 24 48 mov 0x48(%esp),%eax
10d802: 89 dd mov %ebx,%ebp
10d804: 89 cb mov %ecx,%ebx
10d806: 83 e3 fe and $0xfffffffe,%ebx
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;
10d809: 83 e1 01 and $0x1,%ecx
10d80c: 89 4c 24 40 mov %ecx,0x40(%esp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d810: 8d 3c 33 lea (%ebx,%esi,1),%edi
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;
10d813: 39 f8 cmp %edi,%eax
10d815: 76 2d jbe 10d844 <_Heap_Walk+0x388> <== ALWAYS TAKEN
10d817: 8b 6c 24 44 mov 0x44(%esp),%ebp
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d81b: 89 7c 24 10 mov %edi,0x10(%esp)
10d81f: 89 74 24 0c mov %esi,0xc(%esp)
10d823: c7 44 24 08 20 2a 12 movl $0x122a20,0x8(%esp)
10d82a: 00
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d82b: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d832: 00
10d833: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d837: 89 0c 24 mov %ecx,(%esp)
10d83a: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d83c: 31 c0 xor %eax,%eax
10d83e: e9 a9 fd ff ff jmp 10d5ec <_Heap_Walk+0x130>
10d843: 90 nop
10d844: 39 7d 24 cmp %edi,0x24(%ebp)
10d847: 72 ce jb 10d817 <_Heap_Walk+0x35b>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10d849: 3b 74 24 3c cmp 0x3c(%esp),%esi
10d84d: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d850: 89 d8 mov %ebx,%eax
10d852: 31 d2 xor %edx,%edx
10d854: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d858: 85 d2 test %edx,%edx
10d85a: 74 5c je 10d8b8 <_Heap_Walk+0x3fc>
10d85c: 84 c9 test %cl,%cl
10d85e: 0f 85 54 02 00 00 jne 10dab8 <_Heap_Walk+0x5fc>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d864: f6 47 04 01 testb $0x1,0x4(%edi)
10d868: 0f 84 e6 00 00 00 je 10d954 <_Heap_Walk+0x498>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d86e: 8b 44 24 40 mov 0x40(%esp),%eax
10d872: 85 c0 test %eax,%eax
10d874: 0f 84 aa 00 00 00 je 10d924 <_Heap_Walk+0x468>
(*printer)(
10d87a: 89 5c 24 10 mov %ebx,0x10(%esp)
10d87e: 89 74 24 0c mov %esi,0xc(%esp)
10d882: c7 44 24 08 36 28 12 movl $0x122836,0x8(%esp)
10d889: 00
10d88a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d891: 00
10d892: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d896: 89 0c 24 mov %ecx,(%esp)
10d899: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d89d: ff d1 call *%ecx
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d89f: 39 7c 24 34 cmp %edi,0x34(%esp)
10d8a3: 0f 84 4f fc ff ff je 10d4f8 <_Heap_Walk+0x3c>
10d8a9: 8b 4f 04 mov 0x4(%edi),%ecx
10d8ac: 8b 45 20 mov 0x20(%ebp),%eax
10d8af: 89 fe mov %edi,%esi
10d8b1: e9 4e ff ff ff jmp 10d804 <_Heap_Walk+0x348>
10d8b6: 66 90 xchg %ax,%ax
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d8b8: 39 5c 24 38 cmp %ebx,0x38(%esp)
10d8bc: 76 3a jbe 10d8f8 <_Heap_Walk+0x43c>
10d8be: 84 c9 test %cl,%cl
10d8c0: 74 a2 je 10d864 <_Heap_Walk+0x3a8> <== NEVER TAKEN
10d8c2: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d8c6: 8b 44 24 38 mov 0x38(%esp),%eax
10d8ca: 89 44 24 14 mov %eax,0x14(%esp)
10d8ce: 89 5c 24 10 mov %ebx,0x10(%esp)
10d8d2: 89 74 24 0c mov %esi,0xc(%esp)
10d8d6: c7 44 24 08 80 2a 12 movl $0x122a80,0x8(%esp)
10d8dd: 00
10d8de: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d8e5: 00
10d8e6: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d8ea: 89 0c 24 mov %ecx,(%esp)
10d8ed: ff d5 call *%ebp
block,
block_size,
min_block_size
);
return false;
10d8ef: 31 c0 xor %eax,%eax
10d8f1: e9 04 fc ff ff jmp 10d4fa <_Heap_Walk+0x3e>
10d8f6: 66 90 xchg %ax,%ax
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d8f8: 39 fe cmp %edi,%esi
10d8fa: 0f 82 64 ff ff ff jb 10d864 <_Heap_Walk+0x3a8>
10d900: 84 c9 test %cl,%cl
10d902: 0f 84 5c ff ff ff je 10d864 <_Heap_Walk+0x3a8>
10d908: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d90c: 89 7c 24 10 mov %edi,0x10(%esp)
10d910: 89 74 24 0c mov %esi,0xc(%esp)
10d914: c7 44 24 08 ac 2a 12 movl $0x122aac,0x8(%esp)
10d91b: 00
10d91c: e9 0a ff ff ff jmp 10d82b <_Heap_Walk+0x36f>
10d921: 8d 76 00 lea 0x0(%esi),%esi
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d924: 8b 06 mov (%esi),%eax
10d926: 89 44 24 14 mov %eax,0x14(%esp)
10d92a: 89 5c 24 10 mov %ebx,0x10(%esp)
10d92e: 89 74 24 0c mov %esi,0xc(%esp)
10d932: c7 44 24 08 84 2b 12 movl $0x122b84,0x8(%esp)
10d939: 00
10d93a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d941: 00
10d942: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d946: 89 0c 24 mov %ecx,(%esp)
10d949: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d94d: ff d1 call *%ecx
10d94f: e9 4b ff ff ff jmp 10d89f <_Heap_Walk+0x3e3>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d954: 8b 4d 08 mov 0x8(%ebp),%ecx
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d957: 8b 56 08 mov 0x8(%esi),%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)(
10d95a: 39 55 0c cmp %edx,0xc(%ebp)
10d95d: 0f 84 fd 00 00 00 je 10da60 <_Heap_Walk+0x5a4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d963: 39 d5 cmp %edx,%ebp
10d965: 0f 84 05 01 00 00 je 10da70 <_Heap_Walk+0x5b4>
10d96b: c7 44 24 48 41 26 12 movl $0x122641,0x48(%esp)
10d972: 00
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10d973: 8b 46 0c mov 0xc(%esi),%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)(
10d976: 39 c1 cmp %eax,%ecx
10d978: 0f 84 d2 00 00 00 je 10da50 <_Heap_Walk+0x594>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d97e: 39 c5 cmp %eax,%ebp
10d980: 0f 84 fa 00 00 00 je 10da80 <_Heap_Walk+0x5c4>
10d986: c7 44 24 4c 41 26 12 movl $0x122641,0x4c(%esp)
10d98d: 00
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)(
10d98e: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d992: 89 4c 24 20 mov %ecx,0x20(%esp)
10d996: 89 54 24 1c mov %edx,0x1c(%esp)
10d99a: 8b 54 24 4c mov 0x4c(%esp),%edx
10d99e: 89 54 24 18 mov %edx,0x18(%esp)
10d9a2: 89 44 24 14 mov %eax,0x14(%esp)
10d9a6: 89 5c 24 10 mov %ebx,0x10(%esp)
10d9aa: 89 74 24 0c mov %esi,0xc(%esp)
10d9ae: c7 44 24 08 e0 2a 12 movl $0x122ae0,0x8(%esp)
10d9b5: 00
10d9b6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d9bd: 00
10d9be: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d9c2: 89 0c 24 mov %ecx,(%esp)
10d9c5: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d9c9: ff d1 call *%ecx
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10d9cb: 8b 07 mov (%edi),%eax
10d9cd: 39 c3 cmp %eax,%ebx
10d9cf: 75 4b jne 10da1c <_Heap_Walk+0x560>
);
return false;
}
if ( !prev_used ) {
10d9d1: 8b 54 24 40 mov 0x40(%esp),%edx
10d9d5: 85 d2 test %edx,%edx
10d9d7: 0f 84 b3 00 00 00 je 10da90 <_Heap_Walk+0x5d4>
10d9dd: 8b 45 08 mov 0x8(%ebp),%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 ) {
10d9e0: 39 c5 cmp %eax,%ebp
10d9e2: 74 0f je 10d9f3 <_Heap_Walk+0x537> <== NEVER TAKEN
if ( free_block == block ) {
10d9e4: 39 c6 cmp %eax,%esi
10d9e6: 0f 84 b3 fe ff ff je 10d89f <_Heap_Walk+0x3e3>
return true;
}
free_block = free_block->next;
10d9ec: 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 ) {
10d9ef: 39 c5 cmp %eax,%ebp
10d9f1: 75 f1 jne 10d9e4 <_Heap_Walk+0x528>
10d9f3: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d9f7: 89 74 24 0c mov %esi,0xc(%esp)
10d9fb: c7 44 24 08 ac 2b 12 movl $0x122bac,0x8(%esp)
10da02: 00
10da03: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da0a: 00
10da0b: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da0f: 89 0c 24 mov %ecx,(%esp)
10da12: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da14: 31 c0 xor %eax,%eax
10da16: e9 d1 fb ff ff jmp 10d5ec <_Heap_Walk+0x130>
10da1b: 90 nop
10da1c: 8b 6c 24 44 mov 0x44(%esp),%ebp
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10da20: 89 7c 24 18 mov %edi,0x18(%esp)
10da24: 89 44 24 14 mov %eax,0x14(%esp)
10da28: 89 5c 24 10 mov %ebx,0x10(%esp)
10da2c: 89 74 24 0c mov %esi,0xc(%esp)
10da30: c7 44 24 08 18 2b 12 movl $0x122b18,0x8(%esp)
10da37: 00
10da38: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da3f: 00
10da40: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da44: 89 0c 24 mov %ecx,(%esp)
10da47: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da49: 31 c0 xor %eax,%eax
10da4b: e9 9c fb ff ff jmp 10d5ec <_Heap_Walk+0x130>
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)(
10da50: c7 44 24 4c ba 27 12 movl $0x1227ba,0x4c(%esp)
10da57: 00
10da58: e9 31 ff ff ff jmp 10d98e <_Heap_Walk+0x4d2>
10da5d: 8d 76 00 lea 0x0(%esi),%esi
10da60: c7 44 24 48 a1 27 12 movl $0x1227a1,0x48(%esp)
10da67: 00
10da68: e9 06 ff ff ff jmp 10d973 <_Heap_Walk+0x4b7>
10da6d: 8d 76 00 lea 0x0(%esi),%esi
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10da70: c7 44 24 48 b0 27 12 movl $0x1227b0,0x48(%esp)
10da77: 00
10da78: e9 f6 fe ff ff jmp 10d973 <_Heap_Walk+0x4b7>
10da7d: 8d 76 00 lea 0x0(%esi),%esi
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10da80: c7 44 24 4c ca 27 12 movl $0x1227ca,0x4c(%esp)
10da87: 00
10da88: e9 01 ff ff ff jmp 10d98e <_Heap_Walk+0x4d2>
10da8d: 8d 76 00 lea 0x0(%esi),%esi
10da90: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !prev_used ) {
(*printer)(
10da94: 89 74 24 0c mov %esi,0xc(%esp)
10da98: c7 44 24 08 54 2b 12 movl $0x122b54,0x8(%esp)
10da9f: 00
10daa0: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10daa7: 00
10daa8: 8b 4c 24 74 mov 0x74(%esp),%ecx
10daac: 89 0c 24 mov %ecx,(%esp)
10daaf: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10dab1: 31 c0 xor %eax,%eax
10dab3: e9 34 fb ff ff jmp 10d5ec <_Heap_Walk+0x130>
10dab8: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10dabc: 89 5c 24 10 mov %ebx,0x10(%esp)
10dac0: 89 74 24 0c mov %esi,0xc(%esp)
10dac4: c7 44 24 08 50 2a 12 movl $0x122a50,0x8(%esp)
10dacb: 00
10dacc: e9 5a fd ff ff jmp 10d82b <_Heap_Walk+0x36f>
10dad1: 8b 53 20 mov 0x20(%ebx),%edx
10dad4: 89 54 24 48 mov %edx,0x48(%esp)
10dad8: e9 19 fd ff ff jmp 10d7f6 <_Heap_Walk+0x33a>
0010c158 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10c158: 53 push %ebx
10c159: 83 ec 18 sub $0x18,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c15c: 31 db xor %ebx,%ebx
10c15e: a1 40 f9 12 00 mov 0x12f940,%eax
10c163: 85 c0 test %eax,%eax
10c165: 74 22 je 10c189 <_IO_Initialize_all_drivers+0x31><== NEVER TAKEN
10c167: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10c168: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c16f: 00
10c170: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c177: 00
10c178: 89 1c 24 mov %ebx,(%esp)
10c17b: e8 30 4a 00 00 call 110bb0 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c180: 43 inc %ebx
10c181: 39 1d 40 f9 12 00 cmp %ebx,0x12f940
10c187: 77 df ja 10c168 <_IO_Initialize_all_drivers+0x10>
(void) rtems_io_initialize( major, 0, NULL );
}
10c189: 83 c4 18 add $0x18,%esp
10c18c: 5b pop %ebx
10c18d: c3 ret
0010c0d0 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10c0d0: 55 push %ebp
10c0d1: 57 push %edi
10c0d2: 56 push %esi
10c0d3: 53 push %ebx
10c0d4: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10c0d7: 8b 1d a0 b1 12 00 mov 0x12b1a0,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10c0dd: 8b 35 9c b1 12 00 mov 0x12b19c,%esi
number_of_drivers = Configuration.maximum_drivers;
10c0e3: 8b 3d 98 b1 12 00 mov 0x12b198,%edi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10c0e9: 39 fe cmp %edi,%esi
10c0eb: 73 57 jae 10c144 <_IO_Manager_initialization+0x74>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
10c0ed: 8d 2c 7f lea (%edi,%edi,2),%ebp
10c0f0: c1 e5 03 shl $0x3,%ebp
10c0f3: 89 2c 24 mov %ebp,(%esp)
10c0f6: e8 49 2b 00 00 call 10ec44 <_Workspace_Allocate_or_fatal_error>
10c0fb: 89 c2 mov %eax,%edx
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
10c0fd: a3 44 f9 12 00 mov %eax,0x12f944
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10c102: 89 3d 40 f9 12 00 mov %edi,0x12f940
memset(
10c108: 31 c0 xor %eax,%eax
10c10a: 89 d7 mov %edx,%edi
10c10c: 89 e9 mov %ebp,%ecx
10c10e: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c110: 85 f6 test %esi,%esi
10c112: 74 28 je 10c13c <_IO_Manager_initialization+0x6c><== NEVER TAKEN
10c114: 8b 15 44 f9 12 00 mov 0x12f944,%edx
* registration. The driver table is now allocated in the
* workspace.
*
*/
void _IO_Manager_initialization(void)
10c11a: 8d 04 76 lea (%esi,%esi,2),%eax
10c11d: 8d 2c c5 00 00 00 00 lea 0x0(,%eax,8),%ebp
10c124: 31 c0 xor %eax,%eax
10c126: 66 90 xchg %ax,%ax
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
10c128: 8d 3c 02 lea (%edx,%eax,1),%edi
10c12b: 8d 34 03 lea (%ebx,%eax,1),%esi
10c12e: b9 06 00 00 00 mov $0x6,%ecx
10c133: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c135: 83 c0 18 add $0x18,%eax
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c138: 39 e8 cmp %ebp,%eax
10c13a: 75 ec jne 10c128 <_IO_Manager_initialization+0x58>
_IO_Driver_address_table[index] = driver_table[index];
}
10c13c: 83 c4 1c add $0x1c,%esp
10c13f: 5b pop %ebx
10c140: 5e pop %esi
10c141: 5f pop %edi
10c142: 5d pop %ebp
10c143: c3 ret
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
10c144: 89 1d 44 f9 12 00 mov %ebx,0x12f944
_IO_Number_of_drivers = number_of_drivers;
10c14a: 89 35 40 f9 12 00 mov %esi,0x12f940
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10c150: 83 c4 1c add $0x1c,%esp
10c153: 5b pop %ebx
10c154: 5e pop %esi
10c155: 5f pop %edi
10c156: 5d pop %ebp
10c157: c3 ret
0010cbc0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10cbc0: 53 push %ebx
10cbc1: 83 ec 18 sub $0x18,%esp
10cbc4: 8b 54 24 20 mov 0x20(%esp),%edx
10cbc8: 8b 44 24 24 mov 0x24(%esp),%eax
10cbcc: 8b 5c 24 28 mov 0x28(%esp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10cbd0: 89 15 84 f6 12 00 mov %edx,0x12f684
_Internal_errors_What_happened.is_internal = is_internal;
10cbd6: a2 88 f6 12 00 mov %al,0x12f688
_Internal_errors_What_happened.the_error = the_error;
10cbdb: 89 1d 8c f6 12 00 mov %ebx,0x12f68c
_User_extensions_Fatal( the_source, is_internal, the_error );
10cbe1: 89 5c 24 08 mov %ebx,0x8(%esp)
10cbe5: 0f b6 c0 movzbl %al,%eax
10cbe8: 89 44 24 04 mov %eax,0x4(%esp)
10cbec: 89 14 24 mov %edx,(%esp)
10cbef: e8 50 1c 00 00 call 10e844 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10cbf4: c7 05 60 f7 12 00 05 movl $0x5,0x12f760 <== NOT EXECUTED
10cbfb: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10cbfe: fa cli <== NOT EXECUTED
10cbff: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10cc01: f4 hlt <== NOT EXECUTED
10cc02: eb fe jmp 10cc02 <_Internal_error_Occurred+0x42><== NOT EXECUTED
0010cc5c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10cc5c: 56 push %esi
10cc5d: 53 push %ebx
10cc5e: 83 ec 14 sub $0x14,%esp
10cc61: 8b 5c 24 20 mov 0x20(%esp),%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 )
10cc65: 8b 43 18 mov 0x18(%ebx),%eax
10cc68: 85 c0 test %eax,%eax
10cc6a: 74 54 je 10ccc0 <_Objects_Allocate+0x64><== 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 );
10cc6c: 8d 73 20 lea 0x20(%ebx),%esi
10cc6f: 89 34 24 mov %esi,(%esp)
10cc72: e8 35 f7 ff ff call 10c3ac <_Chain_Get>
10cc77: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10cc79: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10cc7d: 74 20 je 10cc9f <_Objects_Allocate+0x43>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10cc7f: 85 c0 test %eax,%eax
10cc81: 74 25 je 10cca8 <_Objects_Allocate+0x4c>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10cc83: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10cc87: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10cc8b: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10cc8d: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cc91: 31 d2 xor %edx,%edx
10cc93: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10cc95: 8b 53 30 mov 0x30(%ebx),%edx
10cc98: ff 0c 82 decl (%edx,%eax,4)
information->inactive--;
10cc9b: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10cc9f: 89 c8 mov %ecx,%eax
10cca1: 83 c4 14 add $0x14,%esp
10cca4: 5b pop %ebx
10cca5: 5e pop %esi
10cca6: c3 ret
10cca7: 90 nop
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10cca8: 89 1c 24 mov %ebx,(%esp)
10ccab: e8 3c 00 00 00 call 10ccec <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ccb0: 89 34 24 mov %esi,(%esp)
10ccb3: e8 f4 f6 ff ff call 10c3ac <_Chain_Get>
10ccb8: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ccba: 85 c0 test %eax,%eax
10ccbc: 75 c5 jne 10cc83 <_Objects_Allocate+0x27>
10ccbe: 66 90 xchg %ax,%ax
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10ccc0: 31 c9 xor %ecx,%ecx
);
}
#endif
return the_object;
}
10ccc2: 89 c8 mov %ecx,%eax
10ccc4: 83 c4 14 add $0x14,%esp
10ccc7: 5b pop %ebx
10ccc8: 5e pop %esi
10ccc9: c3 ret
0010ccec <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10ccec: 55 push %ebp
10cced: 57 push %edi
10ccee: 56 push %esi
10ccef: 53 push %ebx
10ccf0: 83 ec 4c sub $0x4c,%esp
10ccf3: 8b 5c 24 60 mov 0x60(%esp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10ccf7: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10ccfb: 89 44 24 20 mov %eax,0x20(%esp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10ccff: 8b 4b 34 mov 0x34(%ebx),%ecx
10cd02: 8b 7b 10 mov 0x10(%ebx),%edi
10cd05: 85 c9 test %ecx,%ecx
10cd07: 0f 84 73 02 00 00 je 10cf80 <_Objects_Extend_information+0x294>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10cd0d: 8b 73 14 mov 0x14(%ebx),%esi
10cd10: 89 f8 mov %edi,%eax
10cd12: 31 d2 xor %edx,%edx
10cd14: 66 f7 f6 div %si
10cd17: 0f b7 c0 movzwl %ax,%eax
10cd1a: 89 44 24 18 mov %eax,0x18(%esp)
for ( ; block < block_count; block++ ) {
10cd1e: 85 c0 test %eax,%eax
10cd20: 0f b7 c6 movzwl %si,%eax
10cd23: 0f 84 77 02 00 00 je 10cfa0 <_Objects_Extend_information+0x2b4><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10cd29: 8b 11 mov (%ecx),%edx
10cd2b: 85 d2 test %edx,%edx
10cd2d: 0f 84 81 02 00 00 je 10cfb4 <_Objects_Extend_information+0x2c8><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd33: 8b 74 24 18 mov 0x18(%esp),%esi
10cd37: 4e dec %esi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd38: 8b 54 24 20 mov 0x20(%esp),%edx
10cd3c: 89 54 24 14 mov %edx,0x14(%esp)
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd40: 31 d2 xor %edx,%edx
10cd42: 89 5c 24 1c mov %ebx,0x1c(%esp)
10cd46: 8b 5c 24 14 mov 0x14(%esp),%ebx
10cd4a: eb 0c jmp 10cd58 <_Objects_Extend_information+0x6c>
10cd4c: 89 ea mov %ebp,%edx
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cd4e: 83 3c a9 00 cmpl $0x0,(%ecx,%ebp,4)
10cd52: 0f 84 d4 01 00 00 je 10cf2c <_Objects_Extend_information+0x240>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10cd58: 01 c3 add %eax,%ebx
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd5a: 8d 6a 01 lea 0x1(%edx),%ebp
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cd5d: 39 f2 cmp %esi,%edx
10cd5f: 75 eb jne 10cd4c <_Objects_Extend_information+0x60>
10cd61: 89 5c 24 14 mov %ebx,0x14(%esp)
10cd65: 8b 5c 24 1c mov 0x1c(%esp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cd69: be 01 00 00 00 mov $0x1,%esi
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10cd6e: 0f b7 d7 movzwl %di,%edx
10cd71: 01 c2 add %eax,%edx
10cd73: 89 54 24 1c mov %edx,0x1c(%esp)
/*
* 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 ) {
10cd77: 81 fa ff ff 00 00 cmp $0xffff,%edx
10cd7d: 0f 87 9f 01 00 00 ja 10cf22 <_Objects_Extend_information+0x236>
/*
* 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;
10cd83: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10cd87: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
new_object_block = _Workspace_Allocate( block_size );
10cd8b: 89 04 24 mov %eax,(%esp)
/*
* 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;
if ( information->auto_extend ) {
10cd8e: 0f 84 a8 01 00 00 je 10cf3c <_Objects_Extend_information+0x250>
new_object_block = _Workspace_Allocate( block_size );
10cd94: e8 63 1e 00 00 call 10ebfc <_Workspace_Allocate>
10cd99: 89 44 24 28 mov %eax,0x28(%esp)
if ( !new_object_block )
10cd9d: 85 c0 test %eax,%eax
10cd9f: 0f 84 7d 01 00 00 je 10cf22 <_Objects_Extend_information+0x236>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cda5: 89 f0 mov %esi,%eax
10cda7: 84 c0 test %al,%al
10cda9: 0f 84 ee 00 00 00 je 10ce9d <_Objects_Extend_information+0x1b1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10cdaf: 8b 74 24 18 mov 0x18(%esp),%esi
10cdb3: 46 inc %esi
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10cdb4: 8d 04 76 lea (%esi,%esi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10cdb7: 03 44 24 1c add 0x1c(%esp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10cdbb: 03 44 24 20 add 0x20(%esp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10cdbf: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10cdc2: 89 04 24 mov %eax,(%esp)
10cdc5: e8 32 1e 00 00 call 10ebfc <_Workspace_Allocate>
10cdca: 89 c2 mov %eax,%edx
if ( !object_blocks ) {
10cdcc: 85 c0 test %eax,%eax
10cdce: 0f 84 f1 01 00 00 je 10cfc5 <_Objects_Extend_information+0x2d9>
10cdd4: 8d 3c b0 lea (%eax,%esi,4),%edi
10cdd7: 89 7c 24 2c mov %edi,0x2c(%esp)
10cddb: 8d 34 f0 lea (%eax,%esi,8),%esi
10cdde: 89 74 24 24 mov %esi,0x24(%esp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10cde2: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10cde6: 39 44 24 20 cmp %eax,0x20(%esp)
10cdea: 0f 82 5a 01 00 00 jb 10cf4a <_Objects_Extend_information+0x25e>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cdf0: 8b 44 24 20 mov 0x20(%esp),%eax
10cdf4: 85 c0 test %eax,%eax
10cdf6: 74 1d je 10ce15 <_Objects_Extend_information+0x129><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cdf8: 8b 44 24 20 mov 0x20(%esp),%eax
10cdfc: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce00: 8d 0c 87 lea (%edi,%eax,4),%ecx
10ce03: 89 f8 mov %edi,%eax
10ce05: 8d 76 00 lea 0x0(%esi),%esi
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10ce08: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce0e: 83 c0 04 add $0x4,%eax
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ce11: 39 c8 cmp %ecx,%eax
10ce13: 75 f3 jne 10ce08 <_Objects_Extend_information+0x11c><== NEVER TAKEN
10ce15: 8b 44 24 18 mov 0x18(%esp),%eax
10ce19: c1 e0 02 shl $0x2,%eax
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10ce1c: c7 04 02 00 00 00 00 movl $0x0,(%edx,%eax,1)
inactive_per_block[block_count] = 0;
10ce23: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ce27: c7 04 07 00 00 00 00 movl $0x0,(%edi,%eax,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10ce2e: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10ce32: 03 4c 24 14 add 0x14(%esp),%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10ce36: 39 4c 24 14 cmp %ecx,0x14(%esp)
10ce3a: 73 1d jae 10ce59 <_Objects_Extend_information+0x16d><== NEVER TAKEN
10ce3c: 8b 74 24 14 mov 0x14(%esp),%esi
10ce40: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce44: 8d 04 b7 lea (%edi,%esi,4),%eax
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10ce47: 8d 0c 8f lea (%edi,%ecx,4),%ecx
10ce4a: 66 90 xchg %ax,%ax
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10ce4c: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce52: 83 c0 04 add $0x4,%eax
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10ce55: 39 c8 cmp %ecx,%eax
10ce57: 75 f3 jne 10ce4c <_Objects_Extend_information+0x160>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10ce59: 9c pushf
10ce5a: fa cli
10ce5b: 59 pop %ecx
old_tables = information->object_blocks;
10ce5c: 8b 43 34 mov 0x34(%ebx),%eax
information->object_blocks = object_blocks;
10ce5f: 89 53 34 mov %edx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10ce62: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ce66: 89 7b 30 mov %edi,0x30(%ebx)
information->local_table = local_table;
10ce69: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce6d: 89 7b 1c mov %edi,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10ce70: 8b 54 24 1c mov 0x1c(%esp),%edx
10ce74: 66 89 53 10 mov %dx,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ce78: 8b 13 mov (%ebx),%edx
10ce7a: c1 e2 18 shl $0x18,%edx
10ce7d: 81 ca 00 00 01 00 or $0x10000,%edx
information->maximum_id = _Objects_Build_id(
10ce83: 0f b7 73 04 movzwl 0x4(%ebx),%esi
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10ce87: c1 e6 1b shl $0x1b,%esi
10ce8a: 09 f2 or %esi,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ce8c: 0b 54 24 1c or 0x1c(%esp),%edx
10ce90: 89 53 0c mov %edx,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10ce93: 51 push %ecx
10ce94: 9d popf
_Workspace_Free( old_tables );
10ce95: 89 04 24 mov %eax,(%esp)
10ce98: e8 8b 1d 00 00 call 10ec28 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10ce9d: c1 e5 02 shl $0x2,%ebp
10cea0: 89 6c 24 18 mov %ebp,0x18(%esp)
10cea4: 8b 43 34 mov 0x34(%ebx),%eax
10cea7: 8b 54 24 28 mov 0x28(%esp),%edx
10ceab: 89 14 28 mov %edx,(%eax,%ebp,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10ceae: 8b 43 18 mov 0x18(%ebx),%eax
10ceb1: 89 44 24 0c mov %eax,0xc(%esp)
10ceb5: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10ceb9: 89 44 24 08 mov %eax,0x8(%esp)
10cebd: 8b 43 34 mov 0x34(%ebx),%eax
10cec0: 8b 04 28 mov (%eax,%ebp,1),%eax
10cec3: 89 44 24 04 mov %eax,0x4(%esp)
10cec7: 8d 74 24 34 lea 0x34(%esp),%esi
10cecb: 89 34 24 mov %esi,(%esp)
10cece: e8 f9 f4 ff ff call 10c3cc <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10ced3: 8b 6c 24 14 mov 0x14(%esp),%ebp
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10ced7: 8d 7b 20 lea 0x20(%ebx),%edi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10ceda: eb 26 jmp 10cf02 <_Objects_Extend_information+0x216>
10cedc: 8b 13 mov (%ebx),%edx
10cede: c1 e2 18 shl $0x18,%edx
10cee1: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cee7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10ceeb: c1 e1 1b shl $0x1b,%ecx
10ceee: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cef0: 09 ea or %ebp,%edx
10cef2: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cef5: 89 44 24 04 mov %eax,0x4(%esp)
10cef9: 89 3c 24 mov %edi,(%esp)
10cefc: e8 87 f4 ff ff call 10c388 <_Chain_Append>
index++;
10cf01: 45 inc %ebp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cf02: 89 34 24 mov %esi,(%esp)
10cf05: e8 a2 f4 ff ff call 10c3ac <_Chain_Get>
10cf0a: 85 c0 test %eax,%eax
10cf0c: 75 ce jne 10cedc <_Objects_Extend_information+0x1f0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cf0e: 8b 43 14 mov 0x14(%ebx),%eax
10cf11: 8b 53 30 mov 0x30(%ebx),%edx
10cf14: 0f b7 c8 movzwl %ax,%ecx
10cf17: 8b 74 24 18 mov 0x18(%esp),%esi
10cf1b: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cf1e: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cf22: 83 c4 4c add $0x4c,%esp
10cf25: 5b pop %ebx
10cf26: 5e pop %esi
10cf27: 5f pop %edi
10cf28: 5d pop %ebp
10cf29: c3 ret
10cf2a: 66 90 xchg %ax,%ax
10cf2c: 89 5c 24 14 mov %ebx,0x14(%esp)
10cf30: 8b 5c 24 1c mov 0x1c(%esp),%ebx
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cf34: 31 f6 xor %esi,%esi
10cf36: e9 33 fe ff ff jmp 10cd6e <_Objects_Extend_information+0x82>
10cf3b: 90 nop
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10cf3c: e8 03 1d 00 00 call 10ec44 <_Workspace_Allocate_or_fatal_error>
10cf41: 89 44 24 28 mov %eax,0x28(%esp)
10cf45: e9 5b fe ff ff jmp 10cda5 <_Objects_Extend_information+0xb9>
/*
* 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,
10cf4a: 8b 44 24 18 mov 0x18(%esp),%eax
10cf4e: c1 e0 02 shl $0x2,%eax
10cf51: 8b 73 34 mov 0x34(%ebx),%esi
10cf54: 89 d7 mov %edx,%edi
10cf56: 89 c1 mov %eax,%ecx
10cf58: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cf5a: 8b 73 30 mov 0x30(%ebx),%esi
10cf5d: 8b 7c 24 2c mov 0x2c(%esp),%edi
10cf61: 89 c1 mov %eax,%ecx
10cf63: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10cf65: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cf69: 03 4c 24 20 add 0x20(%esp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cf6d: c1 e1 02 shl $0x2,%ecx
10cf70: 8b 73 1c mov 0x1c(%ebx),%esi
10cf73: 8b 7c 24 24 mov 0x24(%esp),%edi
10cf77: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10cf79: e9 9e fe ff ff jmp 10ce1c <_Objects_Extend_information+0x130>
10cf7e: 66 90 xchg %ax,%ax
10cf80: 0f b7 43 14 movzwl 0x14(%ebx),%eax
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cf84: 8b 54 24 20 mov 0x20(%esp),%edx
10cf88: 89 54 24 14 mov %edx,0x14(%esp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cf8c: be 01 00 00 00 mov $0x1,%esi
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cf91: 31 ed xor %ebp,%ebp
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cf93: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10cf9a: 00
10cf9b: e9 ce fd ff ff jmp 10cd6e <_Objects_Extend_information+0x82>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cfa0: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10cfa4: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cfa8: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cfad: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10cfaf: e9 ba fd ff ff jmp 10cd6e <_Objects_Extend_information+0x82><== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cfb4: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10cfb8: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cfbc: 31 f6 xor %esi,%esi <== NOT EXECUTED
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cfbe: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10cfc0: e9 a9 fd ff ff jmp 10cd6e <_Objects_Extend_information+0x82><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10cfc5: 8b 44 24 28 mov 0x28(%esp),%eax
10cfc9: 89 04 24 mov %eax,(%esp)
10cfcc: e8 57 1c 00 00 call 10ec28 <_Workspace_Free>
10cfd1: e9 4c ff ff ff jmp 10cf22 <_Objects_Extend_information+0x236>
0010d070 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10d070: 56 push %esi
10d071: 53 push %ebx
10d072: 83 ec 14 sub $0x14,%esp
10d075: 8b 74 24 20 mov 0x20(%esp),%esi
10d079: 0f b7 5c 24 24 movzwl 0x24(%esp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10d07e: 66 85 db test %bx,%bx
10d081: 74 31 je 10d0b4 <_Objects_Get_information+0x44>
/*
* 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 );
10d083: 89 34 24 mov %esi,(%esp)
10d086: e8 f1 43 00 00 call 11147c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10d08b: 85 c0 test %eax,%eax
10d08d: 74 25 je 10d0b4 <_Objects_Get_information+0x44>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10d08f: 39 d8 cmp %ebx,%eax
10d091: 72 21 jb 10d0b4 <_Objects_Get_information+0x44>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10d093: 8b 04 b5 dc f5 12 00 mov 0x12f5dc(,%esi,4),%eax
10d09a: 85 c0 test %eax,%eax
10d09c: 74 16 je 10d0b4 <_Objects_Get_information+0x44><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10d09e: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10d0a1: 85 c0 test %eax,%eax
10d0a3: 74 0f je 10d0b4 <_Objects_Get_information+0x44><== 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 )
10d0a5: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10d0aa: 74 08 je 10d0b4 <_Objects_Get_information+0x44>
return NULL;
#endif
return info;
}
10d0ac: 83 c4 14 add $0x14,%esp
10d0af: 5b pop %ebx
10d0b0: 5e pop %esi
10d0b1: c3 ret
10d0b2: 66 90 xchg %ax,%ax
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10d0b4: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10d0b6: 83 c4 14 add $0x14,%esp
10d0b9: 5b pop %ebx
10d0ba: 5e pop %esi
10d0bb: c3 ret
001198b0 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
1198b0: 55 push %ebp
1198b1: 57 push %edi
1198b2: 56 push %esi
1198b3: 53 push %ebx
1198b4: 83 ec 2c sub $0x2c,%esp
1198b7: 8b 7c 24 40 mov 0x40(%esp),%edi
1198bb: 8b 5c 24 44 mov 0x44(%esp),%ebx
1198bf: 8b 74 24 48 mov 0x48(%esp),%esi
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
1198c3: 85 db test %ebx,%ebx
1198c5: 0f 84 c5 00 00 00 je 119990 <_Objects_Get_name_as_string+0xe0>
return NULL;
if ( name == NULL )
1198cb: 85 f6 test %esi,%esi
1198cd: 0f 84 bd 00 00 00 je 119990 <_Objects_Get_name_as_string+0xe0>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
1198d3: 85 ff test %edi,%edi
1198d5: 0f 84 a5 00 00 00 je 119980 <_Objects_Get_name_as_string+0xd0>
information = _Objects_Get_information_id( tmpId );
1198db: 89 3c 24 mov %edi,(%esp)
1198de: e8 bd 8f ff ff call 1128a0 <_Objects_Get_information_id>
if ( !information )
1198e3: 85 c0 test %eax,%eax
1198e5: 0f 84 a5 00 00 00 je 119990 <_Objects_Get_name_as_string+0xe0>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
1198eb: 8d 54 24 14 lea 0x14(%esp),%edx
1198ef: 89 54 24 08 mov %edx,0x8(%esp)
1198f3: 89 7c 24 04 mov %edi,0x4(%esp)
1198f7: 89 04 24 mov %eax,(%esp)
1198fa: e8 69 90 ff ff call 112968 <_Objects_Get>
switch ( location ) {
1198ff: 8b 54 24 14 mov 0x14(%esp),%edx
119903: 85 d2 test %edx,%edx
119905: 0f 85 85 00 00 00 jne 119990 <_Objects_Get_name_as_string+0xe0>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
11990b: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
11990e: 89 c1 mov %eax,%ecx
119910: c1 e9 18 shr $0x18,%ecx
119913: 88 ca mov %cl,%dl
119915: 88 4c 24 1b mov %cl,0x1b(%esp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
119919: 89 c1 mov %eax,%ecx
11991b: c1 e9 10 shr $0x10,%ecx
11991e: 88 4c 24 1c mov %cl,0x1c(%esp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
119922: 89 c1 mov %eax,%ecx
119924: c1 e9 08 shr $0x8,%ecx
119927: 88 4c 24 1d mov %cl,0x1d(%esp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
11992b: 88 44 24 1e mov %al,0x1e(%esp)
lname[ 4 ] = '\0';
11992f: c6 44 24 1f 00 movb $0x0,0x1f(%esp)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
119934: 83 fb 01 cmp $0x1,%ebx
119937: 74 63 je 11999c <_Objects_Get_name_as_string+0xec><== NEVER TAKEN
119939: 84 d2 test %dl,%dl
11993b: 74 5f je 11999c <_Objects_Get_name_as_string+0xec>
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
11993d: 8d 7c 1e ff lea -0x1(%esi,%ebx,1),%edi
119941: 89 f1 mov %esi,%ecx
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
s = lname;
119943: 8d 5c 24 1b lea 0x1b(%esp),%ebx
119947: eb 09 jmp 119952 <_Objects_Get_name_as_string+0xa2>
119949: 8d 76 00 lea 0x0(%esi),%esi
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11994c: 8a 13 mov (%ebx),%dl
11994e: 84 d2 test %dl,%dl
119950: 74 1c je 11996e <_Objects_Get_name_as_string+0xbe>
*d = (isprint((unsigned char)*s)) ? *s : '*';
119952: 0f b6 c2 movzbl %dl,%eax
119955: 8b 2d 28 db 13 00 mov 0x13db28,%ebp
11995b: 0f be 44 05 01 movsbl 0x1(%ebp,%eax,1),%eax
119960: a8 97 test $0x97,%al
119962: 75 02 jne 119966 <_Objects_Get_name_as_string+0xb6>
119964: b2 2a mov $0x2a,%dl
119966: 88 11 mov %dl,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
119968: 43 inc %ebx
119969: 41 inc %ecx
11996a: 39 f9 cmp %edi,%ecx
11996c: 75 de jne 11994c <_Objects_Get_name_as_string+0x9c>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
11996e: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
119971: e8 fa 9c ff ff call 113670 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
119976: 89 f0 mov %esi,%eax
119978: 83 c4 2c add $0x2c,%esp
11997b: 5b pop %ebx
11997c: 5e pop %esi
11997d: 5f pop %edi
11997e: 5d pop %ebp
11997f: c3 ret
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
119980: a1 ec 06 14 00 mov 0x1406ec,%eax
119985: 8b 78 08 mov 0x8(%eax),%edi
119988: e9 4e ff ff ff jmp 1198db <_Objects_Get_name_as_string+0x2b>
11998d: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
119990: 31 f6 xor %esi,%esi
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
119992: 89 f0 mov %esi,%eax
119994: 83 c4 2c add $0x2c,%esp
119997: 5b pop %ebx
119998: 5e pop %esi
119999: 5f pop %edi
11999a: 5d pop %ebp
11999b: c3 ret
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11999c: 89 f1 mov %esi,%ecx
11999e: eb ce jmp 11996e <_Objects_Get_name_as_string+0xbe>
0011be2c <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
11be2c: 55 push %ebp
11be2d: 57 push %edi
11be2e: 56 push %esi
11be2f: 53 push %ebx
11be30: 83 ec 1c sub $0x1c,%esp
11be33: 8b 74 24 30 mov 0x30(%esp),%esi
11be37: 8b 5c 24 34 mov 0x34(%esp),%ebx
11be3b: 8b 7c 24 38 mov 0x38(%esp),%edi
11be3f: 8b 6c 24 3c mov 0x3c(%esp),%ebp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
11be43: 85 f6 test %esi,%esi
11be45: 74 59 je 11bea0 <_Objects_Get_next+0x74>
return NULL;
if ( !location_p )
11be47: 85 ff test %edi,%edi
11be49: 74 55 je 11bea0 <_Objects_Get_next+0x74>
return NULL;
if ( !next_id_p )
11be4b: 85 ed test %ebp,%ebp
11be4d: 74 51 je 11bea0 <_Objects_Get_next+0x74>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
11be4f: 66 85 db test %bx,%bx
11be52: 74 28 je 11be7c <_Objects_Get_next+0x50>
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11be54: 66 39 5e 10 cmp %bx,0x10(%esi)
11be58: 72 2e jb 11be88 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
11be5a: 89 7c 24 08 mov %edi,0x8(%esp)
11be5e: 89 5c 24 04 mov %ebx,0x4(%esp)
11be62: 89 34 24 mov %esi,(%esp)
11be65: e8 fe 6a ff ff call 112968 <_Objects_Get>
next_id++;
11be6a: 43 inc %ebx
} while (*location_p != OBJECTS_LOCAL);
11be6b: 8b 17 mov (%edi),%edx
11be6d: 85 d2 test %edx,%edx
11be6f: 75 e3 jne 11be54 <_Objects_Get_next+0x28>
*next_id_p = next_id;
11be71: 89 5d 00 mov %ebx,0x0(%ebp)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
11be74: 83 c4 1c add $0x1c,%esp
11be77: 5b pop %ebx
11be78: 5e pop %esi
11be79: 5f pop %edi
11be7a: 5d pop %ebp
11be7b: c3 ret
if ( !next_id_p )
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
next_id = information->minimum_id;
11be7c: 8b 5e 08 mov 0x8(%esi),%ebx
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11be7f: 66 39 5e 10 cmp %bx,0x10(%esi)
11be83: 73 d5 jae 11be5a <_Objects_Get_next+0x2e><== ALWAYS TAKEN
11be85: 8d 76 00 lea 0x0(%esi),%esi
{
*location_p = OBJECTS_ERROR;
11be88: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
11be8e: c7 45 00 ff ff ff ff movl $0xffffffff,0x0(%ebp)
return 0;
11be95: 31 c0 xor %eax,%eax
}
11be97: 83 c4 1c add $0x1c,%esp
11be9a: 5b pop %ebx
11be9b: 5e pop %esi
11be9c: 5f pop %edi
11be9d: 5d pop %ebp
11be9e: c3 ret
11be9f: 90 nop
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
11bea0: 31 c0 xor %eax,%eax
11bea2: eb d0 jmp 11be74 <_Objects_Get_next+0x48>
0011e390 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11e390: 8b 54 24 04 mov 0x4(%esp),%edx
/*
* 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;
11e394: b8 01 00 00 00 mov $0x1,%eax
11e399: 2b 42 08 sub 0x8(%edx),%eax
11e39c: 03 44 24 08 add 0x8(%esp),%eax
if ( information->maximum >= index ) {
11e3a0: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11e3a4: 39 c8 cmp %ecx,%eax
11e3a6: 77 18 ja 11e3c0 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11e3a8: 8b 52 1c mov 0x1c(%edx),%edx
11e3ab: 8b 04 82 mov (%edx,%eax,4),%eax
11e3ae: 85 c0 test %eax,%eax
11e3b0: 74 0e je 11e3c0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11e3b2: 8b 54 24 0c mov 0xc(%esp),%edx
11e3b6: c7 02 00 00 00 00 movl $0x0,(%edx)
return the_object;
11e3bc: c3 ret
11e3bd: 8d 76 00 lea 0x0(%esi),%esi
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11e3c0: 8b 44 24 0c mov 0xc(%esp),%eax
11e3c4: c7 00 01 00 00 00 movl $0x1,(%eax)
return NULL;
11e3ca: 31 c0 xor %eax,%eax
}
11e3cc: c3 ret
001129dc <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
1129dc: 83 ec 2c sub $0x2c,%esp
1129df: 8b 44 24 30 mov 0x30(%esp),%eax
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
1129e3: 85 c0 test %eax,%eax
1129e5: 75 65 jne 112a4c <_Objects_Id_to_name+0x70>
1129e7: a1 ec 06 14 00 mov 0x1406ec,%eax
1129ec: 8b 50 08 mov 0x8(%eax),%edx
1129ef: 89 d0 mov %edx,%eax
1129f1: c1 e8 18 shr $0x18,%eax
1129f4: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
1129f7: 8d 48 ff lea -0x1(%eax),%ecx
1129fa: 83 f9 02 cmp $0x2,%ecx
1129fd: 77 41 ja 112a40 <_Objects_Id_to_name+0x64>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
1129ff: 8b 04 85 1c 04 14 00 mov 0x14041c(,%eax,4),%eax
112a06: 85 c0 test %eax,%eax
112a08: 74 36 je 112a40 <_Objects_Id_to_name+0x64>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
112a0a: 89 d1 mov %edx,%ecx
112a0c: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
112a0f: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
112a12: 85 c0 test %eax,%eax
112a14: 74 2a je 112a40 <_Objects_Id_to_name+0x64><== 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 );
112a16: 8d 4c 24 1c lea 0x1c(%esp),%ecx
112a1a: 89 4c 24 08 mov %ecx,0x8(%esp)
112a1e: 89 54 24 04 mov %edx,0x4(%esp)
112a22: 89 04 24 mov %eax,(%esp)
112a25: e8 3e ff ff ff call 112968 <_Objects_Get>
if ( !the_object )
112a2a: 85 c0 test %eax,%eax
112a2c: 74 12 je 112a40 <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
112a2e: 8b 50 0c mov 0xc(%eax),%edx
112a31: 8b 44 24 34 mov 0x34(%esp),%eax
112a35: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
112a37: e8 34 0c 00 00 call 113670 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
112a3c: 31 c0 xor %eax,%eax
112a3e: eb 05 jmp 112a45 <_Objects_Id_to_name+0x69>
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
112a40: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
112a45: 83 c4 2c add $0x2c,%esp
112a48: c3 ret
112a49: 8d 76 00 lea 0x0(%esi),%esi
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112a4c: 89 c2 mov %eax,%edx
112a4e: eb 9f jmp 1129ef <_Objects_Id_to_name+0x13>
0010d2f8 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d2f8: 55 push %ebp
10d2f9: 57 push %edi
10d2fa: 56 push %esi
10d2fb: 53 push %ebx
10d2fc: 83 ec 1c sub $0x1c,%esp
10d2ff: 8b 7c 24 30 mov 0x30(%esp),%edi
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d303: 0f b7 5f 08 movzwl 0x8(%edi),%ebx
block_count = (information->maximum - index_base) /
10d307: 0f b7 77 14 movzwl 0x14(%edi),%esi
10d30b: 0f b7 47 10 movzwl 0x10(%edi),%eax
10d30f: 29 d8 sub %ebx,%eax
10d311: 31 d2 xor %edx,%edx
10d313: f7 f6 div %esi
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d315: 85 c0 test %eax,%eax
10d317: 74 1e je 10d337 <_Objects_Shrink_information+0x3f><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d319: 8b 57 30 mov 0x30(%edi),%edx
10d31c: 3b 32 cmp (%edx),%esi
10d31e: 74 1f je 10d33f <_Objects_Shrink_information+0x47><== NEVER TAKEN
10d320: 31 c9 xor %ecx,%ecx
10d322: eb 0c jmp 10d330 <_Objects_Shrink_information+0x38>
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
10d324: 8d 2c 8d 00 00 00 00 lea 0x0(,%ecx,4),%ebp
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d32b: 3b 34 8a cmp (%edx,%ecx,4),%esi
10d32e: 74 14 je 10d344 <_Objects_Shrink_information+0x4c>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d330: 01 f3 add %esi,%ebx
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d332: 41 inc %ecx
10d333: 39 c1 cmp %eax,%ecx
10d335: 75 ed jne 10d324 <_Objects_Shrink_information+0x2c>
return;
}
index_base += information->allocation_size;
}
}
10d337: 83 c4 1c add $0x1c,%esp
10d33a: 5b pop %ebx
10d33b: 5e pop %esi
10d33c: 5f pop %edi
10d33d: 5d pop %ebp
10d33e: c3 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d33f: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10d341: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10d344: 8b 47 20 mov 0x20(%edi),%eax
10d347: eb 09 jmp 10d352 <_Objects_Shrink_information+0x5a>
10d349: 8d 76 00 lea 0x0(%esi),%esi
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d34c: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d34e: 85 f6 test %esi,%esi
10d350: 74 22 je 10d374 <_Objects_Shrink_information+0x7c>
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10d352: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d356: 8b 30 mov (%eax),%esi
if ((index >= index_base) &&
10d358: 39 da cmp %ebx,%edx
10d35a: 72 f0 jb 10d34c <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
10d35c: 0f b7 4f 14 movzwl 0x14(%edi),%ecx
10d360: 01 d9 add %ebx,%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10d362: 39 ca cmp %ecx,%edx
10d364: 73 e6 jae 10d34c <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d366: 89 04 24 mov %eax,(%esp)
10d369: e8 6e 38 00 00 call 110bdc <_Chain_Extract>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d36e: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d370: 85 f6 test %esi,%esi
10d372: 75 de jne 10d352 <_Objects_Shrink_information+0x5a>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d374: 8b 47 34 mov 0x34(%edi),%eax
10d377: 8b 04 28 mov (%eax,%ebp,1),%eax
10d37a: 89 04 24 mov %eax,(%esp)
10d37d: e8 a6 18 00 00 call 10ec28 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d382: 8b 47 34 mov 0x34(%edi),%eax
10d385: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive_per_block[ block ] = 0;
10d38c: 8b 47 30 mov 0x30(%edi),%eax
10d38f: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive -= information->allocation_size;
10d396: 8b 47 14 mov 0x14(%edi),%eax
10d399: 66 29 47 2c sub %ax,0x2c(%edi)
return;
}
index_base += information->allocation_size;
}
}
10d39d: 83 c4 1c add $0x1c,%esp
10d3a0: 5b pop %ebx
10d3a1: 5e pop %esi
10d3a2: 5f pop %edi
10d3a3: 5d pop %ebp
10d3a4: c3 ret
0010e0fc <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e0fc: 55 push %ebp
10e0fd: 57 push %edi
10e0fe: 56 push %esi
10e0ff: 53 push %ebx
10e100: 83 ec 1c sub $0x1c,%esp
10e103: 8b 6c 24 30 mov 0x30(%esp),%ebp
10e107: 8b 74 24 34 mov 0x34(%esp),%esi
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
10e10b: 85 f6 test %esi,%esi
10e10d: 0f 84 ae 00 00 00 je 10e1c1 <_RBTree_Extract_unprotected+0xc5>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
10e113: 39 75 08 cmp %esi,0x8(%ebp)
10e116: 0f 84 d8 00 00 00 je 10e1f4 <_RBTree_Extract_unprotected+0xf8>
the_rbtree->first[RBT_LEFT] = next;
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
10e11c: 39 75 0c cmp %esi,0xc(%ebp)
10e11f: 0f 84 e7 00 00 00 je 10e20c <_RBTree_Extract_unprotected+0x110>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10e125: 8b 5e 04 mov 0x4(%esi),%ebx
10e128: 85 db test %ebx,%ebx
10e12a: 0f 84 00 01 00 00 je 10e230 <_RBTree_Extract_unprotected+0x134>
10e130: 8b 7e 08 mov 0x8(%esi),%edi
10e133: 85 ff test %edi,%edi
10e135: 75 07 jne 10e13e <_RBTree_Extract_unprotected+0x42>
10e137: e9 9d 00 00 00 jmp 10e1d9 <_RBTree_Extract_unprotected+0xdd>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
10e13c: 89 c3 mov %eax,%ebx
10e13e: 8b 43 08 mov 0x8(%ebx),%eax
10e141: 85 c0 test %eax,%eax
10e143: 75 f7 jne 10e13c <_RBTree_Extract_unprotected+0x40>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
10e145: 8b 7b 04 mov 0x4(%ebx),%edi
if(leaf) {
10e148: 85 ff test %edi,%edi
10e14a: 0f 84 d4 00 00 00 je 10e224 <_RBTree_Extract_unprotected+0x128>
leaf->parent = target->parent;
10e150: 8b 03 mov (%ebx),%eax
10e152: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
10e154: 8b 53 0c mov 0xc(%ebx),%edx
dir = target != target->parent->child[0];
10e157: 8b 03 mov (%ebx),%eax
10e159: 31 c9 xor %ecx,%ecx
10e15b: 3b 58 04 cmp 0x4(%eax),%ebx
10e15e: 0f 95 c1 setne %cl
target->parent->child[dir] = leaf;
10e161: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
10e165: 8b 06 mov (%esi),%eax
10e167: 31 c9 xor %ecx,%ecx
10e169: 39 70 04 cmp %esi,0x4(%eax)
10e16c: 0f 95 c1 setne %cl
the_node->parent->child[dir] = target;
10e16f: 89 5c 88 04 mov %ebx,0x4(%eax,%ecx,4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
10e173: 8b 46 08 mov 0x8(%esi),%eax
10e176: 89 43 08 mov %eax,0x8(%ebx)
if (the_node->child[RBT_RIGHT])
10e179: 8b 46 08 mov 0x8(%esi),%eax
10e17c: 85 c0 test %eax,%eax
10e17e: 74 02 je 10e182 <_RBTree_Extract_unprotected+0x86><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
10e180: 89 18 mov %ebx,(%eax)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
10e182: 8b 46 04 mov 0x4(%esi),%eax
10e185: 89 43 04 mov %eax,0x4(%ebx)
if (the_node->child[RBT_LEFT])
10e188: 8b 46 04 mov 0x4(%esi),%eax
10e18b: 85 c0 test %eax,%eax
10e18d: 74 02 je 10e191 <_RBTree_Extract_unprotected+0x95>
the_node->child[RBT_LEFT]->parent = target;
10e18f: 89 18 mov %ebx,(%eax)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
10e191: 8b 06 mov (%esi),%eax
10e193: 89 03 mov %eax,(%ebx)
target->color = the_node->color;
10e195: 8b 46 0c mov 0xc(%esi),%eax
10e198: 89 43 0c mov %eax,0xc(%ebx)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
10e19b: 85 d2 test %edx,%edx
10e19d: 74 2d je 10e1cc <_RBTree_Extract_unprotected+0xd0>
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
10e19f: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
10e1a6: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10e1ad: c7 06 00 00 00 00 movl $0x0,(%esi)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
10e1b3: 8b 45 04 mov 0x4(%ebp),%eax
10e1b6: 85 c0 test %eax,%eax
10e1b8: 74 07 je 10e1c1 <_RBTree_Extract_unprotected+0xc5>
10e1ba: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
}
10e1c1: 83 c4 1c add $0x1c,%esp
10e1c4: 5b pop %ebx
10e1c5: 5e pop %esi
10e1c6: 5f pop %edi
10e1c7: 5d pop %ebp
10e1c8: c3 ret
10e1c9: 8d 76 00 lea 0x0(%esi),%esi
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
if (leaf) {
10e1cc: 85 ff test %edi,%edi
10e1ce: 74 cf je 10e19f <_RBTree_Extract_unprotected+0xa3>
leaf->color = RBT_BLACK; /* case 2 */
10e1d0: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e1d7: eb c6 jmp 10e19f <_RBTree_Extract_unprotected+0xa3>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10e1d9: 89 df mov %ebx,%edi
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
10e1db: 8b 06 mov (%esi),%eax
10e1dd: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
10e1df: 8b 56 0c mov 0xc(%esi),%edx
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
10e1e2: 8b 06 mov (%esi),%eax
10e1e4: 31 c9 xor %ecx,%ecx
10e1e6: 39 70 04 cmp %esi,0x4(%eax)
10e1e9: 0f 95 c1 setne %cl
the_node->parent->child[dir] = leaf;
10e1ec: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
10e1f0: eb a9 jmp 10e19b <_RBTree_Extract_unprotected+0x9f>
10e1f2: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
10e1f4: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e1fb: 00
10e1fc: 89 34 24 mov %esi,(%esp)
10e1ff: e8 00 03 00 00 call 10e504 <_RBTree_Next_unprotected>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
10e204: 89 45 08 mov %eax,0x8(%ebp)
10e207: e9 10 ff ff ff jmp 10e11c <_RBTree_Extract_unprotected+0x20>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
10e20c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10e213: 00
10e214: 89 34 24 mov %esi,(%esp)
10e217: e8 e8 02 00 00 call 10e504 <_RBTree_Next_unprotected>
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
10e21c: 89 45 0c mov %eax,0xc(%ebp)
10e21f: e9 01 ff ff ff jmp 10e125 <_RBTree_Extract_unprotected+0x29>
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
10e224: 89 d8 mov %ebx,%eax
10e226: e8 95 fc ff ff call 10dec0 <_RBTree_Extract_validate_unprotected>
10e22b: e9 24 ff ff ff jmp 10e154 <_RBTree_Extract_unprotected+0x58>
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
10e230: 8b 7e 08 mov 0x8(%esi),%edi
if( leaf ) {
10e233: 85 ff test %edi,%edi
10e235: 75 a4 jne 10e1db <_RBTree_Extract_unprotected+0xdf>
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
10e237: 89 f0 mov %esi,%eax
10e239: e8 82 fc ff ff call 10dec0 <_RBTree_Extract_validate_unprotected>
10e23e: eb 9f jmp 10e1df <_RBTree_Extract_unprotected+0xe3>
0010dec0 <_RBTree_Extract_validate_unprotected>:
)
{
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
10dec0: 8b 10 mov (%eax),%edx
if(!parent->parent) return;
10dec2: 8b 0a mov (%edx),%ecx
10dec4: 85 c9 test %ecx,%ecx
10dec6: 0f 84 8f 00 00 00 je 10df5b <_RBTree_Extract_validate_unprotected+0x9b>
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
10decc: 55 push %ebp
10decd: 57 push %edi
10dece: 56 push %esi
10decf: 53 push %ebx
10ded0: 83 ec 08 sub $0x8,%esp
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10ded3: 8b 4a 04 mov 0x4(%edx),%ecx
10ded6: 39 c8 cmp %ecx,%eax
10ded8: 75 68 jne 10df42 <_RBTree_Extract_validate_unprotected+0x82>
return the_node->parent->child[RBT_RIGHT];
10deda: 8b 4a 08 mov 0x8(%edx),%ecx
10dedd: eb 63 jmp 10df42 <_RBTree_Extract_validate_unprotected+0x82>
10dedf: 90 nop
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
10dee0: 8b 1a mov (%edx),%ebx
10dee2: 85 db test %ebx,%ebx
10dee4: 74 62 je 10df48 <_RBTree_Extract_validate_unprotected+0x88>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10dee6: 85 c9 test %ecx,%ecx
10dee8: 74 0a je 10def4 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN
10deea: 83 79 0c 01 cmpl $0x1,0xc(%ecx)
10deee: 0f 84 18 01 00 00 je 10e00c <_RBTree_Extract_validate_unprotected+0x14c>
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
10def4: 8b 59 08 mov 0x8(%ecx),%ebx
10def7: 85 db test %ebx,%ebx
10def9: 74 06 je 10df01 <_RBTree_Extract_validate_unprotected+0x41>
10defb: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10deff: 74 5b je 10df5c <_RBTree_Extract_validate_unprotected+0x9c>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
10df01: 8b 59 04 mov 0x4(%ecx),%ebx
10df04: 85 db test %ebx,%ebx
10df06: 74 06 je 10df0e <_RBTree_Extract_validate_unprotected+0x4e>
10df08: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10df0c: 74 4e je 10df5c <_RBTree_Extract_validate_unprotected+0x9c>
sibling->color = RBT_RED;
10df0e: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
10df15: 83 7a 0c 01 cmpl $0x1,0xc(%edx)
10df19: 0f 84 d1 01 00 00 je 10e0f0 <_RBTree_Extract_validate_unprotected+0x230>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
10df1f: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10df21: 85 db test %ebx,%ebx
10df23: 0f 84 3b 01 00 00 je 10e064 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
10df29: 8b 3b mov (%ebx),%edi
10df2b: 85 ff test %edi,%edi
10df2d: 0f 84 31 01 00 00 je 10e064 <_RBTree_Extract_validate_unprotected+0x1a4>
if(the_node == the_node->parent->child[RBT_LEFT])
10df33: 8b 4b 04 mov 0x4(%ebx),%ecx
10df36: 39 ca cmp %ecx,%edx
10df38: 0f 84 2e 01 00 00 je 10e06c <_RBTree_Extract_validate_unprotected+0x1ac>
10df3e: 89 d0 mov %edx,%eax
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10df40: 89 da mov %ebx,%edx
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10df42: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10df46: 75 98 jne 10dee0 <_RBTree_Extract_validate_unprotected+0x20>
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10df48: 8b 10 mov (%eax),%edx
10df4a: 8b 32 mov (%edx),%esi
10df4c: 85 f6 test %esi,%esi
10df4e: 0f 84 8e 01 00 00 je 10e0e2 <_RBTree_Extract_validate_unprotected+0x222>
}
10df54: 83 c4 08 add $0x8,%esp
10df57: 5b pop %ebx
10df58: 5e pop %esi
10df59: 5f pop %edi
10df5a: 5d pop %ebp
10df5b: c3 ret
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
10df5c: 3b 42 04 cmp 0x4(%edx),%eax
10df5f: 0f 95 c3 setne %bl
10df62: 89 dd mov %ebx,%ebp
10df64: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10df67: 83 f3 01 xor $0x1,%ebx
10df6a: 0f b6 db movzbl %bl,%ebx
10df6d: 89 1c 24 mov %ebx,(%esp)
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
10df70: 8b 7c 99 04 mov 0x4(%ecx,%ebx,4),%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10df74: 85 ff test %edi,%edi
10df76: 74 0a je 10df82 <_RBTree_Extract_validate_unprotected+0xc2>
10df78: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10df7c: 0f 84 f9 00 00 00 je 10e07b <_RBTree_Extract_validate_unprotected+0x1bb>
sibling->color = RBT_RED;
10df82: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
sibling->child[dir]->color = RBT_BLACK;
10df89: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10df8d: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10df94: 89 eb mov %ebp,%ebx
10df96: 0f b6 eb movzbl %bl,%ebp
10df99: 89 6c 24 04 mov %ebp,0x4(%esp)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10df9d: 8b 6c a9 04 mov 0x4(%ecx,%ebp,4),%ebp
10dfa1: 85 ed test %ebp,%ebp
10dfa3: 74 36 je 10dfdb <_RBTree_Extract_validate_unprotected+0x11b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10dfa5: 8b 3c 24 mov (%esp),%edi
10dfa8: 8b 5c bd 04 mov 0x4(%ebp,%edi,4),%ebx
10dfac: 8b 7c 24 04 mov 0x4(%esp),%edi
10dfb0: 89 5c b9 04 mov %ebx,0x4(%ecx,%edi,4)
if (c->child[dir])
10dfb4: 8b 1c 24 mov (%esp),%ebx
10dfb7: 8b 7c 9d 04 mov 0x4(%ebp,%ebx,4),%edi
10dfbb: 85 ff test %edi,%edi
10dfbd: 74 02 je 10dfc1 <_RBTree_Extract_validate_unprotected+0x101>
c->child[dir]->parent = the_node;
10dfbf: 89 0f mov %ecx,(%edi)
c->child[dir] = the_node;
10dfc1: 8b 3c 24 mov (%esp),%edi
10dfc4: 89 4c bd 04 mov %ecx,0x4(%ebp,%edi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10dfc8: 8b 39 mov (%ecx),%edi
10dfca: 31 db xor %ebx,%ebx
10dfcc: 3b 4f 04 cmp 0x4(%edi),%ecx
10dfcf: 0f 95 c3 setne %bl
10dfd2: 89 6c 9f 04 mov %ebp,0x4(%edi,%ebx,4)
c->parent = the_node->parent;
10dfd6: 89 7d 00 mov %edi,0x0(%ebp)
the_node->parent = c;
10dfd9: 89 29 mov %ebp,(%ecx)
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
10dfdb: 8b 3c 24 mov (%esp),%edi
10dfde: 8b 7c ba 04 mov 0x4(%edx,%edi,4),%edi
10dfe2: 89 7c 24 04 mov %edi,0x4(%esp)
10dfe6: 8b 2c 24 mov (%esp),%ebp
10dfe9: 8b 4c af 04 mov 0x4(%edi,%ebp,4),%ecx
}
sibling->color = parent->color;
10dfed: 8b 7a 0c mov 0xc(%edx),%edi
10dff0: 8b 5c 24 04 mov 0x4(%esp),%ebx
10dff4: 89 7b 0c mov %edi,0xc(%ebx)
parent->color = RBT_BLACK;
10dff7: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10dffe: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
10e005: e9 95 00 00 00 jmp 10e09f <_RBTree_Extract_validate_unprotected+0x1df>
10e00a: 66 90 xchg %ax,%ax
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
10e00c: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
sibling->color = RBT_BLACK;
10e013: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
dir = the_node != parent->child[0];
10e01a: 39 42 04 cmp %eax,0x4(%edx)
10e01d: 0f 95 c3 setne %bl
10e020: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e023: 83 f3 01 xor $0x1,%ebx
10e026: 0f b6 eb movzbl %bl,%ebp
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e029: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e02d: 85 c9 test %ecx,%ecx
10e02f: 74 43 je 10e074 <_RBTree_Extract_validate_unprotected+0x1b4><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e031: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e035: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
if (c->child[dir])
10e039: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e03d: 85 ff test %edi,%edi
10e03f: 74 02 je 10e043 <_RBTree_Extract_validate_unprotected+0x183><== NEVER TAKEN
c->child[dir]->parent = the_node;
10e041: 89 17 mov %edx,(%edi)
c->child[dir] = the_node;
10e043: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e047: 8b 32 mov (%edx),%esi
10e049: 31 db xor %ebx,%ebx
10e04b: 3b 56 04 cmp 0x4(%esi),%edx
10e04e: 0f 95 c3 setne %bl
10e051: 89 df mov %ebx,%edi
10e053: 89 4c be 04 mov %ecx,0x4(%esi,%edi,4)
c->parent = the_node->parent;
10e057: 89 31 mov %esi,(%ecx)
the_node->parent = c;
10e059: 89 0a mov %ecx,(%edx)
10e05b: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e05f: e9 90 fe ff ff jmp 10def4 <_RBTree_Extract_validate_unprotected+0x34>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10e064: 31 c9 xor %ecx,%ecx
10e066: e9 d3 fe ff ff jmp 10df3e <_RBTree_Extract_validate_unprotected+0x7e>
10e06b: 90 nop
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
10e06c: 8b 4b 08 mov 0x8(%ebx),%ecx
10e06f: e9 ca fe ff ff jmp 10df3e <_RBTree_Extract_validate_unprotected+0x7e>
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e074: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10e076: e9 79 fe ff ff jmp 10def4 <_RBTree_Extract_validate_unprotected+0x34><== NOT EXECUTED
10e07b: 8b 6c 9a 04 mov 0x4(%edx,%ebx,4),%ebp
10e07f: 89 6c 24 04 mov %ebp,0x4(%esp)
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
sibling->color = parent->color;
10e083: 8b 5a 0c mov 0xc(%edx),%ebx
10e086: 89 59 0c mov %ebx,0xc(%ecx)
parent->color = RBT_BLACK;
10e089: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10e090: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e097: 85 ed test %ebp,%ebp
10e099: 0f 84 a9 fe ff ff je 10df48 <_RBTree_Extract_validate_unprotected+0x88><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e09f: 8b 7c 24 04 mov 0x4(%esp),%edi
10e0a3: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e0a7: 8b 2c 24 mov (%esp),%ebp
10e0aa: 89 4c aa 04 mov %ecx,0x4(%edx,%ebp,4)
if (c->child[dir])
10e0ae: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e0b2: 85 c9 test %ecx,%ecx
10e0b4: 74 02 je 10e0b8 <_RBTree_Extract_validate_unprotected+0x1f8>
c->child[dir]->parent = the_node;
10e0b6: 89 11 mov %edx,(%ecx)
c->child[dir] = the_node;
10e0b8: 8b 4c 24 04 mov 0x4(%esp),%ecx
10e0bc: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e0c0: 8b 0a mov (%edx),%ecx
10e0c2: 31 db xor %ebx,%ebx
10e0c4: 3b 51 04 cmp 0x4(%ecx),%edx
10e0c7: 0f 95 c3 setne %bl
10e0ca: 8b 74 24 04 mov 0x4(%esp),%esi
10e0ce: 89 74 99 04 mov %esi,0x4(%ecx,%ebx,4)
c->parent = the_node->parent;
10e0d2: 89 0e mov %ecx,(%esi)
the_node->parent = c;
10e0d4: 89 32 mov %esi,(%edx)
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10e0d6: 8b 10 mov (%eax),%edx
10e0d8: 8b 32 mov (%edx),%esi
10e0da: 85 f6 test %esi,%esi
10e0dc: 0f 85 72 fe ff ff jne 10df54 <_RBTree_Extract_validate_unprotected+0x94><== ALWAYS TAKEN
10e0e2: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10e0e9: e9 66 fe ff ff jmp 10df54 <_RBTree_Extract_validate_unprotected+0x94>
10e0ee: 66 90 xchg %ax,%ax
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
10e0f0: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
break;
10e0f7: e9 4c fe ff ff jmp 10df48 <_RBTree_Extract_validate_unprotected+0x88>
0010e7c0 <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
10e7c0: 55 push %ebp
10e7c1: 57 push %edi
10e7c2: 56 push %esi
10e7c3: 53 push %ebx
10e7c4: 83 ec 2c sub $0x2c,%esp
10e7c7: 8b 5c 24 40 mov 0x40(%esp),%ebx
10e7cb: 8b 74 24 44 mov 0x44(%esp),%esi
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10e7cf: 9c pushf
10e7d0: fa cli
10e7d1: 8f 44 24 1c popl 0x1c(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10e7d5: 8b 6b 04 mov 0x4(%ebx),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e7d8: 31 ff xor %edi,%edi
10e7da: 85 ed test %ebp,%ebp
10e7dc: 74 28 je 10e806 <_RBTree_Find+0x46> <== NEVER TAKEN
10e7de: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(the_node, iter_node);
10e7e0: 89 6c 24 04 mov %ebp,0x4(%esp)
10e7e4: 89 34 24 mov %esi,(%esp)
10e7e7: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10e7ea: 85 c0 test %eax,%eax
10e7ec: 75 08 jne 10e7f6 <_RBTree_Find+0x36>
found = iter_node;
if ( the_rbtree->is_unique )
10e7ee: 89 ef mov %ebp,%edi
10e7f0: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10e7f4: 75 10 jne 10e806 <_RBTree_Find+0x46>
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10e7f6: 85 c0 test %eax,%eax
10e7f8: 0f 9f c0 setg %al
10e7fb: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10e7fe: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e802: 85 ed test %ebp,%ebp
10e804: 75 da jne 10e7e0 <_RBTree_Find+0x20>
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
10e806: ff 74 24 1c pushl 0x1c(%esp)
10e80a: 9d popf
return return_node;
}
10e80b: 89 f8 mov %edi,%eax
10e80d: 83 c4 2c add $0x2c,%esp
10e810: 5b pop %ebx
10e811: 5e pop %esi
10e812: 5f pop %edi
10e813: 5d pop %ebp
10e814: c3 ret
0010eb08 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
10eb08: 55 push %ebp
10eb09: 57 push %edi
10eb0a: 56 push %esi
10eb0b: 53 push %ebx
10eb0c: 83 ec 1c sub $0x1c,%esp
10eb0f: 8b 7c 24 30 mov 0x30(%esp),%edi
10eb13: 8b 5c 24 3c mov 0x3c(%esp),%ebx
10eb17: 8b 6c 24 40 mov 0x40(%esp),%ebp
10eb1b: 8b 44 24 44 mov 0x44(%esp),%eax
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
10eb1f: 85 ff test %edi,%edi
10eb21: 74 3e je 10eb61 <_RBTree_Initialize+0x59><== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10eb23: c7 07 00 00 00 00 movl $0x0,(%edi)
the_rbtree->root = NULL;
10eb29: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
the_rbtree->first[0] = NULL;
10eb30: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
the_rbtree->first[1] = NULL;
10eb37: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
the_rbtree->compare_function = compare_function;
10eb3e: 8b 54 24 34 mov 0x34(%esp),%edx
10eb42: 89 57 10 mov %edx,0x10(%edi)
the_rbtree->is_unique = is_unique;
10eb45: 88 47 14 mov %al,0x14(%edi)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10eb48: 85 db test %ebx,%ebx
10eb4a: 74 15 je 10eb61 <_RBTree_Initialize+0x59><== NEVER TAKEN
10eb4c: 8b 74 24 38 mov 0x38(%esp),%esi
_RBTree_Insert_unprotected(the_rbtree, next);
10eb50: 89 74 24 04 mov %esi,0x4(%esp)
10eb54: 89 3c 24 mov %edi,(%esp)
10eb57: e8 e8 fc ff ff call 10e844 <_RBTree_Insert_unprotected>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
10eb5c: 01 ee add %ebp,%esi
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10eb5e: 4b dec %ebx
10eb5f: 75 ef jne 10eb50 <_RBTree_Initialize+0x48>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
10eb61: 83 c4 1c add $0x1c,%esp
10eb64: 5b pop %ebx
10eb65: 5e pop %esi
10eb66: 5f pop %edi
10eb67: 5d pop %ebp
10eb68: c3 ret
0010e264 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e264: 55 push %ebp
10e265: 57 push %edi
10e266: 56 push %esi
10e267: 53 push %ebx
10e268: 83 ec 2c sub $0x2c,%esp
10e26b: 8b 6c 24 40 mov 0x40(%esp),%ebp
10e26f: 8b 5c 24 44 mov 0x44(%esp),%ebx
if(!the_node) return (RBTree_Node*)-1;
10e273: 85 db test %ebx,%ebx
10e275: 0f 84 c5 01 00 00 je 10e440 <_RBTree_Insert_unprotected+0x1dc>
RBTree_Node *iter_node = the_rbtree->root;
10e27b: 8b 7d 04 mov 0x4(%ebp),%edi
int compare_result;
if (!iter_node) { /* special case: first node inserted */
10e27e: 85 ff test %edi,%edi
10e280: 75 08 jne 10e28a <_RBTree_Insert_unprotected+0x26>
10e282: e9 d6 01 00 00 jmp 10e45d <_RBTree_Insert_unprotected+0x1f9>
10e287: 90 nop
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
10e288: 89 d7 mov %edx,%edi
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10e28a: 89 7c 24 04 mov %edi,0x4(%esp)
10e28e: 89 1c 24 mov %ebx,(%esp)
10e291: ff 55 10 call *0x10(%ebp)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e294: 80 7d 14 00 cmpb $0x0,0x14(%ebp)
10e298: 74 08 je 10e2a2 <_RBTree_Insert_unprotected+0x3e>
10e29a: 85 c0 test %eax,%eax
10e29c: 0f 84 b2 01 00 00 je 10e454 <_RBTree_Insert_unprotected+0x1f0>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
10e2a2: f7 d0 not %eax
10e2a4: c1 e8 1f shr $0x1f,%eax
if (!iter_node->child[dir]) {
10e2a7: 8b 54 87 04 mov 0x4(%edi,%eax,4),%edx
10e2ab: 85 d2 test %edx,%edx
10e2ad: 75 d9 jne 10e288 <_RBTree_Insert_unprotected+0x24>
10e2af: 89 54 24 1c mov %edx,0x1c(%esp)
10e2b3: 89 c6 mov %eax,%esi
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e2b5: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e2bc: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_node->color = RBT_RED;
10e2c3: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
iter_node->child[dir] = the_node;
10e2ca: 89 5c 87 04 mov %ebx,0x4(%edi,%eax,4)
the_node->parent = iter_node;
10e2ce: 89 3b mov %edi,(%ebx)
/* update min/max */
compare_result = the_rbtree->compare_function(
10e2d0: 8b 44 85 08 mov 0x8(%ebp,%eax,4),%eax
10e2d4: 89 44 24 04 mov %eax,0x4(%esp)
10e2d8: 89 1c 24 mov %ebx,(%esp)
10e2db: ff 55 10 call *0x10(%ebp)
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
10e2de: 85 f6 test %esi,%esi
10e2e0: 75 2e jne 10e310 <_RBTree_Insert_unprotected+0xac>
10e2e2: 85 c0 test %eax,%eax
10e2e4: 78 2e js 10e314 <_RBTree_Insert_unprotected+0xb0>
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e2e6: 89 5c 24 18 mov %ebx,0x18(%esp)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e2ea: 8b 54 24 18 mov 0x18(%esp),%edx
10e2ee: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e2f0: 8b 10 mov (%eax),%edx
10e2f2: 89 d1 mov %edx,%ecx
10e2f4: 85 d2 test %edx,%edx
10e2f6: 0f 84 03 01 00 00 je 10e3ff <_RBTree_Insert_unprotected+0x19b>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e2fc: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10e300: 74 1a je 10e31c <_RBTree_Insert_unprotected+0xb8>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e302: 8b 44 24 1c mov 0x1c(%esp),%eax
10e306: 83 c4 2c add $0x2c,%esp
10e309: 5b pop %ebx
10e30a: 5e pop %esi
10e30b: 5f pop %edi
10e30c: 5d pop %ebp
10e30d: c3 ret
10e30e: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
(dir && _RBTree_Is_greater(compare_result)) ) {
10e310: 85 c0 test %eax,%eax
10e312: 7e d2 jle 10e2e6 <_RBTree_Insert_unprotected+0x82>
the_rbtree->first[dir] = the_node;
10e314: 89 5c b5 08 mov %ebx,0x8(%ebp,%esi,4)
10e318: eb cc jmp 10e2e6 <_RBTree_Insert_unprotected+0x82>
10e31a: 66 90 xchg %ax,%ax
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
10e31c: 8b 1a mov (%edx),%ebx
10e31e: 85 db test %ebx,%ebx
10e320: 8b 72 04 mov 0x4(%edx),%esi
10e323: 74 18 je 10e33d <_RBTree_Insert_unprotected+0xd9><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10e325: 39 f0 cmp %esi,%eax
10e327: 0f 84 0b 01 00 00 je 10e438 <_RBTree_Insert_unprotected+0x1d4>
10e32d: 89 f7 mov %esi,%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e32f: 85 ff test %edi,%edi
10e331: 74 0a je 10e33d <_RBTree_Insert_unprotected+0xd9>
10e333: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10e337: 0f 84 db 00 00 00 je 10e418 <_RBTree_Insert_unprotected+0x1b4>
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
10e33d: 31 db xor %ebx,%ebx
10e33f: 39 f0 cmp %esi,%eax
10e341: 0f 95 c3 setne %bl
10e344: 89 de mov %ebx,%esi
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
10e346: 8b 5c 24 18 mov 0x18(%esp),%ebx
10e34a: 3b 58 04 cmp 0x4(%eax),%ebx
10e34d: 0f 95 c3 setne %bl
10e350: 0f b6 db movzbl %bl,%ebx
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
10e353: 39 f3 cmp %esi,%ebx
10e355: 74 46 je 10e39d <_RBTree_Insert_unprotected+0x139>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e357: 89 f3 mov %esi,%ebx
10e359: 83 f3 01 xor $0x1,%ebx
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e35c: 8b 7c 98 04 mov 0x4(%eax,%ebx,4),%edi
10e360: 85 ff test %edi,%edi
10e362: 74 2b je 10e38f <_RBTree_Insert_unprotected+0x12b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e364: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e368: 89 6c 98 04 mov %ebp,0x4(%eax,%ebx,4)
if (c->child[dir])
10e36c: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e370: 85 ed test %ebp,%ebp
10e372: 74 05 je 10e379 <_RBTree_Insert_unprotected+0x115>
c->child[dir]->parent = the_node;
10e374: 89 45 00 mov %eax,0x0(%ebp)
10e377: 8b 10 mov (%eax),%edx
c->child[dir] = the_node;
10e379: 89 44 b7 04 mov %eax,0x4(%edi,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e37d: 31 db xor %ebx,%ebx
10e37f: 3b 42 04 cmp 0x4(%edx),%eax
10e382: 0f 95 c3 setne %bl
10e385: 89 dd mov %ebx,%ebp
10e387: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
c->parent = the_node->parent;
10e38b: 89 17 mov %edx,(%edi)
the_node->parent = c;
10e38d: 89 38 mov %edi,(%eax)
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
10e38f: 8b 44 24 18 mov 0x18(%esp),%eax
10e393: 8b 44 b0 04 mov 0x4(%eax,%esi,4),%eax
10e397: 89 44 24 18 mov %eax,0x18(%esp)
10e39b: 8b 00 mov (%eax),%eax
}
the_node->parent->color = RBT_BLACK;
10e39d: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
g->color = RBT_RED;
10e3a4: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e3ab: ba 01 00 00 00 mov $0x1,%edx
10e3b0: 29 f2 sub %esi,%edx
10e3b2: 89 d6 mov %edx,%esi
10e3b4: 83 f6 01 xor $0x1,%esi
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e3b7: 8b 44 b1 04 mov 0x4(%ecx,%esi,4),%eax
10e3bb: 85 c0 test %eax,%eax
10e3bd: 0f 84 27 ff ff ff je 10e2ea <_RBTree_Insert_unprotected+0x86><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e3c3: 8b 7c 90 04 mov 0x4(%eax,%edx,4),%edi
10e3c7: 89 7c b1 04 mov %edi,0x4(%ecx,%esi,4)
if (c->child[dir])
10e3cb: 8b 74 90 04 mov 0x4(%eax,%edx,4),%esi
10e3cf: 85 f6 test %esi,%esi
10e3d1: 74 02 je 10e3d5 <_RBTree_Insert_unprotected+0x171>
c->child[dir]->parent = the_node;
10e3d3: 89 0e mov %ecx,(%esi)
c->child[dir] = the_node;
10e3d5: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e3d9: 8b 11 mov (%ecx),%edx
10e3db: 31 db xor %ebx,%ebx
10e3dd: 3b 4a 04 cmp 0x4(%edx),%ecx
10e3e0: 0f 95 c3 setne %bl
10e3e3: 89 de mov %ebx,%esi
10e3e5: 89 44 b2 04 mov %eax,0x4(%edx,%esi,4)
c->parent = the_node->parent;
10e3e9: 89 10 mov %edx,(%eax)
the_node->parent = c;
10e3eb: 89 01 mov %eax,(%ecx)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e3ed: 8b 54 24 18 mov 0x18(%esp),%edx
10e3f1: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e3f3: 8b 10 mov (%eax),%edx
10e3f5: 89 d1 mov %edx,%ecx
10e3f7: 85 d2 test %edx,%edx
10e3f9: 0f 85 fd fe ff ff jne 10e2fc <_RBTree_Insert_unprotected+0x98><== ALWAYS TAKEN
10e3ff: 8b 5c 24 18 mov 0x18(%esp),%ebx
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10e403: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e40a: 8b 44 24 1c mov 0x1c(%esp),%eax
10e40e: 83 c4 2c add $0x2c,%esp
10e411: 5b pop %ebx
10e412: 5e pop %esi
10e413: 5f pop %edi
10e414: 5d pop %ebp
10e415: c3 ret
10e416: 66 90 xchg %ax,%ax
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
10e418: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
u->color = RBT_BLACK;
10e41f: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
g->color = RBT_RED;
10e426: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
10e42d: 89 54 24 18 mov %edx,0x18(%esp)
10e431: e9 b4 fe ff ff jmp 10e2ea <_RBTree_Insert_unprotected+0x86>
10e436: 66 90 xchg %ax,%ax
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
10e438: 8b 7a 08 mov 0x8(%edx),%edi
10e43b: e9 ef fe ff ff jmp 10e32f <_RBTree_Insert_unprotected+0xcb>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
10e440: c7 44 24 1c ff ff ff movl $0xffffffff,0x1c(%esp)
10e447: ff
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e448: 8b 44 24 1c mov 0x1c(%esp),%eax
10e44c: 83 c4 2c add $0x2c,%esp
10e44f: 5b pop %ebx
10e450: 5e pop %esi
10e451: 5f pop %edi
10e452: 5d pop %ebp
10e453: c3 ret
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e454: 89 7c 24 1c mov %edi,0x1c(%esp)
10e458: e9 a5 fe ff ff jmp 10e302 <_RBTree_Insert_unprotected+0x9e>
RBTree_Node *iter_node = the_rbtree->root;
int compare_result;
if (!iter_node) { /* special case: first node inserted */
the_node->color = RBT_BLACK;
10e45d: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->root = the_node;
10e464: 89 5d 04 mov %ebx,0x4(%ebp)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
10e467: 89 5d 0c mov %ebx,0xc(%ebp)
10e46a: 89 5d 08 mov %ebx,0x8(%ebp)
the_node->parent = (RBTree_Node *) the_rbtree;
10e46d: 89 2b mov %ebp,(%ebx)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e46f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e476: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
10e47d: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
10e484: 00
10e485: e9 78 fe ff ff jmp 10e302 <_RBTree_Insert_unprotected+0x9e>
0010e4b0 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
10e4b0: 55 push %ebp
10e4b1: 57 push %edi
10e4b2: 56 push %esi
10e4b3: 53 push %ebx
10e4b4: 83 ec 1c sub $0x1c,%esp
10e4b7: 8b 74 24 34 mov 0x34(%esp),%esi
10e4bb: 8b 6c 24 38 mov 0x38(%esp),%ebp
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e4bf: 31 d2 xor %edx,%edx
10e4c1: 85 f6 test %esi,%esi
10e4c3: 0f 94 c2 sete %dl
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
10e4c6: 8b 44 24 30 mov 0x30(%esp),%eax
10e4ca: 8b 5c 90 08 mov 0x8(%eax,%edx,4),%ebx
10e4ce: 66 90 xchg %ax,%ax
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e4d0: 85 db test %ebx,%ebx
10e4d2: 74 27 je 10e4fb <_RBTree_Iterate_unprotected+0x4b>
stop = (*visitor)( current, dir, visitor_arg );
10e4d4: 8b 44 24 3c mov 0x3c(%esp),%eax
10e4d8: 89 44 24 08 mov %eax,0x8(%esp)
10e4dc: 89 74 24 04 mov %esi,0x4(%esp)
10e4e0: 89 1c 24 mov %ebx,(%esp)
10e4e3: ff d5 call *%ebp
10e4e5: 89 c7 mov %eax,%edi
current = _RBTree_Next_unprotected( current, dir );
10e4e7: 89 74 24 04 mov %esi,0x4(%esp)
10e4eb: 89 1c 24 mov %ebx,(%esp)
10e4ee: e8 11 00 00 00 call 10e504 <_RBTree_Next_unprotected>
10e4f3: 89 c3 mov %eax,%ebx
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e4f5: 89 f8 mov %edi,%eax
10e4f7: 84 c0 test %al,%al
10e4f9: 74 d5 je 10e4d0 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
10e4fb: 83 c4 1c add $0x1c,%esp
10e4fe: 5b pop %ebx
10e4ff: 5e pop %esi
10e500: 5f pop %edi
10e501: 5d pop %ebp
10e502: c3 ret
0010bda0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10bda0: 55 push %ebp
10bda1: 57 push %edi
10bda2: 56 push %esi
10bda3: 53 push %ebx
10bda4: 83 ec 3c sub $0x3c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10bda7: 8b 1d ec b1 12 00 mov 0x12b1ec,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10bdad: 8b 3d e8 b1 12 00 mov 0x12b1e8,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10bdb3: 85 db test %ebx,%ebx
10bdb5: 74 61 je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bdb7: 85 ff test %edi,%edi
10bdb9: 74 5d je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78><== NEVER TAKEN
10bdbb: 31 f6 xor %esi,%esi
10bdbd: 8d 6c 24 2c lea 0x2c(%esp),%ebp
10bdc1: 8d 76 00 lea 0x0(%esi),%esi
return_value = rtems_task_create(
10bdc4: 89 6c 24 14 mov %ebp,0x14(%esp)
10bdc8: 8b 43 0c mov 0xc(%ebx),%eax
10bdcb: 89 44 24 10 mov %eax,0x10(%esp)
10bdcf: 8b 43 14 mov 0x14(%ebx),%eax
10bdd2: 89 44 24 0c mov %eax,0xc(%esp)
10bdd6: 8b 43 04 mov 0x4(%ebx),%eax
10bdd9: 89 44 24 08 mov %eax,0x8(%esp)
10bddd: 8b 43 08 mov 0x8(%ebx),%eax
10bde0: 89 44 24 04 mov %eax,0x4(%esp)
10bde4: 8b 03 mov (%ebx),%eax
10bde6: 89 04 24 mov %eax,(%esp)
10bde9: e8 5a fd ff ff call 10bb48 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10bdee: 85 c0 test %eax,%eax
10bdf0: 75 2e jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bdf2: 8b 43 18 mov 0x18(%ebx),%eax
10bdf5: 89 44 24 08 mov %eax,0x8(%esp)
10bdf9: 8b 43 10 mov 0x10(%ebx),%eax
10bdfc: 89 44 24 04 mov %eax,0x4(%esp)
10be00: 8b 44 24 2c mov 0x2c(%esp),%eax
10be04: 89 04 24 mov %eax,(%esp)
10be07: e8 2c 00 00 00 call 10be38 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10be0c: 85 c0 test %eax,%eax
10be0e: 75 10 jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10be10: 46 inc %esi
10be11: 83 c3 1c add $0x1c,%ebx
10be14: 39 fe cmp %edi,%esi
10be16: 75 ac jne 10bdc4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10be18: 83 c4 3c add $0x3c,%esp
10be1b: 5b pop %ebx
10be1c: 5e pop %esi
10be1d: 5f pop %edi
10be1e: 5d pop %ebp
10be1f: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10be20: 89 44 24 08 mov %eax,0x8(%esp)
10be24: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10be2b: 00
10be2c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10be33: e8 88 0d 00 00 call 10cbc0 <_Internal_error_Occurred>
00110a64 <_RTEMS_tasks_Post_switch_extension>:
*/
static void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
110a64: 57 push %edi
110a65: 56 push %esi
110a66: 53 push %ebx
110a67: 83 ec 20 sub $0x20,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
110a6a: 8b 44 24 30 mov 0x30(%esp),%eax
110a6e: 8b 98 e0 00 00 00 mov 0xe0(%eax),%ebx
if ( !api )
110a74: 85 db test %ebx,%ebx
110a76: 74 13 je 110a8b <_RTEMS_tasks_Post_switch_extension+0x27><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
110a78: 9c pushf
110a79: fa cli
110a7a: 58 pop %eax
signal_set = asr->signals_posted;
110a7b: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
110a7e: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
110a85: 50 push %eax
110a86: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
110a87: 85 f6 test %esi,%esi
110a89: 75 09 jne 110a94 <_RTEMS_tasks_Post_switch_extension+0x30>
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
110a8b: 83 c4 20 add $0x20,%esp
110a8e: 5b pop %ebx
110a8f: 5e pop %esi
110a90: 5f pop %edi
110a91: c3 ret
110a92: 66 90 xchg %ax,%ax
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
110a94: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
110a97: 8d 7c 24 1c lea 0x1c(%esp),%edi
110a9b: 89 7c 24 08 mov %edi,0x8(%esp)
110a9f: c7 44 24 04 ff ff 00 movl $0xffff,0x4(%esp)
110aa6: 00
110aa7: 8b 43 10 mov 0x10(%ebx),%eax
110aaa: 89 04 24 mov %eax,(%esp)
110aad: e8 16 1e 00 00 call 1128c8 <rtems_task_mode>
(*asr->handler)( signal_set );
110ab2: 89 34 24 mov %esi,(%esp)
110ab5: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
110ab8: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
110abb: 89 7c 24 08 mov %edi,0x8(%esp)
110abf: c7 44 24 04 ff ff 00 movl $0xffff,0x4(%esp)
110ac6: 00
110ac7: 8b 44 24 1c mov 0x1c(%esp),%eax
110acb: 89 04 24 mov %eax,(%esp)
110ace: e8 f5 1d 00 00 call 1128c8 <rtems_task_mode>
}
110ad3: 83 c4 20 add $0x20,%esp
110ad6: 5b pop %ebx
110ad7: 5e pop %esi
110ad8: 5f pop %edi
110ad9: c3 ret
00110920 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
110920: 8b 44 24 04 mov 0x4(%esp),%eax
110924: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
while (tvp) {
11092a: 85 c0 test %eax,%eax
11092c: 74 15 je 110943 <_RTEMS_tasks_Switch_extension+0x23>
11092e: 66 90 xchg %ax,%ax
tvp->tval = *tvp->ptr;
110930: 8b 50 04 mov 0x4(%eax),%edx
110933: 8b 0a mov (%edx),%ecx
110935: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
110938: 8b 48 08 mov 0x8(%eax),%ecx
11093b: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
11093d: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
11093f: 85 c0 test %eax,%eax
110941: 75 ed jne 110930 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
110943: 8b 44 24 08 mov 0x8(%esp),%eax
110947: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
while (tvp) {
11094d: 85 c0 test %eax,%eax
11094f: 74 17 je 110968 <_RTEMS_tasks_Switch_extension+0x48>
110951: 8d 76 00 lea 0x0(%esi),%esi
tvp->gval = *tvp->ptr;
110954: 8b 50 04 mov 0x4(%eax),%edx
110957: 8b 0a mov (%edx),%ecx
110959: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
11095c: 8b 48 0c mov 0xc(%eax),%ecx
11095f: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110961: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
110963: 85 c0 test %eax,%eax
110965: 75 ed jne 110954 <_RTEMS_tasks_Switch_extension+0x34><== NEVER TAKEN
110967: c3 ret
110968: c3 ret
001373e8 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
1373e8: 55 push %ebp
1373e9: 57 push %edi
1373ea: 56 push %esi
1373eb: 53 push %ebx
1373ec: 83 ec 2c sub $0x2c,%esp
1373ef: 8b 74 24 40 mov 0x40(%esp),%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
1373f3: 8b 7e 40 mov 0x40(%esi),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
1373f6: 8d 44 24 18 lea 0x18(%esp),%eax
1373fa: 89 04 24 mov %eax,(%esp)
1373fd: e8 a6 bd fd ff call 1131a8 <_TOD_Get_uptime>
_Timestamp_Subtract(
137402: 8b 44 24 18 mov 0x18(%esp),%eax
137406: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
13740a: 89 c1 mov %eax,%ecx
13740c: 89 d3 mov %edx,%ebx
13740e: 2b 4e 4c sub 0x4c(%esi),%ecx
137411: 1b 5e 50 sbb 0x50(%esi),%ebx
137414: 8b 6c 24 44 mov 0x44(%esp),%ebp
137418: 89 4d 00 mov %ecx,0x0(%ebp)
13741b: 89 5d 04 mov %ebx,0x4(%ebp)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
13741e: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx
137424: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
13742a: 39 3d cc b3 17 00 cmp %edi,0x17b3cc
137430: 74 0a je 13743c <_Rate_monotonic_Get_status+0x54>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
137432: b0 01 mov $0x1,%al
}
137434: 83 c4 2c add $0x2c,%esp
137437: 5b pop %ebx
137438: 5e pop %esi
137439: 5f pop %edi
13743a: 5d pop %ebp
13743b: c3 ret
13743c: 2b 05 dc b3 17 00 sub 0x17b3dc,%eax
137442: 1b 15 e0 b3 17 00 sbb 0x17b3e0,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
137448: 01 c8 add %ecx,%eax
13744a: 11 da adc %ebx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
13744c: 8b 4e 44 mov 0x44(%esi),%ecx
13744f: 8b 5e 48 mov 0x48(%esi),%ebx
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
137452: 39 d3 cmp %edx,%ebx
137454: 7f 06 jg 13745c <_Rate_monotonic_Get_status+0x74><== NEVER TAKEN
137456: 7c 08 jl 137460 <_Rate_monotonic_Get_status+0x78>
137458: 39 c1 cmp %eax,%ecx
13745a: 76 04 jbe 137460 <_Rate_monotonic_Get_status+0x78>
return false;
13745c: 31 c0 xor %eax,%eax
13745e: eb d4 jmp 137434 <_Rate_monotonic_Get_status+0x4c>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
137460: 29 c8 sub %ecx,%eax
137462: 19 da sbb %ebx,%edx
137464: 8b 4c 24 48 mov 0x48(%esp),%ecx
137468: 89 01 mov %eax,(%ecx)
13746a: 89 51 04 mov %edx,0x4(%ecx)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
13746d: b0 01 mov $0x1,%al
}
13746f: 83 c4 2c add $0x2c,%esp
137472: 5b pop %ebx
137473: 5e pop %esi
137474: 5f pop %edi
137475: 5d pop %ebp
137476: c3 ret
00137778 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
137778: 83 ec 3c sub $0x3c,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
13777b: 8d 44 24 2c lea 0x2c(%esp),%eax
13777f: 89 44 24 08 mov %eax,0x8(%esp)
137783: 8b 44 24 40 mov 0x40(%esp),%eax
137787: 89 44 24 04 mov %eax,0x4(%esp)
13778b: c7 04 24 20 b6 17 00 movl $0x17b620,(%esp)
137792: e8 c5 56 fd ff call 10ce5c <_Objects_Get>
switch ( location ) {
137797: 8b 54 24 2c mov 0x2c(%esp),%edx
13779b: 85 d2 test %edx,%edx
13779d: 75 2e jne 1377cd <_Rate_monotonic_Timeout+0x55><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
13779f: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
1377a2: f6 42 11 40 testb $0x40,0x11(%edx)
1377a6: 74 08 je 1377b0 <_Rate_monotonic_Timeout+0x38>
1377a8: 8b 48 08 mov 0x8(%eax),%ecx
1377ab: 39 4a 20 cmp %ecx,0x20(%edx)
1377ae: 74 58 je 137808 <_Rate_monotonic_Timeout+0x90>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
1377b0: 83 78 38 01 cmpl $0x1,0x38(%eax)
1377b4: 74 1e je 1377d4 <_Rate_monotonic_Timeout+0x5c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
1377b6: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
1377bd: a1 64 b1 17 00 mov 0x17b164,%eax
1377c2: 48 dec %eax
1377c3: a3 64 b1 17 00 mov %eax,0x17b164
return _Thread_Dispatch_disable_level;
1377c8: a1 64 b1 17 00 mov 0x17b164,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
1377cd: 83 c4 3c add $0x3c,%esp
1377d0: c3 ret
1377d1: 8d 76 00 lea 0x0(%esi),%esi
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
1377d4: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
1377db: 89 04 24 mov %eax,(%esp)
1377de: 89 44 24 1c mov %eax,0x1c(%esp)
1377e2: e8 71 fd ff ff call 137558 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1377e7: 8b 44 24 1c mov 0x1c(%esp),%eax
1377eb: 8b 50 3c mov 0x3c(%eax),%edx
1377ee: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
1377f1: 83 c0 10 add $0x10,%eax
1377f4: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1377f8: c7 04 24 08 b2 17 00 movl $0x17b208,(%esp)
1377ff: e8 50 6e fd ff call 10e654 <_Watchdog_Insert>
137804: eb b7 jmp 1377bd <_Rate_monotonic_Timeout+0x45>
137806: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
137808: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
13780f: 10
137810: 89 14 24 mov %edx,(%esp)
137813: 89 44 24 1c mov %eax,0x1c(%esp)
137817: e8 b0 5e fd ff call 10d6cc <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
13781c: 8b 44 24 1c mov 0x1c(%esp),%eax
137820: 89 04 24 mov %eax,(%esp)
137823: eb bd jmp 1377e2 <_Rate_monotonic_Timeout+0x6a>
00137478 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
137478: 56 push %esi
137479: 53 push %ebx
13747a: 83 ec 24 sub $0x24,%esp
13747d: 89 c6 mov %eax,%esi
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
13747f: ff 40 54 incl 0x54(%eax)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
137482: 83 78 38 04 cmpl $0x4,0x38(%eax)
137486: 0f 84 a0 00 00 00 je 13752c <_Rate_monotonic_Update_statistics+0xb4>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
13748c: 8d 44 24 10 lea 0x10(%esp),%eax
137490: 89 44 24 08 mov %eax,0x8(%esp)
137494: 8d 44 24 18 lea 0x18(%esp),%eax
137498: 89 44 24 04 mov %eax,0x4(%esp)
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
13749c: 89 34 24 mov %esi,(%esp)
13749f: e8 44 ff ff ff call 1373e8 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
1374a4: 84 c0 test %al,%al
1374a6: 74 3c je 1374e4 <_Rate_monotonic_Update_statistics+0x6c>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
1374a8: 8b 4c 24 10 mov 0x10(%esp),%ecx
1374ac: 8b 5c 24 14 mov 0x14(%esp),%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
1374b0: 01 4e 6c add %ecx,0x6c(%esi)
1374b3: 11 5e 70 adc %ebx,0x70(%esi)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
1374b6: 3b 5e 60 cmp 0x60(%esi),%ebx
1374b9: 7e 59 jle 137514 <_Rate_monotonic_Update_statistics+0x9c><== ALWAYS TAKEN
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
1374bb: 3b 5e 68 cmp 0x68(%esi),%ebx
1374be: 7d 61 jge 137521 <_Rate_monotonic_Update_statistics+0xa9><== ALWAYS TAKEN
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
1374c0: 8b 4c 24 18 mov 0x18(%esp),%ecx
1374c4: 8b 5c 24 1c mov 0x1c(%esp),%ebx
1374c8: 01 8e 84 00 00 00 add %ecx,0x84(%esi)
1374ce: 11 9e 88 00 00 00 adc %ebx,0x88(%esi)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
1374d4: 3b 5e 78 cmp 0x78(%esi),%ebx
1374d7: 7e 27 jle 137500 <_Rate_monotonic_Update_statistics+0x88><== ALWAYS TAKEN
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1374d9: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
1374df: 7d 0b jge 1374ec <_Rate_monotonic_Update_statistics+0x74>
1374e1: 8d 76 00 lea 0x0(%esi),%esi
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
1374e4: 83 c4 24 add $0x24,%esp
1374e7: 5b pop %ebx
1374e8: 5e pop %esi
1374e9: c3 ret
1374ea: 66 90 xchg %ax,%ax
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1374ec: 7e 62 jle 137550 <_Rate_monotonic_Update_statistics+0xd8><== ALWAYS TAKEN
stats->max_wall_time = since_last_period;
1374ee: 89 4e 7c mov %ecx,0x7c(%esi)
1374f1: 89 9e 80 00 00 00 mov %ebx,0x80(%esi)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
1374f7: 83 c4 24 add $0x24,%esp
1374fa: 5b pop %ebx
1374fb: 5e pop %esi
1374fc: c3 ret
1374fd: 8d 76 00 lea 0x0(%esi),%esi
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
137500: 7d 46 jge 137548 <_Rate_monotonic_Update_statistics+0xd0>
stats->min_wall_time = since_last_period;
137502: 89 4e 74 mov %ecx,0x74(%esi)
137505: 89 5e 78 mov %ebx,0x78(%esi)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
137508: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
13750e: 7c d4 jl 1374e4 <_Rate_monotonic_Update_statistics+0x6c>
137510: eb da jmp 1374ec <_Rate_monotonic_Update_statistics+0x74>
137512: 66 90 xchg %ax,%ax
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
137514: 7d 26 jge 13753c <_Rate_monotonic_Update_statistics+0xc4>
stats->min_cpu_time = executed;
137516: 89 4e 5c mov %ecx,0x5c(%esi)
137519: 89 5e 60 mov %ebx,0x60(%esi)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
13751c: 3b 5e 68 cmp 0x68(%esi),%ebx
13751f: 7c 9f jl 1374c0 <_Rate_monotonic_Update_statistics+0x48><== NEVER TAKEN
137521: 7e 11 jle 137534 <_Rate_monotonic_Update_statistics+0xbc><== ALWAYS TAKEN
stats->max_cpu_time = executed;
137523: 89 4e 64 mov %ecx,0x64(%esi)
137526: 89 5e 68 mov %ebx,0x68(%esi)
137529: eb 95 jmp 1374c0 <_Rate_monotonic_Update_statistics+0x48>
13752b: 90 nop
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
13752c: ff 40 58 incl 0x58(%eax)
13752f: e9 58 ff ff ff jmp 13748c <_Rate_monotonic_Update_statistics+0x14>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
137534: 3b 4e 64 cmp 0x64(%esi),%ecx
137537: 76 87 jbe 1374c0 <_Rate_monotonic_Update_statistics+0x48>
137539: eb e8 jmp 137523 <_Rate_monotonic_Update_statistics+0xab>
13753b: 90 nop
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
13753c: 3b 4e 5c cmp 0x5c(%esi),%ecx
13753f: 0f 83 76 ff ff ff jae 1374bb <_Rate_monotonic_Update_statistics+0x43>
137545: eb cf jmp 137516 <_Rate_monotonic_Update_statistics+0x9e>
137547: 90 nop
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
137548: 3b 4e 74 cmp 0x74(%esi),%ecx
13754b: 73 8c jae 1374d9 <_Rate_monotonic_Update_statistics+0x61>
13754d: eb b3 jmp 137502 <_Rate_monotonic_Update_statistics+0x8a>
13754f: 90 nop
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
137550: 3b 4e 7c cmp 0x7c(%esi),%ecx
137553: 76 8f jbe 1374e4 <_Rate_monotonic_Update_statistics+0x6c>
137555: eb 97 jmp 1374ee <_Rate_monotonic_Update_statistics+0x76>
0010dd9c <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
10dd9c: 53 push %ebx
10dd9d: 83 ec 18 sub $0x18,%esp
10dda0: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
10dda4: c7 04 24 1c 00 00 00 movl $0x1c,(%esp)
10ddab: e8 6c 17 00 00 call 10f51c <_Workspace_Allocate>
if ( sched ) {
10ddb0: 85 c0 test %eax,%eax
10ddb2: 74 16 je 10ddca <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN
the_thread->scheduler_info = sched;
10ddb4: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
10ddba: 89 18 mov %ebx,(%eax)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10ddbc: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
schinfo->cbs_server = NULL;
10ddc3: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
}
return sched;
}
10ddca: 83 c4 18 add $0x18,%esp
10ddcd: 5b pop %ebx
10ddce: c3 ret
0010f3bc <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
10f3bc: 53 push %ebx
10f3bd: 83 ec 28 sub $0x28,%esp
10f3c0: 8b 5c 24 30 mov 0x30(%esp),%ebx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10f3c4: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10f3ca: 39 43 18 cmp %eax,0x18(%ebx)
10f3cd: 74 03 je 10f3d2 <_Scheduler_CBS_Budget_callout+0x16><== NEVER TAKEN
the_thread->real_priority = new_priority;
10f3cf: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10f3d2: 39 43 14 cmp %eax,0x14(%ebx)
10f3d5: 74 14 je 10f3eb <_Scheduler_CBS_Budget_callout+0x2f><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
10f3d7: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10f3de: 00
10f3df: 89 44 24 04 mov %eax,0x4(%esp)
10f3e3: 89 1c 24 mov %ebx,(%esp)
10f3e6: e8 e1 04 00 00 call 10f8cc <_Thread_Change_priority>
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
10f3eb: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx
if ( sched_info->cbs_server->cbs_budget_overrun ) {
10f3f1: 8b 43 18 mov 0x18(%ebx),%eax
10f3f4: 8b 50 0c mov 0xc(%eax),%edx
10f3f7: 85 d2 test %edx,%edx
10f3f9: 74 1f je 10f41a <_Scheduler_CBS_Budget_callout+0x5e><== NEVER TAKEN
_Scheduler_CBS_Get_server_id(
10f3fb: 8d 54 24 1c lea 0x1c(%esp),%edx
10f3ff: 89 54 24 04 mov %edx,0x4(%esp)
10f403: 8b 00 mov (%eax),%eax
10f405: 89 04 24 mov %eax,(%esp)
10f408: e8 73 ff ff ff call 10f380 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
10f40d: 8b 43 18 mov 0x18(%ebx),%eax
10f410: 8b 54 24 1c mov 0x1c(%esp),%edx
10f414: 89 14 24 mov %edx,(%esp)
10f417: ff 50 0c call *0xc(%eax)
}
}
10f41a: 83 c4 28 add $0x28,%esp
10f41d: 5b pop %ebx
10f41e: c3 ret
0010efe4 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
10efe4: 53 push %ebx
10efe5: 83 ec 18 sub $0x18,%esp
10efe8: a1 24 39 13 00 mov 0x133924,%eax
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10efed: 8b 0d bc f2 12 00 mov 0x12f2bc,%ecx
10eff3: 31 db xor %ebx,%ebx
10eff5: 85 c9 test %ecx,%ecx
10eff7: 74 20 je 10f019 <_Scheduler_CBS_Cleanup+0x35><== NEVER TAKEN
10eff9: 8d 76 00 lea 0x0(%esi),%esi
if ( _Scheduler_CBS_Server_list[ i ] )
10effc: 8b 14 98 mov (%eax,%ebx,4),%edx
10efff: 85 d2 test %edx,%edx
10f001: 74 0d je 10f010 <_Scheduler_CBS_Cleanup+0x2c>
_Scheduler_CBS_Destroy_server( i );
10f003: 89 1c 24 mov %ebx,(%esp)
10f006: e8 d1 00 00 00 call 10f0dc <_Scheduler_CBS_Destroy_server>
10f00b: a1 24 39 13 00 mov 0x133924,%eax
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f010: 43 inc %ebx
10f011: 39 1d bc f2 12 00 cmp %ebx,0x12f2bc
10f017: 77 e3 ja 10effc <_Scheduler_CBS_Cleanup+0x18>
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
10f019: 89 04 24 mov %eax,(%esp)
10f01c: e8 97 1b 00 00 call 110bb8 <_Workspace_Free>
return SCHEDULER_CBS_OK;
}
10f021: 31 c0 xor %eax,%eax
10f023: 83 c4 18 add $0x18,%esp
10f026: 5b pop %ebx
10f027: c3 ret
0010f028 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
10f028: 57 push %edi
10f029: 56 push %esi
10f02a: 53 push %ebx
10f02b: 83 ec 10 sub $0x10,%esp
10f02e: 8b 74 24 20 mov 0x20(%esp),%esi
10f032: 8b 5c 24 28 mov 0x28(%esp),%ebx
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
10f036: 8b 46 04 mov 0x4(%esi),%eax
10f039: 85 c0 test %eax,%eax
10f03b: 0f 8e 8d 00 00 00 jle 10f0ce <_Scheduler_CBS_Create_server+0xa6>
10f041: 8b 06 mov (%esi),%eax
10f043: 85 c0 test %eax,%eax
10f045: 0f 8e 83 00 00 00 jle 10f0ce <_Scheduler_CBS_Create_server+0xa6>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f04b: 8b 0d bc f2 12 00 mov 0x12f2bc,%ecx
10f051: 85 c9 test %ecx,%ecx
10f053: 74 1f je 10f074 <_Scheduler_CBS_Create_server+0x4c><== NEVER TAKEN
if ( !_Scheduler_CBS_Server_list[i] )
10f055: 8b 15 24 39 13 00 mov 0x133924,%edx
10f05b: 8b 02 mov (%edx),%eax
10f05d: 85 c0 test %eax,%eax
10f05f: 74 67 je 10f0c8 <_Scheduler_CBS_Create_server+0xa0>
10f061: 31 c0 xor %eax,%eax
10f063: eb 0a jmp 10f06f <_Scheduler_CBS_Create_server+0x47>
10f065: 8d 76 00 lea 0x0(%esi),%esi
10f068: 8b 3c 82 mov (%edx,%eax,4),%edi
10f06b: 85 ff test %edi,%edi
10f06d: 74 11 je 10f080 <_Scheduler_CBS_Create_server+0x58>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f06f: 40 inc %eax
10f070: 39 c8 cmp %ecx,%eax
10f072: 75 f4 jne 10f068 <_Scheduler_CBS_Create_server+0x40>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
10f074: b8 e6 ff ff ff mov $0xffffffe6,%eax
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
10f079: 83 c4 10 add $0x10,%esp
10f07c: 5b pop %ebx
10f07d: 5e pop %esi
10f07e: 5f pop %edi
10f07f: c3 ret
10f080: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
10f087: 89 03 mov %eax,(%ebx)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10f089: 01 d7 add %edx,%edi
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
10f08b: c7 04 24 10 00 00 00 movl $0x10,(%esp)
10f092: e8 f5 1a 00 00 call 110b8c <_Workspace_Allocate>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10f097: 89 07 mov %eax,(%edi)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
10f099: 8b 13 mov (%ebx),%edx
10f09b: a1 24 39 13 00 mov 0x133924,%eax
10f0a0: 8b 0c 90 mov (%eax,%edx,4),%ecx
if ( !the_server )
10f0a3: 85 c9 test %ecx,%ecx
10f0a5: 74 2e je 10f0d5 <_Scheduler_CBS_Create_server+0xad><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
10f0a7: 8b 06 mov (%esi),%eax
10f0a9: 8b 56 04 mov 0x4(%esi),%edx
10f0ac: 89 41 04 mov %eax,0x4(%ecx)
10f0af: 89 51 08 mov %edx,0x8(%ecx)
the_server->task_id = -1;
10f0b2: c7 01 ff ff ff ff movl $0xffffffff,(%ecx)
the_server->cbs_budget_overrun = budget_overrun_callback;
10f0b8: 8b 44 24 24 mov 0x24(%esp),%eax
10f0bc: 89 41 0c mov %eax,0xc(%ecx)
return SCHEDULER_CBS_OK;
10f0bf: 31 c0 xor %eax,%eax
}
10f0c1: 83 c4 10 add $0x10,%esp
10f0c4: 5b pop %ebx
10f0c5: 5e pop %esi
10f0c6: 5f pop %edi
10f0c7: c3 ret
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
10f0c8: 31 ff xor %edi,%edi
10f0ca: 31 c0 xor %eax,%eax
10f0cc: eb b9 jmp 10f087 <_Scheduler_CBS_Create_server+0x5f>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10f0ce: b8 ee ff ff ff mov $0xffffffee,%eax
10f0d3: eb a4 jmp 10f079 <_Scheduler_CBS_Create_server+0x51>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10f0d5: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f0da: eb 9d jmp 10f079 <_Scheduler_CBS_Create_server+0x51><== NOT EXECUTED
0010f154 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
10f154: 56 push %esi
10f155: 53 push %ebx
10f156: 83 ec 34 sub $0x34,%esp
10f159: 8b 74 24 40 mov 0x40(%esp),%esi
10f15d: 8b 5c 24 44 mov 0x44(%esp),%ebx
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
10f161: 8d 44 24 2c lea 0x2c(%esp),%eax
10f165: 89 44 24 04 mov %eax,0x4(%esp)
10f169: 89 1c 24 mov %ebx,(%esp)
10f16c: e8 e7 0b 00 00 call 10fd58 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10f171: 85 c0 test %eax,%eax
10f173: 74 5f je 10f1d4 <_Scheduler_CBS_Detach_thread+0x80>
_Thread_Enable_dispatch();
10f175: 89 44 24 1c mov %eax,0x1c(%esp)
10f179: e8 ba 0b 00 00 call 10fd38 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10f17e: 3b 35 bc f2 12 00 cmp 0x12f2bc,%esi
10f184: 8b 44 24 1c mov 0x1c(%esp),%eax
10f188: 73 4a jae 10f1d4 <_Scheduler_CBS_Detach_thread+0x80>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
10f18a: 8b 15 24 39 13 00 mov 0x133924,%edx
10f190: 8b 14 b2 mov (%edx,%esi,4),%edx
10f193: 85 d2 test %edx,%edx
10f195: 74 48 je 10f1df <_Scheduler_CBS_Detach_thread+0x8b>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
10f197: 39 1a cmp %ebx,(%edx)
10f199: 75 39 jne 10f1d4 <_Scheduler_CBS_Detach_thread+0x80><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
10f19b: c7 02 ff ff ff ff movl $0xffffffff,(%edx)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
10f1a1: 8b 90 88 00 00 00 mov 0x88(%eax),%edx
10f1a7: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
10f1ae: 8b 90 a0 00 00 00 mov 0xa0(%eax),%edx
10f1b4: 89 50 78 mov %edx,0x78(%eax)
the_thread->budget_callout = the_thread->Start.budget_callout;
10f1b7: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
10f1bd: 89 50 7c mov %edx,0x7c(%eax)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
10f1c0: 8a 90 9c 00 00 00 mov 0x9c(%eax),%dl
10f1c6: 88 50 70 mov %dl,0x70(%eax)
return SCHEDULER_CBS_OK;
10f1c9: 31 c0 xor %eax,%eax
}
10f1cb: 83 c4 34 add $0x34,%esp
10f1ce: 5b pop %ebx
10f1cf: 5e pop %esi
10f1d0: c3 ret
10f1d1: 8d 76 00 lea 0x0(%esi),%esi
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10f1d4: b8 ee ff ff ff mov $0xffffffee,%eax
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
10f1d9: 83 c4 34 add $0x34,%esp
10f1dc: 5b pop %ebx
10f1dd: 5e pop %esi
10f1de: c3 ret
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10f1df: b8 e7 ff ff ff mov $0xffffffe7,%eax
10f1e4: eb e5 jmp 10f1cb <_Scheduler_CBS_Detach_thread+0x77>
0010f380 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
10f380: 56 push %esi
10f381: 53 push %ebx
10f382: 8b 74 24 0c mov 0xc(%esp),%esi
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f386: 8b 0d bc f2 12 00 mov 0x12f2bc,%ecx
10f38c: 85 c9 test %ecx,%ecx
10f38e: 74 18 je 10f3a8 <_Scheduler_CBS_Get_server_id+0x28><== NEVER TAKEN
10f390: 8b 1d 24 39 13 00 mov 0x133924,%ebx
10f396: 31 c0 xor %eax,%eax
if ( _Scheduler_CBS_Server_list[i] &&
10f398: 8b 14 83 mov (%ebx,%eax,4),%edx
10f39b: 85 d2 test %edx,%edx
10f39d: 74 04 je 10f3a3 <_Scheduler_CBS_Get_server_id+0x23>
10f39f: 39 32 cmp %esi,(%edx)
10f3a1: 74 0d je 10f3b0 <_Scheduler_CBS_Get_server_id+0x30>
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f3a3: 40 inc %eax
10f3a4: 39 c8 cmp %ecx,%eax
10f3a6: 75 f0 jne 10f398 <_Scheduler_CBS_Get_server_id+0x18>
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
10f3a8: b8 e7 ff ff ff mov $0xffffffe7,%eax
}
10f3ad: 5b pop %ebx
10f3ae: 5e pop %esi
10f3af: c3 ret
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
10f3b0: 8b 54 24 10 mov 0x10(%esp),%edx
10f3b4: 89 02 mov %eax,(%edx)
return SCHEDULER_CBS_OK;
10f3b6: 31 c0 xor %eax,%eax
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
}
10f3b8: 5b pop %ebx
10f3b9: 5e pop %esi
10f3ba: c3 ret
0010f420 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
10f420: 83 ec 1c sub $0x1c,%esp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
10f423: a1 bc f2 12 00 mov 0x12f2bc,%eax
10f428: c1 e0 02 shl $0x2,%eax
10f42b: 89 04 24 mov %eax,(%esp)
10f42e: e8 59 17 00 00 call 110b8c <_Workspace_Allocate>
10f433: a3 24 39 13 00 mov %eax,0x133924
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
10f438: 85 c0 test %eax,%eax
10f43a: 74 27 je 10f463 <_Scheduler_CBS_Initialize+0x43><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10f43c: 8b 0d bc f2 12 00 mov 0x12f2bc,%ecx
10f442: 31 d2 xor %edx,%edx
10f444: 85 c9 test %ecx,%ecx
10f446: 75 09 jne 10f451 <_Scheduler_CBS_Initialize+0x31><== ALWAYS TAKEN
10f448: eb 13 jmp 10f45d <_Scheduler_CBS_Initialize+0x3d><== NOT EXECUTED
10f44a: 66 90 xchg %ax,%ax <== NOT EXECUTED
10f44c: a1 24 39 13 00 mov 0x133924,%eax
_Scheduler_CBS_Server_list[i] = NULL;
10f451: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10f458: 42 inc %edx
10f459: 39 ca cmp %ecx,%edx
10f45b: 75 ef jne 10f44c <_Scheduler_CBS_Initialize+0x2c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
10f45d: 31 c0 xor %eax,%eax
}
10f45f: 83 c4 1c add $0x1c,%esp
10f462: c3 ret
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10f463: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f468: eb f5 jmp 10f45f <_Scheduler_CBS_Initialize+0x3f><== NOT EXECUTED
0010ddd0 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
10ddd0: 83 ec 1c sub $0x1c,%esp
10ddd3: 8b 44 24 20 mov 0x20(%esp),%eax
10ddd7: 8b 54 24 24 mov 0x24(%esp),%edx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
10dddb: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
10dde1: 8b 49 18 mov 0x18(%ecx),%ecx
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
10dde4: 85 d2 test %edx,%edx
10dde6: 74 34 je 10de1c <_Scheduler_CBS_Release_job+0x4c>
/* Initializing or shifting deadline. */
if (serv_info)
10dde8: 85 c9 test %ecx,%ecx
10ddea: 74 3c je 10de28 <_Scheduler_CBS_Release_job+0x58>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
10ddec: 8b 15 64 17 13 00 mov 0x131764,%edx
10ddf2: 03 51 04 add 0x4(%ecx),%edx
10ddf5: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
10ddfb: 8b 49 08 mov 0x8(%ecx),%ecx
10ddfe: 89 48 74 mov %ecx,0x74(%eax)
the_thread->real_priority = new_priority;
10de01: 89 50 18 mov %edx,0x18(%eax)
_Thread_Change_priority(the_thread, new_priority, true);
10de04: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10de0b: 00
10de0c: 89 54 24 04 mov %edx,0x4(%esp)
10de10: 89 04 24 mov %eax,(%esp)
10de13: e8 d4 03 00 00 call 10e1ec <_Thread_Change_priority>
}
10de18: 83 c4 1c add $0x1c,%esp
10de1b: c3 ret
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
10de1c: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
}
/* Budget replenishment for the next job. */
if (serv_info)
10de22: 85 c9 test %ecx,%ecx
10de24: 75 d5 jne 10ddfb <_Scheduler_CBS_Release_job+0x2b><== ALWAYS TAKEN
10de26: eb d9 jmp 10de01 <_Scheduler_CBS_Release_job+0x31><== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
10de28: 8b 0d 64 17 13 00 mov 0x131764,%ecx
10de2e: 01 ca add %ecx,%edx
10de30: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
10de36: eb c9 jmp 10de01 <_Scheduler_CBS_Release_job+0x31>
0010de38 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
10de38: 56 push %esi
10de39: 53 push %ebx
10de3a: 83 ec 14 sub $0x14,%esp
10de3d: 8b 5c 24 20 mov 0x20(%esp),%ebx
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
10de41: 89 1c 24 mov %ebx,(%esp)
10de44: e8 e3 00 00 00 call 10df2c <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
10de49: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10de4f: 8b 40 18 mov 0x18(%eax),%eax
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
10de52: 85 c0 test %eax,%eax
10de54: 74 46 je 10de9c <_Scheduler_CBS_Unblock+0x64>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
10de56: 8b 4b 18 mov 0x18(%ebx),%ecx
10de59: 8b 15 64 17 13 00 mov 0x131764,%edx
10de5f: 89 ce mov %ecx,%esi
10de61: 29 d6 sub %edx,%esi
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
10de63: 8b 50 04 mov 0x4(%eax),%edx
10de66: 0f af d6 imul %esi,%edx
10de69: 8b 40 08 mov 0x8(%eax),%eax
10de6c: 0f af 43 74 imul 0x74(%ebx),%eax
10de70: 39 c2 cmp %eax,%edx
10de72: 7e 28 jle 10de9c <_Scheduler_CBS_Unblock+0x64>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10de74: 8b 93 ac 00 00 00 mov 0xac(%ebx),%edx
if ( the_thread->real_priority != new_priority )
10de7a: 39 d1 cmp %edx,%ecx
10de7c: 74 03 je 10de81 <_Scheduler_CBS_Unblock+0x49>
the_thread->real_priority = new_priority;
10de7e: 89 53 18 mov %edx,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10de81: 8b 43 14 mov 0x14(%ebx),%eax
10de84: 39 d0 cmp %edx,%eax
10de86: 74 17 je 10de9f <_Scheduler_CBS_Unblock+0x67>
_Thread_Change_priority(the_thread, new_priority, true);
10de88: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10de8f: 00
10de90: 89 54 24 04 mov %edx,0x4(%esp)
10de94: 89 1c 24 mov %ebx,(%esp)
10de97: e8 50 03 00 00 call 10e1ec <_Thread_Change_priority>
10de9c: 8b 43 14 mov 0x14(%ebx),%eax
* 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
10de9f: 8b 15 d0 18 13 00 mov 0x1318d0,%edx
10dea5: 8b 52 14 mov 0x14(%edx),%edx
10dea8: 89 54 24 04 mov %edx,0x4(%esp)
10deac: 89 04 24 mov %eax,(%esp)
10deaf: ff 15 b0 d2 12 00 call *0x12d2b0
10deb5: 85 c0 test %eax,%eax
10deb7: 7e 18 jle 10ded1 <_Scheduler_CBS_Unblock+0x99>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
10deb9: 89 1d d0 18 13 00 mov %ebx,0x1318d0
if ( _Thread_Executing->is_preemptible ||
10debf: a1 cc 18 13 00 mov 0x1318cc,%eax
10dec4: 80 78 70 00 cmpb $0x0,0x70(%eax)
10dec8: 74 0e je 10ded8 <_Scheduler_CBS_Unblock+0xa0>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10deca: c6 05 d8 18 13 00 01 movb $0x1,0x1318d8
}
}
10ded1: 83 c4 14 add $0x14,%esp
10ded4: 5b pop %ebx
10ded5: 5e pop %esi
10ded6: c3 ret
10ded7: 90 nop
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10ded8: 8b 43 14 mov 0x14(%ebx),%eax
10dedb: 85 c0 test %eax,%eax
10dedd: 74 eb je 10deca <_Scheduler_CBS_Unblock+0x92><== NEVER TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10dedf: 83 c4 14 add $0x14,%esp
10dee2: 5b pop %ebx
10dee3: 5e pop %esi
10dee4: c3 ret
0010dd9c <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
10dd9c: 53 push %ebx
10dd9d: 83 ec 18 sub $0x18,%esp
10dda0: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
10dda4: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10ddab: e8 f0 16 00 00 call 10f4a0 <_Workspace_Allocate>
if ( sched ) {
10ddb0: 85 c0 test %eax,%eax
10ddb2: 74 0f je 10ddc3 <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN
the_thread->scheduler_info = sched;
10ddb4: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
10ddba: 89 18 mov %ebx,(%eax)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10ddbc: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
}
return sched;
}
10ddc3: 83 c4 18 add $0x18,%esp
10ddc6: 5b pop %ebx
10ddc7: c3 ret
0010df70 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
10df70: 53 push %ebx
10df71: 83 ec 18 sub $0x18,%esp
10df74: 8b 5c 24 20 mov 0x20(%esp),%ebx
_Scheduler_EDF_Enqueue(the_thread);
10df78: 89 1c 24 mov %ebx,(%esp)
10df7b: e8 8c fe ff ff call 10de0c <_Scheduler_EDF_Enqueue>
10df80: 8b 43 14 mov 0x14(%ebx),%eax
10df83: 89 44 24 04 mov %eax,0x4(%esp)
* 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 ( _Scheduler_Is_priority_lower_than(
10df87: a1 d0 18 13 00 mov 0x1318d0,%eax
10df8c: 8b 40 14 mov 0x14(%eax),%eax
10df8f: 89 04 24 mov %eax,(%esp)
10df92: ff 15 b0 d2 12 00 call *0x12d2b0
10df98: 85 c0 test %eax,%eax
10df9a: 78 08 js 10dfa4 <_Scheduler_EDF_Unblock+0x34>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10df9c: 83 c4 18 add $0x18,%esp
10df9f: 5b pop %ebx
10dfa0: c3 ret
10dfa1: 8d 76 00 lea 0x0(%esi),%esi
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
10dfa4: 89 1d d0 18 13 00 mov %ebx,0x1318d0
if ( _Thread_Executing->is_preemptible ||
10dfaa: a1 cc 18 13 00 mov 0x1318cc,%eax
10dfaf: 80 78 70 00 cmpb $0x0,0x70(%eax)
10dfb3: 74 0f je 10dfc4 <_Scheduler_EDF_Unblock+0x54>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10dfb5: c6 05 d8 18 13 00 01 movb $0x1,0x1318d8
}
}
10dfbc: 83 c4 18 add $0x18,%esp
10dfbf: 5b pop %ebx
10dfc0: c3 ret
10dfc1: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10dfc4: 8b 43 14 mov 0x14(%ebx),%eax
10dfc7: 85 c0 test %eax,%eax
10dfc9: 75 d1 jne 10df9c <_Scheduler_EDF_Unblock+0x2c><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10dfcb: c6 05 d8 18 13 00 01 movb $0x1,0x1318d8 <== NOT EXECUTED
10dfd2: eb e8 jmp 10dfbc <_Scheduler_EDF_Unblock+0x4c><== NOT EXECUTED
0010d508 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10d508: 53 push %ebx
10d509: 8b 44 24 08 mov 0x8(%esp),%eax
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10d50d: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
ready = sched_info->ready_chain;
10d513: 8b 11 mov (%ecx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
10d515: 8b 5a 08 mov 0x8(%edx),%ebx
10d518: 39 1a cmp %ebx,(%edx)
10d51a: 74 28 je 10d544 <_Scheduler_priority_Block+0x3c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d51c: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10d51e: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10d521: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10d524: 89 0a mov %ecx,(%edx)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10d526: 3b 05 70 f8 12 00 cmp 0x12f870,%eax
10d52c: 74 4a je 10d578 <_Scheduler_priority_Block+0x70>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10d52e: 3b 05 6c f8 12 00 cmp 0x12f86c,%eax
10d534: 74 02 je 10d538 <_Scheduler_priority_Block+0x30>
_Thread_Dispatch_necessary = true;
}
10d536: 5b pop %ebx
10d537: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
10d538: c6 05 78 f8 12 00 01 movb $0x1,0x12f878
}
10d53f: 5b pop %ebx
10d540: c3 ret
10d541: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10d544: 8d 5a 04 lea 0x4(%edx),%ebx
10d547: 89 1a mov %ebx,(%edx)
head->next = tail;
head->previous = NULL;
10d549: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10d550: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10d553: 8b 59 04 mov 0x4(%ecx),%ebx
10d556: 66 8b 13 mov (%ebx),%dx
10d559: 66 23 51 0e and 0xe(%ecx),%dx
10d55d: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
10d560: 66 85 d2 test %dx,%dx
10d563: 75 c1 jne 10d526 <_Scheduler_priority_Block+0x1e>
_Priority_Major_bit_map &= the_priority_map->block_major;
10d565: 66 8b 15 a0 f8 12 00 mov 0x12f8a0,%dx
10d56c: 23 51 0c and 0xc(%ecx),%edx
10d56f: 66 89 15 a0 f8 12 00 mov %dx,0x12f8a0
10d576: eb ae jmp 10d526 <_Scheduler_priority_Block+0x1e>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d578: 66 8b 1d a0 f8 12 00 mov 0x12f8a0,%bx
10d57f: 31 d2 xor %edx,%edx
10d581: 89 d1 mov %edx,%ecx
10d583: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d587: 0f b7 c9 movzwl %cx,%ecx
10d58a: 66 8b 9c 09 c0 f8 12 mov 0x12f8c0(%ecx,%ecx,1),%bx
10d591: 00
10d592: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10d596: c1 e1 04 shl $0x4,%ecx
10d599: 0f b7 d2 movzwl %dx,%edx
10d59c: 01 ca add %ecx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d59e: 8d 0c 52 lea (%edx,%edx,2),%ecx
10d5a1: 8b 15 80 b2 12 00 mov 0x12b280,%edx
10d5a7: 8d 0c 8a lea (%edx,%ecx,4),%ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d5aa: 8b 11 mov (%ecx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d5ac: 83 c1 04 add $0x4,%ecx
10d5af: 39 ca cmp %ecx,%edx
10d5b1: 74 0b je 10d5be <_Scheduler_priority_Block+0xb6><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d5b3: 89 15 70 f8 12 00 mov %edx,0x12f870
10d5b9: e9 70 ff ff ff jmp 10d52e <_Scheduler_priority_Block+0x26>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d5be: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d5c0: eb f1 jmp 10d5b3 <_Scheduler_priority_Block+0xab><== NOT EXECUTED
0010d720 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d720: 66 8b 0d a0 f8 12 00 mov 0x12f8a0,%cx
10d727: 31 c0 xor %eax,%eax
10d729: 89 c2 mov %eax,%edx
10d72b: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d72f: 0f b7 d2 movzwl %dx,%edx
10d732: 66 8b 8c 12 c0 f8 12 mov 0x12f8c0(%edx,%edx,1),%cx
10d739: 00
10d73a: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d73e: c1 e2 04 shl $0x4,%edx
10d741: 0f b7 c0 movzwl %ax,%eax
10d744: 01 d0 add %edx,%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d746: 8d 14 40 lea (%eax,%eax,2),%edx
10d749: a1 80 b2 12 00 mov 0x12b280,%eax
10d74e: 8d 14 90 lea (%eax,%edx,4),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d751: 8b 02 mov (%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d753: 83 c2 04 add $0x4,%edx
10d756: 39 d0 cmp %edx,%eax
10d758: 74 06 je 10d760 <_Scheduler_priority_Schedule+0x40><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d75a: a3 70 f8 12 00 mov %eax,0x12f870
10d75f: c3 ret
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d760: 31 c0 xor %eax,%eax
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d762: a3 70 f8 12 00 mov %eax,0x12f870 <== NOT EXECUTED
10d767: c3 ret <== NOT EXECUTED
0010dee4 <_Scheduler_simple_Ready_queue_enqueue_first>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
10dee4: 8b 4c 24 04 mov 0x4(%esp),%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10dee8: a1 80 c2 12 00 mov 0x12c280,%eax
10deed: 8b 00 mov (%eax),%eax
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10deef: 8b 51 14 mov 0x14(%ecx),%edx
10def2: 39 50 14 cmp %edx,0x14(%eax)
10def5: 73 08 jae 10deff <_Scheduler_simple_Ready_queue_enqueue_first+0x1b>
10def7: 90 nop
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
10def8: 8b 00 mov (%eax),%eax
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10defa: 39 50 14 cmp %edx,0x14(%eax)
10defd: 72 f9 jb 10def8 <_Scheduler_simple_Ready_queue_enqueue_first+0x14><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
10deff: 8b 40 04 mov 0x4(%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10df02: 89 41 04 mov %eax,0x4(%ecx)
before_node = after_node->next;
10df05: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10df07: 89 08 mov %ecx,(%eax)
the_node->next = before_node;
10df09: 89 11 mov %edx,(%ecx)
before_node->previous = the_node;
10df0b: 89 4a 04 mov %ecx,0x4(%edx)
10df0e: c3 ret
0010c4e0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c4e0: 8b 4c 24 04 mov 0x4(%esp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c4e4: b8 40 42 0f 00 mov $0xf4240,%eax
10c4e9: 31 d2 xor %edx,%edx
10c4eb: f7 35 90 e1 12 00 divl 0x12e190
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c4f1: 85 c9 test %ecx,%ecx
10c4f3: 74 47 je 10c53c <_TOD_Validate+0x5c> <== NEVER TAKEN
10c4f5: 3b 41 18 cmp 0x18(%ecx),%eax
10c4f8: 76 42 jbe 10c53c <_TOD_Validate+0x5c>
(the_tod->ticks >= ticks_per_second) ||
10c4fa: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c4fe: 77 3c ja 10c53c <_TOD_Validate+0x5c>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c500: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c504: 77 36 ja 10c53c <_TOD_Validate+0x5c>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c506: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c50a: 77 30 ja 10c53c <_TOD_Validate+0x5c>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c50c: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c50f: 85 c0 test %eax,%eax
10c511: 74 29 je 10c53c <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->month == 0) ||
10c513: 83 f8 0c cmp $0xc,%eax
10c516: 77 24 ja 10c53c <_TOD_Validate+0x5c>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c518: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c51a: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c520: 76 1a jbe 10c53c <_TOD_Validate+0x5c>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c522: 8b 49 08 mov 0x8(%ecx),%ecx
(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) ||
10c525: 85 c9 test %ecx,%ecx
10c527: 74 13 je 10c53c <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c529: 83 e2 03 and $0x3,%edx
10c52c: 75 11 jne 10c53f <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c52e: 8b 04 85 54 39 12 00 mov 0x123954(,%eax,4),%eax
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
if ( the_tod->day > days_in_month )
10c535: 39 c8 cmp %ecx,%eax
10c537: 0f 93 c0 setae %al
10c53a: c3 ret
10c53b: 90 nop
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10c53c: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c53e: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c53f: 8b 04 85 20 39 12 00 mov 0x123920(,%eax,4),%eax
10c546: eb ed jmp 10c535 <_TOD_Validate+0x55>
0010d93c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d93c: 57 push %edi
10d93d: 56 push %esi
10d93e: 53 push %ebx
10d93f: 83 ec 20 sub $0x20,%esp
10d942: 8b 5c 24 30 mov 0x30(%esp),%ebx
10d946: 8b 7c 24 34 mov 0x34(%esp),%edi
10d94a: 8a 44 24 38 mov 0x38(%esp),%al
10d94e: 88 44 24 1f mov %al,0x1f(%esp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10d952: 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 );
10d955: 89 1c 24 mov %ebx,(%esp)
10d958: e8 9b 0c 00 00 call 10e5f8 <_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 )
10d95d: 39 7b 14 cmp %edi,0x14(%ebx)
10d960: 74 0c je 10d96e <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10d962: 89 7c 24 04 mov %edi,0x4(%esp)
10d966: 89 1c 24 mov %ebx,(%esp)
10d969: e8 3e 0c 00 00 call 10e5ac <_Thread_Set_priority>
_ISR_Disable( level );
10d96e: 9c pushf
10d96f: fa cli
10d970: 5f pop %edi
/*
* 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;
10d971: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d974: 83 f8 04 cmp $0x4,%eax
10d977: 74 23 je 10d99c <_Thread_Change_priority+0x60>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d979: 83 e6 04 and $0x4,%esi
10d97c: 74 12 je 10d990 <_Thread_Change_priority+0x54><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d97e: 57 push %edi
10d97f: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d980: a9 e0 be 03 00 test $0x3bee0,%eax
10d985: 75 5d jne 10d9e4 <_Thread_Change_priority+0xa8>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d987: 83 c4 20 add $0x20,%esp
10d98a: 5b pop %ebx
10d98b: 5e pop %esi
10d98c: 5f pop %edi
10d98d: c3 ret
10d98e: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d990: 89 c2 mov %eax,%edx
10d992: 83 e2 fb and $0xfffffffb,%edx
10d995: 89 53 10 mov %edx,0x10(%ebx)
10d998: eb e4 jmp 10d97e <_Thread_Change_priority+0x42>
10d99a: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d99c: 83 e6 04 and $0x4,%esi
10d99f: 75 17 jne 10d9b8 <_Thread_Change_priority+0x7c><== 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 );
10d9a1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10d9a8: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10d9ad: 89 1c 24 mov %ebx,(%esp)
10d9b0: 74 4a je 10d9fc <_Thread_Change_priority+0xc0>
10d9b2: ff 15 a8 b2 12 00 call *0x12b2a8
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10d9b8: 57 push %edi
10d9b9: 9d popf
10d9ba: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10d9bb: ff 15 88 b2 12 00 call *0x12b288
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d9c1: a1 6c f8 12 00 mov 0x12f86c,%eax
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
10d9c6: 3b 05 70 f8 12 00 cmp 0x12f870,%eax
10d9cc: 74 0d je 10d9db <_Thread_Change_priority+0x9f>
10d9ce: 80 78 70 00 cmpb $0x0,0x70(%eax)
10d9d2: 74 07 je 10d9db <_Thread_Change_priority+0x9f>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10d9d4: c6 05 78 f8 12 00 01 movb $0x1,0x12f878
_ISR_Enable( level );
10d9db: 57 push %edi
10d9dc: 9d popf
}
10d9dd: 83 c4 20 add $0x20,%esp
10d9e0: 5b pop %ebx
10d9e1: 5e pop %esi
10d9e2: 5f pop %edi
10d9e3: c3 ret
/* 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 );
10d9e4: 89 5c 24 34 mov %ebx,0x34(%esp)
10d9e8: 8b 43 44 mov 0x44(%ebx),%eax
10d9eb: 89 44 24 30 mov %eax,0x30(%esp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d9ef: 83 c4 20 add $0x20,%esp
10d9f2: 5b pop %ebx
10d9f3: 5e pop %esi
10d9f4: 5f pop %edi
/* 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 );
10d9f5: e9 0a 0b 00 00 jmp 10e504 <_Thread_queue_Requeue>
10d9fa: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10d9fc: ff 15 a4 b2 12 00 call *0x12b2a4
10da02: eb b4 jmp 10d9b8 <_Thread_Change_priority+0x7c>
0010dc00 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dc00: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dc03: 8d 44 24 1c lea 0x1c(%esp),%eax
10dc07: 89 44 24 04 mov %eax,0x4(%esp)
10dc0b: 8b 44 24 30 mov 0x30(%esp),%eax
10dc0f: 89 04 24 mov %eax,(%esp)
10dc12: e8 b1 01 00 00 call 10ddc8 <_Thread_Get>
switch ( location ) {
10dc17: 8b 54 24 1c mov 0x1c(%esp),%edx
10dc1b: 85 d2 test %edx,%edx
10dc1d: 75 20 jne 10dc3f <_Thread_Delay_ended+0x3f><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10dc1f: c7 44 24 04 18 00 00 movl $0x10000018,0x4(%esp)
10dc26: 10
10dc27: 89 04 24 mov %eax,(%esp)
10dc2a: e8 d5 fd ff ff call 10da04 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10dc2f: a1 04 f6 12 00 mov 0x12f604,%eax
10dc34: 48 dec %eax
10dc35: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10dc3a: a1 04 f6 12 00 mov 0x12f604,%eax
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10dc3f: 83 c4 2c add $0x2c,%esp
10dc42: c3 ret
0010dc44 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10dc44: 55 push %ebp
10dc45: 57 push %edi
10dc46: 56 push %esi
10dc47: 53 push %ebx
10dc48: 83 ec 2c sub $0x2c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10dc4b: a1 04 f6 12 00 mov 0x12f604,%eax
10dc50: 40 inc %eax
10dc51: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10dc56: a1 04 f6 12 00 mov 0x12f604,%eax
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
10dc5b: 8b 35 6c f8 12 00 mov 0x12f86c,%esi
_ISR_Disable( level );
10dc61: 9c pushf
10dc62: fa cli
10dc63: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10dc64: 8a 15 78 f8 12 00 mov 0x12f878,%dl
10dc6a: 84 d2 test %dl,%dl
10dc6c: 0f 84 16 01 00 00 je 10dd88 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10dc72: 8b 2d 70 f8 12 00 mov 0x12f870,%ebp
_Thread_Dispatch_necessary = false;
10dc78: c6 05 78 f8 12 00 00 movb $0x0,0x12f878
_Thread_Executing = heir;
10dc7f: 89 2d 6c f8 12 00 mov %ebp,0x12f86c
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10dc85: 39 ee cmp %ebp,%esi
10dc87: 0f 84 fb 00 00 00 je 10dd88 <_Thread_Dispatch+0x144>
10dc8d: 8d 7c 24 18 lea 0x18(%esp),%edi
10dc91: e9 da 00 00 00 jmp 10dd70 <_Thread_Dispatch+0x12c>
10dc96: 66 90 xchg %ax,%ax
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10dc98: 50 push %eax
10dc99: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10dc9a: 89 3c 24 mov %edi,(%esp)
10dc9d: e8 06 33 00 00 call 110fa8 <_TOD_Get_uptime>
_Timestamp_Subtract(
10dca2: 8b 44 24 18 mov 0x18(%esp),%eax
10dca6: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
10dcaa: 89 c1 mov %eax,%ecx
10dcac: 89 d3 mov %edx,%ebx
10dcae: 2b 0d 7c f8 12 00 sub 0x12f87c,%ecx
10dcb4: 1b 1d 80 f8 12 00 sbb 0x12f880,%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
10dcba: 01 8e 80 00 00 00 add %ecx,0x80(%esi)
10dcc0: 11 9e 84 00 00 00 adc %ebx,0x84(%esi)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
10dcc6: a3 7c f8 12 00 mov %eax,0x12f87c
10dccb: 89 15 80 f8 12 00 mov %edx,0x12f880
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10dcd1: a1 7c f6 12 00 mov 0x12f67c,%eax
10dcd6: 85 c0 test %eax,%eax
10dcd8: 74 10 je 10dcea <_Thread_Dispatch+0xa6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10dcda: 8b 10 mov (%eax),%edx
10dcdc: 89 96 dc 00 00 00 mov %edx,0xdc(%esi)
*_Thread_libc_reent = heir->libc_reent;
10dce2: 8b 95 dc 00 00 00 mov 0xdc(%ebp),%edx
10dce8: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10dcea: 89 6c 24 04 mov %ebp,0x4(%esp)
10dcee: 89 34 24 mov %esi,(%esp)
10dcf1: e8 5e 0c 00 00 call 10e954 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10dcf6: 81 c5 c0 00 00 00 add $0xc0,%ebp
10dcfc: 89 6c 24 04 mov %ebp,0x4(%esp)
10dd00: 8d 86 c0 00 00 00 lea 0xc0(%esi),%eax
10dd06: 89 04 24 mov %eax,(%esp)
10dd09: e8 82 0f 00 00 call 10ec90 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10dd0e: 8b 86 d8 00 00 00 mov 0xd8(%esi),%eax
10dd14: 85 c0 test %eax,%eax
10dd16: 74 2e je 10dd46 <_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 );
10dd18: a1 78 f6 12 00 mov 0x12f678,%eax
10dd1d: 39 c6 cmp %eax,%esi
10dd1f: 74 25 je 10dd46 <_Thread_Dispatch+0x102>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10dd21: 85 c0 test %eax,%eax
10dd23: 74 0d je 10dd32 <_Thread_Dispatch+0xee>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10dd25: 05 d8 00 00 00 add $0xd8,%eax
10dd2a: 89 04 24 mov %eax,(%esp)
10dd2d: e8 92 0f 00 00 call 10ecc4 <_CPU_Context_save_fp>
_Context_Restore_fp( &executing->fp_context );
10dd32: 8d 86 d8 00 00 00 lea 0xd8(%esi),%eax
10dd38: 89 04 24 mov %eax,(%esp)
10dd3b: e8 8e 0f 00 00 call 10ecce <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10dd40: 89 35 78 f6 12 00 mov %esi,0x12f678
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10dd46: 8b 35 6c f8 12 00 mov 0x12f86c,%esi
_ISR_Disable( level );
10dd4c: 9c pushf
10dd4d: fa cli
10dd4e: 58 pop %eax
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10dd4f: 8a 15 78 f8 12 00 mov 0x12f878,%dl
10dd55: 84 d2 test %dl,%dl
10dd57: 74 2f je 10dd88 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10dd59: 8b 2d 70 f8 12 00 mov 0x12f870,%ebp
_Thread_Dispatch_necessary = false;
10dd5f: c6 05 78 f8 12 00 00 movb $0x0,0x12f878
_Thread_Executing = heir;
10dd66: 89 2d 6c f8 12 00 mov %ebp,0x12f86c
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10dd6c: 39 f5 cmp %esi,%ebp
10dd6e: 74 18 je 10dd88 <_Thread_Dispatch+0x144><== NEVER TAKEN
*/
#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 )
10dd70: 83 7d 78 01 cmpl $0x1,0x78(%ebp)
10dd74: 0f 85 1e ff ff ff jne 10dc98 <_Thread_Dispatch+0x54>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10dd7a: 8b 15 d8 f5 12 00 mov 0x12f5d8,%edx
10dd80: 89 55 74 mov %edx,0x74(%ebp)
10dd83: e9 10 ff ff ff jmp 10dc98 <_Thread_Dispatch+0x54>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
10dd88: 50 push %eax
10dd89: 9d popf
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10dd8a: a1 04 f6 12 00 mov 0x12f604,%eax
10dd8f: 48 dec %eax
10dd90: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10dd95: a1 04 f6 12 00 mov 0x12f604,%eax
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
10dd9a: e8 9d e4 ff ff call 10c23c <_API_extensions_Run_postswitch>
}
10dd9f: 83 c4 2c add $0x2c,%esp
10dda2: 5b pop %ebx
10dda3: 5e pop %esi
10dda4: 5f pop %edi
10dda5: 5d pop %ebp
10dda6: c3 ret
00112b64 <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
112b64: 53 push %ebx
112b65: 83 ec 28 sub $0x28,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
112b68: 8b 1d 6c f8 12 00 mov 0x12f86c,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
112b6e: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
_ISR_Set_level(level);
112b74: 85 c0 test %eax,%eax
112b76: 74 7d je 112bf5 <_Thread_Handler+0x91>
112b78: fa cli
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
112b79: a0 b4 f2 12 00 mov 0x12f2b4,%al
112b7e: 88 44 24 1f mov %al,0x1f(%esp)
doneConstructors = true;
112b82: c6 05 b4 f2 12 00 01 movb $0x1,0x12f2b4
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
112b89: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx
112b8f: 85 d2 test %edx,%edx
112b91: 74 20 je 112bb3 <_Thread_Handler+0x4f>
#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 );
112b93: a1 78 f6 12 00 mov 0x12f678,%eax
112b98: 39 c3 cmp %eax,%ebx
112b9a: 74 17 je 112bb3 <_Thread_Handler+0x4f>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
112b9c: 85 c0 test %eax,%eax
112b9e: 74 0d je 112bad <_Thread_Handler+0x49>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
112ba0: 05 d8 00 00 00 add $0xd8,%eax
112ba5: 89 04 24 mov %eax,(%esp)
112ba8: e8 17 c1 ff ff call 10ecc4 <_CPU_Context_save_fp>
_Thread_Allocated_fp = executing;
112bad: 89 1d 78 f6 12 00 mov %ebx,0x12f678
/*
* 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 );
112bb3: 89 1c 24 mov %ebx,(%esp)
112bb6: e8 1d bc ff ff call 10e7d8 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
112bbb: e8 e8 b1 ff ff call 10dda8 <_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 (doCons) /* && (volatile void *)_init) */ {
112bc0: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
112bc5: 74 31 je 112bf8 <_Thread_Handler+0x94>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
112bc7: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
112bcd: 85 c0 test %eax,%eax
112bcf: 74 2e je 112bff <_Thread_Handler+0x9b> <== ALWAYS TAKEN
* 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 );
112bd1: 89 1c 24 mov %ebx,(%esp)
112bd4: e8 33 bc ff ff call 10e80c <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
112bd9: c7 44 24 08 05 00 00 movl $0x5,0x8(%esp)
112be0: 00
112be1: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
112be8: 00
112be9: c7 04 24 00 00 00 00 movl $0x0,(%esp)
112bf0: e8 cb 9f ff ff call 10cbc0 <_Internal_error_Occurred>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
112bf5: fb sti
112bf6: eb 81 jmp 112b79 <_Thread_Handler+0x15>
* _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 (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
112bf8: e8 07 cc 00 00 call 11f804 <__start_set_sysctl_set>
112bfd: eb c8 jmp 112bc7 <_Thread_Handler+0x63>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
112bff: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
112c05: 89 04 24 mov %eax,(%esp)
112c08: ff 93 8c 00 00 00 call *0x8c(%ebx)
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
112c0e: 89 43 28 mov %eax,0x28(%ebx)
112c11: eb be jmp 112bd1 <_Thread_Handler+0x6d>
0010e06c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
10e06c: 56 push %esi
10e06d: 53 push %ebx
10e06e: 83 ec 24 sub $0x24,%esp
uint32_t ticks_per_timeslice =
10e071: 8b 1d 78 b1 12 00 mov 0x12b178,%ebx
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
10e077: 8b 35 6c b1 12 00 mov 0x12b16c,%esi
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
10e07d: a1 88 b1 12 00 mov 0x12b188,%eax
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
10e082: 8b 0d 8c b1 12 00 mov 0x12b18c,%ecx
10e088: 85 c9 test %ecx,%ecx
10e08a: 0f 84 90 00 00 00 je 10e120 <_Thread_Handler_initialization+0xb4>
10e090: 8b 15 90 b1 12 00 mov 0x12b190,%edx
10e096: 85 d2 test %edx,%edx
10e098: 0f 84 82 00 00 00 je 10e120 <_Thread_Handler_initialization+0xb4><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
10e09e: 85 c0 test %eax,%eax
10e0a0: 74 0b je 10e0ad <_Thread_Handler_initialization+0x41>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
10e0a2: 8b 15 68 b1 12 00 mov 0x12b168,%edx
10e0a8: 89 14 24 mov %edx,(%esp)
10e0ab: ff d0 call *%eax
_Thread_Dispatch_necessary = false;
10e0ad: c6 05 78 f8 12 00 00 movb $0x0,0x12f878
_Thread_Executing = NULL;
10e0b4: c7 05 6c f8 12 00 00 movl $0x0,0x12f86c
10e0bb: 00 00 00
_Thread_Heir = NULL;
10e0be: c7 05 70 f8 12 00 00 movl $0x0,0x12f870
10e0c5: 00 00 00
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
10e0c8: c7 05 78 f6 12 00 00 movl $0x0,0x12f678
10e0cf: 00 00 00
#endif
_Thread_Maximum_extensions = maximum_extensions;
10e0d2: 89 35 80 f6 12 00 mov %esi,0x12f680
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
10e0d8: 89 1d d8 f5 12 00 mov %ebx,0x12f5d8
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
10e0de: c7 44 24 18 08 00 00 movl $0x8,0x18(%esp)
10e0e5: 00
10e0e6: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10e0ed: 00
10e0ee: c7 44 24 10 f0 00 00 movl $0xf0,0x10(%esp)
10e0f5: 00
10e0f6: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
10e0fd: 00
10e0fe: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e105: 00
10e106: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e10d: 00
10e10e: c7 04 24 20 f7 12 00 movl $0x12f720,(%esp)
10e115: e8 6e f0 ff ff call 10d188 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
10e11a: 83 c4 24 add $0x24,%esp
10e11d: 5b pop %ebx
10e11e: 5e pop %esi
10e11f: c3 ret
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
10e120: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
10e127: 00
10e128: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e12f: 00
10e130: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10e137: e8 84 ea ff ff call 10cbc0 <_Internal_error_Occurred>
0010de48 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10de48: 55 push %ebp
10de49: 57 push %edi
10de4a: 56 push %esi
10de4b: 53 push %ebx
10de4c: 83 ec 2c sub $0x2c,%esp
10de4f: 8b 5c 24 44 mov 0x44(%esp),%ebx
10de53: 8b 74 24 4c mov 0x4c(%esp),%esi
10de57: 0f b6 7c 24 50 movzbl 0x50(%esp),%edi
10de5c: 8a 44 24 58 mov 0x58(%esp),%al
10de60: 88 44 24 1f mov %al,0x1f(%esp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10de64: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10de6b: 00 00 00
10de6e: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10de75: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10de78: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
10de7f: 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 );
10de82: 89 74 24 04 mov %esi,0x4(%esp)
10de86: 89 1c 24 mov %ebx,(%esp)
10de89: e8 96 07 00 00 call 10e624 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10de8e: 85 c0 test %eax,%eax
10de90: 0f 84 5a 01 00 00 je 10dff0 <_Thread_Initialize+0x1a8>
10de96: 39 c6 cmp %eax,%esi
10de98: 0f 87 52 01 00 00 ja 10dff0 <_Thread_Initialize+0x1a8><== NEVER TAKEN
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10de9e: 8b 93 bc 00 00 00 mov 0xbc(%ebx),%edx
10dea4: 89 93 b4 00 00 00 mov %edx,0xb4(%ebx)
the_stack->size = size;
10deaa: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10deb0: 89 f8 mov %edi,%eax
10deb2: 84 c0 test %al,%al
10deb4: 0f 85 46 01 00 00 jne 10e000 <_Thread_Initialize+0x1b8>
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10deba: 31 f6 xor %esi,%esi
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10debc: 89 b3 d8 00 00 00 mov %esi,0xd8(%ebx)
the_thread->Start.fp_context = fp_area;
10dec2: 89 b3 b8 00 00 00 mov %esi,0xb8(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10dec8: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10decf: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10ded6: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10dedd: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10dee4: a1 80 f6 12 00 mov 0x12f680,%eax
10dee9: 85 c0 test %eax,%eax
10deeb: 0f 85 2f 01 00 00 jne 10e020 <_Thread_Initialize+0x1d8>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10def1: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10def8: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10defb: 31 ed xor %ebp,%ebp
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10defd: 8a 44 24 1f mov 0x1f(%esp),%al
10df01: 88 83 9c 00 00 00 mov %al,0x9c(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10df07: 8b 44 24 5c mov 0x5c(%esp),%eax
10df0b: 89 83 a0 00 00 00 mov %eax,0xa0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10df11: 8b 44 24 60 mov 0x60(%esp),%eax
10df15: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10df1b: 8b 44 24 64 mov 0x64(%esp),%eax
10df1f: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
the_thread->current_state = STATES_DORMANT;
10df25: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10df2c: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10df33: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10df3a: 8b 44 24 54 mov 0x54(%esp),%eax
10df3e: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10df41: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10df47: 89 1c 24 mov %ebx,(%esp)
10df4a: ff 15 98 b2 12 00 call *0x12b298
10df50: 89 c7 mov %eax,%edi
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10df52: 85 c0 test %eax,%eax
10df54: 74 45 je 10df9b <_Thread_Initialize+0x153><== NEVER TAKEN
goto failed;
_Thread_Set_priority( the_thread, priority );
10df56: 8b 44 24 54 mov 0x54(%esp),%eax
10df5a: 89 44 24 04 mov %eax,0x4(%esp)
10df5e: 89 1c 24 mov %ebx,(%esp)
10df61: e8 46 06 00 00 call 10e5ac <_Thread_Set_priority>
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10df66: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
10df6d: 00 00 00
10df70: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10df77: 00 00 00
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10df7a: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10df7e: 8b 44 24 40 mov 0x40(%esp),%eax
10df82: 8b 40 1c mov 0x1c(%eax),%eax
10df85: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10df88: 8b 44 24 68 mov 0x68(%esp),%eax
10df8c: 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 );
10df8f: 89 1c 24 mov %ebx,(%esp)
10df92: e8 f9 08 00 00 call 10e890 <_User_extensions_Thread_create>
if ( extension_status )
10df97: 84 c0 test %al,%al
10df99: 75 61 jne 10dffc <_Thread_Initialize+0x1b4>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10df9b: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10dfa1: 89 04 24 mov %eax,(%esp)
10dfa4: e8 7f 0c 00 00 call 10ec28 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10dfa9: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10dfaf: 89 04 24 mov %eax,(%esp)
10dfb2: e8 71 0c 00 00 call 10ec28 <_Workspace_Free>
10dfb7: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10dfbd: 89 04 24 mov %eax,(%esp)
10dfc0: e8 63 0c 00 00 call 10ec28 <_Workspace_Free>
_Workspace_Free( extensions_area );
10dfc5: 89 2c 24 mov %ebp,(%esp)
10dfc8: e8 5b 0c 00 00 call 10ec28 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10dfcd: 89 34 24 mov %esi,(%esp)
10dfd0: e8 53 0c 00 00 call 10ec28 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10dfd5: 89 3c 24 mov %edi,(%esp)
10dfd8: e8 4b 0c 00 00 call 10ec28 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10dfdd: 89 1c 24 mov %ebx,(%esp)
10dfe0: e8 77 06 00 00 call 10e65c <_Thread_Stack_Free>
return false;
10dfe5: 31 c0 xor %eax,%eax
}
10dfe7: 83 c4 2c add $0x2c,%esp
10dfea: 5b pop %ebx
10dfeb: 5e pop %esi
10dfec: 5f pop %edi
10dfed: 5d pop %ebp
10dfee: c3 ret
10dfef: 90 nop
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10dff0: 31 c0 xor %eax,%eax
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10dff2: 83 c4 2c add $0x2c,%esp
10dff5: 5b pop %ebx
10dff6: 5e pop %esi
10dff7: 5f pop %edi
10dff8: 5d pop %ebp
10dff9: c3 ret
10dffa: 66 90 xchg %ax,%ax
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10dffc: b0 01 mov $0x1,%al
10dffe: eb f2 jmp 10dff2 <_Thread_Initialize+0x1aa>
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10e000: c7 04 24 6c 00 00 00 movl $0x6c,(%esp)
10e007: e8 f0 0b 00 00 call 10ebfc <_Workspace_Allocate>
10e00c: 89 c6 mov %eax,%esi
if ( !fp_area )
10e00e: 85 c0 test %eax,%eax
10e010: 0f 85 a6 fe ff ff jne 10debc <_Thread_Initialize+0x74>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10e016: 31 ed xor %ebp,%ebp
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10e018: 31 ff xor %edi,%edi
10e01a: e9 7c ff ff ff jmp 10df9b <_Thread_Initialize+0x153>
10e01f: 90 nop
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10e020: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10e027: 89 04 24 mov %eax,(%esp)
10e02a: e8 cd 0b 00 00 call 10ebfc <_Workspace_Allocate>
10e02f: 89 c5 mov %eax,%ebp
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10e031: 85 c0 test %eax,%eax
10e033: 74 30 je 10e065 <_Thread_Initialize+0x21d>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e035: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
10e03b: 8b 3d 80 f6 12 00 mov 0x12f680,%edi
10e041: 89 c1 mov %eax,%ecx
* 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++ )
10e043: 31 c0 xor %eax,%eax
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e045: 31 d2 xor %edx,%edx
10e047: eb 09 jmp 10e052 <_Thread_Initialize+0x20a>
10e049: 8d 76 00 lea 0x0(%esi),%esi
10e04c: 8b 8b e8 00 00 00 mov 0xe8(%ebx),%ecx
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10e052: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%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++ )
10e059: 42 inc %edx
10e05a: 89 d0 mov %edx,%eax
10e05c: 39 fa cmp %edi,%edx
10e05e: 76 ec jbe 10e04c <_Thread_Initialize+0x204>
10e060: e9 98 fe ff ff jmp 10defd <_Thread_Initialize+0xb5>
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10e065: 31 ff xor %edi,%edi
10e067: e9 2f ff ff ff jmp 10df9b <_Thread_Initialize+0x153>
001116c0 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
1116c0: 83 ec 1c sub $0x1c,%esp
1116c3: 8b 44 24 20 mov 0x20(%esp),%eax
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
1116c7: 8b 50 44 mov 0x44(%eax),%edx
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
1116ca: 8b 4a 30 mov 0x30(%edx),%ecx
1116cd: 85 c9 test %ecx,%ecx
1116cf: 74 08 je 1116d9 <_Thread_queue_Process_timeout+0x19>
1116d1: 3b 05 6c f8 12 00 cmp 0x12f86c,%eax
1116d7: 74 17 je 1116f0 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
1116d9: 8b 4a 3c mov 0x3c(%edx),%ecx
1116dc: 89 48 34 mov %ecx,0x34(%eax)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
1116df: 89 44 24 04 mov %eax,0x4(%esp)
1116e3: 89 14 24 mov %edx,(%esp)
1116e6: e8 ed fe ff ff call 1115d8 <_Thread_queue_Extract>
}
}
1116eb: 83 c4 1c add $0x1c,%esp
1116ee: c3 ret
1116ef: 90 nop
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
1116f0: 83 f9 03 cmp $0x3,%ecx
1116f3: 74 f6 je 1116eb <_Thread_queue_Process_timeout+0x2b>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
1116f5: 8b 4a 3c mov 0x3c(%edx),%ecx
1116f8: 89 48 34 mov %ecx,0x34(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
1116fb: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
111702: eb e7 jmp 1116eb <_Thread_queue_Process_timeout+0x2b>
0010e504 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e504: 56 push %esi
10e505: 53 push %ebx
10e506: 83 ec 24 sub $0x24,%esp
10e509: 8b 5c 24 30 mov 0x30(%esp),%ebx
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10e50d: 85 db test %ebx,%ebx
10e50f: 74 06 je 10e517 <_Thread_queue_Requeue+0x13><== 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 ) {
10e511: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10e515: 74 09 je 10e520 <_Thread_queue_Requeue+0x1c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e517: 83 c4 24 add $0x24,%esp <== NOT EXECUTED
10e51a: 5b pop %ebx <== NOT EXECUTED
10e51b: 5e pop %esi <== NOT EXECUTED
10e51c: c3 ret <== NOT EXECUTED
10e51d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10e520: 9c pushf
10e521: fa cli
10e522: 5e pop %esi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e523: 8b 44 24 34 mov 0x34(%esp),%eax
10e527: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e52e: 75 08 jne 10e538 <_Thread_queue_Requeue+0x34><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10e530: 56 push %esi
10e531: 9d popf
}
}
10e532: 83 c4 24 add $0x24,%esp
10e535: 5b pop %ebx
10e536: 5e pop %esi
10e537: 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;
10e538: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10e53f: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e546: 00
10e547: 89 44 24 04 mov %eax,0x4(%esp)
10e54b: 89 1c 24 mov %ebx,(%esp)
10e54e: e8 c1 30 00 00 call 111614 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e553: 8d 44 24 1c lea 0x1c(%esp),%eax
10e557: 89 44 24 08 mov %eax,0x8(%esp)
10e55b: 8b 44 24 34 mov 0x34(%esp),%eax
10e55f: 89 44 24 04 mov %eax,0x4(%esp)
10e563: 89 1c 24 mov %ebx,(%esp)
10e566: e8 81 fd ff ff call 10e2ec <_Thread_queue_Enqueue_priority>
10e56b: eb c3 jmp 10e530 <_Thread_queue_Requeue+0x2c>
0010e570 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e570: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e573: 8d 44 24 1c lea 0x1c(%esp),%eax
10e577: 89 44 24 04 mov %eax,0x4(%esp)
10e57b: 8b 44 24 30 mov 0x30(%esp),%eax
10e57f: 89 04 24 mov %eax,(%esp)
10e582: e8 41 f8 ff ff call 10ddc8 <_Thread_Get>
switch ( location ) {
10e587: 8b 54 24 1c mov 0x1c(%esp),%edx
10e58b: 85 d2 test %edx,%edx
10e58d: 75 18 jne 10e5a7 <_Thread_queue_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e58f: 89 04 24 mov %eax,(%esp)
10e592: e8 29 31 00 00 call 1116c0 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10e597: a1 04 f6 12 00 mov 0x12f604,%eax
10e59c: 48 dec %eax
10e59d: a3 04 f6 12 00 mov %eax,0x12f604
return _Thread_Dispatch_disable_level;
10e5a2: a1 04 f6 12 00 mov 0x12f604,%eax
_Thread_Unnest_dispatch();
break;
}
}
10e5a7: 83 c4 2c add $0x2c,%esp
10e5aa: c3 ret
0011bf68 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
11bf68: 55 push %ebp
11bf69: 57 push %edi
11bf6a: 56 push %esi
11bf6b: 53 push %ebx
11bf6c: 83 ec 5c sub $0x5c,%esp
11bf6f: 8b 5c 24 70 mov 0x70(%esp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf73: 8d 4c 24 3c lea 0x3c(%esp),%ecx
11bf77: 89 4c 24 20 mov %ecx,0x20(%esp)
11bf7b: 89 4c 24 38 mov %ecx,0x38(%esp)
head->previous = NULL;
11bf7f: c7 44 24 3c 00 00 00 movl $0x0,0x3c(%esp)
11bf86: 00
tail->previous = head;
11bf87: 8d 44 24 38 lea 0x38(%esp),%eax
11bf8b: 89 44 24 40 mov %eax,0x40(%esp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf8f: 8d 7c 24 44 lea 0x44(%esp),%edi
11bf93: 8d 4c 24 48 lea 0x48(%esp),%ecx
11bf97: 89 4c 24 24 mov %ecx,0x24(%esp)
11bf9b: 89 4c 24 44 mov %ecx,0x44(%esp)
head->previous = NULL;
11bf9f: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
11bfa6: 00
tail->previous = head;
11bfa7: 89 7c 24 4c mov %edi,0x4c(%esp)
11bfab: 8d 6b 30 lea 0x30(%ebx),%ebp
11bfae: 8d 73 68 lea 0x68(%ebx),%esi
11bfb1: 8d 4b 08 lea 0x8(%ebx),%ecx
11bfb4: 89 4c 24 28 mov %ecx,0x28(%esp)
11bfb8: 8d 4b 40 lea 0x40(%ebx),%ecx
11bfbb: 89 4c 24 2c mov %ecx,0x2c(%esp)
{
/*
* 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;
11bfbf: 8d 44 24 38 lea 0x38(%esp),%eax
11bfc3: 89 43 78 mov %eax,0x78(%ebx)
11bfc6: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
11bfc8: a1 04 db 14 00 mov 0x14db04,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfcd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
11bfd0: 89 43 3c mov %eax,0x3c(%ebx)
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11bfd3: 89 7c 24 08 mov %edi,0x8(%esp)
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfd7: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11bfd9: 89 44 24 04 mov %eax,0x4(%esp)
11bfdd: 89 2c 24 mov %ebp,(%esp)
11bfe0: e8 9b 3d 00 00 call 11fd80 <_Watchdog_Adjust_to_chain>
11bfe5: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bfec: 3b
11bfed: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bff4: 00
11bff5: a1 c0 d9 14 00 mov 0x14d9c0,%eax
11bffa: 8b 15 c4 d9 14 00 mov 0x14d9c4,%edx
11c000: 89 04 24 mov %eax,(%esp)
11c003: 89 54 24 04 mov %edx,0x4(%esp)
11c007: e8 38 40 01 00 call 130044 <__divdi3>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11c00c: 8b 53 74 mov 0x74(%ebx),%edx
/*
* 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 ) {
11c00f: 39 d0 cmp %edx,%eax
11c011: 0f 87 89 00 00 00 ja 11c0a0 <_Timer_server_Body+0x138>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
11c017: 73 1e jae 11c037 <_Timer_server_Body+0xcf>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
11c019: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
11c01b: 89 54 24 08 mov %edx,0x8(%esp)
11c01f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
11c026: 00
11c027: 89 34 24 mov %esi,(%esp)
11c02a: 89 44 24 1c mov %eax,0x1c(%esp)
11c02e: e8 dd 3c 00 00 call 11fd10 <_Watchdog_Adjust>
11c033: 8b 44 24 1c mov 0x1c(%esp),%eax
}
watchdogs->last_snapshot = snapshot;
11c037: 89 43 74 mov %eax,0x74(%ebx)
11c03a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c03c: 8b 43 78 mov 0x78(%ebx),%eax
11c03f: 89 04 24 mov %eax,(%esp)
11c042: e8 95 08 00 00 call 11c8dc <_Chain_Get>
if ( timer == NULL ) {
11c047: 85 c0 test %eax,%eax
11c049: 74 2d je 11c078 <_Timer_server_Body+0x110><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11c04b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11c04e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
11c051: 74 39 je 11c08c <_Timer_server_Body+0x124><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11c053: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
11c056: 75 e4 jne 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11c058: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c05b: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c05f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11c062: e8 a1 3d 00 00 call 11fe08 <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c067: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11c06a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
11c06d: e8 6a 08 00 00 call 11c8dc <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
11c072: 85 c0 test %eax,%eax <== NOT EXECUTED
11c074: 75 d5 jne 11c04b <_Timer_server_Body+0xe3><== NOT EXECUTED
11c076: 66 90 xchg %ax,%ax <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
11c078: 9c pushf
11c079: fa cli
11c07a: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
11c07b: 8b 4c 24 20 mov 0x20(%esp),%ecx
11c07f: 39 4c 24 38 cmp %ecx,0x38(%esp)
11c083: 74 3c je 11c0c1 <_Timer_server_Body+0x159><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
11c085: 50 push %eax <== NOT EXECUTED
11c086: 9d popf <== NOT EXECUTED
11c087: e9 3c ff ff ff jmp 11bfc8 <_Timer_server_Body+0x60><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11c08c: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c08f: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c093: 89 2c 24 mov %ebp,(%esp) <== NOT EXECUTED
11c096: e8 6d 3d 00 00 call 11fe08 <_Watchdog_Insert> <== NOT EXECUTED
11c09b: eb 9f jmp 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
11c09d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11c0a0: 89 7c 24 08 mov %edi,0x8(%esp)
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
11c0a4: 89 c1 mov %eax,%ecx
11c0a6: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11c0a8: 89 4c 24 04 mov %ecx,0x4(%esp)
11c0ac: 89 34 24 mov %esi,(%esp)
11c0af: 89 44 24 1c mov %eax,0x1c(%esp)
11c0b3: e8 c8 3c 00 00 call 11fd80 <_Watchdog_Adjust_to_chain>
11c0b8: 8b 44 24 1c mov 0x1c(%esp),%eax
11c0bc: e9 76 ff ff ff jmp 11c037 <_Timer_server_Body+0xcf>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
11c0c1: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11c0c8: 50 push %eax
11c0c9: 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 ) ) {
11c0ca: 8b 4c 24 24 mov 0x24(%esp),%ecx
11c0ce: 39 4c 24 44 cmp %ecx,0x44(%esp)
11c0d2: 75 26 jne 11c0fa <_Timer_server_Body+0x192>
11c0d4: eb 38 jmp 11c10e <_Timer_server_Body+0x1a6>
11c0d6: 66 90 xchg %ax,%ax
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
11c0d8: 8b 10 mov (%eax),%edx
head->next = new_first;
11c0da: 89 54 24 44 mov %edx,0x44(%esp)
new_first->previous = head;
11c0de: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
11c0e1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
11c0e8: 51 push %ecx
11c0e9: 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 );
11c0ea: 8b 50 24 mov 0x24(%eax),%edx
11c0ed: 89 54 24 04 mov %edx,0x4(%esp)
11c0f1: 8b 50 20 mov 0x20(%eax),%edx
11c0f4: 89 14 24 mov %edx,(%esp)
11c0f7: ff 50 1c call *0x1c(%eax)
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
11c0fa: 9c pushf
11c0fb: fa cli
11c0fc: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11c0fd: 8b 44 24 44 mov 0x44(%esp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11c101: 3b 44 24 24 cmp 0x24(%esp),%eax
11c105: 75 d1 jne 11c0d8 <_Timer_server_Body+0x170>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
11c107: 51 push %ecx
11c108: 9d popf
11c109: e9 b1 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
11c10e: c6 43 7c 00 movb $0x0,0x7c(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11c112: a1 04 da 14 00 mov 0x14da04,%eax
11c117: 40 inc %eax
11c118: a3 04 da 14 00 mov %eax,0x14da04
return _Thread_Dispatch_disable_level;
11c11d: a1 04 da 14 00 mov 0x14da04,%eax
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
11c122: c7 44 24 04 08 00 00 movl $0x8,0x4(%esp)
11c129: 00
11c12a: 8b 03 mov (%ebx),%eax
11c12c: 89 04 24 mov %eax,(%esp)
11c12f: e8 d0 37 00 00 call 11f904 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
11c134: 89 d8 mov %ebx,%eax
11c136: e8 3d fc ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
11c13b: 89 d8 mov %ebx,%eax
11c13d: e8 7e fc ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
11c142: e8 1d 2f 00 00 call 11f064 <_Thread_Enable_dispatch>
ts->active = true;
11c147: 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 );
11c14b: 8b 4c 24 28 mov 0x28(%esp),%ecx
11c14f: 89 0c 24 mov %ecx,(%esp)
11c152: e8 cd 3d 00 00 call 11ff24 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
11c157: 8b 4c 24 2c mov 0x2c(%esp),%ecx
11c15b: 89 0c 24 mov %ecx,(%esp)
11c15e: e8 c1 3d 00 00 call 11ff24 <_Watchdog_Remove>
11c163: e9 57 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
0011be08 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
11be08: 55 push %ebp
11be09: 57 push %edi
11be0a: 56 push %esi
11be0b: 53 push %ebx
11be0c: 83 ec 2c sub $0x2c,%esp
11be0f: 8b 5c 24 40 mov 0x40(%esp),%ebx
11be13: 8b 74 24 44 mov 0x44(%esp),%esi
if ( ts->insert_chain == NULL ) {
11be17: 8b 43 78 mov 0x78(%ebx),%eax
11be1a: 85 c0 test %eax,%eax
11be1c: 74 1a je 11be38 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* 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 );
11be1e: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11be21: 89 74 24 44 mov %esi,0x44(%esp) <== NOT EXECUTED
11be25: 89 44 24 40 mov %eax,0x40(%esp) <== NOT EXECUTED
}
}
11be29: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
11be2c: 5b pop %ebx <== NOT EXECUTED
11be2d: 5e pop %esi <== NOT EXECUTED
11be2e: 5f pop %edi <== NOT EXECUTED
11be2f: 5d pop %ebp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11be30: e9 83 0a 00 00 jmp 11c8b8 <_Chain_Append> <== NOT EXECUTED
11be35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11be38: a1 04 da 14 00 mov 0x14da04,%eax
11be3d: 40 inc %eax
11be3e: a3 04 da 14 00 mov %eax,0x14da04
return _Thread_Dispatch_disable_level;
11be43: a1 04 da 14 00 mov 0x14da04,%eax
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11be48: 8b 46 38 mov 0x38(%esi),%eax
11be4b: 83 f8 01 cmp $0x1,%eax
11be4e: 0f 84 a8 00 00 00 je 11befc <_Timer_server_Schedule_operation_method+0xf4>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11be54: 83 f8 03 cmp $0x3,%eax
11be57: 74 0f je 11be68 <_Timer_server_Schedule_operation_method+0x60>
* 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 );
}
}
11be59: 83 c4 2c add $0x2c,%esp
11be5c: 5b pop %ebx
11be5d: 5e pop %esi
11be5e: 5f pop %edi
11be5f: 5d pop %ebp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
11be60: e9 ff 31 00 00 jmp 11f064 <_Thread_Enable_dispatch>
11be65: 8d 76 00 lea 0x0(%esi),%esi
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11be68: 9c pushf
11be69: fa cli
11be6a: 5f pop %edi
11be6b: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11be72: 3b
11be73: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11be7a: 00
11be7b: a1 c0 d9 14 00 mov 0x14d9c0,%eax
11be80: 8b 15 c4 d9 14 00 mov 0x14d9c4,%edx
11be86: 89 04 24 mov %eax,(%esp)
11be89: 89 54 24 04 mov %edx,0x4(%esp)
11be8d: e8 b2 41 01 00 call 130044 <__divdi3>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
11be92: 8b 53 74 mov 0x74(%ebx),%edx
11be95: 89 54 24 1c mov %edx,0x1c(%esp)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11be99: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11be9c: 8d 6b 6c lea 0x6c(%ebx),%ebp
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
11be9f: 39 ea cmp %ebp,%edx
11bea1: 74 28 je 11becb <_Timer_server_Schedule_operation_method+0xc3>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
11bea3: 8b 6a 10 mov 0x10(%edx),%ebp
if ( snapshot > last_snapshot ) {
11bea6: 3b 44 24 1c cmp 0x1c(%esp),%eax
11beaa: 0f 86 a4 00 00 00 jbe 11bf54 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
11beb0: 89 c1 mov %eax,%ecx
11beb2: 2b 4c 24 1c sub 0x1c(%esp),%ecx
11beb6: 89 4c 24 1c mov %ecx,0x1c(%esp)
if (delta_interval > delta) {
11beba: 39 cd cmp %ecx,%ebp
11bebc: 0f 86 9f 00 00 00 jbe 11bf61 <_Timer_server_Schedule_operation_method+0x159><== NEVER TAKEN
delta_interval -= delta;
11bec2: 89 e9 mov %ebp,%ecx
11bec4: 2b 4c 24 1c sub 0x1c(%esp),%ecx
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
11bec8: 89 4a 10 mov %ecx,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
11becb: 89 43 74 mov %eax,0x74(%ebx)
_ISR_Enable( level );
11bece: 57 push %edi
11becf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11bed0: 83 c6 10 add $0x10,%esi
11bed3: 89 74 24 04 mov %esi,0x4(%esp)
11bed7: 8d 43 68 lea 0x68(%ebx),%eax
11beda: 89 04 24 mov %eax,(%esp)
11bedd: e8 26 3f 00 00 call 11fe08 <_Watchdog_Insert>
if ( !ts->active ) {
11bee2: 8a 43 7c mov 0x7c(%ebx),%al
11bee5: 84 c0 test %al,%al
11bee7: 0f 85 6c ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_tod_system_watchdog( ts );
11beed: 89 d8 mov %ebx,%eax
11beef: e8 cc fe ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
11bef4: e9 60 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
11bef9: 8d 76 00 lea 0x0(%esi),%esi
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11befc: 9c pushf
11befd: fa cli
11befe: 5d pop %ebp
snapshot = _Watchdog_Ticks_since_boot;
11beff: 8b 15 04 db 14 00 mov 0x14db04,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11bf05: 8b 7b 3c mov 0x3c(%ebx),%edi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11bf08: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11bf0b: 8d 4b 34 lea 0x34(%ebx),%ecx
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
11bf0e: 39 c8 cmp %ecx,%eax
11bf10: 74 10 je 11bf22 <_Timer_server_Schedule_operation_method+0x11a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11bf12: 89 d1 mov %edx,%ecx
11bf14: 29 f9 sub %edi,%ecx
delta_interval = first_watchdog->delta_interval;
11bf16: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
11bf19: 39 f9 cmp %edi,%ecx
11bf1b: 73 33 jae 11bf50 <_Timer_server_Schedule_operation_method+0x148>
delta_interval -= delta;
11bf1d: 29 cf sub %ecx,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
11bf1f: 89 78 10 mov %edi,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11bf22: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11bf25: 55 push %ebp
11bf26: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11bf27: 83 c6 10 add $0x10,%esi
11bf2a: 89 74 24 04 mov %esi,0x4(%esp)
11bf2e: 8d 43 30 lea 0x30(%ebx),%eax
11bf31: 89 04 24 mov %eax,(%esp)
11bf34: e8 cf 3e 00 00 call 11fe08 <_Watchdog_Insert>
if ( !ts->active ) {
11bf39: 8a 43 7c mov 0x7c(%ebx),%al
11bf3c: 84 c0 test %al,%al
11bf3e: 0f 85 15 ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_interval_system_watchdog( ts );
11bf44: 89 d8 mov %ebx,%eax
11bf46: e8 2d fe ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
11bf4b: e9 09 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf50: 31 ff xor %edi,%edi
11bf52: eb cb jmp 11bf1f <_Timer_server_Schedule_operation_method+0x117>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
11bf54: 8b 4c 24 1c mov 0x1c(%esp),%ecx
11bf58: 01 e9 add %ebp,%ecx
delta_interval += delta;
11bf5a: 29 c1 sub %eax,%ecx
11bf5c: e9 67 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf61: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
11bf63: e9 60 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0><== NOT EXECUTED
0010ec00 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
10ec00: 56 push %esi
10ec01: 53 push %ebx
10ec02: 8b 74 24 0c mov 0xc(%esp),%esi
10ec06: 8b 4c 24 10 mov 0x10(%esp),%ecx
uint32_t seconds = add->tv_sec;
10ec0a: 8b 01 mov (%ecx),%eax
/* Add the basics */
time->tv_sec += add->tv_sec;
10ec0c: 01 06 add %eax,(%esi)
time->tv_nsec += add->tv_nsec;
10ec0e: 8b 56 04 mov 0x4(%esi),%edx
10ec11: 03 51 04 add 0x4(%ecx),%edx
10ec14: 89 56 04 mov %edx,0x4(%esi)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10ec17: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
10ec1d: 76 1c jbe 10ec3b <_Timespec_Add_to+0x3b>
10ec1f: 8b 0e mov (%esi),%ecx
10ec21: 41 inc %ecx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
10ec22: 29 c1 sub %eax,%ecx
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10ec24: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
10ec2a: 8d 1c 01 lea (%ecx,%eax,1),%ebx
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
10ec2d: 40 inc %eax
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10ec2e: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
10ec34: 77 ee ja 10ec24 <_Timespec_Add_to+0x24> <== NEVER TAKEN
10ec36: 89 56 04 mov %edx,0x4(%esi)
10ec39: 89 1e mov %ebx,(%esi)
time->tv_sec++;
seconds++;
}
return seconds;
}
10ec3b: 5b pop %ebx
10ec3c: 5e pop %esi
10ec3d: c3 ret
0010fd90 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
10fd90: 57 push %edi
10fd91: 56 push %esi
10fd92: 53 push %ebx
10fd93: 83 ec 10 sub $0x10,%esp
10fd96: 8b 54 24 20 mov 0x20(%esp),%edx
10fd9a: 8b 44 24 24 mov 0x24(%esp),%eax
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
10fd9e: 8b 18 mov (%eax),%ebx
10fda0: 8b 48 04 mov 0x4(%eax),%ecx
10fda3: 89 c8 mov %ecx,%eax
10fda5: 09 d8 or %ebx,%eax
10fda7: 74 73 je 10fe1c <_Timestamp64_Divide+0x8c><== NEVER TAKEN
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
10fda9: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi
10fdb0: b8 a0 86 01 00 mov $0x186a0,%eax
10fdb5: f7 22 mull (%edx)
10fdb7: 01 f2 add %esi,%edx
10fdb9: 89 5c 24 08 mov %ebx,0x8(%esp)
10fdbd: 89 4c 24 0c mov %ecx,0xc(%esp)
10fdc1: 89 04 24 mov %eax,(%esp)
10fdc4: 89 54 24 04 mov %edx,0x4(%esp)
10fdc8: e8 db 0d 01 00 call 120ba8 <__divdi3>
10fdcd: 89 c6 mov %eax,%esi
10fdcf: 89 d7 mov %edx,%edi
*_ival_percentage = answer / 1000;
10fdd1: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10fdd8: 00
10fdd9: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10fde0: 00
10fde1: 89 04 24 mov %eax,(%esp)
10fde4: 89 54 24 04 mov %edx,0x4(%esp)
10fde8: e8 bb 0d 01 00 call 120ba8 <__divdi3>
10fded: 8b 4c 24 28 mov 0x28(%esp),%ecx
10fdf1: 89 01 mov %eax,(%ecx)
*_fval_percentage = answer % 1000;
10fdf3: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10fdfa: 00
10fdfb: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10fe02: 00
10fe03: 89 34 24 mov %esi,(%esp)
10fe06: 89 7c 24 04 mov %edi,0x4(%esp)
10fe0a: e8 ed 0e 01 00 call 120cfc <__moddi3>
10fe0f: 8b 4c 24 2c mov 0x2c(%esp),%ecx
10fe13: 89 01 mov %eax,(%ecx)
}
10fe15: 83 c4 10 add $0x10,%esp
10fe18: 5b pop %ebx
10fe19: 5e pop %esi
10fe1a: 5f pop %edi
10fe1b: c3 ret
)
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
10fe1c: 8b 4c 24 28 mov 0x28(%esp),%ecx <== NOT EXECUTED
10fe20: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
*_fval_percentage = 0;
10fe26: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
10fe2a: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
*_fval_percentage = answer % 1000;
}
10fe30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10fe33: 5b pop %ebx <== NOT EXECUTED
10fe34: 5e pop %esi <== NOT EXECUTED
10fe35: 5f pop %edi <== NOT EXECUTED
10fe36: c3 ret <== NOT EXECUTED
0010e844 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e844: 55 push %ebp
10e845: 57 push %edi
10e846: 56 push %esi
10e847: 53 push %ebx
10e848: 83 ec 1c sub $0x1c,%esp
10e84b: 8b 74 24 30 mov 0x30(%esp),%esi
10e84f: 8b 7c 24 38 mov 0x38(%esp),%edi
10e853: 8a 44 24 34 mov 0x34(%esp),%al
10e857: 8b 1d f4 f7 12 00 mov 0x12f7f4,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e85d: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e863: 74 22 je 10e887 <_User_extensions_Fatal+0x43><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e865: 0f b6 e8 movzbl %al,%ebp
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10e868: 8b 43 30 mov 0x30(%ebx),%eax
10e86b: 85 c0 test %eax,%eax
10e86d: 74 0d je 10e87c <_User_extensions_Fatal+0x38>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e86f: 89 7c 24 08 mov %edi,0x8(%esp)
10e873: 89 6c 24 04 mov %ebp,0x4(%esp)
10e877: 89 34 24 mov %esi,(%esp)
10e87a: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e87c: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e87f: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e885: 75 e1 jne 10e868 <_User_extensions_Fatal+0x24>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e887: 83 c4 1c add $0x1c,%esp
10e88a: 5b pop %ebx
10e88b: 5e pop %esi
10e88c: 5f pop %edi
10e88d: 5d pop %ebp
10e88e: c3 ret
0010e728 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e728: 55 push %ebp
10e729: 57 push %edi
10e72a: 56 push %esi
10e72b: 53 push %ebx
10e72c: 83 ec 2c sub $0x2c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10e72f: 8b 15 a4 b1 12 00 mov 0x12b1a4,%edx
10e735: 89 54 24 1c mov %edx,0x1c(%esp)
initial_extensions = Configuration.User_extension_table;
10e739: 8b 2d a8 b1 12 00 mov 0x12b1a8,%ebp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e73f: c7 05 ec f7 12 00 f0 movl $0x12f7f0,0x12f7ec
10e746: f7 12 00
head->previous = NULL;
10e749: c7 05 f0 f7 12 00 00 movl $0x0,0x12f7f0
10e750: 00 00 00
tail->previous = head;
10e753: c7 05 f4 f7 12 00 ec movl $0x12f7ec,0x12f7f4
10e75a: f7 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e75d: c7 05 08 f6 12 00 0c movl $0x12f60c,0x12f608
10e764: f6 12 00
head->previous = NULL;
10e767: c7 05 0c f6 12 00 00 movl $0x0,0x12f60c
10e76e: 00 00 00
tail->previous = head;
10e771: c7 05 10 f6 12 00 08 movl $0x12f608,0x12f610
10e778: f6 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e77b: 85 ed test %ebp,%ebp
10e77d: 74 4e je 10e7cd <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e77f: 8d 04 52 lea (%edx,%edx,2),%eax
10e782: 8d 34 82 lea (%edx,%eax,4),%esi
10e785: c1 e6 02 shl $0x2,%esi
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
10e788: 89 34 24 mov %esi,(%esp)
10e78b: e8 b4 04 00 00 call 10ec44 <_Workspace_Allocate_or_fatal_error>
10e790: 89 c3 mov %eax,%ebx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e792: 31 c0 xor %eax,%eax
10e794: 89 df mov %ebx,%edi
10e796: 89 f1 mov %esi,%ecx
10e798: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e79a: 8b 44 24 1c mov 0x1c(%esp),%eax
10e79e: 85 c0 test %eax,%eax
10e7a0: 74 2b je 10e7cd <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
10e7a2: 89 6c 24 18 mov %ebp,0x18(%esp)
10e7a6: 31 ed xor %ebp,%ebp
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e7a8: 8d 7b 14 lea 0x14(%ebx),%edi
10e7ab: 8b 74 24 18 mov 0x18(%esp),%esi
10e7af: b9 08 00 00 00 mov $0x8,%ecx
10e7b4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e7b6: 89 1c 24 mov %ebx,(%esp)
10e7b9: e8 6a 2f 00 00 call 111728 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e7be: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e7c1: 45 inc %ebp
10e7c2: 83 44 24 18 20 addl $0x20,0x18(%esp)
10e7c7: 3b 6c 24 1c cmp 0x1c(%esp),%ebp
10e7cb: 75 db jne 10e7a8 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e7cd: 83 c4 2c add $0x2c,%esp
10e7d0: 5b pop %ebx
10e7d1: 5e pop %esi
10e7d2: 5f pop %edi
10e7d3: 5d pop %ebp
10e7d4: c3 ret
0010e7d8 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e7d8: 56 push %esi
10e7d9: 53 push %ebx
10e7da: 83 ec 14 sub $0x14,%esp
10e7dd: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e7e1: 8b 1d ec f7 12 00 mov 0x12f7ec,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e7e7: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e7ed: 74 17 je 10e806 <_User_extensions_Thread_begin+0x2e><== NEVER TAKEN
10e7ef: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e7f0: 8b 43 28 mov 0x28(%ebx),%eax
10e7f3: 85 c0 test %eax,%eax
10e7f5: 74 05 je 10e7fc <_User_extensions_Thread_begin+0x24>
(*the_extension->Callouts.thread_begin)( executing );
10e7f7: 89 34 24 mov %esi,(%esp)
10e7fa: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e7fc: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e7fe: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e804: 75 ea jne 10e7f0 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10e806: 83 c4 14 add $0x14,%esp
10e809: 5b pop %ebx
10e80a: 5e pop %esi
10e80b: c3 ret
0010e890 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e890: 56 push %esi
10e891: 53 push %ebx
10e892: 83 ec 14 sub $0x14,%esp
10e895: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e899: 8b 1d ec f7 12 00 mov 0x12f7ec,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e89f: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e8a5: 74 25 je 10e8cc <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e8a7: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10e8a8: 8b 43 14 mov 0x14(%ebx),%eax
10e8ab: 85 c0 test %eax,%eax
10e8ad: 74 13 je 10e8c2 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e8af: 89 74 24 04 mov %esi,0x4(%esp)
10e8b3: 8b 15 6c f8 12 00 mov 0x12f86c,%edx
10e8b9: 89 14 24 mov %edx,(%esp)
10e8bc: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e8be: 84 c0 test %al,%al
10e8c0: 74 0c je 10e8ce <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e8c2: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e8c4: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e8ca: 75 dc jne 10e8a8 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e8cc: b0 01 mov $0x1,%al
}
10e8ce: 83 c4 14 add $0x14,%esp
10e8d1: 5b pop %ebx
10e8d2: 5e pop %esi
10e8d3: c3 ret
0010e8d4 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e8d4: 56 push %esi
10e8d5: 53 push %ebx
10e8d6: 83 ec 14 sub $0x14,%esp
10e8d9: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e8dd: 8b 1d f4 f7 12 00 mov 0x12f7f4,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e8e3: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e8e9: 74 22 je 10e90d <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e8eb: 90 nop
!_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_delete != NULL )
10e8ec: 8b 43 20 mov 0x20(%ebx),%eax
10e8ef: 85 c0 test %eax,%eax
10e8f1: 74 0f je 10e902 <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e8f3: 89 74 24 04 mov %esi,0x4(%esp)
10e8f7: 8b 15 6c f8 12 00 mov 0x12f86c,%edx
10e8fd: 89 14 24 mov %edx,(%esp)
10e900: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e902: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e905: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e90b: 75 df jne 10e8ec <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e90d: 83 c4 14 add $0x14,%esp
10e910: 5b pop %ebx
10e911: 5e pop %esi
10e912: c3 ret
0010e80c <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e80c: 56 push %esi
10e80d: 53 push %ebx
10e80e: 83 ec 14 sub $0x14,%esp
10e811: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e815: 8b 1d f4 f7 12 00 mov 0x12f7f4,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e81b: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e821: 74 18 je 10e83b <_User_extensions_Thread_exitted+0x2f><== NEVER TAKEN
10e823: 90 nop
!_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 )
10e824: 8b 43 2c mov 0x2c(%ebx),%eax
10e827: 85 c0 test %eax,%eax
10e829: 74 05 je 10e830 <_User_extensions_Thread_exitted+0x24>
(*the_extension->Callouts.thread_exitted)( executing );
10e82b: 89 34 24 mov %esi,(%esp)
10e82e: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e830: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e833: 81 fb ec f7 12 00 cmp $0x12f7ec,%ebx
10e839: 75 e9 jne 10e824 <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10e83b: 83 c4 14 add $0x14,%esp
10e83e: 5b pop %ebx
10e83f: 5e pop %esi
10e840: c3 ret
0010f114 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f114: 56 push %esi
10f115: 53 push %ebx
10f116: 83 ec 14 sub $0x14,%esp
10f119: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10f11d: 8b 1d 2c 08 13 00 mov 0x13082c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f123: 81 fb 30 08 13 00 cmp $0x130830,%ebx
10f129: 74 21 je 10f14c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f12b: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f12c: 8b 43 1c mov 0x1c(%ebx),%eax
10f12f: 85 c0 test %eax,%eax
10f131: 74 0f je 10f142 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f133: 89 74 24 04 mov %esi,0x4(%esp)
10f137: 8b 15 ac 08 13 00 mov 0x1308ac,%edx
10f13d: 89 14 24 mov %edx,(%esp)
10f140: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f142: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f144: 81 fb 30 08 13 00 cmp $0x130830,%ebx
10f14a: 75 e0 jne 10f12c <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f14c: 83 c4 14 add $0x14,%esp
10f14f: 5b pop %ebx
10f150: 5e pop %esi
10f151: c3 ret
0010e914 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e914: 56 push %esi
10e915: 53 push %ebx
10e916: 83 ec 14 sub $0x14,%esp
10e919: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e91d: 8b 1d ec f7 12 00 mov 0x12f7ec,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e923: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e929: 74 21 je 10e94c <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e92b: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e92c: 8b 43 18 mov 0x18(%ebx),%eax
10e92f: 85 c0 test %eax,%eax
10e931: 74 0f je 10e942 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e933: 89 74 24 04 mov %esi,0x4(%esp)
10e937: 8b 15 6c f8 12 00 mov 0x12f86c,%edx
10e93d: 89 14 24 mov %edx,(%esp)
10e940: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e942: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e944: 81 fb f0 f7 12 00 cmp $0x12f7f0,%ebx
10e94a: 75 e0 jne 10e92c <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e94c: 83 c4 14 add $0x14,%esp
10e94f: 5b pop %ebx
10e950: 5e pop %esi
10e951: c3 ret
0010e954 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10e954: 57 push %edi
10e955: 56 push %esi
10e956: 53 push %ebx
10e957: 83 ec 10 sub $0x10,%esp
10e95a: 8b 7c 24 20 mov 0x20(%esp),%edi
10e95e: 8b 74 24 24 mov 0x24(%esp),%esi
10e962: 8b 1d 08 f6 12 00 mov 0x12f608,%ebx
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e968: 81 fb 0c f6 12 00 cmp $0x12f60c,%ebx
10e96e: 74 14 je 10e984 <_User_extensions_Thread_switch+0x30><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10e970: 89 74 24 04 mov %esi,0x4(%esp)
10e974: 89 3c 24 mov %edi,(%esp)
10e977: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10e97a: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e97c: 81 fb 0c f6 12 00 cmp $0x12f60c,%ebx
10e982: 75 ec jne 10e970 <_User_extensions_Thread_switch+0x1c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e984: 83 c4 10 add $0x10,%esp
10e987: 5b pop %ebx
10e988: 5e pop %esi
10e989: 5f pop %edi
10e98a: c3 ret
001100d8 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
1100d8: 57 push %edi
1100d9: 56 push %esi
1100da: 53 push %ebx
1100db: 83 ec 10 sub $0x10,%esp
1100de: 8b 74 24 20 mov 0x20(%esp),%esi
1100e2: 8b 4c 24 24 mov 0x24(%esp),%ecx
1100e6: 8b 5c 24 28 mov 0x28(%esp),%ebx
ISR_Level level;
_ISR_Disable( level );
1100ea: 9c pushf
1100eb: fa cli
1100ec: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1100ed: 8b 06 mov (%esi),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1100ef: 8d 7e 04 lea 0x4(%esi),%edi
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
1100f2: 39 f8 cmp %edi,%eax
1100f4: 74 39 je 11012f <_Watchdog_Adjust+0x57>
switch ( direction ) {
1100f6: 85 c9 test %ecx,%ecx
1100f8: 75 3e jne 110138 <_Watchdog_Adjust+0x60>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1100fa: 85 db test %ebx,%ebx
1100fc: 74 31 je 11012f <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1100fe: 8b 48 10 mov 0x10(%eax),%ecx
110101: 39 cb cmp %ecx,%ebx
110103: 73 0e jae 110113 <_Watchdog_Adjust+0x3b> <== ALWAYS TAKEN
110105: eb 39 jmp 110140 <_Watchdog_Adjust+0x68> <== NOT EXECUTED
110107: 90 nop <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
110108: 85 db test %ebx,%ebx
11010a: 74 23 je 11012f <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
11010c: 8b 48 10 mov 0x10(%eax),%ecx
11010f: 39 d9 cmp %ebx,%ecx
110111: 77 2d ja 110140 <_Watchdog_Adjust+0x68>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
110113: 29 cb sub %ecx,%ebx
_Watchdog_First( header )->delta_interval = 1;
110115: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
_ISR_Enable( level );
11011c: 52 push %edx
11011d: 9d popf
_Watchdog_Tickle( header );
11011e: 89 34 24 mov %esi,(%esp)
110121: e8 aa 01 00 00 call 1102d0 <_Watchdog_Tickle>
_ISR_Disable( level );
110126: 9c pushf
110127: fa cli
110128: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
110129: 8b 06 mov (%esi),%eax
if ( _Chain_Is_empty( header ) )
11012b: 39 c7 cmp %eax,%edi
11012d: 75 d9 jne 110108 <_Watchdog_Adjust+0x30>
}
break;
}
}
_ISR_Enable( level );
11012f: 52 push %edx
110130: 9d popf
}
110131: 83 c4 10 add $0x10,%esp
110134: 5b pop %ebx
110135: 5e pop %esi
110136: 5f pop %edi
110137: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
110138: 49 dec %ecx
110139: 75 f4 jne 11012f <_Watchdog_Adjust+0x57> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
11013b: 01 58 10 add %ebx,0x10(%eax)
break;
11013e: eb ef jmp 11012f <_Watchdog_Adjust+0x57>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
110140: 29 d9 sub %ebx,%ecx
110142: 89 48 10 mov %ecx,0x10(%eax)
break;
110145: eb e8 jmp 11012f <_Watchdog_Adjust+0x57>
0010eaa8 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10eaa8: 56 push %esi
10eaa9: 53 push %ebx
10eaaa: 8b 54 24 0c mov 0xc(%esp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10eaae: 9c pushf
10eaaf: fa cli
10eab0: 59 pop %ecx
previous_state = the_watchdog->state;
10eab1: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10eab4: 83 f8 01 cmp $0x1,%eax
10eab7: 74 4f je 10eb08 <_Watchdog_Remove+0x60>
10eab9: 73 11 jae 10eacc <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10eabb: 8b 1d 04 f7 12 00 mov 0x12f704,%ebx
10eac1: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10eac4: 51 push %ecx
10eac5: 9d popf
return( previous_state );
}
10eac6: 5b pop %ebx
10eac7: 5e pop %esi
10eac8: c3 ret
10eac9: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10eacc: 83 f8 03 cmp $0x3,%eax
10eacf: 77 ea ja 10eabb <_Watchdog_Remove+0x13> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10ead1: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10ead8: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10eada: 8b 33 mov (%ebx),%esi
10eadc: 85 f6 test %esi,%esi
10eade: 74 06 je 10eae6 <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10eae0: 8b 72 10 mov 0x10(%edx),%esi
10eae3: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10eae6: 8b 35 00 f7 12 00 mov 0x12f700,%esi
10eaec: 85 f6 test %esi,%esi
10eaee: 74 0c je 10eafc <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10eaf0: 8b 35 68 f8 12 00 mov 0x12f868,%esi
10eaf6: 89 35 94 f6 12 00 mov %esi,0x12f694
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10eafc: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10eaff: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10eb02: 89 1e mov %ebx,(%esi)
10eb04: eb b5 jmp 10eabb <_Watchdog_Remove+0x13>
10eb06: 66 90 xchg %ax,%ax
/*
* 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;
10eb08: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10eb0f: eb aa jmp 10eabb <_Watchdog_Remove+0x13>
0010fab4 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fab4: 55 push %ebp
10fab5: 57 push %edi
10fab6: 56 push %esi
10fab7: 53 push %ebx
10fab8: 83 ec 1c sub $0x1c,%esp
10fabb: 8b 7c 24 30 mov 0x30(%esp),%edi
10fabf: 8b 74 24 34 mov 0x34(%esp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fac3: 9c pushf
10fac4: fa cli
10fac5: 5d pop %ebp
printk( "Watchdog Chain: %s %p\n", name, header );
10fac6: 89 74 24 08 mov %esi,0x8(%esp)
10faca: 89 7c 24 04 mov %edi,0x4(%esp)
10face: c7 04 24 2b 33 12 00 movl $0x12332b,(%esp)
10fad5: e8 3e 96 ff ff call 109118 <printk>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10fada: 8b 1e mov (%esi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10fadc: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10fadf: 39 f3 cmp %esi,%ebx
10fae1: 74 31 je 10fb14 <_Watchdog_Report_chain+0x60>
10fae3: 90 nop
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fae4: 89 5c 24 04 mov %ebx,0x4(%esp)
10fae8: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10faef: e8 30 00 00 00 call 10fb24 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10faf4: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
10faf6: 39 f3 cmp %esi,%ebx
10faf8: 75 ea jne 10fae4 <_Watchdog_Report_chain+0x30><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fafa: 89 7c 24 04 mov %edi,0x4(%esp)
10fafe: c7 04 24 42 33 12 00 movl $0x123342,(%esp)
10fb05: e8 0e 96 ff ff call 109118 <printk>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fb0a: 55 push %ebp
10fb0b: 9d popf
}
10fb0c: 83 c4 1c add $0x1c,%esp
10fb0f: 5b pop %ebx
10fb10: 5e pop %esi
10fb11: 5f pop %edi
10fb12: 5d pop %ebp
10fb13: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fb14: c7 04 24 51 33 12 00 movl $0x123351,(%esp)
10fb1b: e8 f8 95 ff ff call 109118 <printk>
10fb20: eb e8 jmp 10fb0a <_Watchdog_Report_chain+0x56>
0010eb14 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10eb14: 55 push %ebp
10eb15: 57 push %edi
10eb16: 56 push %esi
10eb17: 53 push %ebx
10eb18: 83 ec 1c sub $0x1c,%esp
10eb1b: 8b 7c 24 30 mov 0x30(%esp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10eb1f: 9c pushf
10eb20: fa cli
10eb21: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10eb22: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10eb24: 8d 6f 04 lea 0x4(%edi),%ebp
if ( _Chain_Is_empty( header ) )
10eb27: 39 eb cmp %ebp,%ebx
10eb29: 74 11 je 10eb3c <_Watchdog_Tickle+0x28>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10eb2b: 8b 43 10 mov 0x10(%ebx),%eax
10eb2e: 85 c0 test %eax,%eax
10eb30: 74 34 je 10eb66 <_Watchdog_Tickle+0x52>
the_watchdog->delta_interval--;
10eb32: 48 dec %eax
10eb33: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10eb36: 85 c0 test %eax,%eax
10eb38: 74 2c je 10eb66 <_Watchdog_Tickle+0x52>
10eb3a: 66 90 xchg %ax,%ax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10eb3c: 56 push %esi
10eb3d: 9d popf
}
10eb3e: 83 c4 1c add $0x1c,%esp
10eb41: 5b pop %ebx
10eb42: 5e pop %esi
10eb43: 5f pop %edi
10eb44: 5d pop %ebp
10eb45: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10eb46: 8b 43 24 mov 0x24(%ebx),%eax
10eb49: 89 44 24 04 mov %eax,0x4(%esp)
10eb4d: 8b 43 20 mov 0x20(%ebx),%eax
10eb50: 89 04 24 mov %eax,(%esp)
10eb53: ff 53 1c call *0x1c(%ebx)
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10eb56: 9c pushf
10eb57: fa cli
10eb58: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10eb59: 8b 1f mov (%edi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10eb5b: 39 dd cmp %ebx,%ebp
10eb5d: 74 dd je 10eb3c <_Watchdog_Tickle+0x28>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10eb5f: 8b 43 10 mov 0x10(%ebx),%eax
10eb62: 85 c0 test %eax,%eax
10eb64: 75 d6 jne 10eb3c <_Watchdog_Tickle+0x28>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10eb66: 89 1c 24 mov %ebx,(%esp)
10eb69: e8 3a ff ff ff call 10eaa8 <_Watchdog_Remove>
_ISR_Enable( level );
10eb6e: 56 push %esi
10eb6f: 9d popf
switch( watchdog_state ) {
10eb70: 83 f8 02 cmp $0x2,%eax
10eb73: 75 e1 jne 10eb56 <_Watchdog_Tickle+0x42> <== NEVER TAKEN
10eb75: eb cf jmp 10eb46 <_Watchdog_Tickle+0x32>
0010eb78 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10eb78: 57 push %edi
10eb79: 53 push %ebx
10eb7a: 83 ec 14 sub $0x14,%esp
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
10eb7d: 8b 15 60 b1 12 00 mov 0x12b160,%edx
uintptr_t size = rtems_configuration_get_work_space_size();
10eb83: a1 64 b1 12 00 mov 0x12b164,%eax
10eb88: 80 3d 96 b1 12 00 00 cmpb $0x0,0x12b196
10eb8f: 75 37 jne 10ebc8 <_Workspace_Handler_initialization+0x50>
10eb91: 8b 1d 68 b1 12 00 mov 0x12b168,%ebx
10eb97: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10eb99: 80 3d 94 b1 12 00 00 cmpb $0x0,0x12b194
10eba0: 75 33 jne 10ebd5 <_Workspace_Handler_initialization+0x5d>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10eba2: c7 44 24 0c 04 00 00 movl $0x4,0xc(%esp)
10eba9: 00
10ebaa: 89 5c 24 08 mov %ebx,0x8(%esp)
10ebae: 89 54 24 04 mov %edx,0x4(%esp)
10ebb2: c7 04 24 20 f6 12 00 movl $0x12f620,(%esp)
10ebb9: e8 fa dd ff ff call 10c9b8 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10ebbe: 85 c0 test %eax,%eax
10ebc0: 74 1d je 10ebdf <_Workspace_Handler_initialization+0x67>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10ebc2: 83 c4 14 add $0x14,%esp
10ebc5: 5b pop %ebx
10ebc6: 5f pop %edi
10ebc7: c3 ret
*/
void _Workspace_Handler_initialization(void)
{
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
uintptr_t size = rtems_configuration_get_work_space_size();
10ebc8: 31 db xor %ebx,%ebx
10ebca: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10ebcc: 80 3d 94 b1 12 00 00 cmpb $0x0,0x12b194
10ebd3: 74 cd je 10eba2 <_Workspace_Handler_initialization+0x2a><== ALWAYS TAKEN
memset( starting_address, 0, size );
10ebd5: 31 c0 xor %eax,%eax
10ebd7: 89 d7 mov %edx,%edi
10ebd9: 89 d9 mov %ebx,%ecx
10ebdb: f3 aa rep stos %al,%es:(%edi)
10ebdd: eb c3 jmp 10eba2 <_Workspace_Handler_initialization+0x2a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10ebdf: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
10ebe6: 00
10ebe7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10ebee: 00
10ebef: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ebf6: e8 c5 df ff ff call 10cbc0 <_Internal_error_Occurred>
0010eea4 <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
10eea4: 57 push %edi
10eea5: 56 push %esi
10eea6: 53 push %ebx
10eea7: 83 ec 10 sub $0x10,%esp
10eeaa: 8b 5c 24 24 mov 0x24(%esp),%ebx
char *dup = _Workspace_Allocate(len + 1);
10eeae: 8d 43 01 lea 0x1(%ebx),%eax
10eeb1: 89 04 24 mov %eax,(%esp)
10eeb4: e8 57 ff ff ff call 10ee10 <_Workspace_Allocate>
if (dup != NULL) {
10eeb9: 85 c0 test %eax,%eax
10eebb: 74 0e je 10eecb <_Workspace_String_duplicate+0x27><== NEVER TAKEN
dup [len] = '\0';
10eebd: c6 04 18 00 movb $0x0,(%eax,%ebx,1)
memcpy(dup, string, len);
10eec1: 89 c7 mov %eax,%edi
10eec3: 8b 74 24 20 mov 0x20(%esp),%esi
10eec7: 89 d9 mov %ebx,%ecx
10eec9: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
return dup;
}
10eecb: 83 c4 10 add $0x10,%esp
10eece: 5b pop %ebx
10eecf: 5e pop %esi
10eed0: 5f pop %edi
10eed1: c3 ret
0010c844 <check_and_merge>:
rtems_chain_control *free_chain,
rtems_rbtree_control *chunk_tree,
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
10c844: 57 push %edi
10c845: 56 push %esi
10c846: 53 push %ebx
10c847: 83 ec 10 sub $0x10,%esp
10c84a: 8b 5c 24 20 mov 0x20(%esp),%ebx
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
10c84e: 83 fb f8 cmp $0xfffffff8,%ebx
10c851: 74 37 je 10c88a <check_and_merge+0x46>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c853: 8b 33 mov (%ebx),%esi
10c855: 85 f6 test %esi,%esi
10c857: 74 47 je 10c8a0 <check_and_merge+0x5c>
if (b->begin < a->begin) {
10c859: 8b 79 18 mov 0x18(%ecx),%edi
10c85c: 39 7b 18 cmp %edi,0x18(%ebx)
10c85f: 72 33 jb 10c894 <check_and_merge+0x50>
a = b;
b = t;
}
a->size += b->size;
10c861: 8b 7b 1c mov 0x1c(%ebx),%edi
10c864: 01 79 1c add %edi,0x1c(%ecx)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c867: 8b 4b 04 mov 0x4(%ebx),%ecx
next->previous = previous;
10c86a: 89 4e 04 mov %ecx,0x4(%esi)
previous->next = next;
10c86d: 89 31 mov %esi,(%ecx)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c86f: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10c872: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10c874: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10c876: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10c878: 89 59 04 mov %ebx,0x4(%ecx)
rtems_chain_extract_unprotected(&b->chain_node);
add_to_chain(free_chain, b);
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
10c87b: 83 c3 08 add $0x8,%ebx
10c87e: 89 5c 24 04 mov %ebx,0x4(%esp)
10c882: 89 14 24 mov %edx,(%esp)
10c885: e8 72 18 00 00 call 10e0fc <_RBTree_Extract_unprotected>
}
}
10c88a: 83 c4 10 add $0x10,%esp
10c88d: 5b pop %ebx
10c88e: 5e pop %esi
10c88f: 5f pop %edi
10c890: c3 ret
10c891: 8d 76 00 lea 0x0(%esi),%esi
10c894: 8b 31 mov (%ecx),%esi
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
if (b->begin < a->begin) {
10c896: 89 cf mov %ecx,%edi
10c898: 89 d9 mov %ebx,%ecx
10c89a: 89 fb mov %edi,%ebx
10c89c: eb c3 jmp 10c861 <check_and_merge+0x1d>
10c89e: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c8a0: 8b 7b 04 mov 0x4(%ebx),%edi
10c8a3: 85 ff test %edi,%edi
10c8a5: 75 b2 jne 10c859 <check_and_merge+0x15> <== NEVER TAKEN
10c8a7: eb e1 jmp 10c88a <check_and_merge+0x46>
0010c56c <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c56c: 55 push %ebp
10c56d: 57 push %edi
10c56e: 56 push %esi
10c56f: 53 push %ebx
10c570: 83 ec 2c sub $0x2c,%esp
10c573: 8b 5c 24 40 mov 0x40(%esp),%ebx
10c577: 8b 6c 24 44 mov 0x44(%esp),%ebp
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c57b: 8d 74 24 1c lea 0x1c(%esp),%esi
10c57f: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c580: 89 1c 24 mov %ebx,(%esp)
10c583: e8 5c 05 00 00 call 10cae4 <_Chain_Get>
10c588: 89 c7 mov %eax,%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c58a: 85 c0 test %eax,%eax
10c58c: 75 2e jne 10c5bc <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c58e: 89 74 24 0c mov %esi,0xc(%esp)
10c592: 8b 44 24 48 mov 0x48(%esp),%eax
10c596: 89 44 24 08 mov %eax,0x8(%esp)
10c59a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c5a1: 00
10c5a2: 89 2c 24 mov %ebp,(%esp)
10c5a5: e8 7e f3 ff ff call 10b928 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c5aa: 85 c0 test %eax,%eax
10c5ac: 74 d2 je 10c580 <rtems_chain_get_with_wait+0x14><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c5ae: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5b2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5b4: 83 c4 2c add $0x2c,%esp
10c5b7: 5b pop %ebx
10c5b8: 5e pop %esi
10c5b9: 5f pop %edi
10c5ba: 5d pop %ebp
10c5bb: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c5bc: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c5be: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5c2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5c4: 83 c4 2c add $0x2c,%esp
10c5c7: 5b pop %ebx
10c5c8: 5e pop %esi
10c5c9: 5f pop %edi
10c5ca: 5d pop %ebp
10c5cb: c3 ret
0010d56c <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
10d56c: 57 push %edi
10d56d: 56 push %esi
10d56e: 53 push %ebx
10d56f: 8b 5c 24 10 mov 0x10(%esp),%ebx
10d573: 8b 74 24 14 mov 0x14(%esp),%esi
10d577: 8b 44 24 18 mov 0x18(%esp),%eax
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10d57b: 8b 15 c0 49 13 00 mov 0x1349c0,%edx
if ( rtems_interrupt_is_in_progress() )
10d581: 8b 0d e8 48 13 00 mov 0x1348e8,%ecx
10d587: 85 c9 test %ecx,%ecx
10d589: 74 09 je 10d594 <rtems_io_register_driver+0x28>
return RTEMS_CALLED_FROM_ISR;
10d58b: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d590: 5b pop %ebx
10d591: 5e pop %esi
10d592: 5f pop %edi
10d593: c3 ret
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10d594: 85 c0 test %eax,%eax
10d596: 74 24 je 10d5bc <rtems_io_register_driver+0x50>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10d598: 89 10 mov %edx,(%eax)
if ( driver_table == NULL )
10d59a: 85 f6 test %esi,%esi
10d59c: 74 1e je 10d5bc <rtems_io_register_driver+0x50>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d59e: 8b 3e mov (%esi),%edi
10d5a0: 85 ff test %edi,%edi
10d5a2: 74 10 je 10d5b4 <rtems_io_register_driver+0x48>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d5a4: 39 da cmp %ebx,%edx
10d5a6: 77 20 ja 10d5c8 <rtems_io_register_driver+0x5c>
return RTEMS_INVALID_NUMBER;
10d5a8: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5ad: 5b pop %ebx
10d5ae: 5e pop %esi
10d5af: 5f pop %edi
10d5b0: c3 ret
10d5b1: 8d 76 00 lea 0x0(%esi),%esi
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5b4: 8b 4e 04 mov 0x4(%esi),%ecx
10d5b7: 85 c9 test %ecx,%ecx
10d5b9: 75 e9 jne 10d5a4 <rtems_io_register_driver+0x38>
10d5bb: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10d5bc: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5c1: 5b pop %ebx
10d5c2: 5e pop %esi
10d5c3: 5f pop %edi
10d5c4: c3 ret
10d5c5: 8d 76 00 lea 0x0(%esi),%esi
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10d5c8: 8b 15 84 46 13 00 mov 0x134684,%edx
10d5ce: 42 inc %edx
10d5cf: 89 15 84 46 13 00 mov %edx,0x134684
return _Thread_Dispatch_disable_level;
10d5d5: 8b 15 84 46 13 00 mov 0x134684,%edx
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10d5db: 85 db test %ebx,%ebx
10d5dd: 74 1e je 10d5fd <rtems_io_register_driver+0x91>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d5df: 8d 14 5b lea (%ebx,%ebx,2),%edx
10d5e2: 8b 3d c4 49 13 00 mov 0x1349c4,%edi
10d5e8: 8d 14 d7 lea (%edi,%edx,8),%edx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5eb: 8b 0a mov (%edx),%ecx
10d5ed: 85 c9 test %ecx,%ecx
10d5ef: 74 7d je 10d66e <rtems_io_register_driver+0x102>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10d5f1: e8 8a 1c 00 00 call 10f280 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10d5f6: b8 0c 00 00 00 mov $0xc,%eax
10d5fb: eb 93 jmp 10d590 <rtems_io_register_driver+0x24>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10d5fd: 8b 0d c0 49 13 00 mov 0x1349c0,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10d603: 85 c9 test %ecx,%ecx
10d605: 74 76 je 10d67d <rtems_io_register_driver+0x111><== NEVER TAKEN
10d607: 8b 3d c4 49 13 00 mov 0x1349c4,%edi
10d60d: 89 fa mov %edi,%edx
10d60f: eb 0b jmp 10d61c <rtems_io_register_driver+0xb0>
10d611: 8d 76 00 lea 0x0(%esi),%esi
10d614: 43 inc %ebx
10d615: 83 c2 18 add $0x18,%edx
10d618: 39 cb cmp %ecx,%ebx
10d61a: 74 41 je 10d65d <rtems_io_register_driver+0xf1>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d61c: 83 3a 00 cmpl $0x0,(%edx)
10d61f: 75 f3 jne 10d614 <rtems_io_register_driver+0xa8>
10d621: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10d625: 75 ed jne 10d614 <rtems_io_register_driver+0xa8>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d627: 89 18 mov %ebx,(%eax)
if ( m != n )
10d629: 39 d9 cmp %ebx,%ecx
10d62b: 74 32 je 10d65f <rtems_io_register_driver+0xf3><== NEVER TAKEN
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10d62d: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d630: 8d 04 c7 lea (%edi,%eax,8),%eax
10d633: b9 06 00 00 00 mov $0x6,%ecx
10d638: 89 c7 mov %eax,%edi
10d63a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10d63c: e8 3f 1c 00 00 call 10f280 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10d641: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10d648: 00
10d649: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10d650: 00
10d651: 89 5c 24 10 mov %ebx,0x10(%esp)
}
10d655: 5b pop %ebx
10d656: 5e pop %esi
10d657: 5f pop %edi
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d658: e9 0b 75 00 00 jmp 114b68 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d65d: 89 18 mov %ebx,(%eax)
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d65f: e8 1c 1c 00 00 call 10f280 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10d664: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10d669: e9 22 ff ff ff jmp 10d590 <rtems_io_register_driver+0x24>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d66e: 8b 52 04 mov 0x4(%edx),%edx
10d671: 85 d2 test %edx,%edx
10d673: 0f 85 78 ff ff ff jne 10d5f1 <rtems_io_register_driver+0x85>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d679: 89 18 mov %ebx,(%eax)
10d67b: eb b0 jmp 10d62d <rtems_io_register_driver+0xc1>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d67d: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
10d683: eb da jmp 10d65f <rtems_io_register_driver+0xf3><== NOT EXECUTED
0010e1f8 <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)
{
10e1f8: 55 push %ebp
10e1f9: 57 push %edi
10e1fa: 56 push %esi
10e1fb: 53 push %ebx
10e1fc: 83 ec 1c sub $0x1c,%esp
10e1ff: 8b 74 24 30 mov 0x30(%esp),%esi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e203: bf 01 00 00 00 mov $0x1,%edi
10e208: 85 f6 test %esi,%esi
10e20a: 74 3e je 10e24a <rtems_iterate_over_all_threads+0x52><== NEVER TAKEN
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
10e20c: 8b 04 bd fc 29 13 00 mov 0x1329fc(,%edi,4),%eax
10e213: 85 c0 test %eax,%eax
10e215: 74 2d je 10e244 <rtems_iterate_over_all_threads+0x4c>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10e217: 8b 68 04 mov 0x4(%eax),%ebp
if ( !information )
10e21a: 85 ed test %ebp,%ebp
10e21c: 74 26 je 10e244 <rtems_iterate_over_all_threads+0x4c>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e21e: 66 83 7d 10 00 cmpw $0x0,0x10(%ebp)
10e223: 74 1f je 10e244 <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
10e225: bb 01 00 00 00 mov $0x1,%ebx
10e22a: 66 90 xchg %ax,%ax
the_thread = (Thread_Control *)information->local_table[ i ];
10e22c: 8b 45 1c mov 0x1c(%ebp),%eax
10e22f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e232: 85 c0 test %eax,%eax
10e234: 74 05 je 10e23b <rtems_iterate_over_all_threads+0x43><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e236: 89 04 24 mov %eax,(%esp)
10e239: ff d6 call *%esi
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e23b: 43 inc %ebx
10e23c: 0f b7 45 10 movzwl 0x10(%ebp),%eax
10e240: 39 d8 cmp %ebx,%eax
10e242: 73 e8 jae 10e22c <rtems_iterate_over_all_threads+0x34>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e244: 47 inc %edi
10e245: 83 ff 04 cmp $0x4,%edi
10e248: 75 c2 jne 10e20c <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10e24a: 83 c4 1c add $0x1c,%esp
10e24d: 5b pop %ebx
10e24e: 5e pop %esi
10e24f: 5f pop %edi
10e250: 5d pop %ebp
10e251: c3 ret
0010d3f0 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10d3f0: 57 push %edi
10d3f1: 56 push %esi
10d3f2: 53 push %ebx
10d3f3: 83 ec 10 sub $0x10,%esp
10d3f6: 8b 7c 24 28 mov 0x28(%esp),%edi
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d3fa: 85 ff test %edi,%edi
10d3fc: 74 62 je 10d460 <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d3fe: 0f b7 44 24 24 movzwl 0x24(%esp),%eax
10d403: 89 44 24 04 mov %eax,0x4(%esp)
10d407: 8b 44 24 20 mov 0x20(%esp),%eax
10d40b: 89 04 24 mov %eax,(%esp)
10d40e: e8 41 1b 00 00 call 10ef54 <_Objects_Get_information>
if ( !obj_info )
10d413: 85 c0 test %eax,%eax
10d415: 74 55 je 10d46c <rtems_object_get_class_information+0x7c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10d417: 8b 50 08 mov 0x8(%eax),%edx
10d41a: 89 17 mov %edx,(%edi)
info->maximum_id = obj_info->maximum_id;
10d41c: 8b 50 0c mov 0xc(%eax),%edx
10d41f: 89 57 04 mov %edx,0x4(%edi)
info->auto_extend = obj_info->auto_extend;
10d422: 8a 50 12 mov 0x12(%eax),%dl
10d425: 88 57 0c mov %dl,0xc(%edi)
info->maximum = obj_info->maximum;
10d428: 0f b7 58 10 movzwl 0x10(%eax),%ebx
10d42c: 89 5f 08 mov %ebx,0x8(%edi)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d42f: 85 db test %ebx,%ebx
10d431: 74 45 je 10d478 <rtems_object_get_class_information+0x88><== NEVER TAKEN
10d433: 8b 70 1c mov 0x1c(%eax),%esi
10d436: b9 01 00 00 00 mov $0x1,%ecx
10d43b: b8 01 00 00 00 mov $0x1,%eax
10d440: 31 d2 xor %edx,%edx
10d442: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10d444: 83 3c 8e 01 cmpl $0x1,(%esi,%ecx,4)
10d448: 83 d2 00 adc $0x0,%edx
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d44b: 40 inc %eax
10d44c: 89 c1 mov %eax,%ecx
10d44e: 39 c3 cmp %eax,%ebx
10d450: 73 f2 jae 10d444 <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d452: 89 57 10 mov %edx,0x10(%edi)
return RTEMS_SUCCESSFUL;
10d455: 31 c0 xor %eax,%eax
}
10d457: 83 c4 10 add $0x10,%esp
10d45a: 5b pop %ebx
10d45b: 5e pop %esi
10d45c: 5f pop %edi
10d45d: c3 ret
10d45e: 66 90 xchg %ax,%ax
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10d460: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d465: 83 c4 10 add $0x10,%esp
10d468: 5b pop %ebx
10d469: 5e pop %esi
10d46a: 5f pop %edi
10d46b: c3 ret
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10d46c: b8 0a 00 00 00 mov $0xa,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d471: 83 c4 10 add $0x10,%esp
10d474: 5b pop %ebx
10d475: 5e pop %esi
10d476: 5f pop %edi
10d477: c3 ret
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d478: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d47a: eb d6 jmp 10d452 <rtems_object_get_class_information+0x62><== NOT EXECUTED
001193f4 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1193f4: 56 push %esi
1193f5: 53 push %ebx
1193f6: 83 ec 14 sub $0x14,%esp
1193f9: 8b 74 24 20 mov 0x20(%esp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1193fd: 85 f6 test %esi,%esi
1193ff: 75 0b jne 11940c <rtems_partition_create+0x18>
return RTEMS_INVALID_NAME;
119401: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
119406: 83 c4 14 add $0x14,%esp
119409: 5b pop %ebx
11940a: 5e pop %esi
11940b: c3 ret
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
11940c: 8b 5c 24 24 mov 0x24(%esp),%ebx
119410: 85 db test %ebx,%ebx
119412: 74 1c je 119430 <rtems_partition_create+0x3c>
return RTEMS_INVALID_ADDRESS;
if ( !id )
119414: 8b 4c 24 34 mov 0x34(%esp),%ecx
119418: 85 c9 test %ecx,%ecx
11941a: 74 14 je 119430 <rtems_partition_create+0x3c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11941c: 8b 54 24 28 mov 0x28(%esp),%edx
119420: 85 d2 test %edx,%edx
119422: 75 18 jne 11943c <rtems_partition_create+0x48>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
119424: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
119429: 83 c4 14 add $0x14,%esp
11942c: 5b pop %ebx
11942d: 5e pop %esi
11942e: c3 ret
11942f: 90 nop
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
119430: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
119435: 83 c4 14 add $0x14,%esp
119438: 5b pop %ebx
119439: 5e pop %esi
11943a: c3 ret
11943b: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
11943c: 8b 44 24 2c mov 0x2c(%esp),%eax
119440: 85 c0 test %eax,%eax
119442: 74 e0 je 119424 <rtems_partition_create+0x30>
119444: 8b 44 24 2c mov 0x2c(%esp),%eax
119448: 39 44 24 28 cmp %eax,0x28(%esp)
11944c: 72 d6 jb 119424 <rtems_partition_create+0x30>
11944e: a8 03 test $0x3,%al
119450: 75 d2 jne 119424 <rtems_partition_create+0x30>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
119452: f6 44 24 24 03 testb $0x3,0x24(%esp)
119457: 75 d7 jne 119430 <rtems_partition_create+0x3c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
119459: a1 04 da 14 00 mov 0x14da04,%eax
11945e: 40 inc %eax
11945f: a3 04 da 14 00 mov %eax,0x14da04
return _Thread_Dispatch_disable_level;
119464: a1 04 da 14 00 mov 0x14da04,%eax
* 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 );
119469: c7 04 24 80 d8 14 00 movl $0x14d880,(%esp)
119470: e8 63 4a 00 00 call 11ded8 <_Objects_Allocate>
119475: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
119477: 85 c0 test %eax,%eax
119479: 74 6c je 1194e7 <rtems_partition_create+0xf3>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
11947b: 8b 54 24 24 mov 0x24(%esp),%edx
11947f: 89 50 10 mov %edx,0x10(%eax)
the_partition->length = length;
119482: 8b 44 24 28 mov 0x28(%esp),%eax
119486: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
119489: 8b 54 24 2c mov 0x2c(%esp),%edx
11948d: 89 53 18 mov %edx,0x18(%ebx)
the_partition->attribute_set = attribute_set;
119490: 8b 44 24 30 mov 0x30(%esp),%eax
119494: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
119497: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
11949e: 89 54 24 0c mov %edx,0xc(%esp)
1194a2: 8b 44 24 28 mov 0x28(%esp),%eax
1194a6: 31 d2 xor %edx,%edx
1194a8: f7 74 24 2c divl 0x2c(%esp)
1194ac: 89 44 24 08 mov %eax,0x8(%esp)
1194b0: 8b 44 24 24 mov 0x24(%esp),%eax
1194b4: 89 44 24 04 mov %eax,0x4(%esp)
1194b8: 8d 43 24 lea 0x24(%ebx),%eax
1194bb: 89 04 24 mov %eax,(%esp)
1194be: e8 39 34 00 00 call 11c8fc <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
1194c3: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
1194c6: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1194c9: 8b 15 9c d8 14 00 mov 0x14d89c,%edx
1194cf: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1194d2: 89 73 0c mov %esi,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1194d5: 8b 54 24 34 mov 0x34(%esp),%edx
1194d9: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1194db: e8 84 5b 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1194e0: 31 c0 xor %eax,%eax
1194e2: e9 1f ff ff ff jmp 119406 <rtems_partition_create+0x12>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1194e7: e8 78 5b 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1194ec: b8 05 00 00 00 mov $0x5,%eax
1194f1: e9 10 ff ff ff jmp 119406 <rtems_partition_create+0x12>
00119624 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
119624: 53 push %ebx
119625: 83 ec 28 sub $0x28,%esp
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
119628: 8d 44 24 1c lea 0x1c(%esp),%eax
11962c: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
119630: 8b 44 24 30 mov 0x30(%esp),%eax
119634: 89 44 24 04 mov %eax,0x4(%esp)
119638: c7 04 24 80 d8 14 00 movl $0x14d880,(%esp)
11963f: e8 8c 4d 00 00 call 11e3d0 <_Objects_Get>
switch ( location ) {
119644: 8b 54 24 1c mov 0x1c(%esp),%edx
119648: 85 d2 test %edx,%edx
11964a: 75 48 jne 119694 <rtems_partition_return_buffer+0x70>
11964c: 89 c3 mov %eax,%ebx
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
11964e: 8b 40 10 mov 0x10(%eax),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
119651: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
119654: 39 44 24 34 cmp %eax,0x34(%esp)
119658: 72 46 jb 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
11965a: 01 c2 add %eax,%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
11965c: 39 54 24 34 cmp %edx,0x34(%esp)
119660: 77 3e ja 1196a0 <rtems_partition_return_buffer+0x7c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
119662: 8b 54 24 34 mov 0x34(%esp),%edx
119666: 29 c2 sub %eax,%edx
119668: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
11966a: 31 d2 xor %edx,%edx
11966c: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
11966f: 85 d2 test %edx,%edx
119671: 75 2d jne 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
119673: 8b 44 24 34 mov 0x34(%esp),%eax
119677: 89 44 24 04 mov %eax,0x4(%esp)
11967b: 8d 43 24 lea 0x24(%ebx),%eax
11967e: 89 04 24 mov %eax,(%esp)
119681: e8 32 32 00 00 call 11c8b8 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
119686: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
119689: e8 d6 59 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11968e: 31 c0 xor %eax,%eax
119690: eb 07 jmp 119699 <rtems_partition_return_buffer+0x75>
119692: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
119694: b8 04 00 00 00 mov $0x4,%eax
}
119699: 83 c4 28 add $0x28,%esp
11969c: 5b pop %ebx
11969d: c3 ret
11969e: 66 90 xchg %ax,%ax
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1196a0: e8 bf 59 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
1196a5: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1196aa: 83 c4 28 add $0x28,%esp
1196ad: 5b pop %ebx
1196ae: c3 ret
001375cc <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
1375cc: 57 push %edi
1375cd: 56 push %esi
1375ce: 53 push %ebx
1375cf: 83 ec 30 sub $0x30,%esp
1375d2: 8b 5c 24 40 mov 0x40(%esp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
1375d6: 8d 44 24 2c lea 0x2c(%esp),%eax
1375da: 89 44 24 08 mov %eax,0x8(%esp)
1375de: 89 5c 24 04 mov %ebx,0x4(%esp)
1375e2: c7 04 24 20 b6 17 00 movl $0x17b620,(%esp)
1375e9: e8 6e 58 fd ff call 10ce5c <_Objects_Get>
switch ( location ) {
1375ee: 8b 54 24 2c mov 0x2c(%esp),%edx
1375f2: 85 d2 test %edx,%edx
1375f4: 75 1e jne 137614 <rtems_rate_monotonic_period+0x48>
1375f6: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
1375f8: a1 cc b3 17 00 mov 0x17b3cc,%eax
1375fd: 39 46 40 cmp %eax,0x40(%esi)
137600: 74 1e je 137620 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
137602: e8 69 64 fd ff call 10da70 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
137607: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
13760c: 83 c4 30 add $0x30,%esp
13760f: 5b pop %ebx
137610: 5e pop %esi
137611: 5f pop %edi
137612: c3 ret
137613: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
137614: b8 04 00 00 00 mov $0x4,%eax
}
137619: 83 c4 30 add $0x30,%esp
13761c: 5b pop %ebx
13761d: 5e pop %esi
13761e: 5f pop %edi
13761f: c3 ret
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
137620: 8b 44 24 44 mov 0x44(%esp),%eax
137624: 85 c0 test %eax,%eax
137626: 74 68 je 137690 <rtems_rate_monotonic_period+0xc4>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
137628: 9c pushf
137629: fa cli
13762a: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
13762b: 8b 46 38 mov 0x38(%esi),%eax
13762e: 85 c0 test %eax,%eax
137630: 0f 84 82 00 00 00 je 1376b8 <rtems_rate_monotonic_period+0xec>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
137636: 83 f8 02 cmp $0x2,%eax
137639: 0f 84 cf 00 00 00 je 13770e <rtems_rate_monotonic_period+0x142>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
13763f: 83 f8 04 cmp $0x4,%eax
137642: 75 d0 jne 137614 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
137644: 89 f0 mov %esi,%eax
137646: e8 2d fe ff ff call 137478 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
13764b: 57 push %edi
13764c: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
13764d: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
the_period->next_length = length;
137654: 8b 44 24 44 mov 0x44(%esp),%eax
137658: 89 46 3c mov %eax,0x3c(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
13765b: 89 46 1c mov %eax,0x1c(%esi)
_Watchdog_Insert_ticks( &the_period->Timer, length );
13765e: 8d 46 10 lea 0x10(%esi),%eax
137661: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
137665: c7 04 24 08 b2 17 00 movl $0x17b208,(%esp)
13766c: e8 e3 6f fd ff call 10e654 <_Watchdog_Insert>
137671: 8b 46 3c mov 0x3c(%esi),%eax
137674: 89 44 24 04 mov %eax,0x4(%esp)
137678: 8b 46 40 mov 0x40(%esi),%eax
13767b: 89 04 24 mov %eax,(%esp)
13767e: ff 15 14 36 17 00 call *0x173614
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
137684: e8 e7 63 fd ff call 10da70 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
137689: b8 06 00 00 00 mov $0x6,%eax
13768e: eb 89 jmp 137619 <rtems_rate_monotonic_period+0x4d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
137690: 8b 46 38 mov 0x38(%esi),%eax
137693: 83 f8 04 cmp $0x4,%eax
137696: 77 1c ja 1376b4 <rtems_rate_monotonic_period+0xe8><== NEVER TAKEN
137698: 8b 04 85 f4 e2 15 00 mov 0x15e2f4(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
13769f: 89 44 24 1c mov %eax,0x1c(%esp)
1376a3: e8 c8 63 fd ff call 10da70 <_Thread_Enable_dispatch>
1376a8: 8b 44 24 1c mov 0x1c(%esp),%eax
1376ac: e9 68 ff ff ff jmp 137619 <rtems_rate_monotonic_period+0x4d>
1376b1: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
1376b4: 31 c0 xor %eax,%eax <== NOT EXECUTED
1376b6: eb e7 jmp 13769f <rtems_rate_monotonic_period+0xd3><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
1376b8: 57 push %edi
1376b9: 9d popf
the_period->next_length = length;
1376ba: 8b 44 24 44 mov 0x44(%esp),%eax
1376be: 89 46 3c mov %eax,0x3c(%esi)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
1376c1: 89 34 24 mov %esi,(%esp)
1376c4: e8 8f fe ff ff call 137558 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
1376c9: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1376d0: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
the_watchdog->routine = routine;
1376d7: c7 46 2c 78 77 13 00 movl $0x137778,0x2c(%esi)
the_watchdog->id = id;
1376de: 89 5e 30 mov %ebx,0x30(%esi)
the_watchdog->user_data = user_data;
1376e1: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1376e8: 8b 44 24 44 mov 0x44(%esp),%eax
1376ec: 89 46 1c mov %eax,0x1c(%esi)
_Rate_monotonic_Timeout,
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
1376ef: 83 c6 10 add $0x10,%esi
1376f2: 89 74 24 04 mov %esi,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1376f6: c7 04 24 08 b2 17 00 movl $0x17b208,(%esp)
1376fd: e8 52 6f fd ff call 10e654 <_Watchdog_Insert>
_Thread_Enable_dispatch();
137702: e8 69 63 fd ff call 10da70 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
137707: 31 c0 xor %eax,%eax
137709: e9 0b ff ff ff jmp 137619 <rtems_rate_monotonic_period+0x4d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
13770e: 89 f0 mov %esi,%eax
137710: e8 63 fd ff ff call 137478 <_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;
137715: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi)
the_period->next_length = length;
13771c: 8b 44 24 44 mov 0x44(%esp),%eax
137720: 89 46 3c mov %eax,0x3c(%esi)
_ISR_Enable( level );
137723: 57 push %edi
137724: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
137725: a1 cc b3 17 00 mov 0x17b3cc,%eax
13772a: 8b 56 08 mov 0x8(%esi),%edx
13772d: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
137730: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
137737: 00
137738: 89 04 24 mov %eax,(%esp)
13773b: e8 48 6b fd ff call 10e288 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
137740: 9c pushf
137741: fa cli
137742: 5a pop %edx
local_state = the_period->state;
137743: 8b 46 38 mov 0x38(%esi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
137746: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
_ISR_Enable( level );
13774d: 52 push %edx
13774e: 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 )
13774f: 83 f8 03 cmp $0x3,%eax
137752: 74 0c je 137760 <rtems_rate_monotonic_period+0x194>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
137754: e8 17 63 fd ff call 10da70 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
137759: 31 c0 xor %eax,%eax
13775b: e9 b9 fe ff ff jmp 137619 <rtems_rate_monotonic_period+0x4d>
/*
* 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 )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
137760: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
137767: 00
137768: a1 cc b3 17 00 mov 0x17b3cc,%eax
13776d: 89 04 24 mov %eax,(%esp)
137770: e8 57 5f fd ff call 10d6cc <_Thread_Clear_state>
137775: eb dd jmp 137754 <rtems_rate_monotonic_period+0x188>
0012a98c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
12a98c: 55 push %ebp
12a98d: 57 push %edi
12a98e: 56 push %esi
12a98f: 53 push %ebx
12a990: 81 ec 9c 00 00 00 sub $0x9c,%esp
12a996: 8b b4 24 b0 00 00 00 mov 0xb0(%esp),%esi
12a99d: 8b 9c 24 b4 00 00 00 mov 0xb4(%esp),%ebx
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
12a9a4: 85 db test %ebx,%ebx
12a9a6: 0f 84 ec 00 00 00 je 12aa98 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
12a9ac: c7 44 24 04 a8 b3 15 movl $0x15b3a8,0x4(%esp)
12a9b3: 00
12a9b4: 89 34 24 mov %esi,(%esp)
12a9b7: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
12a9b9: c7 44 24 04 e0 b3 15 movl $0x15b3e0,0x4(%esp)
12a9c0: 00
12a9c1: 89 34 24 mov %esi,(%esp)
12a9c4: ff d3 call *%ebx
(*print)( context, "--- Wall times are in seconds ---\n" );
12a9c6: c7 44 24 04 04 b4 15 movl $0x15b404,0x4(%esp)
12a9cd: 00
12a9ce: 89 34 24 mov %esi,(%esp)
12a9d1: ff d3 call *%ebx
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
12a9d3: c7 44 24 04 28 b4 15 movl $0x15b428,0x4(%esp)
12a9da: 00
12a9db: 89 34 24 mov %esi,(%esp)
12a9de: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
12a9e0: c7 44 24 04 74 b4 15 movl $0x15b474,0x4(%esp)
12a9e7: 00
12a9e8: 89 34 24 mov %esi,(%esp)
12a9eb: ff d3 call *%ebx
/*
* 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 ;
12a9ed: 8b 2d 28 b6 17 00 mov 0x17b628,%ebp
12a9f3: 8d 7c 24 58 lea 0x58(%esp),%edi
12a9f7: 3b 2d 2c b6 17 00 cmp 0x17b62c,%ebp
12a9fd: 76 12 jbe 12aa11 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
12a9ff: e9 94 00 00 00 jmp 12aa98 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12aa04: 45 inc %ebp
/*
* 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 ;
12aa05: 39 2d 2c b6 17 00 cmp %ebp,0x17b62c
12aa0b: 0f 82 87 00 00 00 jb 12aa98 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
12aa11: 89 7c 24 04 mov %edi,0x4(%esp)
12aa15: 89 2c 24 mov %ebp,(%esp)
12aa18: e8 73 c6 00 00 call 137090 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
12aa1d: 85 c0 test %eax,%eax
12aa1f: 75 e3 jne 12aa04 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
12aa21: 8d 44 24 40 lea 0x40(%esp),%eax
12aa25: 89 44 24 04 mov %eax,0x4(%esp)
12aa29: 89 2c 24 mov %ebp,(%esp)
12aa2c: e8 6b c8 00 00 call 13729c <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
12aa31: 8d 54 24 33 lea 0x33(%esp),%edx
12aa35: 89 54 24 08 mov %edx,0x8(%esp)
12aa39: c7 44 24 04 05 00 00 movl $0x5,0x4(%esp)
12aa40: 00
12aa41: 8b 44 24 40 mov 0x40(%esp),%eax
12aa45: 89 04 24 mov %eax,(%esp)
12aa48: e8 1f 80 fe ff call 112a6c <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12aa4d: 8b 44 24 5c mov 0x5c(%esp),%eax
12aa51: 89 44 24 14 mov %eax,0x14(%esp)
12aa55: 8b 44 24 58 mov 0x58(%esp),%eax
12aa59: 89 44 24 10 mov %eax,0x10(%esp)
"0x%08" PRIx32 " %4s %5" PRId32 " %6" PRId32 " ",
id, name,
12aa5d: 8d 44 24 33 lea 0x33(%esp),%eax
12aa61: 89 44 24 0c mov %eax,0xc(%esp)
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12aa65: 89 6c 24 08 mov %ebp,0x8(%esp)
12aa69: c7 44 24 04 c6 b3 15 movl $0x15b3c6,0x4(%esp)
12aa70: 00
12aa71: 89 34 24 mov %esi,(%esp)
12aa74: ff d3 call *%ebx
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
12aa76: 8b 44 24 58 mov 0x58(%esp),%eax
12aa7a: 85 c0 test %eax,%eax
12aa7c: 75 26 jne 12aaa4 <rtems_rate_monotonic_report_statistics_with_plugin+0x118>
(*print)( context, "\n" );
12aa7e: c7 44 24 04 35 54 15 movl $0x155435,0x4(%esp)
12aa85: 00
12aa86: 89 34 24 mov %esi,(%esp)
12aa89: ff d3 call *%ebx
* 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++ ) {
12aa8b: 45 inc %ebp
/*
* 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 ;
12aa8c: 39 2d 2c b6 17 00 cmp %ebp,0x17b62c
12aa92: 0f 83 79 ff ff ff jae 12aa11 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
12aa98: 81 c4 9c 00 00 00 add $0x9c,%esp
12aa9e: 5b pop %ebx
12aa9f: 5e pop %esi
12aaa0: 5f pop %edi
12aaa1: 5d pop %ebp
12aaa2: c3 ret
12aaa3: 90 nop
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 );
12aaa4: 8d 4c 24 38 lea 0x38(%esp),%ecx
12aaa8: 89 4c 24 08 mov %ecx,0x8(%esp)
12aaac: 89 44 24 04 mov %eax,0x4(%esp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
12aab0: 8d 44 24 70 lea 0x70(%esp),%eax
12aab4: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
12aab7: 89 4c 24 2c mov %ecx,0x2c(%esp)
12aabb: e8 d8 0a 00 00 call 12b598 <_Timespec_Divide_by_integer>
(*print)( context,
12aac0: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12aac5: f7 6c 24 3c imull 0x3c(%esp)
12aac9: c1 fa 06 sar $0x6,%edx
12aacc: 89 54 24 28 mov %edx,0x28(%esp)
12aad0: 8b 44 24 3c mov 0x3c(%esp),%eax
12aad4: 99 cltd
12aad5: 29 54 24 28 sub %edx,0x28(%esp)
12aad9: 8b 54 24 28 mov 0x28(%esp),%edx
12aadd: 89 54 24 1c mov %edx,0x1c(%esp)
12aae1: 8b 44 24 38 mov 0x38(%esp),%eax
12aae5: 89 44 24 18 mov %eax,0x18(%esp)
12aae9: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12aaee: f7 6c 24 6c imull 0x6c(%esp)
12aaf2: c1 fa 06 sar $0x6,%edx
12aaf5: 89 54 24 28 mov %edx,0x28(%esp)
12aaf9: 8b 44 24 6c mov 0x6c(%esp),%eax
12aafd: 99 cltd
12aafe: 29 54 24 28 sub %edx,0x28(%esp)
12ab02: 8b 54 24 28 mov 0x28(%esp),%edx
12ab06: 89 54 24 14 mov %edx,0x14(%esp)
12ab0a: 8b 44 24 68 mov 0x68(%esp),%eax
12ab0e: 89 44 24 10 mov %eax,0x10(%esp)
12ab12: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12ab17: f7 6c 24 64 imull 0x64(%esp)
12ab1b: 89 44 24 20 mov %eax,0x20(%esp)
12ab1f: 89 54 24 24 mov %edx,0x24(%esp)
12ab23: c1 fa 06 sar $0x6,%edx
12ab26: 89 54 24 28 mov %edx,0x28(%esp)
12ab2a: 8b 44 24 64 mov 0x64(%esp),%eax
12ab2e: 99 cltd
12ab2f: 29 54 24 28 sub %edx,0x28(%esp)
12ab33: 8b 54 24 28 mov 0x28(%esp),%edx
12ab37: 89 54 24 0c mov %edx,0xc(%esp)
12ab3b: 8b 44 24 60 mov 0x60(%esp),%eax
12ab3f: 89 44 24 08 mov %eax,0x8(%esp)
12ab43: c7 44 24 04 c0 b4 15 movl $0x15b4c0,0x4(%esp)
12ab4a: 00
12ab4b: 89 34 24 mov %esi,(%esp)
12ab4e: ff d3 call *%ebx
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);
12ab50: 8b 4c 24 2c mov 0x2c(%esp),%ecx
12ab54: 89 4c 24 08 mov %ecx,0x8(%esp)
12ab58: 8b 44 24 58 mov 0x58(%esp),%eax
12ab5c: 89 44 24 04 mov %eax,0x4(%esp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
12ab60: 8d 84 24 88 00 00 00 lea 0x88(%esp),%eax
12ab67: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
12ab6a: e8 29 0a 00 00 call 12b598 <_Timespec_Divide_by_integer>
(*print)( context,
12ab6f: 8b 4c 24 3c mov 0x3c(%esp),%ecx
12ab73: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12ab78: f7 e9 imul %ecx
12ab7a: 89 54 24 24 mov %edx,0x24(%esp)
12ab7e: 8b 44 24 24 mov 0x24(%esp),%eax
12ab82: c1 f8 06 sar $0x6,%eax
12ab85: c1 f9 1f sar $0x1f,%ecx
12ab88: 29 c8 sub %ecx,%eax
12ab8a: 89 44 24 1c mov %eax,0x1c(%esp)
12ab8e: 8b 44 24 38 mov 0x38(%esp),%eax
12ab92: 89 44 24 18 mov %eax,0x18(%esp)
12ab96: 8b 8c 24 84 00 00 00 mov 0x84(%esp),%ecx
12ab9d: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12aba2: f7 e9 imul %ecx
12aba4: 89 54 24 24 mov %edx,0x24(%esp)
12aba8: 8b 44 24 24 mov 0x24(%esp),%eax
12abac: c1 f8 06 sar $0x6,%eax
12abaf: c1 f9 1f sar $0x1f,%ecx
12abb2: 29 c8 sub %ecx,%eax
12abb4: 89 44 24 14 mov %eax,0x14(%esp)
12abb8: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
12abbf: 89 44 24 10 mov %eax,0x10(%esp)
12abc3: 8b 4c 24 7c mov 0x7c(%esp),%ecx
12abc7: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12abcc: f7 e9 imul %ecx
12abce: 89 44 24 20 mov %eax,0x20(%esp)
12abd2: 89 54 24 24 mov %edx,0x24(%esp)
12abd6: 8b 44 24 24 mov 0x24(%esp),%eax
12abda: c1 f8 06 sar $0x6,%eax
12abdd: c1 f9 1f sar $0x1f,%ecx
12abe0: 29 c8 sub %ecx,%eax
12abe2: 89 44 24 0c mov %eax,0xc(%esp)
12abe6: 8b 44 24 78 mov 0x78(%esp),%eax
12abea: 89 44 24 08 mov %eax,0x8(%esp)
12abee: c7 44 24 04 e0 b4 15 movl $0x15b4e0,0x4(%esp)
12abf5: 00
12abf6: 89 34 24 mov %esi,(%esp)
12abf9: ff d3 call *%ebx
12abfb: e9 04 fe ff ff jmp 12aa04 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
0012ac1c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
12ac1c: 53 push %ebx
12ac1d: 83 ec 18 sub $0x18,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
12ac20: a1 64 b1 17 00 mov 0x17b164,%eax
12ac25: 40 inc %eax
12ac26: a3 64 b1 17 00 mov %eax,0x17b164
return _Thread_Dispatch_disable_level;
12ac2b: a1 64 b1 17 00 mov 0x17b164,%eax
/*
* Cycle through all possible ids and try to reset 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 ;
12ac30: 8b 1d 28 b6 17 00 mov 0x17b628,%ebx
12ac36: 3b 1d 2c b6 17 00 cmp 0x17b62c,%ebx
12ac3c: 77 13 ja 12ac51 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
12ac3e: 66 90 xchg %ax,%ax
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
12ac40: 89 1c 24 mov %ebx,(%esp)
12ac43: e8 14 00 00 00 call 12ac5c <rtems_rate_monotonic_reset_statistics>
* Cycle through all possible ids and try to reset 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++ ) {
12ac48: 43 inc %ebx
/*
* Cycle through all possible ids and try to reset 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 ;
12ac49: 39 1d 2c b6 17 00 cmp %ebx,0x17b62c
12ac4f: 73 ef jae 12ac40 <rtems_rate_monotonic_reset_all_statistics+0x24>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
12ac51: 83 c4 18 add $0x18,%esp
12ac54: 5b pop %ebx
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
12ac55: e9 16 2e fe ff jmp 10da70 <_Thread_Enable_dispatch>
0010c9e0 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
10c9e0: 55 push %ebp
10c9e1: 57 push %edi
10c9e2: 56 push %esi
10c9e3: 53 push %ebx
10c9e4: 83 ec 2c sub $0x2c,%esp
10c9e7: 8b 6c 24 40 mov 0x40(%esp),%ebp
10c9eb: 8b 4c 24 44 mov 0x44(%esp),%ecx
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
10c9ef: 8b 75 30 mov 0x30(%ebp),%esi
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c9f2: 89 c8 mov %ecx,%eax
10c9f4: 31 d2 xor %edx,%edx
10c9f6: f7 f6 div %esi
if (excess > 0) {
10c9f8: 85 d2 test %edx,%edx
10c9fa: 75 54 jne 10ca50 <rtems_rbheap_allocate+0x70><== NEVER TAKEN
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10c9fc: 89 ce mov %ecx,%esi
10c9fe: 85 c9 test %ecx,%ecx
10ca00: 74 1a je 10ca1c <rtems_rbheap_allocate+0x3c>
10ca02: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ca04: 8b 7d 00 mov 0x0(%ebp),%edi
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
10ca07: 8d 45 04 lea 0x4(%ebp),%eax
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10ca0a: 39 c7 cmp %eax,%edi
10ca0c: 74 0e je 10ca1c <rtems_rbheap_allocate+0x3c>
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
10ca0e: 8b 5f 1c mov 0x1c(%edi),%ebx
10ca11: 39 f3 cmp %esi,%ebx
10ca13: 73 13 jae 10ca28 <rtems_rbheap_allocate+0x48>
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10ca15: 8b 3f mov (%edi),%edi
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10ca17: 39 f8 cmp %edi,%eax
10ca19: 75 f3 jne 10ca0e <rtems_rbheap_allocate+0x2e><== NEVER TAKEN
10ca1b: 90 nop
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10ca1c: 31 c0 xor %eax,%eax
}
}
}
return ptr;
}
10ca1e: 83 c4 2c add $0x2c,%esp
10ca21: 5b pop %ebx
10ca22: 5e pop %esi
10ca23: 5f pop %edi
10ca24: 5d pop %ebp
10ca25: c3 ret
10ca26: 66 90 xchg %ax,%ax
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
10ca28: 39 de cmp %ebx,%esi
10ca2a: 72 34 jb 10ca60 <rtems_rbheap_allocate+0x80>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ca2c: 8b 17 mov (%edi),%edx
previous = the_node->previous;
10ca2e: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
10ca31: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ca34: 89 10 mov %edx,(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ca36: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
10ca3d: c7 07 00 00 00 00 movl $0x0,(%edi)
ptr = (void *) new_chunk->begin;
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
10ca43: 8b 47 18 mov 0x18(%edi),%eax
}
}
}
return ptr;
}
10ca46: 83 c4 2c add $0x2c,%esp
10ca49: 5b pop %ebx
10ca4a: 5e pop %esi
10ca4b: 5f pop %edi
10ca4c: 5d pop %ebp
10ca4d: c3 ret
10ca4e: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10ca50: 01 ce add %ecx,%esi <== NOT EXECUTED
10ca52: 29 d6 sub %edx,%esi <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10ca54: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10ca56: 74 c4 je 10ca1c <rtems_rbheap_allocate+0x3c><== NOT EXECUTED
10ca58: 39 f1 cmp %esi,%ecx <== NOT EXECUTED
10ca5a: 76 a8 jbe 10ca04 <rtems_rbheap_allocate+0x24><== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10ca5c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10ca5e: eb be jmp 10ca1e <rtems_rbheap_allocate+0x3e><== NOT EXECUTED
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
10ca60: 89 e8 mov %ebp,%eax
10ca62: e8 91 fd ff ff call 10c7f8 <get_chunk>
10ca67: 89 c2 mov %eax,%edx
if (new_chunk != NULL) {
10ca69: 85 c0 test %eax,%eax
10ca6b: 74 af je 10ca1c <rtems_rbheap_allocate+0x3c><== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
10ca6d: 29 f3 sub %esi,%ebx
free_chunk->size = new_free_size;
10ca6f: 89 5f 1c mov %ebx,0x1c(%edi)
new_chunk->begin = free_chunk->begin + new_free_size;
10ca72: 03 5f 18 add 0x18(%edi),%ebx
10ca75: 89 58 18 mov %ebx,0x18(%eax)
new_chunk->size = aligned_size;
10ca78: 89 70 1c mov %esi,0x1c(%eax)
10ca7b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10ca82: c7 00 00 00 00 00 movl $0x0,(%eax)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10ca88: 8d 40 08 lea 0x8(%eax),%eax
10ca8b: 89 44 24 04 mov %eax,0x4(%esp)
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10ca8f: 83 c5 18 add $0x18,%ebp
10ca92: 89 2c 24 mov %ebp,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10ca95: 89 54 24 1c mov %edx,0x1c(%esp)
10ca99: e8 c6 17 00 00 call 10e264 <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
10ca9e: 8b 54 24 1c mov 0x1c(%esp),%edx
10caa2: 8b 42 18 mov 0x18(%edx),%eax
}
}
}
return ptr;
}
10caa5: 83 c4 2c add $0x2c,%esp
10caa8: 5b pop %ebx
10caa9: 5e pop %esi
10caaa: 5f pop %edi
10caab: 5d pop %ebp
10caac: c3 ret
0010cbc0 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
10cbc0: 53 push %ebx <== NOT EXECUTED
10cbc1: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
10cbc4: 8b 5c 24 20 mov 0x20(%esp),%ebx <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
10cbc8: c7 04 24 20 00 00 00 movl $0x20,(%esp) <== NOT EXECUTED
10cbcf: e8 2c b7 ff ff call 108300 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
10cbd4: 85 c0 test %eax,%eax <== NOT EXECUTED
10cbd6: 74 11 je 10cbe9 <rtems_rbheap_extend_descriptors_with_malloc+0x29><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
10cbd8: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
10cbdb: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
10cbde: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
after_node->next = the_node;
10cbe1: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
the_node->next = before_node;
10cbe4: 89 10 mov %edx,(%eax) <== NOT EXECUTED
before_node->previous = the_node;
10cbe6: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10cbe9: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10cbec: 5b pop %ebx <== NOT EXECUTED
10cbed: c3 ret <== NOT EXECUTED
0010cab0 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
10cab0: 55 push %ebp
10cab1: 57 push %edi
10cab2: 56 push %esi
10cab3: 53 push %ebx
10cab4: 83 ec 4c sub $0x4c,%esp
10cab7: 8b 54 24 64 mov 0x64(%esp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
10cabb: 85 d2 test %edx,%edx
10cabd: 0f 84 dd 00 00 00 je 10cba0 <rtems_rbheap_free+0xf0>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10cac3: 8b 5c 24 60 mov 0x60(%esp),%ebx
10cac7: 83 c3 18 add $0x18,%ebx
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
10caca: 8d 7c 24 20 lea 0x20(%esp),%edi
10cace: b9 20 00 00 00 mov $0x20,%ecx
10cad3: 31 c0 xor %eax,%eax
10cad5: f3 aa rep stos %al,%es:(%edi)
10cad7: 89 54 24 38 mov %edx,0x38(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10cadb: 8b 44 24 60 mov 0x60(%esp),%eax
10cadf: 8b 68 1c mov 0x1c(%eax),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cae2: 85 ed test %ebp,%ebp
10cae4: 0f 84 c2 00 00 00 je 10cbac <rtems_rbheap_free+0xfc><== NEVER TAKEN
10caea: 31 f6 xor %esi,%esi
10caec: 8d 7c 24 28 lea 0x28(%esp),%edi
compare_result = the_rbtree->compare_function(the_node, iter_node);
10caf0: 89 6c 24 04 mov %ebp,0x4(%esp)
return rtems_rbheap_chunk_of_node(
10caf4: 89 3c 24 mov %edi,(%esp)
10caf7: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10cafa: 85 c0 test %eax,%eax
10cafc: 75 08 jne 10cb06 <rtems_rbheap_free+0x56>
found = iter_node;
if ( the_rbtree->is_unique )
10cafe: 89 ee mov %ebp,%esi
10cb00: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10cb04: 75 10 jne 10cb16 <rtems_rbheap_free+0x66><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10cb06: 85 c0 test %eax,%eax
10cb08: 0f 9f c0 setg %al
10cb0b: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10cb0e: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cb12: 85 ed test %ebp,%ebp
10cb14: 75 da jne 10caf0 <rtems_rbheap_free+0x40>
10cb16: 8d 7e f8 lea -0x8(%esi),%edi
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
10cb19: 83 ff f8 cmp $0xfffffff8,%edi
10cb1c: 0f 84 8a 00 00 00 je 10cbac <rtems_rbheap_free+0xfc>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10cb22: 8b 46 f8 mov -0x8(%esi),%eax
10cb25: 85 c0 test %eax,%eax
10cb27: 74 0d je 10cb36 <rtems_rbheap_free+0x86>
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
10cb29: b8 0e 00 00 00 mov $0xe,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cb2e: 83 c4 4c add $0x4c,%esp
10cb31: 5b pop %ebx
10cb32: 5e pop %esi
10cb33: 5f pop %edi
10cb34: 5d pop %ebp
10cb35: c3 ret
10cb36: 8b 6f 04 mov 0x4(%edi),%ebp
10cb39: 85 ed test %ebp,%ebp
10cb3b: 75 ec jne 10cb29 <rtems_rbheap_free+0x79><== NEVER TAKEN
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10cb3d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10cb44: 00
10cb45: 89 34 24 mov %esi,(%esp)
10cb48: e8 b7 19 00 00 call 10e504 <_RBTree_Next_unprotected>
10cb4d: 89 44 24 1c mov %eax,0x1c(%esp)
10cb51: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10cb58: 00
10cb59: 89 34 24 mov %esi,(%esp)
10cb5c: e8 a3 19 00 00 call 10e504 <_RBTree_Next_unprotected>
10cb61: 83 e8 08 sub $0x8,%eax
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
10cb64: 89 04 24 mov %eax,(%esp)
10cb67: 89 f9 mov %edi,%ecx
10cb69: 89 da mov %ebx,%edx
10cb6b: 8b 44 24 60 mov 0x60(%esp),%eax
10cb6f: e8 d0 fc ff ff call 10c844 <check_and_merge>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10cb74: 8b 44 24 60 mov 0x60(%esp),%eax
10cb78: 89 47 04 mov %eax,0x4(%edi)
before_node = after_node->next;
10cb7b: 89 c2 mov %eax,%edx
10cb7d: 8b 00 mov (%eax),%eax
after_node->next = the_node;
10cb7f: 89 3a mov %edi,(%edx)
the_node->next = before_node;
10cb81: 89 07 mov %eax,(%edi)
before_node->previous = the_node;
10cb83: 89 78 04 mov %edi,0x4(%eax)
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10cb86: 8b 44 24 1c mov 0x1c(%esp),%eax
10cb8a: 83 e8 08 sub $0x8,%eax
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
10cb8d: 89 04 24 mov %eax,(%esp)
10cb90: 89 f9 mov %edi,%ecx
10cb92: 89 da mov %ebx,%edx
10cb94: 8b 44 24 60 mov 0x60(%esp),%eax
10cb98: e8 a7 fc ff ff call 10c844 <check_and_merge>
10cb9d: 8d 76 00 lea 0x0(%esi),%esi
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10cba0: 31 c0 xor %eax,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cba2: 83 c4 4c add $0x4c,%esp
10cba5: 5b pop %ebx
10cba6: 5e pop %esi
10cba7: 5f pop %edi
10cba8: 5d pop %ebp
10cba9: c3 ret
10cbaa: 66 90 xchg %ax,%ax
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
10cbac: b8 04 00 00 00 mov $0x4,%eax
}
}
return sc;
}
10cbb1: 83 c4 4c add $0x4c,%esp
10cbb4: 5b pop %ebx
10cbb5: 5e pop %esi
10cbb6: 5f pop %edi
10cbb7: 5d pop %ebp
10cbb8: c3 ret
0010c8ac <rtems_rbheap_initialize>:
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
10c8ac: 57 push %edi
10c8ad: 56 push %esi
10c8ae: 53 push %ebx
10c8af: 83 ec 10 sub $0x10,%esp
10c8b2: 8b 4c 24 2c mov 0x2c(%esp),%ecx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
10c8b6: 85 c9 test %ecx,%ecx
10c8b8: 75 0e jne 10c8c8 <rtems_rbheap_initialize+0x1c>
}
} else {
sc = RTEMS_INVALID_ADDRESS;
}
} else {
sc = RTEMS_INVALID_NUMBER;
10c8ba: b8 0a 00 00 00 mov $0xa,%eax
}
return sc;
}
10c8bf: 83 c4 10 add $0x10,%esp
10c8c2: 5b pop %ebx
10c8c3: 5e pop %esi
10c8c4: 5f pop %edi
10c8c5: c3 ret
10c8c6: 66 90 xchg %ax,%ax
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
10c8c8: 8b 5c 24 24 mov 0x24(%esp),%ebx
10c8cc: 03 5c 24 28 add 0x28(%esp),%ebx
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c8d0: 8b 44 24 24 mov 0x24(%esp),%eax
10c8d4: 31 d2 xor %edx,%edx
10c8d6: f7 f1 div %ecx
if (excess > 0) {
10c8d8: 85 d2 test %edx,%edx
10c8da: 0f 85 c4 00 00 00 jne 10c9a4 <rtems_rbheap_initialize+0xf8>
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c8e0: 89 d8 mov %ebx,%eax
10c8e2: 31 d2 xor %edx,%edx
10c8e4: f7 f1 div %ecx
return value - excess;
10c8e6: 89 df mov %ebx,%edi
10c8e8: 29 d7 sub %edx,%edi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c8ea: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c8ee: 0f 83 b6 00 00 00 jae 10c9aa <rtems_rbheap_initialize+0xfe>
10c8f4: 8b 74 24 24 mov 0x24(%esp),%esi
10c8f8: 39 f7 cmp %esi,%edi
10c8fa: 0f 86 aa 00 00 00 jbe 10c9aa <rtems_rbheap_initialize+0xfe>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c900: 8b 44 24 20 mov 0x20(%esp),%eax
10c904: 83 c0 04 add $0x4,%eax
10c907: 8b 54 24 20 mov 0x20(%esp),%edx
10c90b: 89 02 mov %eax,(%edx)
head->next = tail;
head->previous = NULL;
10c90d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10c914: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c917: 89 d0 mov %edx,%eax
10c919: 83 c0 0c add $0xc,%eax
10c91c: 83 c2 10 add $0x10,%edx
10c91f: 8b 5c 24 20 mov 0x20(%esp),%ebx
10c923: 89 53 0c mov %edx,0xc(%ebx)
head->next = tail;
head->previous = NULL;
10c926: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10c92d: 89 43 14 mov %eax,0x14(%ebx)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10c930: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_rbtree->root = NULL;
10c937: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_rbtree->first[0] = NULL;
10c93e: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
the_rbtree->first[1] = NULL;
10c945: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
the_rbtree->compare_function = compare_function;
10c94c: c7 43 28 e8 c7 10 00 movl $0x10c7e8,0x28(%ebx)
the_rbtree->is_unique = is_unique;
10c953: c6 43 2c 01 movb $0x1,0x2c(%ebx)
rtems_rbheap_chunk *first = NULL;
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
10c957: 89 4b 30 mov %ecx,0x30(%ebx)
control->handler_arg = handler_arg;
10c95a: 8b 44 24 34 mov 0x34(%esp),%eax
10c95e: 89 43 38 mov %eax,0x38(%ebx)
control->extend_descriptors = extend_descriptors;
10c961: 8b 44 24 30 mov 0x30(%esp),%eax
10c965: 89 43 34 mov %eax,0x34(%ebx)
first = get_chunk(control);
10c968: 89 d8 mov %ebx,%eax
10c96a: e8 89 fe ff ff call 10c7f8 <get_chunk>
if (first != NULL) {
10c96f: 85 c0 test %eax,%eax
10c971: 74 62 je 10c9d5 <rtems_rbheap_initialize+0x129>
first->begin = aligned_begin;
10c973: 89 70 18 mov %esi,0x18(%eax)
first->size = aligned_end - aligned_begin;
10c976: 29 f7 sub %esi,%edi
10c978: 89 78 1c mov %edi,0x1c(%eax)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c97b: 89 58 04 mov %ebx,0x4(%eax)
before_node = after_node->next;
10c97e: 8b 13 mov (%ebx),%edx
after_node->next = the_node;
10c980: 89 03 mov %eax,(%ebx)
the_node->next = before_node;
10c982: 89 10 mov %edx,(%eax)
before_node->previous = the_node;
10c984: 89 42 04 mov %eax,0x4(%edx)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c987: 83 c0 08 add $0x8,%eax
10c98a: 89 44 24 04 mov %eax,0x4(%esp)
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10c98e: 89 d8 mov %ebx,%eax
10c990: 83 c0 18 add $0x18,%eax
10c993: 89 04 24 mov %eax,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c996: e8 c9 18 00 00 call 10e264 <_RBTree_Insert_unprotected>
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10c99b: 31 c0 xor %eax,%eax
10c99d: e9 1d ff ff ff jmp 10c8bf <rtems_rbheap_initialize+0x13>
10c9a2: 66 90 xchg %ax,%ax
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c9a4: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c9a8: 72 0e jb 10c9b8 <rtems_rbheap_initialize+0x10c>
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
10c9aa: b8 09 00 00 00 mov $0x9,%eax
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
10c9af: 83 c4 10 add $0x10,%esp
10c9b2: 5b pop %ebx
10c9b3: 5e pop %esi
10c9b4: 5f pop %edi
10c9b5: c3 ret
10c9b6: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10c9b8: 8b 74 24 24 mov 0x24(%esp),%esi
10c9bc: 01 ce add %ecx,%esi
10c9be: 29 d6 sub %edx,%esi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c9c0: 39 74 24 24 cmp %esi,0x24(%esp)
10c9c4: 77 e4 ja 10c9aa <rtems_rbheap_initialize+0xfe><== NEVER TAKEN
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c9c6: 89 d8 mov %ebx,%eax
10c9c8: 31 d2 xor %edx,%edx
10c9ca: f7 f1 div %ecx
return value - excess;
10c9cc: 89 df mov %ebx,%edi
10c9ce: 29 d7 sub %edx,%edi
10c9d0: e9 23 ff ff ff jmp 10c8f8 <rtems_rbheap_initialize+0x4c>
first->begin = aligned_begin;
first->size = aligned_end - aligned_begin;
add_to_chain(free_chain, first);
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
10c9d5: b8 1a 00 00 00 mov $0x1a,%eax
10c9da: e9 e0 fe ff ff jmp 10c8bf <rtems_rbheap_initialize+0x13>
0011ac6c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
11ac6c: 53 push %ebx
11ac6d: 83 ec 28 sub $0x28,%esp
11ac70: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11ac74: 85 db test %ebx,%ebx
11ac76: 75 0c jne 11ac84 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
11ac78: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11ac7d: 83 c4 28 add $0x28,%esp
11ac80: 5b pop %ebx
11ac81: c3 ret
11ac82: 66 90 xchg %ax,%ax
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
11ac84: 8d 44 24 1c lea 0x1c(%esp),%eax
11ac88: 89 44 24 04 mov %eax,0x4(%esp)
11ac8c: 8b 44 24 30 mov 0x30(%esp),%eax
11ac90: 89 04 24 mov %eax,(%esp)
11ac93: e8 ec 43 00 00 call 11f084 <_Thread_Get>
switch ( location ) {
11ac98: 8b 54 24 1c mov 0x1c(%esp),%edx
11ac9c: 85 d2 test %edx,%edx
11ac9e: 75 38 jne 11acd8 <rtems_signal_send+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11aca0: 8b 90 e0 00 00 00 mov 0xe0(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
11aca6: 8b 4a 0c mov 0xc(%edx),%ecx
11aca9: 85 c9 test %ecx,%ecx
11acab: 74 35 je 11ace2 <rtems_signal_send+0x76>
if ( asr->is_enabled ) {
11acad: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11acb1: 74 3d je 11acf0 <rtems_signal_send+0x84>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acb3: 9c pushf
11acb4: fa cli
11acb5: 59 pop %ecx
*signal_set |= signals;
11acb6: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
11acb9: 51 push %ecx
11acba: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11acbb: 8b 15 68 dc 14 00 mov 0x14dc68,%edx
11acc1: 85 d2 test %edx,%edx
11acc3: 74 08 je 11accd <rtems_signal_send+0x61>
11acc5: 3b 05 6c dc 14 00 cmp 0x14dc6c,%eax
11accb: 74 2d je 11acfa <rtems_signal_send+0x8e><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
11accd: e8 92 43 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11acd2: 31 c0 xor %eax,%eax
11acd4: eb a7 jmp 11ac7d <rtems_signal_send+0x11>
11acd6: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11acd8: b8 04 00 00 00 mov $0x4,%eax
}
11acdd: 83 c4 28 add $0x28,%esp
11ace0: 5b pop %ebx
11ace1: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11ace2: e8 7d 43 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
11ace7: b8 0b 00 00 00 mov $0xb,%eax
11acec: eb 8f jmp 11ac7d <rtems_signal_send+0x11>
11acee: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acf0: 9c pushf
11acf1: fa cli
11acf2: 58 pop %eax
*signal_set |= signals;
11acf3: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
11acf6: 50 push %eax
11acf7: 9d popf
11acf8: eb d3 jmp 11accd <rtems_signal_send+0x61>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
11acfa: c6 05 78 dc 14 00 01 movb $0x1,0x14dc78
11ad01: eb ca jmp 11accd <rtems_signal_send+0x61>
001128c8 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
1128c8: 55 push %ebp
1128c9: 57 push %edi
1128ca: 56 push %esi
1128cb: 53 push %ebx
1128cc: 83 ec 0c sub $0xc,%esp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
1128cf: 8b 4c 24 28 mov 0x28(%esp),%ecx
1128d3: 85 c9 test %ecx,%ecx
1128d5: 0f 84 25 01 00 00 je 112a00 <rtems_task_mode+0x138>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
1128db: 8b 35 6c f8 12 00 mov 0x12f86c,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
1128e1: 8b 9e e0 00 00 00 mov 0xe0(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
1128e7: 80 7e 70 01 cmpb $0x1,0x70(%esi)
1128eb: 19 ff sbb %edi,%edi
1128ed: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
1128f3: 8b 56 78 mov 0x78(%esi),%edx
1128f6: 85 d2 test %edx,%edx
1128f8: 0f 85 f6 00 00 00 jne 1129f4 <rtems_task_mode+0x12c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
1128fe: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
112902: 19 ed sbb %ebp,%ebp
112904: 81 e5 00 04 00 00 and $0x400,%ebp
old_mode |= _ISR_Get_level();
11290a: e8 1d c7 ff ff call 10f02c <_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;
11290f: 09 e8 or %ebp,%eax
old_mode |= _ISR_Get_level();
112911: 09 f8 or %edi,%eax
112913: 8b 54 24 28 mov 0x28(%esp),%edx
112917: 89 02 mov %eax,(%edx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
112919: f7 44 24 24 00 01 00 testl $0x100,0x24(%esp)
112920: 00
112921: 74 10 je 112933 <rtems_task_mode+0x6b>
112923: 8b 44 24 20 mov 0x20(%esp),%eax
112927: c1 e8 08 shr $0x8,%eax
11292a: 83 f0 01 xor $0x1,%eax
11292d: 83 e0 01 and $0x1,%eax
112930: 88 46 70 mov %al,0x70(%esi)
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
112933: f7 44 24 24 00 02 00 testl $0x200,0x24(%esp)
11293a: 00
11293b: 74 1d je 11295a <rtems_task_mode+0x92>
if ( _Modes_Is_timeslice(mode_set) ) {
11293d: f7 44 24 20 00 02 00 testl $0x200,0x20(%esp)
112944: 00
112945: 0f 84 c5 00 00 00 je 112a10 <rtems_task_mode+0x148>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
11294b: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
112952: a1 d8 f5 12 00 mov 0x12f5d8,%eax
112957: 89 46 74 mov %eax,0x74(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
11295a: f6 44 24 24 01 testb $0x1,0x24(%esp)
11295f: 74 0c je 11296d <rtems_task_mode+0xa5>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
112961: f6 44 24 20 01 testb $0x1,0x20(%esp)
112966: 0f 84 bc 00 00 00 je 112a28 <rtems_task_mode+0x160>
11296c: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
11296d: f7 44 24 24 00 04 00 testl $0x400,0x24(%esp)
112974: 00
112975: 74 41 je 1129b8 <rtems_task_mode+0xf0>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
112977: 8b 44 24 20 mov 0x20(%esp),%eax
11297b: c1 e8 0a shr $0xa,%eax
11297e: 83 f0 01 xor $0x1,%eax
112981: 83 e0 01 and $0x1,%eax
if ( is_asr_enabled != asr->is_enabled ) {
112984: 38 43 08 cmp %al,0x8(%ebx)
112987: 74 2f je 1129b8 <rtems_task_mode+0xf0>
asr->is_enabled = is_asr_enabled;
112989: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
11298c: 9c pushf
11298d: fa cli
11298e: 58 pop %eax
_signals = information->signals_pending;
11298f: 8b 4b 18 mov 0x18(%ebx),%ecx
information->signals_pending = information->signals_posted;
112992: 8b 53 14 mov 0x14(%ebx),%edx
112995: 89 53 18 mov %edx,0x18(%ebx)
information->signals_posted = _signals;
112998: 89 4b 14 mov %ecx,0x14(%ebx)
_ISR_Enable( _level );
11299b: 50 push %eax
11299c: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
11299d: 8b 43 14 mov 0x14(%ebx),%eax
1129a0: 85 c0 test %eax,%eax
1129a2: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1129a5: 83 3d 60 f7 12 00 03 cmpl $0x3,0x12f760
1129ac: 74 15 je 1129c3 <rtems_task_mode+0xfb> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
1129ae: 31 c0 xor %eax,%eax
}
1129b0: 83 c4 0c add $0xc,%esp
1129b3: 5b pop %ebx
1129b4: 5e pop %esi
1129b5: 5f pop %edi
1129b6: 5d pop %ebp
1129b7: c3 ret
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
1129b8: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1129ba: 83 3d 60 f7 12 00 03 cmpl $0x3,0x12f760
1129c1: 75 eb jne 1129ae <rtems_task_mode+0xe6>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
1129c3: 8b 15 6c f8 12 00 mov 0x12f86c,%edx
if ( are_signals_pending ||
1129c9: 84 c0 test %al,%al
1129cb: 75 0e jne 1129db <rtems_task_mode+0x113>
1129cd: 3b 15 70 f8 12 00 cmp 0x12f870,%edx
1129d3: 74 d9 je 1129ae <rtems_task_mode+0xe6>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
1129d5: 80 7a 70 00 cmpb $0x0,0x70(%edx)
1129d9: 74 d3 je 1129ae <rtems_task_mode+0xe6> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1129db: c6 05 78 f8 12 00 01 movb $0x1,0x12f878
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
1129e2: e8 5d b2 ff ff call 10dc44 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
1129e7: 31 c0 xor %eax,%eax
}
1129e9: 83 c4 0c add $0xc,%esp
1129ec: 5b pop %ebx
1129ed: 5e pop %esi
1129ee: 5f pop %edi
1129ef: 5d pop %ebp
1129f0: c3 ret
1129f1: 8d 76 00 lea 0x0(%esi),%esi
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
1129f4: 81 cf 00 02 00 00 or $0x200,%edi
1129fa: e9 ff fe ff ff jmp 1128fe <rtems_task_mode+0x36>
1129ff: 90 nop
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
112a00: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
112a05: 83 c4 0c add $0xc,%esp
112a08: 5b pop %ebx
112a09: 5e pop %esi
112a0a: 5f pop %edi
112a0b: 5d pop %ebp
112a0c: c3 ret
112a0d: 8d 76 00 lea 0x0(%esi),%esi
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
112a10: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112a17: f6 44 24 24 01 testb $0x1,0x24(%esp)
112a1c: 0f 84 4b ff ff ff je 11296d <rtems_task_mode+0xa5>
112a22: e9 3a ff ff ff jmp 112961 <rtems_task_mode+0x99>
112a27: 90 nop
112a28: fb sti
112a29: e9 3f ff ff ff jmp 11296d <rtems_task_mode+0xa5>
0010f99c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f99c: 53 push %ebx
10f99d: 83 ec 28 sub $0x28,%esp
10f9a0: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f9a4: 85 db test %ebx,%ebx
10f9a6: 74 0b je 10f9b3 <rtems_task_set_priority+0x17>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10f9a8: 0f b6 05 ac 01 13 00 movzbl 0x1301ac,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10f9af: 39 c3 cmp %eax,%ebx
10f9b1: 77 79 ja 10fa2c <rtems_task_set_priority+0x90>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10f9b3: 8b 44 24 38 mov 0x38(%esp),%eax
10f9b7: 85 c0 test %eax,%eax
10f9b9: 74 59 je 10fa14 <rtems_task_set_priority+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10f9bb: 8d 44 24 1c lea 0x1c(%esp),%eax
10f9bf: 89 44 24 04 mov %eax,0x4(%esp)
10f9c3: 8b 44 24 30 mov 0x30(%esp),%eax
10f9c7: 89 04 24 mov %eax,(%esp)
10f9ca: e8 f1 20 00 00 call 111ac0 <_Thread_Get>
switch ( location ) {
10f9cf: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10f9d3: 85 c9 test %ecx,%ecx
10f9d5: 75 49 jne 10fa20 <rtems_task_set_priority+0x84>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10f9d7: 8b 50 14 mov 0x14(%eax),%edx
10f9da: 8b 4c 24 38 mov 0x38(%esp),%ecx
10f9de: 89 11 mov %edx,(%ecx)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10f9e0: 85 db test %ebx,%ebx
10f9e2: 74 23 je 10fa07 <rtems_task_set_priority+0x6b>
the_thread->real_priority = new_priority;
10f9e4: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10f9e7: 8b 50 1c mov 0x1c(%eax),%edx
10f9ea: 85 d2 test %edx,%edx
10f9ec: 74 05 je 10f9f3 <rtems_task_set_priority+0x57>
10f9ee: 3b 58 14 cmp 0x14(%eax),%ebx
10f9f1: 73 14 jae 10fa07 <rtems_task_set_priority+0x6b><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10f9f3: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10f9fa: 00
10f9fb: 89 5c 24 04 mov %ebx,0x4(%esp)
10f9ff: 89 04 24 mov %eax,(%esp)
10fa02: e8 2d 1c 00 00 call 111634 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
10fa07: e8 94 20 00 00 call 111aa0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10fa0c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa0e: 83 c4 28 add $0x28,%esp
10fa11: 5b pop %ebx
10fa12: c3 ret
10fa13: 90 nop
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10fa14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa19: 83 c4 28 add $0x28,%esp
10fa1c: 5b pop %ebx
10fa1d: c3 ret
10fa1e: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10fa20: b8 04 00 00 00 mov $0x4,%eax
}
10fa25: 83 c4 28 add $0x28,%esp
10fa28: 5b pop %ebx
10fa29: c3 ret
10fa2a: 66 90 xchg %ax,%ax
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10fa2c: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa31: 83 c4 28 add $0x28,%esp
10fa34: 5b pop %ebx
10fa35: c3 ret
00107c60 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
107c60: 53 push %ebx
107c61: 83 ec 28 sub $0x28,%esp
107c64: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
107c68: 85 db test %ebx,%ebx
107c6a: 74 58 je 107cc4 <rtems_task_variable_delete+0x64>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
107c6c: 8d 44 24 1c lea 0x1c(%esp),%eax
107c70: 89 44 24 04 mov %eax,0x4(%esp)
107c74: 8b 44 24 30 mov 0x30(%esp),%eax
107c78: 89 04 24 mov %eax,(%esp)
107c7b: e8 50 1c 00 00 call 1098d0 <_Thread_Get>
switch (location) {
107c80: 8b 54 24 1c mov 0x1c(%esp),%edx
107c84: 85 d2 test %edx,%edx
107c86: 75 30 jne 107cb8 <rtems_task_variable_delete+0x58>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
107c88: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx
while (tvp) {
107c8e: 85 c9 test %ecx,%ecx
107c90: 74 17 je 107ca9 <rtems_task_variable_delete+0x49>
if (tvp->ptr == ptr) {
107c92: 39 59 04 cmp %ebx,0x4(%ecx)
107c95: 75 0c jne 107ca3 <rtems_task_variable_delete+0x43>
107c97: eb 50 jmp 107ce9 <rtems_task_variable_delete+0x89>
107c99: 8d 76 00 lea 0x0(%esi),%esi
107c9c: 39 5a 04 cmp %ebx,0x4(%edx)
107c9f: 74 2f je 107cd0 <rtems_task_variable_delete+0x70>
107ca1: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
107ca3: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
107ca5: 85 d2 test %edx,%edx
107ca7: 75 f3 jne 107c9c <rtems_task_variable_delete+0x3c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107ca9: e8 02 1c 00 00 call 1098b0 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107cae: b8 09 00 00 00 mov $0x9,%eax
107cb3: eb 08 jmp 107cbd <rtems_task_variable_delete+0x5d>
107cb5: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107cb8: b8 04 00 00 00 mov $0x4,%eax
}
107cbd: 83 c4 28 add $0x28,%esp
107cc0: 5b pop %ebx
107cc1: c3 ret
107cc2: 66 90 xchg %ax,%ax
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107cc4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107cc9: 83 c4 28 add $0x28,%esp
107ccc: 5b pop %ebx
107ccd: c3 ret
107cce: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
107cd0: 8b 1a mov (%edx),%ebx
107cd2: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
107cd4: 89 54 24 04 mov %edx,0x4(%esp)
107cd8: 89 04 24 mov %eax,(%esp)
107cdb: e8 98 00 00 00 call 107d78 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
107ce0: e8 cb 1b 00 00 call 1098b0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107ce5: 31 c0 xor %eax,%eax
107ce7: eb d4 jmp 107cbd <rtems_task_variable_delete+0x5d>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
107ce9: 8b 11 mov (%ecx),%edx
107ceb: 89 90 ec 00 00 00 mov %edx,0xec(%eax)
107cf1: 89 ca mov %ecx,%edx
107cf3: eb df jmp 107cd4 <rtems_task_variable_delete+0x74>
00107cf8 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
107cf8: 53 push %ebx
107cf9: 83 ec 28 sub $0x28,%esp
107cfc: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
107d00: 85 db test %ebx,%ebx
107d02: 74 50 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
107d04: 8b 4c 24 38 mov 0x38(%esp),%ecx
107d08: 85 c9 test %ecx,%ecx
107d0a: 74 48 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
107d0c: 8d 44 24 1c lea 0x1c(%esp),%eax
107d10: 89 44 24 04 mov %eax,0x4(%esp)
107d14: 8b 44 24 30 mov 0x30(%esp),%eax
107d18: 89 04 24 mov %eax,(%esp)
107d1b: e8 b0 1b 00 00 call 1098d0 <_Thread_Get>
switch (location) {
107d20: 8b 54 24 1c mov 0x1c(%esp),%edx
107d24: 85 d2 test %edx,%edx
107d26: 75 38 jne 107d60 <rtems_task_variable_get+0x68>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
107d28: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
while (tvp) {
107d2e: 85 c0 test %eax,%eax
107d30: 75 08 jne 107d3a <rtems_task_variable_get+0x42>
107d32: eb 38 jmp 107d6c <rtems_task_variable_get+0x74>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
107d34: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
107d36: 85 c0 test %eax,%eax
107d38: 74 32 je 107d6c <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
107d3a: 39 58 04 cmp %ebx,0x4(%eax)
107d3d: 75 f5 jne 107d34 <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
107d3f: 8b 40 0c mov 0xc(%eax),%eax
107d42: 8b 54 24 38 mov 0x38(%esp),%edx
107d46: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
107d48: e8 63 1b 00 00 call 1098b0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107d4d: 31 c0 xor %eax,%eax
107d4f: eb 08 jmp 107d59 <rtems_task_variable_get+0x61>
107d51: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107d54: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107d59: 83 c4 28 add $0x28,%esp
107d5c: 5b pop %ebx
107d5d: c3 ret
107d5e: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107d60: b8 04 00 00 00 mov $0x4,%eax
}
107d65: 83 c4 28 add $0x28,%esp
107d68: 5b pop %ebx
107d69: c3 ret
107d6a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107d6c: e8 3f 1b 00 00 call 1098b0 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107d71: b8 09 00 00 00 mov $0x9,%eax
107d76: eb e1 jmp 107d59 <rtems_task_variable_get+0x61>
0011b6b8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
11b6b8: 83 ec 2c sub $0x2c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
11b6bb: 8d 44 24 1c lea 0x1c(%esp),%eax
11b6bf: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
11b6c3: 8b 44 24 30 mov 0x30(%esp),%eax
11b6c7: 89 44 24 04 mov %eax,0x4(%esp)
11b6cb: c7 04 24 40 dd 14 00 movl $0x14dd40,(%esp)
11b6d2: e8 f9 2c 00 00 call 11e3d0 <_Objects_Get>
switch ( location ) {
11b6d7: 8b 54 24 1c mov 0x1c(%esp),%edx
11b6db: 85 d2 test %edx,%edx
11b6dd: 75 1d jne 11b6fc <rtems_timer_cancel+0x44>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
11b6df: 83 78 38 04 cmpl $0x4,0x38(%eax)
11b6e3: 74 0b je 11b6f0 <rtems_timer_cancel+0x38><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11b6e5: 83 c0 10 add $0x10,%eax
11b6e8: 89 04 24 mov %eax,(%esp)
11b6eb: e8 34 48 00 00 call 11ff24 <_Watchdog_Remove>
_Thread_Enable_dispatch();
11b6f0: e8 6f 39 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11b6f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11b6f7: 83 c4 2c add $0x2c,%esp
11b6fa: c3 ret
11b6fb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11b6fc: b8 04 00 00 00 mov $0x4,%eax
}
11b701: 83 c4 2c add $0x2c,%esp
11b704: c3 ret
0011bc38 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
11bc38: 57 push %edi
11bc39: 56 push %esi
11bc3a: 53 push %ebx
11bc3b: 83 ec 20 sub $0x20,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
11bc3e: 8b 1d 80 dd 14 00 mov 0x14dd80,%ebx
if ( !timer_server )
11bc44: 85 db test %ebx,%ebx
11bc46: 74 3c je 11bc84 <rtems_timer_server_fire_when+0x4c>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
11bc48: 80 3d d4 d9 14 00 00 cmpb $0x0,0x14d9d4
11bc4f: 75 0f jne 11bc60 <rtems_timer_server_fire_when+0x28><== ALWAYS TAKEN
return RTEMS_NOT_DEFINED;
11bc51: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc56: 83 c4 20 add $0x20,%esp
11bc59: 5b pop %ebx
11bc5a: 5e pop %esi
11bc5b: 5f pop %edi
11bc5c: c3 ret
11bc5d: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11bc60: 8b 54 24 38 mov 0x38(%esp),%edx
11bc64: 85 d2 test %edx,%edx
11bc66: 74 28 je 11bc90 <rtems_timer_server_fire_when+0x58>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11bc68: 8b 44 24 34 mov 0x34(%esp),%eax
11bc6c: 89 04 24 mov %eax,(%esp)
11bc6f: e8 98 cc ff ff call 11890c <_TOD_Validate>
11bc74: 84 c0 test %al,%al
11bc76: 75 24 jne 11bc9c <rtems_timer_server_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
11bc78: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc7d: 83 c4 20 add $0x20,%esp
11bc80: 5b pop %ebx
11bc81: 5e pop %esi
11bc82: 5f pop %edi
11bc83: c3 ret
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
11bc84: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc89: 83 c4 20 add $0x20,%esp
11bc8c: 5b pop %ebx
11bc8d: 5e pop %esi
11bc8e: 5f pop %edi
11bc8f: c3 ret
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
11bc90: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc95: 83 c4 20 add $0x20,%esp
11bc98: 5b pop %ebx
11bc99: 5e pop %esi
11bc9a: 5f pop %edi
11bc9b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
11bc9c: 8b 54 24 34 mov 0x34(%esp),%edx
11bca0: 89 14 24 mov %edx,(%esp)
11bca3: e8 d4 cb ff ff call 11887c <_TOD_To_seconds>
11bca8: 89 c6 mov %eax,%esi
11bcaa: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bcb1: 3b
11bcb2: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bcb9: 00
11bcba: a1 c0 d9 14 00 mov 0x14d9c0,%eax
11bcbf: 8b 15 c4 d9 14 00 mov 0x14d9c4,%edx
11bcc5: 89 04 24 mov %eax,(%esp)
11bcc8: 89 54 24 04 mov %edx,0x4(%esp)
11bccc: e8 73 43 01 00 call 130044 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
11bcd1: 39 c6 cmp %eax,%esi
11bcd3: 76 a3 jbe 11bc78 <rtems_timer_server_fire_when+0x40>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
11bcd5: 8d 44 24 1c lea 0x1c(%esp),%eax
11bcd9: 89 44 24 08 mov %eax,0x8(%esp)
11bcdd: 8b 54 24 30 mov 0x30(%esp),%edx
11bce1: 89 54 24 04 mov %edx,0x4(%esp)
11bce5: c7 04 24 40 dd 14 00 movl $0x14dd40,(%esp)
11bcec: e8 df 26 00 00 call 11e3d0 <_Objects_Get>
11bcf1: 89 c7 mov %eax,%edi
switch ( location ) {
11bcf3: 8b 44 24 1c mov 0x1c(%esp),%eax
11bcf7: 85 c0 test %eax,%eax
11bcf9: 75 70 jne 11bd6b <rtems_timer_server_fire_when+0x133>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11bcfb: 8d 47 10 lea 0x10(%edi),%eax
11bcfe: 89 04 24 mov %eax,(%esp)
11bd01: e8 1e 42 00 00 call 11ff24 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
11bd06: c7 47 38 03 00 00 00 movl $0x3,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11bd0d: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
11bd14: 8b 44 24 38 mov 0x38(%esp),%eax
11bd18: 89 47 2c mov %eax,0x2c(%edi)
the_watchdog->id = id;
11bd1b: 8b 54 24 30 mov 0x30(%esp),%edx
11bd1f: 89 57 30 mov %edx,0x30(%edi)
the_watchdog->user_data = user_data;
11bd22: 8b 44 24 3c mov 0x3c(%esp),%eax
11bd26: 89 47 34 mov %eax,0x34(%edi)
11bd29: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bd30: 3b
11bd31: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bd38: 00
11bd39: a1 c0 d9 14 00 mov 0x14d9c0,%eax
11bd3e: 8b 15 c4 d9 14 00 mov 0x14d9c4,%edx
11bd44: 89 04 24 mov %eax,(%esp)
11bd47: 89 54 24 04 mov %edx,0x4(%esp)
11bd4b: e8 f4 42 01 00 call 130044 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
11bd50: 29 c6 sub %eax,%esi
11bd52: 89 77 1c mov %esi,0x1c(%edi)
(*timer_server->schedule_operation)( timer_server, the_timer );
11bd55: 89 7c 24 04 mov %edi,0x4(%esp)
11bd59: 89 1c 24 mov %ebx,(%esp)
11bd5c: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
11bd5f: e8 00 33 00 00 call 11f064 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11bd64: 31 c0 xor %eax,%eax
11bd66: e9 eb fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11bd6b: b8 04 00 00 00 mov $0x4,%eax
11bd70: e9 e1 fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>