RTEMS 4.9.6Annotated Report
Sun Jul 24 20:38:00 2011
0010ac28 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10ac28: 55 push %ebp
10ac29: 89 e5 mov %esp,%ebp
10ac2b: 53 push %ebx
10ac2c: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10ac2f: 8b 1d b8 e8 11 00 mov 0x11e8b8,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac35: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac3b: 74 16 je 10ac53 <_API_extensions_Run_postdriver+0x2b><== NEVER TAKEN
10ac3d: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
10ac40: 8b 43 0c mov 0xc(%ebx),%eax
10ac43: 85 c0 test %eax,%eax
10ac45: 74 02 je 10ac49 <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN
(*the_extension->postdriver_hook)();
10ac47: ff d0 call *%eax
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10ac49: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac4b: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac51: 75 ed jne 10ac40 <_API_extensions_Run_postdriver+0x18><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
(*the_extension->postdriver_hook)();
}
}
10ac53: 5a pop %edx
10ac54: 5b pop %ebx
10ac55: c9 leave
10ac56: c3 ret
0010ac58 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10ac58: 55 push %ebp
10ac59: 89 e5 mov %esp,%ebp
10ac5b: 53 push %ebx
10ac5c: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10ac5f: 8b 1d b8 e8 11 00 mov 0x11e8b8,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac65: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac6b: 74 22 je 10ac8f <_API_extensions_Run_postswitch+0x37><== NEVER TAKEN
10ac6d: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
10ac70: 8b 43 10 mov 0x10(%ebx),%eax
10ac73: 85 c0 test %eax,%eax
10ac75: 74 0e je 10ac85 <_API_extensions_Run_postswitch+0x2d><== NEVER TAKEN
(*the_extension->postswitch_hook)( _Thread_Executing );
10ac77: 83 ec 0c sub $0xc,%esp
10ac7a: ff 35 1c e7 11 00 pushl 0x11e71c
10ac80: ff d0 call *%eax
10ac82: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10ac85: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac87: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac8d: 75 e1 jne 10ac70 <_API_extensions_Run_postswitch+0x18><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10ac8f: 8b 5d fc mov -0x4(%ebp),%ebx
10ac92: c9 leave
10ac93: c3 ret
0010abf8 <_API_extensions_Run_predriver>:
*
* _API_extensions_Run_predriver
*/
void _API_extensions_Run_predriver( void )
{
10abf8: 55 push %ebp
10abf9: 89 e5 mov %esp,%ebp
10abfb: 53 push %ebx
10abfc: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10abff: 8b 1d b8 e8 11 00 mov 0x11e8b8,%ebx
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac05: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac0b: 74 16 je 10ac23 <_API_extensions_Run_predriver+0x2b><== NEVER TAKEN
10ac0d: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
10ac10: 8b 43 08 mov 0x8(%ebx),%eax
10ac13: 85 c0 test %eax,%eax
10ac15: 74 02 je 10ac19 <_API_extensions_Run_predriver+0x21><== ALWAYS TAKEN
(*the_extension->predriver_hook)();
10ac17: ff d0 call *%eax <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10ac19: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
10ac1b: 81 fb bc e8 11 00 cmp $0x11e8bc,%ebx
10ac21: 75 ed jne 10ac10 <_API_extensions_Run_predriver+0x18><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
(*the_extension->predriver_hook)();
}
}
10ac23: 58 pop %eax
10ac24: 5b pop %ebx
10ac25: c9 leave
10ac26: c3 ret
0010bcc4 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
10bcc4: 55 push %ebp
10bcc5: 89 e5 mov %esp,%ebp
10bcc7: 57 push %edi
10bcc8: 56 push %esi
10bcc9: 53 push %ebx
10bcca: 83 ec 04 sub $0x4,%esp
10bccd: 8b 55 08 mov 0x8(%ebp),%edx
10bcd0: 8b 7d 0c mov 0xc(%ebp),%edi
10bcd3: 8b 75 14 mov 0x14(%ebp),%esi
10bcd6: 8b 45 18 mov 0x18(%ebp),%eax
10bcd9: 89 45 f0 mov %eax,-0x10(%ebp)
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
10bcdc: 8b 0d bc 17 12 00 mov 0x1217bc,%ecx
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
10bce2: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
10bce9: 9c pushf
10bcea: fa cli
10bceb: 5b pop %ebx
the_barrier->number_of_waiting_threads++;
10bcec: 8b 42 48 mov 0x48(%edx),%eax
10bcef: 40 inc %eax
10bcf0: 89 42 48 mov %eax,0x48(%edx)
if ( the_barrier->number_of_waiting_threads ==
10bcf3: 3b 42 44 cmp 0x44(%edx),%eax
10bcf6: 75 07 jne 10bcff <_CORE_barrier_Wait+0x3b>
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
10bcf8: 8b 42 40 mov 0x40(%edx),%eax
10bcfb: 85 c0 test %eax,%eax
10bcfd: 74 29 je 10bd28 <_CORE_barrier_Wait+0x64><== ALWAYS TAKEN
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10bcff: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
10bd06: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
10bd09: 89 79 20 mov %edi,0x20(%ecx)
_ISR_Enable( level );
10bd0c: 53 push %ebx
10bd0d: 9d popf
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
10bd0e: c7 45 10 7c da 10 00 movl $0x10da7c,0x10(%ebp)
10bd15: 89 75 0c mov %esi,0xc(%ebp)
10bd18: 89 55 08 mov %edx,0x8(%ebp)
}
10bd1b: 58 pop %eax
10bd1c: 5b pop %ebx
10bd1d: 5e pop %esi
10bd1e: 5f pop %edi
10bd1f: c9 leave
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
10bd20: e9 07 1a 00 00 jmp 10d72c <_Thread_queue_Enqueue_with_handler>
10bd25: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
10bd28: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx)
_ISR_Enable( level );
10bd2f: 53 push %ebx
10bd30: 9d popf
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10bd31: 8b 45 f0 mov -0x10(%ebp),%eax
10bd34: 89 45 10 mov %eax,0x10(%ebp)
10bd37: 89 7d 0c mov %edi,0xc(%ebp)
10bd3a: 89 55 08 mov %edx,0x8(%ebp)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
10bd3d: 5a pop %edx
10bd3e: 5b pop %ebx
10bd3f: 5e pop %esi
10bd40: 5f pop %edi
10bd41: c9 leave
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
10bd42: e9 4d ff ff ff jmp 10bc94 <_CORE_barrier_Release>
0011553c <_CORE_message_queue_Broadcast>:
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
11553c: 55 push %ebp
11553d: 89 e5 mov %esp,%ebp
11553f: 57 push %edi
115540: 56 push %esi
115541: 53 push %ebx
115542: 83 ec 0c sub $0xc,%esp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
115545: 8b 55 10 mov 0x10(%ebp),%edx
115548: 8b 45 08 mov 0x8(%ebp),%eax
11554b: 39 50 4c cmp %edx,0x4c(%eax)
11554e: 72 58 jb 1155a8 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
115550: 8b 75 08 mov 0x8(%ebp),%esi
115553: 8b 46 48 mov 0x48(%esi),%eax
115556: 85 c0 test %eax,%eax
115558: 75 3a jne 115594 <_CORE_message_queue_Broadcast+0x58><== NEVER TAKEN
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
11555a: 31 db xor %ebx,%ebx
11555c: eb 16 jmp 115574 <_CORE_message_queue_Broadcast+0x38>
11555e: 66 90 xchg %ax,%ax
waitp = &the_thread->Wait;
number_broadcasted += 1;
115560: 43 inc %ebx
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
115561: 8b 78 2c mov 0x2c(%eax),%edi
115564: 8b 75 0c mov 0xc(%ebp),%esi
115567: 8b 4d 10 mov 0x10(%ebp),%ecx
11556a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
11556c: 8b 40 28 mov 0x28(%eax),%eax
11556f: 8b 55 10 mov 0x10(%ebp),%edx
115572: 89 10 mov %edx,(%eax)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
115574: 83 ec 0c sub $0xc,%esp
115577: ff 75 08 pushl 0x8(%ebp)
11557a: e8 29 22 00 00 call 1177a8 <_Thread_queue_Dequeue>
11557f: 83 c4 10 add $0x10,%esp
115582: 85 c0 test %eax,%eax
115584: 75 da jne 115560 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
115586: 8b 75 1c mov 0x1c(%ebp),%esi
115589: 89 1e mov %ebx,(%esi)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11558b: 8d 65 f4 lea -0xc(%ebp),%esp
11558e: 5b pop %ebx
11558f: 5e pop %esi
115590: 5f pop %edi
115591: c9 leave
115592: c3 ret
115593: 90 nop
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
115594: 8b 45 1c mov 0x1c(%ebp),%eax <== NOT EXECUTED
115597: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
11559d: 31 c0 xor %eax,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11559f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1155a2: 5b pop %ebx <== NOT EXECUTED
1155a3: 5e pop %esi <== NOT EXECUTED
1155a4: 5f pop %edi <== NOT EXECUTED
1155a5: c9 leave <== NOT EXECUTED
1155a6: c3 ret <== NOT EXECUTED
1155a7: 90 nop <== NOT EXECUTED
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1155a8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
1155ad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1155b0: 5b pop %ebx <== NOT EXECUTED
1155b1: 5e pop %esi <== NOT EXECUTED
1155b2: 5f pop %edi <== NOT EXECUTED
1155b3: c9 leave <== NOT EXECUTED
1155b4: c3 ret <== NOT EXECUTED
001155f4 <_CORE_message_queue_Flush>:
*/
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
1155f4: 55 push %ebp
1155f5: 89 e5 mov %esp,%ebp
1155f7: 8b 45 08 mov 0x8(%ebp),%eax
if ( the_message_queue->number_of_pending_messages != 0 )
1155fa: 8b 50 48 mov 0x48(%eax),%edx
1155fd: 85 d2 test %edx,%edx
1155ff: 75 07 jne 115608 <_CORE_message_queue_Flush+0x14>
return _CORE_message_queue_Flush_support( the_message_queue );
else
return 0;
}
115601: 31 c0 xor %eax,%eax
115603: c9 leave
115604: c3 ret
115605: 8d 76 00 lea 0x0(%esi),%esi
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
if ( the_message_queue->number_of_pending_messages != 0 )
return _CORE_message_queue_Flush_support( the_message_queue );
115608: 89 45 08 mov %eax,0x8(%ebp)
else
return 0;
}
11560b: c9 leave
uint32_t _CORE_message_queue_Flush(
CORE_message_queue_Control *the_message_queue
)
{
if ( the_message_queue->number_of_pending_messages != 0 )
return _CORE_message_queue_Flush_support( the_message_queue );
11560c: e9 03 00 00 00 jmp 115614 <_CORE_message_queue_Flush_support>
0011565c <_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
)
{
11565c: 55 push %ebp
11565d: 89 e5 mov %esp,%ebp
11565f: 57 push %edi
115660: 56 push %esi
115661: 53 push %ebx
115662: 83 ec 0c sub $0xc,%esp
115665: 8b 5d 08 mov 0x8(%ebp),%ebx
115668: 8b 7d 10 mov 0x10(%ebp),%edi
11566b: 8b 55 14 mov 0x14(%ebp),%edx
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
11566e: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
115671: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
115678: 89 53 4c mov %edx,0x4c(%ebx)
11567b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
115682: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
115689: f6 c2 03 test $0x3,%dl
11568c: 75 1a jne 1156a8 <_CORE_message_queue_Initialize+0x4c>
11568e: 89 d0 mov %edx,%eax
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
115690: 8d 70 14 lea 0x14(%eax),%esi
115693: 89 f2 mov %esi,%edx
115695: 0f af d7 imul %edi,%edx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
115698: 39 c2 cmp %eax,%edx
11569a: 73 18 jae 1156b4 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
11569c: 31 c0 xor %eax,%eax
}
11569e: 8d 65 f4 lea -0xc(%ebp),%esp
1156a1: 5b pop %ebx
1156a2: 5e pop %esi
1156a3: 5f pop %edi
1156a4: c9 leave
1156a5: c3 ret
1156a6: 66 90 xchg %ax,%ax
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
1156a8: 8d 42 04 lea 0x4(%edx),%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
1156ab: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
1156ae: 39 c2 cmp %eax,%edx
1156b0: 77 ea ja 11569c <_CORE_message_queue_Initialize+0x40><== NEVER TAKEN
1156b2: eb dc jmp 115690 <_CORE_message_queue_Initialize+0x34>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
1156b4: 83 ec 0c sub $0xc,%esp
1156b7: 52 push %edx
1156b8: e8 53 32 00 00 call 118910 <_Workspace_Allocate>
1156bd: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
1156c0: 83 c4 10 add $0x10,%esp
1156c3: 85 c0 test %eax,%eax
1156c5: 74 d5 je 11569c <_CORE_message_queue_Initialize+0x40>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
1156c7: 56 push %esi
1156c8: 57 push %edi
1156c9: 50 push %eax
1156ca: 8d 43 68 lea 0x68(%ebx),%eax
1156cd: 50 push %eax
1156ce: e8 1d fe ff ff call 1154f0 <_Chain_Initialize>
1156d3: 8d 43 54 lea 0x54(%ebx),%eax
1156d6: 89 43 50 mov %eax,0x50(%ebx)
1156d9: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
1156e0: 8d 43 50 lea 0x50(%ebx),%eax
1156e3: 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(
1156e6: 6a 06 push $0x6
1156e8: 68 80 00 00 00 push $0x80
1156ed: 8b 45 0c mov 0xc(%ebp),%eax
1156f0: 83 38 01 cmpl $0x1,(%eax)
1156f3: 0f 94 c0 sete %al
1156f6: 0f b6 c0 movzbl %al,%eax
1156f9: 50 push %eax
1156fa: 53 push %ebx
1156fb: e8 58 24 00 00 call 117b58 <_Thread_queue_Initialize>
115700: b0 01 mov $0x1,%al
115702: 83 c4 20 add $0x20,%esp
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
115705: 8d 65 f4 lea -0xc(%ebp),%esp
115708: 5b pop %ebx
115709: 5e pop %esi
11570a: 5f pop %edi
11570b: c9 leave
11570c: c3 ret
0010f0a8 <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
10f0a8: 55 push %ebp
10f0a9: 89 e5 mov %esp,%ebp
10f0ab: 57 push %edi
10f0ac: 56 push %esi
10f0ad: 53 push %ebx
10f0ae: 83 ec 04 sub $0x4,%esp
10f0b1: 8b 75 08 mov 0x8(%ebp),%esi
10f0b4: 8b 7d 0c mov 0xc(%ebp),%edi
10f0b7: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
10f0ba: 89 47 08 mov %eax,0x8(%edi)
switch ( submit_type ) {
10f0bd: 3d 00 00 00 80 cmp $0x80000000,%eax
10f0c2: 0f 84 94 00 00 00 je 10f15c <_CORE_message_queue_Insert_message+0xb4>
10f0c8: 3d ff ff ff 7f cmp $0x7fffffff,%eax
10f0cd: 74 65 je 10f134 <_CORE_message_queue_Insert_message+0x8c><== ALWAYS TAKEN
CORE_message_queue_Buffer_control *this_message;
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
10f0cf: 8b 5e 50 mov 0x50(%esi),%ebx <== NOT EXECUTED
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10f0d2: 8d 56 54 lea 0x54(%esi),%edx <== NOT EXECUTED
while ( !_Chain_Is_tail( the_header, the_node ) ) {
10f0d5: 39 da cmp %ebx,%edx <== NOT EXECUTED
10f0d7: 75 49 jne 10f122 <_CORE_message_queue_Insert_message+0x7a><== NOT EXECUTED
10f0d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10f0dc: 89 d3 mov %edx,%ebx <== NOT EXECUTED
continue;
}
break;
}
_ISR_Disable( level );
10f0de: 9c pushf <== NOT EXECUTED
10f0df: fa cli <== NOT EXECUTED
10f0e0: 59 pop %ecx <== NOT EXECUTED
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f0e1: 8b 56 48 mov 0x48(%esi),%edx <== NOT EXECUTED
10f0e4: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED
10f0e7: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED
10f0ea: 85 d2 test %edx,%edx <== NOT EXECUTED
10f0ec: 0f 94 45 f3 sete -0xd(%ebp) <== NOT EXECUTED
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
10f0f0: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED
10f0f3: 89 47 04 mov %eax,0x4(%edi) <== NOT EXECUTED
10f0f6: 8b 10 mov (%eax),%edx <== NOT EXECUTED
10f0f8: 89 38 mov %edi,(%eax) <== NOT EXECUTED
10f0fa: 89 17 mov %edx,(%edi) <== NOT EXECUTED
10f0fc: 89 7a 04 mov %edi,0x4(%edx) <== NOT EXECUTED
_ISR_Enable( level );
10f0ff: 51 push %ecx <== NOT EXECUTED
10f100: 9d popf <== NOT EXECUTED
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
10f101: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10f105: 74 25 je 10f12c <_CORE_message_queue_Insert_message+0x84>
10f107: 8b 4e 60 mov 0x60(%esi),%ecx
10f10a: 85 c9 test %ecx,%ecx
10f10c: 74 1e je 10f12c <_CORE_message_queue_Insert_message+0x84><== ALWAYS TAKEN
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
10f10e: 8b 46 64 mov 0x64(%esi),%eax <== NOT EXECUTED
10f111: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10f114: 5a pop %edx <== NOT EXECUTED
10f115: 5b pop %ebx <== NOT EXECUTED
10f116: 5e pop %esi <== NOT EXECUTED
10f117: 5f pop %edi <== NOT EXECUTED
10f118: c9 leave <== NOT EXECUTED
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
10f119: ff e1 jmp *%ecx <== NOT EXECUTED
10f11b: 90 nop <== NOT EXECUTED
while ( !_Chain_Is_tail( the_header, the_node ) ) {
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
the_node = the_node->next;
10f11c: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
10f11e: 39 da cmp %ebx,%edx <== NOT EXECUTED
10f120: 74 ba je 10f0dc <_CORE_message_queue_Insert_message+0x34><== NOT EXECUTED
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
10f122: 3b 43 08 cmp 0x8(%ebx),%eax <== NOT EXECUTED
10f125: 7d f5 jge 10f11c <_CORE_message_queue_Insert_message+0x74><== NOT EXECUTED
10f127: eb b5 jmp 10f0de <_CORE_message_queue_Insert_message+0x36><== NOT EXECUTED
10f129: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
}
10f12c: 58 pop %eax
10f12d: 5b pop %ebx
10f12e: 5e pop %esi
10f12f: 5f pop %edi
10f130: c9 leave
10f131: c3 ret
10f132: 66 90 xchg %ax,%ax
the_message->priority = submit_type;
switch ( submit_type ) {
case CORE_MESSAGE_QUEUE_SEND_REQUEST:
_ISR_Disable( level );
10f134: 9c pushf
10f135: fa cli
10f136: 59 pop %ecx
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f137: 8b 56 48 mov 0x48(%esi),%edx
10f13a: 8d 42 01 lea 0x1(%edx),%eax
10f13d: 89 46 48 mov %eax,0x48(%esi)
10f140: 85 d2 test %edx,%edx
10f142: 0f 94 45 f3 sete -0xd(%ebp)
10f146: 8d 46 54 lea 0x54(%esi),%eax
10f149: 89 07 mov %eax,(%edi)
10f14b: 8b 46 58 mov 0x58(%esi),%eax
10f14e: 89 7e 58 mov %edi,0x58(%esi)
10f151: 89 38 mov %edi,(%eax)
10f153: 89 47 04 mov %eax,0x4(%edi)
notify = true;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
10f156: 51 push %ecx
10f157: 9d popf
10f158: eb a7 jmp 10f101 <_CORE_message_queue_Insert_message+0x59>
10f15a: 66 90 xchg %ax,%ax
break;
case CORE_MESSAGE_QUEUE_URGENT_REQUEST:
_ISR_Disable( level );
10f15c: 9c pushf
10f15d: fa cli
10f15e: 59 pop %ecx
if ( the_message_queue->number_of_pending_messages++ == 0 )
10f15f: 8b 56 48 mov 0x48(%esi),%edx
10f162: 8d 42 01 lea 0x1(%edx),%eax
10f165: 89 46 48 mov %eax,0x48(%esi)
10f168: 85 d2 test %edx,%edx
10f16a: 0f 94 45 f3 sete -0xd(%ebp)
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10f16e: 8d 46 50 lea 0x50(%esi),%eax
10f171: 89 47 04 mov %eax,0x4(%edi)
10f174: 8b 46 50 mov 0x50(%esi),%eax
10f177: 89 7e 50 mov %edi,0x50(%esi)
10f17a: 89 07 mov %eax,(%edi)
10f17c: 89 78 04 mov %edi,0x4(%eax)
notify = true;
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
10f17f: 51 push %ecx
10f180: 9d popf
10f181: e9 7b ff ff ff jmp 10f101 <_CORE_message_queue_Insert_message+0x59>
00115710 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
115710: 55 push %ebp
115711: 89 e5 mov %esp,%ebp
115713: 57 push %edi
115714: 56 push %esi
115715: 53 push %ebx
115716: 83 ec 1c sub $0x1c,%esp
115719: 8b 45 08 mov 0x8(%ebp),%eax
11571c: 89 45 f0 mov %eax,-0x10(%ebp)
11571f: 8b 7d 0c mov 0xc(%ebp),%edi
115722: 8b 45 10 mov 0x10(%ebp),%eax
115725: 89 45 ec mov %eax,-0x14(%ebp)
115728: 8b 4d 14 mov 0x14(%ebp),%ecx
11572b: 8b 45 1c mov 0x1c(%ebp),%eax
11572e: 89 45 e4 mov %eax,-0x1c(%ebp)
115731: 8a 45 18 mov 0x18(%ebp),%al
115734: 88 45 eb mov %al,-0x15(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
115737: 8b 15 fc 5a 13 00 mov 0x135afc,%edx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
11573d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
115744: 9c pushf
115745: fa cli
115746: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
115747: 8b 45 f0 mov -0x10(%ebp),%eax
11574a: 8b 58 50 mov 0x50(%eax),%ebx
11574d: 83 c0 54 add $0x54,%eax
115750: 39 c3 cmp %eax,%ebx
115752: 74 7c je 1157d0 <_CORE_message_queue_Seize+0xc0>
115754: 8b 13 mov (%ebx),%edx
115756: 8b 7d f0 mov -0x10(%ebp),%edi
115759: 89 57 50 mov %edx,0x50(%edi)
11575c: 89 f8 mov %edi,%eax
11575e: 83 c0 50 add $0x50,%eax
115761: 89 42 04 mov %eax,0x4(%edx)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
115764: ff 4f 48 decl 0x48(%edi)
_ISR_Enable( level );
115767: 56 push %esi
115768: 9d popf
*size_p = the_message->Contents.size;
115769: 8b 43 0c mov 0xc(%ebx),%eax
11576c: 89 01 mov %eax,(%ecx)
_Thread_Executing->Wait.count = the_message->priority;
11576e: 8b 53 08 mov 0x8(%ebx),%edx
115771: a1 fc 5a 13 00 mov 0x135afc,%eax
115776: 89 50 24 mov %edx,0x24(%eax)
_CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p);
115779: 8d 43 10 lea 0x10(%ebx),%eax
11577c: 89 45 d8 mov %eax,-0x28(%ebp)
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
11577f: 8b 09 mov (%ecx),%ecx
115781: 8b 7d ec mov -0x14(%ebp),%edi
115784: 89 c6 mov %eax,%esi
115786: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
115788: 83 ec 0c sub $0xc,%esp
11578b: ff 75 f0 pushl -0x10(%ebp)
11578e: e8 15 20 00 00 call 1177a8 <_Thread_queue_Dequeue>
115793: 89 c2 mov %eax,%edx
if ( !the_thread ) {
115795: 83 c4 10 add $0x10,%esp
115798: 85 c0 test %eax,%eax
11579a: 0f 84 84 00 00 00 je 115824 <_CORE_message_queue_Seize+0x114><== ALWAYS TAKEN
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
1157a0: 8b 40 24 mov 0x24(%eax),%eax <== NOT EXECUTED
1157a3: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED
the_message->Contents.size = (size_t) the_thread->Wait.option;
1157a6: 8b 4a 30 mov 0x30(%edx),%ecx <== NOT EXECUTED
1157a9: 89 4b 0c mov %ecx,0xc(%ebx) <== NOT EXECUTED
1157ac: 8b 72 2c mov 0x2c(%edx),%esi <== NOT EXECUTED
1157af: 8b 7d d8 mov -0x28(%ebp),%edi <== NOT EXECUTED
1157b2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
1157b4: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED
1157b7: 89 45 10 mov %eax,0x10(%ebp) <== NOT EXECUTED
1157ba: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED
1157bd: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
1157c0: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1157c3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1157c6: 5b pop %ebx <== NOT EXECUTED
1157c7: 5e pop %esi <== NOT EXECUTED
1157c8: 5f pop %edi <== NOT EXECUTED
1157c9: c9 leave <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
1157ca: e9 29 4e 00 00 jmp 11a5f8 <_CORE_message_queue_Insert_message><== NOT EXECUTED
1157cf: 90 nop <== NOT EXECUTED
the_message->priority
);
return;
}
if ( !wait ) {
1157d0: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
1157d4: 75 12 jne 1157e8 <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
1157d6: 56 push %esi
1157d7: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
1157d8: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1157df: 8d 65 f4 lea -0xc(%ebp),%esp
1157e2: 5b pop %ebx
1157e3: 5e pop %esi
1157e4: 5f pop %edi
1157e5: c9 leave
1157e6: c3 ret
1157e7: 90 nop
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
1157e8: 8b 45 f0 mov -0x10(%ebp),%eax
1157eb: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
1157f2: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
1157f5: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.return_argument_second.mutable_object = buffer;
1157f8: 8b 7d ec mov -0x14(%ebp),%edi
1157fb: 89 7a 2c mov %edi,0x2c(%edx)
executing->Wait.return_argument = size_p;
1157fe: 89 4a 28 mov %ecx,0x28(%edx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
115801: 56 push %esi
115802: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
115803: c7 45 10 34 7c 11 00 movl $0x117c34,0x10(%ebp)
11580a: 8b 45 e4 mov -0x1c(%ebp),%eax
11580d: 89 45 0c mov %eax,0xc(%ebp)
115810: 8b 7d f0 mov -0x10(%ebp),%edi
115813: 89 7d 08 mov %edi,0x8(%ebp)
}
115816: 8d 65 f4 lea -0xc(%ebp),%esp
115819: 5b pop %ebx
11581a: 5e pop %esi
11581b: 5f pop %edi
11581c: c9 leave
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
11581d: e9 c2 20 00 00 jmp 1178e4 <_Thread_queue_Enqueue_with_handler>
115822: 66 90 xchg %ax,%ax
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
void *starting_address,
size_t *size
115824: 89 5d 0c mov %ebx,0xc(%ebp)
115827: 8b 45 f0 mov -0x10(%ebp),%eax
11582a: 83 c0 68 add $0x68,%eax
11582d: 89 45 08 mov %eax,0x8(%ebp)
}
115830: 8d 65 f4 lea -0xc(%ebp),%esp
115833: 5b pop %ebx
115834: 5e pop %esi
115835: 5f pop %edi
115836: c9 leave
115837: e9 68 fc ff ff jmp 1154a4 <_Chain_Append>
0010adc8 <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10adc8: 55 push %ebp
10adc9: 89 e5 mov %esp,%ebp
10adcb: 57 push %edi
10adcc: 56 push %esi
10adcd: 53 push %ebx
10adce: 83 ec 1c sub $0x1c,%esp
10add1: 8b 5d 08 mov 0x8(%ebp),%ebx
10add4: 8a 45 20 mov 0x20(%ebp),%al
10add7: 88 45 f3 mov %al,-0xd(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10adda: 8b 55 10 mov 0x10(%ebp),%edx
10addd: 39 53 4c cmp %edx,0x4c(%ebx)
10ade0: 72 6e jb 10ae50 <_CORE_message_queue_Submit+0x88>
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10ade2: 8b 43 48 mov 0x48(%ebx),%eax
10ade5: 85 c0 test %eax,%eax
10ade7: 74 77 je 10ae60 <_CORE_message_queue_Submit+0x98>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
10ade9: 39 43 44 cmp %eax,0x44(%ebx)
10adec: 0f 87 be 00 00 00 ja 10aeb0 <_CORE_message_queue_Submit+0xe8>
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10adf2: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10adf6: 0f 84 9c 00 00 00 je 10ae98 <_CORE_message_queue_Submit+0xd0><== ALWAYS TAKEN
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
10adfc: a1 f8 e6 11 00 mov 0x11e6f8,%eax <== NOT EXECUTED
10ae01: 85 c0 test %eax,%eax <== NOT EXECUTED
10ae03: 0f 85 97 00 00 00 jne 10aea0 <_CORE_message_queue_Submit+0xd8><== NOT EXECUTED
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
10ae09: a1 1c e7 11 00 mov 0x11e71c,%eax <== NOT EXECUTED
_ISR_Disable( level );
10ae0e: 9c pushf <== NOT EXECUTED
10ae0f: fa cli <== NOT EXECUTED
10ae10: 5a pop %edx <== NOT EXECUTED
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10ae11: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) <== NOT EXECUTED
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10ae18: 89 58 44 mov %ebx,0x44(%eax) <== NOT EXECUTED
executing->Wait.id = id;
10ae1b: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED
10ae1e: 89 70 20 mov %esi,0x20(%eax) <== NOT EXECUTED
executing->Wait.return_argument_second.immutable_object = buffer;
10ae21: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10ae24: 89 48 2c mov %ecx,0x2c(%eax) <== NOT EXECUTED
executing->Wait.option = (uint32_t) size;
10ae27: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED
10ae2a: 89 70 30 mov %esi,0x30(%eax) <== NOT EXECUTED
executing->Wait.count = submit_type;
10ae2d: 8b 4d 1c mov 0x1c(%ebp),%ecx <== NOT EXECUTED
10ae30: 89 48 24 mov %ecx,0x24(%eax) <== NOT EXECUTED
_ISR_Enable( level );
10ae33: 52 push %edx <== NOT EXECUTED
10ae34: 9d popf <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10ae35: 50 push %eax <== NOT EXECUTED
10ae36: 68 fc ca 10 00 push $0x10cafc <== NOT EXECUTED
10ae3b: ff 75 24 pushl 0x24(%ebp) <== NOT EXECUTED
10ae3e: 53 push %ebx <== NOT EXECUTED
10ae3f: e8 68 19 00 00 call 10c7ac <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED
10ae44: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED
10ae49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ae4c: eb 07 jmp 10ae55 <_CORE_message_queue_Submit+0x8d><== NOT EXECUTED
10ae4e: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10ae50: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
}
10ae55: 8d 65 f4 lea -0xc(%ebp),%esp
10ae58: 5b pop %ebx
10ae59: 5e pop %esi
10ae5a: 5f pop %edi
10ae5b: c9 leave
10ae5c: c3 ret
10ae5d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10ae60: 83 ec 0c sub $0xc,%esp
10ae63: 53 push %ebx
10ae64: e8 07 18 00 00 call 10c670 <_Thread_queue_Dequeue>
10ae69: 89 c2 mov %eax,%edx
if ( the_thread ) {
10ae6b: 83 c4 10 add $0x10,%esp
10ae6e: 85 c0 test %eax,%eax
10ae70: 74 7e je 10aef0 <_CORE_message_queue_Submit+0x128>
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10ae72: 8b 78 2c mov 0x2c(%eax),%edi
10ae75: 8b 75 0c mov 0xc(%ebp),%esi
10ae78: 8b 4d 10 mov 0x10(%ebp),%ecx
10ae7b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10ae7d: 8b 40 28 mov 0x28(%eax),%eax
10ae80: 8b 4d 10 mov 0x10(%ebp),%ecx
10ae83: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = submit_type;
10ae85: 8b 75 1c mov 0x1c(%ebp),%esi
10ae88: 89 72 24 mov %esi,0x24(%edx)
10ae8b: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
}
10ae8d: 8d 65 f4 lea -0xc(%ebp),%esp
10ae90: 5b pop %ebx
10ae91: 5e pop %esi
10ae92: 5f pop %edi
10ae93: c9 leave
10ae94: c3 ret
10ae95: 8d 76 00 lea 0x0(%esi),%esi
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10ae98: b8 02 00 00 00 mov $0x2,%eax
10ae9d: eb b6 jmp 10ae55 <_CORE_message_queue_Submit+0x8d>
10ae9f: 90 nop
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10aea0: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
}
10aea5: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aea8: 5b pop %ebx <== NOT EXECUTED
10aea9: 5e pop %esi <== NOT EXECUTED
10aeaa: 5f pop %edi <== NOT EXECUTED
10aeab: c9 leave <== NOT EXECUTED
10aeac: c3 ret <== NOT EXECUTED
10aead: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
);
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
10aeb0: 83 ec 0c sub $0xc,%esp
10aeb3: 8d 43 68 lea 0x68(%ebx),%eax
10aeb6: 50 push %eax
10aeb7: e8 e4 fe ff ff call 10ada0 <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
10aebc: 83 c4 10 add $0x10,%esp
10aebf: 85 c0 test %eax,%eax
10aec1: 74 dd je 10aea0 <_CORE_message_queue_Submit+0xd8><== NEVER TAKEN
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10aec3: 8d 78 10 lea 0x10(%eax),%edi
10aec6: 8b 75 0c mov 0xc(%ebp),%esi
10aec9: 8b 4d 10 mov 0x10(%ebp),%ecx
10aecc: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
10aece: 8b 55 10 mov 0x10(%ebp),%edx
10aed1: 89 50 0c mov %edx,0xc(%eax)
the_message->priority = submit_type;
10aed4: 8b 4d 1c mov 0x1c(%ebp),%ecx
10aed7: 89 48 08 mov %ecx,0x8(%eax)
_CORE_message_queue_Insert_message(
10aeda: 52 push %edx
10aedb: 51 push %ecx
10aedc: 50 push %eax
10aedd: 53 push %ebx
10aede: e8 c5 41 00 00 call 10f0a8 <_CORE_message_queue_Insert_message>
10aee3: 31 c0 xor %eax,%eax
10aee5: 83 c4 10 add $0x10,%esp
10aee8: e9 68 ff ff ff jmp 10ae55 <_CORE_message_queue_Submit+0x8d>
10aeed: 8d 76 00 lea 0x0(%esi),%esi
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
10aef0: 8b 43 48 mov 0x48(%ebx),%eax
10aef3: e9 f1 fe ff ff jmp 10ade9 <_CORE_message_queue_Submit+0x21>
0010af04 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10af04: 55 push %ebp
10af05: 89 e5 mov %esp,%ebp
10af07: 57 push %edi
10af08: 56 push %esi
10af09: 83 ec 10 sub $0x10,%esp
10af0c: 8b 55 08 mov 0x8(%ebp),%edx
10af0f: 8b 45 10 mov 0x10(%ebp),%eax
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
10af12: 8d 7a 40 lea 0x40(%edx),%edi
10af15: b9 04 00 00 00 mov $0x4,%ecx
10af1a: 8b 75 0c mov 0xc(%ebp),%esi
10af1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10af1f: 89 42 50 mov %eax,0x50(%edx)
the_mutex->blocked_count = 0;
10af22: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10af29: 85 c0 test %eax,%eax
10af2b: 75 33 jne 10af60 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10af2d: c7 42 54 01 00 00 00 movl $0x1,0x54(%edx)
the_mutex->holder = _Thread_Executing;
10af34: 8b 0d 1c e7 11 00 mov 0x11e71c,%ecx
10af3a: 89 4a 5c mov %ecx,0x5c(%edx)
the_mutex->holder_id = _Thread_Executing->Object.id;
10af3d: 8b 41 08 mov 0x8(%ecx),%eax
10af40: 89 42 60 mov %eax,0x60(%edx)
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10af43: 8b 42 48 mov 0x48(%edx),%eax
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10af46: 83 f8 02 cmp $0x2,%eax
10af49: 74 05 je 10af50 <_CORE_mutex_Initialize+0x4c>
10af4b: 83 f8 03 cmp $0x3,%eax
10af4e: 75 25 jne 10af75 <_CORE_mutex_Initialize+0x71><== ALWAYS TAKEN
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10af50: 8b 41 14 mov 0x14(%ecx),%eax
10af53: 3b 42 4c cmp 0x4c(%edx),%eax
10af56: 72 48 jb 10afa0 <_CORE_mutex_Initialize+0x9c><== NEVER TAKEN
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10af58: ff 41 1c incl 0x1c(%ecx)
10af5b: eb 18 jmp 10af75 <_CORE_mutex_Initialize+0x71>
10af5d: 8d 76 00 lea 0x0(%esi),%esi
}
} else {
the_mutex->nest_count = 0;
10af60: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
the_mutex->holder = NULL;
10af67: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
the_mutex->holder_id = 0;
10af6e: c7 42 60 00 00 00 00 movl $0x0,0x60(%edx)
}
_Thread_queue_Initialize(
10af75: 6a 05 push $0x5
10af77: 68 00 04 00 00 push $0x400
10af7c: 8b 45 0c mov 0xc(%ebp),%eax
10af7f: 8b 40 08 mov 0x8(%eax),%eax
10af82: 85 c0 test %eax,%eax
10af84: 0f 95 c0 setne %al
10af87: 0f b6 c0 movzbl %al,%eax
10af8a: 50 push %eax
10af8b: 52 push %edx
10af8c: e8 8f 1a 00 00 call 10ca20 <_Thread_queue_Initialize>
10af91: 31 c0 xor %eax,%eax
10af93: 83 c4 10 add $0x10,%esp
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10af96: 8d 65 f8 lea -0x8(%ebp),%esp
10af99: 5e pop %esi
10af9a: 5f pop %edi
10af9b: c9 leave
10af9c: c3 ret
10af9d: 8d 76 00 lea 0x0(%esi),%esi
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10afa0: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10afa5: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10afa8: 5e pop %esi <== NOT EXECUTED
10afa9: 5f pop %edi <== NOT EXECUTED
10afaa: c9 leave <== NOT EXECUTED
10afab: c3 ret <== NOT EXECUTED
0010affc <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10affc: 55 push %ebp
10affd: 89 e5 mov %esp,%ebp
10afff: 56 push %esi
10b000: 53 push %ebx
10b001: 8b 75 08 mov 0x8(%ebp),%esi
10b004: 8a 5d 10 mov 0x10(%ebp),%bl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10b007: a1 58 e6 11 00 mov 0x11e658,%eax
10b00c: 85 c0 test %eax,%eax
10b00e: 74 04 je 10b014 <_CORE_mutex_Seize+0x18>
10b010: 84 db test %bl,%bl
10b012: 75 30 jne 10b044 <_CORE_mutex_Seize+0x48><== ALWAYS TAKEN
10b014: 83 ec 08 sub $0x8,%esp
10b017: 8d 45 18 lea 0x18(%ebp),%eax
10b01a: 50 push %eax
10b01b: 56 push %esi
10b01c: e8 67 41 00 00 call 10f188 <_CORE_mutex_Seize_interrupt_trylock>
10b021: 83 c4 10 add $0x10,%esp
10b024: 85 c0 test %eax,%eax
10b026: 74 14 je 10b03c <_CORE_mutex_Seize+0x40>
10b028: 84 db test %bl,%bl
10b02a: 75 30 jne 10b05c <_CORE_mutex_Seize+0x60>
10b02c: ff 75 18 pushl 0x18(%ebp)
10b02f: 9d popf
10b030: a1 1c e7 11 00 mov 0x11e71c,%eax
10b035: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10b03c: 8d 65 f8 lea -0x8(%ebp),%esp
10b03f: 5b pop %ebx
10b040: 5e pop %esi
10b041: c9 leave
10b042: c3 ret
10b043: 90 nop
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10b044: 83 3d 24 e8 11 00 01 cmpl $0x1,0x11e824
10b04b: 76 c7 jbe 10b014 <_CORE_mutex_Seize+0x18>
10b04d: 53 push %ebx
10b04e: 6a 13 push $0x13
10b050: 6a 00 push $0x0
10b052: 6a 00 push $0x0
10b054: e8 c7 04 00 00 call 10b520 <_Internal_error_Occurred>
10b059: 8d 76 00 lea 0x0(%esi),%esi
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10b05c: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
10b063: a1 1c e7 11 00 mov 0x11e71c,%eax
10b068: 89 70 44 mov %esi,0x44(%eax)
10b06b: 8b 55 0c mov 0xc(%ebp),%edx
10b06e: 89 50 20 mov %edx,0x20(%eax)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b071: a1 58 e6 11 00 mov 0x11e658,%eax
10b076: 40 inc %eax
10b077: a3 58 e6 11 00 mov %eax,0x11e658
10b07c: ff 75 18 pushl 0x18(%ebp)
10b07f: 9d popf
10b080: 83 ec 08 sub $0x8,%esp
10b083: ff 75 14 pushl 0x14(%ebp)
10b086: 56 push %esi
10b087: e8 20 ff ff ff call 10afac <_CORE_mutex_Seize_interrupt_blocking>
10b08c: 83 c4 10 add $0x10,%esp
}
10b08f: 8d 65 f8 lea -0x8(%ebp),%esp
10b092: 5b pop %ebx
10b093: 5e pop %esi
10b094: c9 leave
10b095: c3 ret
0010f188 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
10f188: 55 push %ebp
10f189: 89 e5 mov %esp,%ebp
10f18b: 53 push %ebx
10f18c: 83 ec 04 sub $0x4,%esp
10f18f: 8b 4d 08 mov 0x8(%ebp),%ecx
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
10f192: 8b 45 0c mov 0xc(%ebp),%eax
10f195: 8b 18 mov (%eax),%ebx
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
10f197: 8b 15 1c e7 11 00 mov 0x11e71c,%edx
* @param[in] the_heap is the heap to operate upon
10f19d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
* @param[in] starting_address is the starting address of the user block
10f1a4: 8b 41 50 mov 0x50(%ecx),%eax
10f1a7: 85 c0 test %eax,%eax
10f1a9: 74 2d je 10f1d8 <_CORE_mutex_Seize_interrupt_trylock+0x50>
* to be resized
10f1ab: c7 41 50 00 00 00 00 movl $0x0,0x50(%ecx)
* @param[in] size is the new size
10f1b2: 89 51 5c mov %edx,0x5c(%ecx)
*
10f1b5: 8b 42 08 mov 0x8(%edx),%eax
10f1b8: 89 41 60 mov %eax,0x60(%ecx)
* @return TRUE if successfully able to resize the block.
10f1bb: c7 41 54 01 00 00 00 movl $0x1,0x54(%ecx)
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10f1c2: 8b 41 48 mov 0x48(%ecx),%eax
* @param[in] starting_address is the starting address of the user block
* to be resized
* @param[in] size is the new size
*
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
10f1c5: 83 f8 02 cmp $0x2,%eax
10f1c8: 74 1e je 10f1e8 <_CORE_mutex_Seize_interrupt_trylock+0x60><== ALWAYS TAKEN
10f1ca: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
10f1cd: 74 19 je 10f1e8 <_CORE_mutex_Seize_interrupt_trylock+0x60><== NOT EXECUTED
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
*
* @param[in] the_heap is the heap to operate upon
10f1cf: 53 push %ebx
10f1d0: 9d popf
10f1d1: 31 c0 xor %eax,%eax
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
10f1d3: 8b 5d fc mov -0x4(%ebp),%ebx
10f1d6: c9 leave
10f1d7: c3 ret
* in the specified heap.
*
* @param[in] the_heap pointer to heap header.
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
10f1d8: 3b 51 5c cmp 0x5c(%ecx),%edx
10f1db: 74 3f je 10f21c <_CORE_mutex_Seize_interrupt_trylock+0x94>
Heap_Control *the_heap,
Heap_Information *info
);
#ifdef __cplusplus
}
10f1dd: b8 01 00 00 00 mov $0x1,%eax
10f1e2: 8b 5d fc mov -0x4(%ebp),%ebx
10f1e5: c9 leave
10f1e6: c3 ret
10f1e7: 90 nop
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10f1e8: ff 42 1c incl 0x1c(%edx)
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
*
10f1eb: 83 79 48 03 cmpl $0x3,0x48(%ecx)
10f1ef: 75 de jne 10f1cf <_CORE_mutex_Seize_interrupt_trylock+0x47><== ALWAYS TAKEN
void *start_address
);
/**
* This routine walks the heap to verify its integrity.
*
10f1f1: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED
* @param[in] the_heap is the heap to operate upon
10f1f4: 39 41 4c cmp %eax,0x4c(%ecx) <== NOT EXECUTED
10f1f7: 74 47 je 10f240 <_CORE_mutex_Seize_interrupt_trylock+0xb8><== NOT EXECUTED
* @param[in] source is a user specified integer which may be used to
* indicate where in the application this was invoked from
* @param[in] do_dump is set to TRUE if errors should be printed
* @return TRUE if the test passed fine, FALSE otherwise.
*/
10f1f9: 72 4d jb 10f248 <_CORE_mutex_Seize_interrupt_trylock+0xc0><== NOT EXECUTED
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
10f1fb: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) <== NOT EXECUTED
*
10f202: c7 41 50 01 00 00 00 movl $0x1,0x50(%ecx) <== NOT EXECUTED
* @return true if successfully able to return information
10f209: c7 41 54 00 00 00 00 movl $0x0,0x54(%ecx) <== NOT EXECUTED
*/
10f210: ff 4a 1c decl 0x1c(%edx) <== NOT EXECUTED
bool _Protected_heap_Get_information(
10f213: 53 push %ebx <== NOT EXECUTED
10f214: 9d popf <== NOT EXECUTED
10f215: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f217: eb c9 jmp 10f1e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED
10f219: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*
* @param[in] the_heap pointer to heap header.
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
*/
10f21c: 8b 41 40 mov 0x40(%ecx),%eax
10f21f: 85 c0 test %eax,%eax
10f221: 74 11 je 10f234 <_CORE_mutex_Seize_interrupt_trylock+0xac>
10f223: 48 dec %eax
10f224: 75 b7 jne 10f1dd <_CORE_mutex_Seize_interrupt_trylock+0x55>
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
);
#ifdef __cplusplus
10f226: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
}
10f22d: 53 push %ebx
10f22e: 9d popf
10f22f: 31 c0 xor %eax,%eax
10f231: eb af jmp 10f1e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
10f233: 90 nop
* @param[in] info pointer to the free block information.
*
* @return free block information filled in.
*/
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
10f234: ff 41 54 incl 0x54(%ecx)
Heap_Information *info
10f237: 53 push %ebx
10f238: 9d popf
10f239: 31 c0 xor %eax,%eax
10f23b: eb a5 jmp 10f1e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
10f23d: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap to verify its integrity.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] source is a user specified integer which may be used to
10f240: 53 push %ebx <== NOT EXECUTED
10f241: 9d popf <== NOT EXECUTED
10f242: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f244: eb 9c jmp 10f1e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED
10f246: 66 90 xchg %ax,%ax <== NOT EXECUTED
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10f248: a1 58 e6 11 00 mov 0x11e658,%eax <== NOT EXECUTED
10f24d: 40 inc %eax <== NOT EXECUTED
10f24e: a3 58 e6 11 00 mov %eax,0x11e658 <== NOT EXECUTED
* indicate where in the application this was invoked from
* @param[in] do_dump is set to TRUE if errors should be printed
* @return TRUE if the test passed fine, FALSE otherwise.
*/
bool _Protected_heap_Walk(
Heap_Control *the_heap,
10f253: 53 push %ebx <== NOT EXECUTED
10f254: 9d popf <== NOT EXECUTED
int source,
10f255: 50 push %eax <== NOT EXECUTED
10f256: 6a 00 push $0x0 <== NOT EXECUTED
10f258: ff 71 4c pushl 0x4c(%ecx) <== NOT EXECUTED
10f25b: ff 71 5c pushl 0x5c(%ecx) <== NOT EXECUTED
10f25e: e8 ad cb ff ff call 10be10 <_Thread_Change_priority><== NOT EXECUTED
bool do_dump
);
/**
* This routine walks the heap and tots up the free and allocated
10f263: e8 84 d0 ff ff call 10c2ec <_Thread_Enable_dispatch><== NOT EXECUTED
10f268: 31 c0 xor %eax,%eax <== NOT EXECUTED
10f26a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f26d: e9 70 ff ff ff jmp 10f1e2 <_CORE_mutex_Seize_interrupt_trylock+0x5a><== NOT EXECUTED
0010b098 <_CORE_mutex_Surrender>:
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
10b098: 55 push %ebp
10b099: 89 e5 mov %esp,%ebp
10b09b: 53 push %ebx
10b09c: 83 ec 04 sub $0x4,%esp
10b09f: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
10b0a2: 8b 53 5c mov 0x5c(%ebx),%edx
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
10b0a5: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10b0a9: 74 15 je 10b0c0 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10b0ab: 3b 15 1c e7 11 00 cmp 0x11e71c,%edx
10b0b1: 74 0d je 10b0c0 <_CORE_mutex_Surrender+0x28>
10b0b3: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b0b8: 8b 5d fc mov -0x4(%ebp),%ebx
10b0bb: c9 leave
10b0bc: c3 ret
10b0bd: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10b0c0: 8b 43 54 mov 0x54(%ebx),%eax
10b0c3: 85 c0 test %eax,%eax
10b0c5: 74 69 je 10b130 <_CORE_mutex_Surrender+0x98>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10b0c7: 48 dec %eax
10b0c8: 89 43 54 mov %eax,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10b0cb: 85 c0 test %eax,%eax
10b0cd: 75 69 jne 10b138 <_CORE_mutex_Surrender+0xa0>
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
10b0cf: 8b 43 48 mov 0x48(%ebx),%eax
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10b0d2: 83 f8 02 cmp $0x2,%eax
10b0d5: 0f 84 91 00 00 00 je 10b16c <_CORE_mutex_Surrender+0xd4>
10b0db: 83 f8 03 cmp $0x3,%eax
10b0de: 0f 84 88 00 00 00 je 10b16c <_CORE_mutex_Surrender+0xd4><== NEVER TAKEN
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
10b0e4: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10b0eb: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10b0f2: 83 f8 02 cmp $0x2,%eax
10b0f5: 74 55 je 10b14c <_CORE_mutex_Surrender+0xb4>
10b0f7: 83 f8 03 cmp $0x3,%eax
10b0fa: 74 50 je 10b14c <_CORE_mutex_Surrender+0xb4><== NEVER TAKEN
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
10b0fc: 83 ec 0c sub $0xc,%esp
10b0ff: 53 push %ebx
10b100: e8 6b 15 00 00 call 10c670 <_Thread_queue_Dequeue>
10b105: 89 c2 mov %eax,%edx
10b107: 83 c4 10 add $0x10,%esp
10b10a: 85 c0 test %eax,%eax
10b10c: 0f 84 8e 00 00 00 je 10b1a0 <_CORE_mutex_Surrender+0x108>
} else
#endif
{
the_mutex->holder = the_thread;
10b112: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10b115: 8b 40 08 mov 0x8(%eax),%eax
10b118: 89 43 60 mov %eax,0x60(%ebx)
the_mutex->nest_count = 1;
10b11b: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10b122: 8b 43 48 mov 0x48(%ebx),%eax
10b125: 83 f8 02 cmp $0x2,%eax
10b128: 74 6a je 10b194 <_CORE_mutex_Surrender+0xfc>
10b12a: 83 f8 03 cmp $0x3,%eax
10b12d: 74 45 je 10b174 <_CORE_mutex_Surrender+0xdc><== NEVER TAKEN
10b12f: 90 nop
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10b130: 31 c0 xor %eax,%eax
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10b132: 8b 5d fc mov -0x4(%ebp),%ebx
10b135: c9 leave
10b136: c3 ret
10b137: 90 nop
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
10b138: 8b 43 40 mov 0x40(%ebx),%eax
10b13b: 85 c0 test %eax,%eax
10b13d: 74 f1 je 10b130 <_CORE_mutex_Surrender+0x98><== ALWAYS TAKEN
10b13f: 48 dec %eax <== NOT EXECUTED
10b140: 75 8d jne 10b0cf <_CORE_mutex_Surrender+0x37><== NOT EXECUTED
10b142: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED
10b147: e9 6c ff ff ff jmp 10b0b8 <_CORE_mutex_Surrender+0x20><== NOT EXECUTED
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
10b14c: 8b 42 1c mov 0x1c(%edx),%eax
10b14f: 85 c0 test %eax,%eax
10b151: 75 a9 jne 10b0fc <_CORE_mutex_Surrender+0x64>
10b153: 8b 42 18 mov 0x18(%edx),%eax
10b156: 3b 42 14 cmp 0x14(%edx),%eax
10b159: 74 a1 je 10b0fc <_CORE_mutex_Surrender+0x64>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
10b15b: 51 push %ecx
10b15c: 6a 01 push $0x1
10b15e: 50 push %eax
10b15f: 52 push %edx
10b160: e8 ab 0c 00 00 call 10be10 <_Thread_Change_priority>
10b165: 83 c4 10 add $0x10,%esp
10b168: eb 92 jmp 10b0fc <_CORE_mutex_Surrender+0x64>
10b16a: 66 90 xchg %ax,%ax
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
10b16c: ff 4a 1c decl 0x1c(%edx)
10b16f: e9 70 ff ff ff jmp 10b0e4 <_CORE_mutex_Surrender+0x4c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10b174: ff 42 1c incl 0x1c(%edx) <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
10b177: 8b 43 4c mov 0x4c(%ebx),%eax <== NOT EXECUTED
10b17a: 3b 42 14 cmp 0x14(%edx),%eax <== NOT EXECUTED
10b17d: 73 b1 jae 10b130 <_CORE_mutex_Surrender+0x98><== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
10b17f: 51 push %ecx <== NOT EXECUTED
10b180: 6a 00 push $0x0 <== NOT EXECUTED
10b182: 50 push %eax <== NOT EXECUTED
10b183: 52 push %edx <== NOT EXECUTED
10b184: e8 87 0c 00 00 call 10be10 <_Thread_Change_priority><== NOT EXECUTED
10b189: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b18b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b18e: e9 25 ff ff ff jmp 10b0b8 <_CORE_mutex_Surrender+0x20><== NOT EXECUTED
10b193: 90 nop <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10b194: ff 42 1c incl 0x1c(%edx)
10b197: 31 c0 xor %eax,%eax
10b199: e9 1a ff ff ff jmp 10b0b8 <_CORE_mutex_Surrender+0x20>
10b19e: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10b1a0: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
10b1a7: 31 c0 xor %eax,%eax
10b1a9: e9 0a ff ff ff jmp 10b0b8 <_CORE_mutex_Surrender+0x20>
0010b1fc <_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
)
{
10b1fc: 55 push %ebp
10b1fd: 89 e5 mov %esp,%ebp
10b1ff: 53 push %ebx
10b200: 83 ec 10 sub $0x10,%esp
10b203: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10b206: 53 push %ebx
10b207: e8 64 14 00 00 call 10c670 <_Thread_queue_Dequeue>
10b20c: 83 c4 10 add $0x10,%esp
10b20f: 85 c0 test %eax,%eax
10b211: 74 09 je 10b21c <_CORE_semaphore_Surrender+0x20>
10b213: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10b215: 8b 5d fc mov -0x4(%ebp),%ebx
10b218: c9 leave
10b219: c3 ret
10b21a: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10b21c: 9c pushf
10b21d: fa cli
10b21e: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10b21f: 8b 43 48 mov 0x48(%ebx),%eax
10b222: 3b 43 40 cmp 0x40(%ebx),%eax
10b225: 72 0d jb 10b234 <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
10b227: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10b22c: 52 push %edx
10b22d: 9d popf
}
return status;
}
10b22e: 8b 5d fc mov -0x4(%ebp),%ebx
10b231: c9 leave
10b232: c3 ret
10b233: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10b234: 40 inc %eax
10b235: 89 43 48 mov %eax,0x48(%ebx)
10b238: 31 c0 xor %eax,%eax
10b23a: eb f0 jmp 10b22c <_CORE_semaphore_Surrender+0x30>
0010ada0 <_Chain_Get>:
*/
Chain_Node *_Chain_Get(
Chain_Control *the_chain
)
{
10ada0: 55 push %ebp
10ada1: 89 e5 mov %esp,%ebp
10ada3: 53 push %ebx
10ada4: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10ada7: 9c pushf
10ada8: fa cli
10ada9: 5b pop %ebx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10adaa: 8b 11 mov (%ecx),%edx
if ( !_Chain_Is_empty( the_chain ) )
10adac: 8d 41 04 lea 0x4(%ecx),%eax
10adaf: 39 c2 cmp %eax,%edx
10adb1: 74 11 je 10adc4 <_Chain_Get+0x24>
10adb3: 8b 02 mov (%edx),%eax
10adb5: 89 01 mov %eax,(%ecx)
10adb7: 89 48 04 mov %ecx,0x4(%eax)
return_node = _Chain_Get_first_unprotected( the_chain );
_ISR_Enable( level );
10adba: 53 push %ebx
10adbb: 9d popf
return return_node;
}
10adbc: 89 d0 mov %edx,%eax
10adbe: 5b pop %ebx
10adbf: c9 leave
10adc0: c3 ret
10adc1: 8d 76 00 lea 0x0(%esi),%esi
ISR_Level level;
Chain_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
if ( !_Chain_Is_empty( the_chain ) )
10adc4: 31 d2 xor %edx,%edx
10adc6: eb f2 jmp 10adba <_Chain_Get+0x1a>
0010f05c <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10f05c: 55 push %ebp
10f05d: 89 e5 mov %esp,%ebp
10f05f: 57 push %edi
10f060: 56 push %esi
10f061: 53 push %ebx
10f062: 8b 75 08 mov 0x8(%ebp),%esi
10f065: 8b 45 10 mov 0x10(%ebp),%eax
10f068: 8b 5d 14 mov 0x14(%ebp),%ebx
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10f06b: 89 f1 mov %esi,%ecx
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
10f06d: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
next = starting_address;
while ( count-- ) {
10f074: 85 c0 test %eax,%eax
10f076: 74 22 je 10f09a <_Chain_Initialize+0x3e><== NEVER TAKEN
10f078: 8d 50 ff lea -0x1(%eax),%edx
10f07b: 89 d7 mov %edx,%edi
10f07d: 8b 45 0c mov 0xc(%ebp),%eax
10f080: eb 03 jmp 10f085 <_Chain_Initialize+0x29>
10f082: 66 90 xchg %ax,%ax
10f084: 4a dec %edx
current->next = next;
10f085: 89 01 mov %eax,(%ecx)
next->previous = current;
10f087: 89 48 04 mov %ecx,0x4(%eax)
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10f08a: 89 c1 mov %eax,%ecx
10f08c: 01 d8 add %ebx,%eax
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
10f08e: 85 d2 test %edx,%edx
10f090: 75 f2 jne 10f084 <_Chain_Initialize+0x28>
10f092: 0f af df imul %edi,%ebx
10f095: 8b 4d 0c mov 0xc(%ebp),%ecx
10f098: 01 d9 add %ebx,%ecx
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
10f09a: 8d 46 04 lea 0x4(%esi),%eax
10f09d: 89 01 mov %eax,(%ecx)
the_chain->last = current;
10f09f: 89 4e 08 mov %ecx,0x8(%esi)
}
10f0a2: 5b pop %ebx
10f0a3: 5e pop %esi
10f0a4: 5f pop %edi
10f0a5: c9 leave
10f0a6: c3 ret
0010eff0 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
10eff0: 55 push %ebp <== NOT EXECUTED
10eff1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10eff3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED
10eff6: 85 05 20 e7 11 00 test %eax,0x11e720 <== NOT EXECUTED
10effc: 0f 95 c0 setne %al <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
10efff: c9 leave <== NOT EXECUTED
10f000: c3 ret <== NOT EXECUTED
00109d94 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109d94: 55 push %ebp
109d95: 89 e5 mov %esp,%ebp
109d97: 57 push %edi
109d98: 56 push %esi
109d99: 53 push %ebx
109d9a: 83 ec 0c sub $0xc,%esp
109d9d: 8b 45 08 mov 0x8(%ebp),%eax
109da0: 8b 75 0c mov 0xc(%ebp),%esi
109da3: 8b 55 10 mov 0x10(%ebp),%edx
109da6: 89 55 ec mov %edx,-0x14(%ebp)
109da9: 8b 55 14 mov 0x14(%ebp),%edx
109dac: 89 55 e8 mov %edx,-0x18(%ebp)
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
109daf: 8b 1d 1c e7 11 00 mov 0x11e71c,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
109db5: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
109dbc: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
_ISR_Disable( level );
109dc2: 9c pushf
109dc3: fa cli
109dc4: 8f 45 f0 popl -0x10(%ebp)
pending_events = api->pending_events;
109dc7: 8b 17 mov (%edi),%edx
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
109dc9: 89 c1 mov %eax,%ecx
109dcb: 21 d1 and %edx,%ecx
109dcd: 74 14 je 109de3 <_Event_Seize+0x4f>
109dcf: 39 c8 cmp %ecx,%eax
109dd1: 0f 84 91 00 00 00 je 109e68 <_Event_Seize+0xd4>
109dd7: f7 c6 02 00 00 00 test $0x2,%esi
109ddd: 0f 85 85 00 00 00 jne 109e68 <_Event_Seize+0xd4> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
109de3: f7 c6 01 00 00 00 test $0x1,%esi
109de9: 75 65 jne 109e50 <_Event_Seize+0xbc>
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
109deb: c7 05 6c e9 11 00 01 movl $0x1,0x11e96c
109df2: 00 00 00
executing->Wait.option = (uint32_t) option_set;
109df5: 89 73 30 mov %esi,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
109df8: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
109dfb: 8b 45 e8 mov -0x18(%ebp),%eax
109dfe: 89 43 28 mov %eax,0x28(%ebx)
_ISR_Enable( level );
109e01: ff 75 f0 pushl -0x10(%ebp)
109e04: 9d popf
if ( ticks ) {
109e05: 8b 45 ec mov -0x14(%ebp),%eax
109e08: 85 c0 test %eax,%eax
109e0a: 0f 85 80 00 00 00 jne 109e90 <_Event_Seize+0xfc>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
109e10: 83 ec 08 sub $0x8,%esp
109e13: 68 00 01 00 00 push $0x100
109e18: 53 push %ebx
109e19: e8 82 2d 00 00 call 10cba0 <_Thread_Set_state>
_ISR_Disable( level );
109e1e: 9c pushf
109e1f: fa cli
109e20: 5a pop %edx
sync_state = _Event_Sync_state;
109e21: a1 6c e9 11 00 mov 0x11e96c,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
109e26: c7 05 6c e9 11 00 00 movl $0x0,0x11e96c
109e2d: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
109e30: 83 c4 10 add $0x10,%esp
109e33: 83 f8 01 cmp $0x1,%eax
109e36: 74 4c je 109e84 <_Event_Seize+0xf0>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109e38: 89 55 10 mov %edx,0x10(%ebp)
109e3b: 89 5d 0c mov %ebx,0xc(%ebp)
109e3e: 89 45 08 mov %eax,0x8(%ebp)
}
109e41: 8d 65 f4 lea -0xc(%ebp),%esp
109e44: 5b pop %ebx
109e45: 5e pop %esi
109e46: 5f pop %edi
109e47: c9 leave
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
109e48: e9 77 1f 00 00 jmp 10bdc4 <_Thread_blocking_operation_Cancel>
109e4d: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
109e50: ff 75 f0 pushl -0x10(%ebp)
109e53: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
109e54: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
109e5b: 8b 55 e8 mov -0x18(%ebp),%edx
109e5e: 89 0a mov %ecx,(%edx)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e60: 8d 65 f4 lea -0xc(%ebp),%esp
109e63: 5b pop %ebx
109e64: 5e pop %esi
109e65: 5f pop %edi
109e66: c9 leave
109e67: c3 ret
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
109e68: 89 c8 mov %ecx,%eax
109e6a: f7 d0 not %eax
109e6c: 21 d0 and %edx,%eax
109e6e: 89 07 mov %eax,(%edi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
109e70: ff 75 f0 pushl -0x10(%ebp)
109e73: 9d popf
*event_out = seized_events;
109e74: 8b 45 e8 mov -0x18(%ebp),%eax
109e77: 89 08 mov %ecx,(%eax)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e79: 8d 65 f4 lea -0xc(%ebp),%esp
109e7c: 5b pop %ebx
109e7d: 5e pop %esi
109e7e: 5f pop %edi
109e7f: c9 leave
109e80: c3 ret
109e81: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
109e84: 52 push %edx
109e85: 9d popf
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
109e86: 8d 65 f4 lea -0xc(%ebp),%esp
109e89: 5b pop %ebx
109e8a: 5e pop %esi
109e8b: 5f pop %edi
109e8c: c9 leave
109e8d: c3 ret
109e8e: 66 90 xchg %ax,%ax
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
109e90: 8b 43 08 mov 0x8(%ebx),%eax
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
109e93: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
* @param[in] the_heap is the heap to operate upon
109e9a: c7 43 64 38 a0 10 00 movl $0x10a038,0x64(%ebx)
* @param[in] starting_address is the starting address of the memory for
109ea1: 89 43 68 mov %eax,0x68(%ebx)
* the heap
109ea4: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
109eab: 8b 55 ec mov -0x14(%ebp),%edx
109eae: 89 53 54 mov %edx,0x54(%ebx)
void *starting_address,
size_t *size
109eb1: 83 ec 08 sub $0x8,%esp
109eb4: 8d 43 48 lea 0x48(%ebx),%eax
109eb7: 50 push %eax
109eb8: 68 3c e7 11 00 push $0x11e73c
109ebd: e8 3a 33 00 00 call 10d1fc <_Watchdog_Insert>
109ec2: 83 c4 10 add $0x10,%esp
109ec5: e9 46 ff ff ff jmp 109e10 <_Event_Seize+0x7c>
00109f20 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
109f20: 55 push %ebp
109f21: 89 e5 mov %esp,%ebp
109f23: 57 push %edi
109f24: 56 push %esi
109f25: 53 push %ebx
109f26: 83 ec 0c sub $0xc,%esp
109f29: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
109f2c: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
option_set = (rtems_option) the_thread->Wait.option;
109f32: 8b 43 30 mov 0x30(%ebx),%eax
109f35: 89 45 f0 mov %eax,-0x10(%ebp)
_ISR_Disable( level );
109f38: 9c pushf
109f39: fa cli
109f3a: 8f 45 ec popl -0x14(%ebp)
pending_events = api->pending_events;
109f3d: 8b 0e mov (%esi),%ecx
event_condition = (rtems_event_set) the_thread->Wait.count;
109f3f: 8b 53 24 mov 0x24(%ebx),%edx
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
109f42: 89 d7 mov %edx,%edi
109f44: 21 cf and %ecx,%edi
109f46: 74 70 je 109fb8 <_Event_Surrender+0x98>
/*
* 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() &&
109f48: a1 f8 e6 11 00 mov 0x11e6f8,%eax
109f4d: 85 c0 test %eax,%eax
109f4f: 74 0c je 109f5d <_Event_Surrender+0x3d>
109f51: 3b 1d 1c e7 11 00 cmp 0x11e71c,%ebx
109f57: 0f 84 93 00 00 00 je 109ff0 <_Event_Surrender+0xd0>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109f5d: f6 43 11 01 testb $0x1,0x11(%ebx)
109f61: 75 0d jne 109f70 <_Event_Surrender+0x50> <== ALWAYS TAKEN
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
109f63: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
109f66: 9d popf <== NOT EXECUTED
}
109f67: 8d 65 f4 lea -0xc(%ebp),%esp
109f6a: 5b pop %ebx
109f6b: 5e pop %esi
109f6c: 5f pop %edi
109f6d: c9 leave
109f6e: c3 ret
109f6f: 90 nop
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109f70: 39 fa cmp %edi,%edx
109f72: 74 06 je 109f7a <_Event_Surrender+0x5a>
109f74: f6 45 f0 02 testb $0x2,-0x10(%ebp)
109f78: 74 e9 je 109f63 <_Event_Surrender+0x43> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
109f7a: 89 f8 mov %edi,%eax
109f7c: f7 d0 not %eax
109f7e: 21 c8 and %ecx,%eax
109f80: 89 06 mov %eax,(%esi)
the_thread->Wait.count = 0;
109f82: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109f89: 8b 43 28 mov 0x28(%ebx),%eax
109f8c: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
109f8e: ff 75 ec pushl -0x14(%ebp)
109f91: 9d popf
109f92: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109f93: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
109f97: 74 2b je 109fc4 <_Event_Surrender+0xa4>
_ISR_Enable( level );
109f99: ff 75 ec pushl -0x14(%ebp)
109f9c: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
109f9d: 83 ec 08 sub $0x8,%esp
109fa0: 68 f8 ff 03 10 push $0x1003fff8
109fa5: 53 push %ebx
109fa6: e8 99 1f 00 00 call 10bf44 <_Thread_Clear_state>
109fab: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
109fae: 8d 65 f4 lea -0xc(%ebp),%esp
109fb1: 5b pop %ebx
109fb2: 5e pop %esi
109fb3: 5f pop %edi
109fb4: c9 leave
109fb5: c3 ret
109fb6: 66 90 xchg %ax,%ax
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
109fb8: ff 75 ec pushl -0x14(%ebp)
109fbb: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
109fbc: 8d 65 f4 lea -0xc(%ebp),%esp
109fbf: 5b pop %ebx
109fc0: 5e pop %esi
109fc1: 5f pop %edi
109fc2: c9 leave
109fc3: c3 ret
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
109fc4: 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 );
109fcb: ff 75 ec pushl -0x14(%ebp)
109fce: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
109fcf: 83 ec 0c sub $0xc,%esp
109fd2: 8d 43 48 lea 0x48(%ebx),%eax
109fd5: 50 push %eax
109fd6: e8 51 33 00 00 call 10d32c <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
109fdb: 58 pop %eax
109fdc: 5a pop %edx
109fdd: 68 f8 ff 03 10 push $0x1003fff8
109fe2: 53 push %ebx
109fe3: e8 5c 1f 00 00 call 10bf44 <_Thread_Clear_state>
109fe8: 83 c4 10 add $0x10,%esp
109feb: e9 77 ff ff ff jmp 109f67 <_Event_Surrender+0x47>
/*
* 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() &&
109ff0: a1 6c e9 11 00 mov 0x11e96c,%eax
109ff5: 48 dec %eax
109ff6: 74 0e je 10a006 <_Event_Surrender+0xe6> <== ALWAYS TAKEN
109ff8: a1 6c e9 11 00 mov 0x11e96c,%eax <== NOT EXECUTED
109ffd: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
10a000: 0f 85 57 ff ff ff jne 109f5d <_Event_Surrender+0x3d> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10a006: 39 fa cmp %edi,%edx
10a008: 74 06 je 10a010 <_Event_Surrender+0xf0> <== ALWAYS TAKEN
10a00a: f6 45 f0 02 testb $0x2,-0x10(%ebp) <== NOT EXECUTED
10a00e: 74 1e je 10a02e <_Event_Surrender+0x10e><== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
10a010: 89 f8 mov %edi,%eax
10a012: f7 d0 not %eax
10a014: 21 c8 and %ecx,%eax
10a016: 89 06 mov %eax,(%esi)
the_thread->Wait.count = 0;
10a018: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10a01f: 8b 43 28 mov 0x28(%ebx),%eax
10a022: 89 38 mov %edi,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10a024: c7 05 6c e9 11 00 03 movl $0x3,0x11e96c
10a02b: 00 00 00
}
_ISR_Enable( level );
10a02e: ff 75 ec pushl -0x14(%ebp)
10a031: 9d popf
10a032: e9 30 ff ff ff jmp 109f67 <_Event_Surrender+0x47>
0010a038 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10a038: 55 push %ebp
10a039: 89 e5 mov %esp,%ebp
10a03b: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10a03e: 8d 45 fc lea -0x4(%ebp),%eax
10a041: 50 push %eax
10a042: ff 75 08 pushl 0x8(%ebp)
10a045: e8 c6 22 00 00 call 10c310 <_Thread_Get>
10a04a: 89 c2 mov %eax,%edx
switch ( location ) {
10a04c: 83 c4 10 add $0x10,%esp
10a04f: 8b 4d fc mov -0x4(%ebp),%ecx
10a052: 85 c9 test %ecx,%ecx
10a054: 75 3e jne 10a094 <_Event_Timeout+0x5c> <== NEVER TAKEN
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10a056: 9c pushf
10a057: fa cli
10a058: 59 pop %ecx
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
10a059: 8b 40 24 mov 0x24(%eax),%eax
10a05c: 85 c0 test %eax,%eax
10a05e: 74 38 je 10a098 <_Event_Timeout+0x60> <== NEVER TAKEN
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
10a060: c7 42 24 00 00 00 00 movl $0x0,0x24(%edx)
if ( _Thread_Is_executing( the_thread ) ) {
10a067: 3b 15 1c e7 11 00 cmp 0x11e71c,%edx
10a06d: 74 39 je 10a0a8 <_Event_Timeout+0x70>
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10a06f: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
_ISR_Enable( level );
10a076: 51 push %ecx
10a077: 9d popf
10a078: 83 ec 08 sub $0x8,%esp
10a07b: 68 f8 ff 03 10 push $0x1003fff8
10a080: 52 push %edx
10a081: e8 be 1e 00 00 call 10bf44 <_Thread_Clear_state>
10a086: a1 58 e6 11 00 mov 0x11e658,%eax
10a08b: 48 dec %eax
10a08c: a3 58 e6 11 00 mov %eax,0x11e658
10a091: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a094: c9 leave
10a095: c3 ret
10a096: 66 90 xchg %ax,%ax
10a098: a1 58 e6 11 00 mov 0x11e658,%eax <== NOT EXECUTED
10a09d: 48 dec %eax <== NOT EXECUTED
10a09e: a3 58 e6 11 00 mov %eax,0x11e658 <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
10a0a3: 51 push %ecx <== NOT EXECUTED
10a0a4: 9d popf <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a0a5: c9 leave <== NOT EXECUTED
10a0a6: c3 ret <== NOT EXECUTED
10a0a7: 90 nop <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
10a0a8: a1 6c e9 11 00 mov 0x11e96c,%eax
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
10a0ad: 83 f8 01 cmp $0x1,%eax
10a0b0: 77 bd ja 10a06f <_Event_Timeout+0x37> <== NEVER TAKEN
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10a0b2: c7 05 6c e9 11 00 02 movl $0x2,0x11e96c
10a0b9: 00 00 00
10a0bc: eb b1 jmp 10a06f <_Event_Timeout+0x37>
0010f2c8 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
10f2c8: 55 push %ebp
10f2c9: 89 e5 mov %esp,%ebp
10f2cb: 57 push %edi
10f2cc: 56 push %esi
10f2cd: 53 push %ebx
10f2ce: 83 ec 10 sub $0x10,%esp
10f2d1: 8b 7d 08 mov 0x8(%ebp),%edi
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
10f2d4: ff 77 14 pushl 0x14(%edi)
10f2d7: ff 77 10 pushl 0x10(%edi)
10f2da: ff 75 0c pushl 0xc(%ebp)
10f2dd: e8 86 c1 ff ff call 10b468 <_Heap_Calc_block_size>
_Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size);
if(the_size == 0)
10f2e2: 83 c4 10 add $0x10,%esp
10f2e5: 85 c0 test %eax,%eax
10f2e7: 74 3b je 10f324 <_Heap_Allocate+0x5c> <== NEVER TAKEN
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
10f2e9: 8b 5f 08 mov 0x8(%edi),%ebx
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10f2ec: 39 df cmp %ebx,%edi
10f2ee: 74 34 je 10f324 <_Heap_Allocate+0x5c>
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10f2f0: 3b 43 04 cmp 0x4(%ebx),%eax
10f2f3: 76 5c jbe 10f351 <_Heap_Allocate+0x89>
stats->allocs += 1;
stats->searches += search_count + 1;
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
10f2f5: 31 f6 xor %esi,%esi
10f2f7: eb 08 jmp 10f301 <_Heap_Allocate+0x39>
10f2f9: 8d 76 00 lea 0x0(%esi),%esi
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10f2fc: 3b 43 04 cmp 0x4(%ebx),%eax
10f2ff: 76 2f jbe 10f330 <_Heap_Allocate+0x68>
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
10f301: 8b 5b 08 mov 0x8(%ebx),%ebx
10f304: 46 inc %esi
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10f305: 39 df cmp %ebx,%edi
10f307: 75 f3 jne 10f2fc <_Heap_Allocate+0x34>
10f309: 89 75 f0 mov %esi,-0x10(%ebp)
10f30c: 31 d2 xor %edx,%edx
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
10f30e: 8b 45 f0 mov -0x10(%ebp),%eax
10f311: 39 47 44 cmp %eax,0x44(%edi)
10f314: 73 03 jae 10f319 <_Heap_Allocate+0x51>
stats->max_search = search_count;
10f316: 89 47 44 mov %eax,0x44(%edi)
return ptr;
}
10f319: 89 d0 mov %edx,%eax
10f31b: 8d 65 f4 lea -0xc(%ebp),%esp
10f31e: 5b pop %ebx
10f31f: 5e pop %esi
10f320: 5f pop %edi
10f321: c9 leave
10f322: c3 ret
10f323: 90 nop
break;
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
10f324: 31 d2 xor %edx,%edx
return ptr;
}
10f326: 89 d0 mov %edx,%eax
10f328: 8d 65 f4 lea -0xc(%ebp),%esp
10f32b: 5b pop %ebx
10f32c: 5e pop %esi
10f32d: 5f pop %edi
10f32e: c9 leave
10f32f: c3 ret
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10f330: 89 75 f0 mov %esi,-0x10(%ebp)
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
10f333: 52 push %edx
10f334: 50 push %eax
10f335: 53 push %ebx
10f336: 57 push %edi
10f337: e8 60 c1 ff ff call 10b49c <_Heap_Block_allocate>
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10f33c: 8d 53 08 lea 0x8(%ebx),%edx
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
10f33f: ff 47 48 incl 0x48(%edi)
stats->searches += search_count + 1;
10f342: 8b 47 4c mov 0x4c(%edi),%eax
10f345: 8d 44 06 01 lea 0x1(%esi,%eax,1),%eax
10f349: 89 47 4c mov %eax,0x4c(%edi)
10f34c: 83 c4 10 add $0x10,%esp
10f34f: eb bd jmp 10f30e <_Heap_Allocate+0x46>
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
10f351: 31 f6 xor %esi,%esi
10f353: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
10f35a: eb d7 jmp 10f333 <_Heap_Allocate+0x6b>
0010cc60 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
10cc60: 55 push %ebp
10cc61: 89 e5 mov %esp,%ebp
10cc63: 57 push %edi
10cc64: 56 push %esi
10cc65: 53 push %ebx
10cc66: 83 ec 20 sub $0x20,%esp
10cc69: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
10cc6c: 8b 55 08 mov 0x8(%ebp),%edx
10cc6f: 8b 52 10 mov 0x10(%edx),%edx
10cc72: 89 55 dc mov %edx,-0x24(%ebp)
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
10cc75: 8d 48 fc lea -0x4(%eax),%ecx
10cc78: 89 4d e0 mov %ecx,-0x20(%ebp)
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
10cc7b: 8b 7d 08 mov 0x8(%ebp),%edi
10cc7e: ff 77 14 pushl 0x14(%edi)
10cc81: 52 push %edx
10cc82: 50 push %eax
10cc83: e8 8c 04 00 00 call 10d114 <_Heap_Calc_block_size>
10cc88: 89 45 e4 mov %eax,-0x1c(%ebp)
if(the_size == 0)
10cc8b: 83 c4 10 add $0x10,%esp
10cc8e: 85 c0 test %eax,%eax
10cc90: 0f 84 1a 01 00 00 je 10cdb0 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN
return NULL;
if(alignment == 0)
10cc96: 8b 45 10 mov 0x10(%ebp),%eax
10cc99: 85 c0 test %eax,%eax
10cc9b: 0f 84 03 01 00 00 je 10cda4 <_Heap_Allocate_aligned+0x144>
)
{
return ( the_thread == _Thread_Heir );
}
/**
10cca1: 8b 45 08 mov 0x8(%ebp),%eax
10cca4: 8b 48 08 mov 0x8(%eax),%ecx
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10cca7: 39 c8 cmp %ecx,%eax
10cca9: 0f 84 01 01 00 00 je 10cdb0 <_Heap_Allocate_aligned+0x150><== NEVER TAKEN
10ccaf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
10ccb6: eb 17 jmp 10cccf <_Heap_Allocate_aligned+0x6f>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
10ccb8: 89 f2 mov %esi,%edx <== NOT EXECUTED
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
10ccba: 85 ff test %edi,%edi
10ccbc: 75 7a jne 10cd38 <_Heap_Allocate_aligned+0xd8><== ALWAYS TAKEN
10ccbe: 66 90 xchg %ax,%ax
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
10ccc0: 8b 49 08 mov 0x8(%ecx),%ecx
10ccc3: ff 45 f0 incl -0x10(%ebp)
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10ccc6: 39 4d 08 cmp %ecx,0x8(%ebp)
10ccc9: 0f 84 ed 00 00 00 je 10cdbc <_Heap_Allocate_aligned+0x15c>
10cccf: 8b 59 04 mov 0x4(%ecx),%ebx
10ccd2: 83 e3 fe and $0xfffffffe,%ebx
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
10ccd5: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10ccd8: 77 e6 ja 10ccc0 <_Heap_Allocate_aligned+0x60>
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
10ccda: 8d 71 08 lea 0x8(%ecx),%esi
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
10ccdd: 8d 14 19 lea (%ecx,%ebx,1),%edx
10cce0: 89 55 e8 mov %edx,-0x18(%ebp)
aligned_user_addr = block_end - end_to_user_offs;
10cce3: 89 d7 mov %edx,%edi
10cce5: 2b 7d e0 sub -0x20(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
}
10cce8: 89 f8 mov %edi,%eax
10ccea: 31 d2 xor %edx,%edx
10ccec: f7 75 10 divl 0x10(%ebp)
10ccef: 29 d7 sub %edx,%edi
10ccf1: 89 f8 mov %edi,%eax
10ccf3: 31 d2 xor %edx,%edx
10ccf5: f7 75 dc divl -0x24(%ebp)
10ccf8: 89 f8 mov %edi,%eax
10ccfa: 29 d0 sub %edx,%eax
10ccfc: 89 c2 mov %eax,%edx
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
10ccfe: 39 c6 cmp %eax,%esi
10cd00: 77 be ja 10ccc0 <_Heap_Allocate_aligned+0x60>
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
10cd02: 8b 45 08 mov 0x8(%ebp),%eax
10cd05: 8b 40 14 mov 0x14(%eax),%eax
10cd08: 89 45 ec mov %eax,-0x14(%ebp)
10cd0b: 89 d0 mov %edx,%eax
10cd0d: 29 f0 sub %esi,%eax
10cd0f: 3b 45 ec cmp -0x14(%ebp),%eax
10cd12: 73 a6 jae 10ccba <_Heap_Allocate_aligned+0x5a>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
10cd14: 89 f8 mov %edi,%eax
10cd16: 29 f0 sub %esi,%eax
10cd18: 39 45 dc cmp %eax,-0x24(%ebp)
10cd1b: 77 9b ja 10ccb8 <_Heap_Allocate_aligned+0x58><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
}
/**
10cd1d: 89 f0 mov %esi,%eax
10cd1f: 31 d2 xor %edx,%edx
10cd21: f7 75 10 divl 0x10(%ebp)
* This function returns TRUE if dispatching is disabled, and FALSE
10cd24: 85 d2 test %edx,%edx
10cd26: 75 6c jne 10cd94 <_Heap_Allocate_aligned+0x134>
10cd28: 89 f0 mov %esi,%eax
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
10cd2a: 39 55 dc cmp %edx,-0x24(%ebp)
10cd2d: 76 91 jbe 10ccc0 <_Heap_Allocate_aligned+0x60>
10cd2f: 89 f2 mov %esi,%edx
10cd31: 89 c7 mov %eax,%edi
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
10cd33: 85 ff test %edi,%edi
10cd35: 74 89 je 10ccc0 <_Heap_Allocate_aligned+0x60><== NEVER TAKEN
10cd37: 90 nop
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
10cd38: 8b 75 e8 mov -0x18(%ebp),%esi
10cd3b: 83 c6 08 add $0x8,%esi
10cd3e: 29 d6 sub %edx,%esi
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
10cd40: 89 da mov %ebx,%edx
10cd42: 29 f2 sub %esi,%edx
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
10cd44: 3b 55 ec cmp -0x14(%ebp),%edx
10cd47: 0f 82 87 00 00 00 jb 10cdd4 <_Heap_Allocate_aligned+0x174>
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
10cd4d: 89 d0 mov %edx,%eax
10cd4f: 83 c8 01 or $0x1,%eax
10cd52: 89 41 04 mov %eax,0x4(%ecx)
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
10cd55: 8d 04 11 lea (%ecx,%edx,1),%eax
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
10cd58: 89 c1 mov %eax,%ecx
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
10cd5a: 89 10 mov %edx,(%eax)
the_block->size = alloc_size;
10cd5c: 89 70 04 mov %esi,0x4(%eax)
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
10cd5f: 83 4c 31 04 01 orl $0x1,0x4(%ecx,%esi,1)
/* Update statistics */
stats->free_size -= alloc_size;
10cd64: 8b 55 08 mov 0x8(%ebp),%edx
10cd67: 8b 42 30 mov 0x30(%edx),%eax
10cd6a: 29 f0 sub %esi,%eax
10cd6c: 89 42 30 mov %eax,0x30(%edx)
if(stats->min_free_size > stats->free_size)
10cd6f: 3b 42 34 cmp 0x34(%edx),%eax
10cd72: 73 03 jae 10cd77 <_Heap_Allocate_aligned+0x117>
stats->min_free_size = stats->free_size;
10cd74: 89 42 34 mov %eax,0x34(%edx)
stats->used_blocks += 1;
10cd77: 8b 4d 08 mov 0x8(%ebp),%ecx
10cd7a: ff 41 40 incl 0x40(%ecx)
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
10cd7d: 8b 41 4c mov 0x4c(%ecx),%eax
10cd80: 8b 55 f0 mov -0x10(%ebp),%edx
10cd83: 8d 44 02 01 lea 0x1(%edx,%eax,1),%eax
10cd87: 89 41 4c mov %eax,0x4c(%ecx)
stats->allocs += 1;
10cd8a: ff 41 48 incl 0x48(%ecx)
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
10cd8d: 89 f8 mov %edi,%eax
10cd8f: eb 2d jmp 10cdbe <_Heap_Allocate_aligned+0x15e>
10cd91: 8d 76 00 lea 0x0(%esi),%esi
{
return ( _Thread_Dispatch_disable_level == 0 );
}
/**
* This function returns TRUE if dispatching is disabled, and FALSE
10cd94: 8b 7d 10 mov 0x10(%ebp),%edi
10cd97: 8d 04 3e lea (%esi,%edi,1),%eax
10cd9a: 29 d0 sub %edx,%eax
10cd9c: 89 c2 mov %eax,%edx
10cd9e: 29 f2 sub %esi,%edx
10cda0: eb 88 jmp 10cd2a <_Heap_Allocate_aligned+0xca>
10cda2: 66 90 xchg %ax,%ax
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
if(the_size == 0)
return NULL;
if(alignment == 0)
10cda4: c7 45 10 04 00 00 00 movl $0x4,0x10(%ebp)
10cdab: e9 f1 fe ff ff jmp 10cca1 <_Heap_Allocate_aligned+0x41>
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
10cdb0: 31 c0 xor %eax,%eax
return user_ptr;
}
10cdb2: 8d 65 f4 lea -0xc(%ebp),%esp
10cdb5: 5b pop %ebx
10cdb6: 5e pop %esi
10cdb7: 5f pop %edi
10cdb8: c9 leave
10cdb9: c3 ret
10cdba: 66 90 xchg %ax,%ax
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
10cdbc: 31 c0 xor %eax,%eax
}
}
}
}
if(stats->max_search < search_count)
10cdbe: 8b 4d f0 mov -0x10(%ebp),%ecx
10cdc1: 8b 7d 08 mov 0x8(%ebp),%edi
10cdc4: 39 4f 44 cmp %ecx,0x44(%edi)
10cdc7: 73 e9 jae 10cdb2 <_Heap_Allocate_aligned+0x152>
stats->max_search = search_count;
10cdc9: 89 4f 44 mov %ecx,0x44(%edi)
return user_ptr;
}
10cdcc: 8d 65 f4 lea -0xc(%ebp),%esp
10cdcf: 5b pop %ebx
10cdd0: 5e pop %esi
10cdd1: 5f pop %edi
10cdd2: c9 leave
10cdd3: c3 ret
* This routine resets the current context of the calling thread
* to that of its initial state.
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
10cdd4: 8b 51 08 mov 0x8(%ecx),%edx
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
10cdd7: 8b 41 0c mov 0xc(%ecx),%eax
if ( _Thread_Executing->fp_context != NULL )
10cdda: 89 50 08 mov %edx,0x8(%eax)
_Context_Restore_fp( &_Thread_Executing->fp_context );
10cddd: 89 42 0c mov %eax,0xc(%edx)
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
10cde0: 8b 45 08 mov 0x8(%ebp),%eax
10cde3: ff 48 38 decl 0x38(%eax)
10cde6: 89 de mov %ebx,%esi
10cde8: e9 72 ff ff ff jmp 10cd5f <_Heap_Allocate_aligned+0xff>
0010b49c <_Heap_Block_allocate>:
uint32_t _Heap_Block_allocate(
Heap_Control* the_heap,
Heap_Block* the_block,
uint32_t alloc_size
)
{
10b49c: 55 push %ebp
10b49d: 89 e5 mov %esp,%ebp
10b49f: 57 push %edi
10b4a0: 56 push %esi
10b4a1: 53 push %ebx
10b4a2: 8b 75 0c mov 0xc(%ebp),%esi
10b4a5: 8b 7d 10 mov 0x10(%ebp),%edi
10b4a8: 8b 4e 04 mov 0x4(%esi),%ecx
10b4ab: 83 e1 fe and $0xfffffffe,%ecx
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
10b4ae: 89 cb mov %ecx,%ebx
10b4b0: 29 fb sub %edi,%ebx
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
10b4b2: 8b 45 08 mov 0x8(%ebp),%eax
10b4b5: 3b 58 14 cmp 0x14(%eax),%ebx
10b4b8: 72 4a jb 10b504 <_Heap_Block_allocate+0x68>
10b4ba: 8d 14 3e lea (%esi,%edi,1),%edx
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
10b4bd: 8b 4e 08 mov 0x8(%esi),%ecx
bool _Protected_heap_Get_block_size(
10b4c0: 8b 46 0c mov 0xc(%esi),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
10b4c3: 89 4a 08 mov %ecx,0x8(%edx)
);
10b4c6: 89 42 0c mov %eax,0xc(%edx)
10b4c9: 89 50 08 mov %edx,0x8(%eax)
10b4cc: 89 51 0c mov %edx,0xc(%ecx)
becomes used. This is slightly less optimal than leaving lower part
free as it requires replacing block in the free blocks list, but it
makes it possible to reuse this code in the _Heap_Resize_block(). */
Heap_Block *next_block = _Heap_Block_at(the_block, alloc_size);
_Heap_Block_replace(the_block, next_block);
the_block->size = alloc_size | HEAP_PREV_USED;
10b4cf: 89 f8 mov %edi,%eax
10b4d1: 83 c8 01 or $0x1,%eax
10b4d4: 89 46 04 mov %eax,0x4(%esi)
next_block->size = the_rest | HEAP_PREV_USED;
10b4d7: 89 d8 mov %ebx,%eax
10b4d9: 83 c8 01 or $0x1,%eax
10b4dc: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_at(next_block, the_rest)->prev_size = the_rest;
10b4df: 89 1c 1a mov %ebx,(%edx,%ebx,1)
alloc_size = block_size;
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
stats->free_blocks -= 1;
}
/* Update statistics */
stats->free_size -= alloc_size;
10b4e2: 8b 55 08 mov 0x8(%ebp),%edx
10b4e5: 8b 42 30 mov 0x30(%edx),%eax
10b4e8: 29 f8 sub %edi,%eax
10b4ea: 89 42 30 mov %eax,0x30(%edx)
if(stats->min_free_size > stats->free_size)
10b4ed: 3b 42 34 cmp 0x34(%edx),%eax
10b4f0: 73 03 jae 10b4f5 <_Heap_Block_allocate+0x59>
stats->min_free_size = stats->free_size;
10b4f2: 89 42 34 mov %eax,0x34(%edx)
stats->used_blocks += 1;
10b4f5: 8b 45 08 mov 0x8(%ebp),%eax
10b4f8: ff 40 40 incl 0x40(%eax)
return alloc_size;
}
10b4fb: 89 f8 mov %edi,%eax
10b4fd: 5b pop %ebx
10b4fe: 5e pop %esi
10b4ff: 5f pop %edi
10b500: c9 leave
10b501: c3 ret
10b502: 66 90 xchg %ax,%ax
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
10b504: 8b 56 08 mov 0x8(%esi),%edx
* @param[in] size is the amount of memory to allocate in bytes
10b507: 8b 46 0c mov 0xc(%esi),%eax
* @param[in] alignment the required alignment
10b50a: 89 50 08 mov %edx,0x8(%eax)
* @return NULL if unsuccessful and a pointer to the block if successful
10b50d: 89 42 0c mov %eax,0xc(%edx)
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
10b510: 83 4c 0e 04 01 orl $0x1,0x4(%esi,%ecx,1)
stats->free_blocks -= 1;
10b515: 8b 55 08 mov 0x8(%ebp),%edx
10b518: ff 4a 38 decl 0x38(%edx)
10b51b: 89 cf mov %ecx,%edi
10b51d: eb c3 jmp 10b4e2 <_Heap_Block_allocate+0x46>
0010b468 <_Heap_Calc_block_size>:
*/
size_t _Heap_Calc_block_size(
size_t size,
uint32_t page_size,
uint32_t min_size)
{
10b468: 55 push %ebp
10b469: 89 e5 mov %esp,%ebp
10b46b: 53 push %ebx
10b46c: 83 ec 04 sub $0x4,%esp
10b46f: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t block_size = size + HEAP_BLOCK_USED_OVERHEAD;
10b472: 8d 59 04 lea 0x4(%ecx),%ebx
* sizes.
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
10b475: 89 d8 mov %ebx,%eax
10b477: 31 d2 xor %edx,%edx
10b479: f7 75 0c divl 0xc(%ebp)
*/
10b47c: 85 d2 test %edx,%edx
10b47e: 74 05 je 10b485 <_Heap_Calc_block_size+0x1d>
10b480: 03 5d 0c add 0xc(%ebp),%ebx
10b483: 29 d3 sub %edx,%ebx
10b485: 89 d8 mov %ebx,%eax
10b487: 3b 5d 10 cmp 0x10(%ebp),%ebx
10b48a: 73 03 jae 10b48f <_Heap_Calc_block_size+0x27>
10b48c: 8b 45 10 mov 0x10(%ebp),%eax
_Heap_Align_up(&block_size, page_size);
if (block_size < min_size) block_size = min_size;
/* 'block_size' becomes <= 'size' if and only if overflow occured. */
return (block_size > size) ? block_size : 0;
10b48f: 39 c1 cmp %eax,%ecx
10b491: 72 02 jb 10b495 <_Heap_Calc_block_size+0x2d><== ALWAYS TAKEN
10b493: 31 c0 xor %eax,%eax
}
10b495: 5a pop %edx
10b496: 5b pop %ebx
10b497: c9 leave
10b498: c3 ret
00111460 <_Heap_Extend>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t *amount_extended
)
{
111460: 55 push %ebp
111461: 89 e5 mov %esp,%ebp
111463: 56 push %esi
111464: 53 push %ebx
111465: 83 ec 10 sub $0x10,%esp
111468: 8b 4d 08 mov 0x8(%ebp),%ecx
11146b: 8b 45 0c mov 0xc(%ebp),%eax
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
11146e: 39 41 18 cmp %eax,0x18(%ecx)
111471: 76 15 jbe 111488 <_Heap_Extend+0x28>
111473: 8b 51 1c mov 0x1c(%ecx),%edx
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
111476: 39 d0 cmp %edx,%eax
111478: 74 22 je 11149c <_Heap_Extend+0x3c>
11147a: b8 02 00 00 00 mov $0x2,%eax
stats->frees -= 1; /* Don't count subsequent call as actual free() */
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
return HEAP_EXTEND_SUCCESSFUL;
}
11147f: 8d 65 f8 lea -0x8(%ebp),%esp
111482: 5b pop %ebx
111483: 5e pop %esi
111484: c9 leave
111485: c3 ret
111486: 66 90 xchg %ax,%ax
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
111488: 8b 51 1c mov 0x1c(%ecx),%edx
11148b: 39 d0 cmp %edx,%eax
11148d: 73 e7 jae 111476 <_Heap_Extend+0x16>
11148f: b8 01 00 00 00 mov $0x1,%eax
stats->frees -= 1; /* Don't count subsequent call as actual free() */
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
return HEAP_EXTEND_SUCCESSFUL;
}
111494: 8d 65 f8 lea -0x8(%ebp),%esp
111497: 5b pop %ebx
111498: 5e pop %esi
111499: c9 leave
11149a: c3 ret
11149b: 90 nop
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
11149c: 8b 59 24 mov 0x24(%ecx),%ebx
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
11149f: 03 45 10 add 0x10(%ebp),%eax
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
1114a2: 89 41 1c mov %eax,0x1c(%ecx)
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
1114a5: 29 d8 sub %ebx,%eax
1114a7: 8d 70 f8 lea -0x8(%eax),%esi
* the outer most dispatching critical section, then a dispatching
* operation will be performed and, if necessary, control of the
* processor will be transferred to the heir thread.
*/
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
1114aa: 89 f0 mov %esi,%eax
1114ac: 31 d2 xor %edx,%edx
1114ae: f7 71 10 divl 0x10(%ecx)
1114b1: 29 d6 sub %edx,%esi
1114b3: 89 f2 mov %esi,%edx
_Heap_Align_down( &the_size, the_heap->page_size );
*amount_extended = size;
1114b5: 8b 45 10 mov 0x10(%ebp),%eax
1114b8: 8b 75 14 mov 0x14(%ebp),%esi
1114bb: 89 06 mov %eax,(%esi)
if( the_size < the_heap->min_block_size )
1114bd: 39 51 14 cmp %edx,0x14(%ecx)
1114c0: 76 06 jbe 1114c8 <_Heap_Extend+0x68> <== ALWAYS TAKEN
1114c2: 31 c0 xor %eax,%eax
1114c4: eb b9 jmp 11147f <_Heap_Extend+0x1f> <== NOT EXECUTED
1114c6: 66 90 xchg %ax,%ax <== NOT EXECUTED
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
1114c8: 8b 43 04 mov 0x4(%ebx),%eax
1114cb: 83 e0 01 and $0x1,%eax
1114ce: 09 d0 or %edx,%eax
1114d0: 89 43 04 mov %eax,0x4(%ebx)
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
1114d3: 8d 04 13 lea (%ebx,%edx,1),%eax
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
1114d6: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_heap->final = new_final;
1114dd: 89 41 24 mov %eax,0x24(%ecx)
stats->size += size;
1114e0: 8b 55 10 mov 0x10(%ebp),%edx
1114e3: 01 51 2c add %edx,0x2c(%ecx)
stats->used_blocks += 1;
1114e6: ff 41 40 incl 0x40(%ecx)
stats->frees -= 1; /* Don't count subsequent call as actual free() */
1114e9: ff 49 50 decl 0x50(%ecx)
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
1114ec: 83 ec 08 sub $0x8,%esp
1114ef: 8d 43 08 lea 0x8(%ebx),%eax
1114f2: 50 push %eax
1114f3: 51 push %ecx
1114f4: e8 8b b9 ff ff call 10ce84 <_Heap_Free>
1114f9: 31 c0 xor %eax,%eax
1114fb: 83 c4 10 add $0x10,%esp
1114fe: e9 7c ff ff ff jmp 11147f <_Heap_Extend+0x1f>
0010f35c <_Heap_Free>:
bool _Heap_Free(
Heap_Control *the_heap,
void *starting_address
)
{
10f35c: 55 push %ebp
10f35d: 89 e5 mov %esp,%ebp
10f35f: 57 push %edi
10f360: 56 push %esi
10f361: 53 push %ebx
10f362: 83 ec 18 sub $0x18,%esp
10f365: 8b 7d 08 mov 0x8(%ebp),%edi
10f368: 8b 45 0c mov 0xc(%ebp),%eax
uint32_t the_size;
uint32_t next_size;
Heap_Statistics *const stats = &the_heap->stats;
bool next_is_free;
if ( !_Addresses_Is_in_range(
10f36b: 8b 77 24 mov 0x24(%edi),%esi
10f36e: 8b 4f 20 mov 0x20(%edi),%ecx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10f371: 39 c1 cmp %eax,%ecx
10f373: 77 04 ja 10f379 <_Heap_Free+0x1d>
10f375: 39 c6 cmp %eax,%esi
10f377: 73 0b jae 10f384 <_Heap_Free+0x28> <== ALWAYS TAKEN
stats->used_blocks -= 1;
stats->free_size += the_size;
stats->frees += 1;
return( TRUE );
10f379: 31 c0 xor %eax,%eax
}
10f37b: 83 c4 18 add $0x18,%esp
10f37e: 5b pop %ebx
10f37f: 5e pop %esi
10f380: 5f pop %edi
10f381: c9 leave
10f382: c3 ret
10f383: 90 nop
10f384: 8d 58 f8 lea -0x8(%eax),%ebx
10f387: 31 d2 xor %edx,%edx
10f389: f7 77 10 divl 0x10(%edi)
10f38c: 29 d3 sub %edx,%ebx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10f38e: 39 d9 cmp %ebx,%ecx
10f390: 77 e7 ja 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f392: 39 de cmp %ebx,%esi
10f394: 72 e3 jb 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f396: 8b 43 04 mov 0x4(%ebx),%eax
10f399: 89 45 dc mov %eax,-0x24(%ebp)
10f39c: 83 e0 fe and $0xfffffffe,%eax
10f39f: 89 45 e8 mov %eax,-0x18(%ebp)
10f3a2: 01 d8 add %ebx,%eax
10f3a4: 89 45 e4 mov %eax,-0x1c(%ebp)
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10f3a7: 39 c1 cmp %eax,%ecx
10f3a9: 77 ce ja 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f3ab: 39 c6 cmp %eax,%esi
10f3ad: 72 ca jb 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f3af: 8b 50 04 mov 0x4(%eax),%edx
10f3b2: 89 55 e0 mov %edx,-0x20(%ebp)
if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
_HAssert( FALSE );
return( FALSE );
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10f3b5: f6 c2 01 test $0x1,%dl
10f3b8: 74 bf je 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f3ba: 83 e2 fe and $0xfffffffe,%edx
10f3bd: 89 55 ec mov %edx,-0x14(%ebp)
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
10f3c0: 39 c6 cmp %eax,%esi
10f3c2: 76 74 jbe 10f438 <_Heap_Free+0xdc>
10f3c4: 8b 55 e4 mov -0x1c(%ebp),%edx
10f3c7: 8b 45 ec mov -0x14(%ebp),%eax
10f3ca: 8b 44 02 04 mov 0x4(%edx,%eax,1),%eax
10f3ce: 83 f0 01 xor $0x1,%eax
10f3d1: 89 45 e0 mov %eax,-0x20(%ebp)
10f3d4: 8a 45 e0 mov -0x20(%ebp),%al
10f3d7: 83 e0 01 and $0x1,%eax
!_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size));
if ( !_Heap_Is_prev_used( the_block ) ) {
10f3da: f6 45 dc 01 testb $0x1,-0x24(%ebp)
10f3de: 75 5c jne 10f43c <_Heap_Free+0xe0>
uint32_t const prev_size = the_block->prev_size;
10f3e0: 8b 13 mov (%ebx),%edx
10f3e2: 89 55 f0 mov %edx,-0x10(%ebp)
10f3e5: 29 d3 sub %edx,%ebx
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10f3e7: 39 d9 cmp %ebx,%ecx
10f3e9: 77 8e ja 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
10f3eb: 39 de cmp %ebx,%esi
10f3ed: 72 8a jb 10f379 <_Heap_Free+0x1d> <== 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) ) {
10f3ef: f6 43 04 01 testb $0x1,0x4(%ebx)
10f3f3: 74 84 je 10f379 <_Heap_Free+0x1d> <== NEVER TAKEN
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
10f3f5: 84 c0 test %al,%al
10f3f7: 0f 84 a0 00 00 00 je 10f49d <_Heap_Free+0x141>
uint32_t const size = the_size + prev_size + next_size;
10f3fd: 8b 55 e8 mov -0x18(%ebp),%edx
10f400: 03 55 ec add -0x14(%ebp),%edx
10f403: 03 55 f0 add -0x10(%ebp),%edx
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
10f406: 8b 75 e4 mov -0x1c(%ebp),%esi
10f409: 8b 4e 08 mov 0x8(%esi),%ecx
* @param[in] size is the amount of memory to allocate in bytes
10f40c: 8b 46 0c mov 0xc(%esi),%eax
* @param[in] alignment the required alignment
10f40f: 89 48 08 mov %ecx,0x8(%eax)
* @return NULL if unsuccessful and a pointer to the block if successful
10f412: 89 41 0c mov %eax,0xc(%ecx)
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
10f415: ff 4f 38 decl 0x38(%edi)
prev_block->size = size | HEAP_PREV_USED;
10f418: 89 d0 mov %edx,%eax
10f41a: 83 c8 01 or $0x1,%eax
10f41d: 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;
10f420: 89 14 13 mov %edx,(%ebx,%edx,1)
10f423: 90 nop
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
10f424: ff 4f 40 decl 0x40(%edi)
stats->free_size += the_size;
10f427: 8b 75 e8 mov -0x18(%ebp),%esi
10f42a: 01 77 30 add %esi,0x30(%edi)
stats->frees += 1;
10f42d: ff 47 50 incl 0x50(%edi)
10f430: b0 01 mov $0x1,%al
10f432: e9 44 ff ff ff jmp 10f37b <_Heap_Free+0x1f>
10f437: 90 nop
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
10f438: 31 c0 xor %eax,%eax
10f43a: eb 9e jmp 10f3da <_Heap_Free+0x7e>
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = size;
}
}
else if ( next_is_free ) { /* coalesce next */
10f43c: 84 c0 test %al,%al
10f43e: 74 28 je 10f468 <_Heap_Free+0x10c>
uint32_t const size = the_size + next_size;
10f440: 8b 55 ec mov -0x14(%ebp),%edx
10f443: 03 55 e8 add -0x18(%ebp),%edx
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
10f446: 8b 75 e4 mov -0x1c(%ebp),%esi
10f449: 8b 4e 08 mov 0x8(%esi),%ecx
bool _Protected_heap_Get_block_size(
10f44c: 8b 46 0c mov 0xc(%esi),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
10f44f: 89 4b 08 mov %ecx,0x8(%ebx)
);
10f452: 89 43 0c mov %eax,0xc(%ebx)
10f455: 89 58 08 mov %ebx,0x8(%eax)
10f458: 89 59 0c mov %ebx,0xc(%ecx)
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
10f45b: 89 d0 mov %edx,%eax
10f45d: 83 c8 01 or $0x1,%eax
10f460: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( the_block, size );
next_block->prev_size = size;
10f463: 89 14 13 mov %edx,(%ebx,%edx,1)
10f466: eb bc jmp 10f424 <_Heap_Free+0xc8>
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10f468: 8b 47 08 mov 0x8(%edi),%eax
/**
10f46b: 89 43 08 mov %eax,0x8(%ebx)
* This routine returns the block of memory which begins
10f46e: 89 7b 0c mov %edi,0xc(%ebx)
* at @a starting_address to @a the_heap. Any coalescing which is
10f471: 89 5f 08 mov %ebx,0x8(%edi)
10f474: 89 58 0c mov %ebx,0xc(%eax)
}
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
10f477: 8b 45 e8 mov -0x18(%ebp),%eax
10f47a: 83 c8 01 or $0x1,%eax
10f47d: 89 43 04 mov %eax,0x4(%ebx)
next_block->size &= ~HEAP_PREV_USED;
10f480: 8b 45 e4 mov -0x1c(%ebp),%eax
10f483: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = the_size;
10f487: 8b 55 e8 mov -0x18(%ebp),%edx
10f48a: 89 10 mov %edx,(%eax)
stats->free_blocks += 1;
10f48c: 8b 47 38 mov 0x38(%edi),%eax
10f48f: 40 inc %eax
10f490: 89 47 38 mov %eax,0x38(%edi)
if ( stats->max_free_blocks < stats->free_blocks )
10f493: 3b 47 3c cmp 0x3c(%edi),%eax
10f496: 76 8c jbe 10f424 <_Heap_Free+0xc8>
stats->max_free_blocks = stats->free_blocks;
10f498: 89 47 3c mov %eax,0x3c(%edi)
10f49b: eb 87 jmp 10f424 <_Heap_Free+0xc8>
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
10f49d: 8b 55 e8 mov -0x18(%ebp),%edx
10f4a0: 03 55 f0 add -0x10(%ebp),%edx
prev_block->size = size | HEAP_PREV_USED;
10f4a3: 89 d0 mov %edx,%eax
10f4a5: 83 c8 01 or $0x1,%eax
10f4a8: 89 43 04 mov %eax,0x4(%ebx)
next_block->size &= ~HEAP_PREV_USED;
10f4ab: 8b 45 e4 mov -0x1c(%ebp),%eax
10f4ae: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
next_block->prev_size = size;
10f4b2: 89 10 mov %edx,(%eax)
10f4b4: e9 6b ff ff ff jmp 10f424 <_Heap_Free+0xc8>
00111504 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
111504: 55 push %ebp
111505: 89 e5 mov %esp,%ebp
111507: 53 push %ebx
111508: 8b 5d 08 mov 0x8(%ebp),%ebx
11150b: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Tail(the_heap);
info->number = 0;
11150e: c7 01 00 00 00 00 movl $0x0,(%ecx)
info->largest = 0;
111514: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
info->total = 0;
11151b: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
)
{
return ( the_thread == _Thread_Heir );
}
/**
111522: 8b 53 08 mov 0x8(%ebx),%edx
for(the_block = _Heap_First(the_heap);
the_block != tail;
111525: 39 d3 cmp %edx,%ebx
111527: 74 1d je 111546 <_Heap_Get_free_information+0x42><== NEVER TAKEN
111529: 8d 76 00 lea 0x0(%esi),%esi
11152c: 8b 42 04 mov 0x4(%edx),%eax
11152f: 83 e0 fe and $0xfffffffe,%eax
uint32_t const the_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
111532: ff 01 incl (%ecx)
info->total += the_size;
111534: 01 41 08 add %eax,0x8(%ecx)
if ( info->largest < the_size )
111537: 39 41 04 cmp %eax,0x4(%ecx)
11153a: 73 03 jae 11153f <_Heap_Get_free_information+0x3b><== NEVER TAKEN
info->largest = the_size;
11153c: 89 41 04 mov %eax,0x4(%ecx)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
the_block = the_block->next)
11153f: 8b 52 08 mov 0x8(%edx),%edx
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
111542: 39 d3 cmp %edx,%ebx
111544: 75 e6 jne 11152c <_Heap_Get_free_information+0x28>
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
111546: 5b pop %ebx
111547: c9 leave
111548: c3 ret
0011154c <_Heap_Get_information>:
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
11154c: 55 push %ebp
11154d: 89 e5 mov %esp,%ebp
11154f: 56 push %esi
111550: 53 push %ebx
111551: 8b 45 08 mov 0x8(%ebp),%eax
111554: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *the_block = the_heap->start;
111557: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->final;
11155a: 8b 70 24 mov 0x24(%eax),%esi
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
11155d: c7 01 00 00 00 00 movl $0x0,(%ecx)
the_info->Free.total = 0;
111563: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
the_info->Free.largest = 0;
11156a: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
the_info->Used.number = 0;
111571: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
the_info->Used.total = 0;
111578: c7 41 14 00 00 00 00 movl $0x0,0x14(%ecx)
the_info->Used.largest = 0;
11157f: c7 41 10 00 00 00 00 movl $0x0,0x10(%ecx)
while ( the_block != end ) {
111586: 39 f2 cmp %esi,%edx
111588: 74 42 je 1115cc <_Heap_Get_information+0x80><== NEVER TAKEN
11158a: 8b 5a 04 mov 0x4(%edx),%ebx
11158d: eb 13 jmp 1115a2 <_Heap_Get_information+0x56>
11158f: 90 nop
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
111590: ff 41 0c incl 0xc(%ecx)
the_info->Used.total += the_size;
111593: 01 41 14 add %eax,0x14(%ecx)
if ( the_info->Used.largest < the_size )
111596: 39 41 10 cmp %eax,0x10(%ecx)
111599: 73 03 jae 11159e <_Heap_Get_information+0x52>
the_info->Used.largest = the_size;
11159b: 89 41 10 mov %eax,0x10(%ecx)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
11159e: 39 d6 cmp %edx,%esi
1115a0: 74 2a je 1115cc <_Heap_Get_information+0x80>
1115a2: 89 d8 mov %ebx,%eax
1115a4: 83 e0 fe and $0xfffffffe,%eax
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
1115a7: 01 c2 add %eax,%edx
1115a9: 8b 5a 04 mov 0x4(%edx),%ebx
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
1115ac: f6 c3 01 test $0x1,%bl
1115af: 75 df jne 111590 <_Heap_Get_information+0x44>
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
1115b1: ff 01 incl (%ecx)
the_info->Free.total += the_size;
1115b3: 01 41 08 add %eax,0x8(%ecx)
if ( the_info->Free.largest < the_size )
1115b6: 39 41 04 cmp %eax,0x4(%ecx)
1115b9: 73 03 jae 1115be <_Heap_Get_information+0x72><== NEVER TAKEN
the_info->Free.largest = the_size;
1115bb: 89 41 04 mov %eax,0x4(%ecx)
if ( the_size != next_block->prev_size )
1115be: 39 02 cmp %eax,(%edx)
1115c0: 74 dc je 11159e <_Heap_Get_information+0x52><== ALWAYS TAKEN
1115c2: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
1115c7: 5b pop %ebx <== NOT EXECUTED
1115c8: 5e pop %esi <== NOT EXECUTED
1115c9: c9 leave <== NOT EXECUTED
1115ca: c3 ret <== NOT EXECUTED
1115cb: 90 nop <== NOT EXECUTED
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
1115cc: 83 41 14 08 addl $0x8,0x14(%ecx)
1115d0: 31 c0 xor %eax,%eax
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
1115d2: 5b pop %ebx
1115d3: 5e pop %esi
1115d4: c9 leave
1115d5: c3 ret
0010b338 <_Heap_Initialize>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
10b338: 55 push %ebp
10b339: 89 e5 mov %esp,%ebp
10b33b: 57 push %edi
10b33c: 56 push %esi
10b33d: 53 push %ebx
10b33e: 83 ec 08 sub $0x8,%esp
10b341: 8b 7d 08 mov 0x8(%ebp),%edi
10b344: 8b 4d 14 mov 0x14(%ebp),%ecx
_H_uptr_t start;
_H_uptr_t aligned_start;
uint32_t overhead;
Heap_Statistics *const stats = &the_heap->stats;
if (page_size == 0)
10b347: 85 c9 test %ecx,%ecx
10b349: 0f 85 fd 00 00 00 jne 10b44c <_Heap_Initialize+0x114>
10b34f: b1 04 mov $0x4,%cl
10b351: 31 f6 xor %esi,%esi
/* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET
(value of user pointer) is aligned on 'page_size' boundary. Make sure
resulting 'aligned_start' is not below 'starting_address'. */
start = _H_p2u(starting_address);
aligned_start = start + HEAP_BLOCK_USER_OFFSET;
10b353: 8b 5d 0c mov 0xc(%ebp),%ebx
10b356: 83 c3 08 add $0x8,%ebx
10b359: 89 d8 mov %ebx,%eax
10b35b: 31 d2 xor %edx,%edx
10b35d: f7 f1 div %ecx
10b35f: 85 d2 test %edx,%edx
10b361: 74 05 je 10b368 <_Heap_Initialize+0x30>
10b363: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
10b366: 29 d3 sub %edx,%ebx
_Heap_Align_up_uptr ( &aligned_start, page_size );
aligned_start -= HEAP_BLOCK_USER_OFFSET;
10b368: 83 eb 08 sub $0x8,%ebx
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
*/
10b36b: 85 f6 test %esi,%esi
10b36d: 0f 85 cd 00 00 00 jne 10b440 <_Heap_Initialize+0x108>
10b373: b8 10 00 00 00 mov $0x10,%eax
10b378: 89 47 14 mov %eax,0x14(%edi)
/* Calculate 'the_size' -- size of the first block so that there is enough
space at the end for the permanent last block. It is equal to 'size'
minus total overhead aligned down to the nearest multiple of
'page_size'. */
overhead = HEAP_OVERHEAD + (aligned_start - start);
10b37b: 89 d8 mov %ebx,%eax
10b37d: 2b 45 0c sub 0xc(%ebp),%eax
10b380: 83 c0 08 add $0x8,%eax
if ( size < overhead )
10b383: 3b 45 10 cmp 0x10(%ebp),%eax
10b386: 0f 87 a8 00 00 00 ja 10b434 <_Heap_Initialize+0xfc> <== NEVER TAKEN
return 0; /* Too small area for the heap */
the_size = size - overhead;
10b38c: 8b 75 10 mov 0x10(%ebp),%esi
10b38f: 29 c6 sub %eax,%esi
*
* @return free block information filled in.
*/
bool _Protected_heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
10b391: 89 f0 mov %esi,%eax
10b393: 31 d2 xor %edx,%edx
10b395: f7 f1 div %ecx
_Heap_Align_down ( &the_size, page_size );
if ( the_size == 0 )
10b397: 29 d6 sub %edx,%esi
10b399: 0f 84 95 00 00 00 je 10b434 <_Heap_Initialize+0xfc>
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
10b39f: 89 4f 10 mov %ecx,0x10(%edi)
the_heap->begin = starting_address;
10b3a2: 8b 45 0c mov 0xc(%ebp),%eax
10b3a5: 89 47 18 mov %eax,0x18(%edi)
the_heap->end = starting_address + size;
10b3a8: 8b 45 0c mov 0xc(%ebp),%eax
10b3ab: 03 45 10 add 0x10(%ebp),%eax
10b3ae: 89 47 1c mov %eax,0x1c(%edi)
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
10b3b1: 89 0b mov %ecx,(%ebx)
the_block->size = the_size | HEAP_PREV_USED;
10b3b3: 89 f0 mov %esi,%eax
10b3b5: 83 c8 01 or $0x1,%eax
10b3b8: 89 43 04 mov %eax,0x4(%ebx)
the_block->next = _Heap_Tail( the_heap );
10b3bb: 89 7b 08 mov %edi,0x8(%ebx)
the_block->prev = _Heap_Head( the_heap );
10b3be: 89 7b 0c mov %edi,0xc(%ebx)
_Heap_Head(the_heap)->next = the_block;
10b3c1: 89 5f 08 mov %ebx,0x8(%edi)
_Heap_Tail(the_heap)->prev = the_block;
10b3c4: 89 5f 0c mov %ebx,0xc(%edi)
the_heap->start = the_block;
10b3c7: 89 5f 20 mov %ebx,0x20(%edi)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10b3ca: 8d 04 33 lea (%ebx,%esi,1),%eax
_HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT));
_HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size));
_HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size));
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
10b3cd: 89 47 24 mov %eax,0x24(%edi)
the_block->prev_size = the_size; /* Previous block is free */
10b3d0: 89 30 mov %esi,(%eax)
the_block->size = page_size;
10b3d2: 89 48 04 mov %ecx,0x4(%eax)
stats->size = size;
10b3d5: 8b 45 10 mov 0x10(%ebp),%eax
10b3d8: 89 47 2c mov %eax,0x2c(%edi)
stats->free_size = the_size;
10b3db: 89 77 30 mov %esi,0x30(%edi)
stats->min_free_size = the_size;
10b3de: 89 77 34 mov %esi,0x34(%edi)
stats->free_blocks = 1;
10b3e1: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
stats->max_free_blocks = 1;
10b3e8: c7 47 3c 01 00 00 00 movl $0x1,0x3c(%edi)
stats->used_blocks = 0;
10b3ef: c7 47 40 00 00 00 00 movl $0x0,0x40(%edi)
stats->max_search = 0;
10b3f6: c7 47 44 00 00 00 00 movl $0x0,0x44(%edi)
stats->allocs = 0;
10b3fd: c7 47 48 00 00 00 00 movl $0x0,0x48(%edi)
stats->searches = 0;
10b404: c7 47 4c 00 00 00 00 movl $0x0,0x4c(%edi)
stats->frees = 0;
10b40b: c7 47 50 00 00 00 00 movl $0x0,0x50(%edi)
stats->resizes = 0;
10b412: c7 47 54 00 00 00 00 movl $0x0,0x54(%edi)
stats->instance = instance++;
10b419: a1 c0 e3 11 00 mov 0x11e3c0,%eax
10b41e: 89 47 28 mov %eax,0x28(%edi)
10b421: 40 inc %eax
10b422: a3 c0 e3 11 00 mov %eax,0x11e3c0
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
10b427: 8d 46 fc lea -0x4(%esi),%eax
}
10b42a: 83 c4 08 add $0x8,%esp
10b42d: 5b pop %ebx
10b42e: 5e pop %esi
10b42f: 5f pop %edi
10b430: c9 leave
10b431: c3 ret
10b432: 66 90 xchg %ax,%ax
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
10b434: 31 c0 xor %eax,%eax
}
10b436: 83 c4 08 add $0x8,%esp
10b439: 5b pop %ebx
10b43a: 5e pop %esi
10b43b: 5f pop %edi
10b43c: c9 leave
10b43d: c3 ret
10b43e: 66 90 xchg %ax,%ax
*
* @param[in] the_heap pointer to heap header
* @param[in] the_info pointer to a status information area
*
* @return true if successfully able to return information
*/
10b440: 8d 41 10 lea 0x10(%ecx),%eax
10b443: 29 f0 sub %esi,%eax
10b445: e9 2e ff ff ff jmp 10b378 <_Heap_Initialize+0x40>
10b44a: 66 90 xchg %ax,%ax
10b44c: 89 c8 mov %ecx,%eax
10b44e: 83 e0 03 and $0x3,%eax
10b451: 74 05 je 10b458 <_Heap_Initialize+0x120>
10b453: 83 c1 04 add $0x4,%ecx
10b456: 29 c1 sub %eax,%ecx
10b458: b8 10 00 00 00 mov $0x10,%eax
10b45d: 31 d2 xor %edx,%edx
10b45f: f7 f1 div %ecx
10b461: 89 d6 mov %edx,%esi
10b463: e9 eb fe ff ff jmp 10b353 <_Heap_Initialize+0x1b>
00116ac8 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
116ac8: 55 push %ebp
116ac9: 89 e5 mov %esp,%ebp
116acb: 57 push %edi
116acc: 56 push %esi
116acd: 53 push %ebx
116ace: 83 ec 3c sub $0x3c,%esp
116ad1: 8b 75 08 mov 0x8(%ebp),%esi
116ad4: 8b 4d 0c mov 0xc(%ebp),%ecx
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
116ad7: 8b 46 14 mov 0x14(%esi),%eax
116ada: 89 45 e0 mov %eax,-0x20(%ebp)
uint32_t const page_size = the_heap->page_size;
116add: 8b 56 10 mov 0x10(%esi),%edx
116ae0: 89 55 e4 mov %edx,-0x1c(%ebp)
*old_mem_size = 0;
116ae3: 8b 7d 14 mov 0x14(%ebp),%edi
116ae6: c7 07 00 00 00 00 movl $0x0,(%edi)
*avail_mem_size = 0;
116aec: 8b 45 18 mov 0x18(%ebp),%eax
116aef: c7 00 00 00 00 00 movl $0x0,(%eax)
116af5: 8d 59 f8 lea -0x8(%ecx),%ebx
116af8: 89 c8 mov %ecx,%eax
116afa: 31 d2 xor %edx,%edx
116afc: f7 76 10 divl 0x10(%esi)
116aff: 29 d3 sub %edx,%ebx
116b01: 8b 56 24 mov 0x24(%esi),%edx
116b04: 8b 46 20 mov 0x20(%esi),%eax
/* end of include file */
116b07: 39 c3 cmp %eax,%ebx
116b09: 72 04 jb 116b0f <_Heap_Resize_block+0x47><== NEVER TAKEN
116b0b: 39 d3 cmp %edx,%ebx
116b0d: 76 0d jbe 116b1c <_Heap_Resize_block+0x54>
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
116b0f: b8 02 00 00 00 mov $0x2,%eax
}
116b14: 8d 65 f4 lea -0xc(%ebp),%esp
116b17: 5b pop %ebx
116b18: 5e pop %esi
116b19: 5f pop %edi
116b1a: c9 leave
116b1b: c3 ret
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
116b1c: 8b 7b 04 mov 0x4(%ebx),%edi
116b1f: 89 7d cc mov %edi,-0x34(%ebp)
116b22: 83 e7 fe and $0xfffffffe,%edi
116b25: 89 7d d8 mov %edi,-0x28(%ebp)
116b28: 01 df add %ebx,%edi
116b2a: 89 7d c0 mov %edi,-0x40(%ebp)
/* end of include file */
116b2d: 39 f8 cmp %edi,%eax
116b2f: 77 de ja 116b0f <_Heap_Resize_block+0x47><== NEVER TAKEN
116b31: 39 fa cmp %edi,%edx
116b33: 72 da jb 116b0f <_Heap_Resize_block+0x47><== NEVER TAKEN
116b35: 8b 47 04 mov 0x4(%edi),%eax
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
116b38: a8 01 test $0x1,%al
116b3a: 74 d3 je 116b0f <_Heap_Resize_block+0x47><== NEVER TAKEN
116b3c: 83 e0 fe and $0xfffffffe,%eax
116b3f: 89 45 d0 mov %eax,-0x30(%ebp)
116b42: 01 f8 add %edi,%eax
116b44: 89 45 d4 mov %eax,-0x2c(%ebp)
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
116b47: 39 fa cmp %edi,%edx
116b49: 0f 84 11 01 00 00 je 116c60 <_Heap_Resize_block+0x198><== NEVER TAKEN
116b4f: 8b 55 d4 mov -0x2c(%ebp),%edx
116b52: 8b 42 04 mov 0x4(%edx),%eax
116b55: 83 e0 01 and $0x1,%eax
116b58: 88 45 f3 mov %al,-0xd(%ebp)
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
116b5b: 8b 7d cc mov -0x34(%ebp),%edi
116b5e: 83 e7 01 and $0x1,%edi
116b61: 89 7d dc mov %edi,-0x24(%ebp)
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
116b64: 8b 45 c0 mov -0x40(%ebp),%eax
116b67: 29 c8 sub %ecx,%eax
116b69: 83 c0 04 add $0x4,%eax
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
116b6c: 8b 55 14 mov 0x14(%ebp),%edx
116b6f: 89 02 mov %eax,(%edx)
if (size > old_user_size) {
116b71: 3b 45 10 cmp 0x10(%ebp),%eax
116b74: 73 3a jae 116bb0 <_Heap_Resize_block+0xe8>
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
116b76: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
116b7a: 75 29 jne 116ba5 <_Heap_Resize_block+0xdd>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
116b7c: 8b 4d 10 mov 0x10(%ebp),%ecx
116b7f: 29 c1 sub %eax,%ecx
116b81: 89 c8 mov %ecx,%eax
116b83: 31 d2 xor %edx,%edx
116b85: f7 75 e4 divl -0x1c(%ebp)
116b88: 85 d2 test %edx,%edx
116b8a: 74 05 je 116b91 <_Heap_Resize_block+0xc9><== NEVER TAKEN
116b8c: 03 4d e4 add -0x1c(%ebp),%ecx
116b8f: 29 d1 sub %edx,%ecx
116b91: 89 c8 mov %ecx,%eax
116b93: 3b 4d e0 cmp -0x20(%ebp),%ecx
116b96: 0f 82 a0 00 00 00 jb 116c3c <_Heap_Resize_block+0x174><== ALWAYS TAKEN
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
116b9c: 39 45 d0 cmp %eax,-0x30(%ebp)
116b9f: 0f 83 9f 00 00 00 jae 116c44 <_Heap_Resize_block+0x17c><== ALWAYS TAKEN
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
116ba5: b8 01 00 00 00 mov $0x1,%eax
116baa: e9 65 ff ff ff jmp 116b14 <_Heap_Resize_block+0x4c>
116baf: 90 nop
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
116bb0: 89 c1 mov %eax,%ecx
116bb2: 2b 4d 10 sub 0x10(%ebp),%ecx
116bb5: 89 c8 mov %ecx,%eax
116bb7: 31 d2 xor %edx,%edx
116bb9: f7 75 e4 divl -0x1c(%ebp)
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
116bbc: 29 d1 sub %edx,%ecx
116bbe: 89 4d e8 mov %ecx,-0x18(%ebp)
116bc1: 74 69 je 116c2c <_Heap_Resize_block+0x164>
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
116bc3: 8b 55 d8 mov -0x28(%ebp),%edx
116bc6: 29 ca sub %ecx,%edx
116bc8: 89 55 ec mov %edx,-0x14(%ebp)
if (new_block_size < min_block_size) {
116bcb: 39 55 e0 cmp %edx,-0x20(%ebp)
116bce: 76 0d jbe 116bdd <_Heap_Resize_block+0x115>
uint32_t delta = min_block_size - new_block_size;
116bd0: 8b 45 e0 mov -0x20(%ebp),%eax
116bd3: 29 d0 sub %edx,%eax
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
116bd5: 29 45 e8 sub %eax,-0x18(%ebp)
116bd8: 74 52 je 116c2c <_Heap_Resize_block+0x164><== ALWAYS TAKEN
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
116bda: 01 45 ec add %eax,-0x14(%ebp) <== NOT EXECUTED
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
116bdd: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
116be1: 0f 85 85 00 00 00 jne 116c6c <_Heap_Resize_block+0x1a4><== NEVER TAKEN
116be7: 8b 7d ec mov -0x14(%ebp),%edi
116bea: 8d 14 3b lea (%ebx,%edi,1),%edx
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
116bed: 8b 4d e8 mov -0x18(%ebp),%ecx
116bf0: 03 4d d0 add -0x30(%ebp),%ecx
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
116bf3: 8b 45 dc mov -0x24(%ebp),%eax
116bf6: 09 c7 or %eax,%edi
116bf8: 89 7b 04 mov %edi,0x4(%ebx)
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
116bfb: 89 c8 mov %ecx,%eax
116bfd: 83 c8 01 or $0x1,%eax
116c00: 89 42 04 mov %eax,0x4(%edx)
next_next_block->prev_size = new_next_block_size;
116c03: 8b 7d d4 mov -0x2c(%ebp),%edi
116c06: 89 0f mov %ecx,(%edi)
{
return (state == SYSTEM_STATE_FAILED);
}
/**@}*/
116c08: 8b 45 c0 mov -0x40(%ebp),%eax
116c0b: 8b 58 08 mov 0x8(%eax),%ebx
#endif
116c0e: 8b 40 0c mov 0xc(%eax),%eax
/* end of include file */
116c11: 89 5a 08 mov %ebx,0x8(%edx)
116c14: 89 42 0c mov %eax,0xc(%edx)
116c17: 89 50 08 mov %edx,0x8(%eax)
116c1a: 89 53 0c mov %edx,0xc(%ebx)
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
116c1d: 8b 45 e8 mov -0x18(%ebp),%eax
116c20: 01 46 30 add %eax,0x30(%esi)
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
116c23: 83 e9 04 sub $0x4,%ecx
116c26: 8b 55 18 mov 0x18(%ebp),%edx
116c29: 89 0a mov %ecx,(%edx)
116c2b: 90 nop
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
}
}
}
++stats->resizes;
116c2c: ff 46 54 incl 0x54(%esi)
116c2f: 31 c0 xor %eax,%eax
return HEAP_RESIZE_SUCCESSFUL;
}
116c31: 8d 65 f4 lea -0xc(%ebp),%esp
116c34: 5b pop %ebx
116c35: 5e pop %esi
116c36: 5f pop %edi
116c37: c9 leave
116c38: c3 ret
116c39: 8d 76 00 lea 0x0(%esi),%esi
116c3c: 8b 45 e0 mov -0x20(%ebp),%eax
116c3f: e9 58 ff ff ff jmp 116b9c <_Heap_Resize_block+0xd4>
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
116c44: 52 push %edx
116c45: 50 push %eax
116c46: ff 75 c0 pushl -0x40(%ebp)
116c49: 56 push %esi
116c4a: e8 4d 48 ff ff call 10b49c <_Heap_Block_allocate>
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
116c4f: 03 45 d8 add -0x28(%ebp),%eax
116c52: 0b 45 dc or -0x24(%ebp),%eax
116c55: 89 43 04 mov %eax,0x4(%ebx)
--stats->used_blocks;
116c58: ff 4e 40 decl 0x40(%esi)
116c5b: 83 c4 10 add $0x10,%esp
116c5e: eb cc jmp 116c2c <_Heap_Resize_block+0x164>
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
116c60: c6 45 f3 01 movb $0x1,-0xd(%ebp) <== NOT EXECUTED
116c64: e9 f2 fe ff ff jmp 116b5b <_Heap_Resize_block+0x93><== NOT EXECUTED
116c69: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
116c6c: 8b 7d e8 mov -0x18(%ebp),%edi <== NOT EXECUTED
116c6f: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED
116c72: 77 b8 ja 116c2c <_Heap_Resize_block+0x164><== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
116c74: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
116c77: 09 45 dc or %eax,-0x24(%ebp) <== NOT EXECUTED
116c7a: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED
116c7d: 89 53 04 mov %edx,0x4(%ebx) <== NOT EXECUTED
116c80: 8d 04 03 lea (%ebx,%eax,1),%eax <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
116c83: 8b 55 e8 mov -0x18(%ebp),%edx <== NOT EXECUTED
116c86: 83 ca 01 or $0x1,%edx <== NOT EXECUTED
116c89: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
116c8c: ff 46 40 incl 0x40(%esi) <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
116c8f: ff 4e 50 decl 0x50(%esi) <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
116c92: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
116c95: 83 c0 08 add $0x8,%eax <== NOT EXECUTED
116c98: 50 push %eax <== NOT EXECUTED
116c99: 56 push %esi <== NOT EXECUTED
116c9a: e8 bd 86 ff ff call 10f35c <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
116c9f: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
116ca2: 83 e8 04 sub $0x4,%eax <== NOT EXECUTED
116ca5: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED
116ca8: 89 02 mov %eax,(%edx) <== NOT EXECUTED
116caa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116cad: e9 7a ff ff ff jmp 116c2c <_Heap_Resize_block+0x164><== NOT EXECUTED
00116cb4 <_Heap_Size_of_user_area>:
bool _Heap_Size_of_user_area(
Heap_Control *the_heap,
void *starting_address,
size_t *size
)
{
116cb4: 55 push %ebp
116cb5: 89 e5 mov %esp,%ebp
116cb7: 57 push %edi
116cb8: 56 push %esi
116cb9: 53 push %ebx
116cba: 83 ec 0c sub $0xc,%esp
116cbd: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *next_block;
uint32_t the_size;
if ( !_Addresses_Is_in_range(
116cc0: 8b 45 08 mov 0x8(%ebp),%eax
116cc3: 8b 70 24 mov 0x24(%eax),%esi
116cc6: 8b 48 20 mov 0x20(%eax),%ecx
/* end of include file */
116cc9: 39 f9 cmp %edi,%ecx
116ccb: 77 04 ja 116cd1 <_Heap_Size_of_user_area+0x1d>
116ccd: 39 fe cmp %edi,%esi
116ccf: 73 0b jae 116cdc <_Heap_Size_of_user_area+0x28><== ALWAYS TAKEN
area of 'the_block'. */
*size = _Addresses_Subtract ( next_block, starting_address )
+ HEAP_BLOCK_HEADER_OFFSET;
return( TRUE );
116cd1: 31 c0 xor %eax,%eax
}
116cd3: 83 c4 0c add $0xc,%esp
116cd6: 5b pop %ebx
116cd7: 5e pop %esi
116cd8: 5f pop %edi
116cd9: c9 leave
116cda: c3 ret
116cdb: 90 nop
116cdc: 8d 57 f8 lea -0x8(%edi),%edx
116cdf: 89 55 e8 mov %edx,-0x18(%ebp)
116ce2: 89 f8 mov %edi,%eax
116ce4: 8b 5d 08 mov 0x8(%ebp),%ebx
116ce7: 31 d2 xor %edx,%edx
116ce9: f7 73 10 divl 0x10(%ebx)
116cec: 29 55 e8 sub %edx,-0x18(%ebp)
/* end of include file */
116cef: 3b 4d e8 cmp -0x18(%ebp),%ecx
116cf2: 77 dd ja 116cd1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
116cf4: 3b 75 e8 cmp -0x18(%ebp),%esi
116cf7: 72 d8 jb 116cd1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
116cf9: 8b 55 e8 mov -0x18(%ebp),%edx
116cfc: 8b 42 04 mov 0x4(%edx),%eax
116cff: 83 e0 fe and $0xfffffffe,%eax
116d02: 01 d0 add %edx,%eax
/* end of include file */
116d04: 39 c1 cmp %eax,%ecx
116d06: 77 c9 ja 116cd1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
116d08: 39 c6 cmp %eax,%esi
116d0a: 72 c5 jb 116cd1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
_HAssert(_Heap_Is_block_in( the_heap, next_block ));
_HAssert(_Heap_Is_prev_used( next_block ));
if (
116d0c: f6 40 04 01 testb $0x1,0x4(%eax)
116d10: 74 bf je 116cd1 <_Heap_Size_of_user_area+0x1d><== NEVER TAKEN
and then add correction equal to the offset of the 'size' field of the
'Heap_Block' structure. The correction is due to the fact that
'prev_size' field of the next block is actually used as user accessible
area of 'the_block'. */
*size = _Addresses_Subtract ( next_block, starting_address )
116d12: 29 f8 sub %edi,%eax
116d14: 83 c0 04 add $0x4,%eax
116d17: 8b 5d 10 mov 0x10(%ebp),%ebx
116d1a: 89 03 mov %eax,(%ebx)
116d1c: b0 01 mov $0x1,%al
116d1e: eb b3 jmp 116cd3 <_Heap_Size_of_user_area+0x1f>
00111644 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
111644: 55 push %ebp
111645: 89 e5 mov %esp,%ebp
111647: 57 push %edi
111648: 56 push %esi
111649: 53 push %ebx
11164a: 83 ec 1c sub $0x1c,%esp
11164d: 8b 75 08 mov 0x8(%ebp),%esi
Heap_Block *the_block = the_heap->start;
111650: 8b 7e 20 mov 0x20(%esi),%edi
Heap_Block *const end = the_heap->final;
111653: 8b 46 24 mov 0x24(%esi),%eax
111656: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
111659: 8b 45 0c mov 0xc(%ebp),%eax
11165c: 85 c0 test %eax,%eax
11165e: 0f 88 67 02 00 00 js 1118cb <_Heap_Walk+0x287> <== NEVER TAKEN
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
111664: f6 47 04 01 testb $0x1,0x4(%edi)
111668: 0f 84 3e 02 00 00 je 1118ac <_Heap_Walk+0x268> <== NEVER TAKEN
11166e: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
111675: 8b 07 mov (%edi),%eax
111677: 3b 46 10 cmp 0x10(%esi),%eax
11167a: 74 1a je 111696 <_Heap_Walk+0x52> <== ALWAYS TAKEN
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
11167c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11167f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111682: 68 e8 cb 11 00 push $0x11cbe8 <== NOT EXECUTED
111687: e8 38 7d ff ff call 1093c4 <printk> <== NOT EXECUTED
11168c: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111693: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
111696: 3b 7d e4 cmp -0x1c(%ebp),%edi
111699: 0f 84 37 02 00 00 je 1118d6 <_Heap_Walk+0x292> <== NEVER TAKEN
11169f: 8b 57 04 mov 0x4(%edi),%edx
1116a2: 89 d3 mov %edx,%ebx
1116a4: 83 e3 fe and $0xfffffffe,%ebx
/** @brief _Thread_Is_proxy_blocking
*
* status which indicates that a proxy is blocking, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
uint32_t code
1116a7: 8d 04 1f lea (%edi,%ebx,1),%eax
1116aa: 89 45 ec mov %eax,-0x14(%ebp)
1116ad: 8b 46 24 mov 0x24(%esi),%eax
#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 );
1116b0: 8b 4d ec mov -0x14(%ebp),%ecx
1116b3: 39 4e 20 cmp %ecx,0x20(%esi)
1116b6: 0f 87 14 01 00 00 ja 1117d0 <_Heap_Walk+0x18c> <== NEVER TAKEN
1116bc: 39 c1 cmp %eax,%ecx
1116be: 0f 87 0c 01 00 00 ja 1117d0 <_Heap_Walk+0x18c> <== NEVER TAKEN
1116c4: 83 e2 01 and $0x1,%edx
1116c7: 88 55 f3 mov %dl,-0xd(%ebp)
1116ca: 66 90 xchg %ax,%ax
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
1116cc: 8b 4d ec mov -0x14(%ebp),%ecx
1116cf: f6 41 04 01 testb $0x1,0x4(%ecx)
1116d3: 0f 85 53 01 00 00 jne 11182c <_Heap_Walk+0x1e8>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
1116d9: 8b 45 ec mov -0x14(%ebp),%eax
1116dc: 39 18 cmp %ebx,(%eax)
1116de: 74 1a je 1116fa <_Heap_Walk+0xb6> <== ALWAYS TAKEN
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
1116e0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1116e3: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1116e6: 68 40 cc 11 00 push $0x11cc40 <== NOT EXECUTED
1116eb: e8 d4 7c ff ff call 1093c4 <printk> <== NOT EXECUTED
1116f0: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
1116f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
1116fa: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
1116fe: 75 25 jne 111725 <_Heap_Walk+0xe1> <== ALWAYS TAKEN
if (do_dump || error) printk("\n");
111700: 8b 45 e8 mov -0x18(%ebp),%eax <== NOT EXECUTED
111703: 85 c0 test %eax,%eax <== NOT EXECUTED
111705: 0f 85 81 01 00 00 jne 11188c <_Heap_Walk+0x248> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
11170b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11170e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111711: 68 6c cc 11 00 push $0x11cc6c <== NOT EXECUTED
111716: e8 a9 7c ff ff call 1093c4 <printk> <== NOT EXECUTED
11171b: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111722: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
)
{
return ( the_thread == _Thread_Heir );
}
/**
111725: 8b 46 08 mov 0x8(%esi),%eax
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
111728: 39 c7 cmp %eax,%edi
11172a: 75 13 jne 11173f <_Heap_Walk+0xfb>
11172c: e9 fb 00 00 00 jmp 11182c <_Heap_Walk+0x1e8>
111731: 8d 76 00 lea 0x0(%esi),%esi
block = block->next;
111734: 8b 40 08 mov 0x8(%eax),%eax
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
111737: 39 f8 cmp %edi,%eax
111739: 0f 84 ed 00 00 00 je 11182c <_Heap_Walk+0x1e8>
11173f: 39 c6 cmp %eax,%esi
111741: 75 f1 jne 111734 <_Heap_Walk+0xf0> <== ALWAYS TAKEN
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
111743: 8b 4d e8 mov -0x18(%ebp),%ecx <== NOT EXECUTED
111746: 85 c9 test %ecx,%ecx <== NOT EXECUTED
111748: 74 10 je 11175a <_Heap_Walk+0x116> <== NOT EXECUTED
11174a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11174d: 68 4b a7 11 00 push $0x11a74b <== NOT EXECUTED
111752: e8 6d 7c ff ff call 1093c4 <printk> <== NOT EXECUTED
111757: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
11175a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11175d: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111760: 68 98 cc 11 00 push $0x11cc98 <== NOT EXECUTED
111765: e8 5a 7c ff ff call 1093c4 <printk> <== NOT EXECUTED
11176a: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
111771: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
111774: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111777: 68 4b a7 11 00 push $0x11a74b <== NOT EXECUTED
11177c: e8 43 7c ff ff call 1093c4 <printk> <== NOT EXECUTED
111781: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
111784: 3b 5e 14 cmp 0x14(%esi),%ebx <== NOT EXECUTED
111787: 0f 82 b3 00 00 00 jb 111840 <_Heap_Walk+0x1fc> <== NOT EXECUTED
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
11178d: 89 d8 mov %ebx,%eax
11178f: 31 d2 xor %edx,%edx
111791: f7 76 10 divl 0x10(%esi)
111794: 85 d2 test %edx,%edx
111796: 0f 85 d8 00 00 00 jne 111874 <_Heap_Walk+0x230> <== NEVER TAKEN
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
11179c: 8b 45 e8 mov -0x18(%ebp),%eax
11179f: 85 c0 test %eax,%eax
1117a1: 75 41 jne 1117e4 <_Heap_Walk+0x1a0> <== NEVER TAKEN
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
1117a3: 8b 4d ec mov -0x14(%ebp),%ecx
1117a6: 39 4d e4 cmp %ecx,-0x1c(%ebp)
1117a9: 0f 84 27 01 00 00 je 1118d6 <_Heap_Walk+0x292>
1117af: 8b 45 ec mov -0x14(%ebp),%eax
1117b2: 8b 48 04 mov 0x4(%eax),%ecx
1117b5: 89 cb mov %ecx,%ebx
1117b7: 83 e3 fe and $0xfffffffe,%ebx
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
1117ba: 01 d8 add %ebx,%eax
1117bc: 8b 56 24 mov 0x24(%esi),%edx
#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 );
1117bf: 3b 46 20 cmp 0x20(%esi),%eax
1117c2: 0f 83 90 00 00 00 jae 111858 <_Heap_Walk+0x214> <== ALWAYS TAKEN
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
1117c8: 8b 7d ec mov -0x14(%ebp),%edi <== NOT EXECUTED
1117cb: 89 45 ec mov %eax,-0x14(%ebp) <== NOT EXECUTED
1117ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
1117d0: 50 push %eax <== NOT EXECUTED
1117d1: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
1117d4: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1117d7: 68 1c cc 11 00 push $0x11cc1c <== NOT EXECUTED
1117dc: e8 e3 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
1117e1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
1117e4: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED
1117e7: 57 push %edi <== NOT EXECUTED
1117e8: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1117eb: 68 0c cd 11 00 push $0x11cd0c <== NOT EXECUTED
1117f0: e8 cf 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
1117f5: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
1117fc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1117ff: 8b 47 04 mov 0x4(%edi),%eax
111802: 83 e0 fe and $0xfffffffe,%eax
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
111805: 8b 56 10 mov 0x10(%esi),%edx
111808: 39 c2 cmp %eax,%edx
11180a: 0f 84 91 00 00 00 je 1118a1 <_Heap_Walk+0x25d> <== ALWAYS TAKEN
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
111810: 52 push %edx <== NOT EXECUTED
111811: 50 push %eax <== NOT EXECUTED
111812: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111815: 68 48 cd 11 00 push $0x11cd48 <== NOT EXECUTED
11181a: e8 a5 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
11181f: b0 01 mov $0x1,%al <== NOT EXECUTED
111821: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
111824: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111827: 5b pop %ebx <== NOT EXECUTED
111828: 5e pop %esi <== NOT EXECUTED
111829: 5f pop %edi <== NOT EXECUTED
11182a: c9 leave <== NOT EXECUTED
11182b: c3 ret <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
11182c: 8b 55 e8 mov -0x18(%ebp),%edx
11182f: 85 d2 test %edx,%edx
111831: 0f 85 3d ff ff ff jne 111774 <_Heap_Walk+0x130> <== NEVER TAKEN
if (the_size < the_heap->min_block_size) {
111837: 3b 5e 14 cmp 0x14(%esi),%ebx
11183a: 0f 83 4d ff ff ff jae 11178d <_Heap_Walk+0x149> <== ALWAYS TAKEN
printk("PASS: %d !block size is too small\n", source);
111840: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111843: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
111846: 68 c4 cc 11 00 push $0x11ccc4 <== NOT EXECUTED
11184b: e8 74 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
111850: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111853: eb 8f jmp 1117e4 <_Heap_Walk+0x1a0> <== NOT EXECUTED
111855: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
#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 );
111858: 39 d0 cmp %edx,%eax
11185a: 0f 87 68 ff ff ff ja 1117c8 <_Heap_Walk+0x184> <== NEVER TAKEN
111860: 83 e1 01 and $0x1,%ecx
111863: 88 4d f3 mov %cl,-0xd(%ebp)
111866: 8b 7d ec mov -0x14(%ebp),%edi
111869: 89 45 ec mov %eax,-0x14(%ebp)
11186c: e9 5b fe ff ff jmp 1116cc <_Heap_Walk+0x88>
111871: 8d 76 00 lea 0x0(%esi),%esi
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
111874: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
111877: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
11187a: 68 e8 cc 11 00 push $0x11cce8 <== NOT EXECUTED
11187f: e8 40 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
111884: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111887: e9 58 ff ff ff jmp 1117e4 <_Heap_Walk+0x1a0> <== NOT EXECUTED
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
11188c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11188f: 68 4b a7 11 00 push $0x11a74b <== NOT EXECUTED
111894: e8 2b 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
111899: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11189c: e9 6a fe ff ff jmp 11170b <_Heap_Walk+0xc7> <== NOT EXECUTED
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
1118a1: 8a 45 e8 mov -0x18(%ebp),%al
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
1118a4: 8d 65 f4 lea -0xc(%ebp),%esp
1118a7: 5b pop %ebx
1118a8: 5e pop %esi
1118a9: 5f pop %edi
1118aa: c9 leave
1118ab: c3 ret
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
1118ac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1118af: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
1118b2: 68 b0 cb 11 00 push $0x11cbb0 <== NOT EXECUTED
1118b7: e8 08 7b ff ff call 1093c4 <printk> <== NOT EXECUTED
1118bc: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp) <== NOT EXECUTED
1118c3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1118c6: e9 aa fd ff ff jmp 111675 <_Heap_Walk+0x31> <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
source = the_heap->stats.instance;
1118cb: 8b 4e 28 mov 0x28(%esi),%ecx <== NOT EXECUTED
1118ce: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED
1118d1: e9 8e fd ff ff jmp 111664 <_Heap_Walk+0x20> <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
1118d6: 8b 7d e4 mov -0x1c(%ebp),%edi
1118d9: e9 21 ff ff ff jmp 1117ff <_Heap_Walk+0x1bb>
0010aa98 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10aa98: 55 push %ebp
10aa99: 89 e5 mov %esp,%ebp
10aa9b: 53 push %ebx
10aa9c: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10aa9f: 8b 15 00 ea 11 00 mov 0x11ea00,%edx
10aaa5: 85 d2 test %edx,%edx
10aaa7: 74 1a je 10aac3 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10aaa9: 31 db xor %ebx,%ebx
10aaab: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10aaac: 50 push %eax
10aaad: 6a 00 push $0x0
10aaaf: 6a 00 push $0x0
10aab1: 53 push %ebx
10aab2: e8 4d 45 00 00 call 10f004 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10aab7: 43 inc %ebx
10aab8: 83 c4 10 add $0x10,%esp
10aabb: 39 1d 00 ea 11 00 cmp %ebx,0x11ea00
10aac1: 77 e9 ja 10aaac <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10aac3: 8b 5d fc mov -0x4(%ebp),%ebx
10aac6: c9 leave
10aac7: c3 ret
0010aac8 <_IO_Manager_initialization>:
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
10aac8: 55 push %ebp
10aac9: 89 e5 mov %esp,%ebp
10aacb: 57 push %edi
10aacc: 56 push %esi
10aacd: 53 push %ebx
10aace: 83 ec 0c sub $0xc,%esp
10aad1: 8b 75 10 mov 0x10(%ebp),%esi
/*
* 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 )
10aad4: 3b 75 0c cmp 0xc(%ebp),%esi
10aad7: 76 5b jbe 10ab34 <_IO_Manager_initialization+0x6c>
/*
* 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 *)
10aad9: 8d 04 76 lea (%esi,%esi,2),%eax
10aadc: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10aae3: 83 ec 0c sub $0xc,%esp
10aae6: 53 push %ebx
10aae7: e8 4c 29 00 00 call 10d438 <_Workspace_Allocate_or_fatal_error>
10aaec: 89 c7 mov %eax,%edi
10aaee: a3 04 ea 11 00 mov %eax,0x11ea04
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10aaf3: 89 35 00 ea 11 00 mov %esi,0x11ea00
memset(
10aaf9: 31 c0 xor %eax,%eax
10aafb: 89 d9 mov %ebx,%ecx
10aafd: 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++ )
10aaff: 83 c4 10 add $0x10,%esp
10ab02: 8b 4d 0c mov 0xc(%ebp),%ecx
10ab05: 85 c9 test %ecx,%ecx
10ab07: 74 23 je 10ab2c <_IO_Manager_initialization+0x64><== NEVER TAKEN
_IO_Driver_address_table[index] = driver_table[index];
10ab09: 8b 1d 04 ea 11 00 mov 0x11ea04,%ebx
10ab0f: 31 d2 xor %edx,%edx
10ab11: 31 c0 xor %eax,%eax
10ab13: 90 nop
10ab14: 8d 3c 03 lea (%ebx,%eax,1),%edi
10ab17: 8b 75 08 mov 0x8(%ebp),%esi
10ab1a: 01 c6 add %eax,%esi
10ab1c: b9 06 00 00 00 mov $0x6,%ecx
10ab21: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10ab23: 42 inc %edx
10ab24: 83 c0 18 add $0x18,%eax
10ab27: 39 55 0c cmp %edx,0xc(%ebp)
10ab2a: 77 e8 ja 10ab14 <_IO_Manager_initialization+0x4c>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10ab2c: 8d 65 f4 lea -0xc(%ebp),%esp
10ab2f: 5b pop %ebx
10ab30: 5e pop %esi
10ab31: 5f pop %edi
10ab32: c9 leave
10ab33: 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;
10ab34: 8b 45 08 mov 0x8(%ebp),%eax
10ab37: a3 04 ea 11 00 mov %eax,0x11ea04
_IO_Number_of_drivers = number_of_drivers;
10ab3c: 8b 4d 0c mov 0xc(%ebp),%ecx
10ab3f: 89 0d 00 ea 11 00 mov %ecx,0x11ea00
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10ab45: 8d 65 f4 lea -0xc(%ebp),%esp
10ab48: 5b pop %ebx
10ab49: 5e pop %esi
10ab4a: 5f pop %edi
10ab4b: c9 leave
10ab4c: c3 ret
0010b520 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
10b520: 55 push %ebp
10b521: 89 e5 mov %esp,%ebp
10b523: 53 push %ebx
10b524: 83 ec 08 sub $0x8,%esp
10b527: 8b 55 08 mov 0x8(%ebp),%edx
10b52a: 8b 45 0c mov 0xc(%ebp),%eax
10b52d: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10b530: 89 15 04 e7 11 00 mov %edx,0x11e704
_Internal_errors_What_happened.is_internal = is_internal;
10b536: a2 08 e7 11 00 mov %al,0x11e708
_Internal_errors_What_happened.the_error = the_error;
10b53b: 89 1d 0c e7 11 00 mov %ebx,0x11e70c
_User_extensions_Fatal( the_source, is_internal, the_error );
10b541: 53 push %ebx
10b542: 0f b6 c0 movzbl %al,%eax
10b545: 50 push %eax
10b546: 52 push %edx
10b547: e8 60 1b 00 00 call 10d0ac <_User_extensions_Fatal>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10b54c: c7 05 24 e8 11 00 05 movl $0x5,0x11e824 <== NOT EXECUTED
10b553: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10b556: fa cli <== NOT EXECUTED
10b557: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10b559: f4 hlt <== NOT EXECUTED
10b55a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b55d: eb fe jmp 10b55d <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010f4bc <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
int _Objects_API_maximum_class(
uint32_t api
)
{
10f4bc: 55 push %ebp
10f4bd: 89 e5 mov %esp,%ebp
switch (api) {
10f4bf: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10f4c3: 74 2f je 10f4f4 <_Objects_API_maximum_class+0x38>
10f4c5: 76 15 jbe 10f4dc <_Objects_API_maximum_class+0x20>
10f4c7: 83 7d 08 03 cmpl $0x3,0x8(%ebp)
10f4cb: 74 1f je 10f4ec <_Objects_API_maximum_class+0x30><== NEVER TAKEN
10f4cd: 83 7d 08 04 cmpl $0x4,0x8(%ebp)
10f4d1: 75 0f jne 10f4e2 <_Objects_API_maximum_class+0x26>
case OBJECTS_INTERNAL_API:
return OBJECTS_INTERNAL_CLASSES_LAST;
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
10f4d3: b8 08 00 00 00 mov $0x8,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10f4d8: c9 leave
10f4d9: c3 ret
10f4da: 66 90 xchg %ax,%ax
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10f4dc: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10f4e0: 74 1a je 10f4fc <_Objects_API_maximum_class+0x40>
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
10f4e2: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10f4e7: c9 leave
10f4e8: c3 ret
10f4e9: 8d 76 00 lea 0x0(%esi),%esi
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10f4ec: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10f4f1: c9 leave <== NOT EXECUTED
10f4f2: c3 ret <== NOT EXECUTED
10f4f3: 90 nop <== NOT EXECUTED
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10f4f4: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10f4f9: c9 leave
10f4fa: c3 ret
10f4fb: 90 nop
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
10f4fc: b8 02 00 00 00 mov $0x2,%eax
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
10f501: c9 leave
10f502: c3 ret
0010b5b4 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10b5b4: 55 push %ebp
10b5b5: 89 e5 mov %esp,%ebp
10b5b7: 56 push %esi
10b5b8: 53 push %ebx
10b5b9: 8b 5d 08 mov 0x8(%ebp),%ebx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10b5bc: 8b 43 18 mov 0x18(%ebx),%eax
10b5bf: 85 c0 test %eax,%eax
10b5c1: 75 0d jne 10b5d0 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
10b5c3: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
10b5c5: 89 c8 mov %ecx,%eax
10b5c7: 8d 65 f8 lea -0x8(%ebp),%esp
10b5ca: 5b pop %ebx
10b5cb: 5e pop %esi
10b5cc: c9 leave
10b5cd: c3 ret
10b5ce: 66 90 xchg %ax,%ax
/*
* 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 );
10b5d0: 8d 73 20 lea 0x20(%ebx),%esi
10b5d3: 83 ec 0c sub $0xc,%esp
10b5d6: 56 push %esi
10b5d7: e8 c4 f7 ff ff call 10ada0 <_Chain_Get>
10b5dc: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10b5de: 83 c4 10 add $0x10,%esp
10b5e1: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b5e5: 74 de je 10b5c5 <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10b5e7: 85 c0 test %eax,%eax
10b5e9: 74 2d je 10b618 <_Objects_Allocate+0x64>
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
10b5eb: 8b 41 08 mov 0x8(%ecx),%eax
10b5ee: 25 ff ff 00 00 and $0xffff,%eax
10b5f3: 8b 53 08 mov 0x8(%ebx),%edx
10b5f6: 81 e2 ff ff 00 00 and $0xffff,%edx
10b5fc: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10b5fe: 31 d2 xor %edx,%edx
10b600: f7 73 14 divl 0x14(%ebx)
10b603: c1 e0 02 shl $0x2,%eax
10b606: 03 43 30 add 0x30(%ebx),%eax
10b609: ff 08 decl (%eax)
information->inactive--;
10b60b: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10b60f: 89 c8 mov %ecx,%eax
10b611: 8d 65 f8 lea -0x8(%ebp),%esp
10b614: 5b pop %ebx
10b615: 5e pop %esi
10b616: c9 leave
10b617: c3 ret
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10b618: 83 ec 0c sub $0xc,%esp
10b61b: 53 push %ebx
10b61c: e8 37 00 00 00 call 10b658 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10b621: 89 34 24 mov %esi,(%esp)
10b624: e8 77 f7 ff ff call 10ada0 <_Chain_Get>
10b629: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10b62b: 83 c4 10 add $0x10,%esp
10b62e: 85 c0 test %eax,%eax
10b630: 74 93 je 10b5c5 <_Objects_Allocate+0x11><== NEVER TAKEN
10b632: eb b7 jmp 10b5eb <_Objects_Allocate+0x37>
0010b658 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10b658: 55 push %ebp
10b659: 89 e5 mov %esp,%ebp
10b65b: 57 push %edi
10b65c: 56 push %esi
10b65d: 53 push %ebx
10b65e: 83 ec 5c sub $0x5c,%esp
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10b661: 8b 55 08 mov 0x8(%ebp),%edx
10b664: 8b 42 08 mov 0x8(%edx),%eax
10b667: 25 ff ff 00 00 and $0xffff,%eax
10b66c: 89 45 c8 mov %eax,-0x38(%ebp)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
10b66f: 0f b7 72 10 movzwl 0x10(%edx),%esi
10b673: 39 c6 cmp %eax,%esi
10b675: 0f 83 e9 01 00 00 jae 10b864 <_Objects_Extend_information+0x20c>
10b67b: 8b 4a 14 mov 0x14(%edx),%ecx
10b67e: 89 4d a8 mov %ecx,-0x58(%ebp)
10b681: 89 45 c4 mov %eax,-0x3c(%ebp)
10b684: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
10b68b: 31 db xor %ebx,%ebx
10b68d: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
10b694: ba 03 00 00 00 mov $0x3,%edx
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
10b699: 03 75 a8 add -0x58(%ebp),%esi
10b69c: 89 75 d4 mov %esi,-0x2c(%ebp)
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
10b69f: 8b 45 08 mov 0x8(%ebp),%eax
10b6a2: 80 78 12 00 cmpb $0x0,0x12(%eax)
10b6a6: 0f 85 1c 02 00 00 jne 10b8c8 <_Objects_Extend_information+0x270>
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
10b6ac: 83 ec 0c sub $0xc,%esp
10b6af: 8b 75 c8 mov -0x38(%ebp),%esi
10b6b2: 8d 04 32 lea (%edx,%esi,1),%eax
10b6b5: 03 45 d4 add -0x2c(%ebp),%eax
10b6b8: c1 e0 02 shl $0x2,%eax
10b6bb: 50 push %eax
10b6bc: e8 77 1d 00 00 call 10d438 <_Workspace_Allocate_or_fatal_error>
10b6c1: 89 45 cc mov %eax,-0x34(%ebp)
10b6c4: 83 c4 10 add $0x10,%esp
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
10b6c7: 8b 7d e0 mov -0x20(%ebp),%edi
10b6ca: 8b 45 cc mov -0x34(%ebp),%eax
10b6cd: 8d 3c b8 lea (%eax,%edi,4),%edi
10b6d0: 89 7d d0 mov %edi,-0x30(%ebp)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10b6d3: 8b 55 e0 mov -0x20(%ebp),%edx
10b6d6: 8d 14 d0 lea (%eax,%edx,8),%edx
10b6d9: 89 55 d8 mov %edx,-0x28(%ebp)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10b6dc: 8b 4d 08 mov 0x8(%ebp),%ecx
10b6df: 0f b7 41 10 movzwl 0x10(%ecx),%eax
10b6e3: 3b 45 c8 cmp -0x38(%ebp),%eax
10b6e6: 0f 87 38 02 00 00 ja 10b924 <_Objects_Extend_information+0x2cc>
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b6ec: 8b 45 c8 mov -0x38(%ebp),%eax
10b6ef: 85 c0 test %eax,%eax
10b6f1: 74 15 je 10b708 <_Objects_Extend_information+0xb0><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b6f3: 31 c0 xor %eax,%eax
10b6f5: 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;
10b6f8: 8b 55 d8 mov -0x28(%ebp),%edx
10b6fb: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4)
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10b702: 40 inc %eax
10b703: 3b 45 c8 cmp -0x38(%ebp),%eax
10b706: 72 f0 jb 10b6f8 <_Objects_Extend_information+0xa0><== NEVER TAKEN
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10b708: 8b 45 c0 mov -0x40(%ebp),%eax
10b70b: c1 e0 02 shl $0x2,%eax
10b70e: 8b 4d cc mov -0x34(%ebp),%ecx
10b711: c7 04 01 00 00 00 00 movl $0x0,(%ecx,%eax,1)
inactive_per_block[block_count] = 0;
10b718: 8b 75 d0 mov -0x30(%ebp),%esi
10b71b: c7 04 06 00 00 00 00 movl $0x0,(%esi,%eax,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b722: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b725: 8b 7d 08 mov 0x8(%ebp),%edi
10b728: 03 4f 14 add 0x14(%edi),%ecx
10b72b: 3b 4d c4 cmp -0x3c(%ebp),%ecx
10b72e: 76 1a jbe 10b74a <_Objects_Extend_information+0xf2><== NEVER TAKEN
10b730: 8b 45 c4 mov -0x3c(%ebp),%eax
10b733: 8b 75 d8 mov -0x28(%ebp),%esi
10b736: 8d 14 86 lea (%esi,%eax,4),%edx
10b739: 8d 76 00 lea 0x0(%esi),%esi
index++ ) {
local_table[ index ] = NULL;
10b73c: c7 02 00 00 00 00 movl $0x0,(%edx)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10b742: 40 inc %eax
10b743: 83 c2 04 add $0x4,%edx
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10b746: 39 c1 cmp %eax,%ecx
10b748: 77 f2 ja 10b73c <_Objects_Extend_information+0xe4>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10b74a: 9c pushf
10b74b: fa cli
10b74c: 59 pop %ecx
old_tables = information->object_blocks;
10b74d: 8b 7d 08 mov 0x8(%ebp),%edi
10b750: 8b 77 34 mov 0x34(%edi),%esi
information->object_blocks = object_blocks;
10b753: 8b 45 cc mov -0x34(%ebp),%eax
10b756: 89 47 34 mov %eax,0x34(%edi)
information->inactive_per_block = inactive_per_block;
10b759: 8b 55 d0 mov -0x30(%ebp),%edx
10b75c: 89 57 30 mov %edx,0x30(%edi)
information->local_table = local_table;
10b75f: 8b 45 d8 mov -0x28(%ebp),%eax
10b762: 89 47 1c mov %eax,0x1c(%edi)
information->maximum = maximum;
10b765: 8b 55 d4 mov -0x2c(%ebp),%edx
10b768: 66 89 57 10 mov %dx,0x10(%edi)
information->maximum_id = _Objects_Build_id(
10b76c: 8b 17 mov (%edi),%edx
10b76e: c1 e2 18 shl $0x18,%edx
10b771: 81 ca 00 00 01 00 or $0x10000,%edx
10b777: 0f b7 47 04 movzwl 0x4(%edi),%eax
10b77b: c1 e0 1b shl $0x1b,%eax
10b77e: 09 c2 or %eax,%edx
10b780: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10b784: 09 c2 or %eax,%edx
10b786: 89 57 0c mov %edx,0xc(%edi)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10b789: 51 push %ecx
10b78a: 9d popf
if ( old_tables )
10b78b: 85 f6 test %esi,%esi
10b78d: 0f 84 c9 01 00 00 je 10b95c <_Objects_Extend_information+0x304>
_Workspace_Free( old_tables );
10b793: 83 ec 0c sub $0xc,%esp
10b796: 56 push %esi
10b797: e8 6c 1c 00 00 call 10d408 <_Workspace_Free>
10b79c: 8b 75 08 mov 0x8(%ebp),%esi
10b79f: 8b 76 14 mov 0x14(%esi),%esi
10b7a2: 89 75 a8 mov %esi,-0x58(%ebp)
10b7a5: 83 c4 10 add $0x10,%esp
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
10b7a8: 8b 7d 08 mov 0x8(%ebp),%edi
10b7ab: 80 7f 12 00 cmpb $0x0,0x12(%edi)
10b7af: 0f 84 3b 01 00 00 je 10b8f0 <_Objects_Extend_information+0x298>
information->object_blocks[ block ] =
10b7b5: c1 e3 02 shl $0x2,%ebx
10b7b8: 89 5d dc mov %ebx,-0x24(%ebp)
10b7bb: 03 5f 34 add 0x34(%edi),%ebx
10b7be: 83 ec 0c sub $0xc,%esp
10b7c1: 8b 45 a8 mov -0x58(%ebp),%eax
10b7c4: 0f af 47 18 imul 0x18(%edi),%eax
10b7c8: 50 push %eax
10b7c9: e8 52 1c 00 00 call 10d420 <_Workspace_Allocate>
10b7ce: 89 03 mov %eax,(%ebx)
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
10b7d0: 8b 47 34 mov 0x34(%edi),%eax
10b7d3: 8b 55 dc mov -0x24(%ebp),%edx
10b7d6: 8b 04 10 mov (%eax,%edx,1),%eax
10b7d9: 83 c4 10 add $0x10,%esp
10b7dc: 85 c0 test %eax,%eax
10b7de: 74 7a je 10b85a <_Objects_Extend_information+0x202><== NEVER TAKEN
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10b7e0: 8b 4d 08 mov 0x8(%ebp),%ecx
10b7e3: ff 71 18 pushl 0x18(%ecx)
10b7e6: ff 71 14 pushl 0x14(%ecx)
10b7e9: 50 push %eax
10b7ea: 8d 75 e8 lea -0x18(%ebp),%esi
10b7ed: 56 push %esi
10b7ee: e8 69 38 00 00 call 10f05c <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b7f3: 8b 75 08 mov 0x8(%ebp),%esi
10b7f6: 83 c6 20 add $0x20,%esi
10b7f9: 8b 5d c4 mov -0x3c(%ebp),%ebx
10b7fc: 83 c4 10 add $0x10,%esp
10b7ff: eb 2c jmp 10b82d <_Objects_Extend_information+0x1d5>
10b801: 8d 76 00 lea 0x0(%esi),%esi
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
10b804: 8b 7d 08 mov 0x8(%ebp),%edi
10b807: 8b 07 mov (%edi),%eax
10b809: c1 e0 18 shl $0x18,%eax
10b80c: 0d 00 00 01 00 or $0x10000,%eax
10b811: 0f b7 57 04 movzwl 0x4(%edi),%edx
10b815: c1 e2 1b shl $0x1b,%edx
10b818: 09 d0 or %edx,%eax
10b81a: 09 d8 or %ebx,%eax
10b81c: 89 41 08 mov %eax,0x8(%ecx)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10b81f: 83 ec 08 sub $0x8,%esp
10b822: 51 push %ecx
10b823: 56 push %esi
10b824: e8 53 f5 ff ff call 10ad7c <_Chain_Append>
index++;
10b829: 43 inc %ebx
10b82a: 83 c4 10 add $0x10,%esp
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
10b82d: 83 ec 0c sub $0xc,%esp
10b830: 8d 45 e8 lea -0x18(%ebp),%eax
10b833: 50 push %eax
10b834: e8 67 f5 ff ff call 10ada0 <_Chain_Get>
10b839: 89 c1 mov %eax,%ecx
10b83b: 83 c4 10 add $0x10,%esp
10b83e: 85 c0 test %eax,%eax
10b840: 75 c2 jne 10b804 <_Objects_Extend_information+0x1ac>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10b842: 8b 55 08 mov 0x8(%ebp),%edx
10b845: 8b 42 30 mov 0x30(%edx),%eax
10b848: 89 d1 mov %edx,%ecx
10b84a: 8b 52 14 mov 0x14(%edx),%edx
10b84d: 8b 75 dc mov -0x24(%ebp),%esi
10b850: 89 14 30 mov %edx,(%eax,%esi,1)
information->inactive += information->allocation_size;
10b853: 8b 41 14 mov 0x14(%ecx),%eax
10b856: 66 01 41 2c add %ax,0x2c(%ecx)
}
10b85a: 8d 65 f4 lea -0xc(%ebp),%esp
10b85d: 5b pop %ebx
10b85e: 5e pop %esi
10b85f: 5f pop %edi
10b860: c9 leave
10b861: c3 ret
10b862: 66 90 xchg %ax,%ax
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10b864: 8b 7d 08 mov 0x8(%ebp),%edi
10b867: 8b 7f 14 mov 0x14(%edi),%edi
10b86a: 89 7d a8 mov %edi,-0x58(%ebp)
10b86d: 89 f0 mov %esi,%eax
10b86f: 31 d2 xor %edx,%edx
10b871: f7 f7 div %edi
10b873: 89 45 a4 mov %eax,-0x5c(%ebp)
10b876: 89 45 c0 mov %eax,-0x40(%ebp)
for ( ; block < block_count; block++ ) {
10b879: 85 c0 test %eax,%eax
10b87b: 0f 84 e6 00 00 00 je 10b967 <_Objects_Extend_information+0x30f><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
10b881: 8b 7d 08 mov 0x8(%ebp),%edi
10b884: 8b 4f 34 mov 0x34(%edi),%ecx
10b887: 8b 19 mov (%ecx),%ebx
10b889: 85 db test %ebx,%ebx
10b88b: 0f 84 d6 00 00 00 je 10b967 <_Objects_Extend_information+0x30f><== NEVER TAKEN
10b891: 8b 45 c8 mov -0x38(%ebp),%eax
10b894: 89 45 c4 mov %eax,-0x3c(%ebp)
10b897: 31 db xor %ebx,%ebx
10b899: eb 08 jmp 10b8a3 <_Objects_Extend_information+0x24b>
10b89b: 90 nop
10b89c: 8b 14 99 mov (%ecx,%ebx,4),%edx
10b89f: 85 d2 test %edx,%edx
10b8a1: 74 0c je 10b8af <_Objects_Extend_information+0x257>
break;
else
index_base += information->allocation_size;
10b8a3: 8b 55 a8 mov -0x58(%ebp),%edx
10b8a6: 01 55 c4 add %edx,-0x3c(%ebp)
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10b8a9: 43 inc %ebx
10b8aa: 39 5d a4 cmp %ebx,-0x5c(%ebp)
10b8ad: 77 ed ja 10b89c <_Objects_Extend_information+0x244>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
10b8af: 39 75 c4 cmp %esi,-0x3c(%ebp)
10b8b2: 0f 82 f0 fe ff ff jb 10b7a8 <_Objects_Extend_information+0x150>
10b8b8: 8b 7d a4 mov -0x5c(%ebp),%edi
10b8bb: 47 inc %edi
10b8bc: 89 7d e0 mov %edi,-0x20(%ebp)
10b8bf: 8d 14 7f lea (%edi,%edi,2),%edx
10b8c2: e9 d2 fd ff ff jmp 10b699 <_Objects_Extend_information+0x41>
10b8c7: 90 nop
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
10b8c8: 83 ec 0c sub $0xc,%esp
10b8cb: 8b 4d c8 mov -0x38(%ebp),%ecx
10b8ce: 8d 04 0a lea (%edx,%ecx,1),%eax
10b8d1: 01 f0 add %esi,%eax
10b8d3: c1 e0 02 shl $0x2,%eax
10b8d6: 50 push %eax
10b8d7: e8 44 1b 00 00 call 10d420 <_Workspace_Allocate>
10b8dc: 89 45 cc mov %eax,-0x34(%ebp)
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
10b8df: 83 c4 10 add $0x10,%esp
10b8e2: 85 c0 test %eax,%eax
10b8e4: 0f 85 dd fd ff ff jne 10b6c7 <_Objects_Extend_information+0x6f><== ALWAYS TAKEN
10b8ea: e9 6b ff ff ff jmp 10b85a <_Objects_Extend_information+0x202><== NOT EXECUTED
10b8ef: 90 nop <== NOT EXECUTED
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
10b8f0: c1 e3 02 shl $0x2,%ebx
10b8f3: 89 5d dc mov %ebx,-0x24(%ebp)
10b8f6: 8b 4d 08 mov 0x8(%ebp),%ecx
10b8f9: 03 59 34 add 0x34(%ecx),%ebx
10b8fc: 83 ec 0c sub $0xc,%esp
10b8ff: 8b 75 a8 mov -0x58(%ebp),%esi
10b902: 0f af 71 18 imul 0x18(%ecx),%esi
10b906: 56 push %esi
10b907: e8 2c 1b 00 00 call 10d438 <_Workspace_Allocate_or_fatal_error>
10b90c: 89 03 mov %eax,(%ebx)
10b90e: 8b 7d 08 mov 0x8(%ebp),%edi
10b911: 8b 47 34 mov 0x34(%edi),%eax
10b914: 8b 55 dc mov -0x24(%ebp),%edx
10b917: 8b 04 10 mov (%eax,%edx,1),%eax
10b91a: 83 c4 10 add $0x10,%esp
10b91d: e9 be fe ff ff jmp 10b7e0 <_Objects_Extend_information+0x188>
10b922: 66 90 xchg %ax,%ax
/*
* 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,
10b924: 8b 45 c0 mov -0x40(%ebp),%eax
10b927: c1 e0 02 shl $0x2,%eax
10b92a: 8b 7d 08 mov 0x8(%ebp),%edi
10b92d: 8b 77 34 mov 0x34(%edi),%esi
10b930: 8b 7d cc mov -0x34(%ebp),%edi
10b933: 89 c1 mov %eax,%ecx
10b935: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10b937: 8b 55 08 mov 0x8(%ebp),%edx
10b93a: 8b 72 30 mov 0x30(%edx),%esi
10b93d: 8b 7d d0 mov -0x30(%ebp),%edi
10b940: 89 c1 mov %eax,%ecx
10b942: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10b944: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10b948: 03 4d c8 add -0x38(%ebp),%ecx
10b94b: c1 e1 02 shl $0x2,%ecx
10b94e: 8b 72 1c mov 0x1c(%edx),%esi
10b951: 8b 7d d8 mov -0x28(%ebp),%edi
10b954: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10b956: e9 ad fd ff ff jmp 10b708 <_Objects_Extend_information+0xb0>
10b95b: 90 nop
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
10b95c: 8b 4f 14 mov 0x14(%edi),%ecx
10b95f: 89 4d a8 mov %ecx,-0x58(%ebp)
10b962: e9 41 fe ff ff jmp 10b7a8 <_Objects_Extend_information+0x150>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10b967: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10b96a: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED
10b96d: 31 db xor %ebx,%ebx <== NOT EXECUTED
10b96f: e9 3b ff ff ff jmp 10b8af <_Objects_Extend_information+0x257><== NOT EXECUTED
0010b974 <_Objects_Free>:
void _Objects_Free(
Objects_Information *information,
Objects_Control *the_object
)
{
10b974: 55 push %ebp
10b975: 89 e5 mov %esp,%ebp
10b977: 57 push %edi
10b978: 56 push %esi
10b979: 53 push %ebx
10b97a: 83 ec 14 sub $0x14,%esp
10b97d: 8b 5d 08 mov 0x8(%ebp),%ebx
10b980: 8b 75 0c mov 0xc(%ebp),%esi
uint32_t allocation_size = information->allocation_size;
10b983: 8b 7b 14 mov 0x14(%ebx),%edi
_Chain_Append( &information->Inactive, &the_object->Node );
10b986: 56 push %esi
10b987: 8d 43 20 lea 0x20(%ebx),%eax
10b98a: 50 push %eax
10b98b: e8 ec f3 ff ff call 10ad7c <_Chain_Append>
if ( information->auto_extend ) {
10b990: 83 c4 10 add $0x10,%esp
10b993: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10b997: 74 35 je 10b9ce <_Objects_Free+0x5a>
uint32_t block;
block =
10b999: 8b 46 08 mov 0x8(%esi),%eax
10b99c: 25 ff ff 00 00 and $0xffff,%eax
10b9a1: 8b 53 08 mov 0x8(%ebx),%edx
10b9a4: 81 e2 ff ff 00 00 and $0xffff,%edx
10b9aa: 29 d0 sub %edx,%eax
_Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]++;
10b9ac: 31 d2 xor %edx,%edx
10b9ae: f7 73 14 divl 0x14(%ebx)
10b9b1: c1 e0 02 shl $0x2,%eax
10b9b4: 03 43 30 add 0x30(%ebx),%eax
10b9b7: ff 00 incl (%eax)
information->inactive++;
10b9b9: 8b 53 2c mov 0x2c(%ebx),%edx
10b9bc: 42 inc %edx
10b9bd: 66 89 53 2c mov %dx,0x2c(%ebx)
/*
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
10b9c1: 0f b7 d2 movzwl %dx,%edx
10b9c4: 89 f8 mov %edi,%eax
10b9c6: d1 e8 shr %eax
10b9c8: 01 f8 add %edi,%eax
10b9ca: 39 c2 cmp %eax,%edx
10b9cc: 77 0a ja 10b9d8 <_Objects_Free+0x64>
_Objects_Shrink_information( information );
}
}
}
10b9ce: 8d 65 f4 lea -0xc(%ebp),%esp
10b9d1: 5b pop %ebx
10b9d2: 5e pop %esi
10b9d3: 5f pop %edi
10b9d4: c9 leave
10b9d5: c3 ret
10b9d6: 66 90 xchg %ax,%ax
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
_Objects_Shrink_information( information );
10b9d8: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
}
10b9db: 8d 65 f4 lea -0xc(%ebp),%esp
10b9de: 5b pop %ebx
10b9df: 5e pop %esi
10b9e0: 5f pop %edi
10b9e1: c9 leave
* Check if the threshold level has been met of
* 1.5 x allocation_size are free.
*/
if ( information->inactive > ( allocation_size + ( allocation_size >> 1 ) ) ) {
_Objects_Shrink_information( information );
10b9e2: e9 a5 02 00 00 jmp 10bc8c <_Objects_Shrink_information>
0010baa8 <_Objects_Get>:
Objects_Control *_Objects_Get(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
10baa8: 55 push %ebp
10baa9: 89 e5 mov %esp,%ebp
10baab: 53 push %ebx
10baac: 83 ec 04 sub $0x4,%esp
10baaf: 8b 4d 08 mov 0x8(%ebp),%ecx
* always NULL.
*
* If the Id is valid but the object has not been created yet, then
* the local_table entry will be NULL.
*/
index = id - information->minimum_id + 1;
10bab2: ba 01 00 00 00 mov $0x1,%edx
10bab7: 2b 51 08 sub 0x8(%ecx),%edx
10baba: 03 55 0c add 0xc(%ebp),%edx
/*
* If the index is less than maximum, then it is OK to use it to
* index into the local_table array.
*/
if ( index <= information->maximum ) {
10babd: 0f b7 41 10 movzwl 0x10(%ecx),%eax
10bac1: 39 c2 cmp %eax,%edx
10bac3: 77 27 ja 10baec <_Objects_Get+0x44>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bac5: a1 58 e6 11 00 mov 0x11e658,%eax
10baca: 40 inc %eax
10bacb: a3 58 e6 11 00 mov %eax,0x11e658
_Thread_Disable_dispatch();
if ( (the_object = information->local_table[ index ]) != NULL ) {
10bad0: 8b 41 1c mov 0x1c(%ecx),%eax
10bad3: 8b 1c 90 mov (%eax,%edx,4),%ebx
10bad6: 85 db test %ebx,%ebx
10bad8: 74 1f je 10baf9 <_Objects_Get+0x51>
*location = OBJECTS_LOCAL;
10bada: 8b 45 10 mov 0x10(%ebp),%eax
10badd: c7 00 00 00 00 00 movl $0x0,(%eax)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10bae3: 89 d8 mov %ebx,%eax
10bae5: 5a pop %edx
10bae6: 5b pop %ebx
10bae7: c9 leave
10bae8: c3 ret
10bae9: 8d 76 00 lea 0x0(%esi),%esi
/*
* Object Id is not within this API and Class on this node. So
* it may be global in a multiprocessing system. But it is clearly
* invalid on a single processor system.
*/
*location = OBJECTS_ERROR;
10baec: 8b 45 10 mov 0x10(%ebp),%eax
10baef: c7 00 01 00 00 00 movl $0x1,(%eax)
10baf5: 31 db xor %ebx,%ebx
10baf7: eb ea jmp 10bae3 <_Objects_Get+0x3b>
/*
* Valid Id for this API, Class and Node but the object has not
* been allocated yet.
*/
_Thread_Enable_dispatch();
10baf9: e8 ee 07 00 00 call 10c2ec <_Thread_Enable_dispatch>
*location = OBJECTS_ERROR;
10bafe: 8b 45 10 mov 0x10(%ebp),%eax
10bb01: c7 00 01 00 00 00 movl $0x1,(%eax)
10bb07: eb da jmp 10bae3 <_Objects_Get+0x3b>
0010ba08 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10ba08: 55 push %ebp
10ba09: 89 e5 mov %esp,%ebp
10ba0b: 53 push %ebx
10ba0c: 83 ec 04 sub $0x4,%esp
10ba0f: 8b 5d 08 mov 0x8(%ebp),%ebx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10ba12: 8d 43 ff lea -0x1(%ebx),%eax
10ba15: 83 f8 03 cmp $0x3,%eax
10ba18: 77 07 ja 10ba21 <_Objects_Get_information+0x19>
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
10ba1a: 8b 45 0c mov 0xc(%ebp),%eax
10ba1d: 85 c0 test %eax,%eax
10ba1f: 75 07 jne 10ba28 <_Objects_Get_information+0x20>
* 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 )
10ba21: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10ba23: 8b 5d fc mov -0x4(%ebp),%ebx
10ba26: c9 leave
10ba27: c3 ret
return NULL;
if ( !the_class )
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10ba28: 83 ec 0c sub $0xc,%esp
10ba2b: 53 push %ebx
10ba2c: e8 8b 3a 00 00 call 10f4bc <_Objects_API_maximum_class>
if ( the_class_api_maximum < 0 ||
10ba31: 83 c4 10 add $0x10,%esp
10ba34: 85 c0 test %eax,%eax
10ba36: 78 e9 js 10ba21 <_Objects_Get_information+0x19><== NEVER TAKEN
10ba38: 39 45 0c cmp %eax,0xc(%ebp)
10ba3b: 77 e4 ja 10ba21 <_Objects_Get_information+0x19><== NEVER TAKEN
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ba3d: 8b 04 9d 2c e6 11 00 mov 0x11e62c(,%ebx,4),%eax
10ba44: 85 c0 test %eax,%eax
10ba46: 74 d9 je 10ba21 <_Objects_Get_information+0x19><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ba48: 8b 55 0c mov 0xc(%ebp),%edx
10ba4b: 8b 04 90 mov (%eax,%edx,4),%eax
if ( !info )
10ba4e: 85 c0 test %eax,%eax
10ba50: 74 d1 je 10ba23 <_Objects_Get_information+0x1b><== 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 )
10ba52: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10ba57: 75 ca jne 10ba23 <_Objects_Get_information+0x1b>
10ba59: eb c6 jmp 10ba21 <_Objects_Get_information+0x19>
0010ba5c <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10ba5c: 55 push %ebp
10ba5d: 89 e5 mov %esp,%ebp
10ba5f: 56 push %esi
10ba60: 53 push %ebx
10ba61: 8b 5d 08 mov 0x8(%ebp),%ebx
10ba64: 8b 75 10 mov 0x10(%ebp),%esi
#if defined(RTEMS_MULTIPROCESSING)
index = id - information->minimum_id + 1;
#else
/* index = _Objects_Get_index( id ); */
index = id & 0x0000ffff;
10ba67: 0f b7 55 0c movzwl 0xc(%ebp),%edx
/* This should work but doesn't always :( */
/* index = (uint16_t ) id; */
#endif
_ISR_Disable( level );
10ba6b: 9c pushf
10ba6c: fa cli
10ba6d: 59 pop %ecx
if ( information->maximum >= index ) {
10ba6e: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10ba72: 39 c2 cmp %eax,%edx
10ba74: 77 1a ja 10ba90 <_Objects_Get_isr_disable+0x34>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10ba76: 8b 43 1c mov 0x1c(%ebx),%eax
10ba79: 8b 04 90 mov (%eax,%edx,4),%eax
10ba7c: 85 c0 test %eax,%eax
10ba7e: 74 1c je 10ba9c <_Objects_Get_isr_disable+0x40><== NEVER TAKEN
*location = OBJECTS_LOCAL;
10ba80: c7 06 00 00 00 00 movl $0x0,(%esi)
*level_p = level;
10ba86: 8b 55 14 mov 0x14(%ebp),%edx
10ba89: 89 0a mov %ecx,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10ba8b: 5b pop %ebx
10ba8c: 5e pop %esi
10ba8d: c9 leave
10ba8e: c3 ret
10ba8f: 90 nop
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10ba90: 51 push %ecx
10ba91: 9d popf
*location = OBJECTS_ERROR;
10ba92: c7 06 01 00 00 00 movl $0x1,(%esi)
10ba98: 31 c0 xor %eax,%eax
10ba9a: eb ef jmp 10ba8b <_Objects_Get_isr_disable+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10ba9c: 51 push %ecx <== NOT EXECUTED
10ba9d: 9d popf <== NOT EXECUTED
*location = OBJECTS_ERROR;
10ba9e: c7 06 01 00 00 00 movl $0x1,(%esi) <== NOT EXECUTED
10baa4: eb e5 jmp 10ba8b <_Objects_Get_isr_disable+0x2f><== NOT EXECUTED
0010ce74 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10ce74: 55 push %ebp
10ce75: 89 e5 mov %esp,%ebp
10ce77: 57 push %edi
10ce78: 56 push %esi
10ce79: 53 push %ebx
10ce7a: 83 ec 1c sub $0x1c,%esp
10ce7d: 8b 75 0c mov 0xc(%ebp),%esi
10ce80: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10ce83: 85 f6 test %esi,%esi
10ce85: 75 0d jne 10ce94 <_Objects_Get_name_as_string+0x20>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
10ce87: 31 db xor %ebx,%ebx
}
return NULL; /* unreachable path */
}
10ce89: 89 d8 mov %ebx,%eax
10ce8b: 8d 65 f4 lea -0xc(%ebp),%esp
10ce8e: 5b pop %ebx
10ce8f: 5e pop %esi
10ce90: 5f pop %edi
10ce91: c9 leave
10ce92: c3 ret
10ce93: 90 nop
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10ce94: 85 db test %ebx,%ebx
10ce96: 74 f1 je 10ce89 <_Objects_Get_name_as_string+0x15>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ce98: 8b 7d 08 mov 0x8(%ebp),%edi
10ce9b: 85 ff test %edi,%edi
10ce9d: 0f 84 8d 00 00 00 je 10cf30 <_Objects_Get_name_as_string+0xbc>
10cea3: 8b 45 08 mov 0x8(%ebp),%eax
10cea6: 89 45 e0 mov %eax,-0x20(%ebp)
information = _Objects_Get_information_id( tmpId );
10cea9: 83 ec 0c sub $0xc,%esp
10ceac: ff 75 e0 pushl -0x20(%ebp)
10ceaf: e8 00 ff ff ff call 10cdb4 <_Objects_Get_information_id>
10ceb4: 89 c7 mov %eax,%edi
if ( !information )
10ceb6: 83 c4 10 add $0x10,%esp
10ceb9: 85 c0 test %eax,%eax
10cebb: 74 ca je 10ce87 <_Objects_Get_name_as_string+0x13>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10cebd: 51 push %ecx
10cebe: 8d 45 f0 lea -0x10(%ebp),%eax
10cec1: 50 push %eax
10cec2: ff 75 e0 pushl -0x20(%ebp)
10cec5: 57 push %edi
10cec6: e8 a9 00 00 00 call 10cf74 <_Objects_Get>
switch ( location ) {
10cecb: 83 c4 10 add $0x10,%esp
10cece: 8b 55 f0 mov -0x10(%ebp),%edx
10ced1: 85 d2 test %edx,%edx
10ced3: 75 b2 jne 10ce87 <_Objects_Get_name_as_string+0x13>
case OBJECTS_ERROR:
return NULL;
case OBJECTS_LOCAL:
if ( information->is_string ) {
10ced5: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10ced9: 74 65 je 10cf40 <_Objects_Get_name_as_string+0xcc>
s = the_object->name.name_p;
10cedb: 8b 40 0c mov 0xc(%eax),%eax
10cede: 89 45 dc mov %eax,-0x24(%ebp)
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
10cee1: 85 c0 test %eax,%eax
10cee3: 0f 84 84 00 00 00 je 10cf6d <_Objects_Get_name_as_string+0xf9><== NEVER TAKEN
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10cee9: 4e dec %esi
10ceea: 89 75 d8 mov %esi,-0x28(%ebp)
10ceed: 74 7e je 10cf6d <_Objects_Get_name_as_string+0xf9><== NEVER TAKEN
10ceef: 8b 45 dc mov -0x24(%ebp),%eax
10cef2: 8a 08 mov (%eax),%cl
10cef4: 84 c9 test %cl,%cl
10cef6: 74 75 je 10cf6d <_Objects_Get_name_as_string+0xf9>
10cef8: 89 df mov %ebx,%edi
10cefa: 31 f6 xor %esi,%esi
10cefc: eb 0c jmp 10cf0a <_Objects_Get_name_as_string+0x96>
10cefe: 66 90 xchg %ax,%ax
10cf00: 8b 45 dc mov -0x24(%ebp),%eax
10cf03: 8a 0c 30 mov (%eax,%esi,1),%cl
10cf06: 84 c9 test %cl,%cl
10cf08: 74 19 je 10cf23 <_Objects_Get_name_as_string+0xaf>
*d = (isprint(*s)) ? *s : '*';
10cf0a: 0f be d1 movsbl %cl,%edx
10cf0d: a1 c8 07 12 00 mov 0x1207c8,%eax
10cf12: f6 04 10 97 testb $0x97,(%eax,%edx,1)
10cf16: 75 02 jne 10cf1a <_Objects_Get_name_as_string+0xa6>
10cf18: b1 2a mov $0x2a,%cl
10cf1a: 88 0f mov %cl,(%edi)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10cf1c: 46 inc %esi
10cf1d: 47 inc %edi
10cf1e: 3b 75 d8 cmp -0x28(%ebp),%esi
10cf21: 72 dd jb 10cf00 <_Objects_Get_name_as_string+0x8c>
*d = (isprint(*s)) ? *s : '*';
}
}
*d = '\0';
10cf23: c6 07 00 movb $0x0,(%edi)
_Thread_Enable_dispatch();
10cf26: e8 8d 08 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10cf2b: e9 59 ff ff ff jmp 10ce89 <_Objects_Get_name_as_string+0x15>
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cf30: a1 3c a7 12 00 mov 0x12a73c,%eax
10cf35: 8b 40 08 mov 0x8(%eax),%eax
10cf38: 89 45 e0 mov %eax,-0x20(%ebp)
10cf3b: e9 69 ff ff ff jmp 10cea9 <_Objects_Get_name_as_string+0x35>
case OBJECTS_LOCAL:
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10cf40: 8b 50 0c mov 0xc(%eax),%edx
lname[ 0 ] = (u32_name >> 24) & 0xff;
10cf43: 89 d0 mov %edx,%eax
10cf45: c1 e8 18 shr $0x18,%eax
10cf48: 88 45 eb mov %al,-0x15(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10cf4b: 89 d0 mov %edx,%eax
10cf4d: c1 e8 10 shr $0x10,%eax
10cf50: 88 45 ec mov %al,-0x14(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10cf53: 89 d0 mov %edx,%eax
10cf55: c1 e8 08 shr $0x8,%eax
10cf58: 88 45 ed mov %al,-0x13(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10cf5b: 88 55 ee mov %dl,-0x12(%ebp)
lname[ 4 ] = '\0';
10cf5e: c6 45 ef 00 movb $0x0,-0x11(%ebp)
10cf62: 8d 45 eb lea -0x15(%ebp),%eax
10cf65: 89 45 dc mov %eax,-0x24(%ebp)
10cf68: e9 7c ff ff ff jmp 10cee9 <_Objects_Get_name_as_string+0x75>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10cf6d: 89 df mov %ebx,%edi
10cf6f: eb b2 jmp 10cf23 <_Objects_Get_name_as_string+0xaf>
00116ba0 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
116ba0: 55 push %ebp
116ba1: 89 e5 mov %esp,%ebp
116ba3: 8b 4d 08 mov 0x8(%ebp),%ecx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
116ba6: ba 01 00 00 00 mov $0x1,%edx
116bab: 2b 51 08 sub 0x8(%ecx),%edx
116bae: 03 55 0c add 0xc(%ebp),%edx
if ( information->maximum >= index ) {
116bb1: 0f b7 41 10 movzwl 0x10(%ecx),%eax
116bb5: 39 c2 cmp %eax,%edx
116bb7: 77 17 ja 116bd0 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
116bb9: 8b 41 1c mov 0x1c(%ecx),%eax
116bbc: 8b 04 90 mov (%eax,%edx,4),%eax
116bbf: 85 c0 test %eax,%eax
116bc1: 74 0d je 116bd0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
116bc3: 8b 55 10 mov 0x10(%ebp),%edx
116bc6: c7 02 00 00 00 00 movl $0x0,(%edx)
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
116bcc: c9 leave
116bcd: c3 ret
116bce: 66 90 xchg %ax,%ax
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
116bd0: 8b 45 10 mov 0x10(%ebp),%eax
116bd3: c7 00 01 00 00 00 movl $0x1,(%eax)
116bd9: 31 c0 xor %eax,%eax
return NULL;
}
116bdb: c9 leave
116bdc: c3 ret
0010cb3c <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10cb3c: 55 push %ebp
10cb3d: 89 e5 mov %esp,%ebp
10cb3f: 53 push %ebx
10cb40: 83 ec 14 sub $0x14,%esp
10cb43: 8b 45 08 mov 0x8(%ebp),%eax
10cb46: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
10cb49: 85 db test %ebx,%ebx
10cb4b: 74 7b je 10cbc8 <_Objects_Id_to_name+0x8c><== NEVER TAKEN
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cb4d: 85 c0 test %eax,%eax
10cb4f: 74 53 je 10cba4 <_Objects_Id_to_name+0x68>
10cb51: 89 c1 mov %eax,%ecx
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10cb53: 89 ca mov %ecx,%edx
10cb55: c1 ea 18 shr $0x18,%edx
10cb58: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10cb5b: 8d 42 ff lea -0x1(%edx),%eax
10cb5e: 83 f8 03 cmp $0x3,%eax
10cb61: 77 59 ja 10cbbc <_Objects_Id_to_name+0x80>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10cb63: 8b 14 95 8c 16 12 00 mov 0x12168c(,%edx,4),%edx
10cb6a: 85 d2 test %edx,%edx
10cb6c: 74 4e je 10cbbc <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10cb6e: 89 c8 mov %ecx,%eax
10cb70: c1 e8 1b shr $0x1b,%eax
10cb73: 8b 14 82 mov (%edx,%eax,4),%edx
if ( !information )
10cb76: 85 d2 test %edx,%edx
10cb78: 74 42 je 10cbbc <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
if ( information->is_string )
10cb7a: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10cb7e: 75 3c jne 10cbbc <_Objects_Id_to_name+0x80><== NEVER TAKEN
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
10cb80: 50 push %eax
10cb81: 8d 45 f8 lea -0x8(%ebp),%eax
10cb84: 50 push %eax
10cb85: 51 push %ecx
10cb86: 52 push %edx
10cb87: e8 4c ff ff ff call 10cad8 <_Objects_Get>
if ( !the_object )
10cb8c: 83 c4 10 add $0x10,%esp
10cb8f: 85 c0 test %eax,%eax
10cb91: 74 29 je 10cbbc <_Objects_Id_to_name+0x80>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10cb93: 8b 40 0c mov 0xc(%eax),%eax
10cb96: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10cb98: e8 13 08 00 00 call 10d3b0 <_Thread_Enable_dispatch>
10cb9d: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10cb9f: 8b 5d fc mov -0x4(%ebp),%ebx
10cba2: c9 leave
10cba3: c3 ret
Objects_Locations ignored_location;
if ( !name )
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10cba4: a1 7c 17 12 00 mov 0x12177c,%eax
10cba9: 8b 48 08 mov 0x8(%eax),%ecx
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10cbac: 89 ca mov %ecx,%edx
10cbae: c1 ea 18 shr $0x18,%edx
10cbb1: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10cbb4: 8d 42 ff lea -0x1(%edx),%eax
10cbb7: 83 f8 03 cmp $0x3,%eax
10cbba: 76 a7 jbe 10cb63 <_Objects_Id_to_name+0x27><== ALWAYS TAKEN
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10cbbc: b8 03 00 00 00 mov $0x3,%eax
}
10cbc1: 8b 5d fc mov -0x4(%ebp),%ebx
10cbc4: c9 leave
10cbc5: c3 ret
10cbc6: 66 90 xchg %ax,%ax
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
10cbc8: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10cbcd: eb f2 jmp 10cbc1 <_Objects_Id_to_name+0x85><== NOT EXECUTED
0010bb0c <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10bb0c: 55 push %ebp
10bb0d: 89 e5 mov %esp,%ebp
10bb0f: 57 push %edi
10bb10: 56 push %esi
10bb11: 53 push %ebx
10bb12: 8b 7d 08 mov 0x8(%ebp),%edi
10bb15: 8b 55 0c mov 0xc(%ebp),%edx
10bb18: 8b 5d 10 mov 0x10(%ebp),%ebx
10bb1b: 8b 75 20 mov 0x20(%ebp),%esi
10bb1e: 0f b7 4d 18 movzwl 0x18(%ebp),%ecx
uint32_t name_length;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10bb22: 89 17 mov %edx,(%edi)
information->the_class = the_class;
10bb24: 66 89 5f 04 mov %bx,0x4(%edi)
information->is_string = is_string;
10bb28: 8b 45 1c mov 0x1c(%ebp),%eax
10bb2b: 88 47 38 mov %al,0x38(%edi)
information->local_table = 0;
information->inactive_per_block = 0;
10bb2e: c7 47 30 00 00 00 00 movl $0x0,0x30(%edi)
information->object_blocks = 0;
10bb35: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
information->inactive = 0;
10bb3c: 66 c7 47 2c 00 00 movw $0x0,0x2c(%edi)
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10bb42: 8b 04 95 2c e6 11 00 mov 0x11e62c(,%edx,4),%eax
10bb49: 89 3c 98 mov %edi,(%eax,%ebx,4)
/*
* Set the size of the object
*/
information->size = size;
10bb4c: 89 4f 18 mov %ecx,0x18(%edi)
/*
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
10bb4f: 8b 45 14 mov 0x14(%ebp),%eax
10bb52: c1 e8 1f shr $0x1f,%eax
10bb55: 88 47 12 mov %al,0x12(%edi)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
10bb58: 8b 4d 14 mov 0x14(%ebp),%ecx
10bb5b: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum;
10bb61: 89 4f 14 mov %ecx,0x14(%edi)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10bb64: c7 47 1c c4 e3 11 00 movl $0x11e3c4,0x1c(%edi)
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
10bb6b: c1 e2 18 shl $0x18,%edx
10bb6e: 81 ca 00 00 01 00 or $0x10000,%edx
10bb74: c1 e3 1b shl $0x1b,%ebx
10bb77: 09 da or %ebx,%edx
10bb79: 31 c0 xor %eax,%eax
10bb7b: 85 c9 test %ecx,%ecx
10bb7d: 0f 95 c0 setne %al
10bb80: 09 c2 or %eax,%edx
10bb82: 89 57 08 mov %edx,0x8(%edi)
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10bb85: f7 c6 03 00 00 00 test $0x3,%esi
10bb8b: 75 23 jne 10bbb0 <_Objects_Initialize_information+0xa4><== NEVER TAKEN
10bb8d: 89 f0 mov %esi,%eax
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10bb8f: 66 89 47 3a mov %ax,0x3a(%edi)
10bb93: 8d 47 24 lea 0x24(%edi),%eax
10bb96: 89 47 20 mov %eax,0x20(%edi)
10bb99: c7 47 24 00 00 00 00 movl $0x0,0x24(%edi)
10bba0: 8d 47 20 lea 0x20(%edi),%eax
10bba3: 89 47 28 mov %eax,0x28(%edi)
/*
* Initialize objects .. if there are any
*/
if ( maximum ) {
10bba6: 85 c9 test %ecx,%ecx
10bba8: 75 0e jne 10bbb8 <_Objects_Initialize_information+0xac>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10bbaa: 5b pop %ebx
10bbab: 5e pop %esi
10bbac: 5f pop %edi
10bbad: c9 leave
10bbae: c3 ret
10bbaf: 90 nop
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10bbb0: 8d 46 04 lea 0x4(%esi),%eax <== NOT EXECUTED
10bbb3: 83 e0 fc and $0xfffffffc,%eax <== NOT EXECUTED
10bbb6: eb d7 jmp 10bb8f <_Objects_Initialize_information+0x83><== NOT EXECUTED
/*
* Reset the maximum value. It will be updated when the information is
* extended.
*/
information->maximum = 0;
10bbb8: 66 c7 47 10 00 00 movw $0x0,0x10(%edi)
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10bbbe: 89 7d 08 mov %edi,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10bbc1: 5b pop %ebx
10bbc2: 5e pop %esi
10bbc3: 5f pop %edi
10bbc4: c9 leave
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10bbc5: e9 8e fa ff ff jmp 10b658 <_Objects_Extend_information>
0010bc00 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10bc00: 55 push %ebp
10bc01: 89 e5 mov %esp,%ebp
10bc03: 57 push %edi
10bc04: 56 push %esi
10bc05: 53 push %ebx
10bc06: 8b 75 0c mov 0xc(%ebp),%esi
10bc09: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
10bc0c: 85 ff test %edi,%edi
10bc0e: 74 5c je 10bc6c <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10bc10: 85 f6 test %esi,%esi
10bc12: 74 38 je 10bc4c <_Objects_Name_to_id_u32+0x4c>
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bc14: 8b 55 08 mov 0x8(%ebp),%edx
10bc17: 8b 42 10 mov 0x10(%edx),%eax
10bc1a: 66 85 c0 test %ax,%ax
10bc1d: 74 2d je 10bc4c <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN
10bc1f: 8b 55 10 mov 0x10(%ebp),%edx
10bc22: 85 d2 test %edx,%edx
10bc24: 75 32 jne 10bc58 <_Objects_Name_to_id_u32+0x58>
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10bc26: 0f b7 d8 movzwl %ax,%ebx
10bc29: 85 db test %ebx,%ebx
10bc2b: 74 1f je 10bc4c <_Objects_Name_to_id_u32+0x4c><== NEVER TAKEN
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bc2d: 8b 45 08 mov 0x8(%ebp),%eax
10bc30: 8b 48 1c mov 0x1c(%eax),%ecx
10bc33: ba 01 00 00 00 mov $0x1,%edx
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
10bc38: 8b 04 91 mov (%ecx,%edx,4),%eax
if ( !the_object )
10bc3b: 85 c0 test %eax,%eax
10bc3d: 74 05 je 10bc44 <_Objects_Name_to_id_u32+0x44>
continue;
if ( name == the_object->name.name_u32 ) {
10bc3f: 39 70 0c cmp %esi,0xc(%eax)
10bc42: 74 34 je 10bc78 <_Objects_Name_to_id_u32+0x78>
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10bc44: 42 inc %edx
10bc45: 39 da cmp %ebx,%edx
10bc47: 76 ef jbe 10bc38 <_Objects_Name_to_id_u32+0x38>
10bc49: 8d 76 00 lea 0x0(%esi),%esi
10bc4c: b8 01 00 00 00 mov $0x1,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bc51: 5b pop %ebx
10bc52: 5e pop %esi
10bc53: 5f pop %edi
10bc54: c9 leave
10bc55: c3 ret
10bc56: 66 90 xchg %ax,%ax
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
10bc58: 81 7d 10 ff ff ff 7f cmpl $0x7fffffff,0x10(%ebp)
10bc5f: 74 c5 je 10bc26 <_Objects_Name_to_id_u32+0x26>
10bc61: 83 7d 10 01 cmpl $0x1,0x10(%ebp)
10bc65: 75 e5 jne 10bc4c <_Objects_Name_to_id_u32+0x4c>
10bc67: eb bd jmp 10bc26 <_Objects_Name_to_id_u32+0x26>
10bc69: 8d 76 00 lea 0x0(%esi),%esi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
10bc6c: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bc71: 5b pop %ebx
10bc72: 5e pop %esi
10bc73: 5f pop %edi
10bc74: c9 leave
10bc75: c3 ret
10bc76: 66 90 xchg %ax,%ax
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10bc78: 8b 40 08 mov 0x8(%eax),%eax
10bc7b: 89 07 mov %eax,(%edi)
10bc7d: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10bc7f: 5b pop %ebx
10bc80: 5e pop %esi
10bc81: 5f pop %edi
10bc82: c9 leave
10bc83: c3 ret
0010bbcc <_Objects_Namespace_remove>:
void _Objects_Namespace_remove(
Objects_Information *information,
Objects_Control *the_object
)
{
10bbcc: 55 push %ebp
10bbcd: 89 e5 mov %esp,%ebp
10bbcf: 53 push %ebx
10bbd0: 83 ec 04 sub $0x4,%esp
10bbd3: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* If this is a string format name, then free the memory.
*/
if ( information->is_string && the_object->name.name_p )
10bbd6: 8b 45 08 mov 0x8(%ebp),%eax
10bbd9: 80 78 38 00 cmpb $0x0,0x38(%eax)
10bbdd: 74 13 je 10bbf2 <_Objects_Namespace_remove+0x26><== ALWAYS TAKEN
10bbdf: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED
10bbe2: 85 c0 test %eax,%eax <== NOT EXECUTED
10bbe4: 74 0c je 10bbf2 <_Objects_Namespace_remove+0x26><== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
10bbe6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bbe9: 50 push %eax <== NOT EXECUTED
10bbea: e8 19 18 00 00 call 10d408 <_Workspace_Free> <== NOT EXECUTED
10bbef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
/*
* Clear out either format.
*/
the_object->name.name_p = NULL;
the_object->name.name_u32 = 0;
10bbf2: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
}
10bbf9: 8b 5d fc mov -0x4(%ebp),%ebx
10bbfc: c9 leave
10bbfd: c3 ret
0010d624 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10d624: 55 push %ebp
10d625: 89 e5 mov %esp,%ebp
10d627: 57 push %edi
10d628: 56 push %esi
10d629: 53 push %ebx
10d62a: 83 ec 14 sub $0x14,%esp
10d62d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d630: 8b 7d 10 mov 0x10(%ebp),%edi
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
10d633: 0f b7 43 3a movzwl 0x3a(%ebx),%eax
10d637: 50 push %eax
10d638: 57 push %edi
10d639: e8 7e 5c 00 00 call 1132bc <strnlen>
10d63e: 8d 70 01 lea 0x1(%eax),%esi
if ( information->is_string ) {
10d641: 83 c4 10 add $0x10,%esp
10d644: 80 7b 38 00 cmpb $0x0,0x38(%ebx)
10d648: 75 5a jne 10d6a4 <_Objects_Set_name+0x80><== NEVER TAKEN
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10d64a: 85 f6 test %esi,%esi
10d64c: 74 3e je 10d68c <_Objects_Set_name+0x68><== NEVER TAKEN
10d64e: 0f be 17 movsbl (%edi),%edx
10d651: c1 e2 18 shl $0x18,%edx
10d654: 83 fe 01 cmp $0x1,%esi
10d657: 0f 84 ae 00 00 00 je 10d70b <_Objects_Set_name+0xe7>
10d65d: 0f be 47 01 movsbl 0x1(%edi),%eax
10d661: c1 e0 10 shl $0x10,%eax
10d664: 09 d0 or %edx,%eax
10d666: 83 fe 02 cmp $0x2,%esi
10d669: 0f 84 89 00 00 00 je 10d6f8 <_Objects_Set_name+0xd4>
10d66f: 0f be 57 02 movsbl 0x2(%edi),%edx
10d673: c1 e2 08 shl $0x8,%edx
10d676: 09 c2 or %eax,%edx
10d678: 83 fe 03 cmp $0x3,%esi
10d67b: 0f 84 83 00 00 00 je 10d704 <_Objects_Set_name+0xe0>
10d681: 0f be 47 03 movsbl 0x3(%edi),%eax
10d685: 09 d0 or %edx,%eax
10d687: eb 08 jmp 10d691 <_Objects_Set_name+0x6d>
10d689: 8d 76 00 lea 0x0(%esi),%esi
10d68c: b8 20 20 20 20 mov $0x20202020,%eax <== NOT EXECUTED
10d691: 8b 55 0c mov 0xc(%ebp),%edx
10d694: 89 42 0c mov %eax,0xc(%edx)
10d697: b0 01 mov $0x1,%al
);
}
return TRUE;
}
10d699: 8d 65 f4 lea -0xc(%ebp),%esp
10d69c: 5b pop %ebx
10d69d: 5e pop %esi
10d69e: 5f pop %edi
10d69f: c9 leave
10d6a0: c3 ret
10d6a1: 8d 76 00 lea 0x0(%esi),%esi
length = strnlen( name, information->name_length ) + 1;
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
10d6a4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d6a7: 56 push %esi <== NOT EXECUTED
10d6a8: e8 ff 17 00 00 call 10eeac <_Workspace_Allocate> <== NOT EXECUTED
10d6ad: 89 c3 mov %eax,%ebx <== NOT EXECUTED
if ( !d )
10d6af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d6b2: 85 c0 test %eax,%eax <== NOT EXECUTED
10d6b4: 74 4a je 10d700 <_Objects_Set_name+0xdc><== NOT EXECUTED
return FALSE;
if ( the_object->name.name_p ) {
10d6b6: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10d6b9: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED
10d6bc: 85 c0 test %eax,%eax <== NOT EXECUTED
10d6be: 74 16 je 10d6d6 <_Objects_Set_name+0xb2><== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
10d6c0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10d6c3: 50 push %eax <== NOT EXECUTED
10d6c4: e8 cb 17 00 00 call 10ee94 <_Workspace_Free> <== NOT EXECUTED
the_object->name.name_p = NULL;
10d6c9: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED
10d6cc: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) <== NOT EXECUTED
10d6d3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
strncpy( d, name, length );
10d6d6: 50 push %eax <== NOT EXECUTED
10d6d7: 56 push %esi <== NOT EXECUTED
10d6d8: 57 push %edi <== NOT EXECUTED
10d6d9: 53 push %ebx <== NOT EXECUTED
10d6da: e8 55 5b 00 00 call 113234 <strncpy> <== NOT EXECUTED
d[ length ] = '\0';
10d6df: c6 04 33 00 movb $0x0,(%ebx,%esi,1) <== NOT EXECUTED
the_object->name.name_p = d;
10d6e3: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10d6e6: 89 5a 0c mov %ebx,0xc(%edx) <== NOT EXECUTED
10d6e9: b0 01 mov $0x1,%al <== NOT EXECUTED
10d6eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
);
}
return TRUE;
}
10d6ee: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10d6f1: 5b pop %ebx <== NOT EXECUTED
10d6f2: 5e pop %esi <== NOT EXECUTED
10d6f3: 5f pop %edi <== NOT EXECUTED
10d6f4: c9 leave <== NOT EXECUTED
10d6f5: c3 ret <== NOT EXECUTED
10d6f6: 66 90 xchg %ax,%ax <== NOT EXECUTED
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10d6f8: 0d 20 20 00 00 or $0x2020,%eax
10d6fd: eb 92 jmp 10d691 <_Objects_Set_name+0x6d>
10d6ff: 90 nop
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
if ( !d )
10d700: 31 c0 xor %eax,%eax
10d702: eb 95 jmp 10d699 <_Objects_Set_name+0x75><== NOT EXECUTED
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
10d704: 89 d0 mov %edx,%eax
10d706: 83 c8 20 or $0x20,%eax
10d709: eb 86 jmp 10d691 <_Objects_Set_name+0x6d>
10d70b: 89 d0 mov %edx,%eax
10d70d: 0d 20 20 20 00 or $0x202020,%eax
10d712: e9 7a ff ff ff jmp 10d691 <_Objects_Set_name+0x6d>
0010bc8c <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10bc8c: 55 push %ebp
10bc8d: 89 e5 mov %esp,%ebp
10bc8f: 57 push %edi
10bc90: 56 push %esi
10bc91: 53 push %ebx
10bc92: 83 ec 0c sub $0xc,%esp
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10bc95: 8b 55 08 mov 0x8(%ebp),%edx
10bc98: 8b 42 08 mov 0x8(%edx),%eax
10bc9b: 0f b7 f0 movzwl %ax,%esi
/*
* Search the list to find block or chunnk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
10bc9e: 8b 4a 14 mov 0x14(%edx),%ecx
10bca1: 0f b7 42 10 movzwl 0x10(%edx),%eax
10bca5: 29 f0 sub %esi,%eax
10bca7: 31 d2 xor %edx,%edx
10bca9: f7 f1 div %ecx
for ( block = 0; block < block_count; block++ ) {
10bcab: 85 c0 test %eax,%eax
10bcad: 74 24 je 10bcd3 <_Objects_Shrink_information+0x47><== NEVER TAKEN
if ( information->inactive_per_block[ block ] == information->allocation_size ) {
10bcaf: 8b 55 08 mov 0x8(%ebp),%edx
10bcb2: 8b 5a 30 mov 0x30(%edx),%ebx
10bcb5: 3b 0b cmp (%ebx),%ecx
10bcb7: 74 22 je 10bcdb <_Objects_Shrink_information+0x4f><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
10bcb9: 31 d2 xor %edx,%edx
10bcbb: eb 11 jmp 10bcce <_Objects_Shrink_information+0x42>
10bcbd: 8d 76 00 lea 0x0(%esi),%esi
}
index_base += information->allocation_size;
10bcc0: 01 ce add %ecx,%esi
10bcc2: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi
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 ] == information->allocation_size ) {
10bcc9: 3b 0c 93 cmp (%ebx,%edx,4),%ecx
10bccc: 74 12 je 10bce0 <_Objects_Shrink_information+0x54>
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10bcce: 42 inc %edx
10bccf: 39 d0 cmp %edx,%eax
10bcd1: 77 ed ja 10bcc0 <_Objects_Shrink_information+0x34>
return;
}
index_base += information->allocation_size;
}
}
10bcd3: 8d 65 f4 lea -0xc(%ebp),%esp
10bcd6: 5b pop %ebx
10bcd7: 5e pop %esi
10bcd8: 5f pop %edi
10bcd9: c9 leave
10bcda: 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 ] == information->allocation_size ) {
10bcdb: 31 ff xor %edi,%edi <== NOT EXECUTED
10bcdd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* XXX - Not to sure how to use a chain where you need to iterate and
* and remove elements.
*/
the_object = (Objects_Control *) information->Inactive.first;
10bce0: 8b 5d 08 mov 0x8(%ebp),%ebx
10bce3: 8b 4b 20 mov 0x20(%ebx),%ecx
10bce6: eb 26 jmp 10bd0e <_Objects_Shrink_information+0x82>
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
10bce8: 89 f0 mov %esi,%eax
10bcea: 8b 5d 08 mov 0x8(%ebp),%ebx
10bced: 03 43 14 add 0x14(%ebx),%eax
10bcf0: 39 d0 cmp %edx,%eax
10bcf2: 76 24 jbe 10bd18 <_Objects_Shrink_information+0x8c>
* @param[in] start_address is the starting address of the user block
* to free
* @return TRUE if successfully freed, FALSE otherwise
*/
bool _Protected_heap_Free(
Heap_Control *the_heap,
10bcf4: 8b 19 mov (%ecx),%ebx
if ( !_Chain_Is_last( &the_object->Node ) )
the_object = (Objects_Control *) the_object->Node.next;
else
the_object = NULL;
_Chain_Extract( &extract_me->Node );
10bcf6: 83 ec 0c sub $0xc,%esp
10bcf9: 51 push %ecx
10bcfa: e8 45 33 00 00 call 10f044 <_Chain_Extract>
10bcff: 83 c4 10 add $0x10,%esp
}
else {
the_object = (Objects_Control *) the_object->Node.next;
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
10bd02: 85 db test %ebx,%ebx
10bd04: 74 1a je 10bd20 <_Objects_Shrink_information+0x94><== NEVER TAKEN
10bd06: 8b 03 mov (%ebx),%eax
10bd08: 85 c0 test %eax,%eax
10bd0a: 74 14 je 10bd20 <_Objects_Shrink_information+0x94>
10bd0c: 89 d9 mov %ebx,%ecx
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
10bd0e: 8b 41 08 mov 0x8(%ecx),%eax
10bd11: 0f b7 d0 movzwl %ax,%edx
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
10bd14: 39 f2 cmp %esi,%edx
10bd16: 73 d0 jae 10bce8 <_Objects_Shrink_information+0x5c>
the_object = NULL;
_Chain_Extract( &extract_me->Node );
}
else {
the_object = (Objects_Control *) the_object->Node.next;
10bd18: 8b 19 mov (%ecx),%ebx
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
10bd1a: 85 db test %ebx,%ebx
10bd1c: 75 e8 jne 10bd06 <_Objects_Shrink_information+0x7a><== ALWAYS TAKEN
10bd1e: 66 90 xchg %ax,%ax
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10bd20: 83 ec 0c sub $0xc,%esp
10bd23: 8b 55 08 mov 0x8(%ebp),%edx
10bd26: 8b 42 34 mov 0x34(%edx),%eax
10bd29: ff 34 38 pushl (%eax,%edi,1)
10bd2c: e8 d7 16 00 00 call 10d408 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10bd31: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd34: 8b 43 34 mov 0x34(%ebx),%eax
10bd37: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive_per_block[ block ] = 0;
10bd3e: 8b 43 30 mov 0x30(%ebx),%eax
10bd41: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive -= information->allocation_size;
10bd48: 8b 43 14 mov 0x14(%ebx),%eax
10bd4b: 66 29 43 2c sub %ax,0x2c(%ebx)
10bd4f: 83 c4 10 add $0x10,%esp
return;
}
index_base += information->allocation_size;
}
}
10bd52: 8d 65 f4 lea -0xc(%ebp),%esp
10bd55: 5b pop %ebx
10bd56: 5e pop %esi
10bd57: 5f pop %edi
10bd58: c9 leave
10bd59: c3 ret
0010dd40 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
10dd40: 55 push %ebp
10dd41: 89 e5 mov %esp,%ebp
10dd43: 56 push %esi
10dd44: 53 push %ebx
10dd45: 8b 75 08 mov 0x8(%ebp),%esi
10dd48: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Get_information_status status;
if ( !the_heap )
10dd4b: 85 f6 test %esi,%esi
10dd4d: 74 39 je 10dd88 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
return false;
if ( !the_info )
10dd4f: 85 db test %ebx,%ebx
10dd51: 74 35 je 10dd88 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
return false;
_RTEMS_Lock_allocator();
10dd53: 83 ec 0c sub $0xc,%esp
10dd56: ff 35 b4 3d 12 00 pushl 0x123db4
10dd5c: e8 63 e8 ff ff call 10c5c4 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
10dd61: 5a pop %edx
10dd62: 59 pop %ecx
10dd63: 53 push %ebx
10dd64: 56 push %esi
10dd65: e8 e2 37 00 00 call 11154c <_Heap_Get_information>
10dd6a: 89 c3 mov %eax,%ebx
_RTEMS_Unlock_allocator();
10dd6c: 58 pop %eax
10dd6d: ff 35 b4 3d 12 00 pushl 0x123db4
10dd73: e8 94 e8 ff ff call 10c60c <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
10dd78: 83 c4 10 add $0x10,%esp
10dd7b: 85 db test %ebx,%ebx
10dd7d: 0f 94 c0 sete %al
return true;
return false;
}
10dd80: 8d 65 f8 lea -0x8(%ebp),%esp
10dd83: 5b pop %ebx
10dd84: 5e pop %esi
10dd85: c9 leave
10dd86: c3 ret
10dd87: 90 nop
_RTEMS_Lock_allocator();
status = _Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
10dd88: 31 c0 xor %eax,%eax
return true;
return false;
}
10dd8a: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10dd8d: 5b pop %ebx <== NOT EXECUTED
10dd8e: 5e pop %esi <== NOT EXECUTED
10dd8f: c9 leave <== NOT EXECUTED
10dd90: c3 ret <== NOT EXECUTED
0010eee4 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
10eee4: 55 push %ebp
10eee5: 89 e5 mov %esp,%ebp
10eee7: 53 push %ebx
10eee8: 83 ec 10 sub $0x10,%esp
10eeeb: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
10eeee: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10eef3: 8b 40 40 mov 0x40(%eax),%eax
10eef6: 80 78 04 01 cmpb $0x1,0x4(%eax)
10eefa: 19 c0 sbb %eax,%eax
10eefc: 83 e0 c0 and $0xffffffc0,%eax
10eeff: 83 c0 60 add $0x60,%eax
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
10ef02: 50 push %eax
10ef03: e8 18 e5 ff ff call 10d420 <_Workspace_Allocate>
10ef08: 89 c2 mov %eax,%edx
if ( !api )
10ef0a: 83 c4 10 add $0x10,%esp
10ef0d: 85 c0 test %eax,%eax
10ef0f: 74 67 je 10ef78 <_RTEMS_tasks_Create_extension+0x94><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
10ef11: 89 83 f4 00 00 00 mov %eax,0xf4(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
10ef17: c7 00 00 00 00 00 movl $0x0,(%eax)
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
10ef1d: c6 40 08 01 movb $0x1,0x8(%eax)
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10ef21: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10ef28: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
*
10ef2f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
* @param[in] the_heap is the heap to operate upon
10ef36: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
* @param[in] starting_address is the starting address of the memory for
10ef3d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
10ef44: c7 83 04 01 00 00 00 movl $0x0,0x104(%ebx)
10ef4b: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
10ef4e: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10ef53: 8b 40 40 mov 0x40(%eax),%eax
10ef56: 80 78 04 00 cmpb $0x0,0x4(%eax)
10ef5a: 74 12 je 10ef6e <_RTEMS_tasks_Create_extension+0x8a>
10ef5c: 31 c0 xor %eax,%eax
10ef5e: 66 90 xchg %ax,%ax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
10ef60: c7 44 82 20 00 00 00 movl $0x0,0x20(%edx,%eax,4)
10ef67: 00
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
10ef68: 40 inc %eax
10ef69: 83 f8 10 cmp $0x10,%eax
10ef6c: 75 f2 jne 10ef60 <_RTEMS_tasks_Create_extension+0x7c>
10ef6e: b0 01 mov $0x1,%al
api->Notepads[i] = 0;
}
return true;
}
10ef70: 8b 5d fc mov -0x4(%ebp),%ebx
10ef73: c9 leave
10ef74: c3 ret
10ef75: 8d 76 00 lea 0x0(%esi),%esi
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
10ef78: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
10ef7a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ef7d: c9 leave <== NOT EXECUTED
10ef7e: c3 ret <== NOT EXECUTED
0010a7b0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10a7b0: 55 push %ebp
10a7b1: 89 e5 mov %esp,%ebp
10a7b3: 57 push %edi
10a7b4: 56 push %esi
10a7b5: 53 push %ebx
10a7b6: 83 ec 1c sub $0x1c,%esp
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
rtems_api_configuration_table *api_configuration;
api_configuration = _Configuration_Table->RTEMS_api_configuration;
10a7b9: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10a7be: 8b 40 40 mov 0x40(%eax),%eax
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
10a7c1: 8b 50 2c mov 0x2c(%eax),%edx
maximum = api_configuration->number_of_initialization_tasks;
10a7c4: 8b 78 28 mov 0x28(%eax),%edi
if ( !user_tasks || maximum == 0 )
10a7c7: 85 d2 test %edx,%edx
10a7c9: 74 48 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN
10a7cb: 85 ff test %edi,%edi
10a7cd: 74 44 je 10a813 <_RTEMS_tasks_Initialize_user_tasks_body+0x63><== NEVER TAKEN
10a7cf: 89 d3 mov %edx,%ebx
10a7d1: 31 f6 xor %esi,%esi
10a7d3: 90 nop
return;
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
10a7d4: 83 ec 08 sub $0x8,%esp
10a7d7: 8d 45 f0 lea -0x10(%ebp),%eax
10a7da: 50 push %eax
10a7db: ff 73 0c pushl 0xc(%ebx)
10a7de: ff 73 14 pushl 0x14(%ebx)
10a7e1: ff 73 04 pushl 0x4(%ebx)
10a7e4: ff 73 08 pushl 0x8(%ebx)
10a7e7: ff 33 pushl (%ebx)
10a7e9: e8 9a fd ff ff call 10a588 <rtems_task_create>
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10a7ee: 83 c4 20 add $0x20,%esp
10a7f1: 85 c0 test %eax,%eax
10a7f3: 75 27 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
10a7f5: 51 push %ecx
10a7f6: ff 73 18 pushl 0x18(%ebx)
10a7f9: ff 73 10 pushl 0x10(%ebx)
10a7fc: ff 75 f0 pushl -0x10(%ebp)
10a7ff: e8 24 00 00 00 call 10a828 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10a804: 83 c4 10 add $0x10,%esp
10a807: 85 c0 test %eax,%eax
10a809: 75 11 jne 10a81c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
10a80b: 46 inc %esi
10a80c: 83 c3 1c add $0x1c,%ebx
10a80f: 39 f7 cmp %esi,%edi
10a811: 77 c1 ja 10a7d4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
}
}
10a813: 8d 65 f4 lea -0xc(%ebp),%esp
10a816: 5b pop %ebx
10a817: 5e pop %esi
10a818: 5f pop %edi
10a819: c9 leave
10a81a: c3 ret
10a81b: 90 nop
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 );
10a81c: 52 push %edx
10a81d: 50 push %eax
10a81e: 6a 01 push $0x1
10a820: 6a 01 push $0x1
10a822: e8 f9 0c 00 00 call 10b520 <_Internal_error_Occurred>
0010ee2c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
10ee2c: 55 push %ebp
10ee2d: 89 e5 mov %esp,%ebp
10ee2f: 57 push %edi
10ee30: 56 push %esi
10ee31: 53 push %ebx
10ee32: 83 ec 1c sub $0x1c,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10ee35: 8b 45 08 mov 0x8(%ebp),%eax
10ee38: 8b b0 f4 00 00 00 mov 0xf4(%eax),%esi
if ( !api )
10ee3e: 85 f6 test %esi,%esi
10ee40: 74 45 je 10ee87 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
10ee42: 9c pushf
10ee43: fa cli
10ee44: 58 pop %eax
signal_set = asr->signals_posted;
10ee45: 8b 7e 14 mov 0x14(%esi),%edi
asr->signals_posted = 0;
10ee48: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
_ISR_Enable( level );
10ee4f: 50 push %eax
10ee50: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
10ee51: 85 ff test %edi,%edi
10ee53: 74 32 je 10ee87 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
return;
asr->nest_level += 1;
10ee55: ff 46 1c incl 0x1c(%esi)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
10ee58: 50 push %eax
10ee59: 8d 5d f0 lea -0x10(%ebp),%ebx
10ee5c: 53 push %ebx
10ee5d: 68 ff ff 00 00 push $0xffff
10ee62: ff 76 10 pushl 0x10(%esi)
10ee65: e8 e6 0e 00 00 call 10fd50 <rtems_task_mode>
(*asr->handler)( signal_set );
10ee6a: 89 3c 24 mov %edi,(%esp)
10ee6d: ff 56 0c call *0xc(%esi)
asr->nest_level -= 1;
10ee70: ff 4e 1c decl 0x1c(%esi)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
10ee73: 83 c4 0c add $0xc,%esp
10ee76: 53 push %ebx
10ee77: 68 ff ff 00 00 push $0xffff
10ee7c: ff 75 f0 pushl -0x10(%ebp)
10ee7f: e8 cc 0e 00 00 call 10fd50 <rtems_task_mode>
10ee84: 83 c4 10 add $0x10,%esp
}
10ee87: 8d 65 f4 lea -0xc(%ebp),%esp
10ee8a: 5b pop %ebx
10ee8b: 5e pop %esi
10ee8c: 5f pop %edi
10ee8d: c9 leave
10ee8e: c3 ret
0010ed90 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
10ed90: 55 push %ebp
10ed91: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
10ed93: 8b 45 08 mov 0x8(%ebp),%eax
10ed96: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx
while (tvp) {
10ed9c: 85 c9 test %ecx,%ecx
10ed9e: 74 13 je 10edb3 <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
10eda0: 8b 41 04 mov 0x4(%ecx),%eax
10eda3: 8b 10 mov (%eax),%edx
10eda5: 89 51 0c mov %edx,0xc(%ecx)
*tvp->ptr = tvp->gval;
10eda8: 8b 51 08 mov 0x8(%ecx),%edx
10edab: 89 10 mov %edx,(%eax)
tvp = (rtems_task_variable_t *)tvp->next;
10edad: 8b 09 mov (%ecx),%ecx
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
10edaf: 85 c9 test %ecx,%ecx
10edb1: 75 ed jne 10eda0 <_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;
10edb3: 8b 45 0c mov 0xc(%ebp),%eax
10edb6: 8b 88 04 01 00 00 mov 0x104(%eax),%ecx
while (tvp) {
10edbc: 85 c9 test %ecx,%ecx
10edbe: 74 13 je 10edd3 <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
10edc0: 8b 41 04 mov 0x4(%ecx),%eax
10edc3: 8b 10 mov (%eax),%edx
10edc5: 89 51 08 mov %edx,0x8(%ecx)
*tvp->ptr = tvp->tval;
10edc8: 8b 51 0c mov 0xc(%ecx),%edx
10edcb: 89 10 mov %edx,(%eax)
tvp = (rtems_task_variable_t *)tvp->next;
10edcd: 8b 09 mov (%ecx),%ecx
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
10edcf: 85 c9 test %ecx,%ecx
10edd1: 75 ed jne 10edc0 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
10edd3: c9 leave
10edd4: c3 ret
0010b0f0 <_Rate_monotonic_Initiate_statistics>:
#endif
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10b0f0: 55 push %ebp
10b0f1: 89 e5 mov %esp,%ebp
10b0f3: 57 push %edi
10b0f4: 56 push %esi
10b0f5: 53 push %ebx
10b0f6: 83 ec 28 sub $0x28,%esp
10b0f9: 8b 75 08 mov 0x8(%ebp),%esi
Thread_Control *owning_thread = the_period->owner;
10b0fc: 8b 5e 50 mov 0x50(%esi),%ebx
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
10b0ff: 8d 7d ec lea -0x14(%ebp),%edi
10b102: 57 push %edi
10b103: e8 6c 19 00 00 call 10ca74 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
the_period->time_at_period = uptime;
10b108: 8b 45 ec mov -0x14(%ebp),%eax
10b10b: 8b 55 f0 mov -0x10(%ebp),%edx
10b10e: 89 46 44 mov %eax,0x44(%esi)
10b111: 89 56 48 mov %edx,0x48(%esi)
#else
the_period->time_at_period = _Watchdog_Ticks_since_boot;
#endif
the_period->owner_executed_at_period = owning_thread->cpu_time_used;
10b114: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
10b11a: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10b120: 89 46 40 mov %eax,0x40(%esi)
10b123: 89 56 3c mov %edx,0x3c(%esi)
* context switch. When this routine is invoked from
* rtems_rate_monotonic_period, the owner will be the executing thread.
* When this routine is invoked from _Rate_monotonic_Timeout, it will not.
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
if (owning_thread == _Thread_Executing) {
10b126: 83 c4 10 add $0x10,%esp
10b129: 3b 1d 3c 28 12 00 cmp 0x12283c,%ebx
10b12f: 74 0b je 10b13c <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->owner_executed_at_period, &ran );
}
#endif
}
10b131: 8d 65 f4 lea -0xc(%ebp),%esp
10b134: 5b pop %ebx
10b135: 5e pop %esi
10b136: 5f pop %edi
10b137: c9 leave
10b138: c3 ret
10b139: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10b13c: 51 push %ecx
10b13d: 8d 5d e4 lea -0x1c(%ebp),%ebx
10b140: 53 push %ebx
10b141: 57 push %edi
10b142: 68 44 28 12 00 push $0x122844
10b147: e8 04 39 00 00 call 10ea50 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->owner_executed_at_period, &ran );
10b14c: 58 pop %eax
10b14d: 5a pop %edx
10b14e: 53 push %ebx
10b14f: 8d 46 3c lea 0x3c(%esi),%eax
10b152: 50 push %eax
10b153: e8 04 38 00 00 call 10e95c <_Timespec_Add_to>
10b158: 83 c4 10 add $0x10,%esp
10b15b: eb d4 jmp 10b131 <_Rate_monotonic_Initiate_statistics+0x41>
0010b724 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10b724: 55 push %ebp
10b725: 89 e5 mov %esp,%ebp
10b727: 53 push %ebx
10b728: 83 ec 18 sub $0x18,%esp
10b72b: 8d 45 f8 lea -0x8(%ebp),%eax
10b72e: 50 push %eax
10b72f: ff 75 08 pushl 0x8(%ebp)
10b732: 68 80 26 12 00 push $0x122680
10b737: e8 a4 1c 00 00 call 10d3e0 <_Objects_Get>
10b73c: 89 c3 mov %eax,%ebx
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10b73e: 83 c4 10 add $0x10,%esp
10b741: 8b 45 f8 mov -0x8(%ebp),%eax
10b744: 85 c0 test %eax,%eax
10b746: 75 21 jne 10b769 <_Rate_monotonic_Timeout+0x45><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10b748: 8b 53 50 mov 0x50(%ebx),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b74b: f6 42 11 40 testb $0x40,0x11(%edx)
10b74f: 75 1f jne 10b770 <_Rate_monotonic_Timeout+0x4c>
_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 ) {
10b751: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10b755: 74 35 je 10b78c <_Rate_monotonic_Timeout+0x68><== NEVER TAKEN
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10b757: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
10b75e: a1 78 27 12 00 mov 0x122778,%eax
10b763: 48 dec %eax
10b764: a3 78 27 12 00 mov %eax,0x122778
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b769: 8b 5d fc mov -0x4(%ebp),%ebx
10b76c: c9 leave
10b76d: c3 ret
10b76e: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10b770: 8b 42 20 mov 0x20(%edx),%eax
10b773: 3b 43 08 cmp 0x8(%ebx),%eax
10b776: 75 d9 jne 10b751 <_Rate_monotonic_Timeout+0x2d><== NEVER TAKEN
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10b778: 83 ec 08 sub $0x8,%esp
10b77b: 68 f8 ff 03 10 push $0x1003fff8
10b780: 52 push %edx
10b781: e8 f6 20 00 00 call 10d87c <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10b786: 59 pop %ecx
10b787: eb 0d jmp 10b796 <_Rate_monotonic_Timeout+0x72>
10b789: 8d 76 00 lea 0x0(%esi),%esi
_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;
10b78c: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
10b793: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10b796: 53 push %ebx
10b797: e8 54 f9 ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics>
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b79c: 8b 43 4c mov 0x4c(%ebx),%eax
10b79f: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b7a2: 58 pop %eax
10b7a3: 5a pop %edx
10b7a4: 8d 43 10 lea 0x10(%ebx),%eax
10b7a7: 50 push %eax
10b7a8: 68 5c 28 12 00 push $0x12285c
10b7ad: e8 46 35 00 00 call 10ecf8 <_Watchdog_Insert>
10b7b2: 83 c4 10 add $0x10,%esp
10b7b5: eb a7 jmp 10b75e <_Rate_monotonic_Timeout+0x3a>
0010b2cc <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
10b2cc: 55 push %ebp
10b2cd: 89 e5 mov %esp,%ebp
10b2cf: 53 push %ebx
10b2d0: 83 ec 1c sub $0x1c,%esp
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
10b2d3: a1 20 e8 11 00 mov 0x11e820,%eax
10b2d8: 8d 04 80 lea (%eax,%eax,4),%eax
10b2db: 8d 04 80 lea (%eax,%eax,4),%eax
10b2de: 8d 04 80 lea (%eax,%eax,4),%eax
10b2e1: c1 e0 03 shl $0x3,%eax
10b2e4: 89 45 f8 mov %eax,-0x8(%ebp)
tick.tv_sec = 0;
10b2e7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
10b2ee: a1 c4 e7 11 00 mov 0x11e7c4,%eax
10b2f3: 40 inc %eax
10b2f4: a3 c4 e7 11 00 mov %eax,0x11e7c4
/* Update the timespec format uptime */
(void) _Timespec_Add_to( &_TOD_Uptime, &tick );
10b2f9: 8d 5d f4 lea -0xc(%ebp),%ebx
10b2fc: 53 push %ebx
10b2fd: 68 d8 e6 11 00 push $0x11e6d8
10b302: e8 15 1c 00 00 call 10cf1c <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timespec_Add_to( &_TOD_Now, &tick );
10b307: 58 pop %eax
10b308: 5a pop %edx
10b309: 53 push %ebx
10b30a: 68 ec e6 11 00 push $0x11e6ec
10b30f: e8 08 1c 00 00 call 10cf1c <_Timespec_Add_to>
10b314: 89 c3 mov %eax,%ebx
while ( seconds ) {
10b316: 83 c4 10 add $0x10,%esp
10b319: 85 c0 test %eax,%eax
10b31b: 74 16 je 10b333 <_TOD_Tickle_ticks+0x67>
10b31d: 8d 76 00 lea 0x0(%esi),%esi
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
);
10b320: 83 ec 0c sub $0xc,%esp
10b323: 68 30 e7 11 00 push $0x11e730
10b328: e8 6b 20 00 00 call 10d398 <_Watchdog_Tickle>
10b32d: 83 c4 10 add $0x10,%esp
10b330: 4b dec %ebx
10b331: 75 ed jne 10b320 <_TOD_Tickle_ticks+0x54><== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
10b333: 8b 5d fc mov -0x4(%ebp),%ebx
10b336: c9 leave
10b337: c3 ret
0010ac64 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
rtems_time_of_day *the_tod
)
{
10ac64: 55 push %ebp
10ac65: 89 e5 mov %esp,%ebp
10ac67: 57 push %edi
10ac68: 56 push %esi
10ac69: 53 push %ebx
10ac6a: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10ac6d: 8b 43 08 mov 0x8(%ebx),%eax
10ac70: 8d 48 ff lea -0x1(%eax),%ecx
year_mod_4 = the_tod->year & 3;
10ac73: 8b 13 mov (%ebx),%edx
if ( year_mod_4 == 0 )
10ac75: 89 d6 mov %edx,%esi
10ac77: 83 e6 03 and $0x3,%esi
10ac7a: 74 68 je 10ace4 <_TOD_To_seconds+0x80>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10ac7c: 8b 43 04 mov 0x4(%ebx),%eax
10ac7f: 0f b7 84 00 00 b8 11 movzwl 0x11b800(%eax,%eax,1),%eax
10ac86: 00
10ac87: 8d 3c 08 lea (%eax,%ecx,1),%edi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10ac8a: 0f b7 8c 36 34 b8 11 movzwl 0x11b834(%esi,%esi,1),%ecx
10ac91: 00
10ac92: 81 ea c4 07 00 00 sub $0x7c4,%edx
10ac98: c1 ea 02 shr $0x2,%edx
10ac9b: 8d 04 d2 lea (%edx,%edx,8),%eax
10ac9e: 8d 04 c2 lea (%edx,%eax,8),%eax
10aca1: 8d 04 80 lea (%eax,%eax,4),%eax
10aca4: 8d 04 82 lea (%edx,%eax,4),%eax
10aca7: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10aca9: 01 f9 add %edi,%ecx
time *= TOD_SECONDS_PER_DAY;
10acab: 8d 14 89 lea (%ecx,%ecx,4),%edx
10acae: 8d 14 91 lea (%ecx,%edx,4),%edx
10acb1: 8d 14 d1 lea (%ecx,%edx,8),%edx
10acb4: c1 e2 02 shl $0x2,%edx
10acb7: 29 ca sub %ecx,%edx
10acb9: c1 e2 07 shl $0x7,%edx
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10acbc: 8b 4b 14 mov 0x14(%ebx),%ecx
* TOD_SECONDS_PER_MINUTE;
time += the_tod->second;
10acbf: 8b 43 0c mov 0xc(%ebx),%eax
10acc2: 8d 04 40 lea (%eax,%eax,2),%eax
10acc5: 8d 04 80 lea (%eax,%eax,4),%eax
10acc8: c1 e0 02 shl $0x2,%eax
10accb: 03 43 10 add 0x10(%ebx),%eax
10acce: 8d 04 40 lea (%eax,%eax,2),%eax
10acd1: 8d 04 80 lea (%eax,%eax,4),%eax
10acd4: 8d 84 81 00 e5 da 21 lea 0x21dae500(%ecx,%eax,4),%eax
10acdb: 01 d0 add %edx,%eax
time += TOD_SECONDS_1970_THROUGH_1988;
return( time );
}
10acdd: 5b pop %ebx
10acde: 5e pop %esi
10acdf: 5f pop %edi
10ace0: c9 leave
10ace1: c3 ret
10ace2: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10ace4: 8b 43 04 mov 0x4(%ebx),%eax
10ace7: 0f b7 84 00 1a b8 11 movzwl 0x11b81a(%eax,%eax,1),%eax
10acee: 00
10acef: 8d 3c 08 lea (%eax,%ecx,1),%edi
10acf2: eb 96 jmp 10ac8a <_TOD_To_seconds+0x26>
0010acf4 <_TOD_Validate>:
*/
bool _TOD_Validate(
rtems_time_of_day *the_tod
)
{
10acf4: 55 push %ebp
10acf5: 89 e5 mov %esp,%ebp
10acf7: 53 push %ebx
10acf8: 83 ec 04 sub $0x4,%esp
10acfb: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t days_in_month;
if ((!the_tod) ||
10acfe: 85 db test %ebx,%ebx
10ad00: 74 56 je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN
10ad02: b8 40 42 0f 00 mov $0xf4240,%eax
10ad07: 31 d2 xor %edx,%edx
10ad09: f7 35 40 a8 12 00 divl 0x12a840
10ad0f: 39 43 18 cmp %eax,0x18(%ebx)
10ad12: 73 44 jae 10ad58 <_TOD_Validate+0x64>
10ad14: 83 7b 14 3b cmpl $0x3b,0x14(%ebx)
10ad18: 77 3e ja 10ad58 <_TOD_Validate+0x64>
10ad1a: 83 7b 10 3b cmpl $0x3b,0x10(%ebx)
10ad1e: 77 38 ja 10ad58 <_TOD_Validate+0x64>
10ad20: 83 7b 0c 17 cmpl $0x17,0xc(%ebx)
10ad24: 77 32 ja 10ad58 <_TOD_Validate+0x64>
10ad26: 8b 43 04 mov 0x4(%ebx),%eax
10ad29: 85 c0 test %eax,%eax
10ad2b: 74 2b je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN
10ad2d: 83 f8 0c cmp $0xc,%eax
10ad30: 77 26 ja 10ad58 <_TOD_Validate+0x64>
10ad32: 8b 0b mov (%ebx),%ecx
10ad34: 81 f9 c3 07 00 00 cmp $0x7c3,%ecx
10ad3a: 76 1c jbe 10ad58 <_TOD_Validate+0x64>
10ad3c: 8b 53 08 mov 0x8(%ebx),%edx
10ad3f: 85 d2 test %edx,%edx
10ad41: 74 15 je 10ad58 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10ad43: 83 e1 03 and $0x3,%ecx
10ad46: 75 16 jne 10ad5e <_TOD_Validate+0x6a>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10ad48: 8b 04 85 74 b8 11 00 mov 0x11b874(,%eax,4),%eax
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10ad4f: 39 d0 cmp %edx,%eax
10ad51: 0f 93 c0 setae %al
10ad54: eb 04 jmp 10ad5a <_TOD_Validate+0x66>
10ad56: 66 90 xchg %ax,%ax
10ad58: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10ad5a: 5a pop %edx
10ad5b: 5b pop %ebx
10ad5c: c9 leave
10ad5d: 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 ];
10ad5e: 8b 04 85 40 b8 11 00 mov 0x11b840(,%eax,4),%eax
10ad65: eb e8 jmp 10ad4f <_TOD_Validate+0x5b>
0010be10 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10be10: 55 push %ebp
10be11: 89 e5 mov %esp,%ebp
10be13: 57 push %edi
10be14: 56 push %esi
10be15: 53 push %ebx
10be16: 83 ec 18 sub $0x18,%esp
10be19: 8b 5d 08 mov 0x8(%ebp),%ebx
10be1c: 8b 75 0c mov 0xc(%ebp),%esi
10be1f: 8a 45 10 mov 0x10(%ebp),%al
10be22: 88 45 f3 mov %al,-0xd(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10be25: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10be28: 53 push %ebx
10be29: e8 4a 0e 00 00 call 10cc78 <_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 )
10be2e: 83 c4 10 add $0x10,%esp
10be31: 39 73 14 cmp %esi,0x14(%ebx)
10be34: 74 0d je 10be43 <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10be36: 83 ec 08 sub $0x8,%esp
10be39: 56 push %esi
10be3a: 53 push %ebx
10be3b: e8 f4 0c 00 00 call 10cb34 <_Thread_Set_priority>
10be40: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10be43: 9c pushf
10be44: fa cli
10be45: 5e pop %esi
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
10be46: 8b 53 10 mov 0x10(%ebx),%edx
if ( state != STATES_TRANSIENT ) {
10be49: 83 fa 04 cmp $0x4,%edx
10be4c: 74 3a je 10be88 <_Thread_Change_priority+0x78>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10be4e: 83 e7 04 and $0x4,%edi
10be51: 75 08 jne 10be5b <_Thread_Change_priority+0x4b><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10be53: 89 d0 mov %edx,%eax
10be55: 83 e0 fb and $0xfffffffb,%eax
10be58: 89 43 10 mov %eax,0x10(%ebx)
_ISR_Enable( level );
10be5b: 56 push %esi
10be5c: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10be5d: 81 e2 e0 be 03 00 and $0x3bee0,%edx
10be63: 75 0b jne 10be70 <_Thread_Change_priority+0x60>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10be65: 8d 65 f4 lea -0xc(%ebp),%esp
10be68: 5b pop %ebx
10be69: 5e pop %esi
10be6a: 5f pop %edi
10be6b: c9 leave
10be6c: c3 ret
10be6d: 8d 76 00 lea 0x0(%esi),%esi
/* 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 );
10be70: 89 5d 0c mov %ebx,0xc(%ebp)
10be73: 8b 43 44 mov 0x44(%ebx),%eax
10be76: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10be79: 8d 65 f4 lea -0xc(%ebp),%esp
10be7c: 5b pop %ebx
10be7d: 5e pop %esi
10be7e: 5f pop %edi
10be7f: c9 leave
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10be80: e9 1b 0c 00 00 jmp 10caa0 <_Thread_queue_Requeue>
10be85: 8d 76 00 lea 0x0(%esi),%esi
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10be88: 83 e7 04 and $0x4,%edi
10be8b: 75 41 jne 10bece <_Thread_Change_priority+0xbe><== 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 );
10be8d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10be94: 8b 93 90 00 00 00 mov 0x90(%ebx),%edx
10be9a: 66 8b 83 96 00 00 00 mov 0x96(%ebx),%ax
10bea1: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10bea4: 66 a1 10 e7 11 00 mov 0x11e710,%ax
10beaa: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10beb0: 66 a3 10 e7 11 00 mov %ax,0x11e710
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10beb6: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10beba: 74 70 je 10bf2c <_Thread_Change_priority+0x11c>
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
10bebc: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10bec2: 89 43 04 mov %eax,0x4(%ebx)
10bec5: 8b 10 mov (%eax),%edx
10bec7: 89 18 mov %ebx,(%eax)
10bec9: 89 13 mov %edx,(%ebx)
10becb: 89 5a 04 mov %ebx,0x4(%edx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10bece: 56 push %esi
10becf: 9d popf
10bed0: fa cli
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10bed1: 66 8b 0d 10 e7 11 00 mov 0x11e710,%cx
10bed8: 31 d2 xor %edx,%edx
10beda: 89 d0 mov %edx,%eax
10bedc: 66 0f bc c1 bsf %cx,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10bee0: 0f b7 c0 movzwl %ax,%eax
10bee3: 66 8b 8c 00 a0 e7 11 mov 0x11e7a0(%eax,%eax,1),%cx
10beea: 00
10beeb: 66 0f bc d1 bsf %cx,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10beef: c1 e0 04 shl $0x4,%eax
10bef2: 0f b7 d2 movzwl %dx,%edx
10bef5: 01 d0 add %edx,%eax
10bef7: 8d 04 40 lea (%eax,%eax,2),%eax
10befa: 8b 15 20 e6 11 00 mov 0x11e620,%edx
10bf00: 8b 04 82 mov (%edx,%eax,4),%eax
10bf03: a3 e8 e6 11 00 mov %eax,0x11e6e8
void *starting_address,
size_t size
);
/**
* This function attempts to allocate a block of @a size bytes from
10bf08: 8b 15 1c e7 11 00 mov 0x11e71c,%edx
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
10bf0e: 39 d0 cmp %edx,%eax
10bf10: 74 0d je 10bf1f <_Thread_Change_priority+0x10f>
10bf12: 80 7a 76 00 cmpb $0x0,0x76(%edx)
10bf16: 74 07 je 10bf1f <_Thread_Change_priority+0x10f><== NEVER TAKEN
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
10bf18: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
_ISR_Enable( level );
10bf1f: 56 push %esi
10bf20: 9d popf
}
10bf21: 8d 65 f4 lea -0xc(%ebp),%esp
10bf24: 5b pop %ebx
10bf25: 5e pop %esi
10bf26: 5f pop %edi
10bf27: c9 leave
10bf28: c3 ret
10bf29: 8d 76 00 lea 0x0(%esi),%esi
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
10bf2c: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
10bf32: 8d 50 04 lea 0x4(%eax),%edx
10bf35: 89 13 mov %edx,(%ebx)
10bf37: 8b 50 08 mov 0x8(%eax),%edx
10bf3a: 89 58 08 mov %ebx,0x8(%eax)
10bf3d: 89 1a mov %ebx,(%edx)
10bf3f: 89 53 04 mov %edx,0x4(%ebx)
10bf42: eb 8a jmp 10bece <_Thread_Change_priority+0xbe>
0010bf44 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10bf44: 55 push %ebp
10bf45: 89 e5 mov %esp,%ebp
10bf47: 53 push %ebx
10bf48: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10bf4b: 9c pushf
10bf4c: fa cli
10bf4d: 5b pop %ebx
current_state = the_thread->current_state;
10bf4e: 8b 51 10 mov 0x10(%ecx),%edx
if ( current_state & state ) {
10bf51: 85 55 0c test %edx,0xc(%ebp)
10bf54: 74 72 je 10bfc8 <_Thread_Clear_state+0x84>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10bf56: 8b 45 0c mov 0xc(%ebp),%eax
10bf59: f7 d0 not %eax
10bf5b: 21 d0 and %edx,%eax
current_state =
10bf5d: 89 41 10 mov %eax,0x10(%ecx)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10bf60: 85 c0 test %eax,%eax
10bf62: 75 64 jne 10bfc8 <_Thread_Clear_state+0x84>
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10bf64: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx
10bf6a: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax
10bf71: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10bf74: 66 a1 10 e7 11 00 mov 0x11e710,%ax
10bf7a: 0b 81 94 00 00 00 or 0x94(%ecx),%eax
10bf80: 66 a3 10 e7 11 00 mov %ax,0x11e710
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10bf86: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax
10bf8c: 8d 50 04 lea 0x4(%eax),%edx
10bf8f: 89 11 mov %edx,(%ecx)
10bf91: 8b 50 08 mov 0x8(%eax),%edx
10bf94: 89 48 08 mov %ecx,0x8(%eax)
10bf97: 89 0a mov %ecx,(%edx)
10bf99: 89 51 04 mov %edx,0x4(%ecx)
_ISR_Flash( level );
10bf9c: 53 push %ebx
10bf9d: 9d popf
10bf9e: fa cli
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10bf9f: 8b 51 14 mov 0x14(%ecx),%edx
10bfa2: a1 e8 e6 11 00 mov 0x11e6e8,%eax
10bfa7: 3b 50 14 cmp 0x14(%eax),%edx
10bfaa: 73 1c jae 10bfc8 <_Thread_Clear_state+0x84>
_Thread_Heir = the_thread;
10bfac: 89 0d e8 e6 11 00 mov %ecx,0x11e6e8
if ( _Thread_Executing->is_preemptible ||
10bfb2: a1 1c e7 11 00 mov 0x11e71c,%eax
10bfb7: 80 78 76 00 cmpb $0x0,0x76(%eax)
10bfbb: 75 04 jne 10bfc1 <_Thread_Clear_state+0x7d>
10bfbd: 85 d2 test %edx,%edx
10bfbf: 75 07 jne 10bfc8 <_Thread_Clear_state+0x84><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
10bfc1: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
}
}
}
_ISR_Enable( level );
10bfc8: 53 push %ebx
10bfc9: 9d popf
}
10bfca: 5b pop %ebx
10bfcb: c9 leave
10bfcc: c3 ret
0010bfd0 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
10bfd0: 55 push %ebp
10bfd1: 89 e5 mov %esp,%ebp
10bfd3: 56 push %esi
10bfd4: 53 push %ebx
10bfd5: 8b 5d 08 mov 0x8(%ebp),%ebx
10bfd8: 8b 75 0c mov 0xc(%ebp),%esi
10bfdb: 0f b7 56 08 movzwl 0x8(%esi),%edx
10bfdf: 8b 43 1c mov 0x1c(%ebx),%eax
10bfe2: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
10bfe9: a1 58 e6 11 00 mov 0x11e658,%eax
10bfee: 48 dec %eax
10bfef: a3 58 e6 11 00 mov %eax,0x11e658
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
10bff4: 83 ec 0c sub $0xc,%esp
10bff7: 56 push %esi
10bff8: e8 3f 11 00 00 call 10d13c <_User_extensions_Thread_delete>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bffd: a1 58 e6 11 00 mov 0x11e658,%eax
10c002: 40 inc %eax
10c003: a3 58 e6 11 00 mov %eax,0x11e658
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
10c008: 59 pop %ecx
10c009: 58 pop %eax
10c00a: 56 push %esi
10c00b: 53 push %ebx
10c00c: e8 23 f6 ff ff call 10b634 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
10c011: 58 pop %eax
10c012: 5a pop %edx
10c013: 6a 01 push $0x1
10c015: 56 push %esi
10c016: e8 85 0b 00 00 call 10cba0 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
10c01b: 89 34 24 mov %esi,(%esp)
10c01e: e8 a5 09 00 00 call 10c9c8 <_Thread_queue_Extract_with_proxy>
10c023: 83 c4 10 add $0x10,%esp
10c026: 84 c0 test %al,%al
10c028: 75 06 jne 10c030 <_Thread_Close+0x60>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
10c02a: 83 7e 50 02 cmpl $0x2,0x50(%esi)
10c02e: 74 68 je 10c098 <_Thread_Close+0xc8>
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
10c030: 3b 35 e0 e6 11 00 cmp 0x11e6e0,%esi
10c036: 74 74 je 10c0ac <_Thread_Close+0xdc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
10c038: c7 86 ec 00 00 00 00 movl $0x0,0xec(%esi)
10c03f: 00 00 00
if ( the_thread->Start.fp_context )
10c042: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10c048: 85 c0 test %eax,%eax
10c04a: 74 0c je 10c058 <_Thread_Close+0x88>
(void) _Workspace_Free( the_thread->Start.fp_context );
10c04c: 83 ec 0c sub $0xc,%esp
10c04f: 50 push %eax
10c050: e8 b3 13 00 00 call 10d408 <_Workspace_Free>
10c055: 83 c4 10 add $0x10,%esp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
10c058: 83 ec 0c sub $0xc,%esp
10c05b: 56 push %esi
10c05c: e8 ef 0c 00 00 call 10cd50 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
10c061: c7 86 d0 00 00 00 00 movl $0x0,0xd0(%esi)
10c068: 00 00 00
if ( the_thread->extensions )
10c06b: 8b 86 00 01 00 00 mov 0x100(%esi),%eax
10c071: 83 c4 10 add $0x10,%esp
10c074: 85 c0 test %eax,%eax
10c076: 74 0c je 10c084 <_Thread_Close+0xb4>
(void) _Workspace_Free( the_thread->extensions );
10c078: 83 ec 0c sub $0xc,%esp
10c07b: 50 push %eax
10c07c: e8 87 13 00 00 call 10d408 <_Workspace_Free>
10c081: 83 c4 10 add $0x10,%esp
the_thread->extensions = NULL;
10c084: c7 86 00 01 00 00 00 movl $0x0,0x100(%esi)
10c08b: 00 00 00
}
10c08e: 8d 65 f8 lea -0x8(%ebp),%esp
10c091: 5b pop %ebx
10c092: 5e pop %esi
10c093: c9 leave
10c094: c3 ret
10c095: 8d 76 00 lea 0x0(%esi),%esi
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
10c098: 83 ec 0c sub $0xc,%esp
10c09b: 8d 46 48 lea 0x48(%esi),%eax
10c09e: 50 push %eax
10c09f: e8 88 12 00 00 call 10d32c <_Watchdog_Remove>
10c0a4: 83 c4 10 add $0x10,%esp
10c0a7: eb 87 jmp 10c030 <_Thread_Close+0x60>
10c0a9: 8d 76 00 lea 0x0(%esi),%esi
* @param[in] size is the new size
*
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
10c0ac: c7 05 e0 e6 11 00 00 movl $0x0,0x11e6e0
10c0b3: 00 00 00
10c0b6: eb 80 jmp 10c038 <_Thread_Close+0x68>
0010c0b8 <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
10c0b8: 55 push %ebp
10c0b9: 89 e5 mov %esp,%ebp
10c0bb: 83 ec 14 sub $0x14,%esp
10c0be: 68 e0 e7 11 00 push $0x11e7e0
10c0c3: e8 ec f4 ff ff call 10b5b4 <_Objects_Allocate>
/*
* The entire workspace is zeroed during its initialization. Thus, all
* fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization.
*/
_Thread_Idle = _Thread_Internal_allocate();
10c0c8: a3 2c e8 11 00 mov %eax,0x11e82c
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c0cd: a1 58 e6 11 00 mov 0x11e658,%eax
10c0d2: 40 inc %eax
10c0d3: a3 58 e6 11 00 mov %eax,0x11e658
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
10c0d8: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10c0dd: 8b 50 18 mov 0x18(%eax),%edx
10c0e0: 83 c4 0c add $0xc,%esp
10c0e3: 68 90 86 11 00 push $0x118690
10c0e8: 6a 00 push $0x0
10c0ea: 6a 00 push $0x0
10c0ec: 6a 00 push $0x0
10c0ee: 6a 01 push $0x1
10c0f0: 0f b6 05 14 a1 11 00 movzbl 0x11a114,%eax
10c0f7: 50 push %eax
10c0f8: 6a 00 push $0x0
10c0fa: a1 10 a1 11 00 mov 0x11a110,%eax
10c0ff: 39 d0 cmp %edx,%eax
10c101: 73 02 jae 10c105 <_Thread_Create_idle+0x4d><== ALWAYS TAKEN
10c103: 89 d0 mov %edx,%eax <== NOT EXECUTED
10c105: 50 push %eax
10c106: 6a 00 push $0x0
10c108: ff 35 2c e8 11 00 pushl 0x11e82c
10c10e: 68 e0 e7 11 00 push $0x11e7e0
10c113: e8 78 02 00 00 call 10c390 <_Thread_Initialize>
10c118: a1 58 e6 11 00 mov 0x11e658,%eax
10c11d: 48 dec %eax
10c11e: a3 58 e6 11 00 mov %eax,0x11e658
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
10c123: 8b 15 2c e8 11 00 mov 0x11e82c,%edx
10c129: 89 15 1c e7 11 00 mov %edx,0x11e71c
10c12f: 89 15 e8 e6 11 00 mov %edx,0x11e6e8
_Thread_Executing = _Thread_Idle;
_Thread_Start(
10c135: 83 c4 24 add $0x24,%esp
10c138: 6a 00 push $0x0
10c13a: 6a 00 push $0x0
10c13c: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10c141: ff 70 14 pushl 0x14(%eax)
10c144: 6a 00 push $0x0
10c146: 52 push %edx
10c147: e8 9c 0c 00 00 call 10cde8 <_Thread_Start>
10c14c: 83 c4 20 add $0x20,%esp
_Configuration_Table->idle_task,
NULL,
0
);
}
10c14f: c9 leave
10c150: c3 ret
0010c154 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
10c154: 55 push %ebp
10c155: 89 e5 mov %esp,%ebp
10c157: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c15a: 8d 45 fc lea -0x4(%ebp),%eax
10c15d: 50 push %eax
10c15e: ff 75 08 pushl 0x8(%ebp)
10c161: e8 aa 01 00 00 call 10c310 <_Thread_Get>
switch ( location ) {
10c166: 83 c4 10 add $0x10,%esp
10c169: 8b 55 fc mov -0x4(%ebp),%edx
10c16c: 85 d2 test %edx,%edx
10c16e: 75 1c jne 10c18c <_Thread_Delay_ended+0x38><== NEVER TAKEN
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c170: 83 ec 08 sub $0x8,%esp
10c173: 68 f8 ff 03 10 push $0x1003fff8
10c178: 50 push %eax
10c179: e8 c6 fd ff ff call 10bf44 <_Thread_Clear_state>
10c17e: a1 58 e6 11 00 mov 0x11e658,%eax
10c183: 48 dec %eax
10c184: a3 58 e6 11 00 mov %eax,0x11e658
10c189: 83 c4 10 add $0x10,%esp
case OBJECTS_LOCAL:
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
}
}
10c18c: c9 leave
10c18d: c3 ret
0010c190 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10c190: 55 push %ebp
10c191: 89 e5 mov %esp,%ebp
10c193: 57 push %edi
10c194: 56 push %esi
10c195: 53 push %ebx
10c196: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10c199: 8b 35 1c e7 11 00 mov 0x11e71c,%esi
_ISR_Disable( level );
10c19f: 9c pushf
10c1a0: fa cli
10c1a1: 5a pop %edx
while ( _Context_Switch_necessary == TRUE ) {
10c1a2: a0 2c e7 11 00 mov 0x11e72c,%al
10c1a7: 84 c0 test %al,%al
10c1a9: 0f 84 11 01 00 00 je 10c2c0 <_Thread_Dispatch+0x130>
10c1af: 8d 7d e4 lea -0x1c(%ebp),%edi
10c1b2: e9 d2 00 00 00 jmp 10c289 <_Thread_Dispatch+0xf9>
10c1b7: 90 nop
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 )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10c1b8: 52 push %edx
10c1b9: 9d popf
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
10c1ba: 83 ec 0c sub $0xc,%esp
10c1bd: 8d 45 ec lea -0x14(%ebp),%eax
10c1c0: 50 push %eax
10c1c1: e8 ae 30 00 00 call 10f274 <_TOD_Get_uptime>
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
10c1c6: 83 c4 0c add $0xc,%esp
10c1c9: 57 push %edi
10c1ca: 8d 45 ec lea -0x14(%ebp),%eax
10c1cd: 50 push %eax
10c1ce: 68 24 e7 11 00 push $0x11e724
10c1d3: e8 7c 0d 00 00 call 10cf54 <_Timespec_Subtract>
_Timespec_Add_to( &executing->cpu_time_used, &ran );
10c1d8: 58 pop %eax
10c1d9: 5a pop %edx
10c1da: 57 push %edi
10c1db: 8d 86 84 00 00 00 lea 0x84(%esi),%eax
10c1e1: 50 push %eax
10c1e2: e8 35 0d 00 00 call 10cf1c <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10c1e7: 8b 45 ec mov -0x14(%ebp),%eax
10c1ea: 8b 55 f0 mov -0x10(%ebp),%edx
10c1ed: a3 24 e7 11 00 mov %eax,0x11e724
10c1f2: 89 15 28 e7 11 00 mov %edx,0x11e728
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10c1f8: 8b 15 e4 e6 11 00 mov 0x11e6e4,%edx
10c1fe: 83 c4 10 add $0x10,%esp
10c201: 85 d2 test %edx,%edx
10c203: 74 10 je 10c215 <_Thread_Dispatch+0x85> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10c205: 8b 02 mov (%edx),%eax
10c207: 89 86 f0 00 00 00 mov %eax,0xf0(%esi)
*_Thread_libc_reent = heir->libc_reent;
10c20d: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10c213: 89 02 mov %eax,(%edx)
}
_User_extensions_Thread_switch( executing, heir );
10c215: 83 ec 08 sub $0x8,%esp
10c218: 53 push %ebx
10c219: 56 push %esi
10c21a: e8 9d 0f 00 00 call 10d1bc <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10c21f: 59 pop %ecx
10c220: 58 pop %eax
10c221: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10c227: 50 push %eax
10c228: 8d 86 d4 00 00 00 lea 0xd4(%esi),%eax
10c22e: 50 push %eax
10c22f: e8 8c 12 00 00 call 10d4c0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10c234: 83 c4 10 add $0x10,%esp
10c237: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx
10c23d: 85 d2 test %edx,%edx
10c23f: 74 36 je 10c277 <_Thread_Dispatch+0xe7>
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
10c241: a1 e0 e6 11 00 mov 0x11e6e0,%eax
10c246: 39 c6 cmp %eax,%esi
10c248: 74 2d je 10c277 <_Thread_Dispatch+0xe7>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10c24a: 85 c0 test %eax,%eax
10c24c: 74 11 je 10c25f <_Thread_Dispatch+0xcf>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10c24e: 83 ec 0c sub $0xc,%esp
10c251: 05 ec 00 00 00 add $0xec,%eax
10c256: 50 push %eax
10c257: e8 98 12 00 00 call 10d4f4 <_CPU_Context_save_fp>
10c25c: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10c25f: 83 ec 0c sub $0xc,%esp
10c262: 8d 86 ec 00 00 00 lea 0xec(%esi),%eax
10c268: 50 push %eax
10c269: e8 90 12 00 00 call 10d4fe <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10c26e: 89 35 e0 e6 11 00 mov %esi,0x11e6e0
10c274: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10c277: 8b 35 1c e7 11 00 mov 0x11e71c,%esi
_ISR_Disable( level );
10c27d: 9c pushf
10c27e: fa cli
10c27f: 5a pop %edx
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
10c280: a0 2c e7 11 00 mov 0x11e72c,%al
10c285: 84 c0 test %al,%al
10c287: 74 37 je 10c2c0 <_Thread_Dispatch+0x130>
heir = _Thread_Heir;
10c289: 8b 1d e8 e6 11 00 mov 0x11e6e8,%ebx
_Thread_Dispatch_disable_level = 1;
10c28f: c7 05 58 e6 11 00 01 movl $0x1,0x11e658
10c296: 00 00 00
_Context_Switch_necessary = FALSE;
10c299: c6 05 2c e7 11 00 00 movb $0x0,0x11e72c
_Thread_Executing = heir;
10c2a0: 89 1d 1c e7 11 00 mov %ebx,0x11e71c
#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 )
10c2a6: 83 7b 7c 01 cmpl $0x1,0x7c(%ebx)
10c2aa: 0f 85 08 ff ff ff jne 10c1b8 <_Thread_Dispatch+0x28>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c2b0: a1 24 e6 11 00 mov 0x11e624,%eax
10c2b5: 89 43 78 mov %eax,0x78(%ebx)
10c2b8: e9 fb fe ff ff jmp 10c1b8 <_Thread_Dispatch+0x28>
10c2bd: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10c2c0: c7 05 58 e6 11 00 00 movl $0x0,0x11e658
10c2c7: 00 00 00
_ISR_Enable( level );
10c2ca: 52 push %edx
10c2cb: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10c2cc: a1 00 e7 11 00 mov 0x11e700,%eax
10c2d1: 85 c0 test %eax,%eax
10c2d3: 75 06 jne 10c2db <_Thread_Dispatch+0x14b><== NEVER TAKEN
10c2d5: 80 7e 75 00 cmpb $0x0,0x75(%esi)
10c2d9: 74 09 je 10c2e4 <_Thread_Dispatch+0x154>
executing->do_post_task_switch_extension ) {
executing->do_post_task_switch_extension = false;
10c2db: c6 46 75 00 movb $0x0,0x75(%esi)
_API_extensions_Run_postswitch();
10c2df: e8 74 e9 ff ff call 10ac58 <_API_extensions_Run_postswitch>
}
}
10c2e4: 8d 65 f4 lea -0xc(%ebp),%esp
10c2e7: 5b pop %ebx
10c2e8: 5e pop %esi
10c2e9: 5f pop %edi
10c2ea: c9 leave
10c2eb: c3 ret
0010c2ec <_Thread_Enable_dispatch>:
*/
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
10c2ec: 55 push %ebp
10c2ed: 89 e5 mov %esp,%ebp
if ( --_Thread_Dispatch_disable_level )
10c2ef: a1 58 e6 11 00 mov 0x11e658,%eax
10c2f4: 48 dec %eax
10c2f5: a3 58 e6 11 00 mov %eax,0x11e658
10c2fa: a1 58 e6 11 00 mov 0x11e658,%eax
10c2ff: 85 c0 test %eax,%eax
10c301: 74 05 je 10c308 <_Thread_Enable_dispatch+0x1c>
return;
_Thread_Dispatch();
}
10c303: c9 leave
10c304: c3 ret
10c305: 8d 76 00 lea 0x0(%esi),%esi
10c308: c9 leave
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
10c309: e9 82 fe ff ff jmp 10c190 <_Thread_Dispatch>
0010ffe8 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
10ffe8: 55 push %ebp
10ffe9: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
10ffeb: a1 1c e7 11 00 mov 0x11e71c,%eax
if ( !_States_Is_ready( executing->current_state ) ||
10fff0: 8b 50 10 mov 0x10(%eax),%edx
10fff3: 85 d2 test %edx,%edx
10fff5: 75 0e jne 110005 <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN
10fff7: 3b 05 e8 e6 11 00 cmp 0x11e6e8,%eax
10fffd: 74 11 je 110010 <_Thread_Evaluate_mode+0x28>
10ffff: 80 78 76 00 cmpb $0x0,0x76(%eax)
110003: 74 0b je 110010 <_Thread_Evaluate_mode+0x28><== NEVER TAKEN
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
110005: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
11000c: b0 01 mov $0x1,%al
return TRUE;
}
return FALSE;
}
11000e: c9 leave
11000f: c3 ret
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
return TRUE;
110010: 31 c0 xor %eax,%eax
}
return FALSE;
}
110012: c9 leave
110013: c3 ret
0010c310 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10c310: 55 push %ebp
10c311: 89 e5 mov %esp,%ebp
10c313: 53 push %ebx
10c314: 83 ec 04 sub $0x4,%esp
10c317: 8b 4d 08 mov 0x8(%ebp),%ecx
10c31a: 8b 5d 0c mov 0xc(%ebp),%ebx
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10c31d: 85 c9 test %ecx,%ecx
10c31f: 74 4b je 10c36c <_Thread_Get+0x5c>
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10c321: 89 ca mov %ecx,%edx
10c323: c1 ea 18 shr $0x18,%edx
10c326: 83 e2 07 and $0x7,%edx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10c329: 8d 42 ff lea -0x1(%edx),%eax
10c32c: 83 f8 03 cmp $0x3,%eax
10c32f: 77 2b ja 10c35c <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10c331: 89 c8 mov %ecx,%eax
10c333: c1 e8 1b shr $0x1b,%eax
10c336: 48 dec %eax
10c337: 75 23 jne 10c35c <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10c339: 8b 04 95 2c e6 11 00 mov 0x11e62c(,%edx,4),%eax
if ( !api_information ) {
10c340: 85 c0 test %eax,%eax
10c342: 74 44 je 10c388 <_Thread_Get+0x78>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10c344: 8b 40 04 mov 0x4(%eax),%eax
if ( !information ) {
10c347: 85 c0 test %eax,%eax
10c349: 74 3d je 10c388 <_Thread_Get+0x78> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10c34b: 52 push %edx
10c34c: 53 push %ebx
10c34d: 51 push %ecx
10c34e: 50 push %eax
10c34f: e8 54 f7 ff ff call 10baa8 <_Objects_Get>
10c354: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10c357: 8b 5d fc mov -0x4(%ebp),%ebx
10c35a: c9 leave
10c35b: c3 ret
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
10c35c: c7 03 01 00 00 00 movl $0x1,(%ebx)
10c362: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10c364: 8b 5d fc mov -0x4(%ebp),%ebx
10c367: c9 leave
10c368: c3 ret
10c369: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10c36c: a1 58 e6 11 00 mov 0x11e658,%eax
10c371: 40 inc %eax
10c372: a3 58 e6 11 00 mov %eax,0x11e658
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10c377: c7 03 00 00 00 00 movl $0x0,(%ebx)
tp = _Thread_Executing;
10c37d: a1 1c e7 11 00 mov 0x11e71c,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10c382: 8b 5d fc mov -0x4(%ebp),%ebx
10c385: c9 leave
10c386: c3 ret
10c387: 90 nop
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10c388: c7 03 01 00 00 00 movl $0x1,(%ebx)
10c38e: eb d4 jmp 10c364 <_Thread_Get+0x54>
00110014 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110014: 55 push %ebp
110015: 89 e5 mov %esp,%ebp
110017: 53 push %ebx
110018: 83 ec 04 sub $0x4,%esp
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
11001b: 8b 1d 1c e7 11 00 mov 0x11e71c,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110021: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
110027: 85 c0 test %eax,%eax
110029: 0f 84 91 00 00 00 je 1100c0 <_Thread_Handler+0xac>
11002f: fa cli
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
110030: a0 18 e4 11 00 mov 0x11e418,%al
110035: 88 45 fb mov %al,-0x5(%ebp)
doneConstructors = 1;
110038: c6 05 18 e4 11 00 01 movb $0x1,0x11e418
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
11003f: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
110045: 85 c0 test %eax,%eax
110047: 74 24 je 11006d <_Thread_Handler+0x59>
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
110049: a1 e0 e6 11 00 mov 0x11e6e0,%eax
11004e: 39 c3 cmp %eax,%ebx
110050: 74 1b je 11006d <_Thread_Handler+0x59>
if ( _Thread_Allocated_fp != NULL )
110052: 85 c0 test %eax,%eax
110054: 74 11 je 110067 <_Thread_Handler+0x53>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110056: 83 ec 0c sub $0xc,%esp
110059: 05 ec 00 00 00 add $0xec,%eax
11005e: 50 push %eax
11005f: e8 90 d4 ff ff call 10d4f4 <_CPU_Context_save_fp>
110064: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110067: 89 1d e0 e6 11 00 mov %ebx,0x11e6e0
* 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 );
11006d: 83 ec 0c sub $0xc,%esp
110070: 53 push %ebx
110071: e8 be cf ff ff call 10d034 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110076: e8 71 c2 ff ff call 10c2ec <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
11007b: 83 c4 10 add $0x10,%esp
11007e: 80 7d fb 00 cmpb $0x0,-0x5(%ebp)
110082: 74 6c je 1100f0 <_Thread_Handler+0xdc>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
110084: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
11008a: 83 f8 01 cmp $0x1,%eax
11008d: 74 71 je 110100 <_Thread_Handler+0xec> <== NEVER TAKEN
11008f: 73 37 jae 1100c8 <_Thread_Handler+0xb4> <== NEVER TAKEN
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
110091: 83 ec 0c sub $0xc,%esp
110094: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
11009a: ff 93 9c 00 00 00 call *0x9c(%ebx)
1100a0: 89 43 28 mov %eax,0x28(%ebx)
1100a3: 83 c4 10 add $0x10,%esp
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
1100a6: 83 ec 0c sub $0xc,%esp
1100a9: 53 push %ebx
1100aa: e8 c1 cf ff ff call 10d070 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
1100af: 83 c4 0c add $0xc,%esp
1100b2: 6a 06 push $0x6
1100b4: 6a 01 push $0x1
1100b6: 6a 00 push $0x0
1100b8: e8 63 b4 ff ff call 10b520 <_Internal_error_Occurred>
1100bd: 8d 76 00 lea 0x0(%esi),%esi
* 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);
1100c0: fb sti
1100c1: e9 6a ff ff ff jmp 110030 <_Thread_Handler+0x1c>
1100c6: 66 90 xchg %ax,%ax
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
1100c8: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED
1100cb: 74 4b je 110118 <_Thread_Handler+0x104> <== NOT EXECUTED
1100cd: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
1100d0: 75 d4 jne 1100a6 <_Thread_Handler+0x92> <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
1100d2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1100d5: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED
1100db: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED
1100e1: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED
1100e7: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
1100ea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1100ed: eb b7 jmp 1100a6 <_Thread_Handler+0x92> <== NOT EXECUTED
1100ef: 90 nop <== NOT EXECUTED
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
{
_init ();
1100f0: e8 db 6d 00 00 call 116ed0 <__start_set_sysctl_set>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
1100f5: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
1100fb: 83 f8 01 cmp $0x1,%eax
1100fe: 75 8f jne 11008f <_Thread_Handler+0x7b> <== ALWAYS TAKEN
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
110100: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
110103: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED
110109: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED
11010f: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
110112: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110115: eb 8f jmp 1100a6 <_Thread_Handler+0x92> <== NOT EXECUTED
110117: 90 nop <== NOT EXECUTED
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
110118: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
11011b: ff b3 a8 00 00 00 pushl 0xa8(%ebx) <== NOT EXECUTED
110121: ff b3 a4 00 00 00 pushl 0xa4(%ebx) <== NOT EXECUTED
110127: ff 93 9c 00 00 00 call *0x9c(%ebx) <== NOT EXECUTED
11012d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
110130: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
110133: e9 6e ff ff ff jmp 1100a6 <_Thread_Handler+0x92> <== NOT EXECUTED
0010c390 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10c390: 55 push %ebp
10c391: 89 e5 mov %esp,%ebp
10c393: 57 push %edi
10c394: 56 push %esi
10c395: 53 push %ebx
10c396: 83 ec 0c sub $0xc,%esp
10c399: 8b 5d 0c mov 0xc(%ebp),%ebx
10c39c: 8b 55 10 mov 0x10(%ebp),%edx
10c39f: 8a 45 18 mov 0x18(%ebp),%al
10c3a2: 88 45 f3 mov %al,-0xd(%ebp)
10c3a5: 8a 4d 20 mov 0x20(%ebp),%cl
10c3a8: 88 4d f2 mov %cl,-0xe(%ebp)
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
10c3ab: 85 d2 test %edx,%edx
10c3ad: 0f 84 b2 01 00 00 je 10c565 <_Thread_Initialize+0x1d5><== ALWAYS TAKEN
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
10c3b3: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) <== NOT EXECUTED
10c3ba: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10c3bd: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx)
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10c3c3: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10c3c9: 80 7d f3 00 cmpb $0x0,-0xd(%ebp)
10c3cd: 0f 85 2d 01 00 00 jne 10c500 <_Thread_Initialize+0x170>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area ) {
_Thread_Stack_Free( the_thread );
return FALSE;
10c3d3: 31 ff xor %edi,%edi
10c3d5: 31 c0 xor %eax,%eax
fp_area = _Context_Fp_start( fp_area, 0 );
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
10c3d7: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10c3dd: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
*
10c3e3: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
* @param[in] the_heap is the heap to operate upon
10c3ea: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
* @param[in] starting_address is the starting address of the memory for
10c3f1: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
* the heap
10c3f8: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
10c3ff: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10c406: 00 00 00
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10c409: a1 fc e6 11 00 mov 0x11e6fc,%eax
10c40e: 85 c0 test %eax,%eax
10c410: 0f 85 06 01 00 00 jne 10c51c <_Thread_Initialize+0x18c>
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
10c416: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10c41d: 00 00 00
10c420: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10c422: 8a 45 f2 mov -0xe(%ebp),%al
10c425: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10c42b: 8b 4d 24 mov 0x24(%ebp),%ecx
10c42e: 89 8b b0 00 00 00 mov %ecx,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10c434: 8b 45 28 mov 0x28(%ebp),%eax
10c437: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10c43d: 83 f9 02 cmp $0x2,%ecx
10c440: 75 08 jne 10c44a <_Thread_Initialize+0xba><== ALWAYS TAKEN
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10c442: a1 24 e6 11 00 mov 0x11e624,%eax <== NOT EXECUTED
10c447: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
10c44a: 8b 4d 2c mov 0x2c(%ebp),%ecx
10c44d: 89 8b b8 00 00 00 mov %ecx,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10c453: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10c45a: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10c461: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->suspend_count = 0;
10c468: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
the_thread->real_priority = priority;
10c46f: 8b 45 1c mov 0x1c(%ebp),%eax
10c472: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10c475: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10c47b: 83 ec 08 sub $0x8,%esp
10c47e: 50 push %eax
10c47f: 53 push %ebx
10c480: e8 af 06 00 00 call 10cb34 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
10c485: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10c48c: 00 00 00
the_thread->cpu_time_used.tv_nsec = 0;
10c48f: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10c496: 00 00 00
10c499: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10c49d: 8b 4d 08 mov 0x8(%ebp),%ecx
10c4a0: 8b 41 1c mov 0x1c(%ecx),%eax
10c4a3: 89 1c 90 mov %ebx,(%eax,%edx,4)
10c4a6: 8b 45 30 mov 0x30(%ebp),%eax
10c4a9: 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 );
10c4ac: 89 1c 24 mov %ebx,(%esp)
10c4af: e8 40 0c 00 00 call 10d0f4 <_User_extensions_Thread_create>
if ( !extension_status ) {
10c4b4: 83 c4 10 add $0x10,%esp
10c4b7: 84 c0 test %al,%al
10c4b9: 75 39 jne 10c4f4 <_Thread_Initialize+0x164><== ALWAYS TAKEN
if ( extensions_area )
10c4bb: 85 f6 test %esi,%esi <== NOT EXECUTED
10c4bd: 74 0c je 10c4cb <_Thread_Initialize+0x13b><== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
10c4bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c4c2: 56 push %esi <== NOT EXECUTED
10c4c3: e8 40 0f 00 00 call 10d408 <_Workspace_Free> <== NOT EXECUTED
10c4c8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10c4cb: 85 ff test %edi,%edi <== NOT EXECUTED
10c4cd: 74 0c je 10c4db <_Thread_Initialize+0x14b><== NOT EXECUTED
(void) _Workspace_Free( fp_area );
10c4cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c4d2: 57 push %edi <== NOT EXECUTED
10c4d3: e8 30 0f 00 00 call 10d408 <_Workspace_Free> <== NOT EXECUTED
10c4d8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
10c4db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c4de: 53 push %ebx <== NOT EXECUTED
10c4df: e8 6c 08 00 00 call 10cd50 <_Thread_Stack_Free> <== NOT EXECUTED
10c4e4: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c4e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
10c4e9: 8d 65 f4 lea -0xc(%ebp),%esp
10c4ec: 5b pop %ebx
10c4ed: 5e pop %esi
10c4ee: 5f pop %edi
10c4ef: c9 leave
10c4f0: c3 ret
10c4f1: 8d 76 00 lea 0x0(%esi),%esi
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( !extension_status ) {
10c4f4: b0 01 mov $0x1,%al
return FALSE;
}
return TRUE;
}
10c4f6: 8d 65 f4 lea -0xc(%ebp),%esp
10c4f9: 5b pop %ebx
10c4fa: 5e pop %esi
10c4fb: 5f pop %edi
10c4fc: c9 leave
10c4fd: c3 ret
10c4fe: 66 90 xchg %ax,%ax
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10c500: 83 ec 0c sub $0xc,%esp
10c503: 6a 6c push $0x6c
10c505: e8 16 0f 00 00 call 10d420 <_Workspace_Allocate>
10c50a: 89 c7 mov %eax,%edi
if ( !fp_area ) {
10c50c: 83 c4 10 add $0x10,%esp
10c50f: 85 c0 test %eax,%eax
10c511: 0f 85 c0 fe ff ff jne 10c3d7 <_Thread_Initialize+0x47><== ALWAYS TAKEN
10c517: eb c2 jmp 10c4db <_Thread_Initialize+0x14b><== NOT EXECUTED
10c519: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10c51c: 83 ec 0c sub $0xc,%esp
10c51f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10c526: 50 push %eax
10c527: e8 f4 0e 00 00 call 10d420 <_Workspace_Allocate>
10c52c: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
10c52e: 83 c4 10 add $0x10,%esp
10c531: 85 c0 test %eax,%eax
10c533: 74 96 je 10c4cb <_Thread_Initialize+0x13b><== NEVER TAKEN
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
10c535: 89 83 00 01 00 00 mov %eax,0x100(%ebx)
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
10c53b: 83 3d fc e6 11 00 ff cmpl $0xffffffff,0x11e6fc
10c542: 0f 84 da fe ff ff je 10c422 <_Thread_Initialize+0x92><== NEVER TAKEN
10c548: 31 d2 xor %edx,%edx
10c54a: 89 c1 mov %eax,%ecx
10c54c: a1 fc e6 11 00 mov 0x11e6fc,%eax
10c551: 40 inc %eax
10c552: 66 90 xchg %ax,%ax
the_thread->extensions[i] = NULL;
10c554: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4)
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
10c55b: 42 inc %edx
10c55c: 39 d0 cmp %edx,%eax
10c55e: 77 f4 ja 10c554 <_Thread_Initialize+0x1c4>
10c560: e9 bd fe ff ff jmp 10c422 <_Thread_Initialize+0x92>
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10c565: 83 ec 08 sub $0x8,%esp
10c568: ff 75 14 pushl 0x14(%ebp)
10c56b: 53 push %ebx
10c56c: e8 7b 07 00 00 call 10ccec <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10c571: 83 c4 10 add $0x10,%esp
10c574: 85 c0 test %eax,%eax
10c576: 74 17 je 10c58f <_Thread_Initialize+0x1ff>
10c578: 39 45 14 cmp %eax,0x14(%ebp)
10c57b: 77 12 ja 10c58f <_Thread_Initialize+0x1ff><== NEVER TAKEN
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
10c57d: 8b 93 d0 00 00 00 mov 0xd0(%ebx),%edx
the_thread->Start.core_allocated_stack = TRUE;
10c583: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10c58a: e9 2e fe ff ff jmp 10c3bd <_Thread_Initialize+0x2d>
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return FALSE;
10c58f: 31 c0 xor %eax,%eax
10c591: e9 53 ff ff ff jmp 10c4e9 <_Thread_Initialize+0x159>
001103d0 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
1103d0: 55 push %ebp
1103d1: 89 e5 mov %esp,%ebp
1103d3: 53 push %ebx
1103d4: 83 ec 10 sub $0x10,%esp
1103d7: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
1103da: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->suspend_count = 0;
1103e1: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
1103e8: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al
1103ee: 88 43 76 mov %al,0x76(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
1103f1: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
1103f7: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
1103fa: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
110400: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
110406: 8b 45 0c mov 0xc(%ebp),%eax
110409: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
11040f: 8b 45 10 mov 0x10(%ebp),%eax
110412: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
110418: 53 push %ebx
110419: e8 e2 cf ff ff call 10d400 <_Thread_queue_Extract_with_proxy>
11041e: 83 c4 10 add $0x10,%esp
110421: 84 c0 test %al,%al
110423: 75 06 jne 11042b <_Thread_Reset+0x5b> <== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
110425: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
110429: 74 25 je 110450 <_Thread_Reset+0x80>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
11042b: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
110431: 39 43 14 cmp %eax,0x14(%ebx)
110434: 74 12 je 110448 <_Thread_Reset+0x78>
the_thread->real_priority = the_thread->Start.initial_priority;
110436: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
110439: 89 45 0c mov %eax,0xc(%ebp)
11043c: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
11043f: 8b 5d fc mov -0x4(%ebp),%ebx
110442: c9 leave
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
110443: e9 b8 d1 ff ff jmp 10d600 <_Thread_Set_priority>
}
}
110448: 8b 5d fc mov -0x4(%ebp),%ebx
11044b: c9 leave
11044c: c3 ret
11044d: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
110450: 83 ec 0c sub $0xc,%esp
110453: 8d 43 48 lea 0x48(%ebx),%eax
110456: 50 push %eax
110457: e8 dc d9 ff ff call 10de38 <_Watchdog_Remove>
11045c: 83 c4 10 add $0x10,%esp
11045f: eb ca jmp 11042b <_Thread_Reset+0x5b>
0010f828 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
10f828: 55 push %ebp
10f829: 89 e5 mov %esp,%ebp
10f82b: 56 push %esi
10f82c: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10f82d: 8b 0d 1c e7 11 00 mov 0x11e71c,%ecx
ready = executing->ready;
10f833: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx
_ISR_Disable( level );
10f839: 9c pushf
10f83a: fa cli
10f83b: 5e pop %esi
if ( _Chain_Has_only_one_node( ready ) ) {
10f83c: 8b 03 mov (%ebx),%eax
10f83e: 3b 43 08 cmp 0x8(%ebx),%eax
10f841: 74 35 je 10f878 <_Thread_Reset_timeslice+0x50>
10f843: 8b 11 mov (%ecx),%edx
10f845: 8b 41 04 mov 0x4(%ecx),%eax
10f848: 89 42 04 mov %eax,0x4(%edx)
10f84b: 89 10 mov %edx,(%eax)
10f84d: 8d 43 04 lea 0x4(%ebx),%eax
10f850: 89 01 mov %eax,(%ecx)
10f852: 8b 43 08 mov 0x8(%ebx),%eax
10f855: 89 4b 08 mov %ecx,0x8(%ebx)
10f858: 89 08 mov %ecx,(%eax)
10f85a: 89 41 04 mov %eax,0x4(%ecx)
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10f85d: 56 push %esi
10f85e: 9d popf
10f85f: fa cli
if ( _Thread_Is_heir( executing ) )
10f860: 3b 0d e8 e6 11 00 cmp 0x11e6e8,%ecx
10f866: 74 18 je 10f880 <_Thread_Reset_timeslice+0x58><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
10f868: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
_ISR_Enable( level );
10f86f: 56 push %esi
10f870: 9d popf
}
10f871: 5b pop %ebx
10f872: 5e pop %esi
10f873: c9 leave
10f874: c3 ret
10f875: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
10f878: 56 push %esi
10f879: 9d popf
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10f87a: 5b pop %ebx
10f87b: 5e pop %esi
10f87c: c9 leave
10f87d: c3 ret
10f87e: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10f880: 8b 03 mov (%ebx),%eax
10f882: a3 e8 e6 11 00 mov %eax,0x11e6e8
10f887: eb df jmp 10f868 <_Thread_Reset_timeslice+0x40>
0010d56c <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
10d56c: 55 push %ebp
10d56d: 89 e5 mov %esp,%ebp
10d56f: 53 push %ebx
10d570: 83 ec 04 sub $0x4,%esp
10d573: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !_States_Is_dormant( the_thread->current_state ) ) {
10d576: f6 43 10 01 testb $0x1,0x10(%ebx)
10d57a: 74 08 je 10d584 <_Thread_Restart+0x18>
10d57c: 31 c0 xor %eax,%eax
return TRUE;
}
return FALSE;
}
10d57e: 8b 5d fc mov -0x4(%ebp),%ebx
10d581: c9 leave
10d582: c3 ret
10d583: 90 nop
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
10d584: 83 ec 0c sub $0xc,%esp
10d587: 53 push %ebx
10d588: e8 b7 01 00 00 call 10d744 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
10d58d: 83 c4 0c add $0xc,%esp
10d590: ff 75 10 pushl 0x10(%ebp)
10d593: ff 75 0c pushl 0xc(%ebp)
10d596: 53 push %ebx
10d597: e8 34 2e 00 00 call 1103d0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
10d59c: 89 1c 24 mov %ebx,(%esp)
10d59f: e8 08 2b 00 00 call 1100ac <_Thread_Load_environment>
_Thread_Ready( the_thread );
10d5a4: 89 1c 24 mov %ebx,(%esp)
10d5a7: e8 84 2d 00 00 call 110330 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
10d5ac: 89 1c 24 mov %ebx,(%esp)
10d5af: e8 94 06 00 00 call 10dc48 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
10d5b4: 83 c4 10 add $0x10,%esp
10d5b7: 3b 1d 7c 17 12 00 cmp 0x12177c,%ebx
10d5bd: 74 09 je 10d5c8 <_Thread_Restart+0x5c>
10d5bf: b0 01 mov $0x1,%al
return TRUE;
}
return FALSE;
}
10d5c1: 8b 5d fc mov -0x4(%ebp),%ebx
10d5c4: c9 leave
10d5c5: c3 ret
10d5c6: 66 90 xchg %ax,%ax
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10d5c8: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
10d5ce: 85 c0 test %eax,%eax
10d5d0: 74 12 je 10d5e4 <_Thread_Restart+0x78>
* @return NULL if unsuccessful and a pointer to the block if successful
10d5d2: 83 ec 0c sub $0xc,%esp
10d5d5: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10d5db: 50 push %eax
10d5dc: e8 2d 0a 00 00 call 10e00e <_CPU_Context_restore_fp>
10d5e1: 83 c4 10 add $0x10,%esp
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
10d5e4: 83 ec 0c sub $0xc,%esp
10d5e7: a1 7c 17 12 00 mov 0x12177c,%eax
10d5ec: 05 d4 00 00 00 add $0xd4,%eax
10d5f1: 50 push %eax
10d5f2: e8 06 0a 00 00 call 10dffd <_CPU_Context_restore>
10d5f7: b0 01 mov $0x1,%al <== NOT EXECUTED
10d5f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10d5fc: eb 80 jmp 10d57e <_Thread_Restart+0x12> <== NOT EXECUTED
0010e02c <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
10e02c: 55 push %ebp
10e02d: 89 e5 mov %esp,%ebp
10e02f: 53 push %ebx
10e030: 8b 4d 08 mov 0x8(%ebp),%ecx
10e033: 8a 45 0c mov 0xc(%ebp),%al
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10e036: 9c pushf
10e037: fa cli
10e038: 5b pop %ebx
if ( force == TRUE )
10e039: 84 c0 test %al,%al
10e03b: 74 13 je 10e050 <_Thread_Resume+0x24> <== NEVER TAKEN
the_thread->suspend_count = 0;
10e03d: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
if ( the_thread->suspend_count > 0 ) {
_ISR_Enable( level );
return;
}
current_state = the_thread->current_state;
10e044: 8b 41 10 mov 0x10(%ecx),%eax
if ( current_state & STATES_SUSPENDED ) {
10e047: a8 02 test $0x2,%al
10e049: 75 15 jne 10e060 <_Thread_Resume+0x34> <== ALWAYS TAKEN
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
10e04b: 53 push %ebx
10e04c: 9d popf
}
10e04d: 5b pop %ebx
10e04e: c9 leave
10e04f: c3 ret
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
10e050: 8b 41 70 mov 0x70(%ecx),%eax <== NOT EXECUTED
10e053: 48 dec %eax <== NOT EXECUTED
10e054: 89 41 70 mov %eax,0x70(%ecx) <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
10e057: 85 c0 test %eax,%eax <== NOT EXECUTED
10e059: 74 e9 je 10e044 <_Thread_Resume+0x18> <== NOT EXECUTED
_ISR_Enable( level );
10e05b: 53 push %ebx <== NOT EXECUTED
10e05c: 9d popf <== NOT EXECUTED
}
}
}
_ISR_Enable( level );
}
10e05d: 5b pop %ebx <== NOT EXECUTED
10e05e: c9 leave <== NOT EXECUTED
10e05f: c3 ret <== NOT EXECUTED
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
10e060: 83 e0 fd and $0xfffffffd,%eax
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
10e063: 89 41 10 mov %eax,0x10(%ecx)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
10e066: 85 c0 test %eax,%eax
10e068: 75 e1 jne 10e04b <_Thread_Resume+0x1f>
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
* @param[in] size points to a user area to return the size in
10e06a: 8b 91 90 00 00 00 mov 0x90(%ecx),%edx
10e070: 66 8b 81 96 00 00 00 mov 0x96(%ecx),%ax
10e077: 66 09 02 or %ax,(%edx)
* @return TRUE if successfully able to determine the size, FALSE otherwise
10e07a: 66 a1 30 a7 12 00 mov 0x12a730,%ax
10e080: 0b 81 94 00 00 00 or 0x94(%ecx),%eax
10e086: 66 a3 30 a7 12 00 mov %ax,0x12a730
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10e08c: 8b 81 8c 00 00 00 mov 0x8c(%ecx),%eax
10e092: 8d 50 04 lea 0x4(%eax),%edx
10e095: 89 11 mov %edx,(%ecx)
10e097: 8b 50 08 mov 0x8(%eax),%edx
10e09a: 89 48 08 mov %ecx,0x8(%eax)
10e09d: 89 0a mov %ecx,(%edx)
10e09f: 89 51 04 mov %edx,0x4(%ecx)
_ISR_Flash( level );
10e0a2: 53 push %ebx
10e0a3: 9d popf
10e0a4: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10e0a5: 8b 51 14 mov 0x14(%ecx),%edx
10e0a8: a1 08 a7 12 00 mov 0x12a708,%eax
10e0ad: 3b 50 14 cmp 0x14(%eax),%edx
10e0b0: 73 99 jae 10e04b <_Thread_Resume+0x1f>
_Thread_Heir = the_thread;
10e0b2: 89 0d 08 a7 12 00 mov %ecx,0x12a708
if ( _Thread_Executing->is_preemptible ||
10e0b8: a1 3c a7 12 00 mov 0x12a73c,%eax
10e0bd: 80 78 76 00 cmpb $0x0,0x76(%eax)
10e0c1: 74 0d je 10e0d0 <_Thread_Resume+0xa4>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
10e0c3: c6 05 4c a7 12 00 01 movb $0x1,0x12a74c
10e0ca: e9 7c ff ff ff jmp 10e04b <_Thread_Resume+0x1f>
10e0cf: 90 nop
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10e0d0: 85 d2 test %edx,%edx
10e0d2: 0f 85 73 ff ff ff jne 10e04b <_Thread_Resume+0x1f> <== ALWAYS TAKEN
10e0d8: eb e9 jmp 10e0c3 <_Thread_Resume+0x97> <== NOT EXECUTED
0010cba0 <_Thread_Set_state>:
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
)
{
10cba0: 55 push %ebp
10cba1: 89 e5 mov %esp,%ebp
10cba3: 56 push %esi
10cba4: 53 push %ebx
10cba5: 8b 5d 08 mov 0x8(%ebp),%ebx
10cba8: 8b 4d 0c mov 0xc(%ebp),%ecx
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10cbab: 8b 93 8c 00 00 00 mov 0x8c(%ebx),%edx
_ISR_Disable( level );
10cbb1: 9c pushf
10cbb2: fa cli
10cbb3: 5e pop %esi
if ( !_States_Is_ready( the_thread->current_state ) ) {
10cbb4: 8b 43 10 mov 0x10(%ebx),%eax
10cbb7: 85 c0 test %eax,%eax
10cbb9: 75 2d jne 10cbe8 <_Thread_Set_state+0x48>
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = state;
10cbbb: 89 4b 10 mov %ecx,0x10(%ebx)
if ( _Chain_Has_only_one_node( ready ) ) {
10cbbe: 8b 02 mov (%edx),%eax
10cbc0: 3b 42 08 cmp 0x8(%edx),%eax
10cbc3: 74 2f je 10cbf4 <_Thread_Set_state+0x54>
10cbc5: 8b 13 mov (%ebx),%edx
10cbc7: 8b 43 04 mov 0x4(%ebx),%eax
10cbca: 89 42 04 mov %eax,0x4(%edx)
10cbcd: 89 10 mov %edx,(%eax)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10cbcf: 56 push %esi
10cbd0: 9d popf
10cbd1: fa cli
if ( _Thread_Is_heir( the_thread ) )
10cbd2: 3b 1d e8 e6 11 00 cmp 0x11e6e8,%ebx
10cbd8: 74 62 je 10cc3c <_Thread_Set_state+0x9c>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10cbda: 3b 1d 1c e7 11 00 cmp 0x11e71c,%ebx
10cbe0: 74 4e je 10cc30 <_Thread_Set_state+0x90>
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
10cbe2: 56 push %esi
10cbe3: 9d popf
}
10cbe4: 5b pop %ebx
10cbe5: 5e pop %esi
10cbe6: c9 leave
10cbe7: c3 ret
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10cbe8: 09 c1 or %eax,%ecx
10cbea: 89 4b 10 mov %ecx,0x10(%ebx)
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
10cbed: 56 push %esi
10cbee: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10cbef: 5b pop %ebx
10cbf0: 5e pop %esi
10cbf1: c9 leave
10cbf2: c3 ret
10cbf3: 90 nop
10cbf4: 8d 42 04 lea 0x4(%edx),%eax
10cbf7: 89 02 mov %eax,(%edx)
10cbf9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
10cc00: 89 52 08 mov %edx,0x8(%edx)
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
* @param[in] the_heap is the heap to operate upon
10cc03: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10cc09: 66 8b 93 9a 00 00 00 mov 0x9a(%ebx),%dx
10cc10: 66 21 10 and %dx,(%eax)
* @param[in] starting_address is the starting address of the user block
10cc13: 66 83 38 00 cmpw $0x0,(%eax)
10cc17: 75 b6 jne 10cbcf <_Thread_Set_state+0x2f>
* to be resized
10cc19: 66 a1 10 e7 11 00 mov 0x11e710,%ax
10cc1f: 23 83 98 00 00 00 and 0x98(%ebx),%eax
10cc25: 66 a3 10 e7 11 00 mov %ax,0x11e710
10cc2b: eb a2 jmp 10cbcf <_Thread_Set_state+0x2f>
10cc2d: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
10cc30: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
10cc37: eb a9 jmp 10cbe2 <_Thread_Set_state+0x42>
10cc39: 8d 76 00 lea 0x0(%esi),%esi
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10cc3c: 66 8b 0d 10 e7 11 00 mov 0x11e710,%cx
10cc43: 31 d2 xor %edx,%edx
10cc45: 89 d0 mov %edx,%eax
10cc47: 66 0f bc c1 bsf %cx,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10cc4b: 0f b7 c0 movzwl %ax,%eax
10cc4e: 66 8b 8c 00 a0 e7 11 mov 0x11e7a0(%eax,%eax,1),%cx
10cc55: 00
10cc56: 66 0f bc d1 bsf %cx,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10cc5a: c1 e0 04 shl $0x4,%eax
10cc5d: 0f b7 d2 movzwl %dx,%edx
10cc60: 01 d0 add %edx,%eax
10cc62: 8d 04 40 lea (%eax,%eax,2),%eax
10cc65: 8b 15 20 e6 11 00 mov 0x11e620,%edx
10cc6b: 8b 04 82 mov (%edx,%eax,4),%eax
10cc6e: a3 e8 e6 11 00 mov %eax,0x11e6e8
10cc73: e9 62 ff ff ff jmp 10cbda <_Thread_Set_state+0x3a>
0010ccec <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10ccec: 55 push %ebp
10cced: 89 e5 mov %esp,%ebp
10ccef: 53 push %ebx
10ccf0: 83 ec 04 sub $0x4,%esp
10ccf3: a1 10 a1 11 00 mov 0x11a110,%eax
10ccf8: 8b 5d 0c mov 0xc(%ebp),%ebx
10ccfb: 39 c3 cmp %eax,%ebx
10ccfd: 73 02 jae 10cd01 <_Thread_Stack_Allocate+0x15>
10ccff: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
10cd01: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10cd06: 8b 40 20 mov 0x20(%eax),%eax
10cd09: 85 c0 test %eax,%eax
10cd0b: 74 33 je 10cd40 <_Thread_Stack_Allocate+0x54><== ALWAYS TAKEN
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
10cd0d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10cd10: 53 push %ebx <== NOT EXECUTED
10cd11: ff d0 call *%eax <== NOT EXECUTED
10cd13: 89 c2 mov %eax,%edx <== NOT EXECUTED
10cd15: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10cd18: 85 d2 test %edx,%edx
10cd1a: 74 10 je 10cd2c <_Thread_Stack_Allocate+0x40>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10cd1c: 8b 45 08 mov 0x8(%ebp),%eax
10cd1f: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return the_stack_size;
}
10cd25: 89 d8 mov %ebx,%eax
10cd27: 8b 5d fc mov -0x4(%ebp),%ebx
10cd2a: c9 leave
10cd2b: c3 ret
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10cd2c: 31 db xor %ebx,%ebx
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10cd2e: 8b 45 08 mov 0x8(%ebp),%eax
10cd31: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return the_stack_size;
}
10cd37: 89 d8 mov %ebx,%eax
10cd39: 8b 5d fc mov -0x4(%ebp),%ebx
10cd3c: c9 leave
10cd3d: c3 ret
10cd3e: 66 90 xchg %ax,%ax
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10cd40: 83 ec 0c sub $0xc,%esp
10cd43: 53 push %ebx
10cd44: e8 d7 06 00 00 call 10d420 <_Workspace_Allocate>
10cd49: 89 c2 mov %eax,%edx
10cd4b: 83 c4 10 add $0x10,%esp
10cd4e: eb c8 jmp 10cd18 <_Thread_Stack_Allocate+0x2c>
0010cd50 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10cd50: 55 push %ebp
10cd51: 89 e5 mov %esp,%ebp
10cd53: 8b 55 08 mov 0x8(%ebp),%edx
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10cd56: 80 ba c0 00 00 00 00 cmpb $0x0,0xc0(%edx)
10cd5d: 74 19 je 10cd78 <_Thread_Stack_Free+0x28><== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
10cd5f: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10cd64: 8b 48 24 mov 0x24(%eax),%ecx
10cd67: 85 c9 test %ecx,%ecx
10cd69: 74 11 je 10cd7c <_Thread_Stack_Free+0x2c><== ALWAYS TAKEN
(*_Configuration_Table->stack_free_hook)(
10cd6b: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax <== NOT EXECUTED
10cd71: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10cd74: c9 leave <== NOT EXECUTED
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
10cd75: ff e1 jmp *%ecx <== NOT EXECUTED
10cd77: 90 nop <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10cd78: c9 leave <== NOT EXECUTED
10cd79: c3 ret <== NOT EXECUTED
10cd7a: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10cd7c: 8b 82 c8 00 00 00 mov 0xc8(%edx),%eax
10cd82: 89 45 08 mov %eax,0x8(%ebp)
}
10cd85: c9 leave
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10cd86: e9 7d 06 00 00 jmp 10d408 <_Workspace_Free>
0010e3f0 <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
10e3f0: 55 push %ebp
10e3f1: 89 e5 mov %esp,%ebp
10e3f3: 56 push %esi
10e3f4: 53 push %ebx
10e3f5: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10e3f8: 8b 91 8c 00 00 00 mov 0x8c(%ecx),%edx
_ISR_Disable( level );
10e3fe: 9c pushf
10e3ff: fa cli
10e400: 5b pop %ebx
the_thread->suspend_count++;
10e401: ff 41 70 incl 0x70(%ecx)
if ( !_States_Is_ready( the_thread->current_state ) ) {
10e404: 8b 41 10 mov 0x10(%ecx),%eax
10e407: 85 c0 test %eax,%eax
10e409: 75 31 jne 10e43c <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
10e40b: c7 41 10 02 00 00 00 movl $0x2,0x10(%ecx)
if ( _Chain_Has_only_one_node( ready ) ) {
10e412: 8b 02 mov (%edx),%eax
10e414: 3b 42 08 cmp 0x8(%edx),%eax
10e417: 74 2f je 10e448 <_Thread_Suspend+0x58>
10e419: 8b 11 mov (%ecx),%edx
10e41b: 8b 41 04 mov 0x4(%ecx),%eax
10e41e: 89 42 04 mov %eax,0x4(%edx)
10e421: 89 10 mov %edx,(%eax)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10e423: 53 push %ebx
10e424: 9d popf
10e425: fa cli
if ( _Thread_Is_heir( the_thread ) )
10e426: 3b 0d 08 a7 12 00 cmp 0x12a708,%ecx
10e42c: 74 62 je 10e490 <_Thread_Suspend+0xa0>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10e42e: 3b 0d 3c a7 12 00 cmp 0x12a73c,%ecx
10e434: 74 4e je 10e484 <_Thread_Suspend+0x94>
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
10e436: 53 push %ebx
10e437: 9d popf
}
10e438: 5b pop %ebx
10e439: 5e pop %esi
10e43a: c9 leave
10e43b: c3 ret
ready = the_thread->ready;
_ISR_Disable( level );
the_thread->suspend_count++;
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10e43c: 83 c8 02 or $0x2,%eax
10e43f: 89 41 10 mov %eax,0x10(%ecx)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
10e442: 53 push %ebx
10e443: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
_ISR_Enable( level );
}
10e444: 5b pop %ebx
10e445: 5e pop %esi
10e446: c9 leave
10e447: c3 ret
10e448: 8d 42 04 lea 0x4(%edx),%eax
10e44b: 89 02 mov %eax,(%edx)
10e44d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
10e454: 89 52 08 mov %edx,0x8(%edx)
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
* @param[in] the_heap is the heap to operate upon
10e457: 8b 81 90 00 00 00 mov 0x90(%ecx),%eax
10e45d: 66 8b 91 9a 00 00 00 mov 0x9a(%ecx),%dx
10e464: 66 21 10 and %dx,(%eax)
* @param[in] starting_address is the starting address of the user block
10e467: 66 83 38 00 cmpw $0x0,(%eax)
10e46b: 75 b6 jne 10e423 <_Thread_Suspend+0x33>
* to be resized
10e46d: 66 a1 30 a7 12 00 mov 0x12a730,%ax
10e473: 23 81 98 00 00 00 and 0x98(%ecx),%eax
10e479: 66 a3 30 a7 12 00 mov %ax,0x12a730
10e47f: eb a2 jmp 10e423 <_Thread_Suspend+0x33>
10e481: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = TRUE;
10e484: c6 05 4c a7 12 00 01 movb $0x1,0x12a74c
10e48b: eb a9 jmp 10e436 <_Thread_Suspend+0x46>
10e48d: 8d 76 00 lea 0x0(%esi),%esi
void *starting_address,
size_t size
);
/**
* This routine returns the block of memory which begins
10e490: 66 8b 35 30 a7 12 00 mov 0x12a730,%si
10e497: 31 d2 xor %edx,%edx
10e499: 89 d0 mov %edx,%eax
10e49b: 66 0f bc c6 bsf %si,%ax
* at @a starting_address to @a the_heap. Any coalescing which is
10e49f: 0f b7 c0 movzwl %ax,%eax
10e4a2: 66 8b b4 00 c0 a7 12 mov 0x12a7c0(%eax,%eax,1),%si
10e4a9: 00
10e4aa: 66 0f bc d6 bsf %si,%dx
/**
* This function sets @a *size to the size of the block of user memory
* which begins at @a starting_address. The size returned in @a *size could
* be greater than the size requested for allocation.
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
10e4ae: c1 e0 04 shl $0x4,%eax
10e4b1: 0f b7 d2 movzwl %dx,%edx
10e4b4: 01 d0 add %edx,%eax
10e4b6: 8d 04 40 lea (%eax,%eax,2),%eax
10e4b9: 8b 15 40 a6 12 00 mov 0x12a640,%edx
10e4bf: 8b 04 82 mov (%edx,%eax,4),%eax
10e4c2: a3 08 a7 12 00 mov %eax,0x12a708
10e4c7: e9 62 ff ff ff jmp 10e42e <_Thread_Suspend+0x3e>
0010ce48 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10ce48: 55 push %ebp
10ce49: 89 e5 mov %esp,%ebp
10ce4b: 53 push %ebx
10ce4c: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10ce4f: 8b 1d 1c e7 11 00 mov 0x11e71c,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10ce55: 80 7b 76 00 cmpb $0x0,0x76(%ebx)
10ce59: 74 19 je 10ce74 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10ce5b: 8b 43 10 mov 0x10(%ebx),%eax
10ce5e: 85 c0 test %eax,%eax
10ce60: 75 12 jne 10ce74 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10ce62: 8b 43 7c mov 0x7c(%ebx),%eax
10ce65: 83 f8 01 cmp $0x1,%eax
10ce68: 72 0a jb 10ce74 <_Thread_Tickle_timeslice+0x2c>
10ce6a: 83 f8 02 cmp $0x2,%eax
10ce6d: 76 29 jbe 10ce98 <_Thread_Tickle_timeslice+0x50><== ALWAYS TAKEN
10ce6f: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED
10ce72: 74 08 je 10ce7c <_Thread_Tickle_timeslice+0x34><== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
}
}
10ce74: 8b 5d fc mov -0x4(%ebp),%ebx
10ce77: c9 leave
10ce78: c3 ret
10ce79: 8d 76 00 lea 0x0(%esi),%esi
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10ce7c: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
10ce7f: 48 dec %eax <== NOT EXECUTED
10ce80: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED
10ce83: 85 c0 test %eax,%eax <== NOT EXECUTED
10ce85: 75 ed jne 10ce74 <_Thread_Tickle_timeslice+0x2c><== NOT EXECUTED
(*executing->budget_callout)( executing );
10ce87: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ce8a: 53 push %ebx <== NOT EXECUTED
10ce8b: ff 93 80 00 00 00 call *0x80(%ebx) <== NOT EXECUTED
10ce91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ce94: eb de jmp 10ce74 <_Thread_Tickle_timeslice+0x2c><== NOT EXECUTED
10ce96: 66 90 xchg %ax,%ax <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10ce98: 8b 43 78 mov 0x78(%ebx),%eax
10ce9b: 48 dec %eax
10ce9c: 89 43 78 mov %eax,0x78(%ebx)
10ce9f: 85 c0 test %eax,%eax
10cea1: 7f d1 jg 10ce74 <_Thread_Tickle_timeslice+0x2c>
_Thread_Reset_timeslice();
10cea3: e8 80 29 00 00 call 10f828 <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10cea8: a1 24 e6 11 00 mov 0x11e624,%eax
10cead: 89 43 78 mov %eax,0x78(%ebx)
10ceb0: eb c2 jmp 10ce74 <_Thread_Tickle_timeslice+0x2c>
0010ceb4 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10ceb4: 55 push %ebp
10ceb5: 89 e5 mov %esp,%ebp
10ceb7: 56 push %esi
10ceb8: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10ceb9: 8b 0d 1c e7 11 00 mov 0x11e71c,%ecx
ready = executing->ready;
10cebf: 8b 99 8c 00 00 00 mov 0x8c(%ecx),%ebx
_ISR_Disable( level );
10cec5: 9c pushf
10cec6: fa cli
10cec7: 5e pop %esi
if ( !_Chain_Has_only_one_node( ready ) ) {
10cec8: 8b 03 mov (%ebx),%eax
10ceca: 3b 43 08 cmp 0x8(%ebx),%eax
10cecd: 74 35 je 10cf04 <_Thread_Yield_processor+0x50>
10cecf: 8b 11 mov (%ecx),%edx
10ced1: 8b 41 04 mov 0x4(%ecx),%eax
10ced4: 89 42 04 mov %eax,0x4(%edx)
10ced7: 89 10 mov %edx,(%eax)
10ced9: 8d 43 04 lea 0x4(%ebx),%eax
10cedc: 89 01 mov %eax,(%ecx)
10cede: 8b 43 08 mov 0x8(%ebx),%eax
10cee1: 89 4b 08 mov %ecx,0x8(%ebx)
10cee4: 89 08 mov %ecx,(%eax)
10cee6: 89 41 04 mov %eax,0x4(%ecx)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10cee9: 56 push %esi
10ceea: 9d popf
10ceeb: fa cli
if ( _Thread_Is_heir( executing ) )
10ceec: 3b 0d e8 e6 11 00 cmp 0x11e6e8,%ecx
10cef2: 74 1c je 10cf10 <_Thread_Yield_processor+0x5c><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
10cef4: c6 05 2c e7 11 00 01 movb $0x1,0x11e72c
_ISR_Enable( level );
10cefb: 56 push %esi
10cefc: 9d popf
}
10cefd: 5b pop %ebx
10cefe: 5e pop %esi
10ceff: c9 leave
10cf00: c3 ret
10cf01: 8d 76 00 lea 0x0(%esi),%esi
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
10cf04: 3b 0d e8 e6 11 00 cmp 0x11e6e8,%ecx
10cf0a: 75 e8 jne 10cef4 <_Thread_Yield_processor+0x40><== NEVER TAKEN
10cf0c: eb ed jmp 10cefb <_Thread_Yield_processor+0x47>
10cf0e: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10cf10: 8b 03 mov (%ebx),%eax
10cf12: a3 e8 e6 11 00 mov %eax,0x11e6e8
10cf17: eb db jmp 10cef4 <_Thread_Yield_processor+0x40>
0010f58c <_Thread_queue_Dequeue_fifo>:
*/
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
10f58c: 55 push %ebp
10f58d: 89 e5 mov %esp,%ebp
10f58f: 56 push %esi
10f590: 53 push %ebx
10f591: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
10f594: 9c pushf
10f595: fa cli
10f596: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10f597: 8b 11 mov (%ecx),%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
10f599: 8d 41 04 lea 0x4(%ecx),%eax
10f59c: 39 c2 cmp %eax,%edx
10f59e: 74 62 je 10f602 <_Thread_queue_Dequeue_fifo+0x76>
10f5a0: 8b 02 mov (%edx),%eax
10f5a2: 89 01 mov %eax,(%ecx)
10f5a4: 89 48 04 mov %ecx,0x4(%eax)
the_thread = (Thread_Control *)
10f5a7: 89 d3 mov %edx,%ebx
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
10f5a9: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10f5b0: 83 7a 50 02 cmpl $0x2,0x50(%edx)
10f5b4: 74 1e je 10f5d4 <_Thread_queue_Dequeue_fifo+0x48>
_ISR_Enable( level );
10f5b6: 56 push %esi
10f5b7: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10f5b8: 83 ec 08 sub $0x8,%esp
10f5bb: 68 f8 ff 03 10 push $0x1003fff8
10f5c0: 52 push %edx
10f5c1: e8 7e c9 ff ff call 10bf44 <_Thread_Clear_state>
10f5c6: 83 c4 10 add $0x10,%esp
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
10f5c9: 89 d8 mov %ebx,%eax
10f5cb: 8d 65 f8 lea -0x8(%ebp),%esp
10f5ce: 5b pop %ebx
10f5cf: 5e pop %esi
10f5d0: c9 leave
10f5d1: c3 ret
10f5d2: 66 90 xchg %ax,%ax
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10f5d4: c7 42 50 03 00 00 00 movl $0x3,0x50(%edx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10f5db: 56 push %esi
10f5dc: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10f5dd: 83 ec 0c sub $0xc,%esp
10f5e0: 8d 42 48 lea 0x48(%edx),%eax
10f5e3: 50 push %eax
10f5e4: e8 43 dd ff ff call 10d32c <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10f5e9: 58 pop %eax
10f5ea: 5a pop %edx
10f5eb: 68 f8 ff 03 10 push $0x1003fff8
10f5f0: 53 push %ebx
10f5f1: e8 4e c9 ff ff call 10bf44 <_Thread_Clear_state>
10f5f6: 83 c4 10 add $0x10,%esp
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
10f5f9: 89 d8 mov %ebx,%eax
10f5fb: 8d 65 f8 lea -0x8(%ebp),%esp
10f5fe: 5b pop %ebx
10f5ff: 5e pop %esi
10f600: c9 leave
10f601: c3 ret
#endif
return the_thread;
}
_ISR_Enable( level );
10f602: 56 push %esi
10f603: 9d popf
10f604: 31 db xor %ebx,%ebx
10f606: eb c1 jmp 10f5c9 <_Thread_queue_Dequeue_fifo+0x3d>
0010c6c0 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10c6c0: 55 push %ebp
10c6c1: 89 e5 mov %esp,%ebp
10c6c3: 57 push %edi
10c6c4: 56 push %esi
10c6c5: 53 push %ebx
10c6c6: 83 ec 0c sub $0xc,%esp
10c6c9: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10c6cc: 9c pushf
10c6cd: fa cli
10c6ce: 5f pop %edi
10c6cf: 31 d2 xor %edx,%edx
10c6d1: 31 c9 xor %ecx,%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10c6d3: 8b 1c 0e mov (%esi,%ecx,1),%ebx
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
10c6d6: 8d 04 52 lea (%edx,%edx,2),%eax
10c6d9: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax
10c6dd: 39 c3 cmp %eax,%ebx
10c6df: 75 1f jne 10c700 <_Thread_queue_Dequeue_priority+0x40>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10c6e1: 42 inc %edx
10c6e2: 83 c1 0c add $0xc,%ecx
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
10c6e5: 83 fa 04 cmp $0x4,%edx
10c6e8: 75 e9 jne 10c6d3 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10c6ea: 57 push %edi
10c6eb: 9d popf
10c6ec: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10c6f3: 8b 45 e8 mov -0x18(%ebp),%eax
10c6f6: 8d 65 f4 lea -0xc(%ebp),%esp
10c6f9: 5b pop %ebx
10c6fa: 5e pop %esi
10c6fb: 5f pop %edi
10c6fc: c9 leave
10c6fd: c3 ret
10c6fe: 66 90 xchg %ax,%ax
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *)
10c700: 89 5d e8 mov %ebx,-0x18(%ebp)
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10c703: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
new_first_node = the_thread->Wait.Block2n.first;
10c70a: 8b 53 38 mov 0x38(%ebx),%edx
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10c70d: 8b 33 mov (%ebx),%esi
previous_node = the_thread->Object.Node.previous;
10c70f: 8b 4b 04 mov 0x4(%ebx),%ecx
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10c712: 8d 43 3c lea 0x3c(%ebx),%eax
10c715: 39 c2 cmp %eax,%edx
10c717: 0f 84 85 00 00 00 je 10c7a2 <_Thread_queue_Dequeue_priority+0xe2>
last_node = the_thread->Wait.Block2n.last;
10c71d: 8b 43 40 mov 0x40(%ebx),%eax
10c720: 89 45 f0 mov %eax,-0x10(%ebp)
new_second_node = new_first_node->next;
10c723: 8b 02 mov (%edx),%eax
10c725: 89 45 ec mov %eax,-0x14(%ebp)
previous_node->next = new_first_node;
10c728: 89 11 mov %edx,(%ecx)
next_node->previous = new_first_node;
10c72a: 89 56 04 mov %edx,0x4(%esi)
new_first_node->next = next_node;
10c72d: 89 32 mov %esi,(%edx)
new_first_node->previous = previous_node;
10c72f: 89 4a 04 mov %ecx,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10c732: 8b 43 38 mov 0x38(%ebx),%eax
10c735: 3b 43 40 cmp 0x40(%ebx),%eax
10c738: 74 1a je 10c754 <_Thread_queue_Dequeue_priority+0x94>
/* > two threads on 2-n */
new_second_node->previous =
10c73a: 8d 42 38 lea 0x38(%edx),%eax
10c73d: 8b 4d ec mov -0x14(%ebp),%ecx
10c740: 89 41 04 mov %eax,0x4(%ecx)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10c743: 89 4a 38 mov %ecx,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10c746: 8b 45 f0 mov -0x10(%ebp),%eax
10c749: 89 42 40 mov %eax,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10c74c: 8d 42 3c lea 0x3c(%edx),%eax
10c74f: 8b 55 f0 mov -0x10(%ebp),%edx
10c752: 89 02 mov %eax,(%edx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10c754: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10c758: 74 1e je 10c778 <_Thread_queue_Dequeue_priority+0xb8>
_ISR_Enable( level );
10c75a: 57 push %edi
10c75b: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c75c: 83 ec 08 sub $0x8,%esp
10c75f: 68 f8 ff 03 10 push $0x1003fff8
10c764: 53 push %ebx
10c765: e8 da f7 ff ff call 10bf44 <_Thread_Clear_state>
10c76a: 83 c4 10 add $0x10,%esp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10c76d: 8b 45 e8 mov -0x18(%ebp),%eax
10c770: 8d 65 f4 lea -0xc(%ebp),%esp
10c773: 5b pop %ebx
10c774: 5e pop %esi
10c775: 5f pop %edi
10c776: c9 leave
10c777: c3 ret
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10c778: 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 );
10c77f: 57 push %edi
10c780: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10c781: 83 ec 0c sub $0xc,%esp
10c784: 8d 43 48 lea 0x48(%ebx),%eax
10c787: 50 push %eax
10c788: e8 9f 0b 00 00 call 10d32c <_Watchdog_Remove>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10c78d: 58 pop %eax
10c78e: 5a pop %edx
10c78f: 68 f8 ff 03 10 push $0x1003fff8
10c794: 53 push %ebx
10c795: e8 aa f7 ff ff call 10bf44 <_Thread_Clear_state>
10c79a: 83 c4 10 add $0x10,%esp
10c79d: e9 51 ff ff ff jmp 10c6f3 <_Thread_queue_Dequeue_priority+0x33>
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10c7a2: 89 31 mov %esi,(%ecx)
next_node->previous = previous_node;
10c7a4: 89 4e 04 mov %ecx,0x4(%esi)
10c7a7: eb ab jmp 10c754 <_Thread_queue_Dequeue_priority+0x94>
0010c844 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
10c844: 55 push %ebp
10c845: 89 e5 mov %esp,%ebp
10c847: 57 push %edi
10c848: 56 push %esi
10c849: 53 push %ebx
10c84a: 83 ec 0c sub $0xc,%esp
10c84d: 8b 45 0c mov 0xc(%ebp),%eax
10c850: 83 c0 3c add $0x3c,%eax
10c853: 8b 55 0c mov 0xc(%ebp),%edx
10c856: 89 42 38 mov %eax,0x38(%edx)
10c859: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
10c860: 89 d0 mov %edx,%eax
10c862: 83 c0 38 add $0x38,%eax
10c865: 89 42 40 mov %eax,0x40(%edx)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10c868: 8b 5a 14 mov 0x14(%edx),%ebx
extern "C" {
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
10c86b: 89 d8 mov %ebx,%eax
10c86d: c1 e8 06 shr $0x6,%eax
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
10c870: 8b 4d 08 mov 0x8(%ebp),%ecx
10c873: 8b 49 38 mov 0x38(%ecx),%ecx
10c876: 89 4d f0 mov %ecx,-0x10(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
10c879: f6 c3 20 test $0x20,%bl
10c87c: 75 66 jne 10c8e4 <_Thread_queue_Enqueue_priority+0xa0>
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10c87e: 8d 04 40 lea (%eax,%eax,2),%eax
10c881: c1 e0 02 shl $0x2,%eax
10c884: 8b 55 08 mov 0x8(%ebp),%edx
10c887: 8d 7c 02 04 lea 0x4(%edx,%eax,1),%edi
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
10c88b: 89 45 e8 mov %eax,-0x18(%ebp)
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10c88e: 9c pushf
10c88f: fa cli
10c890: 5e pop %esi
search_thread = (Thread_Control *) header->first;
10c891: 8b 45 e8 mov -0x18(%ebp),%eax
10c894: 8b 4d 08 mov 0x8(%ebp),%ecx
10c897: 8b 14 08 mov (%eax,%ecx,1),%edx
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c89a: 39 fa cmp %edi,%edx
10c89c: 75 1b jne 10c8b9 <_Thread_queue_Enqueue_priority+0x75>
10c89e: e9 1a 01 00 00 jmp 10c9bd <_Thread_queue_Enqueue_priority+0x179>
10c8a3: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10c8a4: 56 push %esi
10c8a5: 9d popf
10c8a6: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c8a7: 8b 45 f0 mov -0x10(%ebp),%eax
10c8aa: 85 42 10 test %eax,0x10(%edx)
10c8ad: 0f 84 ad 00 00 00 je 10c960 <_Thread_queue_Enqueue_priority+0x11c><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
10c8b3: 8b 12 mov (%edx),%edx
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c8b5: 39 fa cmp %edi,%edx
10c8b7: 74 07 je 10c8c0 <_Thread_queue_Enqueue_priority+0x7c>
search_priority = search_thread->current_priority;
10c8b9: 8b 4a 14 mov 0x14(%edx),%ecx
if ( priority <= search_priority )
10c8bc: 39 cb cmp %ecx,%ebx
10c8be: 77 e4 ja 10c8a4 <_Thread_queue_Enqueue_priority+0x60>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c8c0: 89 d7 mov %edx,%edi
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10c8c2: 8b 45 08 mov 0x8(%ebp),%eax
10c8c5: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c8c9: 0f 84 99 00 00 00 je 10c968 <_Thread_queue_Enqueue_priority+0x124><== ALWAYS TAKEN
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
10c8cf: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
10c8d2: 89 30 mov %esi,(%eax) <== NOT EXECUTED
return the_thread_queue->sync_state;
10c8d4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10c8d7: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED
}
10c8da: 83 c4 0c add $0xc,%esp
10c8dd: 5b pop %ebx
10c8de: 5e pop %esi
10c8df: 5f pop %edi
10c8e0: c9 leave
10c8e1: c3 ret
10c8e2: 66 90 xchg %ax,%ax
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c8e4: 8d 04 40 lea (%eax,%eax,2),%eax
10c8e7: 8b 55 08 mov 0x8(%ebp),%edx
10c8ea: 8d 0c 82 lea (%edx,%eax,4),%ecx
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
10c8ed: 8d 79 08 lea 0x8(%ecx),%edi
10c8f0: 89 7d ec mov %edi,-0x14(%ebp)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10c8f3: 0f b6 05 14 a1 11 00 movzbl 0x11a114,%eax
10c8fa: 40 inc %eax
_ISR_Disable( level );
10c8fb: 9c pushf
10c8fc: fa cli
10c8fd: 5e pop %esi
search_thread = (Thread_Control *) header->last;
10c8fe: 8b 7d ec mov -0x14(%ebp),%edi
10c901: 8b 17 mov (%edi),%edx
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c903: 39 d1 cmp %edx,%ecx
10c905: 75 17 jne 10c91e <_Thread_queue_Enqueue_priority+0xda>
10c907: eb 1c jmp 10c925 <_Thread_queue_Enqueue_priority+0xe1>
10c909: 8d 76 00 lea 0x0(%esi),%esi
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10c90c: 56 push %esi
10c90d: 9d popf
10c90e: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10c90f: 8b 7d f0 mov -0x10(%ebp),%edi
10c912: 85 7a 10 test %edi,0x10(%edx)
10c915: 74 45 je 10c95c <_Thread_queue_Enqueue_priority+0x118><== NEVER TAKEN
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
10c917: 8b 52 04 mov 0x4(%edx),%edx
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c91a: 39 ca cmp %ecx,%edx
10c91c: 74 07 je 10c925 <_Thread_queue_Enqueue_priority+0xe1>
search_priority = search_thread->current_priority;
10c91e: 8b 42 14 mov 0x14(%edx),%eax
if ( priority >= search_priority )
10c921: 39 c3 cmp %eax,%ebx
10c923: 72 e7 jb 10c90c <_Thread_queue_Enqueue_priority+0xc8>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10c925: 89 d7 mov %edx,%edi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10c927: 8b 4d 08 mov 0x8(%ebp),%ecx
10c92a: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10c92e: 75 9f jne 10c8cf <_Thread_queue_Enqueue_priority+0x8b><== NEVER TAKEN
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c930: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10c937: 39 c3 cmp %eax,%ebx
10c939: 74 5d je 10c998 <_Thread_queue_Enqueue_priority+0x154>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10c93b: 8b 02 mov (%edx),%eax
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10c93d: 8b 7d 0c mov 0xc(%ebp),%edi
10c940: 89 07 mov %eax,(%edi)
the_node->previous = search_node;
10c942: 89 57 04 mov %edx,0x4(%edi)
search_node->next = the_node;
10c945: 89 3a mov %edi,(%edx)
next_node->previous = the_node;
10c947: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10c94a: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10c94d: 56 push %esi
10c94e: 9d popf
10c94f: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10c954: 83 c4 0c add $0xc,%esp
10c957: 5b pop %ebx
10c958: 5e pop %esi
10c959: 5f pop %edi
10c95a: c9 leave
10c95b: c3 ret
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10c95c: 56 push %esi <== NOT EXECUTED
10c95d: 9d popf <== NOT EXECUTED
10c95e: eb 93 jmp 10c8f3 <_Thread_queue_Enqueue_priority+0xaf><== NOT EXECUTED
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10c960: 56 push %esi <== NOT EXECUTED
10c961: 9d popf <== NOT EXECUTED
10c962: e9 27 ff ff ff jmp 10c88e <_Thread_queue_Enqueue_priority+0x4a><== NOT EXECUTED
10c967: 90 nop <== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10c968: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( priority == search_priority )
10c96f: 39 cb cmp %ecx,%ebx
10c971: 74 25 je 10c998 <_Thread_queue_Enqueue_priority+0x154>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10c973: 8b 42 04 mov 0x4(%edx),%eax
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c976: 8b 4d 0c mov 0xc(%ebp),%ecx
10c979: 89 11 mov %edx,(%ecx)
the_node->previous = previous_node;
10c97b: 89 41 04 mov %eax,0x4(%ecx)
previous_node->next = the_node;
10c97e: 89 08 mov %ecx,(%eax)
search_node->previous = the_node;
10c980: 89 4a 04 mov %ecx,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10c983: 8b 7d 08 mov 0x8(%ebp),%edi
10c986: 89 79 44 mov %edi,0x44(%ecx)
_ISR_Enable( level );
10c989: 56 push %esi
10c98a: 9d popf
10c98b: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10c990: 83 c4 0c add $0xc,%esp
10c993: 5b pop %ebx
10c994: 5e pop %esi
10c995: 5f pop %edi
10c996: c9 leave
10c997: c3 ret
10c998: 8d 47 3c lea 0x3c(%edi),%eax
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
10c99b: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10c99e: 8b 4d 0c mov 0xc(%ebp),%ecx
10c9a1: 89 01 mov %eax,(%ecx)
the_node->previous = previous_node;
10c9a3: 89 51 04 mov %edx,0x4(%ecx)
previous_node->next = the_node;
10c9a6: 89 0a mov %ecx,(%edx)
search_node->previous = the_node;
10c9a8: 89 48 04 mov %ecx,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10c9ab: 8b 7d 08 mov 0x8(%ebp),%edi
10c9ae: 89 79 44 mov %edi,0x44(%ecx)
_ISR_Enable( level );
10c9b1: 56 push %esi
10c9b2: 9d popf
10c9b3: b8 01 00 00 00 mov $0x1,%eax
10c9b8: e9 1d ff ff ff jmp 10c8da <_Thread_queue_Enqueue_priority+0x96>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10c9bd: b9 ff ff ff ff mov $0xffffffff,%ecx
10c9c2: e9 fb fe ff ff jmp 10c8c2 <_Thread_queue_Enqueue_priority+0x7e>
0010f64c <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10f64c: 55 push %ebp
10f64d: 89 e5 mov %esp,%ebp
10f64f: 83 ec 08 sub $0x8,%esp
10f652: 8b 45 08 mov 0x8(%ebp),%eax
10f655: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10f658: 83 78 34 01 cmpl $0x1,0x34(%eax)
10f65c: 74 0e je 10f66c <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
10f65e: 89 55 0c mov %edx,0xc(%ebp)
10f661: 89 45 08 mov %eax,0x8(%ebp)
}
10f664: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
10f665: e9 ce 0a 00 00 jmp 110138 <_Thread_queue_Extract_fifo>
10f66a: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
10f66c: 51 push %ecx
10f66d: 6a 00 push $0x0
10f66f: 52 push %edx
10f670: 50 push %eax
10f671: e8 06 00 00 00 call 10f67c <_Thread_queue_Extract_priority_helper>
10f676: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
10f679: c9 leave
10f67a: c3 ret
00110138 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
110138: 55 push %ebp
110139: 89 e5 mov %esp,%ebp
11013b: 53 push %ebx
11013c: 83 ec 04 sub $0x4,%esp
11013f: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
110142: 9c pushf
110143: fa cli
110144: 59 pop %ecx
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
110145: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
11014c: 74 2e je 11017c <_Thread_queue_Extract_fifo+0x44><== NEVER TAKEN
11014e: 8b 13 mov (%ebx),%edx
110150: 8b 43 04 mov 0x4(%ebx),%eax
110153: 89 42 04 mov %eax,0x4(%edx)
110156: 89 10 mov %edx,(%eax)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
110158: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
11015f: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
110163: 74 1f je 110184 <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
110165: 51 push %ecx
110166: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
110167: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
11016e: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
110171: 8b 5d fc mov -0x4(%ebp),%ebx
110174: c9 leave
110175: e9 ca bd ff ff jmp 10bf44 <_Thread_Clear_state>
11017a: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
11017c: 51 push %ecx <== NOT EXECUTED
11017d: 9d popf <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
11017e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
110181: c9 leave <== NOT EXECUTED
110182: c3 ret <== NOT EXECUTED
110183: 90 nop <== NOT EXECUTED
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
110184: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
11018b: 51 push %ecx
11018c: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
11018d: 83 ec 0c sub $0xc,%esp
110190: 8d 43 48 lea 0x48(%ebx),%eax
110193: 50 push %eax
110194: e8 93 d1 ff ff call 10d32c <_Watchdog_Remove>
110199: 83 c4 10 add $0x10,%esp
11019c: eb c9 jmp 110167 <_Thread_queue_Extract_fifo+0x2f>
0010f67c <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
10f67c: 55 push %ebp
10f67d: 89 e5 mov %esp,%ebp
10f67f: 57 push %edi
10f680: 56 push %esi
10f681: 53 push %ebx
10f682: 83 ec 0c sub $0xc,%esp
10f685: 8b 5d 0c mov 0xc(%ebp),%ebx
10f688: 8a 45 10 mov 0x10(%ebp),%al
10f68b: 88 45 eb mov %al,-0x15(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
10f68e: 9c pushf
10f68f: fa cli
10f690: 8f 45 ec popl -0x14(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10f693: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
10f69a: 74 68 je 10f704 <_Thread_queue_Extract_priority_helper+0x88><== NEVER TAKEN
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
10f69c: 8b 33 mov (%ebx),%esi
previous_node = the_node->previous;
10f69e: 8b 4b 04 mov 0x4(%ebx),%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10f6a1: 8b 53 38 mov 0x38(%ebx),%edx
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10f6a4: 8d 43 3c lea 0x3c(%ebx),%eax
10f6a7: 39 c2 cmp %eax,%edx
10f6a9: 74 71 je 10f71c <_Thread_queue_Extract_priority_helper+0xa0>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
10f6ab: 8b 43 40 mov 0x40(%ebx),%eax
10f6ae: 89 45 f0 mov %eax,-0x10(%ebp)
new_second_node = new_first_node->next;
10f6b1: 8b 3a mov (%edx),%edi
previous_node->next = new_first_node;
10f6b3: 89 11 mov %edx,(%ecx)
next_node->previous = new_first_node;
10f6b5: 89 56 04 mov %edx,0x4(%esi)
new_first_node->next = next_node;
10f6b8: 89 32 mov %esi,(%edx)
new_first_node->previous = previous_node;
10f6ba: 89 4a 04 mov %ecx,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10f6bd: 8b 43 38 mov 0x38(%ebx),%eax
10f6c0: 3b 43 40 cmp 0x40(%ebx),%eax
10f6c3: 74 17 je 10f6dc <_Thread_queue_Extract_priority_helper+0x60>
/* > two threads on 2-n */
new_second_node->previous =
10f6c5: 8d 42 38 lea 0x38(%edx),%eax
10f6c8: 89 47 04 mov %eax,0x4(%edi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10f6cb: 89 7a 38 mov %edi,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10f6ce: 8b 45 f0 mov -0x10(%ebp),%eax
10f6d1: 89 42 40 mov %eax,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10f6d4: 8d 42 3c lea 0x3c(%edx),%eax
10f6d7: 8b 55 f0 mov -0x10(%ebp),%edx
10f6da: 89 02 mov %eax,(%edx)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
10f6dc: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
10f6e0: 75 2e jne 10f710 <_Thread_queue_Extract_priority_helper+0x94>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10f6e2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10f6e6: 74 3c je 10f724 <_Thread_queue_Extract_priority_helper+0xa8><== NEVER TAKEN
_ISR_Enable( level );
10f6e8: ff 75 ec pushl -0x14(%ebp)
10f6eb: 9d popf
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
/**
10f6ec: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
10f6f3: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10f6f6: 8d 65 f4 lea -0xc(%ebp),%esp
10f6f9: 5b pop %ebx
10f6fa: 5e pop %esi
10f6fb: 5f pop %edi
10f6fc: c9 leave
10f6fd: e9 42 c8 ff ff jmp 10bf44 <_Thread_Clear_state>
10f702: 66 90 xchg %ax,%ax
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
10f704: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
10f707: 9d popf <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10f708: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10f70b: 5b pop %ebx <== NOT EXECUTED
10f70c: 5e pop %esi <== NOT EXECUTED
10f70d: 5f pop %edi <== NOT EXECUTED
10f70e: c9 leave <== NOT EXECUTED
10f70f: c3 ret <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
10f710: ff 75 ec pushl -0x14(%ebp)
10f713: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
10f714: 8d 65 f4 lea -0xc(%ebp),%esp
10f717: 5b pop %ebx
10f718: 5e pop %esi
10f719: 5f pop %edi
10f71a: c9 leave
10f71b: c3 ret
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10f71c: 89 31 mov %esi,(%ecx)
next_node->previous = previous_node;
10f71e: 89 4e 04 mov %ecx,0x4(%esi)
10f721: eb b9 jmp 10f6dc <_Thread_queue_Extract_priority_helper+0x60>
10f723: 90 nop
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
10f724: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10f72b: ff 75 ec pushl -0x14(%ebp) <== NOT EXECUTED
10f72e: 9d popf <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
10f72f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10f732: 8d 43 48 lea 0x48(%ebx),%eax <== NOT EXECUTED
10f735: 50 push %eax <== NOT EXECUTED
10f736: e8 f1 db ff ff call 10d32c <_Watchdog_Remove> <== NOT EXECUTED
10f73b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10f73e: eb ac jmp 10f6ec <_Thread_queue_Extract_priority_helper+0x70><== NOT EXECUTED
0010c9c8 <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10c9c8: 55 push %ebp
10c9c9: 89 e5 mov %esp,%ebp
10c9cb: 83 ec 08 sub $0x8,%esp
10c9ce: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10c9d1: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10c9d8: 75 06 jne 10c9e0 <_Thread_queue_Extract_with_proxy+0x18>
10c9da: 31 c0 xor %eax,%eax
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return TRUE;
}
return FALSE;
}
10c9dc: c9 leave
10c9dd: c3 ret
10c9de: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10c9e0: 83 ec 08 sub $0x8,%esp
10c9e3: 50 push %eax
10c9e4: ff 70 44 pushl 0x44(%eax)
10c9e7: e8 60 2c 00 00 call 10f64c <_Thread_queue_Extract>
10c9ec: b0 01 mov $0x1,%al
10c9ee: 83 c4 10 add $0x10,%esp
return TRUE;
}
return FALSE;
}
10c9f1: c9 leave
10c9f2: c3 ret
0011aa6c <_Thread_queue_First_priority>:
*/
Thread_Control *_Thread_queue_First_priority (
Thread_queue_Control *the_thread_queue
)
{
11aa6c: 55 push %ebp
11aa6d: 89 e5 mov %esp,%ebp
11aa6f: 56 push %esi
11aa70: 53 push %ebx
11aa71: 8b 75 08 mov 0x8(%ebp),%esi
11aa74: 31 d2 xor %edx,%edx
11aa76: 31 c9 xor %ecx,%ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
11aa78: 8b 1c 0e mov (%esi,%ecx,1),%ebx
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
11aa7b: 8d 04 52 lea (%edx,%edx,2),%eax
11aa7e: 8d 44 86 04 lea 0x4(%esi,%eax,4),%eax
11aa82: 39 c3 cmp %eax,%ebx
11aa84: 75 12 jne 11aa98 <_Thread_queue_First_priority+0x2c>
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
11aa86: 42 inc %edx
11aa87: 83 c1 0c add $0xc,%ecx
)
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
11aa8a: 83 fa 04 cmp $0x4,%edx
11aa8d: 75 e9 jne 11aa78 <_Thread_queue_First_priority+0xc>
11aa8f: 31 c0 xor %eax,%eax
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *)
the_thread_queue->Queues.Priority[ index ].first;
}
return NULL;
}
11aa91: 5b pop %ebx
11aa92: 5e pop %esi
11aa93: c9 leave
11aa94: c3 ret
11aa95: 8d 76 00 lea 0x0(%esi),%esi
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
return (Thread_Control *)
11aa98: 89 d8 mov %ebx,%eax
the_thread_queue->Queues.Priority[ index ].first;
}
return NULL;
}
11aa9a: 5b pop %ebx
11aa9b: 5e pop %esi
11aa9c: c9 leave
11aa9d: c3 ret
0010c9f4 <_Thread_queue_Flush>:
void _Thread_queue_Flush(
Thread_queue_Control *the_thread_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
10c9f4: 55 push %ebp
10c9f5: 89 e5 mov %esp,%ebp
10c9f7: 56 push %esi
10c9f8: 53 push %ebx
10c9f9: 8b 75 08 mov 0x8(%ebp),%esi
10c9fc: 8b 5d 10 mov 0x10(%ebp),%ebx
10c9ff: eb 06 jmp 10ca07 <_Thread_queue_Flush+0x13>
10ca01: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10ca04: 89 58 34 mov %ebx,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10ca07: 83 ec 0c sub $0xc,%esp
10ca0a: 56 push %esi
10ca0b: e8 60 fc ff ff call 10c670 <_Thread_queue_Dequeue>
10ca10: 83 c4 10 add $0x10,%esp
10ca13: 85 c0 test %eax,%eax
10ca15: 75 ed jne 10ca04 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10ca17: 8d 65 f8 lea -0x8(%ebp),%esp
10ca1a: 5b pop %ebx
10ca1b: 5e pop %esi
10ca1c: c9 leave
10ca1d: c3 ret
0010f740 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
10f740: 55 push %ebp
10f741: 89 e5 mov %esp,%ebp
10f743: 83 ec 08 sub $0x8,%esp
10f746: 8b 4d 08 mov 0x8(%ebp),%ecx
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
10f749: 8b 51 44 mov 0x44(%ecx),%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 &&
10f74c: 8b 42 30 mov 0x30(%edx),%eax
10f74f: 85 c0 test %eax,%eax
10f751: 74 08 je 10f75b <_Thread_queue_Process_timeout+0x1b>
10f753: 3b 0d 1c e7 11 00 cmp 0x11e71c,%ecx
10f759: 74 19 je 10f774 <_Thread_queue_Process_timeout+0x34><== 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;
10f75b: 8b 42 3c mov 0x3c(%edx),%eax
10f75e: 89 41 34 mov %eax,0x34(%ecx)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10f761: 83 ec 08 sub $0x8,%esp
10f764: 51 push %ecx
10f765: ff 71 44 pushl 0x44(%ecx)
10f768: e8 df fe ff ff call 10f64c <_Thread_queue_Extract>
10f76d: 83 c4 10 add $0x10,%esp
}
}
10f770: c9 leave
10f771: c3 ret
10f772: 66 90 xchg %ax,%ax
* 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 ) {
10f774: 83 f8 03 cmp $0x3,%eax
10f777: 74 f7 je 10f770 <_Thread_queue_Process_timeout+0x30><== NEVER TAKEN
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
10f779: 8b 42 3c mov 0x3c(%edx),%eax
10f77c: 89 41 34 mov %eax,0x34(%ecx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10f77f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
10f786: c9 leave
10f787: c3 ret
0010caa0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10caa0: 55 push %ebp
10caa1: 89 e5 mov %esp,%ebp
10caa3: 56 push %esi
10caa4: 53 push %ebx
10caa5: 83 ec 10 sub $0x10,%esp
10caa8: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10caab: 85 db test %ebx,%ebx
10caad: 74 06 je 10cab5 <_Thread_queue_Requeue+0x15><== 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 ) {
10caaf: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10cab3: 74 07 je 10cabc <_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 );
}
}
10cab5: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10cab8: 5b pop %ebx <== NOT EXECUTED
10cab9: 5e pop %esi <== NOT EXECUTED
10caba: c9 leave <== NOT EXECUTED
10cabb: c3 ret <== 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 );
10cabc: 9c pushf
10cabd: fa cli
10cabe: 5e pop %esi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10cabf: 8b 45 0c mov 0xc(%ebp),%eax
10cac2: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10cac9: 75 09 jne 10cad4 <_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 );
10cacb: 56 push %esi
10cacc: 9d popf
}
}
10cacd: 8d 65 f8 lea -0x8(%ebp),%esp
10cad0: 5b pop %ebx
10cad1: 5e pop %esi
10cad2: c9 leave
10cad3: c3 ret
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10cad4: 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 );
10cadb: 52 push %edx
10cadc: 6a 01 push $0x1
10cade: 50 push %eax
10cadf: 53 push %ebx
10cae0: e8 97 2b 00 00 call 10f67c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10cae5: 83 c4 0c add $0xc,%esp
10cae8: 8d 45 f4 lea -0xc(%ebp),%eax
10caeb: 50 push %eax
10caec: ff 75 0c pushl 0xc(%ebp)
10caef: 53 push %ebx
10caf0: e8 4f fd ff ff call 10c844 <_Thread_queue_Enqueue_priority>
10caf5: 83 c4 10 add $0x10,%esp
10caf8: eb d1 jmp 10cacb <_Thread_queue_Requeue+0x2b>
0010cafc <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored
)
{
10cafc: 55 push %ebp
10cafd: 89 e5 mov %esp,%ebp
10caff: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10cb02: 8d 45 fc lea -0x4(%ebp),%eax
10cb05: 50 push %eax
10cb06: ff 75 08 pushl 0x8(%ebp)
10cb09: e8 02 f8 ff ff call 10c310 <_Thread_Get>
switch ( location ) {
10cb0e: 83 c4 10 add $0x10,%esp
10cb11: 8b 55 fc mov -0x4(%ebp),%edx
10cb14: 85 d2 test %edx,%edx
10cb16: 75 17 jne 10cb2f <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10cb18: 83 ec 0c sub $0xc,%esp
10cb1b: 50 push %eax
10cb1c: e8 1f 2c 00 00 call 10f740 <_Thread_queue_Process_timeout>
10cb21: a1 58 e6 11 00 mov 0x11e658,%eax
10cb26: 48 dec %eax
10cb27: a3 58 e6 11 00 mov %eax,0x11e658
10cb2c: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10cb2f: c9 leave
10cb30: c3 ret
00114ca0 <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
114ca0: 55 push %ebp
114ca1: 89 e5 mov %esp,%ebp
114ca3: 57 push %edi
114ca4: 56 push %esi
114ca5: 53 push %ebx
114ca6: 83 ec 1c sub $0x1c,%esp
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
114ca9: 8d 7d e8 lea -0x18(%ebp),%edi
114cac: 8d 75 ec lea -0x14(%ebp),%esi
114caf: 89 75 e8 mov %esi,-0x18(%ebp)
114cb2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
114cb9: 89 7d f0 mov %edi,-0x10(%ebp)
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
114cbc: a1 a4 5b 13 00 mov 0x135ba4,%eax
114cc1: a3 90 59 13 00 mov %eax,0x135990
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
114cc6: a1 cc 5a 13 00 mov 0x135acc,%eax
114ccb: a3 8c 59 13 00 mov %eax,0x13598c
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114cd0: a1 38 5a 13 00 mov 0x135a38,%eax
114cd5: 40 inc %eax
114cd6: a3 38 5a 13 00 mov %eax,0x135a38
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
114cdb: e8 60 ff ff ff call 114c40 <_Timer_Server_process_insertions>
_Thread_Enable_dispatch();
114ce0: e8 3f 27 00 00 call 117424 <_Thread_Enable_dispatch>
114ce5: 8d 76 00 lea 0x0(%esi),%esi
114ce8: a1 38 5a 13 00 mov 0x135a38,%eax
114ced: 40 inc %eax
114cee: a3 38 5a 13 00 mov %eax,0x135a38
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
114cf3: 83 ec 08 sub $0x8,%esp
114cf6: 6a 08 push $0x8
114cf8: ff 35 e4 5d 13 00 pushl 0x135de4
114cfe: e8 19 31 00 00 call 117e1c <_Thread_Set_state>
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114d03: 8b 15 80 59 13 00 mov 0x135980,%edx
_Timer_Server_reset_ticks_timer();
114d09: 83 c4 10 add $0x10,%esp
114d0c: 81 fa 84 59 13 00 cmp $0x135984,%edx
114d12: 74 1f je 114d33 <_Timer_Server_body+0x93>
114d14: a1 e4 5d 13 00 mov 0x135de4,%eax
Heap_Control *the_heap,
114d19: 8b 52 10 mov 0x10(%edx),%edx
114d1c: 89 50 54 mov %edx,0x54(%eax)
void *starting_address,
size_t *size
114d1f: 83 ec 08 sub $0x8,%esp
114d22: 83 c0 48 add $0x48,%eax
114d25: 50 push %eax
114d26: 68 1c 5b 13 00 push $0x135b1c
114d2b: e8 bc 39 00 00 call 1186ec <_Watchdog_Insert>
114d30: 83 c4 10 add $0x10,%esp
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114d33: a1 94 59 13 00 mov 0x135994,%eax
_Timer_Server_reset_seconds_timer();
114d38: 3d 98 59 13 00 cmp $0x135998,%eax
114d3d: 74 1d je 114d5c <_Timer_Server_body+0xbc>
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
114d3f: 8b 40 10 mov 0x10(%eax),%eax
114d42: a3 cc 59 13 00 mov %eax,0x1359cc
size_t size
);
114d47: 83 ec 08 sub $0x8,%esp
114d4a: 68 c0 59 13 00 push $0x1359c0
114d4f: 68 10 5b 13 00 push $0x135b10
114d54: e8 93 39 00 00 call 1186ec <_Watchdog_Insert>
114d59: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
114d5c: e8 c3 26 00 00 call 117424 <_Thread_Enable_dispatch>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114d61: a1 38 5a 13 00 mov 0x135a38,%eax
114d66: 40 inc %eax
114d67: a3 38 5a 13 00 mov %eax,0x135a38
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
114d6c: 83 ec 0c sub $0xc,%esp
114d6f: a1 e4 5d 13 00 mov 0x135de4,%eax
114d74: 83 c0 48 add $0x48,%eax
114d77: 50 push %eax
114d78: e8 9f 3a 00 00 call 11881c <_Watchdog_Remove>
_Timer_Server_stop_seconds_timer();
114d7d: c7 04 24 c0 59 13 00 movl $0x1359c0,(%esp)
114d84: e8 93 3a 00 00 call 11881c <_Watchdog_Remove>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
114d89: 8b 15 a4 5b 13 00 mov 0x135ba4,%edx
if ( snapshot >= _Timer_Server_ticks_last_time )
114d8f: a1 90 59 13 00 mov 0x135990,%eax
114d94: 83 c4 10 add $0x10,%esp
114d97: 39 c2 cmp %eax,%edx
114d99: 72 7d jb 114e18 <_Timer_Server_body+0x178><== NEVER TAKEN
ticks = snapshot - _Timer_Server_ticks_last_time;
114d9b: 89 d1 mov %edx,%ecx
114d9d: 29 c1 sub %eax,%ecx
114d9f: 89 c8 mov %ecx,%eax
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
114da1: 89 15 90 59 13 00 mov %edx,0x135990
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
114da7: 53 push %ebx
114da8: 57 push %edi
114da9: 50 push %eax
114daa: 68 80 59 13 00 push $0x135980
114daf: e8 a4 38 00 00 call 118658 <_Watchdog_Adjust_to_chain>
/*
* 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 _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
114db4: 8b 1d cc 5a 13 00 mov 0x135acc,%ebx
if ( snapshot > _Timer_Server_seconds_last_time ) {
114dba: a1 8c 59 13 00 mov 0x13598c,%eax
114dbf: 83 c4 10 add $0x10,%esp
114dc2: 39 c3 cmp %eax,%ebx
114dc4: 77 5a ja 114e20 <_Timer_Server_body+0x180>
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
114dc6: 72 70 jb 114e38 <_Timer_Server_body+0x198>
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
}
_Timer_Server_seconds_last_time = snapshot;
114dc8: 89 1d 8c 59 13 00 mov %ebx,0x13598c
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
114dce: e8 6d fe ff ff call 114c40 <_Timer_Server_process_insertions>
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
114dd3: e8 4c 26 00 00 call 117424 <_Thread_Enable_dispatch>
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
114dd8: 9c pushf
114dd9: fa cli
114dda: 59 pop %ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114ddb: 8b 55 e8 mov -0x18(%ebp),%edx
114dde: 39 d6 cmp %edx,%esi
114de0: 74 2c je 114e0e <_Timer_Server_body+0x16e>
114de2: 66 90 xchg %ax,%ax
114de4: 8b 02 mov (%edx),%eax
114de6: 89 45 e8 mov %eax,-0x18(%ebp)
114de9: 89 78 04 mov %edi,0x4(%eax)
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
114dec: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
_ISR_Enable( level );
114df3: 51 push %ecx
114df4: 9d popf
(*watch->routine)( watch->id, watch->user_data );
114df5: 83 ec 08 sub $0x8,%esp
114df8: ff 72 24 pushl 0x24(%edx)
114dfb: ff 72 20 pushl 0x20(%edx)
114dfe: ff 52 1c call *0x1c(%edx)
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
114e01: 9c pushf
114e02: fa cli
114e03: 59 pop %ecx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
114e04: 8b 55 e8 mov -0x18(%ebp),%edx
114e07: 83 c4 10 add $0x10,%esp
114e0a: 39 d6 cmp %edx,%esi
114e0c: 75 d6 jne 114de4 <_Timer_Server_body+0x144>
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
if ( watch == NULL ) {
_ISR_Enable( level );
114e0e: 51 push %ecx
114e0f: 9d popf
114e10: e9 d3 fe ff ff jmp 114ce8 <_Timer_Server_body+0x48>
114e15: 8d 76 00 lea 0x0(%esi),%esi
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
114e18: f7 d0 not %eax <== NOT EXECUTED
114e1a: 01 d0 add %edx,%eax <== NOT EXECUTED
114e1c: eb 83 jmp 114da1 <_Timer_Server_body+0x101><== NOT EXECUTED
114e1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
114e20: 51 push %ecx
114e21: 57 push %edi
114e22: 89 da mov %ebx,%edx
114e24: 29 c2 sub %eax,%edx
114e26: 52 push %edx
114e27: 68 94 59 13 00 push $0x135994
114e2c: e8 27 38 00 00 call 118658 <_Watchdog_Adjust_to_chain>
114e31: 83 c4 10 add $0x10,%esp
114e34: eb 92 jmp 114dc8 <_Timer_Server_body+0x128>
114e36: 66 90 xchg %ax,%ax
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
114e38: 52 push %edx
114e39: 29 d8 sub %ebx,%eax
114e3b: 50 push %eax
114e3c: 6a 01 push $0x1
114e3e: 68 94 59 13 00 push $0x135994
114e43: e8 94 37 00 00 call 1185dc <_Watchdog_Adjust>
114e48: 83 c4 10 add $0x10,%esp
114e4b: e9 78 ff ff ff jmp 114dc8 <_Timer_Server_body+0x128>
00114c40 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
114c40: 55 push %ebp
114c41: 89 e5 mov %esp,%ebp
114c43: 83 ec 08 sub $0x8,%esp
114c46: eb 0a jmp 114c52 <_Timer_Server_process_insertions+0x12>
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
114c48: 83 fa 03 cmp $0x3,%edx
114c4b: 74 37 je 114c84 <_Timer_Server_process_insertions+0x44><== ALWAYS TAKEN
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
114c4d: e8 ee ff ff ff call 114c40 <_Timer_Server_process_insertions>
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
114c52: 83 ec 0c sub $0xc,%esp
114c55: 68 a0 59 13 00 push $0x1359a0
114c5a: e8 69 08 00 00 call 1154c8 <_Chain_Get>
if ( the_timer == NULL )
114c5f: 83 c4 10 add $0x10,%esp
114c62: 85 c0 test %eax,%eax
114c64: 74 36 je 114c9c <_Timer_Server_process_insertions+0x5c>
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
114c66: 8b 50 38 mov 0x38(%eax),%edx
114c69: 83 fa 01 cmp $0x1,%edx
114c6c: 75 da jne 114c48 <_Timer_Server_process_insertions+0x8>
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
114c6e: 83 ec 08 sub $0x8,%esp
114c71: 83 c0 10 add $0x10,%eax
114c74: 50 push %eax
114c75: 68 80 59 13 00 push $0x135980
114c7a: e8 6d 3a 00 00 call 1186ec <_Watchdog_Insert>
114c7f: 83 c4 10 add $0x10,%esp
114c82: eb c9 jmp 114c4d <_Timer_Server_process_insertions+0xd>
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
114c84: 83 ec 08 sub $0x8,%esp
114c87: 83 c0 10 add $0x10,%eax
114c8a: 50 push %eax
114c8b: 68 94 59 13 00 push $0x135994
114c90: e8 57 3a 00 00 call 1186ec <_Watchdog_Insert>
114c95: 83 c4 10 add $0x10,%esp
114c98: eb b3 jmp 114c4d <_Timer_Server_process_insertions+0xd>
114c9a: 66 90 xchg %ax,%ax
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
}
}
114c9c: c9 leave
114c9d: c3 ret
0010e5d8 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10e5d8: 55 push %ebp
10e5d9: 89 e5 mov %esp,%ebp
10e5db: 57 push %edi
10e5dc: 56 push %esi
10e5dd: 53 push %ebx
10e5de: 83 ec 2c sub $0x2c,%esp
10e5e1: 8b 45 08 mov 0x8(%ebp),%eax
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e5e4: 8b 10 mov (%eax),%edx
10e5e6: 89 55 ec mov %edx,-0x14(%ebp)
left += lhs->tv_nsec;
10e5e9: 8b 40 04 mov 0x4(%eax),%eax
10e5ec: 89 45 dc mov %eax,-0x24(%ebp)
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e5ef: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx
10e5f4: 8b 5d 0c mov 0xc(%ebp),%ebx
10e5f7: 8b 03 mov (%ebx),%eax
10e5f9: f7 e9 imul %ecx
10e5fb: 89 c6 mov %eax,%esi
10e5fd: 89 d7 mov %edx,%edi
right += rhs->tv_nsec;
10e5ff: 8b 43 04 mov 0x4(%ebx),%eax
10e602: 99 cltd
10e603: 01 c6 add %eax,%esi
10e605: 11 d7 adc %edx,%edi
if ( right == 0 ) {
10e607: 89 f8 mov %edi,%eax
10e609: 09 f0 or %esi,%eax
10e60b: 74 77 je 10e684 <_Timespec_Divide+0xac> <== NEVER TAKEN
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10e60d: 8b 45 ec mov -0x14(%ebp),%eax
10e610: f7 e9 imul %ecx
10e612: 89 45 e0 mov %eax,-0x20(%ebp)
10e615: 89 55 e4 mov %edx,-0x1c(%ebp)
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
10e618: 8b 45 dc mov -0x24(%ebp),%eax
10e61b: 99 cltd
10e61c: 01 45 e0 add %eax,-0x20(%ebp)
10e61f: 11 55 e4 adc %edx,-0x1c(%ebp)
10e622: 69 5d e4 a0 86 01 00 imul $0x186a0,-0x1c(%ebp),%ebx
10e629: b9 a0 86 01 00 mov $0x186a0,%ecx
10e62e: 8b 45 e0 mov -0x20(%ebp),%eax
10e631: f7 e1 mul %ecx
10e633: 89 45 d0 mov %eax,-0x30(%ebp)
10e636: 01 da add %ebx,%edx
10e638: 89 55 d4 mov %edx,-0x2c(%ebp)
10e63b: 57 push %edi
10e63c: 56 push %esi
10e63d: ff 75 d4 pushl -0x2c(%ebp)
10e640: ff 75 d0 pushl -0x30(%ebp)
10e643: e8 c0 a8 00 00 call 118f08 <__udivdi3>
10e648: 83 c4 10 add $0x10,%esp
10e64b: 89 c3 mov %eax,%ebx
10e64d: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10e64f: 6a 00 push $0x0
10e651: 68 e8 03 00 00 push $0x3e8
10e656: 52 push %edx
10e657: 50 push %eax
10e658: e8 ab a8 00 00 call 118f08 <__udivdi3>
10e65d: 83 c4 10 add $0x10,%esp
10e660: 8b 4d 10 mov 0x10(%ebp),%ecx
10e663: 89 01 mov %eax,(%ecx)
*fval_percentage = answer % 1000;
10e665: 6a 00 push $0x0
10e667: 68 e8 03 00 00 push $0x3e8
10e66c: 56 push %esi
10e66d: 53 push %ebx
10e66e: e8 a1 a9 00 00 call 119014 <__umoddi3>
10e673: 83 c4 10 add $0x10,%esp
10e676: 8b 5d 14 mov 0x14(%ebp),%ebx
10e679: 89 03 mov %eax,(%ebx)
}
10e67b: 8d 65 f4 lea -0xc(%ebp),%esp
10e67e: 5b pop %ebx
10e67f: 5e pop %esi
10e680: 5f pop %edi
10e681: c9 leave
10e682: c3 ret
10e683: 90 nop
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10e684: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10e687: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
*fval_percentage = 0;
10e68d: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED
10e690: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10e696: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e699: 5b pop %ebx <== NOT EXECUTED
10e69a: 5e pop %esi <== NOT EXECUTED
10e69b: 5f pop %edi <== NOT EXECUTED
10e69c: c9 leave <== NOT EXECUTED
10e69d: c3 ret <== NOT EXECUTED
0010ea08 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10ea08: 55 push %ebp
10ea09: 89 e5 mov %esp,%ebp
10ea0b: 8b 55 08 mov 0x8(%ebp),%edx
10ea0e: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( lhs->tv_sec > rhs->tv_sec )
10ea11: 8b 01 mov (%ecx),%eax
10ea13: 39 02 cmp %eax,(%edx)
10ea15: 7f 11 jg 10ea28 <_Timespec_Greater_than+0x20><== NEVER TAKEN
return TRUE;
if ( lhs->tv_sec < rhs->tv_sec )
10ea17: 7c 0b jl 10ea24 <_Timespec_Greater_than+0x1c><== NEVER TAKEN
return FALSE;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
10ea19: 8b 42 04 mov 0x4(%edx),%eax
10ea1c: 3b 41 04 cmp 0x4(%ecx),%eax
10ea1f: 0f 9f c0 setg %al
return TRUE;
return FALSE;
}
10ea22: c9 leave
10ea23: c3 ret
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return TRUE;
if ( lhs->tv_sec < rhs->tv_sec )
10ea24: 31 c0 xor %eax,%eax
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return TRUE;
return FALSE;
}
10ea26: c9 leave <== NOT EXECUTED
10ea27: c3 ret <== NOT EXECUTED
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
10ea28: b0 01 mov $0x1,%al <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return TRUE;
return FALSE;
}
10ea2a: c9 leave <== NOT EXECUTED
10ea2b: c3 ret <== NOT EXECUTED
0010ea2c <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
10ea2c: 55 push %ebp
10ea2d: 89 e5 mov %esp,%ebp
10ea2f: 8b 55 08 mov 0x8(%ebp),%edx
10ea32: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( lhs->tv_sec < rhs->tv_sec )
10ea35: 8b 01 mov (%ecx),%eax
10ea37: 39 02 cmp %eax,(%edx)
10ea39: 7c 11 jl 10ea4c <_Timespec_Less_than+0x20>
return TRUE;
if ( lhs->tv_sec > rhs->tv_sec )
10ea3b: 7f 0b jg 10ea48 <_Timespec_Less_than+0x1c><== NEVER TAKEN
return FALSE;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
10ea3d: 8b 42 04 mov 0x4(%edx),%eax
10ea40: 3b 41 04 cmp 0x4(%ecx),%eax
10ea43: 0f 9c c0 setl %al
return TRUE;
return FALSE;
}
10ea46: c9 leave
10ea47: c3 ret
)
{
if ( lhs->tv_sec < rhs->tv_sec )
return TRUE;
if ( lhs->tv_sec > rhs->tv_sec )
10ea48: 31 c0 xor %eax,%eax
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return TRUE;
return FALSE;
}
10ea4a: c9 leave <== NOT EXECUTED
10ea4b: c3 ret <== NOT EXECUTED
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
10ea4c: b0 01 mov $0x1,%al
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return TRUE;
return FALSE;
}
10ea4e: c9 leave
10ea4f: c3 ret
0010f88c <_User_extensions_Add_API_set>:
*/
void _User_extensions_Add_API_set (
User_extensions_Control *the_extension
)
{
10f88c: 55 push %ebp
10f88d: 89 e5 mov %esp,%ebp
10f88f: 53 push %ebx
10f890: 83 ec 0c sub $0xc,%esp
10f893: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Append( &_User_extensions_List, &the_extension->Node );
10f896: 53 push %ebx
10f897: 68 ac e8 11 00 push $0x11e8ac
10f89c: e8 db b4 ff ff call 10ad7c <_Chain_Append>
/*
* If a switch handler is present, append it to the switch chain.
*/
if ( the_extension->Callouts.thread_switch != NULL ) {
10f8a1: 8b 43 24 mov 0x24(%ebx),%eax
10f8a4: 83 c4 10 add $0x10,%esp
10f8a7: 85 c0 test %eax,%eax
10f8a9: 74 17 je 10f8c2 <_User_extensions_Add_API_set+0x36><== NEVER TAKEN
the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch;
10f8ab: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Append(
10f8ae: 83 ec 08 sub $0x8,%esp
10f8b1: 8d 43 08 lea 0x8(%ebx),%eax
10f8b4: 50 push %eax
10f8b5: 68 5c e6 11 00 push $0x11e65c
10f8ba: e8 bd b4 ff ff call 10ad7c <_Chain_Append>
10f8bf: 83 c4 10 add $0x10,%esp
&_User_extensions_Switches_list, &the_extension->Switch.Node );
}
}
10f8c2: 8b 5d fc mov -0x4(%ebp),%ebx
10f8c5: c9 leave
10f8c6: c3 ret
0010f8c8 <_User_extensions_Add_set>:
void _User_extensions_Add_set (
User_extensions_Control *the_extension,
User_extensions_Table *extension_table
)
{
10f8c8: 55 push %ebp
10f8c9: 89 e5 mov %esp,%ebp
10f8cb: 57 push %edi
10f8cc: 56 push %esi
10f8cd: 53 push %ebx
10f8ce: 83 ec 14 sub $0x14,%esp
10f8d1: 8b 5d 08 mov 0x8(%ebp),%ebx
10f8d4: 8b 45 0c mov 0xc(%ebp),%eax
10f8d7: 89 45 ec mov %eax,-0x14(%ebp)
the_extension->Callouts = *extension_table;
10f8da: 8d 7b 14 lea 0x14(%ebx),%edi
10f8dd: b9 08 00 00 00 mov $0x8,%ecx
10f8e2: 89 c6 mov %eax,%esi
10f8e4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_User_extensions_List, &the_extension->Node );
10f8e6: 53 push %ebx
10f8e7: 68 ac e8 11 00 push $0x11e8ac
10f8ec: e8 8b b4 ff ff call 10ad7c <_Chain_Append>
/*
* If a switch handler is present, append it to the switch chain.
*/
if ( extension_table->thread_switch != NULL ) {
10f8f1: 8b 55 ec mov -0x14(%ebp),%edx
10f8f4: 8b 42 10 mov 0x10(%edx),%eax
10f8f7: 83 c4 10 add $0x10,%esp
10f8fa: 85 c0 test %eax,%eax
10f8fc: 74 1e je 10f91c <_User_extensions_Add_set+0x54>
the_extension->Switch.thread_switch = extension_table->thread_switch;
10f8fe: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Append(
10f901: 8d 43 08 lea 0x8(%ebx),%eax
10f904: 89 45 0c mov %eax,0xc(%ebp)
10f907: c7 45 08 5c e6 11 00 movl $0x11e65c,0x8(%ebp)
&_User_extensions_Switches_list,
&the_extension->Switch.Node
);
}
}
10f90e: 8d 65 f4 lea -0xc(%ebp),%esp
10f911: 5b pop %ebx
10f912: 5e pop %esi
10f913: 5f pop %edi
10f914: c9 leave
* If a switch handler is present, append it to the switch chain.
*/
if ( extension_table->thread_switch != NULL ) {
the_extension->Switch.thread_switch = extension_table->thread_switch;
_Chain_Append(
10f915: e9 62 b4 ff ff jmp 10ad7c <_Chain_Append>
10f91a: 66 90 xchg %ax,%ax
&_User_extensions_Switches_list,
&the_extension->Switch.Node
);
}
}
10f91c: 8d 65 f4 lea -0xc(%ebp),%esp
10f91f: 5b pop %ebx
10f920: 5e pop %esi
10f921: 5f pop %edi
10f922: c9 leave
10f923: c3 ret
0010d0ac <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
10d0ac: 55 push %ebp
10d0ad: 89 e5 mov %esp,%ebp
10d0af: 57 push %edi
10d0b0: 56 push %esi
10d0b1: 53 push %ebx
10d0b2: 83 ec 0c sub $0xc,%esp
10d0b5: 8b 7d 10 mov 0x10(%ebp),%edi
10d0b8: 8a 45 0c mov 0xc(%ebp),%al
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d0bb: 8b 1d b4 e8 11 00 mov 0x11e8b4,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d0c1: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d0c7: 74 20 je 10d0e9 <_User_extensions_Fatal+0x3d><== 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 );
10d0c9: 0f b6 f0 movzbl %al,%esi
!_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 )
10d0cc: 8b 43 30 mov 0x30(%ebx),%eax
10d0cf: 85 c0 test %eax,%eax
10d0d1: 74 0b je 10d0de <_User_extensions_Fatal+0x32>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10d0d3: 52 push %edx
10d0d4: 57 push %edi
10d0d5: 56 push %esi
10d0d6: ff 75 08 pushl 0x8(%ebp)
10d0d9: ff d0 call *%eax
10d0db: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10d0de: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d0e1: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d0e7: 75 e3 jne 10d0cc <_User_extensions_Fatal+0x20>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10d0e9: 8d 65 f4 lea -0xc(%ebp),%esp
10d0ec: 5b pop %ebx
10d0ed: 5e pop %esi
10d0ee: 5f pop %edi
10d0ef: c9 leave
10d0f0: c3 ret
0010cf90 <_User_extensions_Handler_initialization>:
void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
10cf90: 55 push %ebp
10cf91: 89 e5 mov %esp,%ebp
10cf93: 57 push %edi
10cf94: 56 push %esi
10cf95: 53 push %ebx
10cf96: 83 ec 0c sub $0xc,%esp
10cf99: 8b 75 0c mov 0xc(%ebp),%esi
10cf9c: c7 05 ac e8 11 00 b0 movl $0x11e8b0,0x11e8ac
10cfa3: e8 11 00
10cfa6: c7 05 b0 e8 11 00 00 movl $0x0,0x11e8b0
10cfad: 00 00 00
10cfb0: c7 05 b4 e8 11 00 ac movl $0x11e8ac,0x11e8b4
10cfb7: e8 11 00
10cfba: c7 05 5c e6 11 00 60 movl $0x11e660,0x11e65c
10cfc1: e6 11 00
10cfc4: c7 05 60 e6 11 00 00 movl $0x0,0x11e660
10cfcb: 00 00 00
10cfce: c7 05 64 e6 11 00 5c movl $0x11e65c,0x11e664
10cfd5: e6 11 00
uint32_t i;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10cfd8: 85 f6 test %esi,%esi
10cfda: 74 50 je 10d02c <_User_extensions_Handler_initialization+0x9c>
extension = (User_extensions_Control *)
10cfdc: 8b 55 08 mov 0x8(%ebp),%edx
10cfdf: 8d 04 52 lea (%edx,%edx,2),%eax
10cfe2: 8d 04 82 lea (%edx,%eax,4),%eax
10cfe5: 8d 1c 85 00 00 00 00 lea 0x0(,%eax,4),%ebx
10cfec: 83 ec 0c sub $0xc,%esp
10cfef: 53 push %ebx
10cff0: e8 43 04 00 00 call 10d438 <_Workspace_Allocate_or_fatal_error>
10cff5: 89 45 ec mov %eax,-0x14(%ebp)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10cff8: 31 c0 xor %eax,%eax
10cffa: 8b 7d ec mov -0x14(%ebp),%edi
10cffd: 89 d9 mov %ebx,%ecx
10cfff: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10d001: 83 c4 10 add $0x10,%esp
10d004: 8b 45 08 mov 0x8(%ebp),%eax
10d007: 85 c0 test %eax,%eax
10d009: 74 21 je 10d02c <_User_extensions_Handler_initialization+0x9c><== NEVER TAKEN
10d00b: 31 db xor %ebx,%ebx
10d00d: 8d 76 00 lea 0x0(%esi),%esi
_User_extensions_Add_set (extension, &initial_extensions[i]);
10d010: 83 ec 08 sub $0x8,%esp
10d013: 56 push %esi
10d014: ff 75 ec pushl -0x14(%ebp)
10d017: e8 ac 28 00 00 call 10f8c8 <_User_extensions_Add_set>
extension++;
10d01c: 83 45 ec 34 addl $0x34,-0x14(%ebp)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10d020: 43 inc %ebx
10d021: 83 c6 20 add $0x20,%esi
10d024: 83 c4 10 add $0x10,%esp
10d027: 39 5d 08 cmp %ebx,0x8(%ebp)
10d02a: 77 e4 ja 10d010 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set (extension, &initial_extensions[i]);
extension++;
}
}
}
10d02c: 8d 65 f4 lea -0xc(%ebp),%esp
10d02f: 5b pop %ebx
10d030: 5e pop %esi
10d031: 5f pop %edi
10d032: c9 leave
10d033: c3 ret
0010ec54 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10ec54: 55 push %ebp
10ec55: 89 e5 mov %esp,%ebp
10ec57: 53 push %ebx
10ec58: 83 ec 10 sub $0x10,%esp
10ec5b: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10ec5e: 53 push %ebx
10ec5f: e8 18 21 00 00 call 110d7c <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10ec64: 83 c4 10 add $0x10,%esp
10ec67: 8b 43 24 mov 0x24(%ebx),%eax
10ec6a: 85 c0 test %eax,%eax
10ec6c: 74 12 je 10ec80 <_User_extensions_Remove_set+0x2c><== ALWAYS TAKEN
_Chain_Extract( &the_extension->Switch.Node );
10ec6e: 8d 43 08 lea 0x8(%ebx),%eax <== NOT EXECUTED
10ec71: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
10ec74: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ec77: c9 leave <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10ec78: e9 ff 20 00 00 jmp 110d7c <_Chain_Extract> <== NOT EXECUTED
10ec7d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
10ec80: 8b 5d fc mov -0x4(%ebp),%ebx
10ec83: c9 leave
10ec84: c3 ret
0010d034 <_User_extensions_Thread_begin>:
*/
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10d034: 55 push %ebp
10d035: 89 e5 mov %esp,%ebp
10d037: 56 push %esi
10d038: 53 push %ebx
10d039: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10d03c: 8b 1d ac e8 11 00 mov 0x11e8ac,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d042: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d048: 74 1c je 10d066 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10d04a: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10d04c: 8b 43 28 mov 0x28(%ebx),%eax
10d04f: 85 c0 test %eax,%eax
10d051: 74 09 je 10d05c <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10d053: 83 ec 0c sub $0xc,%esp
10d056: 56 push %esi
10d057: ff d0 call *%eax
10d059: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10d05c: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d05e: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d064: 75 e6 jne 10d04c <_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 );
}
}
10d066: 8d 65 f8 lea -0x8(%ebp),%esp
10d069: 5b pop %ebx
10d06a: 5e pop %esi
10d06b: c9 leave
10d06c: c3 ret
0010d0f4 <_User_extensions_Thread_create>:
*/
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10d0f4: 55 push %ebp
10d0f5: 89 e5 mov %esp,%ebp
10d0f7: 56 push %esi
10d0f8: 53 push %ebx
10d0f9: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10d0fc: 8b 1d ac e8 11 00 mov 0x11e8ac,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d102: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d108: 74 26 je 10d130 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10d10a: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10d10c: 8b 43 14 mov 0x14(%ebx),%eax
10d10f: 85 c0 test %eax,%eax
10d111: 74 13 je 10d126 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10d113: 83 ec 08 sub $0x8,%esp
10d116: 56 push %esi
10d117: ff 35 1c e7 11 00 pushl 0x11e71c
10d11d: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10d11f: 83 c4 10 add $0x10,%esp
10d122: 84 c0 test %al,%al
10d124: 74 0c je 10d132 <_User_extensions_Thread_create+0x3e><== NEVER TAKEN
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10d126: 8b 1b mov (%ebx),%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d128: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d12e: 75 dc jne 10d10c <_User_extensions_Thread_create+0x18>
10d130: b0 01 mov $0x1,%al
return FALSE;
}
}
return TRUE;
}
10d132: 8d 65 f8 lea -0x8(%ebp),%esp
10d135: 5b pop %ebx
10d136: 5e pop %esi
10d137: c9 leave
10d138: c3 ret
0010d13c <_User_extensions_Thread_delete>:
*/
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10d13c: 55 push %ebp
10d13d: 89 e5 mov %esp,%ebp
10d13f: 56 push %esi
10d140: 53 push %ebx
10d141: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d144: 8b 1d b4 e8 11 00 mov 0x11e8b4,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d14a: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d150: 74 23 je 10d175 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10d152: 66 90 xchg %ax,%ax
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10d154: 8b 43 20 mov 0x20(%ebx),%eax
10d157: 85 c0 test %eax,%eax
10d159: 74 0f je 10d16a <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10d15b: 83 ec 08 sub $0x8,%esp
10d15e: 56 push %esi
10d15f: ff 35 1c e7 11 00 pushl 0x11e71c
10d165: ff d0 call *%eax
10d167: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10d16a: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d16d: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d173: 75 df jne 10d154 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10d175: 8d 65 f8 lea -0x8(%ebp),%esp
10d178: 5b pop %ebx
10d179: 5e pop %esi
10d17a: c9 leave
10d17b: c3 ret
0010d070 <_User_extensions_Thread_exitted>:
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10d070: 55 push %ebp
10d071: 89 e5 mov %esp,%ebp
10d073: 56 push %esi
10d074: 53 push %ebx
10d075: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10d078: 8b 1d b4 e8 11 00 mov 0x11e8b4,%ebx
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d07e: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d084: 74 1d je 10d0a3 <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10d086: 66 90 xchg %ax,%ax
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10d088: 8b 43 2c mov 0x2c(%ebx),%eax
10d08b: 85 c0 test %eax,%eax
10d08d: 74 09 je 10d098 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10d08f: 83 ec 0c sub $0xc,%esp
10d092: 56 push %esi
10d093: ff d0 call *%eax
10d095: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10d098: 8b 5b 04 mov 0x4(%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
10d09b: 81 fb ac e8 11 00 cmp $0x11e8ac,%ebx
10d0a1: 75 e5 jne 10d088 <_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 );
}
}
10d0a3: 8d 65 f8 lea -0x8(%ebp),%esp
10d0a6: 5b pop %ebx
10d0a7: 5e pop %esi
10d0a8: c9 leave
10d0a9: c3 ret
0010dc48 <_User_extensions_Thread_restart>:
*/
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10dc48: 55 push %ebp
10dc49: 89 e5 mov %esp,%ebp
10dc4b: 56 push %esi
10dc4c: 53 push %ebx
10dc4d: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10dc50: 8b 1d 0c 19 12 00 mov 0x12190c,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10dc56: 81 fb 10 19 12 00 cmp $0x121910,%ebx
10dc5c: 74 22 je 10dc80 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10dc5e: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10dc60: 8b 43 1c mov 0x1c(%ebx),%eax
10dc63: 85 c0 test %eax,%eax
10dc65: 74 0f je 10dc76 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10dc67: 83 ec 08 sub $0x8,%esp
10dc6a: 56 push %esi
10dc6b: ff 35 7c 17 12 00 pushl 0x12177c
10dc71: ff d0 call *%eax
10dc73: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10dc76: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10dc78: 81 fb 10 19 12 00 cmp $0x121910,%ebx
10dc7e: 75 e0 jne 10dc60 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10dc80: 8d 65 f8 lea -0x8(%ebp),%esp
10dc83: 5b pop %ebx
10dc84: 5e pop %esi
10dc85: c9 leave
10dc86: c3 ret
0010d17c <_User_extensions_Thread_start>:
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10d17c: 55 push %ebp
10d17d: 89 e5 mov %esp,%ebp
10d17f: 56 push %esi
10d180: 53 push %ebx
10d181: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10d184: 8b 1d ac e8 11 00 mov 0x11e8ac,%ebx
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d18a: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d190: 74 22 je 10d1b4 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10d192: 66 90 xchg %ax,%ax
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10d194: 8b 43 18 mov 0x18(%ebx),%eax
10d197: 85 c0 test %eax,%eax
10d199: 74 0f je 10d1aa <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10d19b: 83 ec 08 sub $0x8,%esp
10d19e: 56 push %esi
10d19f: ff 35 1c e7 11 00 pushl 0x11e71c
10d1a5: ff d0 call *%eax
10d1a7: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10d1aa: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
10d1ac: 81 fb b0 e8 11 00 cmp $0x11e8b0,%ebx
10d1b2: 75 e0 jne 10d194 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10d1b4: 8d 65 f8 lea -0x8(%ebp),%esp
10d1b7: 5b pop %ebx
10d1b8: 5e pop %esi
10d1b9: c9 leave
10d1ba: c3 ret
0010d1bc <_User_extensions_Thread_switch>:
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10d1bc: 55 push %ebp
10d1bd: 89 e5 mov %esp,%ebp
10d1bf: 57 push %edi
10d1c0: 56 push %esi
10d1c1: 53 push %ebx
10d1c2: 83 ec 0c sub $0xc,%esp
10d1c5: 8b 7d 08 mov 0x8(%ebp),%edi
10d1c8: 8b 75 0c mov 0xc(%ebp),%esi
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10d1cb: 8b 1d 5c e6 11 00 mov 0x11e65c,%ebx
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
10d1d1: 81 fb 60 e6 11 00 cmp $0x11e660,%ebx
10d1d7: 74 18 je 10d1f1 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10d1d9: 8d 76 00 lea 0x0(%esi),%esi
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10d1dc: 83 ec 08 sub $0x8,%esp
10d1df: 56 push %esi
10d1e0: 57 push %edi
10d1e1: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10d1e4: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
10d1e6: 83 c4 10 add $0x10,%esp
10d1e9: 81 fb 60 e6 11 00 cmp $0x11e660,%ebx
10d1ef: 75 eb jne 10d1dc <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10d1f1: 8d 65 f4 lea -0xc(%ebp),%esp
10d1f4: 5b pop %ebx
10d1f5: 5e pop %esi
10d1f6: 5f pop %edi
10d1f7: c9 leave
10d1f8: c3 ret
0010e9a4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10e9a4: 55 push %ebp
10e9a5: 89 e5 mov %esp,%ebp
10e9a7: 57 push %edi
10e9a8: 56 push %esi
10e9a9: 53 push %ebx
10e9aa: 83 ec 0c sub $0xc,%esp
10e9ad: 8b 7d 08 mov 0x8(%ebp),%edi
10e9b0: 8b 4d 0c mov 0xc(%ebp),%ecx
10e9b3: 8b 75 10 mov 0x10(%ebp),%esi
ISR_Level level;
_ISR_Disable( level );
10e9b6: 9c pushf
10e9b7: fa cli
10e9b8: 5a pop %edx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10e9b9: 8b 07 mov (%edi),%eax
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10e9bb: 8d 5f 04 lea 0x4(%edi),%ebx
10e9be: 89 5d f0 mov %ebx,-0x10(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10e9c1: 39 d8 cmp %ebx,%eax
10e9c3: 74 3f je 10ea04 <_Watchdog_Adjust+0x60>
switch ( direction ) {
10e9c5: 85 c9 test %ecx,%ecx
10e9c7: 75 47 jne 10ea10 <_Watchdog_Adjust+0x6c>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e9c9: 85 f6 test %esi,%esi
10e9cb: 74 37 je 10ea04 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10e9cd: 8b 58 10 mov 0x10(%eax),%ebx
10e9d0: 39 de cmp %ebx,%esi
10e9d2: 73 0f jae 10e9e3 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
10e9d4: eb 42 jmp 10ea18 <_Watchdog_Adjust+0x74> <== NOT EXECUTED
10e9d6: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10e9d8: 29 de sub %ebx,%esi
10e9da: 74 28 je 10ea04 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
10e9dc: 8b 58 10 mov 0x10(%eax),%ebx
10e9df: 39 f3 cmp %esi,%ebx
10e9e1: 77 35 ja 10ea18 <_Watchdog_Adjust+0x74>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10e9e3: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
_ISR_Enable( level );
10e9ea: 52 push %edx
10e9eb: 9d popf
_Watchdog_Tickle( header );
10e9ec: 83 ec 0c sub $0xc,%esp
10e9ef: 57 push %edi
10e9f0: e8 c7 01 00 00 call 10ebbc <_Watchdog_Tickle>
_ISR_Disable( level );
10e9f5: 9c pushf
10e9f6: fa cli
10e9f7: 5a pop %edx
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10e9f8: 8b 07 mov (%edi),%eax
if ( _Chain_Is_empty( header ) )
10e9fa: 83 c4 10 add $0x10,%esp
10e9fd: 39 45 f0 cmp %eax,-0x10(%ebp)
10ea00: 75 d6 jne 10e9d8 <_Watchdog_Adjust+0x34>
10ea02: 66 90 xchg %ax,%ax
}
break;
}
}
_ISR_Enable( level );
10ea04: 52 push %edx
10ea05: 9d popf
}
10ea06: 8d 65 f4 lea -0xc(%ebp),%esp
10ea09: 5b pop %ebx
10ea0a: 5e pop %esi
10ea0b: 5f pop %edi
10ea0c: c9 leave
10ea0d: c3 ret
10ea0e: 66 90 xchg %ax,%ax
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
10ea10: 49 dec %ecx
10ea11: 75 f1 jne 10ea04 <_Watchdog_Adjust+0x60> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10ea13: 01 70 10 add %esi,0x10(%eax)
10ea16: eb ec jmp 10ea04 <_Watchdog_Adjust+0x60>
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
10ea18: 29 f3 sub %esi,%ebx
10ea1a: 89 58 10 mov %ebx,0x10(%eax)
10ea1d: eb e5 jmp 10ea04 <_Watchdog_Adjust+0x60>
00118658 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
118658: 55 push %ebp
118659: 89 e5 mov %esp,%ebp
11865b: 57 push %edi
11865c: 56 push %esi
11865d: 53 push %ebx
11865e: 83 ec 0c sub $0xc,%esp
118661: 8b 5d 08 mov 0x8(%ebp),%ebx
118664: 8b 7d 10 mov 0x10(%ebp),%edi
Watchdog_Interval units = units_arg;
ISR_Level level;
Chain_Node *node;
if ( !units ) {
118667: 8b 45 0c mov 0xc(%ebp),%eax
11866a: 85 c0 test %eax,%eax
11866c: 74 6a je 1186d8 <_Watchdog_Adjust_to_chain+0x80>
return;
}
_ISR_Disable( level );
11866e: 9c pushf
11866f: fa cli
118670: 8f 45 ec popl -0x14(%ebp)
118673: 8b 13 mov (%ebx),%edx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
118675: 8d 4b 04 lea 0x4(%ebx),%ecx
if ( !_Chain_Is_empty( header ) ) {
118678: 39 ca cmp %ecx,%edx
11867a: 74 58 je 1186d4 <_Watchdog_Adjust_to_chain+0x7c>
11867c: 8b 72 10 mov 0x10(%edx),%esi
11867f: 8d 47 04 lea 0x4(%edi),%eax
118682: 89 45 f0 mov %eax,-0x10(%ebp)
118685: 8b 45 0c mov 0xc(%ebp),%eax
118688: 89 45 e8 mov %eax,-0x18(%ebp)
11868b: 90 nop
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
11868c: 3b 75 e8 cmp -0x18(%ebp),%esi
11868f: 77 3c ja 1186cd <_Watchdog_Adjust_to_chain+0x75>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 0;
118691: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
118698: eb 2b jmp 1186c5 <_Watchdog_Adjust_to_chain+0x6d>
11869a: 66 90 xchg %ax,%ax
11869c: 8b 02 mov (%edx),%eax
11869e: 89 03 mov %eax,(%ebx)
1186a0: 89 58 04 mov %ebx,0x4(%eax)
1186a3: 8b 45 f0 mov -0x10(%ebp),%eax
1186a6: 89 02 mov %eax,(%edx)
1186a8: 8b 47 08 mov 0x8(%edi),%eax
1186ab: 89 57 08 mov %edx,0x8(%edi)
1186ae: 89 10 mov %edx,(%eax)
1186b0: 89 42 04 mov %eax,0x4(%edx)
do {
node = _Chain_Get_unprotected( header );
_Chain_Append_unprotected( to_fire, node );
_ISR_Flash( level );
1186b3: ff 75 ec pushl -0x14(%ebp)
1186b6: 9d popf
1186b7: fa cli
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
1186b8: 8b 13 mov (%ebx),%edx
} while ( !_Chain_Is_empty( header ) &&
_Watchdog_First( header )->delta_interval == 0 );
1186ba: 39 d1 cmp %edx,%ecx
1186bc: 74 16 je 1186d4 <_Watchdog_Adjust_to_chain+0x7c>
1186be: 8b 42 10 mov 0x10(%edx),%eax
1186c1: 85 c0 test %eax,%eax
1186c3: 75 1b jne 1186e0 <_Watchdog_Adjust_to_chain+0x88>
1186c5: 39 d1 cmp %edx,%ecx
1186c7: 75 d3 jne 11869c <_Watchdog_Adjust_to_chain+0x44><== ALWAYS TAKEN
1186c9: 31 d2 xor %edx,%edx <== NOT EXECUTED
1186cb: eb d6 jmp 1186a3 <_Watchdog_Adjust_to_chain+0x4b><== NOT EXECUTED
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
1186cd: 2b 75 e8 sub -0x18(%ebp),%esi
1186d0: 89 72 10 mov %esi,0x10(%edx)
1186d3: 90 nop
break;
}
}
}
_ISR_Enable( level );
1186d4: ff 75 ec pushl -0x14(%ebp)
1186d7: 9d popf
}
1186d8: 83 c4 0c add $0xc,%esp
1186db: 5b pop %ebx
1186dc: 5e pop %esi
1186dd: 5f pop %edi
1186de: c9 leave
1186df: c3 ret
return;
}
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
1186e0: 29 75 e8 sub %esi,-0x18(%ebp)
1186e3: 74 ef je 1186d4 <_Watchdog_Adjust_to_chain+0x7c><== ALWAYS TAKEN
1186e5: 89 c6 mov %eax,%esi <== NOT EXECUTED
1186e7: eb a3 jmp 11868c <_Watchdog_Adjust_to_chain+0x34><== NOT EXECUTED
0010d1fc <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10d1fc: 55 push %ebp
10d1fd: 89 e5 mov %esp,%ebp
10d1ff: 57 push %edi
10d200: 56 push %esi
10d201: 53 push %ebx
10d202: 83 ec 04 sub $0x4,%esp
10d205: 8b 75 0c mov 0xc(%ebp),%esi
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10d208: 8b 3d f8 e6 11 00 mov 0x11e6f8,%edi
_ISR_Disable( level );
10d20e: 9c pushf
10d20f: fa cli
10d210: 8f 45 f0 popl -0x10(%ebp)
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
10d213: 8b 46 08 mov 0x8(%esi),%eax
10d216: 85 c0 test %eax,%eax
10d218: 75 72 jne 10d28c <_Watchdog_Insert+0x90> <== NEVER TAKEN
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10d21a: c7 46 08 01 00 00 00 movl $0x1,0x8(%esi)
_Watchdog_Sync_count++;
10d221: a1 c0 e7 11 00 mov 0x11e7c0,%eax
10d226: 40 inc %eax
10d227: a3 c0 e7 11 00 mov %eax,0x11e7c0
restart:
delta_interval = the_watchdog->initial;
10d22c: 8b 5e 0c mov 0xc(%esi),%ebx
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
10d22f: 8b 45 08 mov 0x8(%ebp),%eax
10d232: 8b 08 mov (%eax),%ecx
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10d234: 85 db test %ebx,%ebx
10d236: 74 65 je 10d29d <_Watchdog_Insert+0xa1> <== NEVER TAKEN
10d238: 8b 01 mov (%ecx),%eax
10d23a: 85 c0 test %eax,%eax
10d23c: 74 5f je 10d29d <_Watchdog_Insert+0xa1>
break;
if ( delta_interval < after->delta_interval ) {
10d23e: 8b 51 10 mov 0x10(%ecx),%edx
10d241: 39 d3 cmp %edx,%ebx
10d243: 73 21 jae 10d266 <_Watchdog_Insert+0x6a>
10d245: eb 51 jmp 10d298 <_Watchdog_Insert+0x9c>
10d247: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10d248: a1 18 e7 11 00 mov 0x11e718,%eax
10d24d: 39 c7 cmp %eax,%edi
10d24f: 72 6f jb 10d2c0 <_Watchdog_Insert+0xc4>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10d251: 29 d3 sub %edx,%ebx
);
#ifdef __cplusplus
}
#endif
10d253: 8b 09 mov (%ecx),%ecx
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10d255: 85 db test %ebx,%ebx
10d257: 74 44 je 10d29d <_Watchdog_Insert+0xa1>
10d259: 8b 11 mov (%ecx),%edx
10d25b: 85 d2 test %edx,%edx
10d25d: 74 3e je 10d29d <_Watchdog_Insert+0xa1>
break;
if ( delta_interval < after->delta_interval ) {
10d25f: 8b 51 10 mov 0x10(%ecx),%edx
10d262: 39 da cmp %ebx,%edx
10d264: 77 32 ja 10d298 <_Watchdog_Insert+0x9c>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
10d266: ff 75 f0 pushl -0x10(%ebp)
10d269: 9d popf
10d26a: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10d26b: 83 7e 08 01 cmpl $0x1,0x8(%esi)
10d26f: 74 d7 je 10d248 <_Watchdog_Insert+0x4c> <== ALWAYS TAKEN
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
10d271: 89 3d 18 e7 11 00 mov %edi,0x11e718
_Watchdog_Sync_count--;
10d277: a1 c0 e7 11 00 mov 0x11e7c0,%eax
10d27c: 48 dec %eax
10d27d: a3 c0 e7 11 00 mov %eax,0x11e7c0
_ISR_Enable( level );
10d282: ff 75 f0 pushl -0x10(%ebp)
10d285: 9d popf
}
10d286: 58 pop %eax
10d287: 5b pop %ebx
10d288: 5e pop %esi
10d289: 5f pop %edi
10d28a: c9 leave
10d28b: c3 ret
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10d28c: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED
10d28f: 9d popf <== NOT EXECUTED
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10d290: 58 pop %eax <== NOT EXECUTED
10d291: 5b pop %ebx <== NOT EXECUTED
10d292: 5e pop %esi <== NOT EXECUTED
10d293: 5f pop %edi <== NOT EXECUTED
10d294: c9 leave <== NOT EXECUTED
10d295: c3 ret <== NOT EXECUTED
10d296: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10d298: 29 da sub %ebx,%edx
10d29a: 89 51 10 mov %edx,0x10(%ecx)
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
10d29d: c7 46 08 02 00 00 00 movl $0x2,0x8(%esi)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10d2a4: 89 5e 10 mov %ebx,0x10(%esi)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10d2a7: 8b 41 04 mov 0x4(%ecx),%eax
10d2aa: 89 46 04 mov %eax,0x4(%esi)
10d2ad: 8b 10 mov (%eax),%edx
10d2af: 89 30 mov %esi,(%eax)
10d2b1: 89 16 mov %edx,(%esi)
10d2b3: 89 72 04 mov %esi,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10d2b6: a1 c4 e7 11 00 mov 0x11e7c4,%eax
10d2bb: 89 46 14 mov %eax,0x14(%esi)
10d2be: eb b1 jmp 10d271 <_Watchdog_Insert+0x75>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10d2c0: 89 3d 18 e7 11 00 mov %edi,0x11e718
10d2c6: e9 61 ff ff ff jmp 10d22c <_Watchdog_Insert+0x30>
0010d32c <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10d32c: 55 push %ebp
10d32d: 89 e5 mov %esp,%ebp
10d32f: 56 push %esi
10d330: 53 push %ebx
10d331: 8b 4d 08 mov 0x8(%ebp),%ecx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10d334: 9c pushf
10d335: fa cli
10d336: 5e pop %esi
previous_state = the_watchdog->state;
10d337: 8b 59 08 mov 0x8(%ecx),%ebx
switch ( previous_state ) {
10d33a: 83 fb 01 cmp $0x1,%ebx
10d33d: 74 4d je 10d38c <_Watchdog_Remove+0x60> <== NEVER TAKEN
10d33f: 73 13 jae 10d354 <_Watchdog_Remove+0x28>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10d341: a1 c4 e7 11 00 mov 0x11e7c4,%eax
10d346: 89 41 18 mov %eax,0x18(%ecx)
_ISR_Enable( level );
10d349: 56 push %esi
10d34a: 9d popf
return( previous_state );
}
10d34b: 89 d8 mov %ebx,%eax
10d34d: 5b pop %ebx
10d34e: 5e pop %esi
10d34f: c9 leave
10d350: c3 ret
10d351: 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 ) {
10d354: 83 fb 03 cmp $0x3,%ebx
10d357: 77 e8 ja 10d341 <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10d359: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx)
);
#ifdef __cplusplus
}
#endif
10d360: 8b 11 mov (%ecx),%edx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10d362: 8b 02 mov (%edx),%eax
10d364: 85 c0 test %eax,%eax
10d366: 74 06 je 10d36e <_Watchdog_Remove+0x42>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10d368: 8b 41 10 mov 0x10(%ecx),%eax
10d36b: 01 42 10 add %eax,0x10(%edx)
if ( _Watchdog_Sync_count )
10d36e: a1 c0 e7 11 00 mov 0x11e7c0,%eax
10d373: 85 c0 test %eax,%eax
10d375: 74 0a je 10d381 <_Watchdog_Remove+0x55> <== ALWAYS TAKEN
_Watchdog_Sync_level = _ISR_Nest_level;
10d377: a1 f8 e6 11 00 mov 0x11e6f8,%eax <== NOT EXECUTED
10d37c: a3 18 e7 11 00 mov %eax,0x11e718 <== NOT EXECUTED
10d381: 8b 41 04 mov 0x4(%ecx),%eax
10d384: 89 42 04 mov %eax,0x4(%edx)
10d387: 89 10 mov %edx,(%eax)
10d389: eb b6 jmp 10d341 <_Watchdog_Remove+0x15>
10d38b: 90 nop
/*
* 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;
10d38c: c7 41 08 00 00 00 00 movl $0x0,0x8(%ecx) <== NOT EXECUTED
10d393: eb ac jmp 10d341 <_Watchdog_Remove+0x15> <== NOT EXECUTED
0010d398 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10d398: 55 push %ebp
10d399: 89 e5 mov %esp,%ebp
10d39b: 57 push %edi
10d39c: 56 push %esi
10d39d: 53 push %ebx
10d39e: 83 ec 0c sub $0xc,%esp
10d3a1: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10d3a4: 9c pushf
10d3a5: fa cli
10d3a6: 5e pop %esi
* to obtain the size of
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
10d3a7: 8b 17 mov (%edi),%edx
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
10d3a9: 8d 47 04 lea 0x4(%edi),%eax
10d3ac: 89 45 f0 mov %eax,-0x10(%ebp)
if ( _Chain_Is_empty( header ) )
10d3af: 39 c2 cmp %eax,%edx
10d3b1: 74 11 je 10d3c4 <_Watchdog_Tickle+0x2c>
10d3b3: 89 d3 mov %edx,%ebx
* 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) {
10d3b5: 8b 42 10 mov 0x10(%edx),%eax
10d3b8: 85 c0 test %eax,%eax
10d3ba: 74 34 je 10d3f0 <_Watchdog_Tickle+0x58> <== NEVER TAKEN
the_watchdog->delta_interval--;
10d3bc: 48 dec %eax
10d3bd: 89 42 10 mov %eax,0x10(%edx)
if ( the_watchdog->delta_interval != 0 )
10d3c0: 85 c0 test %eax,%eax
10d3c2: 74 2c je 10d3f0 <_Watchdog_Tickle+0x58>
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10d3c4: 56 push %esi
10d3c5: 9d popf
}
10d3c6: 8d 65 f4 lea -0xc(%ebp),%esp
10d3c9: 5b pop %ebx
10d3ca: 5e pop %esi
10d3cb: 5f pop %edi
10d3cc: c9 leave
10d3cd: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10d3ce: 83 ec 08 sub $0x8,%esp
10d3d1: ff 73 24 pushl 0x24(%ebx)
10d3d4: ff 73 20 pushl 0x20(%ebx)
10d3d7: ff 53 1c call *0x1c(%ebx)
10d3da: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10d3dd: 9c pushf
10d3de: fa cli
10d3df: 5e pop %esi
10d3e0: 8b 07 mov (%edi),%eax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10d3e2: 39 45 f0 cmp %eax,-0x10(%ebp)
10d3e5: 74 dd je 10d3c4 <_Watchdog_Tickle+0x2c>
10d3e7: 89 c3 mov %eax,%ebx
10d3e9: 8b 40 10 mov 0x10(%eax),%eax
10d3ec: 85 c0 test %eax,%eax
10d3ee: 75 d4 jne 10d3c4 <_Watchdog_Tickle+0x2c>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10d3f0: 83 ec 0c sub $0xc,%esp
10d3f3: 53 push %ebx
10d3f4: e8 33 ff ff ff call 10d32c <_Watchdog_Remove>
_ISR_Enable( level );
10d3f9: 56 push %esi
10d3fa: 9d popf
switch( watchdog_state ) {
10d3fb: 83 c4 10 add $0x10,%esp
10d3fe: 83 f8 02 cmp $0x2,%eax
10d401: 75 da jne 10d3dd <_Watchdog_Tickle+0x45> <== NEVER TAKEN
10d403: eb c9 jmp 10d3ce <_Watchdog_Tickle+0x36>
0010d460 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
10d460: 55 push %ebp
10d461: 89 e5 mov %esp,%ebp
10d463: 57 push %edi
10d464: 83 ec 04 sub $0x4,%esp
10d467: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
10d46a: 85 d2 test %edx,%edx
10d46c: 74 2e je 10d49c <_Workspace_Handler_initialization+0x3c>
10d46e: f6 c2 03 test $0x3,%dl
10d471: 75 29 jne 10d49c <_Workspace_Handler_initialization+0x3c><== NEVER TAKEN
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
10d473: a1 f4 e6 11 00 mov 0x11e6f4,%eax
10d478: 80 78 28 00 cmpb $0x0,0x28(%eax)
10d47c: 75 2a jne 10d4a8 <_Workspace_Handler_initialization+0x48><== NEVER TAKEN
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10d47e: 6a 04 push $0x4
10d480: ff 75 0c pushl 0xc(%ebp)
10d483: 52 push %edx
10d484: 68 80 e6 11 00 push $0x11e680
10d489: e8 aa de ff ff call 10b338 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10d48e: 83 c4 10 add $0x10,%esp
10d491: 85 c0 test %eax,%eax
10d493: 74 1e je 10d4b3 <_Workspace_Handler_initialization+0x53><== NEVER TAKEN
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10d495: 8b 7d fc mov -0x4(%ebp),%edi
10d498: c9 leave
10d499: c3 ret
10d49a: 66 90 xchg %ax,%ax
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
10d49c: 51 push %ecx
10d49d: 6a 02 push $0x2
10d49f: 6a 01 push $0x1
10d4a1: 6a 00 push $0x0
10d4a3: e8 78 e0 ff ff call 10b520 <_Internal_error_Occurred>
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
10d4a8: 31 c0 xor %eax,%eax
10d4aa: 89 d7 mov %edx,%edi <== NOT EXECUTED
10d4ac: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED
10d4af: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED
10d4b1: eb cb jmp 10d47e <_Workspace_Handler_initialization+0x1e><== NOT EXECUTED
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10d4b3: 52 push %edx <== NOT EXECUTED
10d4b4: 6a 03 push $0x3 <== NOT EXECUTED
10d4b6: 6a 01 push $0x1 <== NOT EXECUTED
10d4b8: 6a 00 push $0x0 <== NOT EXECUTED
10d4ba: e8 61 e0 ff ff call 10b520 <_Internal_error_Occurred><== NOT EXECUTED
0010a78c <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
10a78c: 55 push %ebp
10a78d: 89 e5 mov %esp,%ebp
10a78f: 56 push %esi
10a790: 53 push %ebx
10a791: 83 ec 10 sub $0x10,%esp
10a794: 8b 75 08 mov 0x8(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
10a797: 85 f6 test %esi,%esi
10a799: 0f 84 8d 00 00 00 je 10a82c <rtems_barrier_create+0xa0><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
10a79f: 8b 55 14 mov 0x14(%ebp),%edx
10a7a2: 85 d2 test %edx,%edx
10a7a4: 0f 84 ba 00 00 00 je 10a864 <rtems_barrier_create+0xd8><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
10a7aa: f6 45 0c 10 testb $0x10,0xc(%ebp)
10a7ae: 0f 84 84 00 00 00 je 10a838 <rtems_barrier_create+0xac>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
10a7b4: 8b 45 10 mov 0x10(%ebp),%eax
10a7b7: 85 c0 test %eax,%eax
10a7b9: 0f 84 85 00 00 00 je 10a844 <rtems_barrier_create+0xb8>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10a7bf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
10a7c6: 8b 45 10 mov 0x10(%ebp),%eax
10a7c9: 89 45 f4 mov %eax,-0xc(%ebp)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a7cc: a1 f8 16 12 00 mov 0x1216f8,%eax
10a7d1: 40 inc %eax
10a7d2: a3 f8 16 12 00 mov %eax,0x1216f8
#ifdef __cplusplus
extern "C" {
#endif
/**
10a7d7: 83 ec 0c sub $0xc,%esp
10a7da: 68 00 16 12 00 push $0x121600
10a7df: e8 50 1d 00 00 call 10c534 <_Objects_Allocate>
10a7e4: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
10a7e6: 83 c4 10 add $0x10,%esp
10a7e9: 85 c0 test %eax,%eax
10a7eb: 74 63 je 10a850 <rtems_barrier_create+0xc4>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
10a7ed: 8b 45 0c mov 0xc(%ebp),%eax
10a7f0: 89 43 10 mov %eax,0x10(%ebx)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10a7f3: 83 ec 08 sub $0x8,%esp
10a7f6: 8d 45 f0 lea -0x10(%ebp),%eax
10a7f9: 50 push %eax
10a7fa: 8d 43 14 lea 0x14(%ebx),%eax
10a7fd: 50 push %eax
10a7fe: e8 5d 14 00 00 call 10bc60 <_CORE_barrier_Initialize>
10a803: 8b 4b 08 mov 0x8(%ebx),%ecx
10a806: 0f b7 d1 movzwl %cx,%edx
10a809: a1 1c 16 12 00 mov 0x12161c,%eax
10a80e: 89 1c 90 mov %ebx,(%eax,%edx,4)
10a811: 89 73 0c mov %esi,0xc(%ebx)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
10a814: 8b 45 14 mov 0x14(%ebp),%eax
10a817: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10a819: e8 4e 2a 00 00 call 10d26c <_Thread_Enable_dispatch>
10a81e: 31 c0 xor %eax,%eax
10a820: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10a823: 8d 65 f8 lea -0x8(%ebp),%esp
10a826: 5b pop %ebx
10a827: 5e pop %esi
10a828: c9 leave
10a829: c3 ret
10a82a: 66 90 xchg %ax,%ax
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
10a82c: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a831: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a834: 5b pop %ebx <== NOT EXECUTED
10a835: 5e pop %esi <== NOT EXECUTED
10a836: c9 leave <== NOT EXECUTED
10a837: c3 ret <== NOT EXECUTED
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
10a838: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
10a83f: eb 85 jmp 10a7c6 <rtems_barrier_create+0x3a>
10a841: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
10a844: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a849: 8d 65 f8 lea -0x8(%ebp),%esp
10a84c: 5b pop %ebx
10a84d: 5e pop %esi
10a84e: c9 leave
10a84f: c3 ret
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10a850: e8 17 2a 00 00 call 10d26c <_Thread_Enable_dispatch>
10a855: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a85a: 8d 65 f8 lea -0x8(%ebp),%esp
10a85d: 5b pop %ebx
10a85e: 5e pop %esi
10a85f: c9 leave
10a860: c3 ret
10a861: 8d 76 00 lea 0x0(%esi),%esi
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10a864: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a869: eb b8 jmp 10a823 <rtems_barrier_create+0x97><== NOT EXECUTED
0010a8f8 <rtems_barrier_release>:
rtems_status_code rtems_barrier_release(
rtems_id id,
uint32_t *released
)
{
10a8f8: 55 push %ebp
10a8f9: 89 e5 mov %esp,%ebp
10a8fb: 56 push %esi
10a8fc: 53 push %ebx
10a8fd: 83 ec 10 sub $0x10,%esp
10a900: 8b 5d 08 mov 0x8(%ebp),%ebx
10a903: 8b 75 0c mov 0xc(%ebp),%esi
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
10a906: 85 f6 test %esi,%esi
10a908: 74 46 je 10a950 <rtems_barrier_release+0x58><== NEVER TAKEN
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a90a: 50 push %eax
10a90b: 8d 45 f4 lea -0xc(%ebp),%eax
10a90e: 50 push %eax
10a90f: 53 push %ebx
10a910: 68 00 16 12 00 push $0x121600
10a915: e8 0e 21 00 00 call 10ca28 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
10a91a: 83 c4 10 add $0x10,%esp
10a91d: 8b 4d f4 mov -0xc(%ebp),%ecx
10a920: 85 c9 test %ecx,%ecx
10a922: 74 0c je 10a930 <rtems_barrier_release+0x38>
10a924: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a929: 8d 65 f8 lea -0x8(%ebp),%esp
10a92c: 5b pop %ebx
10a92d: 5e pop %esi
10a92e: c9 leave
10a92f: c3 ret
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
10a930: 52 push %edx
10a931: 6a 00 push $0x0
10a933: 53 push %ebx
10a934: 83 c0 14 add $0x14,%eax
10a937: 50 push %eax
10a938: e8 57 13 00 00 call 10bc94 <_CORE_barrier_Release>
10a93d: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10a93f: e8 28 29 00 00 call 10d26c <_Thread_Enable_dispatch>
10a944: 31 c0 xor %eax,%eax
10a946: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a949: 8d 65 f8 lea -0x8(%ebp),%esp
10a94c: 5b pop %ebx
10a94d: 5e pop %esi
10a94e: c9 leave
10a94f: c3 ret
)
{
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
10a950: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a955: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a958: 5b pop %ebx <== NOT EXECUTED
10a959: 5e pop %esi <== NOT EXECUTED
10a95a: c9 leave <== NOT EXECUTED
10a95b: c3 ret <== NOT EXECUTED
00109b10 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
109b10: 55 push %ebp
109b11: 89 e5 mov %esp,%ebp
109b13: 53 push %ebx
109b14: 83 ec 04 sub $0x4,%esp
109b17: 8b 45 08 mov 0x8(%ebp),%eax
109b1a: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
109b1d: 85 db test %ebx,%ebx
109b1f: 74 5b je 109b7c <rtems_clock_get+0x6c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
109b21: 83 f8 04 cmp $0x4,%eax
109b24: 76 0a jbe 109b30 <rtems_clock_get+0x20>
109b26: b8 0a 00 00 00 mov $0xa,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b2b: 5a pop %edx
109b2c: 5b pop %ebx
109b2d: c9 leave
109b2e: c3 ret
109b2f: 90 nop
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
109b30: ff 24 85 c8 85 11 00 jmp *0x1185c8(,%eax,4)
109b37: 90 nop
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
109b38: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b3b: 59 pop %ecx
109b3c: 5b pop %ebx
109b3d: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
109b3e: e9 3d 01 00 00 jmp 109c80 <rtems_clock_get_tod_timeval>
109b43: 90 nop
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
109b44: e8 6b 00 00 00 call 109bb4 <rtems_clock_get_ticks_per_second>
109b49: 89 03 mov %eax,(%ebx)
109b4b: 31 c0 xor %eax,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b4d: 5a pop %edx
109b4e: 5b pop %ebx
109b4f: c9 leave
109b50: c3 ret
109b51: 8d 76 00 lea 0x0(%esi),%esi
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
109b54: e8 6f 00 00 00 call 109bc8 <rtems_clock_get_ticks_since_boot>
109b59: 89 03 mov %eax,(%ebx)
109b5b: 31 c0 xor %eax,%eax
break;
}
return RTEMS_INVALID_NUMBER;
}
109b5d: 5a pop %edx
109b5e: 5b pop %ebx
109b5f: c9 leave
109b60: c3 ret
109b61: 8d 76 00 lea 0x0(%esi),%esi
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
109b64: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b67: 5b pop %ebx
109b68: 5b pop %ebx
109b69: c9 leave
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
109b6a: e9 15 00 00 00 jmp 109b84 <rtems_clock_get_seconds_since_epoch>
109b6f: 90 nop
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
109b70: 89 5d 08 mov %ebx,0x8(%ebp)
break;
}
return RTEMS_INVALID_NUMBER;
}
109b73: 58 pop %eax
109b74: 5b pop %ebx
109b75: c9 leave
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
109b76: e9 59 00 00 00 jmp 109bd4 <rtems_clock_get_tod>
109b7b: 90 nop
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
109b7c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109b81: eb a8 jmp 109b2b <rtems_clock_get+0x1b> <== NOT EXECUTED
00109b84 <rtems_clock_get_seconds_since_epoch>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
109b84: 55 push %ebp
109b85: 89 e5 mov %esp,%ebp
109b87: 8b 55 08 mov 0x8(%ebp),%edx
if ( !the_interval )
109b8a: 85 d2 test %edx,%edx
109b8c: 74 1e je 109bac <rtems_clock_get_seconds_since_epoch+0x28><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109b8e: 80 3d 6c e6 11 00 00 cmpb $0x0,0x11e66c
109b95: 74 0d je 109ba4 <rtems_clock_get_seconds_since_epoch+0x20>
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
109b97: a1 ec e6 11 00 mov 0x11e6ec,%eax
109b9c: 89 02 mov %eax,(%edx)
109b9e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
109ba0: c9 leave
109ba1: c3 ret
109ba2: 66 90 xchg %ax,%ax
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109ba4: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
return RTEMS_SUCCESSFUL;
}
109ba9: c9 leave
109baa: c3 ret
109bab: 90 nop
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
109bac: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
return RTEMS_SUCCESSFUL;
}
109bb1: c9 leave <== NOT EXECUTED
109bb2: c3 ret <== NOT EXECUTED
00109bd4 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
109bd4: 55 push %ebp
109bd5: 89 e5 mov %esp,%ebp
109bd7: 56 push %esi
109bd8: 53 push %ebx
109bd9: 83 ec 40 sub $0x40,%esp
109bdc: 8b 75 08 mov 0x8(%ebp),%esi
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
109bdf: 85 f6 test %esi,%esi
109be1: 0f 84 8d 00 00 00 je 109c74 <rtems_clock_get_tod+0xa0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109be7: 80 3d 6c e6 11 00 00 cmpb $0x0,0x11e66c
109bee: 75 0c jne 109bfc <rtems_clock_get_tod+0x28>
109bf0: b8 0b 00 00 00 mov $0xb,%eax
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
return RTEMS_SUCCESSFUL;
}
109bf5: 8d 65 f8 lea -0x8(%ebp),%esp
109bf8: 5b pop %ebx
109bf9: 5e pop %esi
109bfa: c9 leave
109bfb: c3 ret
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
109bfc: 9c pushf
109bfd: fa cli
109bfe: 5b pop %ebx
* This routine grows @a the_heap memory area using the size bytes which
109bff: 83 ec 0c sub $0xc,%esp
109c02: 8d 45 e8 lea -0x18(%ebp),%eax
109c05: 50 push %eax
109c06: e8 31 16 00 00 call 10b23c <_TOD_Get>
* begin at @a starting_address.
109c0b: 53 push %ebx
109c0c: 9d popf
*
* @param[in] the_heap is the heap to operate upon
109c0d: 8b 45 e8 mov -0x18(%ebp),%eax
109c10: 89 45 f0 mov %eax,-0x10(%ebp)
* @param[in] starting_address is the starting address of the memory
109c13: b8 d3 4d 62 10 mov $0x10624dd3,%eax
109c18: f7 65 ec mull -0x14(%ebp)
109c1b: c1 ea 06 shr $0x6,%edx
109c1e: 89 55 f4 mov %edx,-0xc(%ebp)
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
109c21: 58 pop %eax
109c22: 5a pop %edx
109c23: 8d 45 c4 lea -0x3c(%ebp),%eax
109c26: 50 push %eax
109c27: 8d 45 f0 lea -0x10(%ebp),%eax
109c2a: 50 push %eax
109c2b: e8 38 6d 00 00 call 110968 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
109c30: 8b 45 d8 mov -0x28(%ebp),%eax
109c33: 05 6c 07 00 00 add $0x76c,%eax
109c38: 89 06 mov %eax,(%esi)
tmbuf->month = time.tm_mon + 1;
109c3a: 8b 45 d4 mov -0x2c(%ebp),%eax
109c3d: 40 inc %eax
109c3e: 89 46 04 mov %eax,0x4(%esi)
tmbuf->day = time.tm_mday;
109c41: 8b 45 d0 mov -0x30(%ebp),%eax
109c44: 89 46 08 mov %eax,0x8(%esi)
tmbuf->hour = time.tm_hour;
109c47: 8b 45 cc mov -0x34(%ebp),%eax
109c4a: 89 46 0c mov %eax,0xc(%esi)
tmbuf->minute = time.tm_min;
109c4d: 8b 45 c8 mov -0x38(%ebp),%eax
109c50: 89 46 10 mov %eax,0x10(%esi)
tmbuf->second = time.tm_sec;
109c53: 8b 45 c4 mov -0x3c(%ebp),%eax
109c56: 89 46 14 mov %eax,0x14(%esi)
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
109c59: 8b 45 f4 mov -0xc(%ebp),%eax
109c5c: 31 d2 xor %edx,%edx
109c5e: f7 35 20 e8 11 00 divl 0x11e820
109c64: 89 46 18 mov %eax,0x18(%esi)
109c67: 31 c0 xor %eax,%eax
109c69: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
109c6c: 8d 65 f8 lea -0x8(%ebp),%esp
109c6f: 5b pop %ebx
109c70: 5e pop %esi
109c71: c9 leave
109c72: c3 ret
109c73: 90 nop
{
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
109c74: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109c79: e9 77 ff ff ff jmp 109bf5 <rtems_clock_get_tod+0x21><== NOT EXECUTED
00109c80 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
109c80: 55 push %ebp
109c81: 89 e5 mov %esp,%ebp
109c83: 56 push %esi
109c84: 53 push %ebx
109c85: 83 ec 10 sub $0x10,%esp
109c88: 8b 75 08 mov 0x8(%ebp),%esi
if ( !time )
109c8b: 85 f6 test %esi,%esi
109c8d: 74 45 je 109cd4 <rtems_clock_get_tod_timeval+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
109c8f: 80 3d 6c e6 11 00 00 cmpb $0x0,0x11e66c
109c96: 75 0c jne 109ca4 <rtems_clock_get_tod_timeval+0x24>
109c98: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
109c9d: 8d 65 f8 lea -0x8(%ebp),%esp
109ca0: 5b pop %ebx
109ca1: 5e pop %esi
109ca2: c9 leave
109ca3: c3 ret
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
109ca4: 9c pushf
109ca5: fa cli
109ca6: 5b pop %ebx
* This routine grows @a the_heap memory area using the size bytes which
109ca7: 83 ec 0c sub $0xc,%esp
109caa: 8d 45 f0 lea -0x10(%ebp),%eax
109cad: 50 push %eax
109cae: e8 89 15 00 00 call 10b23c <_TOD_Get>
* begin at @a starting_address.
109cb3: 53 push %ebx
109cb4: 9d popf
*
* @param[in] the_heap is the heap to operate upon
109cb5: 8b 45 f0 mov -0x10(%ebp),%eax
109cb8: 89 06 mov %eax,(%esi)
* @param[in] starting_address is the starting address of the memory
109cba: b8 d3 4d 62 10 mov $0x10624dd3,%eax
109cbf: f7 65 f4 mull -0xc(%ebp)
109cc2: c1 ea 06 shr $0x6,%edx
109cc5: 89 56 04 mov %edx,0x4(%esi)
109cc8: 31 c0 xor %eax,%eax
109cca: 83 c4 10 add $0x10,%esp
109ccd: 8d 65 f8 lea -0x8(%ebp),%esp
109cd0: 5b pop %ebx
109cd1: 5e pop %esi
109cd2: c9 leave
109cd3: c3 ret
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
109cd4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
109cd9: eb c2 jmp 109c9d <rtems_clock_get_tod_timeval+0x1d><== NOT EXECUTED
00109efc <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
109efc: 55 push %ebp
109efd: 89 e5 mov %esp,%ebp
109eff: 83 ec 08 sub $0x8,%esp
109f02: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
109f05: 85 c0 test %eax,%eax
109f07: 74 13 je 109f1c <rtems_clock_get_uptime+0x20><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
109f09: 83 ec 0c sub $0xc,%esp
109f0c: 50 push %eax
109f0d: e8 fe 16 00 00 call 10b610 <_TOD_Get_uptime>
109f12: 31 c0 xor %eax,%eax
109f14: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
109f17: c9 leave
109f18: c3 ret
109f19: 8d 76 00 lea 0x0(%esi),%esi
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
109f1c: b0 09 mov $0x9,%al <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
return RTEMS_SUCCESSFUL;
}
109f1e: c9 leave <== NOT EXECUTED
109f1f: c3 ret <== NOT EXECUTED
0010aba0 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10aba0: 55 push %ebp
10aba1: 89 e5 mov %esp,%ebp
10aba3: 53 push %ebx
10aba4: 83 ec 14 sub $0x14,%esp
10aba7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10abaa: 85 db test %ebx,%ebx
10abac: 74 66 je 10ac14 <rtems_clock_set+0x74> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10abae: 83 ec 0c sub $0xc,%esp
10abb1: 53 push %ebx
10abb2: e8 3d 01 00 00 call 10acf4 <_TOD_Validate>
10abb7: 83 c4 10 add $0x10,%esp
10abba: 84 c0 test %al,%al
10abbc: 75 0a jne 10abc8 <rtems_clock_set+0x28>
10abbe: b8 14 00 00 00 mov $0x14,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10abc3: 8b 5d fc mov -0x4(%ebp),%ebx
10abc6: c9 leave
10abc7: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10abc8: 83 ec 0c sub $0xc,%esp
10abcb: 53 push %ebx
10abcc: e8 93 00 00 00 call 10ac64 <_TOD_To_seconds>
10abd1: 89 45 f4 mov %eax,-0xc(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10abd4: 8b 43 18 mov 0x18(%ebx),%eax
10abd7: 0f af 05 40 a8 12 00 imul 0x12a840,%eax
10abde: 8d 04 80 lea (%eax,%eax,4),%eax
10abe1: 8d 04 80 lea (%eax,%eax,4),%eax
10abe4: 8d 04 80 lea (%eax,%eax,4),%eax
10abe7: c1 e0 03 shl $0x3,%eax
10abea: 89 45 f8 mov %eax,-0x8(%ebp)
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10abed: a1 78 a6 12 00 mov 0x12a678,%eax
10abf2: 40 inc %eax
10abf3: a3 78 a6 12 00 mov %eax,0x12a678
(_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10abf8: 8d 45 f4 lea -0xc(%ebp),%eax
10abfb: 89 04 24 mov %eax,(%esp)
10abfe: e8 c9 19 00 00 call 10c5cc <_TOD_Set>
_Thread_Enable_dispatch();
10ac03: e8 b0 2b 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10ac08: 31 c0 xor %eax,%eax
10ac0a: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10ac0d: 8b 5d fc mov -0x4(%ebp),%ebx
10ac10: c9 leave
10ac11: c3 ret
10ac12: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
struct timespec newtime;
if ( !time_buffer )
10ac14: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10ac19: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ac1c: c9 leave <== NOT EXECUTED
10ac1d: c3 ret <== NOT EXECUTED
00109cdc <rtems_clock_set_nanoseconds_extension>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
109cdc: 55 push %ebp
109cdd: 89 e5 mov %esp,%ebp
109cdf: 8b 45 08 mov 0x8(%ebp),%eax
if ( !routine )
109ce2: 85 c0 test %eax,%eax
109ce4: 74 0a je 109cf0 <rtems_clock_set_nanoseconds_extension+0x14><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
109ce6: a3 28 e8 11 00 mov %eax,0x11e828
109ceb: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
109ced: c9 leave
109cee: c3 ret
109cef: 90 nop
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
109cf0: b0 09 mov $0x9,%al <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
return RTEMS_SUCCESSFUL;
}
109cf2: c9 leave <== NOT EXECUTED
109cf3: c3 ret <== NOT EXECUTED
00109cf4 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
109cf4: 55 push %ebp
109cf5: 89 e5 mov %esp,%ebp
109cf7: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
109cfa: e8 cd 15 00 00 call 10b2cc <_TOD_Tickle_ticks>
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
* Any other value of @a alignment is taken "as is", i.e., even odd
* alignments are possible.
* Returns pointer to the start of the memory block if success, NULL if
109cff: 83 ec 0c sub $0xc,%esp
109d02: 68 3c e7 11 00 push $0x11e73c
109d07: e8 8c 36 00 00 call 10d398 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
109d0c: e8 37 31 00 00 call 10ce48 <_Thread_Tickle_timeslice>
109d11: a0 2c e7 11 00 mov 0x11e72c,%al
if ( _Thread_Is_context_switch_necessary() &&
109d16: 83 c4 10 add $0x10,%esp
109d19: 84 c0 test %al,%al
109d1b: 74 09 je 109d26 <rtems_clock_tick+0x32>
109d1d: a1 58 e6 11 00 mov 0x11e658,%eax
109d22: 85 c0 test %eax,%eax
109d24: 74 06 je 109d2c <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
109d26: 31 c0 xor %eax,%eax
109d28: c9 leave
109d29: c3 ret
109d2a: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
109d2c: e8 5f 24 00 00 call 10c190 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
109d31: 31 c0 xor %eax,%eax
109d33: c9 leave
109d34: c3 ret
00109d38 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
109d38: 55 push %ebp
109d39: 89 e5 mov %esp,%ebp
109d3b: 83 ec 08 sub $0x8,%esp
109d3e: 8b 4d 08 mov 0x8(%ebp),%ecx
109d41: 8b 55 14 mov 0x14(%ebp),%edx
RTEMS_API_Control *api;
if ( !event_out )
109d44: 85 d2 test %edx,%edx
109d46: 74 44 je 109d8c <rtems_event_receive+0x54><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
109d48: a1 1c e7 11 00 mov 0x11e71c,%eax
109d4d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
if ( _Event_sets_Is_empty( event_in ) ) {
109d53: 85 c9 test %ecx,%ecx
109d55: 75 09 jne 109d60 <rtems_event_receive+0x28>
*event_out = api->pending_events;
109d57: 8b 00 mov (%eax),%eax
109d59: 89 02 mov %eax,(%edx)
109d5b: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
109d5d: c9 leave
109d5e: c3 ret
109d5f: 90 nop
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
109d60: a1 58 e6 11 00 mov 0x11e658,%eax
109d65: 40 inc %eax
109d66: a3 58 e6 11 00 mov %eax,0x11e658
*event_out = api->pending_events;
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
109d6b: 52 push %edx
109d6c: ff 75 10 pushl 0x10(%ebp)
109d6f: ff 75 0c pushl 0xc(%ebp)
109d72: 51 push %ecx
109d73: e8 1c 00 00 00 call 109d94 <_Event_Seize>
_Thread_Enable_dispatch();
109d78: e8 6f 25 00 00 call 10c2ec <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
109d7d: a1 1c e7 11 00 mov 0x11e71c,%eax
109d82: 8b 40 34 mov 0x34(%eax),%eax
109d85: 83 c4 10 add $0x10,%esp
}
109d88: c9 leave
109d89: c3 ret
109d8a: 66 90 xchg %ax,%ax
rtems_event_set *event_out
)
{
RTEMS_API_Control *api;
if ( !event_out )
109d8c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
109d91: c9 leave <== NOT EXECUTED
109d92: c3 ret <== NOT EXECUTED
0010bc7c <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
rtems_extensions_table *extension_table,
Objects_Id *id
)
{
10bc7c: 55 push %ebp
10bc7d: 89 e5 mov %esp,%ebp
10bc7f: 57 push %edi
10bc80: 56 push %esi
10bc81: 53 push %ebx
10bc82: 83 ec 0c sub $0xc,%esp
10bc85: 8b 7d 08 mov 0x8(%ebp),%edi
10bc88: 8b 75 10 mov 0x10(%ebp),%esi
Extension_Control *the_extension;
if ( !id )
10bc8b: 85 f6 test %esi,%esi
10bc8d: 74 75 je 10bd04 <rtems_extension_create+0x88>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10bc8f: 85 ff test %edi,%edi
10bc91: 75 0d jne 10bca0 <rtems_extension_create+0x24>
10bc93: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10bc98: 8d 65 f4 lea -0xc(%ebp),%esp
10bc9b: 5b pop %ebx
10bc9c: 5e pop %esi
10bc9d: 5f pop %edi
10bc9e: c9 leave
10bc9f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10bca0: a1 78 a6 12 00 mov 0x12a678,%eax
10bca5: 40 inc %eax
10bca6: a3 78 a6 12 00 mov %eax,0x12a678
* It is a simple wrapper for the help with the addition of the
* allocation mutex being used for protection.
*/
/**@{*/
#ifdef __cplusplus
10bcab: 83 ec 0c sub $0xc,%esp
10bcae: 68 00 a9 12 00 push $0x12a900
10bcb3: e8 c8 0c 00 00 call 10c980 <_Objects_Allocate>
10bcb8: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
10bcba: 83 c4 10 add $0x10,%esp
10bcbd: 85 c0 test %eax,%eax
10bcbf: 74 37 je 10bcf8 <rtems_extension_create+0x7c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
_User_extensions_Add_set( &the_extension->Extension, extension_table );
10bcc1: 83 ec 08 sub $0x8,%esp
10bcc4: ff 75 0c pushl 0xc(%ebp)
10bcc7: 8d 40 10 lea 0x10(%eax),%eax
10bcca: 50 push %eax
10bccb: e8 0c 2a 00 00 call 10e6dc <_User_extensions_Add_set>
10bcd0: 8b 4b 08 mov 0x8(%ebx),%ecx
10bcd3: 0f b7 d1 movzwl %cx,%edx
10bcd6: a1 1c a9 12 00 mov 0x12a91c,%eax
10bcdb: 89 1c 90 mov %ebx,(%eax,%edx,4)
10bcde: 89 7b 0c mov %edi,0xc(%ebx)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
10bce1: 89 0e mov %ecx,(%esi)
_Thread_Enable_dispatch();
10bce3: e8 d0 1a 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10bce8: 31 c0 xor %eax,%eax
10bcea: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10bced: 8d 65 f4 lea -0xc(%ebp),%esp
10bcf0: 5b pop %ebx
10bcf1: 5e pop %esi
10bcf2: 5f pop %edi
10bcf3: c9 leave
10bcf4: c3 ret
10bcf5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
10bcf8: e8 bb 1a 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10bcfd: b8 05 00 00 00 mov $0x5,%eax
10bd02: eb 94 jmp 10bc98 <rtems_extension_create+0x1c>
Objects_Id *id
)
{
Extension_Control *the_extension;
if ( !id )
10bd04: b8 09 00 00 00 mov $0x9,%eax
10bd09: eb 8d jmp 10bc98 <rtems_extension_create+0x1c>
0010c428 <rtems_extension_delete>:
*/
rtems_status_code rtems_extension_delete(
Objects_Id id
)
{
10c428: 55 push %ebp
10c429: 89 e5 mov %esp,%ebp
10c42b: 53 push %ebx
10c42c: 83 ec 18 sub $0x18,%esp
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
10c42f: 8d 45 f8 lea -0x8(%ebp),%eax
10c432: 50 push %eax
10c433: ff 75 08 pushl 0x8(%ebp)
10c436: 68 20 3c 12 00 push $0x123c20
10c43b: e8 bc 10 00 00 call 10d4fc <_Objects_Get>
10c440: 89 c3 mov %eax,%ebx
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10c442: 83 c4 10 add $0x10,%esp
10c445: 8b 45 f8 mov -0x8(%ebp),%eax
10c448: 85 c0 test %eax,%eax
10c44a: 75 38 jne 10c484 <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10c44c: 83 ec 0c sub $0xc,%esp
10c44f: 8d 43 10 lea 0x10(%ebx),%eax
10c452: 50 push %eax
10c453: e8 fc 27 00 00 call 10ec54 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10c458: 59 pop %ecx
10c459: 58 pop %eax
10c45a: 53 push %ebx
10c45b: 68 20 3c 12 00 push $0x123c20
10c460: e8 23 0c 00 00 call 10d088 <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10c465: 58 pop %eax
10c466: 5a pop %edx
10c467: 53 push %ebx
10c468: 68 20 3c 12 00 push $0x123c20
10c46d: e8 56 0f 00 00 call 10d3c8 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10c472: e8 c9 18 00 00 call 10dd40 <_Thread_Enable_dispatch>
10c477: 31 c0 xor %eax,%eax
10c479: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c47c: 8b 5d fc mov -0x4(%ebp),%ebx
10c47f: c9 leave
10c480: c3 ret
10c481: 8d 76 00 lea 0x0(%esi),%esi
{
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10c484: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c489: 8b 5d fc mov -0x4(%ebp),%ebx
10c48c: c9 leave
10c48d: c3 ret
0010a74c <rtems_interrupt_catch>:
rtems_status_code rtems_interrupt_catch(
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
10a74c: 55 push %ebp <== NOT EXECUTED
10a74d: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10a74f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a752: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED
10a755: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED
if ( !_ISR_Is_vector_number_valid( vector ) )
10a758: 81 7d 0c ff 00 00 00 cmpl $0xff,0xc(%ebp) <== NOT EXECUTED
10a75f: 77 23 ja 10a784 <rtems_interrupt_catch+0x38><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
if ( !_ISR_Is_valid_user_handler( (void *) new_isr_handler ) )
10a761: 85 d2 test %edx,%edx <== NOT EXECUTED
10a763: 74 17 je 10a77c <rtems_interrupt_catch+0x30><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_ISR_Is_valid_user_handler( (void *) old_isr_handler ) )
10a765: 85 c0 test %eax,%eax <== NOT EXECUTED
10a767: 74 13 je 10a77c <rtems_interrupt_catch+0x30><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
10a769: 51 push %ecx <== NOT EXECUTED
10a76a: 50 push %eax <== NOT EXECUTED
10a76b: 52 push %edx <== NOT EXECUTED
10a76c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED
10a76f: e8 90 c5 ff ff call 106d04 <_CPU_ISR_install_vector><== NOT EXECUTED
10a774: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a776: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
10a779: c9 leave <== NOT EXECUTED
10a77a: c3 ret <== NOT EXECUTED
10a77b: 90 nop <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
10a77c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
10a781: c9 leave <== NOT EXECUTED
10a782: c3 ret <== NOT EXECUTED
10a783: 90 nop <== NOT EXECUTED
rtems_isr_entry new_isr_handler,
rtems_vector_number vector,
rtems_isr_entry *old_isr_handler
)
{
if ( !_ISR_Is_vector_number_valid( vector ) )
10a784: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
_ISR_Install_vector(
vector, (proc_ptr)new_isr_handler, (proc_ptr *)old_isr_handler );
return RTEMS_SUCCESSFUL;
}
10a789: c9 leave <== NOT EXECUTED
10a78a: c3 ret <== NOT EXECUTED
0010b8d0 <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
)
{
10b8d0: 55 push %ebp
10b8d1: 89 e5 mov %esp,%ebp
10b8d3: 57 push %edi
10b8d4: 56 push %esi
10b8d5: 53 push %ebx
10b8d6: 83 ec 04 sub $0x4,%esp
10b8d9: 8b 55 08 mov 0x8(%ebp),%edx
10b8dc: 8b 75 0c mov 0xc(%ebp),%esi
10b8df: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
10b8e2: 85 f6 test %esi,%esi
10b8e4: 0f 84 c6 00 00 00 je 10b9b0 <rtems_io_register_driver+0xe0>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
10b8ea: 85 db test %ebx,%ebx
10b8ec: 0f 84 be 00 00 00 je 10b9b0 <rtems_io_register_driver+0xe0>
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
10b8f2: 8b 06 mov (%esi),%eax
10b8f4: 85 c0 test %eax,%eax
10b8f6: 0f 84 a8 00 00 00 je 10b9a4 <rtems_io_register_driver+0xd4>
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
10b8fc: c7 03 00 00 00 00 movl $0x0,(%ebx)
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
10b902: a1 84 19 12 00 mov 0x121984,%eax
10b907: 39 d0 cmp %edx,%eax
10b909: 76 5d jbe 10b968 <rtems_io_register_driver+0x98>
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
10b90b: 85 d2 test %edx,%edx
10b90d: 75 65 jne 10b974 <rtems_io_register_driver+0xa4>
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
10b90f: 89 c2 mov %eax,%edx
10b911: 4a dec %edx
10b912: 0f 84 80 00 00 00 je 10b998 <rtems_io_register_driver+0xc8><== NEVER TAKEN
10b918: 8d 04 40 lea (%eax,%eax,2),%eax
10b91b: 8d 04 c5 e8 ff ff ff lea -0x18(,%eax,8),%eax
10b922: 03 05 88 19 12 00 add 0x121988,%eax
10b928: eb 08 jmp 10b932 <rtems_io_register_driver+0x62>
10b92a: 66 90 xchg %ax,%ax
10b92c: 83 e8 18 sub $0x18,%eax
10b92f: 4a dec %edx
10b930: 74 66 je 10b998 <rtems_io_register_driver+0xc8>
10b932: 89 c7 mov %eax,%edi
if ( !_IO_Driver_address_table[major].initialization_entry &&
10b934: 8b 08 mov (%eax),%ecx
10b936: 85 c9 test %ecx,%ecx
10b938: 75 f2 jne 10b92c <rtems_io_register_driver+0x5c>
10b93a: 8b 48 04 mov 0x4(%eax),%ecx
10b93d: 85 c9 test %ecx,%ecx
10b93f: 75 eb jne 10b92c <rtems_io_register_driver+0x5c><== NEVER TAKEN
if ( _IO_Driver_address_table[major].initialization_entry ||
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
10b941: b8 06 00 00 00 mov $0x6,%eax
10b946: 89 c1 mov %eax,%ecx
10b948: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*registered_major = major;
10b94a: 89 13 mov %edx,(%ebx)
return rtems_io_initialize( major, 0, NULL );
10b94c: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10b953: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10b95a: 89 55 08 mov %edx,0x8(%ebp)
}
10b95d: 59 pop %ecx
10b95e: 5b pop %ebx
10b95f: 5e pop %esi
10b960: 5f pop %edi
10b961: c9 leave
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b962: e9 f1 fd ff ff jmp 10b758 <rtems_io_initialize>
10b967: 90 nop
*registered_major = 0;
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
10b968: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
}
10b96d: 5a pop %edx
10b96e: 5b pop %ebx
10b96f: 5e pop %esi
10b970: 5f pop %edi
10b971: c9 leave
10b972: c3 ret
10b973: 90 nop
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
10b974: 8d 04 52 lea (%edx,%edx,2),%eax
10b977: 8d 3c c5 00 00 00 00 lea 0x0(,%eax,8),%edi
10b97e: 03 3d 88 19 12 00 add 0x121988,%edi
10b984: 8b 07 mov (%edi),%eax
10b986: 85 c0 test %eax,%eax
10b988: 74 32 je 10b9bc <rtems_io_register_driver+0xec><== NEVER TAKEN
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b98a: b8 0c 00 00 00 mov $0xc,%eax
}
10b98f: 5a pop %edx
10b990: 5b pop %ebx
10b991: 5e pop %esi
10b992: 5f pop %edi
10b993: c9 leave
10b994: c3 ret
10b995: 8d 76 00 lea 0x0(%esi),%esi
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b998: b8 05 00 00 00 mov $0x5,%eax
}
10b99d: 5a pop %edx
10b99e: 5b pop %ebx
10b99f: 5e pop %esi
10b9a0: 5f pop %edi
10b9a1: c9 leave
10b9a2: c3 ret
10b9a3: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
10b9a4: 8b 7e 04 mov 0x4(%esi),%edi
10b9a7: 85 ff test %edi,%edi
10b9a9: 0f 85 4d ff ff ff jne 10b8fc <rtems_io_register_driver+0x2c><== NEVER TAKEN
10b9af: 90 nop
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
10b9b0: b8 09 00 00 00 mov $0x9,%eax
}
10b9b5: 5a pop %edx
10b9b6: 5b pop %ebx
10b9b7: 5e pop %esi
10b9b8: 5f pop %edi
10b9b9: c9 leave
10b9ba: c3 ret
10b9bb: 90 nop
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
10b9bc: 8b 47 04 mov 0x4(%edi),%eax <== NOT EXECUTED
10b9bf: 85 c0 test %eax,%eax <== NOT EXECUTED
10b9c1: 75 c7 jne 10b98a <rtems_io_register_driver+0xba><== NOT EXECUTED
10b9c3: e9 79 ff ff ff jmp 10b941 <rtems_io_register_driver+0x71><== NOT EXECUTED
0010b9c8 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10b9c8: 55 push %ebp
10b9c9: 89 e5 mov %esp,%ebp
10b9cb: 57 push %edi
10b9cc: 83 ec 04 sub $0x4,%esp
10b9cf: 8b 45 08 mov 0x8(%ebp),%eax
if ( major < _IO_Number_of_drivers ) {
10b9d2: 39 05 84 19 12 00 cmp %eax,0x121984
10b9d8: 77 0a ja 10b9e4 <rtems_io_unregister_driver+0x1c><== ALWAYS TAKEN
10b9da: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10b9df: 5a pop %edx <== NOT EXECUTED
10b9e0: 5f pop %edi <== NOT EXECUTED
10b9e1: c9 leave <== NOT EXECUTED
10b9e2: c3 ret <== NOT EXECUTED
10b9e3: 90 nop <== NOT EXECUTED
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( major < _IO_Number_of_drivers ) {
memset(
10b9e4: 8d 3c 40 lea (%eax,%eax,2),%edi
10b9e7: c1 e7 03 shl $0x3,%edi
10b9ea: 03 3d 88 19 12 00 add 0x121988,%edi
10b9f0: b9 18 00 00 00 mov $0x18,%ecx
10b9f5: 31 c0 xor %eax,%eax
10b9f7: f3 aa rep stos %al,%es:(%edi)
10b9f9: 31 c0 xor %eax,%eax
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10b9fb: 5a pop %edx
10b9fc: 5f pop %edi
10b9fd: c9 leave
10b9fe: c3 ret
0010c920 <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)
{
10c920: 55 push %ebp
10c921: 89 e5 mov %esp,%ebp
10c923: 57 push %edi
10c924: 56 push %esi
10c925: 53 push %ebx
10c926: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10c929: 8b 45 08 mov 0x8(%ebp),%eax
10c92c: 85 c0 test %eax,%eax
10c92e: 74 47 je 10c977 <rtems_iterate_over_all_threads+0x57><== NEVER TAKEN
return;
10c930: bf 01 00 00 00 mov $0x1,%edi
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10c935: 8b 04 bd 4c a6 12 00 mov 0x12a64c(,%edi,4),%eax
10c93c: 85 c0 test %eax,%eax
10c93e: 74 31 je 10c971 <rtems_iterate_over_all_threads+0x51>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10c940: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10c943: 85 f6 test %esi,%esi
10c945: 74 2a je 10c971 <rtems_iterate_over_all_threads+0x51><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
10c947: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10c94c: 74 23 je 10c971 <rtems_iterate_over_all_threads+0x51><== NEVER TAKEN
10c94e: bb 01 00 00 00 mov $0x1,%ebx
10c953: 90 nop
the_thread = (Thread_Control *)information->local_table[ i ];
10c954: 8b 46 1c mov 0x1c(%esi),%eax
10c957: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10c95a: 85 c0 test %eax,%eax
10c95c: 74 0a je 10c968 <rtems_iterate_over_all_threads+0x48><== NEVER TAKEN
continue;
(*routine)(the_thread);
10c95e: 83 ec 0c sub $0xc,%esp
10c961: 50 push %eax
10c962: ff 55 08 call *0x8(%ebp)
10c965: 83 c4 10 add $0x10,%esp
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
10c968: 43 inc %ebx
10c969: 0f b7 46 10 movzwl 0x10(%esi),%eax
10c96d: 39 d8 cmp %ebx,%eax
10c96f: 73 e3 jae 10c954 <rtems_iterate_over_all_threads+0x34>
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
10c971: 47 inc %edi
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
10c972: 83 ff 05 cmp $0x5,%edi
10c975: 75 be jne 10c935 <rtems_iterate_over_all_threads+0x15>
(*routine)(the_thread);
}
}
}
}
10c977: 8d 65 f4 lea -0xc(%ebp),%esp
10c97a: 5b pop %ebx
10c97b: 5e pop %esi
10c97c: 5f pop %edi
10c97d: c9 leave
10c97e: c3 ret
0011236c <rtems_message_queue_broadcast>:
Objects_Id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
11236c: 55 push %ebp
11236d: 89 e5 mov %esp,%ebp
11236f: 57 push %edi
112370: 56 push %esi
112371: 53 push %ebx
112372: 83 ec 1c sub $0x1c,%esp
112375: 8b 7d 08 mov 0x8(%ebp),%edi
112378: 8b 75 0c mov 0xc(%ebp),%esi
11237b: 8b 5d 14 mov 0x14(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
11237e: 85 f6 test %esi,%esi
112380: 74 62 je 1123e4 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
112382: 85 db test %ebx,%ebx
112384: 74 5e je 1123e4 <rtems_message_queue_broadcast+0x78>
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
112386: 51 push %ecx
112387: 8d 45 f0 lea -0x10(%ebp),%eax
11238a: 50 push %eax
11238b: 57 push %edi
11238c: 68 60 5d 13 00 push $0x135d60
112391: e8 4a 48 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112396: 83 c4 10 add $0x10,%esp
112399: 8b 55 f0 mov -0x10(%ebp),%edx
11239c: 85 d2 test %edx,%edx
11239e: 74 10 je 1123b0 <rtems_message_queue_broadcast+0x44>
1123a0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123a5: 8d 65 f4 lea -0xc(%ebp),%esp
1123a8: 5b pop %ebx
1123a9: 5e pop %esi
1123aa: 5f pop %edi
1123ab: c9 leave
1123ac: c3 ret
1123ad: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
1123b0: 83 ec 08 sub $0x8,%esp
1123b3: 53 push %ebx
1123b4: 6a 00 push $0x0
1123b6: 57 push %edi
1123b7: ff 75 10 pushl 0x10(%ebp)
1123ba: 56 push %esi
1123bb: 83 c0 14 add $0x14,%eax
1123be: 50 push %eax
1123bf: e8 78 31 00 00 call 11553c <_CORE_message_queue_Broadcast>
1123c4: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
1123c6: 83 c4 20 add $0x20,%esp
1123c9: e8 56 50 00 00 call 117424 <_Thread_Enable_dispatch>
return
1123ce: 83 ec 0c sub $0xc,%esp
1123d1: 53 push %ebx
1123d2: e8 5d 03 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code>
1123d7: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123da: 8d 65 f4 lea -0xc(%ebp),%esp
1123dd: 5b pop %ebx
1123de: 5e pop %esi
1123df: 5f pop %edi
1123e0: c9 leave
1123e1: c3 ret
1123e2: 66 90 xchg %ax,%ax
#endif
count
);
_Thread_Enable_dispatch();
return
1123e4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1123e9: 8d 65 f4 lea -0xc(%ebp),%esp
1123ec: 5b pop %ebx
1123ed: 5e pop %esi
1123ee: 5f pop %edi
1123ef: c9 leave
1123f0: c3 ret
001123f4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1123f4: 55 push %ebp
1123f5: 89 e5 mov %esp,%ebp
1123f7: 56 push %esi
1123f8: 53 push %ebx
1123f9: 83 ec 10 sub $0x10,%esp
1123fc: 8b 75 08 mov 0x8(%ebp),%esi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1123ff: 85 f6 test %esi,%esi
112401: 74 31 je 112434 <rtems_message_queue_create+0x40>
return RTEMS_INVALID_NAME;
if ( !id )
112403: 8b 4d 18 mov 0x18(%ebp),%ecx
112406: 85 c9 test %ecx,%ecx
112408: 0f 84 92 00 00 00 je 1124a0 <rtems_message_queue_create+0xac><== NEVER TAKEN
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
11240e: 8b 55 0c mov 0xc(%ebp),%edx
112411: 85 d2 test %edx,%edx
112413: 74 13 je 112428 <rtems_message_queue_create+0x34><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
112415: 8b 45 10 mov 0x10(%ebp),%eax
112418: 85 c0 test %eax,%eax
11241a: 75 24 jne 112440 <rtems_message_queue_create+0x4c><== ALWAYS TAKEN
11241c: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112421: 8d 65 f8 lea -0x8(%ebp),%esp
112424: 5b pop %ebx
112425: 5e pop %esi
112426: c9 leave
112427: c3 ret
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
112428: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11242d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
112430: 5b pop %ebx <== NOT EXECUTED
112431: 5e pop %esi <== NOT EXECUTED
112432: c9 leave <== NOT EXECUTED
112433: c3 ret <== NOT EXECUTED
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
112434: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112439: 8d 65 f8 lea -0x8(%ebp),%esp
11243c: 5b pop %ebx
11243d: 5e pop %esi
11243e: c9 leave
11243f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
112440: a1 38 5a 13 00 mov 0x135a38,%eax
112445: 40 inc %eax
112446: a3 38 5a 13 00 mov %eax,0x135a38
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
11244b: e8 dc 7d 00 00 call 11a22c <_Message_queue_Allocate>
112450: 89 c3 mov %eax,%ebx
if ( !the_message_queue ) {
112452: 85 c0 test %eax,%eax
112454: 74 7a je 1124d0 <rtems_message_queue_create+0xdc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
112456: 8b 45 14 mov 0x14(%ebp),%eax
112459: 89 43 10 mov %eax,0x10(%ebx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
11245c: a8 04 test $0x4,%al
11245e: 0f 95 c0 setne %al
112461: 0f b6 c0 movzbl %al,%eax
112464: 89 45 f4 mov %eax,-0xc(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
112467: ff 75 10 pushl 0x10(%ebp)
11246a: ff 75 0c pushl 0xc(%ebp)
11246d: 8d 45 f4 lea -0xc(%ebp),%eax
112470: 50 push %eax
112471: 8d 43 14 lea 0x14(%ebx),%eax
112474: 50 push %eax
112475: e8 e2 31 00 00 call 11565c <_CORE_message_queue_Initialize>
11247a: 83 c4 10 add $0x10,%esp
11247d: 84 c0 test %al,%al
11247f: 75 2b jne 1124ac <rtems_message_queue_create+0xb8>
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
112481: 83 ec 08 sub $0x8,%esp
112484: 53 push %ebx
112485: 68 60 5d 13 00 push $0x135d60
11248a: e8 dd 45 00 00 call 116a6c <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
11248f: e8 90 4f 00 00 call 117424 <_Thread_Enable_dispatch>
112494: b8 0d 00 00 00 mov $0xd,%eax
112499: 83 c4 10 add $0x10,%esp
11249c: eb 83 jmp 112421 <rtems_message_queue_create+0x2d>
11249e: 66 90 xchg %ax,%ax
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
1124a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
1124a5: e9 77 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d><== NOT EXECUTED
1124aa: 66 90 xchg %ax,%ax <== NOT EXECUTED
1124ac: 8b 4b 08 mov 0x8(%ebx),%ecx
1124af: 0f b7 d1 movzwl %cx,%edx
1124b2: a1 7c 5d 13 00 mov 0x135d7c,%eax
1124b7: 89 1c 90 mov %ebx,(%eax,%edx,4)
1124ba: 89 73 0c mov %esi,0xc(%ebx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
1124bd: 8b 45 18 mov 0x18(%ebp),%eax
1124c0: 89 08 mov %ecx,(%eax)
name,
0
);
#endif
_Thread_Enable_dispatch();
1124c2: e8 5d 4f 00 00 call 117424 <_Thread_Enable_dispatch>
1124c7: 31 c0 xor %eax,%eax
1124c9: e9 53 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d>
1124ce: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
1124d0: e8 4f 4f 00 00 call 117424 <_Thread_Enable_dispatch>
1124d5: b8 05 00 00 00 mov $0x5,%eax
1124da: e9 42 ff ff ff jmp 112421 <rtems_message_queue_create+0x2d>
001124e0 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
Objects_Id id
)
{
1124e0: 55 push %ebp
1124e1: 89 e5 mov %esp,%ebp
1124e3: 53 push %ebx
1124e4: 83 ec 18 sub $0x18,%esp
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
1124e7: 8d 45 f8 lea -0x8(%ebp),%eax
1124ea: 50 push %eax
1124eb: ff 75 08 pushl 0x8(%ebp)
1124ee: 68 60 5d 13 00 push $0x135d60
1124f3: e8 e8 46 00 00 call 116be0 <_Objects_Get>
1124f8: 89 c3 mov %eax,%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1124fa: 83 c4 10 add $0x10,%esp
1124fd: 8b 4d f8 mov -0x8(%ebp),%ecx
112500: 85 c9 test %ecx,%ecx
112502: 75 3c jne 112540 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
112504: 83 ec 08 sub $0x8,%esp
112507: 50 push %eax
112508: 68 60 5d 13 00 push $0x135d60
11250d: e8 1a 42 00 00 call 11672c <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
112512: 83 c4 0c add $0xc,%esp
112515: 6a 05 push $0x5
112517: 6a 00 push $0x0
112519: 8d 43 14 lea 0x14(%ebx),%eax
11251c: 50 push %eax
11251d: e8 96 30 00 00 call 1155b8 <_CORE_message_queue_Close>
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
Heap_Control *the_heap,
void *starting_address,
112522: 58 pop %eax
112523: 5a pop %edx
112524: 53 push %ebx
112525: 68 60 5d 13 00 push $0x135d60
11252a: e8 3d 45 00 00 call 116a6c <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
11252f: e8 f0 4e 00 00 call 117424 <_Thread_Enable_dispatch>
112534: 31 c0 xor %eax,%eax
112536: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112539: 8b 5d fc mov -0x4(%ebp),%ebx
11253c: c9 leave
11253d: c3 ret
11253e: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112540: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112545: 8b 5d fc mov -0x4(%ebp),%ebx
112548: c9 leave
112549: c3 ret
0011254c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
11254c: 55 push %ebp
11254d: 89 e5 mov %esp,%ebp
11254f: 53 push %ebx
112550: 83 ec 14 sub $0x14,%esp
112553: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
112556: 85 db test %ebx,%ebx
112558: 74 46 je 1125a0 <rtems_message_queue_flush+0x54><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
11255a: 51 push %ecx
11255b: 8d 45 f8 lea -0x8(%ebp),%eax
11255e: 50 push %eax
11255f: ff 75 08 pushl 0x8(%ebp)
112562: 68 60 5d 13 00 push $0x135d60
112567: e8 74 46 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
11256c: 83 c4 10 add $0x10,%esp
11256f: 8b 55 f8 mov -0x8(%ebp),%edx
112572: 85 d2 test %edx,%edx
112574: 74 0a je 112580 <rtems_message_queue_flush+0x34>
112576: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11257b: 8b 5d fc mov -0x4(%ebp),%ebx
11257e: c9 leave
11257f: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
112580: 83 ec 0c sub $0xc,%esp
112583: 83 c0 14 add $0x14,%eax
112586: 50 push %eax
112587: e8 68 30 00 00 call 1155f4 <_CORE_message_queue_Flush>
11258c: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
11258e: e8 91 4e 00 00 call 117424 <_Thread_Enable_dispatch>
112593: 31 c0 xor %eax,%eax
112595: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112598: 8b 5d fc mov -0x4(%ebp),%ebx
11259b: c9 leave
11259c: c3 ret
11259d: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125a0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125a5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1125a8: c9 leave <== NOT EXECUTED
1125a9: c3 ret <== NOT EXECUTED
001125ac <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
Objects_Id id,
uint32_t *count
)
{
1125ac: 55 push %ebp
1125ad: 89 e5 mov %esp,%ebp
1125af: 53 push %ebx
1125b0: 83 ec 14 sub $0x14,%esp
1125b3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125b6: 85 db test %ebx,%ebx
1125b8: 74 3a je 1125f4 <rtems_message_queue_get_number_pending+0x48><== NEVER TAKEN
1125ba: 51 push %ecx
1125bb: 8d 45 f8 lea -0x8(%ebp),%eax
1125be: 50 push %eax
1125bf: ff 75 08 pushl 0x8(%ebp)
1125c2: 68 60 5d 13 00 push $0x135d60
1125c7: e8 14 46 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1125cc: 83 c4 10 add $0x10,%esp
1125cf: 8b 55 f8 mov -0x8(%ebp),%edx
1125d2: 85 d2 test %edx,%edx
1125d4: 74 0a je 1125e0 <rtems_message_queue_get_number_pending+0x34>
1125d6: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125db: 8b 5d fc mov -0x4(%ebp),%ebx
1125de: c9 leave
1125df: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
1125e0: 8b 40 5c mov 0x5c(%eax),%eax
1125e3: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
1125e5: e8 3a 4e 00 00 call 117424 <_Thread_Enable_dispatch>
1125ea: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125ec: 8b 5d fc mov -0x4(%ebp),%ebx
1125ef: c9 leave
1125f0: c3 ret
1125f1: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
1125f4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1125f9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1125fc: c9 leave <== NOT EXECUTED
1125fd: c3 ret <== NOT EXECUTED
00112624 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
112624: 55 push %ebp
112625: 89 e5 mov %esp,%ebp
112627: 57 push %edi
112628: 56 push %esi
112629: 53 push %ebx
11262a: 83 ec 1c sub $0x1c,%esp
11262d: 8b 7d 0c mov 0xc(%ebp),%edi
112630: 8b 75 10 mov 0x10(%ebp),%esi
112633: 8b 5d 14 mov 0x14(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
112636: 85 ff test %edi,%edi
112638: 74 6e je 1126a8 <rtems_message_queue_receive+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
11263a: 85 f6 test %esi,%esi
11263c: 74 6a je 1126a8 <rtems_message_queue_receive+0x84>
11263e: 51 push %ecx
11263f: 8d 45 f0 lea -0x10(%ebp),%eax
112642: 50 push %eax
112643: ff 75 08 pushl 0x8(%ebp)
112646: 68 60 5d 13 00 push $0x135d60
11264b: e8 90 45 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112650: 83 c4 10 add $0x10,%esp
112653: 8b 55 f0 mov -0x10(%ebp),%edx
112656: 85 d2 test %edx,%edx
112658: 75 3e jne 112698 <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
11265a: 83 ec 08 sub $0x8,%esp
11265d: ff 75 18 pushl 0x18(%ebp)
112660: 83 f3 01 xor $0x1,%ebx
112663: 83 e3 01 and $0x1,%ebx
112666: 53 push %ebx
112667: 56 push %esi
112668: 57 push %edi
112669: ff 70 08 pushl 0x8(%eax)
11266c: 83 c0 14 add $0x14,%eax
11266f: 50 push %eax
112670: e8 9b 30 00 00 call 115710 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
112675: 83 c4 20 add $0x20,%esp
112678: e8 a7 4d 00 00 call 117424 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
11267d: 83 ec 0c sub $0xc,%esp
112680: a1 fc 5a 13 00 mov 0x135afc,%eax
112685: ff 70 34 pushl 0x34(%eax)
112688: e8 a7 00 00 00 call 112734 <_Message_queue_Translate_core_message_queue_return_code>
11268d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112690: 8d 65 f4 lea -0xc(%ebp),%esp
112693: 5b pop %ebx
112694: 5e pop %esi
112695: 5f pop %edi
112696: c9 leave
112697: c3 ret
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112698: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11269d: 8d 65 f4 lea -0xc(%ebp),%esp
1126a0: 5b pop %ebx
1126a1: 5e pop %esi
1126a2: 5f pop %edi
1126a3: c9 leave
1126a4: c3 ret
1126a5: 8d 76 00 lea 0x0(%esi),%esi
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
1126a8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1126ad: 8d 65 f4 lea -0xc(%ebp),%esp
1126b0: 5b pop %ebx
1126b1: 5e pop %esi
1126b2: 5f pop %edi
1126b3: c9 leave
1126b4: c3 ret
0010a0e4 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
Objects_Id id,
const void *buffer,
size_t size
)
{
10a0e4: 55 push %ebp
10a0e5: 89 e5 mov %esp,%ebp
10a0e7: 56 push %esi
10a0e8: 53 push %ebx
10a0e9: 83 ec 10 sub $0x10,%esp
10a0ec: 8b 75 08 mov 0x8(%ebp),%esi
10a0ef: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10a0f2: 85 db test %ebx,%ebx
10a0f4: 74 5e je 10a154 <rtems_message_queue_send+0x70><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
10a0f6: 51 push %ecx
10a0f7: 8d 45 f4 lea -0xc(%ebp),%eax
10a0fa: 50 push %eax
10a0fb: 56 push %esi
10a0fc: 68 80 e9 11 00 push $0x11e980
10a101: e8 a2 19 00 00 call 10baa8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10a106: 83 c4 10 add $0x10,%esp
10a109: 8b 55 f4 mov -0xc(%ebp),%edx
10a10c: 85 d2 test %edx,%edx
10a10e: 74 0c je 10a11c <rtems_message_queue_send+0x38>
10a110: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a115: 8d 65 f8 lea -0x8(%ebp),%esp
10a118: 5b pop %ebx
10a119: 5e pop %esi
10a11a: c9 leave
10a11b: c3 ret
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory for
* the heap
10a11c: 6a 00 push $0x0
10a11e: 6a 00 push $0x0
10a120: 68 ff ff ff 7f push $0x7fffffff
10a125: 6a 00 push $0x0
10a127: 56 push %esi
10a128: ff 75 10 pushl 0x10(%ebp)
10a12b: 53 push %ebx
10a12c: 83 c0 14 add $0x14,%eax
10a12f: 50 push %eax
10a130: e8 93 0c 00 00 call 10adc8 <_CORE_message_queue_Submit>
10a135: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10a137: 83 c4 20 add $0x20,%esp
10a13a: e8 ad 21 00 00 call 10c2ec <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10a13f: 83 ec 0c sub $0xc,%esp
10a142: 53 push %ebx
10a143: e8 18 00 00 00 call 10a160 <_Message_queue_Translate_core_message_queue_return_code>
10a148: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a14b: 8d 65 f8 lea -0x8(%ebp),%esp
10a14e: 5b pop %ebx
10a14f: 5e pop %esi
10a150: c9 leave
10a151: c3 ret
10a152: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10a154: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a159: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a15c: 5b pop %ebx <== NOT EXECUTED
10a15d: 5e pop %esi <== NOT EXECUTED
10a15e: c9 leave <== NOT EXECUTED
10a15f: c3 ret <== NOT EXECUTED
00112744 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
Objects_Id id,
const void *buffer,
size_t size
)
{
112744: 55 push %ebp
112745: 89 e5 mov %esp,%ebp
112747: 56 push %esi
112748: 53 push %ebx
112749: 83 ec 10 sub $0x10,%esp
11274c: 8b 75 08 mov 0x8(%ebp),%esi
11274f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
112752: 85 db test %ebx,%ebx
112754: 74 5e je 1127b4 <rtems_message_queue_urgent+0x70><== NEVER TAKEN
* @param[in] size is the size in bytes of the memory area to add
* @return a status indicating success or the reason for failure
*/
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
112756: 51 push %ecx
112757: 8d 45 f4 lea -0xc(%ebp),%eax
11275a: 50 push %eax
11275b: 56 push %esi
11275c: 68 60 5d 13 00 push $0x135d60
112761: e8 7a 44 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
112766: 83 c4 10 add $0x10,%esp
112769: 8b 55 f4 mov -0xc(%ebp),%edx
11276c: 85 d2 test %edx,%edx
11276e: 74 0c je 11277c <rtems_message_queue_urgent+0x38>
112770: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112775: 8d 65 f8 lea -0x8(%ebp),%esp
112778: 5b pop %ebx
112779: 5e pop %esi
11277a: c9 leave
11277b: c3 ret
size_t size
11277c: 6a 00 push $0x0
11277e: 6a 00 push $0x0
112780: 68 00 00 00 80 push $0x80000000
112785: 6a 00 push $0x0
112787: 56 push %esi
112788: ff 75 10 pushl 0x10(%ebp)
11278b: 53 push %ebx
11278c: 83 c0 14 add $0x14,%eax
11278f: 50 push %eax
112790: e8 a7 30 00 00 call 11583c <_CORE_message_queue_Submit>
112795: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
112797: 83 c4 20 add $0x20,%esp
11279a: e8 85 4c 00 00 call 117424 <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
11279f: 83 ec 0c sub $0xc,%esp
1127a2: 53 push %ebx
1127a3: e8 8c ff ff ff call 112734 <_Message_queue_Translate_core_message_queue_return_code>
1127a8: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1127ab: 8d 65 f8 lea -0x8(%ebp),%esp
1127ae: 5b pop %ebx
1127af: 5e pop %esi
1127b0: c9 leave
1127b1: c3 ret
1127b2: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1127b4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1127b9: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1127bc: 5b pop %ebx <== NOT EXECUTED
1127bd: 5e pop %esi <== NOT EXECUTED
1127be: c9 leave <== NOT EXECUTED
1127bf: c3 ret <== NOT EXECUTED
0010b720 <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
uint32_t the_api,
uint32_t the_class
)
{
10b720: 55 push %ebp
10b721: 89 e5 mov %esp,%ebp
10b723: 83 ec 08 sub $0x8,%esp
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
10b726: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10b72a: 74 2c je 10b758 <rtems_object_get_api_class_name+0x38>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
10b72c: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b730: 74 0a je 10b73c <rtems_object_get_api_class_name+0x1c>
10b732: b8 90 c5 11 00 mov $0x11c590,%eax
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
10b737: c9 leave
10b738: c3 ret
10b739: 8d 76 00 lea 0x0(%esi),%esi
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
10b73c: b8 e0 14 12 00 mov $0x1214e0,%eax
else if ( the_api == OBJECTS_ITRON_API )
api_assoc = rtems_object_api_itron_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
10b741: 83 ec 08 sub $0x8,%esp
10b744: ff 75 0c pushl 0xc(%ebp)
10b747: 50 push %eax
10b748: e8 3b 47 00 00 call 10fe88 <rtems_assoc_ptr_by_local>
if ( class_assoc )
10b74d: 83 c4 10 add $0x10,%esp
10b750: 85 c0 test %eax,%eax
10b752: 74 0c je 10b760 <rtems_object_get_api_class_name+0x40>
return class_assoc->name;
10b754: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10b756: c9 leave
10b757: c3 ret
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
10b758: b8 c0 14 12 00 mov $0x1214c0,%eax
10b75d: eb e2 jmp 10b741 <rtems_object_get_api_class_name+0x21>
10b75f: 90 nop
api_assoc = rtems_object_api_itron_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
10b760: b8 98 c5 11 00 mov $0x11c598,%eax
return class_assoc->name;
return "BAD CLASS";
}
10b765: c9 leave
10b766: c3 ret
0010b768 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
uint32_t api
)
{
10b768: 55 push %ebp
10b769: 89 e5 mov %esp,%ebp
10b76b: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10b76e: ff 75 08 pushl 0x8(%ebp)
10b771: 68 60 15 12 00 push $0x121560
10b776: e8 0d 47 00 00 call 10fe88 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10b77b: 83 c4 10 add $0x10,%esp
10b77e: 85 c0 test %eax,%eax
10b780: 74 06 je 10b788 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10b782: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10b784: c9 leave
10b785: c3 ret
10b786: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
10b788: b8 98 c5 11 00 mov $0x11c598,%eax
return api_assoc->name;
return "BAD CLASS";
}
10b78d: c9 leave
10b78e: c3 ret
0010b7d0 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
uint32_t the_api,
uint32_t the_class,
rtems_object_api_class_information *info
)
{
10b7d0: 55 push %ebp
10b7d1: 89 e5 mov %esp,%ebp
10b7d3: 56 push %esi
10b7d4: 53 push %ebx
10b7d5: 8b 75 10 mov 0x10(%ebp),%esi
uint32_t i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10b7d8: 85 f6 test %esi,%esi
10b7da: 74 58 je 10b834 <rtems_object_get_class_information+0x64>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10b7dc: 83 ec 08 sub $0x8,%esp
10b7df: ff 75 0c pushl 0xc(%ebp)
10b7e2: ff 75 08 pushl 0x8(%ebp)
10b7e5: e8 22 1a 00 00 call 10d20c <_Objects_Get_information>
10b7ea: 89 c2 mov %eax,%edx
if ( !obj_info )
10b7ec: 83 c4 10 add $0x10,%esp
10b7ef: 85 c0 test %eax,%eax
10b7f1: 74 4d je 10b840 <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10b7f3: 8b 40 08 mov 0x8(%eax),%eax
10b7f6: 89 06 mov %eax,(%esi)
info->maximum_id = obj_info->maximum_id;
10b7f8: 8b 42 0c mov 0xc(%edx),%eax
10b7fb: 89 46 04 mov %eax,0x4(%esi)
info->auto_extend = obj_info->auto_extend;
10b7fe: 8a 42 12 mov 0x12(%edx),%al
10b801: 88 46 0c mov %al,0xc(%esi)
info->maximum = obj_info->maximum;
10b804: 0f b7 42 10 movzwl 0x10(%edx),%eax
10b808: 89 46 08 mov %eax,0x8(%esi)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10b80b: 85 c0 test %eax,%eax
10b80d: 74 3d je 10b84c <rtems_object_get_class_information+0x7c><== NEVER TAKEN
10b80f: 8b 5a 1c mov 0x1c(%edx),%ebx
10b812: 31 c9 xor %ecx,%ecx
10b814: ba 01 00 00 00 mov $0x1,%edx
10b819: 8d 76 00 lea 0x0(%esi),%esi
if ( !obj_info->local_table[i] )
unallocated++;
10b81c: 83 3c 93 01 cmpl $0x1,(%ebx,%edx,4)
10b820: 83 d1 00 adc $0x0,%ecx
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++ )
10b823: 42 inc %edx
10b824: 39 d0 cmp %edx,%eax
10b826: 73 f4 jae 10b81c <rtems_object_get_class_information+0x4c>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10b828: 89 4e 10 mov %ecx,0x10(%esi)
10b82b: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10b82d: 8d 65 f8 lea -0x8(%ebp),%esp
10b830: 5b pop %ebx
10b831: 5e pop %esi
10b832: c9 leave
10b833: c3 ret
uint32_t i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10b834: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10b839: 8d 65 f8 lea -0x8(%ebp),%esp
10b83c: 5b pop %ebx
10b83d: 5e pop %esi
10b83e: c9 leave
10b83f: c3 ret
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
10b840: b8 0a 00 00 00 mov $0xa,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10b845: 8d 65 f8 lea -0x8(%ebp),%esp
10b848: 5b pop %ebx
10b849: 5e pop %esi
10b84a: c9 leave
10b84b: 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++ )
10b84c: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10b84e: eb d8 jmp 10b828 <rtems_object_get_class_information+0x58><== NOT EXECUTED
0010b04c <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10b04c: 55 push %ebp
10b04d: 89 e5 mov %esp,%ebp
10b04f: 53 push %ebx
10b050: 83 ec 14 sub $0x14,%esp
10b053: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10b056: 85 db test %ebx,%ebx
10b058: 74 26 je 10b080 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10b05a: 83 ec 08 sub $0x8,%esp
10b05d: 8d 45 f8 lea -0x8(%ebp),%eax
10b060: 50 push %eax
10b061: ff 75 08 pushl 0x8(%ebp)
10b064: e8 d3 1a 00 00 call 10cb3c <_Objects_Id_to_name>
*name = name_u.name_u32;
10b069: 8b 55 f8 mov -0x8(%ebp),%edx
10b06c: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10b06e: 8b 04 85 4c b5 11 00 mov 0x11b54c(,%eax,4),%eax
10b075: 83 c4 10 add $0x10,%esp
}
10b078: 8b 5d fc mov -0x4(%ebp),%ebx
10b07b: c9 leave
10b07c: c3 ret
10b07d: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10b080: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
10b085: 8b 5d fc mov -0x4(%ebp),%ebx
10b088: c9 leave
10b089: c3 ret
0010b8a8 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10b8a8: 55 push %ebp
10b8a9: 89 e5 mov %esp,%ebp
10b8ab: 57 push %edi
10b8ac: 56 push %esi
10b8ad: 53 push %ebx
10b8ae: 83 ec 1c sub $0x1c,%esp
10b8b1: 8b 45 08 mov 0x8(%ebp),%eax
10b8b4: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10b8b7: 85 ff test %edi,%edi
10b8b9: 74 65 je 10b920 <rtems_object_set_name+0x78><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10b8bb: 85 c0 test %eax,%eax
10b8bd: 74 45 je 10b904 <rtems_object_set_name+0x5c>
10b8bf: 89 c3 mov %eax,%ebx
information = _Objects_Get_information_id( tmpId );
10b8c1: 83 ec 0c sub $0xc,%esp
10b8c4: 53 push %ebx
10b8c5: e8 22 19 00 00 call 10d1ec <_Objects_Get_information_id>
10b8ca: 89 c6 mov %eax,%esi
if ( !information )
10b8cc: 83 c4 10 add $0x10,%esp
10b8cf: 85 c0 test %eax,%eax
10b8d1: 74 3d je 10b910 <rtems_object_set_name+0x68>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10b8d3: 50 push %eax
10b8d4: 8d 45 f0 lea -0x10(%ebp),%eax
10b8d7: 50 push %eax
10b8d8: 53 push %ebx
10b8d9: 56 push %esi
10b8da: e8 cd 1a 00 00 call 10d3ac <_Objects_Get>
switch ( location ) {
10b8df: 83 c4 10 add $0x10,%esp
10b8e2: 8b 4d f0 mov -0x10(%ebp),%ecx
10b8e5: 85 c9 test %ecx,%ecx
10b8e7: 75 27 jne 10b910 <rtems_object_set_name+0x68>
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10b8e9: 52 push %edx
10b8ea: 57 push %edi
10b8eb: 50 push %eax
10b8ec: 56 push %esi
10b8ed: e8 32 1d 00 00 call 10d624 <_Objects_Set_name>
_Thread_Enable_dispatch();
10b8f2: e8 81 24 00 00 call 10dd78 <_Thread_Enable_dispatch>
10b8f7: 31 c0 xor %eax,%eax
10b8f9: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b8fc: 8d 65 f4 lea -0xc(%ebp),%esp
10b8ff: 5b pop %ebx
10b900: 5e pop %esi
10b901: 5f pop %edi
10b902: c9 leave
10b903: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10b904: a1 5c 38 12 00 mov 0x12385c,%eax
10b909: 8b 58 08 mov 0x8(%eax),%ebx
10b90c: eb b3 jmp 10b8c1 <rtems_object_set_name+0x19>
10b90e: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10b910: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b915: 8d 65 f4 lea -0xc(%ebp),%esp
10b918: 5b pop %ebx
10b919: 5e pop %esi
10b91a: 5f pop %edi
10b91b: c9 leave
10b91c: c3 ret
10b91d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10b920: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10b925: eb d5 jmp 10b8fc <rtems_object_set_name+0x54><== NOT EXECUTED
001127c0 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1127c0: 55 push %ebp
1127c1: 89 e5 mov %esp,%ebp
1127c3: 56 push %esi
1127c4: 53 push %ebx
1127c5: 8b 75 08 mov 0x8(%ebp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1127c8: 85 f6 test %esi,%esi
1127ca: 74 48 je 112814 <rtems_partition_create+0x54>
return RTEMS_INVALID_NAME;
if ( !starting_address )
1127cc: 8b 5d 0c mov 0xc(%ebp),%ebx
1127cf: 85 db test %ebx,%ebx
1127d1: 74 27 je 1127fa <rtems_partition_create+0x3a><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !id )
1127d3: 8b 4d 1c mov 0x1c(%ebp),%ecx
1127d6: 85 c9 test %ecx,%ecx
1127d8: 74 20 je 1127fa <rtems_partition_create+0x3a><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
1127da: 8b 55 10 mov 0x10(%ebp),%edx
1127dd: 85 d2 test %edx,%edx
1127df: 74 27 je 112808 <rtems_partition_create+0x48>
1127e1: 8b 45 14 mov 0x14(%ebp),%eax
1127e4: 85 c0 test %eax,%eax
1127e6: 74 20 je 112808 <rtems_partition_create+0x48>
1127e8: 8b 45 14 mov 0x14(%ebp),%eax
1127eb: 39 45 10 cmp %eax,0x10(%ebp)
1127ee: 72 18 jb 112808 <rtems_partition_create+0x48>
1127f0: a8 03 test $0x3,%al
1127f2: 75 14 jne 112808 <rtems_partition_create+0x48>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
1127f4: f6 45 0c 03 testb $0x3,0xc(%ebp)
1127f8: 74 26 je 112820 <rtems_partition_create+0x60>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1127fa: b8 09 00 00 00 mov $0x9,%eax
}
1127ff: 8d 65 f8 lea -0x8(%ebp),%esp
112802: 5b pop %ebx
112803: 5e pop %esi
112804: c9 leave
112805: c3 ret
112806: 66 90 xchg %ax,%ax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
112808: b8 08 00 00 00 mov $0x8,%eax
}
11280d: 8d 65 f8 lea -0x8(%ebp),%esp
112810: 5b pop %ebx
112811: 5e pop %esi
112812: c9 leave
112813: c3 ret
Objects_Id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
112814: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
112819: 8d 65 f8 lea -0x8(%ebp),%esp
11281c: 5b pop %ebx
11281d: 5e pop %esi
11281e: c9 leave
11281f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
112820: a1 38 5a 13 00 mov 0x135a38,%eax
112825: 40 inc %eax
112826: a3 38 5a 13 00 mov %eax,0x135a38
* Returns TRUE if the @a starting_address is in the heap, and FALSE
* otherwise.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the user block
* to obtain the size of
11282b: 83 ec 0c sub $0xc,%esp
11282e: 68 40 58 13 00 push $0x135840
112833: e8 74 3e 00 00 call 1166ac <_Objects_Allocate>
112838: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
11283a: 83 c4 10 add $0x10,%esp
11283d: 85 c0 test %eax,%eax
11283f: 74 5f je 1128a0 <rtems_partition_create+0xe0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
112841: 8b 45 0c mov 0xc(%ebp),%eax
112844: 89 43 10 mov %eax,0x10(%ebx)
the_partition->length = length;
112847: 8b 45 10 mov 0x10(%ebp),%eax
11284a: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
11284d: 8b 45 14 mov 0x14(%ebp),%eax
112850: 89 43 18 mov %eax,0x18(%ebx)
the_partition->attribute_set = attribute_set;
112853: 8b 45 18 mov 0x18(%ebp),%eax
112856: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
112859: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
112860: ff 75 14 pushl 0x14(%ebp)
112863: 8b 45 10 mov 0x10(%ebp),%eax
112866: 31 d2 xor %edx,%edx
112868: f7 75 14 divl 0x14(%ebp)
11286b: 50 push %eax
11286c: ff 75 0c pushl 0xc(%ebp)
11286f: 8d 43 24 lea 0x24(%ebx),%eax
112872: 50 push %eax
112873: e8 78 2c 00 00 call 1154f0 <_Chain_Initialize>
112878: 8b 4b 08 mov 0x8(%ebx),%ecx
11287b: 0f b7 d1 movzwl %cx,%edx
11287e: a1 5c 58 13 00 mov 0x13585c,%eax
112883: 89 1c 90 mov %ebx,(%eax,%edx,4)
112886: 89 73 0c mov %esi,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
112889: 8b 45 1c mov 0x1c(%ebp),%eax
11288c: 89 08 mov %ecx,(%eax)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
11288e: e8 91 4b 00 00 call 117424 <_Thread_Enable_dispatch>
112893: 31 c0 xor %eax,%eax
112895: 83 c4 10 add $0x10,%esp
112898: e9 70 ff ff ff jmp 11280d <rtems_partition_create+0x4d>
11289d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1128a0: e8 7f 4b 00 00 call 117424 <_Thread_Enable_dispatch>
1128a5: b8 05 00 00 00 mov $0x5,%eax
1128aa: e9 5e ff ff ff jmp 11280d <rtems_partition_create+0x4d>
001128b0 <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
Objects_Id id
)
{
1128b0: 55 push %ebp
1128b1: 89 e5 mov %esp,%ebp
1128b3: 53 push %ebx
1128b4: 83 ec 18 sub $0x18,%esp
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
1128b7: 8d 45 f8 lea -0x8(%ebp),%eax
1128ba: 50 push %eax
1128bb: ff 75 08 pushl 0x8(%ebp)
1128be: 68 40 58 13 00 push $0x135840
1128c3: e8 18 43 00 00 call 116be0 <_Objects_Get>
1128c8: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
1128ca: 83 c4 10 add $0x10,%esp
1128cd: 8b 45 f8 mov -0x8(%ebp),%eax
1128d0: 85 c0 test %eax,%eax
1128d2: 74 0c je 1128e0 <rtems_partition_delete+0x30>
1128d4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1128d9: 8b 5d fc mov -0x4(%ebp),%ebx
1128dc: c9 leave
1128dd: c3 ret
1128de: 66 90 xchg %ax,%ax
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
1128e0: 8b 4b 20 mov 0x20(%ebx),%ecx
1128e3: 85 c9 test %ecx,%ecx
1128e5: 74 11 je 1128f8 <rtems_partition_delete+0x48>
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1128e7: e8 38 4b 00 00 call 117424 <_Thread_Enable_dispatch>
1128ec: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1128f1: 8b 5d fc mov -0x4(%ebp),%ebx
1128f4: c9 leave
1128f5: c3 ret
1128f6: 66 90 xchg %ax,%ax
the_partition = _Partition_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
_Objects_Close( &_Partition_Information, &the_partition->Object );
1128f8: 83 ec 08 sub $0x8,%esp
1128fb: 53 push %ebx
1128fc: 68 40 58 13 00 push $0x135840
112901: e8 26 3e 00 00 call 11672c <_Objects_Close>
size_t *size
);
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
112906: 58 pop %eax
112907: 5a pop %edx
112908: 53 push %ebx
112909: 68 40 58 13 00 push $0x135840
11290e: e8 59 41 00 00 call 116a6c <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
112913: e8 0c 4b 00 00 call 117424 <_Thread_Enable_dispatch>
112918: 31 c0 xor %eax,%eax
11291a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11291d: 8b 5d fc mov -0x4(%ebp),%ebx
112920: c9 leave
112921: c3 ret
00112924 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
Objects_Id id,
void **buffer
)
{
112924: 55 push %ebp
112925: 89 e5 mov %esp,%ebp
112927: 57 push %edi
112928: 56 push %esi
112929: 53 push %ebx
11292a: 83 ec 1c sub $0x1c,%esp
11292d: 8b 7d 0c mov 0xc(%ebp),%edi
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
112930: 85 ff test %edi,%edi
112932: 74 58 je 11298c <rtems_partition_get_buffer+0x68><== NEVER TAKEN
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
112934: 52 push %edx
112935: 8d 45 f0 lea -0x10(%ebp),%eax
112938: 50 push %eax
112939: ff 75 08 pushl 0x8(%ebp)
11293c: 68 40 58 13 00 push $0x135840
112941: e8 9a 42 00 00 call 116be0 <_Objects_Get>
112946: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
112948: 83 c4 10 add $0x10,%esp
11294b: 8b 45 f0 mov -0x10(%ebp),%eax
11294e: 85 c0 test %eax,%eax
112950: 75 2a jne 11297c <rtems_partition_get_buffer+0x58>
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
112952: 83 ec 0c sub $0xc,%esp
112955: 8d 43 24 lea 0x24(%ebx),%eax
112958: 50 push %eax
112959: e8 6a 2b 00 00 call 1154c8 <_Chain_Get>
11295e: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
112960: 83 c4 10 add $0x10,%esp
112963: 85 c0 test %eax,%eax
112965: 74 35 je 11299c <rtems_partition_get_buffer+0x78>
the_partition->number_of_used_blocks += 1;
112967: ff 43 20 incl 0x20(%ebx)
_Thread_Enable_dispatch();
11296a: e8 b5 4a 00 00 call 117424 <_Thread_Enable_dispatch>
*buffer = the_buffer;
11296f: 89 37 mov %esi,(%edi)
112971: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112973: 8d 65 f4 lea -0xc(%ebp),%esp
112976: 5b pop %ebx
112977: 5e pop %esi
112978: 5f pop %edi
112979: c9 leave
11297a: c3 ret
11297b: 90 nop
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
11297c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112981: 8d 65 f4 lea -0xc(%ebp),%esp
112984: 5b pop %ebx
112985: 5e pop %esi
112986: 5f pop %edi
112987: c9 leave
112988: c3 ret
112989: 8d 76 00 lea 0x0(%esi),%esi
{
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11298c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112991: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112994: 5b pop %ebx <== NOT EXECUTED
112995: 5e pop %esi <== NOT EXECUTED
112996: 5f pop %edi <== NOT EXECUTED
112997: c9 leave <== NOT EXECUTED
112998: c3 ret <== NOT EXECUTED
112999: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11299c: e8 83 4a 00 00 call 117424 <_Thread_Enable_dispatch>
1129a1: b8 0d 00 00 00 mov $0xd,%eax
1129a6: eb d9 jmp 112981 <rtems_partition_get_buffer+0x5d>
001129cc <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
Objects_Id id,
void *buffer
)
{
1129cc: 55 push %ebp
1129cd: 89 e5 mov %esp,%ebp
1129cf: 53 push %ebx
1129d0: 83 ec 18 sub $0x18,%esp
);
/**
* This routine returns the block of memory which begins
* at @a starting_address to @a the_heap. Any coalescing which is
* possible with the freeing of this routine is performed.
1129d3: 8d 45 f8 lea -0x8(%ebp),%eax
1129d6: 50 push %eax
1129d7: ff 75 08 pushl 0x8(%ebp)
1129da: 68 40 58 13 00 push $0x135840
1129df: e8 fc 41 00 00 call 116be0 <_Objects_Get>
1129e4: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
1129e6: 83 c4 10 add $0x10,%esp
1129e9: 8b 45 f8 mov -0x8(%ebp),%eax
1129ec: 85 c0 test %eax,%eax
1129ee: 74 0c je 1129fc <rtems_partition_return_buffer+0x30>
1129f0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1129f5: 8b 5d fc mov -0x4(%ebp),%ebx
1129f8: c9 leave
1129f9: c3 ret
1129fa: 66 90 xchg %ax,%ax
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
1129fc: 8b 53 10 mov 0x10(%ebx),%edx
1129ff: 8b 43 14 mov 0x14(%ebx),%eax
Heap_Control *the_heap,
void *starting_address,
size_t *size
);
/**
112a02: 39 55 0c cmp %edx,0xc(%ebp)
112a05: 73 11 jae 112a18 <rtems_partition_return_buffer+0x4c>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
112a07: e8 18 4a 00 00 call 117424 <_Thread_Enable_dispatch>
112a0c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a11: 8b 5d fc mov -0x4(%ebp),%ebx
112a14: c9 leave
112a15: c3 ret
112a16: 66 90 xchg %ax,%ax
112a18: 8d 04 02 lea (%edx,%eax,1),%eax
112a1b: 39 45 0c cmp %eax,0xc(%ebp)
112a1e: 77 e7 ja 112a07 <rtems_partition_return_buffer+0x3b><== NEVER TAKEN
Heap_Control *the_heap,
size_t size
);
/**
* This function attempts to allocate a memory block of @a size bytes from
112a20: 8b 45 0c mov 0xc(%ebp),%eax
112a23: 29 d0 sub %edx,%eax
112a25: 31 d2 xor %edx,%edx
112a27: f7 73 18 divl 0x18(%ebx)
112a2a: 85 d2 test %edx,%edx
112a2c: 75 d9 jne 112a07 <rtems_partition_return_buffer+0x3b>
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
static inline uint32_t _Protected_heap_Initialize(
112a2e: 83 ec 08 sub $0x8,%esp
112a31: ff 75 0c pushl 0xc(%ebp)
112a34: 8d 43 24 lea 0x24(%ebx),%eax
112a37: 50 push %eax
112a38: e8 67 2a 00 00 call 1154a4 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
112a3d: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
112a40: e8 df 49 00 00 call 117424 <_Thread_Enable_dispatch>
112a45: 31 c0 xor %eax,%eax
112a47: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a4a: 8b 5d fc mov -0x4(%ebp),%ebx
112a4d: c9 leave
112a4e: c3 ret
00111df8 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
Objects_Id *id
)
{
111df8: 55 push %ebp
111df9: 89 e5 mov %esp,%ebp
111dfb: 56 push %esi
111dfc: 53 push %ebx
111dfd: 8b 75 08 mov 0x8(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
111e00: 85 f6 test %esi,%esi
111e02: 74 20 je 111e24 <rtems_port_create+0x2c>
return RTEMS_INVALID_NAME;
if ( !id )
111e04: 8b 45 18 mov 0x18(%ebp),%eax
111e07: 85 c0 test %eax,%eax
111e09: 74 0a je 111e15 <rtems_port_create+0x1d><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
111e0b: 8b 45 10 mov 0x10(%ebp),%eax
111e0e: 0b 45 0c or 0xc(%ebp),%eax
111e11: a8 03 test $0x3,%al
111e13: 74 1b je 111e30 <rtems_port_create+0x38>
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
111e15: b8 09 00 00 00 mov $0x9,%eax
}
111e1a: 8d 65 f8 lea -0x8(%ebp),%esp
111e1d: 5b pop %ebx
111e1e: 5e pop %esi
111e1f: c9 leave
111e20: c3 ret
111e21: 8d 76 00 lea 0x0(%esi),%esi
Objects_Id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
111e24: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111e29: 8d 65 f8 lea -0x8(%ebp),%esp
111e2c: 5b pop %ebx
111e2d: 5e pop %esi
111e2e: c9 leave
111e2f: c3 ret
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
111e30: a1 38 5a 13 00 mov 0x135a38,%eax
111e35: 40 inc %eax
111e36: a3 38 5a 13 00 mov %eax,0x135a38
#ifdef __cplusplus
extern "C" {
#endif
/**
* This routine initializes @a the_heap record to manage the
111e3b: 83 ec 0c sub $0xc,%esp
111e3e: 68 00 58 13 00 push $0x135800
111e43: e8 64 48 00 00 call 1166ac <_Objects_Allocate>
111e48: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
111e4a: 83 c4 10 add $0x10,%esp
111e4d: 85 c0 test %eax,%eax
111e4f: 74 37 je 111e88 <rtems_port_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
111e51: 8b 45 0c mov 0xc(%ebp),%eax
111e54: 89 43 10 mov %eax,0x10(%ebx)
the_port->external_base = external_start;
111e57: 8b 45 10 mov 0x10(%ebp),%eax
111e5a: 89 43 14 mov %eax,0x14(%ebx)
the_port->length = length - 1;
111e5d: 8b 45 14 mov 0x14(%ebp),%eax
111e60: 48 dec %eax
111e61: 89 43 18 mov %eax,0x18(%ebx)
111e64: 8b 4b 08 mov 0x8(%ebx),%ecx
111e67: 0f b7 d1 movzwl %cx,%edx
111e6a: a1 1c 58 13 00 mov 0x13581c,%eax
111e6f: 89 1c 90 mov %ebx,(%eax,%edx,4)
111e72: 89 73 0c mov %esi,0xc(%ebx)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
111e75: 8b 45 18 mov 0x18(%ebp),%eax
111e78: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
111e7a: e8 a5 55 00 00 call 117424 <_Thread_Enable_dispatch>
111e7f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
111e81: 8d 65 f8 lea -0x8(%ebp),%esp
111e84: 5b pop %ebx
111e85: 5e pop %esi
111e86: c9 leave
111e87: c3 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
111e88: e8 97 55 00 00 call 117424 <_Thread_Enable_dispatch>
111e8d: b8 05 00 00 00 mov $0x5,%eax
111e92: eb 86 jmp 111e1a <rtems_port_create+0x22>
00111e94 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
Objects_Id id
)
{
111e94: 55 push %ebp
111e95: 89 e5 mov %esp,%ebp
111e97: 53 push %ebx
111e98: 83 ec 18 sub $0x18,%esp
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111e9b: 8d 45 f8 lea -0x8(%ebp),%eax
111e9e: 50 push %eax
111e9f: ff 75 08 pushl 0x8(%ebp)
111ea2: 68 00 58 13 00 push $0x135800
111ea7: e8 34 4d 00 00 call 116be0 <_Objects_Get>
111eac: 89 c3 mov %eax,%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111eae: 83 c4 10 add $0x10,%esp
111eb1: 8b 4d f8 mov -0x8(%ebp),%ecx
111eb4: 85 c9 test %ecx,%ecx
111eb6: 75 2c jne 111ee4 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
111eb8: 83 ec 08 sub $0x8,%esp
111ebb: 50 push %eax
111ebc: 68 00 58 13 00 push $0x135800
111ec1: e8 66 48 00 00 call 11672c <_Objects_Close>
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
* unsuccessful, 0 will be returned.
*/
111ec6: 58 pop %eax
111ec7: 5a pop %edx
111ec8: 53 push %ebx
111ec9: 68 00 58 13 00 push $0x135800
111ece: e8 99 4b 00 00 call 116a6c <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
111ed3: e8 4c 55 00 00 call 117424 <_Thread_Enable_dispatch>
111ed8: 31 c0 xor %eax,%eax
111eda: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111edd: 8b 5d fc mov -0x4(%ebp),%ebx
111ee0: c9 leave
111ee1: c3 ret
111ee2: 66 90 xchg %ax,%ax
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111ee4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111ee9: 8b 5d fc mov -0x4(%ebp),%ebx
111eec: c9 leave
111eed: c3 ret
00111ef0 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
Objects_Id id,
void *external,
void **internal
)
{
111ef0: 55 push %ebp
111ef1: 89 e5 mov %esp,%ebp
111ef3: 53 push %ebx
111ef4: 83 ec 14 sub $0x14,%esp
111ef7: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
111efa: 85 db test %ebx,%ebx
111efc: 74 4e je 111f4c <rtems_port_external_to_internal+0x5c><== NEVER TAKEN
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111efe: 51 push %ecx
111eff: 8d 45 f8 lea -0x8(%ebp),%eax
111f02: 50 push %eax
111f03: ff 75 08 pushl 0x8(%ebp)
111f06: 68 00 58 13 00 push $0x135800
111f0b: e8 d0 4c 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f10: 83 c4 10 add $0x10,%esp
111f13: 8b 55 f8 mov -0x8(%ebp),%edx
111f16: 85 d2 test %edx,%edx
111f18: 75 1e jne 111f38 <rtems_port_external_to_internal+0x48>
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
111f1a: 8b 55 0c mov 0xc(%ebp),%edx
111f1d: 2b 50 14 sub 0x14(%eax),%edx
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
111f20: 39 50 18 cmp %edx,0x18(%eax)
111f23: 73 1f jae 111f44 <rtems_port_external_to_internal+0x54>
*internal = external;
111f25: 8b 45 0c mov 0xc(%ebp),%eax
111f28: 89 03 mov %eax,(%ebx)
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
111f2a: e8 f5 54 00 00 call 117424 <_Thread_Enable_dispatch>
111f2f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f31: 8b 5d fc mov -0x4(%ebp),%ebx
111f34: c9 leave
111f35: c3 ret
111f36: 66 90 xchg %ax,%ax
if ( !internal )
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f38: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f3d: 8b 5d fc mov -0x4(%ebp),%ebx
111f40: c9 leave
111f41: c3 ret
111f42: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
111f44: 03 50 10 add 0x10(%eax),%edx
111f47: 89 13 mov %edx,(%ebx)
111f49: eb df jmp 111f2a <rtems_port_external_to_internal+0x3a>
111f4b: 90 nop
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
111f4c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111f51: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111f54: c9 leave <== NOT EXECUTED
111f55: c3 ret <== NOT EXECUTED
00111f7c <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
Objects_Id id,
void *internal,
void **external
)
{
111f7c: 55 push %ebp
111f7d: 89 e5 mov %esp,%ebp
111f7f: 53 push %ebx
111f80: 83 ec 14 sub $0x14,%esp
111f83: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
111f86: 85 db test %ebx,%ebx
111f88: 74 4e je 111fd8 <rtems_port_internal_to_external+0x5c><== NEVER TAKEN
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
* @param[in] size is the size in bytes of the memory area to add
111f8a: 51 push %ecx
111f8b: 8d 45 f8 lea -0x8(%ebp),%eax
111f8e: 50 push %eax
111f8f: ff 75 08 pushl 0x8(%ebp)
111f92: 68 00 58 13 00 push $0x135800
111f97: e8 44 4c 00 00 call 116be0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111f9c: 83 c4 10 add $0x10,%esp
111f9f: 8b 55 f8 mov -0x8(%ebp),%edx
111fa2: 85 d2 test %edx,%edx
111fa4: 75 1e jne 111fc4 <rtems_port_internal_to_external+0x48>
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
111fa6: 8b 55 0c mov 0xc(%ebp),%edx
111fa9: 2b 50 10 sub 0x10(%eax),%edx
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
111fac: 39 50 18 cmp %edx,0x18(%eax)
111faf: 73 1f jae 111fd0 <rtems_port_internal_to_external+0x54>
*external = internal;
111fb1: 8b 45 0c mov 0xc(%ebp),%eax
111fb4: 89 03 mov %eax,(%ebx)
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
111fb6: e8 69 54 00 00 call 117424 <_Thread_Enable_dispatch>
111fbb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fbd: 8b 5d fc mov -0x4(%ebp),%ebx
111fc0: c9 leave
111fc1: c3 ret
111fc2: 66 90 xchg %ax,%ax
if ( !external )
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
111fc4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fc9: 8b 5d fc mov -0x4(%ebp),%ebx
111fcc: c9 leave
111fcd: c3 ret
111fce: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
111fd0: 03 50 14 add 0x14(%eax),%edx
111fd3: 89 13 mov %edx,(%ebx)
111fd5: eb df jmp 111fb6 <rtems_port_internal_to_external+0x3a>
111fd7: 90 nop
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
111fd8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111fdd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
111fe0: c9 leave <== NOT EXECUTED
111fe1: c3 ret <== NOT EXECUTED
00112a50 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
Objects_Id id
)
{
112a50: 55 push %ebp
112a51: 89 e5 mov %esp,%ebp
112a53: 53 push %ebx
112a54: 83 ec 18 sub $0x18,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
112a57: 8d 45 f8 lea -0x8(%ebp),%eax
112a5a: 50 push %eax
112a5b: ff 75 08 pushl 0x8(%ebp)
112a5e: 68 80 58 13 00 push $0x135880
112a63: e8 78 41 00 00 call 116be0 <_Objects_Get>
112a68: 89 c3 mov %eax,%ebx
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
112a6a: 83 c4 10 add $0x10,%esp
112a6d: 8b 45 f8 mov -0x8(%ebp),%eax
112a70: 85 c0 test %eax,%eax
112a72: 74 0c je 112a80 <rtems_rate_monotonic_cancel+0x30>
112a74: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a79: 8b 5d fc mov -0x4(%ebp),%ebx
112a7c: c9 leave
112a7d: c3 ret
112a7e: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
112a80: 8b 43 50 mov 0x50(%ebx),%eax
112a83: 3b 05 fc 5a 13 00 cmp 0x135afc,%eax
112a89: 74 11 je 112a9c <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
112a8b: e8 94 49 00 00 call 117424 <_Thread_Enable_dispatch>
112a90: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
112a95: 8b 5d fc mov -0x4(%ebp),%ebx
112a98: c9 leave
112a99: c3 ret
112a9a: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
112a9c: 83 ec 0c sub $0xc,%esp
112a9f: 8d 43 10 lea 0x10(%ebx),%eax
112aa2: 50 push %eax
112aa3: e8 74 5d 00 00 call 11881c <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
112aa8: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
112aaf: e8 70 49 00 00 call 117424 <_Thread_Enable_dispatch>
112ab4: 31 c0 xor %eax,%eax
112ab6: 83 c4 10 add $0x10,%esp
112ab9: eb be jmp 112a79 <rtems_rate_monotonic_cancel+0x29>
0010afdc <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
Objects_Id *id
)
{
10afdc: 55 push %ebp
10afdd: 89 e5 mov %esp,%ebp
10afdf: 57 push %edi
10afe0: 56 push %esi
10afe1: 53 push %ebx
10afe2: 83 ec 0c sub $0xc,%esp
10afe5: 8b 75 08 mov 0x8(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10afe8: 85 f6 test %esi,%esi
10afea: 0f 84 a8 00 00 00 je 10b098 <rtems_rate_monotonic_create+0xbc>
return RTEMS_INVALID_NAME;
if ( !id )
10aff0: 8b 45 0c mov 0xc(%ebp),%eax
10aff3: 85 c0 test %eax,%eax
10aff5: 0f 84 c1 00 00 00 je 10b0bc <rtems_rate_monotonic_create+0xe0><== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10affb: a1 78 27 12 00 mov 0x122778,%eax
10b000: 40 inc %eax
10b001: a3 78 27 12 00 mov %eax,0x122778
#ifdef __cplusplus
extern "C" {
#endif
/**
10b006: 83 ec 0c sub $0xc,%esp
10b009: 68 80 26 12 00 push $0x122680
10b00e: e8 d9 1d 00 00 call 10cdec <_Objects_Allocate>
10b013: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10b015: 83 c4 10 add $0x10,%esp
10b018: 85 c0 test %eax,%eax
10b01a: 0f 84 88 00 00 00 je 10b0a8 <rtems_rate_monotonic_create+0xcc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10b020: a1 3c 28 12 00 mov 0x12283c,%eax
10b025: 89 43 50 mov %eax,0x50(%ebx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10b028: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b02f: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10b036: c7 43 2c 00 00 00 00 movl $0x0,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10b03d: c7 43 30 00 00 00 00 movl $0x0,0x30(%ebx)
* the heap
10b044: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10b04b: 8d 7b 54 lea 0x54(%ebx),%edi
10b04e: b9 38 00 00 00 mov $0x38,%ecx
10b053: 31 c0 xor %eax,%eax
10b055: f3 aa rep stos %al,%es:(%edi)
10b057: c7 43 5c ff ff ff 7f movl $0x7fffffff,0x5c(%ebx)
10b05e: c7 43 60 ff ff ff 7f movl $0x7fffffff,0x60(%ebx)
10b065: c7 43 74 ff ff ff 7f movl $0x7fffffff,0x74(%ebx)
10b06c: c7 43 78 ff ff ff 7f movl $0x7fffffff,0x78(%ebx)
10b073: 8b 4b 08 mov 0x8(%ebx),%ecx
10b076: 0f b7 d1 movzwl %cx,%edx
10b079: a1 9c 26 12 00 mov 0x12269c,%eax
10b07e: 89 1c 90 mov %ebx,(%eax,%edx,4)
10b081: 89 73 0c mov %esi,0xc(%ebx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10b084: 8b 45 0c mov 0xc(%ebp),%eax
10b087: 89 08 mov %ecx,(%eax)
_Thread_Enable_dispatch();
10b089: e8 96 2b 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b08e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10b090: 8d 65 f4 lea -0xc(%ebp),%esp
10b093: 5b pop %ebx
10b094: 5e pop %esi
10b095: 5f pop %edi
10b096: c9 leave
10b097: c3 ret
Objects_Id *id
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10b098: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b09d: 8d 65 f4 lea -0xc(%ebp),%esp
10b0a0: 5b pop %ebx
10b0a1: 5e pop %esi
10b0a2: 5f pop %edi
10b0a3: c9 leave
10b0a4: c3 ret
10b0a5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10b0a8: e8 77 2b 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b0ad: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b0b2: 8d 65 f4 lea -0xc(%ebp),%esp
10b0b5: 5b pop %ebx
10b0b6: 5e pop %esi
10b0b7: 5f pop %edi
10b0b8: c9 leave
10b0b9: c3 ret
10b0ba: 66 90 xchg %ax,%ax
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10b0bc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b0c1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b0c4: 5b pop %ebx <== NOT EXECUTED
10b0c5: 5e pop %esi <== NOT EXECUTED
10b0c6: 5f pop %edi <== NOT EXECUTED
10b0c7: c9 leave <== NOT EXECUTED
10b0c8: c3 ret <== NOT EXECUTED
00110878 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
110878: 55 push %ebp
110879: 89 e5 mov %esp,%ebp
11087b: 57 push %edi
11087c: 56 push %esi
11087d: 83 ec 20 sub $0x20,%esp
110880: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
110883: 85 ff test %edi,%edi
110885: 74 41 je 1108c8 <rtems_rate_monotonic_get_statistics+0x50><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
110887: 51 push %ecx
110888: 8d 45 f4 lea -0xc(%ebp),%eax
11088b: 50 push %eax
11088c: ff 75 08 pushl 0x8(%ebp)
11088f: 68 80 26 12 00 push $0x122680
110894: e8 47 cb ff ff call 10d3e0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
110899: 83 c4 10 add $0x10,%esp
11089c: 8b 55 f4 mov -0xc(%ebp),%edx
11089f: 85 d2 test %edx,%edx
1108a1: 74 0d je 1108b0 <rtems_rate_monotonic_get_statistics+0x38>
1108a3: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1108a8: 8d 65 f8 lea -0x8(%ebp),%esp
1108ab: 5e pop %esi
1108ac: 5f pop %edi
1108ad: c9 leave
1108ae: c3 ret
1108af: 90 nop
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
1108b0: 8d 70 54 lea 0x54(%eax),%esi
1108b3: b9 0e 00 00 00 mov $0xe,%ecx
1108b8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
1108ba: e8 65 d3 ff ff call 10dc24 <_Thread_Enable_dispatch>
1108bf: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1108c1: 8d 65 f8 lea -0x8(%ebp),%esp
1108c4: 5e pop %esi
1108c5: 5f pop %edi
1108c6: c9 leave
1108c7: c3 ret
)
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
1108c8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1108cd: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1108d0: 5e pop %esi <== NOT EXECUTED
1108d1: 5f pop %edi <== NOT EXECUTED
1108d2: c9 leave <== NOT EXECUTED
1108d3: c3 ret <== NOT EXECUTED
001108d4 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
1108d4: 55 push %ebp
1108d5: 89 e5 mov %esp,%ebp
1108d7: 57 push %edi
1108d8: 56 push %esi
1108d9: 53 push %ebx
1108da: 83 ec 1c sub $0x1c,%esp
1108dd: 8b 75 0c mov 0xc(%ebp),%esi
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
1108e0: 85 f6 test %esi,%esi
1108e2: 74 70 je 110954 <rtems_rate_monotonic_get_status+0x80><== NEVER TAKEN
1108e4: 52 push %edx
1108e5: 8d 45 f0 lea -0x10(%ebp),%eax
1108e8: 50 push %eax
1108e9: ff 75 08 pushl 0x8(%ebp)
1108ec: 68 80 26 12 00 push $0x122680
1108f1: e8 ea ca ff ff call 10d3e0 <_Objects_Get>
1108f6: 89 c7 mov %eax,%edi
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
1108f8: 83 c4 10 add $0x10,%esp
1108fb: 8b 45 f0 mov -0x10(%ebp),%eax
1108fe: 85 c0 test %eax,%eax
110900: 75 42 jne 110944 <rtems_rate_monotonic_get_status+0x70>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
110902: 8b 47 50 mov 0x50(%edi),%eax
110905: 85 c0 test %eax,%eax
110907: 74 03 je 11090c <rtems_rate_monotonic_get_status+0x38><== NEVER TAKEN
110909: 8b 40 08 mov 0x8(%eax),%eax
11090c: 89 06 mov %eax,(%esi)
status->state = the_period->state;
11090e: 8b 47 38 mov 0x38(%edi),%eax
110911: 89 46 04 mov %eax,0x4(%esi)
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
110914: 85 c0 test %eax,%eax
110916: 75 4c jne 110964 <rtems_rate_monotonic_get_status+0x90>
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
110918: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
status->since_last_period.tv_nsec = 0;
11091f: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
110926: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi)
status->executed_since_last_period.tv_nsec = 0;
11092d: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
110934: e8 eb d2 ff ff call 10dc24 <_Thread_Enable_dispatch>
110939: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11093b: 8d 65 f4 lea -0xc(%ebp),%esp
11093e: 5b pop %ebx
11093f: 5e pop %esi
110940: 5f pop %edi
110941: c9 leave
110942: c3 ret
110943: 90 nop
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
110944: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110949: 8d 65 f4 lea -0xc(%ebp),%esp
11094c: 5b pop %ebx
11094d: 5e pop %esi
11094e: 5f pop %edi
11094f: c9 leave
110950: c3 ret
110951: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
110954: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110959: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11095c: 5b pop %ebx <== NOT EXECUTED
11095d: 5e pop %esi <== NOT EXECUTED
11095e: 5f pop %edi <== NOT EXECUTED
11095f: c9 leave <== NOT EXECUTED
110960: c3 ret <== NOT EXECUTED
110961: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
110964: 83 ec 0c sub $0xc,%esp
110967: 8d 5d e8 lea -0x18(%ebp),%ebx
11096a: 53 push %ebx
11096b: e8 04 c1 ff ff call 10ca74 <_TOD_Get_uptime>
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
110970: 83 c4 0c add $0xc,%esp
110973: 8d 46 08 lea 0x8(%esi),%eax
110976: 50 push %eax
110977: 53 push %ebx
110978: 8d 47 44 lea 0x44(%edi),%eax
11097b: 50 push %eax
11097c: e8 cf e0 ff ff call 10ea50 <_Timespec_Subtract>
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
110981: 83 c4 0c add $0xc,%esp
110984: 8d 46 10 lea 0x10(%esi),%eax
110987: 50 push %eax
110988: 53 push %ebx
110989: 68 44 28 12 00 push $0x122844
11098e: e8 bd e0 ff ff call 10ea50 <_Timespec_Subtract>
110993: 83 c4 10 add $0x10,%esp
110996: eb 9c jmp 110934 <rtems_rate_monotonic_get_status+0x60>
0010b2b4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
Objects_Id id,
rtems_interval length
)
{
10b2b4: 55 push %ebp
10b2b5: 89 e5 mov %esp,%ebp
10b2b7: 57 push %edi
10b2b8: 56 push %esi
10b2b9: 53 push %ebx
10b2ba: 83 ec 20 sub $0x20,%esp
10b2bd: 8b 75 08 mov 0x8(%ebp),%esi
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
10b2c0: 8d 45 f0 lea -0x10(%ebp),%eax
10b2c3: 50 push %eax
10b2c4: 56 push %esi
10b2c5: 68 80 26 12 00 push $0x122680
10b2ca: e8 11 21 00 00 call 10d3e0 <_Objects_Get>
10b2cf: 89 c3 mov %eax,%ebx
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10b2d1: 83 c4 10 add $0x10,%esp
10b2d4: 8b 45 f0 mov -0x10(%ebp),%eax
10b2d7: 85 c0 test %eax,%eax
10b2d9: 74 11 je 10b2ec <rtems_rate_monotonic_period+0x38>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
10b2db: bb 04 00 00 00 mov $0x4,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b2e0: 89 d8 mov %ebx,%eax
10b2e2: 8d 65 f4 lea -0xc(%ebp),%esp
10b2e5: 5b pop %ebx
10b2e6: 5e pop %esi
10b2e7: 5f pop %edi
10b2e8: c9 leave
10b2e9: c3 ret
10b2ea: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10b2ec: 8b 43 50 mov 0x50(%ebx),%eax
10b2ef: 3b 05 3c 28 12 00 cmp 0x12283c,%eax
10b2f5: 74 15 je 10b30c <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10b2f7: e8 28 29 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b2fc: bb 17 00 00 00 mov $0x17,%ebx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b301: 89 d8 mov %ebx,%eax
10b303: 8d 65 f4 lea -0xc(%ebp),%esp
10b306: 5b pop %ebx
10b307: 5e pop %esi
10b308: 5f pop %edi
10b309: c9 leave
10b30a: c3 ret
10b30b: 90 nop
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10b30c: 8b 45 0c mov 0xc(%ebp),%eax
10b30f: 85 c0 test %eax,%eax
10b311: 0f 84 c1 00 00 00 je 10b3d8 <rtems_rate_monotonic_period+0x124>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
10b317: 9c pushf
10b318: fa cli
10b319: 5f pop %edi
switch ( the_period->state ) {
10b31a: 8b 43 38 mov 0x38(%ebx),%eax
10b31d: 83 f8 02 cmp $0x2,%eax
10b320: 74 62 je 10b384 <rtems_rate_monotonic_period+0xd0>
10b322: 83 f8 04 cmp $0x4,%eax
10b325: 0f 84 c5 00 00 00 je 10b3f0 <rtems_rate_monotonic_period+0x13c><== NEVER TAKEN
10b32b: 85 c0 test %eax,%eax
10b32d: 75 ac jne 10b2db <rtems_rate_monotonic_period+0x27><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10b32f: 57 push %edi
10b330: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10b331: 83 ec 0c sub $0xc,%esp
10b334: 53 push %ebx
10b335: e8 b6 fd ff ff call 10b0f0 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10b33a: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b341: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
10b348: c7 43 2c 24 b7 10 00 movl $0x10b724,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
10b34f: 89 73 30 mov %esi,0x30(%ebx)
* the heap
10b352: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10b359: 8b 45 0c mov 0xc(%ebp),%eax
10b35c: 89 43 4c mov %eax,0x4c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b35f: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b362: 5f pop %edi
10b363: 58 pop %eax
10b364: 8d 43 10 lea 0x10(%ebx),%eax
10b367: 50 push %eax
10b368: 68 5c 28 12 00 push $0x12285c
10b36d: e8 86 39 00 00 call 10ecf8 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10b372: e8 ad 28 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b377: 31 db xor %ebx,%ebx
10b379: 83 c4 10 add $0x10,%esp
10b37c: e9 5f ff ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b381: 8d 76 00 lea 0x0(%esi),%esi
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10b384: 83 ec 0c sub $0xc,%esp
10b387: 53 push %ebx
10b388: e8 d3 fd ff ff call 10b160 <_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;
10b38d: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
the_period->next_length = length;
10b394: 8b 45 0c mov 0xc(%ebp),%eax
10b397: 89 43 4c mov %eax,0x4c(%ebx)
_ISR_Enable( level );
10b39a: 57 push %edi
10b39b: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10b39c: 8b 15 3c 28 12 00 mov 0x12283c,%edx
10b3a2: 8b 43 08 mov 0x8(%ebx),%eax
10b3a5: 89 42 20 mov %eax,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10b3a8: 59 pop %ecx
10b3a9: 5e pop %esi
10b3aa: 68 00 40 00 00 push $0x4000
10b3af: 52 push %edx
10b3b0: e8 4f 31 00 00 call 10e504 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10b3b5: 9c pushf
10b3b6: fa cli
10b3b7: 58 pop %eax
local_state = the_period->state;
10b3b8: 8b 53 38 mov 0x38(%ebx),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10b3bb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
_ISR_Enable( level );
10b3c2: 50 push %eax
10b3c3: 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 )
10b3c4: 83 c4 10 add $0x10,%esp
10b3c7: 83 fa 03 cmp $0x3,%edx
10b3ca: 74 71 je 10b43d <rtems_rate_monotonic_period+0x189><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10b3cc: e8 53 28 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b3d1: 31 db xor %ebx,%ebx
10b3d3: e9 08 ff ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10b3d8: 8b 43 38 mov 0x38(%ebx),%eax
10b3db: 85 c0 test %eax,%eax
10b3dd: 75 51 jne 10b430 <rtems_rate_monotonic_period+0x17c><== NEVER TAKEN
10b3df: bb 0b 00 00 00 mov $0xb,%ebx
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10b3e4: e8 3b 28 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b3e9: e9 f2 fe ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b3ee: 66 90 xchg %ax,%ax
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10b3f0: 83 ec 0c sub $0xc,%esp
10b3f3: 53 push %ebx
10b3f4: e8 67 fd ff ff call 10b160 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10b3f9: 57 push %edi
10b3fa: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10b3fb: c7 43 38 02 00 00 00 movl $0x2,0x38(%ebx)
the_period->next_length = length;
10b402: 8b 45 0c mov 0xc(%ebp),%eax
10b405: 89 43 4c mov %eax,0x4c(%ebx)
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
10b408: 89 43 1c mov %eax,0x1c(%ebx)
void *starting_address,
size_t *size
10b40b: 58 pop %eax
10b40c: 5a pop %edx
10b40d: 8d 43 10 lea 0x10(%ebx),%eax
10b410: 50 push %eax
10b411: 68 5c 28 12 00 push $0x12285c
10b416: e8 dd 38 00 00 call 10ecf8 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10b41b: e8 04 28 00 00 call 10dc24 <_Thread_Enable_dispatch>
10b420: bb 06 00 00 00 mov $0x6,%ebx
10b425: 83 c4 10 add $0x10,%esp
10b428: e9 b3 fe ff ff jmp 10b2e0 <rtems_rate_monotonic_period+0x2c>
10b42d: 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 ) {
10b430: 83 e8 03 sub $0x3,%eax
10b433: 83 f8 02 cmp $0x2,%eax
10b436: 19 db sbb %ebx,%ebx
10b438: 83 e3 06 and $0x6,%ebx
10b43b: eb a7 jmp 10b3e4 <rtems_rate_monotonic_period+0x130>
/*
* 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 );
10b43d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10b440: 68 00 40 00 00 push $0x4000 <== NOT EXECUTED
10b445: ff 35 3c 28 12 00 pushl 0x12283c <== NOT EXECUTED
10b44b: e8 2c 24 00 00 call 10d87c <_Thread_Clear_state> <== NOT EXECUTED
10b450: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10b453: e9 74 ff ff ff jmp 10b3cc <rtems_rate_monotonic_period+0x118><== NOT EXECUTED
0010b458 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10b458: 55 push %ebp
10b459: 89 e5 mov %esp,%ebp
10b45b: 57 push %edi
10b45c: 56 push %esi
10b45d: 53 push %ebx
10b45e: 81 ec 9c 00 00 00 sub $0x9c,%esp
10b464: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10b467: 85 ff test %edi,%edi
10b469: 0f 84 c9 00 00 00 je 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10b46f: 83 ec 08 sub $0x8,%esp
10b472: 68 70 bb 11 00 push $0x11bb70
10b477: ff 75 08 pushl 0x8(%ebp)
10b47a: ff d7 call *%edi
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
10b47c: 5e pop %esi
10b47d: 58 pop %eax
10b47e: 68 a8 bb 11 00 push $0x11bba8
10b483: ff 75 08 pushl 0x8(%ebp)
10b486: ff d7 call *%edi
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
10b488: 59 pop %ecx
10b489: 5b pop %ebx
10b48a: 68 cc bb 11 00 push $0x11bbcc
10b48f: ff 75 08 pushl 0x8(%ebp)
10b492: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10b494: 58 pop %eax
10b495: 5a pop %edx
10b496: 68 f0 bb 11 00 push $0x11bbf0
10b49b: ff 75 08 pushl 0x8(%ebp)
10b49e: ff d7 call *%edi
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10b4a0: 5b pop %ebx
10b4a1: 5e pop %esi
10b4a2: 68 3c bc 11 00 push $0x11bc3c
10b4a7: ff 75 08 pushl 0x8(%ebp)
10b4aa: ff d7 call *%edi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10b4ac: 8b 35 88 26 12 00 mov 0x122688,%esi
id <= _Rate_monotonic_Information.maximum_id ;
10b4b2: 83 c4 10 add $0x10,%esp
10b4b5: 3b 35 8c 26 12 00 cmp 0x12268c,%esi
10b4bb: 76 0c jbe 10b4c9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
10b4bd: eb 79 jmp 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0><== NOT EXECUTED
10b4bf: 90 nop <== NOT EXECUTED
id++ ) {
10b4c0: 46 inc %esi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
10b4c1: 39 35 8c 26 12 00 cmp %esi,0x12268c
10b4c7: 72 6f jb 10b538 <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10b4c9: 83 ec 08 sub $0x8,%esp
10b4cc: 8d 45 90 lea -0x70(%ebp),%eax
10b4cf: 50 push %eax
10b4d0: 56 push %esi
10b4d1: e8 a2 53 00 00 call 110878 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10b4d6: 83 c4 10 add $0x10,%esp
10b4d9: 85 c0 test %eax,%eax
10b4db: 75 e3 jne 10b4c0 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
10b4dd: 83 ec 08 sub $0x8,%esp
10b4e0: 8d 55 c8 lea -0x38(%ebp),%edx
10b4e3: 52 push %edx
10b4e4: 56 push %esi
10b4e5: e8 ea 53 00 00 call 1108d4 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
10b4ea: c6 45 eb 00 movb $0x0,-0x15(%ebp)
if ( the_status.owner ) {
10b4ee: 8b 45 c8 mov -0x38(%ebp),%eax
10b4f1: 83 c4 10 add $0x10,%esp
10b4f4: 85 c0 test %eax,%eax
10b4f6: 0f 85 54 01 00 00 jne 10b650 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== ALWAYS TAKEN
10b4fc: 8d 5d eb lea -0x15(%ebp),%ebx <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10b4ff: 83 ec 08 sub $0x8,%esp
10b502: ff 75 94 pushl -0x6c(%ebp)
10b505: ff 75 90 pushl -0x70(%ebp)
10b508: 53 push %ebx
10b509: 56 push %esi
10b50a: 68 8e bb 11 00 push $0x11bb8e
10b50f: ff 75 08 pushl 0x8(%ebp)
10b512: ff d7 call *%edi
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10b514: 8b 45 90 mov -0x70(%ebp),%eax
10b517: 83 c4 20 add $0x20,%esp
10b51a: 85 c0 test %eax,%eax
10b51c: 75 22 jne 10b540 <rtems_rate_monotonic_report_statistics_with_plugin+0xe8>
(*print)( context, "\n" );
10b51e: 83 ec 08 sub $0x8,%esp
10b521: 68 f9 a0 11 00 push $0x11a0f9
10b526: ff 75 08 pushl 0x8(%ebp)
10b529: ff d7 call *%edi
10b52b: 83 c4 10 add $0x10,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10b52e: 46 inc %esi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
10b52f: 39 35 8c 26 12 00 cmp %esi,0x12268c
10b535: 73 92 jae 10b4c9 <rtems_rate_monotonic_report_statistics_with_plugin+0x71><== ALWAYS TAKEN
10b537: 90 nop
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10b538: 8d 65 f4 lea -0xc(%ebp),%esp
10b53b: 5b pop %ebx
10b53c: 5e pop %esi
10b53d: 5f pop %edi
10b53e: c9 leave
10b53f: c3 ret
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
10b540: 52 push %edx
10b541: 8d 55 e0 lea -0x20(%ebp),%edx
10b544: 52 push %edx
10b545: 50 push %eax
10b546: 8d 45 a8 lea -0x58(%ebp),%eax
10b549: 50 push %eax
10b54a: e8 45 34 00 00 call 10e994 <_Timespec_Divide_by_integer>
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
10b54f: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b552: bb d3 4d 62 10 mov $0x10624dd3,%ebx
10b557: 89 c8 mov %ecx,%eax
10b559: f7 eb imul %ebx
10b55b: 89 45 88 mov %eax,-0x78(%ebp)
10b55e: 89 55 8c mov %edx,-0x74(%ebp)
10b561: 8b 45 8c mov -0x74(%ebp),%eax
10b564: c1 f8 06 sar $0x6,%eax
10b567: c1 f9 1f sar $0x1f,%ecx
10b56a: 29 c8 sub %ecx,%eax
10b56c: 50 push %eax
10b56d: ff 75 e0 pushl -0x20(%ebp)
10b570: 8b 4d a4 mov -0x5c(%ebp),%ecx
10b573: 89 c8 mov %ecx,%eax
10b575: f7 eb imul %ebx
10b577: 89 45 80 mov %eax,-0x80(%ebp)
10b57a: 89 55 84 mov %edx,-0x7c(%ebp)
10b57d: 8b 45 84 mov -0x7c(%ebp),%eax
10b580: c1 f8 06 sar $0x6,%eax
10b583: c1 f9 1f sar $0x1f,%ecx
10b586: 29 c8 sub %ecx,%eax
10b588: 50 push %eax
10b589: ff 75 a0 pushl -0x60(%ebp)
10b58c: 8b 4d 9c mov -0x64(%ebp),%ecx
10b58f: 89 c8 mov %ecx,%eax
10b591: f7 eb imul %ebx
10b593: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
10b599: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10b59f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10b5a5: c1 f8 06 sar $0x6,%eax
10b5a8: c1 f9 1f sar $0x1f,%ecx
10b5ab: 29 c8 sub %ecx,%eax
10b5ad: 50 push %eax
10b5ae: ff 75 98 pushl -0x68(%ebp)
10b5b1: 68 88 bc 11 00 push $0x11bc88
10b5b6: ff 75 08 pushl 0x8(%ebp)
10b5b9: ff d7 call *%edi
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
10b5bb: 83 c4 2c add $0x2c,%esp
10b5be: 8d 55 e0 lea -0x20(%ebp),%edx
10b5c1: 52 push %edx
10b5c2: ff 75 90 pushl -0x70(%ebp)
10b5c5: 8d 45 c0 lea -0x40(%ebp),%eax
10b5c8: 50 push %eax
10b5c9: e8 c6 33 00 00 call 10e994 <_Timespec_Divide_by_integer>
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
10b5ce: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b5d1: 89 c8 mov %ecx,%eax
10b5d3: f7 eb imul %ebx
10b5d5: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10b5db: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10b5e1: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10b5e7: c1 f8 06 sar $0x6,%eax
10b5ea: c1 f9 1f sar $0x1f,%ecx
10b5ed: 29 c8 sub %ecx,%eax
10b5ef: 50 push %eax
10b5f0: ff 75 e0 pushl -0x20(%ebp)
10b5f3: 8b 4d bc mov -0x44(%ebp),%ecx
10b5f6: 89 c8 mov %ecx,%eax
10b5f8: f7 eb imul %ebx
10b5fa: 89 85 68 ff ff ff mov %eax,-0x98(%ebp)
10b600: 89 95 6c ff ff ff mov %edx,-0x94(%ebp)
10b606: 8b 85 6c ff ff ff mov -0x94(%ebp),%eax
10b60c: c1 f8 06 sar $0x6,%eax
10b60f: c1 f9 1f sar $0x1f,%ecx
10b612: 29 c8 sub %ecx,%eax
10b614: 50 push %eax
10b615: ff 75 b8 pushl -0x48(%ebp)
10b618: 8b 4d b4 mov -0x4c(%ebp),%ecx
10b61b: 89 c8 mov %ecx,%eax
10b61d: f7 eb imul %ebx
10b61f: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
10b625: 89 95 64 ff ff ff mov %edx,-0x9c(%ebp)
10b62b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
10b631: c1 f8 06 sar $0x6,%eax
10b634: c1 f9 1f sar $0x1f,%ecx
10b637: 29 c8 sub %ecx,%eax
10b639: 50 push %eax
10b63a: ff 75 b0 pushl -0x50(%ebp)
10b63d: 68 a8 bc 11 00 push $0x11bca8
10b642: ff 75 08 pushl 0x8(%ebp)
10b645: ff d7 call *%edi
10b647: 83 c4 30 add $0x30,%esp
10b64a: e9 71 fe ff ff jmp 10b4c0 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
10b64f: 90 nop
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
10b650: 51 push %ecx
10b651: 8d 5d eb lea -0x15(%ebp),%ebx
10b654: 53 push %ebx
10b655: 6a 05 push $0x5
10b657: 50 push %eax
10b658: e8 5b 01 00 00 call 10b7b8 <rtems_object_get_name>
10b65d: 83 c4 10 add $0x10,%esp
10b660: e9 9a fe ff ff jmp 10b4ff <rtems_rate_monotonic_report_statistics_with_plugin+0xa7>
0010b680 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10b680: 55 push %ebp
10b681: 89 e5 mov %esp,%ebp
10b683: 53 push %ebx
10b684: 83 ec 04 sub $0x4,%esp
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b687: a1 78 27 12 00 mov 0x122778,%eax
10b68c: 40 inc %eax
10b68d: a3 78 27 12 00 mov %eax,0x122778
/*
* 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 ;
10b692: 8b 1d 88 26 12 00 mov 0x122688,%ebx
id <= _Rate_monotonic_Information.maximum_id ;
10b698: 3b 1d 8c 26 12 00 cmp 0x12268c,%ebx
10b69e: 77 15 ja 10b6b5 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
10b6a0: 83 ec 0c sub $0xc,%esp
10b6a3: 53 push %ebx
10b6a4: e8 17 00 00 00 call 10b6c0 <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++ ) {
10b6a9: 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
10b6aa: 83 c4 10 add $0x10,%esp
10b6ad: 39 1d 8c 26 12 00 cmp %ebx,0x12268c
10b6b3: 73 eb jae 10b6a0 <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10b6b5: 8b 5d fc mov -0x4(%ebp),%ebx
10b6b8: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10b6b9: e9 66 25 00 00 jmp 10dc24 <_Thread_Enable_dispatch>
001130fc <rtems_region_create>:
uint32_t length,
uint32_t page_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
1130fc: 55 push %ebp
1130fd: 89 e5 mov %esp,%ebp
1130ff: 57 push %edi
113100: 56 push %esi
113101: 53 push %ebx
113102: 83 ec 0c sub $0xc,%esp
113105: 8b 7d 08 mov 0x8(%ebp),%edi
113108: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
11310b: 85 ff test %edi,%edi
11310d: 74 25 je 113134 <rtems_region_create+0x38>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11310f: 85 f6 test %esi,%esi
113111: 74 0f je 113122 <rtems_region_create+0x26>
return RTEMS_INVALID_ADDRESS;
if ( !id )
113113: 8b 45 1c mov 0x1c(%ebp),%eax
113116: 85 c0 test %eax,%eax
113118: 74 08 je 113122 <rtems_region_create+0x26>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
11311a: f7 c6 03 00 00 00 test $0x3,%esi
113120: 74 22 je 113144 <rtems_region_create+0x48>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
113122: bb 09 00 00 00 mov $0x9,%ebx
}
113127: 89 d8 mov %ebx,%eax
113129: 8d 65 f4 lea -0xc(%ebp),%esp
11312c: 5b pop %ebx
11312d: 5e pop %esi
11312e: 5f pop %edi
11312f: c9 leave
113130: c3 ret
113131: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
113134: bb 03 00 00 00 mov $0x3,%ebx
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
113139: 89 d8 mov %ebx,%eax
11313b: 8d 65 f4 lea -0xc(%ebp),%esp
11313e: 5b pop %ebx
11313f: 5e pop %esi
113140: 5f pop %edi
113141: c9 leave
113142: c3 ret
113143: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
113144: 83 ec 0c sub $0xc,%esp
113147: ff 35 f4 5a 13 00 pushl 0x135af4
11314d: e8 de 22 00 00 call 115430 <_API_Mutex_Lock>
#ifdef __cplusplus
extern "C" {
#endif
/**
113152: c7 04 24 c0 58 13 00 movl $0x1358c0,(%esp)
113159: e8 4e 35 00 00 call 1166ac <_Objects_Allocate>
11315e: 89 c3 mov %eax,%ebx
the_region = _Region_Allocate();
if ( !the_region )
113160: 83 c4 10 add $0x10,%esp
113163: 85 c0 test %eax,%eax
113165: 0f 84 9d 00 00 00 je 113208 <rtems_region_create+0x10c>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
11316b: ff 75 14 pushl 0x14(%ebp)
11316e: ff 75 10 pushl 0x10(%ebp)
113171: 56 push %esi
113172: 8d 40 68 lea 0x68(%eax),%eax
113175: 50 push %eax
113176: e8 5d 30 00 00 call 1161d8 <_Heap_Initialize>
11317b: 89 43 5c mov %eax,0x5c(%ebx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
11317e: 83 c4 10 add $0x10,%esp
113181: 85 c0 test %eax,%eax
113183: 75 33 jne 1131b8 <rtems_region_create+0xbc>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
113185: 83 ec 08 sub $0x8,%esp
113188: 53 push %ebx
113189: 68 c0 58 13 00 push $0x1358c0
11318e: e8 d9 38 00 00 call 116a6c <_Objects_Free>
113193: bb 08 00 00 00 mov $0x8,%ebx
113198: 83 c4 10 add $0x10,%esp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
11319b: 83 ec 0c sub $0xc,%esp
11319e: ff 35 f4 5a 13 00 pushl 0x135af4
1131a4: e8 cf 22 00 00 call 115478 <_API_Mutex_Unlock>
1131a9: 83 c4 10 add $0x10,%esp
return return_status;
}
1131ac: 89 d8 mov %ebx,%eax
1131ae: 8d 65 f4 lea -0xc(%ebp),%esp
1131b1: 5b pop %ebx
1131b2: 5e pop %esi
1131b3: 5f pop %edi
1131b4: c9 leave
1131b5: c3 ret
1131b6: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
1131b8: 89 73 50 mov %esi,0x50(%ebx)
the_region->length = length;
1131bb: 8b 45 10 mov 0x10(%ebp),%eax
1131be: 89 43 54 mov %eax,0x54(%ebx)
the_region->page_size = page_size;
1131c1: 8b 45 14 mov 0x14(%ebp),%eax
1131c4: 89 43 58 mov %eax,0x58(%ebx)
the_region->attribute_set = attribute_set;
1131c7: 8b 45 18 mov 0x18(%ebp),%eax
1131ca: 89 43 60 mov %eax,0x60(%ebx)
the_region->number_of_used_blocks = 0;
1131cd: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
_Thread_queue_Initialize(
1131d4: 6a 06 push $0x6
1131d6: 6a 40 push $0x40
1131d8: c1 e8 02 shr $0x2,%eax
1131db: 83 e0 01 and $0x1,%eax
1131de: 50 push %eax
1131df: 8d 43 10 lea 0x10(%ebx),%eax
1131e2: 50 push %eax
1131e3: e8 70 49 00 00 call 117b58 <_Thread_queue_Initialize>
1131e8: 8b 4b 08 mov 0x8(%ebx),%ecx
1131eb: 0f b7 d1 movzwl %cx,%edx
1131ee: a1 dc 58 13 00 mov 0x1358dc,%eax
1131f3: 89 1c 90 mov %ebx,(%eax,%edx,4)
1131f6: 89 7b 0c mov %edi,0xc(%ebx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
1131f9: 8b 45 1c mov 0x1c(%ebp),%eax
1131fc: 89 08 mov %ecx,(%eax)
1131fe: 31 db xor %ebx,%ebx
113200: 83 c4 10 add $0x10,%esp
113203: eb 96 jmp 11319b <rtems_region_create+0x9f>
113205: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
113208: b3 05 mov $0x5,%bl
11320a: eb 8f jmp 11319b <rtems_region_create+0x9f>
0011320c <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
Objects_Id id
)
{
11320c: 55 push %ebp
11320d: 89 e5 mov %esp,%ebp
11320f: 53 push %ebx
113210: 83 ec 20 sub $0x20,%esp
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
113213: ff 35 f4 5a 13 00 pushl 0x135af4
113219: e8 12 22 00 00 call 115430 <_API_Mutex_Lock>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11321e: 83 c4 0c add $0xc,%esp
113221: 8d 45 f8 lea -0x8(%ebp),%eax
113224: 50 push %eax
113225: ff 75 08 pushl 0x8(%ebp)
113228: 68 c0 58 13 00 push $0x1358c0
11322d: e8 6e 39 00 00 call 116ba0 <_Objects_Get_no_protection>
113232: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
113234: 83 c4 10 add $0x10,%esp
113237: 8b 45 f8 mov -0x8(%ebp),%eax
11323a: 85 c0 test %eax,%eax
11323c: 75 0e jne 11324c <rtems_region_delete+0x40>
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
11323e: 8b 4b 64 mov 0x64(%ebx),%ecx
113241: 85 c9 test %ecx,%ecx
113243: 74 2f je 113274 <rtems_region_delete+0x68>
113245: bb 0c 00 00 00 mov $0xc,%ebx
11324a: eb 08 jmp 113254 <rtems_region_delete+0x48>
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11324c: 48 dec %eax
11324d: 74 1d je 11326c <rtems_region_delete+0x60><== ALWAYS TAKEN
11324f: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
113254: 83 ec 0c sub $0xc,%esp
113257: ff 35 f4 5a 13 00 pushl 0x135af4
11325d: e8 16 22 00 00 call 115478 <_API_Mutex_Unlock>
return return_status;
}
113262: 89 d8 mov %ebx,%eax
113264: 8b 5d fc mov -0x4(%ebp),%ebx
113267: c9 leave
113268: c3 ret
113269: 8d 76 00 lea 0x0(%esi),%esi
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11326c: bb 04 00 00 00 mov $0x4,%ebx
113271: eb e1 jmp 113254 <rtems_region_delete+0x48>
113273: 90 nop
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
113274: 83 ec 08 sub $0x8,%esp
113277: 53 push %ebx
113278: 68 c0 58 13 00 push $0x1358c0
11327d: e8 aa 34 00 00 call 11672c <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
113282: 58 pop %eax
113283: 5a pop %edx
113284: 53 push %ebx
113285: 68 c0 58 13 00 push $0x1358c0
11328a: e8 dd 37 00 00 call 116a6c <_Objects_Free>
11328f: 31 db xor %ebx,%ebx
113291: 83 c4 10 add $0x10,%esp
113294: eb be jmp 113254 <rtems_region_delete+0x48>
00113298 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
113298: 55 push %ebp
113299: 89 e5 mov %esp,%ebp
11329b: 56 push %esi
11329c: 53 push %ebx
11329d: 83 ec 10 sub $0x10,%esp
1132a0: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
1132a3: 85 f6 test %esi,%esi
1132a5: 74 79 je 113320 <rtems_region_extend+0x88><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1132a7: 83 ec 0c sub $0xc,%esp
1132aa: ff 35 f4 5a 13 00 pushl 0x135af4
1132b0: e8 7b 21 00 00 call 115430 <_API_Mutex_Lock>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1132b5: 83 c4 0c add $0xc,%esp
1132b8: 8d 45 f0 lea -0x10(%ebp),%eax
1132bb: 50 push %eax
1132bc: ff 75 08 pushl 0x8(%ebp)
1132bf: 68 c0 58 13 00 push $0x1358c0
1132c4: e8 d7 38 00 00 call 116ba0 <_Objects_Get_no_protection>
1132c9: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
1132cb: 83 c4 10 add $0x10,%esp
1132ce: 8b 45 f0 mov -0x10(%ebp),%eax
1132d1: 85 c0 test %eax,%eax
1132d3: 74 23 je 1132f8 <rtems_region_extend+0x60>
1132d5: 48 dec %eax
1132d6: 74 58 je 113330 <rtems_region_extend+0x98><== ALWAYS TAKEN
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
1132d8: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1132dd: 83 ec 0c sub $0xc,%esp
1132e0: ff 35 f4 5a 13 00 pushl 0x135af4
1132e6: e8 8d 21 00 00 call 115478 <_API_Mutex_Unlock>
1132eb: 83 c4 10 add $0x10,%esp
return return_status;
}
1132ee: 89 d8 mov %ebx,%eax
1132f0: 8d 65 f8 lea -0x8(%ebp),%esp
1132f3: 5b pop %ebx
1132f4: 5e pop %esi
1132f5: c9 leave
1132f6: c3 ret
1132f7: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
1132f8: 8d 45 f4 lea -0xc(%ebp),%eax
1132fb: 50 push %eax
1132fc: ff 75 10 pushl 0x10(%ebp)
1132ff: 56 push %esi
113300: 8d 43 68 lea 0x68(%ebx),%eax
113303: 50 push %eax
113304: e8 f7 2b 00 00 call 115f00 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
113309: 83 c4 10 add $0x10,%esp
11330c: 83 f8 01 cmp $0x1,%eax
11330f: 74 27 je 113338 <rtems_region_extend+0xa0>
113311: 73 2d jae 113340 <rtems_region_extend+0xa8>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
113313: 8b 45 f4 mov -0xc(%ebp),%eax
113316: 01 43 54 add %eax,0x54(%ebx)
the_region->maximum_segment_size += amount_extended;
113319: 01 43 5c add %eax,0x5c(%ebx)
11331c: 31 db xor %ebx,%ebx
11331e: eb bd jmp 1132dd <rtems_region_extend+0x45>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
113320: bb 09 00 00 00 mov $0x9,%ebx <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113325: 89 d8 mov %ebx,%eax <== NOT EXECUTED
113327: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
11332a: 5b pop %ebx <== NOT EXECUTED
11332b: 5e pop %esi <== NOT EXECUTED
11332c: c9 leave <== NOT EXECUTED
11332d: c3 ret <== NOT EXECUTED
11332e: 66 90 xchg %ax,%ax <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
113330: bb 04 00 00 00 mov $0x4,%ebx
113335: eb a6 jmp 1132dd <rtems_region_extend+0x45>
113337: 90 nop
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
113338: bb 09 00 00 00 mov $0x9,%ebx
11333d: eb 9e jmp 1132dd <rtems_region_extend+0x45>
11333f: 90 nop
113340: 83 f8 02 cmp $0x2,%eax
113343: 75 93 jne 1132d8 <rtems_region_extend+0x40><== NEVER TAKEN
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
113345: bb 18 00 00 00 mov $0x18,%ebx
11334a: eb 91 jmp 1132dd <rtems_region_extend+0x45>
0011334c <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
Objects_Id id,
Heap_Information_block *the_info
)
{
11334c: 55 push %ebp
11334d: 89 e5 mov %esp,%ebp
11334f: 53 push %ebx
113350: 83 ec 14 sub $0x14,%esp
113353: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
113356: 85 db test %ebx,%ebx
113358: 74 7a je 1133d4 <rtems_region_get_free_information+0x88>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11335a: 83 ec 0c sub $0xc,%esp
11335d: ff 35 f4 5a 13 00 pushl 0x135af4
113363: e8 c8 20 00 00 call 115430 <_API_Mutex_Lock>
113368: 83 c4 0c add $0xc,%esp
11336b: 8d 45 f8 lea -0x8(%ebp),%eax
11336e: 50 push %eax
11336f: ff 75 08 pushl 0x8(%ebp)
113372: 68 c0 58 13 00 push $0x1358c0
113377: e8 24 38 00 00 call 116ba0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
11337c: 83 c4 10 add $0x10,%esp
11337f: 8b 55 f8 mov -0x8(%ebp),%edx
113382: 85 d2 test %edx,%edx
113384: 74 22 je 1133a8 <rtems_region_get_free_information+0x5c>
113386: 4a dec %edx
113387: 74 57 je 1133e0 <rtems_region_get_free_information+0x94><== ALWAYS TAKEN
113389: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11338e: 83 ec 0c sub $0xc,%esp
113391: ff 35 f4 5a 13 00 pushl 0x135af4
113397: e8 dc 20 00 00 call 115478 <_API_Mutex_Unlock>
11339c: 83 c4 10 add $0x10,%esp
return return_status;
}
11339f: 89 d8 mov %ebx,%eax
1133a1: 8b 5d fc mov -0x4(%ebp),%ebx
1133a4: c9 leave
1133a5: c3 ret
1133a6: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
1133a8: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
1133af: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
1133b6: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
1133bd: 83 ec 08 sub $0x8,%esp
1133c0: 53 push %ebx
1133c1: 83 c0 68 add $0x68,%eax
1133c4: 50 push %eax
1133c5: e8 3a 2d 00 00 call 116104 <_Heap_Get_free_information>
1133ca: 31 db xor %ebx,%ebx
1133cc: 83 c4 10 add $0x10,%esp
1133cf: eb bd jmp 11338e <rtems_region_get_free_information+0x42>
1133d1: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
1133d4: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1133d6: 89 d8 mov %ebx,%eax
1133d8: 8b 5d fc mov -0x4(%ebp),%ebx
1133db: c9 leave
1133dc: c3 ret
1133dd: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1133e0: bb 04 00 00 00 mov $0x4,%ebx
1133e5: eb a7 jmp 11338e <rtems_region_get_free_information+0x42>
001133e8 <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
Objects_Id id,
Heap_Information_block *the_info
)
{
1133e8: 55 push %ebp
1133e9: 89 e5 mov %esp,%ebp
1133eb: 53 push %ebx
1133ec: 83 ec 14 sub $0x14,%esp
1133ef: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
1133f2: 85 db test %ebx,%ebx
1133f4: 74 6a je 113460 <rtems_region_get_information+0x78>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1133f6: 83 ec 0c sub $0xc,%esp
1133f9: ff 35 f4 5a 13 00 pushl 0x135af4
1133ff: e8 2c 20 00 00 call 115430 <_API_Mutex_Lock>
113404: 83 c4 0c add $0xc,%esp
113407: 8d 45 f8 lea -0x8(%ebp),%eax
11340a: 50 push %eax
11340b: ff 75 08 pushl 0x8(%ebp)
11340e: 68 c0 58 13 00 push $0x1358c0
113413: e8 88 37 00 00 call 116ba0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
113418: 83 c4 10 add $0x10,%esp
11341b: 8b 55 f8 mov -0x8(%ebp),%edx
11341e: 85 d2 test %edx,%edx
113420: 74 22 je 113444 <rtems_region_get_information+0x5c>
113422: 4a dec %edx
113423: 74 47 je 11346c <rtems_region_get_information+0x84><== ALWAYS TAKEN
113425: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11342a: 83 ec 0c sub $0xc,%esp
11342d: ff 35 f4 5a 13 00 pushl 0x135af4
113433: e8 40 20 00 00 call 115478 <_API_Mutex_Unlock>
113438: 83 c4 10 add $0x10,%esp
return return_status;
}
11343b: 89 d8 mov %ebx,%eax
11343d: 8b 5d fc mov -0x4(%ebp),%ebx
113440: c9 leave
113441: c3 ret
113442: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Heap_Get_information( &the_region->Memory, the_info ) !=
113444: 83 ec 08 sub $0x8,%esp
113447: 53 push %ebx
113448: 83 c0 68 add $0x68,%eax
11344b: 50 push %eax
11344c: e8 fb 2c 00 00 call 11614c <_Heap_Get_information>
113451: 83 c4 10 add $0x10,%esp
113454: 83 f8 01 cmp $0x1,%eax
113457: 19 db sbb %ebx,%ebx
113459: f7 d3 not %ebx
11345b: 83 e3 09 and $0x9,%ebx
11345e: eb ca jmp 11342a <rtems_region_get_information+0x42>
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !the_info )
113460: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113462: 89 d8 mov %ebx,%eax
113464: 8b 5d fc mov -0x4(%ebp),%ebx
113467: c9 leave
113468: c3 ret
113469: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11346c: bb 04 00 00 00 mov $0x4,%ebx
113471: eb b7 jmp 11342a <rtems_region_get_information+0x42>
00113474 <rtems_region_get_segment>:
uint32_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
113474: 55 push %ebp
113475: 89 e5 mov %esp,%ebp
113477: 57 push %edi
113478: 56 push %esi
113479: 53 push %ebx
11347a: 83 ec 1c sub $0x1c,%esp
11347d: 8b 75 0c mov 0xc(%ebp),%esi
113480: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
113483: 85 db test %ebx,%ebx
113485: 0f 84 89 00 00 00 je 113514 <rtems_region_get_segment+0xa0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
11348b: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
113491: 85 f6 test %esi,%esi
113493: 75 0f jne 1134a4 <rtems_region_get_segment+0x30><== ALWAYS TAKEN
113495: bb 08 00 00 00 mov $0x8,%ebx <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
11349a: 89 d8 mov %ebx,%eax
11349c: 8d 65 f4 lea -0xc(%ebp),%esp
11349f: 5b pop %ebx
1134a0: 5e pop %esi
1134a1: 5f pop %edi
1134a2: c9 leave
1134a3: c3 ret
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
1134a4: 83 ec 0c sub $0xc,%esp
1134a7: ff 35 f4 5a 13 00 pushl 0x135af4
1134ad: e8 7e 1f 00 00 call 115430 <_API_Mutex_Lock>
executing = _Thread_Executing;
1134b2: a1 fc 5a 13 00 mov 0x135afc,%eax
1134b7: 89 45 e0 mov %eax,-0x20(%ebp)
1134ba: 83 c4 0c add $0xc,%esp
1134bd: 8d 45 f0 lea -0x10(%ebp),%eax
1134c0: 50 push %eax
1134c1: ff 75 08 pushl 0x8(%ebp)
1134c4: 68 c0 58 13 00 push $0x1358c0
1134c9: e8 d2 36 00 00 call 116ba0 <_Objects_Get_no_protection>
1134ce: 89 c7 mov %eax,%edi
the_region = _Region_Get( id, &location );
switch ( location ) {
1134d0: 83 c4 10 add $0x10,%esp
1134d3: 8b 45 f0 mov -0x10(%ebp),%eax
1134d6: 85 c0 test %eax,%eax
1134d8: 74 26 je 113500 <rtems_region_get_segment+0x8c>
1134da: 48 dec %eax
1134db: 74 2f je 11350c <rtems_region_get_segment+0x98><== ALWAYS TAKEN
1134dd: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1134e2: 83 ec 0c sub $0xc,%esp
1134e5: ff 35 f4 5a 13 00 pushl 0x135af4
1134eb: e8 88 1f 00 00 call 115478 <_API_Mutex_Unlock>
1134f0: 83 c4 10 add $0x10,%esp
return return_status;
}
1134f3: 89 d8 mov %ebx,%eax
1134f5: 8d 65 f4 lea -0xc(%ebp),%esp
1134f8: 5b pop %ebx
1134f9: 5e pop %esi
1134fa: 5f pop %edi
1134fb: c9 leave
1134fc: c3 ret
1134fd: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
113500: 3b 77 5c cmp 0x5c(%edi),%esi
113503: 76 13 jbe 113518 <rtems_region_get_segment+0xa4>
113505: bb 08 00 00 00 mov $0x8,%ebx
11350a: eb d6 jmp 1134e2 <rtems_region_get_segment+0x6e>
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
_Thread_Enable_dispatch();
return (rtems_status_code) executing->Wait.return_code;
11350c: bb 04 00 00 00 mov $0x4,%ebx
113511: eb cf jmp 1134e2 <rtems_region_get_segment+0x6e>
113513: 90 nop
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
113514: b3 09 mov $0x9,%bl <== NOT EXECUTED
113516: eb 82 jmp 11349a <rtems_region_get_segment+0x26><== NOT EXECUTED
/**
* This function attempts to allocate a block of @a size bytes from
* @a the_heap. If insufficient memory is free in @a the_heap to allocate
* a block of the requested size, then NULL is returned.
*
113518: 83 ec 08 sub $0x8,%esp
11351b: 56 push %esi
11351c: 8d 47 68 lea 0x68(%edi),%eax
11351f: 50 push %eax
113520: e8 47 29 00 00 call 115e6c <_Heap_Allocate>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
113525: 83 c4 10 add $0x10,%esp
113528: 85 c0 test %eax,%eax
11352a: 74 09 je 113535 <rtems_region_get_segment+0xc1>
the_region->number_of_used_blocks += 1;
11352c: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
11352f: 89 03 mov %eax,(%ebx)
113531: 31 db xor %ebx,%ebx
113533: eb ad jmp 1134e2 <rtems_region_get_segment+0x6e>
return_status = RTEMS_SUCCESSFUL;
}
else if ( _Options_Is_no_wait( option_set ) ) {
113535: f6 45 10 01 testb $0x1,0x10(%ebp)
113539: 74 07 je 113542 <rtems_region_get_segment+0xce>
11353b: bb 0d 00 00 00 mov $0xd,%ebx
113540: eb a0 jmp 1134e2 <rtems_region_get_segment+0x6e>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
113542: a1 38 5a 13 00 mov 0x135a38,%eax
113547: 40 inc %eax
113548: a3 38 5a 13 00 mov %eax,0x135a38
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
11354d: 83 ec 0c sub $0xc,%esp
113550: ff 35 f4 5a 13 00 pushl 0x135af4
113556: e8 1d 1f 00 00 call 115478 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
11355b: 8d 47 10 lea 0x10(%edi),%eax
11355e: 8b 55 e0 mov -0x20(%ebp),%edx
113561: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
113564: 8b 4d 08 mov 0x8(%ebp),%ecx
113567: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
11356a: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
11356d: 89 5a 28 mov %ebx,0x28(%edx)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
113570: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
113577: 83 c4 0c add $0xc,%esp
11357a: 68 34 7c 11 00 push $0x117c34
11357f: ff 75 14 pushl 0x14(%ebp)
113582: 50 push %eax
113583: e8 5c 43 00 00 call 1178e4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
113588: e8 97 3e 00 00 call 117424 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
11358d: 8b 45 e0 mov -0x20(%ebp),%eax
113590: 8b 58 34 mov 0x34(%eax),%ebx
113593: 83 c4 10 add $0x10,%esp
113596: e9 ff fe ff ff jmp 11349a <rtems_region_get_segment+0x26>
0011359c <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
Objects_Id id,
void *segment,
size_t *size
)
{
11359c: 55 push %ebp
11359d: 89 e5 mov %esp,%ebp
11359f: 56 push %esi
1135a0: 53 push %ebx
1135a1: 83 ec 10 sub $0x10,%esp
1135a4: 8b 75 0c mov 0xc(%ebp),%esi
1135a7: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
if ( !segment )
1135aa: 85 f6 test %esi,%esi
1135ac: 74 6a je 113618 <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1135ae: 85 db test %ebx,%ebx
1135b0: 74 66 je 113618 <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1135b2: 83 ec 0c sub $0xc,%esp
1135b5: ff 35 f4 5a 13 00 pushl 0x135af4
1135bb: e8 70 1e 00 00 call 115430 <_API_Mutex_Lock>
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1135c0: 83 c4 0c add $0xc,%esp
1135c3: 8d 45 f4 lea -0xc(%ebp),%eax
1135c6: 50 push %eax
1135c7: ff 75 08 pushl 0x8(%ebp)
1135ca: 68 c0 58 13 00 push $0x1358c0
1135cf: e8 cc 35 00 00 call 116ba0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
1135d4: 83 c4 10 add $0x10,%esp
1135d7: 8b 55 f4 mov -0xc(%ebp),%edx
1135da: 85 d2 test %edx,%edx
1135dc: 74 22 je 113600 <rtems_region_get_segment_size+0x64>
1135de: 4a dec %edx
1135df: 74 47 je 113628 <rtems_region_get_segment_size+0x8c><== ALWAYS TAKEN
1135e1: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1135e6: 83 ec 0c sub $0xc,%esp
1135e9: ff 35 f4 5a 13 00 pushl 0x135af4
1135ef: e8 84 1e 00 00 call 115478 <_API_Mutex_Unlock>
1135f4: 83 c4 10 add $0x10,%esp
return return_status;
}
1135f7: 89 d8 mov %ebx,%eax
1135f9: 8d 65 f8 lea -0x8(%ebp),%esp
1135fc: 5b pop %ebx
1135fd: 5e pop %esi
1135fe: c9 leave
1135ff: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_user_area( &the_region->Memory, segment, size ) )
113600: 52 push %edx
113601: 53 push %ebx
113602: 56 push %esi
113603: 83 c0 68 add $0x68,%eax
113606: 50 push %eax
113607: e8 a0 2f 00 00 call 1165ac <_Heap_Size_of_user_area>
11360c: 83 c4 10 add $0x10,%esp
11360f: 3c 01 cmp $0x1,%al
113611: 19 db sbb %ebx,%ebx
113613: 83 e3 09 and $0x9,%ebx
113616: eb ce jmp 1135e6 <rtems_region_get_segment_size+0x4a>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
113618: bb 09 00 00 00 mov $0x9,%ebx
}
11361d: 89 d8 mov %ebx,%eax
11361f: 8d 65 f8 lea -0x8(%ebp),%esp
113622: 5b pop %ebx
113623: 5e pop %esi
113624: c9 leave
113625: c3 ret
113626: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
113628: bb 04 00 00 00 mov $0x4,%ebx
11362d: eb b7 jmp 1135e6 <rtems_region_get_segment_size+0x4a>
00113654 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
113654: 55 push %ebp
113655: 89 e5 mov %esp,%ebp
113657: 57 push %edi
113658: 56 push %esi
113659: 53 push %ebx
11365a: 83 ec 1c sub $0x1c,%esp
11365d: 8b 7d 14 mov 0x14(%ebp),%edi
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
113660: 85 ff test %edi,%edi
113662: 0f 84 bc 00 00 00 je 113724 <rtems_region_resize_segment+0xd0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
113668: 83 ec 0c sub $0xc,%esp
11366b: ff 35 f4 5a 13 00 pushl 0x135af4
113671: e8 ba 1d 00 00 call 115430 <_API_Mutex_Lock>
113676: 83 c4 0c add $0xc,%esp
113679: 8d 45 ec lea -0x14(%ebp),%eax
11367c: 50 push %eax
11367d: ff 75 08 pushl 0x8(%ebp)
113680: 68 c0 58 13 00 push $0x1358c0
113685: e8 16 35 00 00 call 116ba0 <_Objects_Get_no_protection>
11368a: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
11368c: 83 c4 10 add $0x10,%esp
11368f: 8b 45 ec mov -0x14(%ebp),%eax
113692: 85 c0 test %eax,%eax
113694: 74 2a je 1136c0 <rtems_region_resize_segment+0x6c>
113696: 48 dec %eax
113697: 0f 84 97 00 00 00 je 113734 <rtems_region_resize_segment+0xe0><== ALWAYS TAKEN
11369d: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1136a2: 83 ec 0c sub $0xc,%esp
1136a5: ff 35 f4 5a 13 00 pushl 0x135af4
1136ab: e8 c8 1d 00 00 call 115478 <_API_Mutex_Unlock>
1136b0: 83 c4 10 add $0x10,%esp
return return_status;
}
1136b3: 89 d8 mov %ebx,%eax
1136b5: 8d 65 f4 lea -0xc(%ebp),%esp
1136b8: 5b pop %ebx
1136b9: 5e pop %esi
1136ba: 5f pop %edi
1136bb: c9 leave
1136bc: c3 ret
1136bd: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1136c0: 83 ec 0c sub $0xc,%esp
1136c3: 8d 45 f0 lea -0x10(%ebp),%eax
1136c6: 50 push %eax
1136c7: 8d 45 e8 lea -0x18(%ebp),%eax
1136ca: 50 push %eax
1136cb: ff 75 10 pushl 0x10(%ebp)
1136ce: ff 75 0c pushl 0xc(%ebp)
1136d1: 8d 46 68 lea 0x68(%esi),%eax
1136d4: 50 push %eax
1136d5: e8 e6 2c 00 00 call 1163c0 <_Heap_Resize_block>
1136da: 89 c3 mov %eax,%ebx
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1136dc: 8b 45 e8 mov -0x18(%ebp),%eax
1136df: 89 07 mov %eax,(%edi)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
1136e1: 83 c4 20 add $0x20,%esp
1136e4: 85 db test %ebx,%ebx
1136e6: 75 24 jne 11370c <rtems_region_resize_segment+0xb8><== ALWAYS TAKEN
1136e8: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED
1136eb: 85 c0 test %eax,%eax <== NOT EXECUTED
1136ed: 75 51 jne 113740 <rtems_region_resize_segment+0xec><== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
1136ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1136f2: ff 35 f4 5a 13 00 pushl 0x135af4 <== NOT EXECUTED
1136f8: e8 7b 1d 00 00 call 115478 <_API_Mutex_Unlock> <== NOT EXECUTED
1136fd: 31 db xor %ebx,%ebx <== NOT EXECUTED
1136ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
113702: 89 d8 mov %ebx,%eax <== NOT EXECUTED
113704: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
113707: 5b pop %ebx <== NOT EXECUTED
113708: 5e pop %esi <== NOT EXECUTED
113709: 5f pop %edi <== NOT EXECUTED
11370a: c9 leave <== NOT EXECUTED
11370b: c3 ret <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11370c: 83 ec 0c sub $0xc,%esp
11370f: ff 35 f4 5a 13 00 pushl 0x135af4
113715: e8 5e 1d 00 00 call 115478 <_API_Mutex_Unlock>
return
11371a: 83 c4 10 add $0x10,%esp
11371d: 83 fb 01 cmp $0x1,%ebx
113720: 74 32 je 113754 <rtems_region_resize_segment+0x100><== NEVER TAKEN
113722: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
113724: bb 09 00 00 00 mov $0x9,%ebx
}
113729: 89 d8 mov %ebx,%eax
11372b: 8d 65 f4 lea -0xc(%ebp),%esp
11372e: 5b pop %ebx
11372f: 5e pop %esi
113730: 5f pop %edi
113731: c9 leave
113732: c3 ret
113733: 90 nop
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
return
113734: bb 04 00 00 00 mov $0x4,%ebx
113739: e9 64 ff ff ff jmp 1136a2 <rtems_region_resize_segment+0x4e>
11373e: 66 90 xchg %ax,%ax
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
113740: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
113743: 56 push %esi <== NOT EXECUTED
113744: e8 6b 6b 00 00 call 11a2b4 <_Region_Process_queue> <== NOT EXECUTED
113749: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11374c: e9 62 ff ff ff jmp 1136b3 <rtems_region_resize_segment+0x5f><== NOT EXECUTED
113751: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
return
113754: b3 0d mov $0xd,%bl <== NOT EXECUTED
113756: e9 58 ff ff ff jmp 1136b3 <rtems_region_resize_segment+0x5f><== NOT EXECUTED
0011375c <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
Objects_Id id,
void *segment
)
{
11375c: 55 push %ebp
11375d: 89 e5 mov %esp,%ebp
11375f: 53 push %ebx
113760: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
113763: ff 35 f4 5a 13 00 pushl 0x135af4
113769: e8 c2 1c 00 00 call 115430 <_API_Mutex_Lock>
11376e: 83 c4 0c add $0xc,%esp
113771: 8d 45 f8 lea -0x8(%ebp),%eax
113774: 50 push %eax
113775: ff 75 08 pushl 0x8(%ebp)
113778: 68 c0 58 13 00 push $0x1358c0
11377d: e8 1e 34 00 00 call 116ba0 <_Objects_Get_no_protection>
113782: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
113784: 83 c4 10 add $0x10,%esp
113787: 8b 45 f8 mov -0x8(%ebp),%eax
11378a: 85 c0 test %eax,%eax
11378c: 75 1e jne 1137ac <rtems_region_return_segment+0x50>
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
11378e: 83 ec 08 sub $0x8,%esp
113791: ff 75 0c pushl 0xc(%ebp)
113794: 8d 43 68 lea 0x68(%ebx),%eax
113797: 50 push %eax
113798: e8 07 28 00 00 call 115fa4 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
11379d: 83 c4 10 add $0x10,%esp
1137a0: 84 c0 test %al,%al
1137a2: 75 30 jne 1137d4 <rtems_region_return_segment+0x78>
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
1137a4: bb 09 00 00 00 mov $0x9,%ebx
1137a9: eb 09 jmp 1137b4 <rtems_region_return_segment+0x58>
1137ab: 90 nop
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1137ac: 48 dec %eax
1137ad: 74 1d je 1137cc <rtems_region_return_segment+0x70><== ALWAYS TAKEN
1137af: bb 19 00 00 00 mov $0x19,%ebx <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1137b4: 83 ec 0c sub $0xc,%esp
1137b7: ff 35 f4 5a 13 00 pushl 0x135af4
1137bd: e8 b6 1c 00 00 call 115478 <_API_Mutex_Unlock>
1137c2: 83 c4 10 add $0x10,%esp
return return_status;
}
1137c5: 89 d8 mov %ebx,%eax
1137c7: 8b 5d fc mov -0x4(%ebp),%ebx
1137ca: c9 leave
1137cb: c3 ret
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
1137cc: bb 04 00 00 00 mov $0x4,%ebx
1137d1: eb e1 jmp 1137b4 <rtems_region_return_segment+0x58>
1137d3: 90 nop
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
1137d4: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
1137d7: 83 ec 0c sub $0xc,%esp
1137da: 53 push %ebx
1137db: e8 d4 6a 00 00 call 11a2b4 <_Region_Process_queue>
1137e0: 31 db xor %ebx,%ebx
1137e2: 83 c4 10 add $0x10,%esp
1137e5: eb de jmp 1137c5 <rtems_region_return_segment+0x69>
0010a170 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10a170: 55 push %ebp
10a171: 89 e5 mov %esp,%ebp
10a173: 57 push %edi
10a174: 56 push %esi
10a175: 53 push %ebx
10a176: 83 ec 2c sub $0x2c,%esp
10a179: 8b 7d 08 mov 0x8(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
10a17c: 85 ff test %edi,%edi
10a17e: 74 64 je 10a1e4 <rtems_semaphore_create+0x74>
return RTEMS_INVALID_NAME;
if ( !id )
10a180: 8b 4d 18 mov 0x18(%ebp),%ecx
10a183: 85 c9 test %ecx,%ecx
10a185: 0f 84 01 01 00 00 je 10a28c <rtems_semaphore_create+0x11c><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10a18b: 8b 45 10 mov 0x10(%ebp),%eax
10a18e: 25 c0 00 00 00 and $0xc0,%eax
10a193: 74 1f je 10a1b4 <rtems_semaphore_create+0x44>
* @param[in] alignment the required alignment
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
10a195: 8b 5d 10 mov 0x10(%ebp),%ebx
10a198: 83 e3 30 and $0x30,%ebx
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
10a19b: 83 fb 10 cmp $0x10,%ebx
10a19e: 74 34 je 10a1d4 <rtems_semaphore_create+0x64>
10a1a0: 83 fb 20 cmp $0x20,%ebx
10a1a3: 74 2f je 10a1d4 <rtems_semaphore_create+0x64>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10a1a5: b8 0b 00 00 00 mov $0xb,%eax
}
10a1aa: 8d 65 f4 lea -0xc(%ebp),%esp
10a1ad: 5b pop %ebx
10a1ae: 5e pop %esi
10a1af: 5f pop %edi
10a1b0: c9 leave
10a1b1: c3 ret
10a1b2: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10a1b4: 8b 5d 10 mov 0x10(%ebp),%ebx
10a1b7: 83 e3 30 and $0x30,%ebx
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10a1ba: 85 db test %ebx,%ebx
10a1bc: 74 36 je 10a1f4 <rtems_semaphore_create+0x84>
10a1be: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10a1c2: 76 30 jbe 10a1f4 <rtems_semaphore_create+0x84>
10a1c4: b8 0a 00 00 00 mov $0xa,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a1c9: 8d 65 f4 lea -0xc(%ebp),%esp
10a1cc: 5b pop %ebx
10a1cd: 5e pop %esi
10a1ce: 5f pop %edi
10a1cf: c9 leave
10a1d0: c3 ret
10a1d1: 8d 76 00 lea 0x0(%esi),%esi
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
10a1d4: f6 45 10 04 testb $0x4,0x10(%ebp)
10a1d8: 74 cb je 10a1a5 <rtems_semaphore_create+0x35>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10a1da: 3d c0 00 00 00 cmp $0xc0,%eax
10a1df: 75 d9 jne 10a1ba <rtems_semaphore_create+0x4a>
10a1e1: eb c2 jmp 10a1a5 <rtems_semaphore_create+0x35>
10a1e3: 90 nop
{
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
10a1e4: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10a1e9: 8d 65 f4 lea -0xc(%ebp),%esp
10a1ec: 5b pop %ebx
10a1ed: 5e pop %esi
10a1ee: 5f pop %edi
10a1ef: c9 leave
10a1f0: c3 ret
10a1f1: 8d 76 00 lea 0x0(%esi),%esi
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a1f4: a1 58 e6 11 00 mov 0x11e658,%eax
10a1f9: 40 inc %eax
10a1fa: a3 58 e6 11 00 mov %eax,0x11e658
#ifdef __cplusplus
extern "C" {
#endif
/**
10a1ff: 83 ec 0c sub $0xc,%esp
10a202: 68 a0 e5 11 00 push $0x11e5a0
10a207: e8 a8 13 00 00 call 10b5b4 <_Objects_Allocate>
10a20c: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10a20e: 83 c4 10 add $0x10,%esp
10a211: 85 c0 test %eax,%eax
10a213: 0f 84 eb 00 00 00 je 10a304 <rtems_semaphore_create+0x194>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10a219: 8b 45 10 mov 0x10(%ebp),%eax
10a21c: 89 46 10 mov %eax,0x10(%esi)
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
10a21f: 85 db test %ebx,%ebx
10a221: 74 75 je 10a298 <rtems_semaphore_create+0x128>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
10a223: a8 40 test $0x40,%al
10a225: 0f 84 c5 00 00 00 je 10a2f0 <rtems_semaphore_create+0x180>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10a22b: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10a232: 83 fb 10 cmp $0x10,%ebx
10a235: 0f 84 d9 00 00 00 je 10a314 <rtems_semaphore_create+0x1a4>
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10a23b: c7 45 dc 02 00 00 00 movl $0x2,-0x24(%ebp)
the_mutex_attributes.only_owner_release = FALSE;
10a242: c6 45 e0 00 movb $0x0,-0x20(%ebp)
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
10a246: 8b 45 14 mov 0x14(%ebp),%eax
10a249: 89 45 e8 mov %eax,-0x18(%ebp)
mutex_status = _CORE_mutex_Initialize(
10a24c: 52 push %edx
10a24d: 31 c0 xor %eax,%eax
10a24f: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10a253: 0f 94 c0 sete %al
10a256: 50 push %eax
10a257: 8d 45 dc lea -0x24(%ebp),%eax
10a25a: 50 push %eax
10a25b: 8d 46 14 lea 0x14(%esi),%eax
10a25e: 50 push %eax
10a25f: e8 a0 0c 00 00 call 10af04 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10a264: 83 c4 10 add $0x10,%esp
10a267: 83 f8 06 cmp $0x6,%eax
10a26a: 75 61 jne 10a2cd <rtems_semaphore_create+0x15d><== ALWAYS TAKEN
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a26c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a26f: 56 push %esi <== NOT EXECUTED
10a270: 68 a0 e5 11 00 push $0x11e5a0 <== NOT EXECUTED
10a275: e8 fa 16 00 00 call 10b974 <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10a27a: e8 6d 20 00 00 call 10c2ec <_Thread_Enable_dispatch><== NOT EXECUTED
10a27f: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED
10a284: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a287: e9 1e ff ff ff jmp 10a1aa <rtems_semaphore_create+0x3a><== NOT EXECUTED
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10a28c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a291: e9 14 ff ff ff jmp 10a1aa <rtems_semaphore_create+0x3a><== NOT EXECUTED
10a296: 66 90 xchg %ax,%ax <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10a298: 31 c0 xor %eax,%eax
10a29a: f6 45 10 04 testb $0x4,0x10(%ebp)
10a29e: 0f 95 c0 setne %al
10a2a1: 89 45 f0 mov %eax,-0x10(%ebp)
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
10a2a4: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp)
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10a2ab: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
10a2b2: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp)
_CORE_semaphore_Initialize(
10a2b9: 50 push %eax
10a2ba: ff 75 0c pushl 0xc(%ebp)
10a2bd: 8d 45 ec lea -0x14(%ebp),%eax
10a2c0: 50 push %eax
10a2c1: 8d 46 14 lea 0x14(%esi),%eax
10a2c4: 50 push %eax
10a2c5: e8 f2 0e 00 00 call 10b1bc <_CORE_semaphore_Initialize>
10a2ca: 83 c4 10 add $0x10,%esp
10a2cd: 8b 4e 08 mov 0x8(%esi),%ecx
10a2d0: 0f b7 d1 movzwl %cx,%edx
10a2d3: a1 bc e5 11 00 mov 0x11e5bc,%eax
10a2d8: 89 34 90 mov %esi,(%eax,%edx,4)
10a2db: 89 7e 0c mov %edi,0xc(%esi)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10a2de: 8b 45 18 mov 0x18(%ebp),%eax
10a2e1: 89 08 mov %ecx,(%eax)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10a2e3: e8 04 20 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a2e8: 31 c0 xor %eax,%eax
10a2ea: e9 bb fe ff ff jmp 10a1aa <rtems_semaphore_create+0x3a>
10a2ef: 90 nop
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
10a2f0: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10a2f4: 79 43 jns 10a339 <rtems_semaphore_create+0x1c9>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10a2f6: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
10a2fd: e9 30 ff ff ff jmp 10a232 <rtems_semaphore_create+0xc2>
10a302: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10a304: e8 e3 1f 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a309: b8 05 00 00 00 mov $0x5,%eax
10a30e: e9 97 fe ff ff jmp 10a1aa <rtems_semaphore_create+0x3a>
10a313: 90 nop
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10a314: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
switch ( the_mutex_attributes.discipline ) {
10a31b: 8b 45 e4 mov -0x1c(%ebp),%eax
10a31e: 83 f8 01 cmp $0x1,%eax
10a321: 0f 86 1b ff ff ff jbe 10a242 <rtems_semaphore_create+0xd2>
10a327: 83 f8 03 cmp $0x3,%eax
10a32a: 0f 87 16 ff ff ff ja 10a246 <rtems_semaphore_create+0xd6><== NEVER TAKEN
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
10a330: c6 45 e0 01 movb $0x1,-0x20(%ebp)
10a334: e9 0d ff ff ff jmp 10a246 <rtems_semaphore_create+0xd6>
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10a339: 31 c0 xor %eax,%eax
10a33b: f6 45 10 04 testb $0x4,0x10(%ebp)
10a33f: 0f 95 c0 setne %al
10a342: 89 45 e4 mov %eax,-0x1c(%ebp)
10a345: e9 e8 fe ff ff jmp 10a232 <rtems_semaphore_create+0xc2>
0010a34c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10a34c: 55 push %ebp
10a34d: 89 e5 mov %esp,%ebp
10a34f: 53 push %ebx
10a350: 83 ec 18 sub $0x18,%esp
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a353: 8d 45 f8 lea -0x8(%ebp),%eax
10a356: 50 push %eax
10a357: ff 75 08 pushl 0x8(%ebp)
10a35a: 68 a0 e5 11 00 push $0x11e5a0
10a35f: e8 44 17 00 00 call 10baa8 <_Objects_Get>
10a364: 89 c3 mov %eax,%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10a366: 83 c4 10 add $0x10,%esp
10a369: 8b 4d f8 mov -0x8(%ebp),%ecx
10a36c: 85 c9 test %ecx,%ecx
10a36e: 74 0c je 10a37c <rtems_semaphore_delete+0x30>
10a370: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a375: 8b 5d fc mov -0x4(%ebp),%ebx
10a378: c9 leave
10a379: c3 ret
10a37a: 66 90 xchg %ax,%ax
);
/**
* This function tries to resize in place the block that is pointed to by the
* @a starting_address to the new @a size.
*
10a37c: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a37f: 83 e0 30 and $0x30,%eax
10a382: 74 58 je 10a3dc <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10a384: 8b 53 64 mov 0x64(%ebx),%edx
10a387: 85 d2 test %edx,%edx
10a389: 75 15 jne 10a3a0 <rtems_semaphore_delete+0x54>
10a38b: 83 f8 20 cmp $0x20,%eax
10a38e: 74 10 je 10a3a0 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10a390: e8 57 1f 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a395: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a39a: 8b 5d fc mov -0x4(%ebp),%ebx
10a39d: c9 leave
10a39e: c3 ret
10a39f: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10a3a0: 50 push %eax
10a3a1: 6a 04 push $0x4
10a3a3: 6a 00 push $0x0
10a3a5: 8d 43 14 lea 0x14(%ebx),%eax
10a3a8: 50 push %eax
10a3a9: e8 4a 0b 00 00 call 10aef8 <_CORE_mutex_Flush>
10a3ae: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10a3b1: 83 ec 08 sub $0x8,%esp
10a3b4: 53 push %ebx
10a3b5: 68 a0 e5 11 00 push $0x11e5a0
10a3ba: e8 75 12 00 00 call 10b634 <_Objects_Close>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a3bf: 58 pop %eax
10a3c0: 5a pop %edx
10a3c1: 53 push %ebx
10a3c2: 68 a0 e5 11 00 push $0x11e5a0
10a3c7: e8 a8 15 00 00 call 10b974 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10a3cc: e8 1b 1f 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a3d1: 31 c0 xor %eax,%eax
10a3d3: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a3d6: 8b 5d fc mov -0x4(%ebp),%ebx
10a3d9: c9 leave
10a3da: c3 ret
10a3db: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10a3dc: 51 push %ecx
10a3dd: 6a 02 push $0x2
10a3df: 6a 00 push $0x0
10a3e1: 8d 43 14 lea 0x14(%ebx),%eax
10a3e4: 50 push %eax
10a3e5: e8 c6 0d 00 00 call 10b1b0 <_CORE_semaphore_Flush>
10a3ea: 83 c4 10 add $0x10,%esp
10a3ed: eb c2 jmp 10a3b1 <rtems_semaphore_delete+0x65>
00113a68 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
113a68: 55 push %ebp
113a69: 89 e5 mov %esp,%ebp
113a6b: 83 ec 1c sub $0x1c,%esp
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
113a6e: 8d 45 fc lea -0x4(%ebp),%eax
113a71: 50 push %eax
113a72: ff 75 08 pushl 0x8(%ebp)
113a75: 68 00 59 13 00 push $0x135900
113a7a: e8 61 31 00 00 call 116be0 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
113a7f: 83 c4 10 add $0x10,%esp
113a82: 8b 55 fc mov -0x4(%ebp),%edx
113a85: 85 d2 test %edx,%edx
113a87: 74 07 je 113a90 <rtems_semaphore_flush+0x28>
113a89: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a8e: c9 leave
113a8f: c3 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
113a90: f6 40 10 30 testb $0x30,0x10(%eax)
113a94: 75 1a jne 113ab0 <rtems_semaphore_flush+0x48><== ALWAYS TAKEN
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
113a96: 52 push %edx <== NOT EXECUTED
113a97: 6a 01 push $0x1 <== NOT EXECUTED
113a99: 6a 00 push $0x0 <== NOT EXECUTED
113a9b: 83 c0 14 add $0x14,%eax <== NOT EXECUTED
113a9e: 50 push %eax <== NOT EXECUTED
113a9f: e8 80 21 00 00 call 115c24 <_CORE_semaphore_Flush> <== NOT EXECUTED
113aa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
113aa7: e8 78 39 00 00 call 117424 <_Thread_Enable_dispatch>
113aac: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113aae: c9 leave
113aaf: c3 ret
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
113ab0: 51 push %ecx
113ab1: 6a 01 push $0x1
113ab3: 6a 00 push $0x0
113ab5: 83 c0 14 add $0x14,%eax
113ab8: 50 push %eax
113ab9: e8 ae 1e 00 00 call 11596c <_CORE_mutex_Flush>
113abe: 83 c4 10 add $0x10,%esp
113ac1: eb e4 jmp 113aa7 <rtems_semaphore_flush+0x3f>
0010a3f0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10a3f0: 55 push %ebp
10a3f1: 89 e5 mov %esp,%ebp
10a3f3: 56 push %esi
10a3f4: 53 push %ebx
10a3f5: 83 ec 10 sub $0x10,%esp
10a3f8: 8b 5d 08 mov 0x8(%ebp),%ebx
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
10a3fb: 8d 45 f0 lea -0x10(%ebp),%eax
10a3fe: 50 push %eax
10a3ff: 8d 45 f4 lea -0xc(%ebp),%eax
10a402: 50 push %eax
10a403: 53 push %ebx
10a404: 68 a0 e5 11 00 push $0x11e5a0
10a409: e8 4e 16 00 00 call 10ba5c <_Objects_Get_isr_disable>
10a40e: 89 c2 mov %eax,%edx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
10a410: 83 c4 10 add $0x10,%esp
10a413: 8b 4d f4 mov -0xc(%ebp),%ecx
10a416: 85 c9 test %ecx,%ecx
10a418: 74 0e je 10a428 <rtems_semaphore_obtain+0x38>
10a41a: b8 04 00 00 00 mov $0x4,%eax
break;
}
return RTEMS_INVALID_ID;
}
10a41f: 8d 65 f8 lea -0x8(%ebp),%esp
10a422: 5b pop %ebx
10a423: 5e pop %esi
10a424: c9 leave
10a425: c3 ret
10a426: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a428: f6 40 10 30 testb $0x30,0x10(%eax)
10a42c: 74 3a je 10a468 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10a42e: 83 ec 0c sub $0xc,%esp
10a431: ff 75 f0 pushl -0x10(%ebp)
10a434: ff 75 10 pushl 0x10(%ebp)
10a437: 83 75 0c 01 xorl $0x1,0xc(%ebp)
10a43b: 83 65 0c 01 andl $0x1,0xc(%ebp)
10a43f: ff 75 0c pushl 0xc(%ebp)
10a442: 53 push %ebx
10a443: 8d 40 14 lea 0x14(%eax),%eax
10a446: 50 push %eax
10a447: e8 b0 0b 00 00 call 10affc <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10a44c: 83 c4 14 add $0x14,%esp
10a44f: a1 1c e7 11 00 mov 0x11e71c,%eax
10a454: ff 70 34 pushl 0x34(%eax)
10a457: e8 0c 01 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code>
10a45c: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10a45f: 8d 65 f8 lea -0x8(%ebp),%esp
10a462: 5b pop %ebx
10a463: 5e pop %esi
10a464: c9 leave
10a465: c3 ret
10a466: 66 90 xchg %ax,%ax
/**
* This function attempts to allocate a block of @a size bytes from
* @a the_heap. If insufficient memory is free in @a the_heap to allocate
* a block of the requested size, then NULL is returned.
*
* @param[in] the_heap is the heap to operate upon
10a468: 8b 75 f0 mov -0x10(%ebp),%esi
* @param[in] size is the amount of memory to allocate in bytes
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
10a46b: 8b 0d 1c e7 11 00 mov 0x11e71c,%ecx
Heap_Control *the_heap,
10a471: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
size_t size
10a478: 8b 40 5c mov 0x5c(%eax),%eax
10a47b: 85 c0 test %eax,%eax
10a47d: 75 29 jne 10a4a8 <rtems_semaphore_obtain+0xb8>
);
/**
* This function attempts to allocate a memory block of @a size bytes from
* @a the_heap so that the start of the user memory is aligned on the
* @a alignment boundary. If @a alignment is 0, it is set to CPU_ALIGNMENT.
10a47f: f6 45 0c 01 testb $0x1,0xc(%ebp)
10a483: 74 2b je 10a4b0 <rtems_semaphore_obtain+0xc0>
* Any other value of @a alignment is taken "as is", i.e., even odd
10a485: 56 push %esi
10a486: 9d popf
* alignments are possible.
10a487: c7 41 34 01 00 00 00 movl $0x1,0x34(%ecx)
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10a48e: 83 ec 0c sub $0xc,%esp
10a491: a1 1c e7 11 00 mov 0x11e71c,%eax
10a496: ff 70 34 pushl 0x34(%eax)
10a499: e8 da 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code>
10a49e: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10a4a1: 8d 65 f8 lea -0x8(%ebp),%esp
10a4a4: 5b pop %ebx
10a4a5: 5e pop %esi
10a4a6: c9 leave
10a4a7: c3 ret
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
);
10a4a8: 48 dec %eax
10a4a9: 89 42 5c mov %eax,0x5c(%edx)
10a4ac: 56 push %esi
10a4ad: 9d popf
10a4ae: eb de jmp 10a48e <rtems_semaphore_obtain+0x9e>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10a4b0: a1 58 e6 11 00 mov 0x11e658,%eax
10a4b5: 40 inc %eax
10a4b6: a3 58 e6 11 00 mov %eax,0x11e658
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
/**
* This routine grows @a the_heap memory area using the size bytes which
10a4bb: c7 42 44 01 00 00 00 movl $0x1,0x44(%edx)
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10a4c2: 8d 42 14 lea 0x14(%edx),%eax
10a4c5: 89 41 44 mov %eax,0x44(%ecx)
* @return NULL if unsuccessful and a pointer to the block if successful
10a4c8: 89 59 20 mov %ebx,0x20(%ecx)
*/
10a4cb: 56 push %esi
10a4cc: 9d popf
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
10a4cd: 52 push %edx
10a4ce: 68 fc ca 10 00 push $0x10cafc
10a4d3: ff 75 10 pushl 0x10(%ebp)
10a4d6: 50 push %eax
10a4d7: e8 d0 22 00 00 call 10c7ac <_Thread_queue_Enqueue_with_handler>
size_t size,
10a4dc: e8 0b 1e 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a4e1: 83 c4 10 add $0x10,%esp
10a4e4: eb a8 jmp 10a48e <rtems_semaphore_obtain+0x9e>
0010a4e8 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10a4e8: 55 push %ebp
10a4e9: 89 e5 mov %esp,%ebp
10a4eb: 53 push %ebx
10a4ec: 83 ec 18 sub $0x18,%esp
10a4ef: 8b 5d 08 mov 0x8(%ebp),%ebx
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] starting_address is the starting address of the memory
* to add to the heap
10a4f2: 8d 45 f8 lea -0x8(%ebp),%eax
10a4f5: 50 push %eax
10a4f6: 53 push %ebx
10a4f7: 68 a0 e5 11 00 push $0x11e5a0
10a4fc: e8 a7 15 00 00 call 10baa8 <_Objects_Get>
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10a501: 83 c4 10 add $0x10,%esp
10a504: 8b 55 f8 mov -0x8(%ebp),%edx
10a507: 85 d2 test %edx,%edx
10a509: 74 0d je 10a518 <rtems_semaphore_release+0x30>
10a50b: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a510: 8b 5d fc mov -0x4(%ebp),%ebx
10a513: c9 leave
10a514: c3 ret
10a515: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10a518: f6 40 10 30 testb $0x30,0x10(%eax)
10a51c: 75 26 jne 10a544 <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10a51e: 52 push %edx
10a51f: 6a 00 push $0x0
10a521: 53 push %ebx
10a522: 83 c0 14 add $0x14,%eax
10a525: 50 push %eax
10a526: e8 d1 0c 00 00 call 10b1fc <_CORE_semaphore_Surrender>
10a52b: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10a52d: e8 ba 1d 00 00 call 10c2ec <_Thread_Enable_dispatch>
return
10a532: 89 1c 24 mov %ebx,(%esp)
10a535: e8 3e 00 00 00 call 10a578 <_Semaphore_Translate_core_semaphore_return_code>
10a53a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a53d: 8b 5d fc mov -0x4(%ebp),%ebx
10a540: c9 leave
10a541: c3 ret
10a542: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10a544: 51 push %ecx
10a545: 6a 00 push $0x0
10a547: 53 push %ebx
10a548: 83 c0 14 add $0x14,%eax
10a54b: 50 push %eax
10a54c: e8 47 0b 00 00 call 10b098 <_CORE_mutex_Surrender>
10a551: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10a553: e8 94 1d 00 00 call 10c2ec <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10a558: 89 1c 24 mov %ebx,(%esp)
10a55b: e8 08 00 00 00 call 10a568 <_Semaphore_Translate_core_mutex_return_code>
10a560: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a563: 8b 5d fc mov -0x4(%ebp),%ebx
10a566: c9 leave
10a567: c3 ret
00116888 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
116888: 55 push %ebp
116889: 89 e5 mov %esp,%ebp
11688b: 83 ec 28 sub $0x28,%esp
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
11688e: 83 3d 24 e8 11 00 04 cmpl $0x4,0x11e824
116895: 74 1e je 1168b5 <rtems_shutdown_executive+0x2d><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
116897: c7 05 24 e8 11 00 04 movl $0x4,0x11e824
11689e: 00 00 00
#endif
}
/**
* This routine sets the current system state to that specified by
* the called.
1168a1: 83 ec 08 sub $0x8,%esp
1168a4: 68 40 e6 11 00 push $0x11e640
1168a9: 8d 45 e8 lea -0x18(%ebp),%eax
1168ac: 50 push %eax
1168ad: e8 0e 6c ff ff call 10d4c0 <_CPU_Context_switch>
1168b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
1168b5: c9 leave <== NOT EXECUTED
1168b6: c3 ret <== NOT EXECUTED
0010b224 <rtems_signal_catch>:
rtems_status_code rtems_signal_catch(
rtems_asr_entry asr_handler,
rtems_mode mode_set
)
{
10b224: 55 push %ebp
10b225: 89 e5 mov %esp,%ebp
10b227: 83 ec 08 sub $0x8,%esp
10b22a: 8b 4d 08 mov 0x8(%ebp),%ecx
RTEMS_API_Control *api;
ASR_Information *asr;
/* XXX normalize mode */
executing = _Thread_Executing;
api = (RTEMS_API_Control*)executing->API_Extensions[ THREAD_API_RTEMS ];
10b22d: a1 9c 17 12 00 mov 0x12179c,%eax
10b232: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b238: a1 d8 16 12 00 mov 0x1216d8,%eax
10b23d: 40 inc %eax
10b23e: a3 d8 16 12 00 mov %eax,0x1216d8
asr = &api->Signal;
_Thread_Disable_dispatch(); /* cannot reschedule while */
/* the thread is inconsistent */
if ( !_ASR_Is_null_handler( asr_handler ) ) {
10b243: 85 c9 test %ecx,%ecx
10b245: 74 15 je 10b25c <rtems_signal_catch+0x38><== NEVER TAKEN
asr->mode_set = mode_set;
10b247: 8b 45 0c mov 0xc(%ebp),%eax
10b24a: 89 42 10 mov %eax,0x10(%edx)
asr->handler = asr_handler;
10b24d: 89 4a 0c mov %ecx,0xc(%edx)
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10b250: e8 0b 21 00 00 call 10d360 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
}
10b255: 31 c0 xor %eax,%eax
10b257: c9 leave
10b258: c3 ret
10b259: 8d 76 00 lea 0x0(%esi),%esi
#endif
/**
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
10b25c: c6 42 08 01 movb $0x1,0x8(%edx) <== NOT EXECUTED
* @a page_size byte units. If @a page_size is 0 or is not multiple of
10b260: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) <== NOT EXECUTED
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
10b267: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) <== NOT EXECUTED
*
10b26e: c7 42 14 00 00 00 00 movl $0x0,0x14(%edx) <== NOT EXECUTED
* @param[in] the_heap is the heap to operate upon
10b275: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) <== NOT EXECUTED
* @param[in] starting_address is the starting address of the memory for
10b27c: c7 42 1c 00 00 00 00 movl $0x0,0x1c(%edx) <== NOT EXECUTED
asr->mode_set = mode_set;
asr->handler = asr_handler;
}
else
_ASR_Initialize( asr );
_Thread_Enable_dispatch();
10b283: e8 d8 20 00 00 call 10d360 <_Thread_Enable_dispatch><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
10b288: 31 c0 xor %eax,%eax <== NOT EXECUTED
10b28a: c9 leave <== NOT EXECUTED
10b28b: c3 ret <== NOT EXECUTED
00113c80 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
Objects_Id id,
rtems_signal_set signal_set
)
{
113c80: 55 push %ebp
113c81: 89 e5 mov %esp,%ebp
113c83: 53 push %ebx
113c84: 83 ec 14 sub $0x14,%esp
113c87: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
113c8a: 85 db test %ebx,%ebx
113c8c: 75 0a jne 113c98 <rtems_signal_send+0x18><== ALWAYS TAKEN
113c8e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113c93: 8b 5d fc mov -0x4(%ebp),%ebx
113c96: c9 leave
113c97: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
113c98: 83 ec 08 sub $0x8,%esp
113c9b: 8d 45 f8 lea -0x8(%ebp),%eax
113c9e: 50 push %eax
113c9f: ff 75 08 pushl 0x8(%ebp)
113ca2: e8 a1 37 00 00 call 117448 <_Thread_Get>
113ca7: 89 c1 mov %eax,%ecx
switch ( location ) {
113ca9: 83 c4 10 add $0x10,%esp
113cac: 8b 55 f8 mov -0x8(%ebp),%edx
113caf: 85 d2 test %edx,%edx
113cb1: 74 0d je 113cc0 <rtems_signal_send+0x40>
113cb3: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113cb8: 8b 5d fc mov -0x4(%ebp),%ebx
113cbb: c9 leave
113cbc: c3 ret
113cbd: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
113cc0: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
113cc6: 8b 42 0c mov 0xc(%edx),%eax
113cc9: 85 c0 test %eax,%eax
113ccb: 74 43 je 113d10 <rtems_signal_send+0x90>
if ( asr->is_enabled ) {
113ccd: 80 7a 08 00 cmpb $0x0,0x8(%edx)
113cd1: 74 29 je 113cfc <rtems_signal_send+0x7c><== NEVER TAKEN
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
113cd3: 9c pushf
113cd4: fa cli
113cd5: 58 pop %eax
);
113cd6: 09 5a 14 or %ebx,0x14(%edx)
113cd9: 50 push %eax
113cda: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
113cdb: c6 41 75 01 movb $0x1,0x75(%ecx)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
113cdf: a1 d8 5a 13 00 mov 0x135ad8,%eax
113ce4: 85 c0 test %eax,%eax
113ce6: 74 1c je 113d04 <rtems_signal_send+0x84>
113ce8: 3b 0d fc 5a 13 00 cmp 0x135afc,%ecx
113cee: 75 14 jne 113d04 <rtems_signal_send+0x84><== NEVER TAKEN
_ISR_Signals_to_thread_executing = TRUE;
113cf0: c6 05 a8 5b 13 00 01 movb $0x1,0x135ba8
113cf7: eb 0b jmp 113d04 <rtems_signal_send+0x84>
113cf9: 8d 76 00 lea 0x0(%esi),%esi
* @return NULL if unsuccessful and a pointer to the block if successful
*/
void *_Protected_heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
113cfc: 9c pushf <== NOT EXECUTED
113cfd: fa cli <== NOT EXECUTED
113cfe: 58 pop %eax <== NOT EXECUTED
);
113cff: 09 5a 18 or %ebx,0x18(%edx) <== NOT EXECUTED
113d02: 50 push %eax <== NOT EXECUTED
113d03: 9d popf <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
113d04: e8 1b 37 00 00 call 117424 <_Thread_Enable_dispatch>
113d09: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113d0b: 8b 5d fc mov -0x4(%ebp),%ebx
113d0e: c9 leave
113d0f: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
113d10: e8 0f 37 00 00 call 117424 <_Thread_Enable_dispatch>
113d15: b8 0b 00 00 00 mov $0xb,%eax
113d1a: e9 74 ff ff ff jmp 113c93 <rtems_signal_send+0x13>
0010a588 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
10a588: 55 push %ebp
10a589: 89 e5 mov %esp,%ebp
10a58b: 57 push %edi
10a58c: 56 push %esi
10a58d: 53 push %ebx
10a58e: 83 ec 0c sub $0xc,%esp
10a591: 8b 7d 08 mov 0x8(%ebp),%edi
10a594: 8b 5d 18 mov 0x18(%ebp),%ebx
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10a597: 8b 45 1c mov 0x1c(%ebp),%eax
10a59a: 85 c0 test %eax,%eax
10a59c: 0f 84 32 01 00 00 je 10a6d4 <rtems_task_create+0x14c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10a5a2: 85 ff test %edi,%edi
10a5a4: 0f 84 c2 00 00 00 je 10a66c <rtems_task_create+0xe4>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10a5aa: 66 85 db test %bx,%bx
10a5ad: 78 1b js 10a5ca <rtems_task_create+0x42>
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10a5af: 8b 45 0c mov 0xc(%ebp),%eax
10a5b2: 85 c0 test %eax,%eax
10a5b4: 0f 84 f2 00 00 00 je 10a6ac <rtems_task_create+0x124>
10a5ba: 0f b6 05 14 a1 11 00 movzbl 0x11a114,%eax
10a5c1: 39 45 0c cmp %eax,0xc(%ebp)
10a5c4: 0f 87 e2 00 00 00 ja 10a6ac <rtems_task_create+0x124><== NEVER TAKEN
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10a5ca: 83 ec 0c sub $0xc,%esp
10a5cd: ff 35 14 e7 11 00 pushl 0x11e714
10a5d3: e8 30 07 00 00 call 10ad08 <_API_Mutex_Lock>
#ifdef __cplusplus
extern "C" {
#endif
/**
10a5d8: c7 04 24 e0 e5 11 00 movl $0x11e5e0,(%esp)
10a5df: e8 d0 0f 00 00 call 10b5b4 <_Objects_Allocate>
10a5e4: 89 c6 mov %eax,%esi
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10a5e6: 83 c4 10 add $0x10,%esp
10a5e9: 85 c0 test %eax,%eax
10a5eb: 0f 84 cb 00 00 00 je 10a6bc <rtems_task_create+0x134>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10a5f1: 50 push %eax
10a5f2: 57 push %edi
10a5f3: 8b 45 14 mov 0x14(%ebp),%eax
10a5f6: 83 e0 01 and $0x1,%eax
10a5f9: 50 push %eax
10a5fa: 6a 00 push $0x0
10a5fc: 8b 45 14 mov 0x14(%ebp),%eax
10a5ff: c1 e8 09 shr $0x9,%eax
10a602: 83 e0 01 and $0x1,%eax
10a605: 50 push %eax
10a606: 8b 45 14 mov 0x14(%ebp),%eax
10a609: c1 e8 08 shr $0x8,%eax
10a60c: 83 f0 01 xor $0x1,%eax
10a60f: 83 e0 01 and $0x1,%eax
10a612: 50 push %eax
10a613: ff 75 0c pushl 0xc(%ebp)
10a616: 83 e3 01 and $0x1,%ebx
10a619: 53 push %ebx
10a61a: ff 75 10 pushl 0x10(%ebp)
10a61d: 6a 00 push $0x0
10a61f: 56 push %esi
10a620: 68 e0 e5 11 00 push $0x11e5e0
10a625: e8 66 1d 00 00 call 10c390 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10a62a: 83 c4 30 add $0x30,%esp
10a62d: 84 c0 test %al,%al
10a62f: 74 4b je 10a67c <rtems_task_create+0xf4>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10a631: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax
10a637: c1 6d 14 0a shrl $0xa,0x14(%ebp)
10a63b: 83 75 14 01 xorl $0x1,0x14(%ebp)
10a63f: 8a 55 14 mov 0x14(%ebp),%dl
10a642: 83 e2 01 and $0x1,%edx
10a645: 88 50 08 mov %dl,0x8(%eax)
*id = the_thread->Object.id;
10a648: 8b 46 08 mov 0x8(%esi),%eax
10a64b: 8b 55 1c mov 0x1c(%ebp),%edx
10a64e: 89 02 mov %eax,(%edx)
);
}
#endif
_RTEMS_Unlock_allocator();
10a650: 83 ec 0c sub $0xc,%esp
10a653: ff 35 14 e7 11 00 pushl 0x11e714
10a659: e8 f2 06 00 00 call 10ad50 <_API_Mutex_Unlock>
10a65e: 31 c0 xor %eax,%eax
10a660: 83 c4 10 add $0x10,%esp
return RTEMS_SUCCESSFUL;
}
10a663: 8d 65 f4 lea -0xc(%ebp),%esp
10a666: 5b pop %ebx
10a667: 5e pop %esi
10a668: 5f pop %edi
10a669: c9 leave
10a66a: c3 ret
10a66b: 90 nop
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10a66c: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10a671: 8d 65 f4 lea -0xc(%ebp),%esp
10a674: 5b pop %ebx
10a675: 5e pop %esi
10a676: 5f pop %edi
10a677: c9 leave
10a678: c3 ret
10a679: 8d 76 00 lea 0x0(%esi),%esi
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
10a67c: 83 ec 0c sub $0xc,%esp
10a67f: ff 76 08 pushl 0x8(%esi)
10a682: e8 61 13 00 00 call 10b9e8 <_Objects_Get_information_id>
10a687: 5a pop %edx
10a688: 59 pop %ecx
10a689: 56 push %esi
10a68a: 50 push %eax
10a68b: e8 e4 12 00 00 call 10b974 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10a690: 58 pop %eax
10a691: ff 35 14 e7 11 00 pushl 0x11e714
10a697: e8 b4 06 00 00 call 10ad50 <_API_Mutex_Unlock>
10a69c: b8 0d 00 00 00 mov $0xd,%eax
10a6a1: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10a6a4: 8d 65 f4 lea -0xc(%ebp),%esp
10a6a7: 5b pop %ebx
10a6a8: 5e pop %esi
10a6a9: 5f pop %edi
10a6aa: c9 leave
10a6ab: c3 ret
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
10a6ac: b8 13 00 00 00 mov $0x13,%eax
}
10a6b1: 8d 65 f4 lea -0xc(%ebp),%esp
10a6b4: 5b pop %ebx
10a6b5: 5e pop %esi
10a6b6: 5f pop %edi
10a6b7: c9 leave
10a6b8: c3 ret
10a6b9: 8d 76 00 lea 0x0(%esi),%esi
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10a6bc: 83 ec 0c sub $0xc,%esp
10a6bf: ff 35 14 e7 11 00 pushl 0x11e714
10a6c5: e8 86 06 00 00 call 10ad50 <_API_Mutex_Unlock>
10a6ca: b8 05 00 00 00 mov $0x5,%eax
10a6cf: 83 c4 10 add $0x10,%esp
10a6d2: eb 9d jmp 10a671 <rtems_task_create+0xe9>
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10a6d4: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
10a6d9: eb 96 jmp 10a671 <rtems_task_create+0xe9><== NOT EXECUTED
0010a6dc <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
10a6dc: 55 push %ebp
10a6dd: 89 e5 mov %esp,%ebp
10a6df: 53 push %ebx
10a6e0: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10a6e3: ff 35 14 e7 11 00 pushl 0x11e714
10a6e9: e8 1a 06 00 00 call 10ad08 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10a6ee: 58 pop %eax
10a6ef: 5a pop %edx
10a6f0: 8d 45 f8 lea -0x8(%ebp),%eax
10a6f3: 50 push %eax
10a6f4: ff 75 08 pushl 0x8(%ebp)
10a6f7: e8 14 1c 00 00 call 10c310 <_Thread_Get>
10a6fc: 89 c3 mov %eax,%ebx
switch ( location ) {
10a6fe: 83 c4 10 add $0x10,%esp
10a701: 8b 45 f8 mov -0x8(%ebp),%eax
10a704: 85 c0 test %eax,%eax
10a706: 75 44 jne 10a74c <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10a708: 83 ec 0c sub $0xc,%esp
10a70b: ff 73 08 pushl 0x8(%ebx)
10a70e: e8 d5 12 00 00 call 10b9e8 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10a713: 5a pop %edx
10a714: 59 pop %ecx
10a715: 53 push %ebx
10a716: 50 push %eax
10a717: e8 b4 18 00 00 call 10bfd0 <_Thread_Close>
10a71c: 58 pop %eax
10a71d: ff 73 08 pushl 0x8(%ebx)
10a720: e8 c3 12 00 00 call 10b9e8 <_Objects_Get_information_id>
10a725: 5a pop %edx
10a726: 59 pop %ecx
10a727: 53 push %ebx
10a728: 50 push %eax
10a729: e8 46 12 00 00 call 10b974 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10a72e: 58 pop %eax
10a72f: ff 35 14 e7 11 00 pushl 0x11e714
10a735: e8 16 06 00 00 call 10ad50 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10a73a: e8 ad 1b 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a73f: 31 c0 xor %eax,%eax
10a741: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10a744: 8b 5d fc mov -0x4(%ebp),%ebx
10a747: c9 leave
10a748: c3 ret
10a749: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10a74c: 83 ec 0c sub $0xc,%esp
10a74f: ff 35 14 e7 11 00 pushl 0x11e714
10a755: e8 f6 05 00 00 call 10ad50 <_API_Mutex_Unlock>
10a75a: b8 04 00 00 00 mov $0x4,%eax
10a75f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_ID;
}
10a762: 8b 5d fc mov -0x4(%ebp),%ebx
10a765: c9 leave
10a766: c3 ret
0010be34 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
10be34: 55 push %ebp
10be35: 89 e5 mov %esp,%ebp
10be37: 83 ec 18 sub $0x18,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10be3a: a1 34 3a 12 00 mov 0x123a34,%eax
10be3f: 8b 40 40 mov 0x40(%eax),%eax
10be42: 80 78 04 00 cmpb $0x0,0x4(%eax)
10be46: 74 64 je 10beac <rtems_task_get_note+0x78><== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if ( !note )
10be48: 8b 45 10 mov 0x10(%ebp),%eax
10be4b: 85 c0 test %eax,%eax
10be4d: 0f 84 85 00 00 00 je 10bed8 <rtems_task_get_note+0xa4><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10be53: 83 7d 0c 0f cmpl $0xf,0xc(%ebp)
10be57: 77 4b ja 10bea4 <rtems_task_get_note+0x70>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10be59: 8b 4d 08 mov 0x8(%ebp),%ecx
10be5c: 85 c9 test %ecx,%ecx
10be5e: 74 54 je 10beb4 <rtems_task_get_note+0x80>
10be60: a1 5c 3a 12 00 mov 0x123a5c,%eax
10be65: 8b 55 08 mov 0x8(%ebp),%edx
10be68: 3b 50 08 cmp 0x8(%eax),%edx
10be6b: 74 4c je 10beb9 <rtems_task_get_note+0x85>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10be6d: 83 ec 08 sub $0x8,%esp
10be70: 8d 45 fc lea -0x4(%ebp),%eax
10be73: 50 push %eax
10be74: ff 75 08 pushl 0x8(%ebp)
10be77: e8 e8 1e 00 00 call 10dd64 <_Thread_Get>
switch ( location ) {
10be7c: 83 c4 10 add $0x10,%esp
10be7f: 8b 55 fc mov -0x4(%ebp),%edx
10be82: 85 d2 test %edx,%edx
10be84: 75 4a jne 10bed0 <rtems_task_get_note+0x9c><== ALWAYS TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10be86: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax <== NOT EXECUTED
10be8c: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED
10be8f: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax <== NOT EXECUTED
10be93: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED
10be96: 89 02 mov %eax,(%edx) <== NOT EXECUTED
_Thread_Enable_dispatch();
10be98: e8 a3 1e 00 00 call 10dd40 <_Thread_Enable_dispatch><== NOT EXECUTED
10be9d: 31 c0 xor %eax,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be9f: c9 leave <== NOT EXECUTED
10bea0: c3 ret <== NOT EXECUTED
10bea1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10bea4: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bea9: c9 leave
10beaa: c3 ret
10beab: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10beac: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10beb1: c9 leave <== NOT EXECUTED
10beb2: c3 ret <== NOT EXECUTED
10beb3: 90 nop <== NOT EXECUTED
10beb4: a1 5c 3a 12 00 mov 0x123a5c,%eax
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10beb9: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10bebf: 8b 55 0c mov 0xc(%ebp),%edx
10bec2: 8b 44 90 20 mov 0x20(%eax,%edx,4),%eax
10bec6: 8b 55 10 mov 0x10(%ebp),%edx
10bec9: 89 02 mov %eax,(%edx)
10becb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10becd: c9 leave
10bece: c3 ret
10becf: 90 nop
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10bed0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bed5: c9 leave
10bed6: c3 ret
10bed7: 90 nop
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
10bed8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bedd: c9 leave <== NOT EXECUTED
10bede: c3 ret <== NOT EXECUTED
0010a768 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
Objects_Id *id
)
{
10a768: 55 push %ebp
10a769: 89 e5 mov %esp,%ebp
10a76b: 83 ec 08 sub $0x8,%esp
10a76e: 8b 45 08 mov 0x8(%ebp),%eax
10a771: 8b 55 10 mov 0x10(%ebp),%edx
Objects_Name_or_id_lookup_errors status;
if ( !id )
10a774: 85 d2 test %edx,%edx
10a776: 74 30 je 10a7a8 <rtems_task_ident+0x40> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
10a778: 85 c0 test %eax,%eax
10a77a: 75 10 jne 10a78c <rtems_task_ident+0x24>
*id = _Thread_Executing->Object.id;
10a77c: a1 1c e7 11 00 mov 0x11e71c,%eax
10a781: 8b 40 08 mov 0x8(%eax),%eax
10a784: 89 02 mov %eax,(%edx)
10a786: 31 c0 xor %eax,%eax
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
10a788: c9 leave
10a789: c3 ret
10a78a: 66 90 xchg %ax,%ax
if ( name == OBJECTS_ID_OF_SELF ) {
*id = _Thread_Executing->Object.id;
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
10a78c: 52 push %edx
10a78d: ff 75 0c pushl 0xc(%ebp)
10a790: 50 push %eax
10a791: 68 e0 e5 11 00 push $0x11e5e0
10a796: e8 65 14 00 00 call 10bc00 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
10a79b: 8b 04 85 6c 86 11 00 mov 0x11866c(,%eax,4),%eax
10a7a2: 83 c4 10 add $0x10,%esp
}
10a7a5: c9 leave
10a7a6: c3 ret
10a7a7: 90 nop
Objects_Id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
10a7a8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
return _Status_Object_name_errors_to_status[ status ];
}
10a7ad: c9 leave <== NOT EXECUTED
10a7ae: c3 ret <== NOT EXECUTED
0010ad1c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
Objects_Id id
)
{
10ad1c: 55 push %ebp
10ad1d: 89 e5 mov %esp,%ebp
10ad1f: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ad22: 8d 45 fc lea -0x4(%ebp),%eax
10ad25: 50 push %eax
10ad26: ff 75 08 pushl 0x8(%ebp)
10ad29: e8 ea 1b 00 00 call 10c918 <_Thread_Get>
switch ( location ) {
10ad2e: 83 c4 10 add $0x10,%esp
10ad31: 8b 55 fc mov -0x4(%ebp),%edx
10ad34: 85 d2 test %edx,%edx
10ad36: 74 08 je 10ad40 <rtems_task_is_suspended+0x24><== ALWAYS TAKEN
10ad38: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad3d: c9 leave <== NOT EXECUTED
10ad3e: c3 ret <== NOT EXECUTED
10ad3f: 90 nop <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
10ad40: f6 40 10 02 testb $0x2,0x10(%eax)
10ad44: 74 0e je 10ad54 <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ad46: e8 a9 1b 00 00 call 10c8f4 <_Thread_Enable_dispatch>
10ad4b: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad50: c9 leave
10ad51: c3 ret
10ad52: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
10ad54: e8 9b 1b 00 00 call 10c8f4 <_Thread_Enable_dispatch>
10ad59: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ad5b: c9 leave
10ad5c: c3 ret
0010fd50 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
10fd50: 55 push %ebp
10fd51: 89 e5 mov %esp,%ebp
10fd53: 57 push %edi
10fd54: 56 push %esi
10fd55: 53 push %ebx
10fd56: 83 ec 0c sub $0xc,%esp
10fd59: 8b 7d 08 mov 0x8(%ebp),%edi
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fd5c: 8b 4d 10 mov 0x10(%ebp),%ecx
10fd5f: 85 c9 test %ecx,%ecx
10fd61: 0f 84 31 01 00 00 je 10fe98 <rtems_task_mode+0x148> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
10fd67: a1 1c e7 11 00 mov 0x11e71c,%eax
10fd6c: 89 45 ec mov %eax,-0x14(%ebp)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10fd6f: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
10fd75: 89 55 f0 mov %edx,-0x10(%ebp)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
10fd78: 80 78 76 01 cmpb $0x1,0x76(%eax)
10fd7c: 19 f6 sbb %esi,%esi
10fd7e: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
10fd84: 8b 50 7c mov 0x7c(%eax),%edx
10fd87: 85 d2 test %edx,%edx
10fd89: 0f 85 bd 00 00 00 jne 10fe4c <rtems_task_mode+0xfc>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
10fd8f: 8b 5d f0 mov -0x10(%ebp),%ebx
10fd92: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
10fd96: 19 db sbb %ebx,%ebx
10fd98: 81 e3 00 04 00 00 and $0x400,%ebx
old_mode |= _ISR_Get_level();
10fd9e: e8 f9 d8 ff ff call 10d69c <_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;
10fda3: 09 c3 or %eax,%ebx
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
10fda5: 09 f3 or %esi,%ebx
10fda7: 8b 45 10 mov 0x10(%ebp),%eax
10fdaa: 89 18 mov %ebx,(%eax)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
10fdac: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
10fdb3: 74 11 je 10fdc6 <rtems_task_mode+0x76>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
10fdb5: 89 f8 mov %edi,%eax
10fdb7: c1 e8 08 shr $0x8,%eax
10fdba: 83 f0 01 xor $0x1,%eax
10fdbd: 83 e0 01 and $0x1,%eax
10fdc0: 8b 55 ec mov -0x14(%ebp),%edx
10fdc3: 88 42 76 mov %al,0x76(%edx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
10fdc6: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
10fdcd: 74 1e je 10fded <rtems_task_mode+0x9d>
if ( _Modes_Is_timeslice(mode_set) ) {
10fdcf: f7 c7 00 02 00 00 test $0x200,%edi
10fdd5: 0f 84 81 00 00 00 je 10fe5c <rtems_task_mode+0x10c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10fddb: 8b 5d ec mov -0x14(%ebp),%ebx
10fdde: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10fde5: a1 24 e6 11 00 mov 0x11e624,%eax
10fdea: 89 43 78 mov %eax,0x78(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fded: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fdf1: 74 09 je 10fdfc <rtems_task_mode+0xac>
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10fdf3: f7 c7 01 00 00 00 test $0x1,%edi
10fdf9: 74 5d je 10fe58 <rtems_task_mode+0x108>
10fdfb: fa cli
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
10fdfc: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
10fe03: 74 31 je 10fe36 <rtems_task_mode+0xe6>
10fe05: c1 ef 0a shr $0xa,%edi
10fe08: 83 f7 01 xor $0x1,%edi
10fe0b: 89 f8 mov %edi,%eax
10fe0d: 83 e0 01 and $0x1,%eax
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
10fe10: 8b 55 f0 mov -0x10(%ebp),%edx
10fe13: 38 42 08 cmp %al,0x8(%edx)
10fe16: 74 1e je 10fe36 <rtems_task_mode+0xe6>
asr->is_enabled = is_asr_enabled;
10fe18: 88 42 08 mov %al,0x8(%edx)
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
}
10fe1b: 9c pushf
10fe1c: fa cli
10fe1d: 59 pop %ecx
/**
10fe1e: 8b 5d f0 mov -0x10(%ebp),%ebx
10fe21: 8b 53 18 mov 0x18(%ebx),%edx
* This routine grows @a the_heap memory area using the size bytes which
10fe24: 8b 43 14 mov 0x14(%ebx),%eax
10fe27: 89 43 18 mov %eax,0x18(%ebx)
* begin at @a starting_address.
10fe2a: 89 53 14 mov %edx,0x14(%ebx)
*
10fe2d: 51 push %ecx
10fe2e: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
10fe2f: 8b 43 14 mov 0x14(%ebx),%eax
10fe32: 85 c0 test %eax,%eax
10fe34: 75 56 jne 10fe8c <rtems_task_mode+0x13c> <== NEVER TAKEN
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
10fe36: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
10fe38: 83 3d 24 e8 11 00 03 cmpl $0x3,0x11e824
10fe3f: 74 2f je 10fe70 <rtems_task_mode+0x120> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
10fe41: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10fe43: 83 c4 0c add $0xc,%esp
10fe46: 5b pop %ebx
10fe47: 5e pop %esi
10fe48: 5f pop %edi
10fe49: c9 leave
10fe4a: c3 ret
10fe4b: 90 nop
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;
10fe4c: 81 ce 00 02 00 00 or $0x200,%esi
10fe52: e9 38 ff ff ff jmp 10fd8f <rtems_task_mode+0x3f>
10fe57: 90 nop
* Returns pointer to the start of the memory block if success, NULL if
* failure.
*
* @param[in] the_heap is the heap to operate upon
* @param[in] size is the amount of memory to allocate in bytes
* @param[in] alignment the required alignment
10fe58: fb sti
10fe59: eb a1 jmp 10fdfc <rtems_task_mode+0xac>
10fe5b: 90 nop
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;
10fe5c: 8b 45 ec mov -0x14(%ebp),%eax
10fe5f: c7 40 7c 00 00 00 00 movl $0x0,0x7c(%eax)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
10fe66: f6 45 0c 01 testb $0x1,0xc(%ebp)
10fe6a: 74 90 je 10fdfc <rtems_task_mode+0xac>
10fe6c: eb 85 jmp 10fdf3 <rtems_task_mode+0xa3>
10fe6e: 66 90 xchg %ax,%ax
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
10fe70: e8 73 01 00 00 call 10ffe8 <_Thread_Evaluate_mode>
10fe75: 84 c0 test %al,%al
10fe77: 75 04 jne 10fe7d <rtems_task_mode+0x12d>
10fe79: 84 db test %bl,%bl
10fe7b: 74 c4 je 10fe41 <rtems_task_mode+0xf1> <== ALWAYS TAKEN
_Thread_Dispatch();
10fe7d: e8 0e c3 ff ff call 10c190 <_Thread_Dispatch>
10fe82: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10fe84: 83 c4 0c add $0xc,%esp
10fe87: 5b pop %ebx
10fe88: 5e pop %esi
10fe89: 5f pop %edi
10fe8a: c9 leave
10fe8b: c3 ret
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
10fe8c: 8b 45 ec mov -0x14(%ebp),%eax <== NOT EXECUTED
10fe8f: c6 40 75 01 movb $0x1,0x75(%eax) <== NOT EXECUTED
10fe93: b3 01 mov $0x1,%bl <== NOT EXECUTED
10fe95: eb a1 jmp 10fe38 <rtems_task_mode+0xe8> <== NOT EXECUTED
10fe97: 90 nop <== NOT EXECUTED
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
10fe98: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
if ( _System_state_Is_up(_System_state_Current) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10fe9d: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
10fea0: 5b pop %ebx <== NOT EXECUTED
10fea1: 5e pop %esi <== NOT EXECUTED
10fea2: 5f pop %edi <== NOT EXECUTED
10fea3: c9 leave <== NOT EXECUTED
10fea4: c3 ret <== NOT EXECUTED
0010b974 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
Objects_Id id
)
{
10b974: 55 push %ebp
10b975: 89 e5 mov %esp,%ebp
10b977: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10b97a: 8d 45 fc lea -0x4(%ebp),%eax
10b97d: 50 push %eax
10b97e: ff 75 08 pushl 0x8(%ebp)
10b981: e8 82 1e 00 00 call 10d808 <_Thread_Get>
switch ( location ) {
10b986: 83 c4 10 add $0x10,%esp
10b989: 8b 55 fc mov -0x4(%ebp),%edx
10b98c: 85 d2 test %edx,%edx
10b98e: 74 08 je 10b998 <rtems_task_resume+0x24>
10b990: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b995: c9 leave
10b996: c3 ret
10b997: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10b998: f6 40 10 02 testb $0x2,0x10(%eax)
10b99c: 75 0e jne 10b9ac <rtems_task_resume+0x38>
_Thread_Resume( the_thread, TRUE );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10b99e: e8 15 1e 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10b9a3: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b9a8: c9 leave
10b9a9: c3 ret
10b9aa: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, TRUE );
10b9ac: 83 ec 08 sub $0x8,%esp
10b9af: 6a 01 push $0x1
10b9b1: 50 push %eax
10b9b2: e8 75 26 00 00 call 10e02c <_Thread_Resume>
_Thread_Enable_dispatch();
10b9b7: e8 fc 1d 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10b9bc: 31 c0 xor %eax,%eax
10b9be: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b9c1: c9 leave
10b9c2: c3 ret
0010bfb8 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
10bfb8: 55 push %ebp
10bfb9: 89 e5 mov %esp,%ebp
10bfbb: 83 ec 18 sub $0x18,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10bfbe: a1 34 3a 12 00 mov 0x123a34,%eax
10bfc3: 8b 40 40 mov 0x40(%eax),%eax
10bfc6: 80 78 04 00 cmpb $0x0,0x4(%eax)
10bfca: 74 54 je 10c020 <rtems_task_set_note+0x68><== NEVER TAKEN
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10bfcc: 83 7d 0c 0f cmpl $0xf,0xc(%ebp)
10bfd0: 77 46 ja 10c018 <rtems_task_set_note+0x60>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10bfd2: 8b 4d 08 mov 0x8(%ebp),%ecx
10bfd5: 85 c9 test %ecx,%ecx
10bfd7: 74 4f je 10c028 <rtems_task_set_note+0x70><== NEVER TAKEN
10bfd9: a1 5c 3a 12 00 mov 0x123a5c,%eax
10bfde: 8b 55 08 mov 0x8(%ebp),%edx
10bfe1: 3b 50 08 cmp 0x8(%eax),%edx
10bfe4: 74 47 je 10c02d <rtems_task_set_note+0x75><== NEVER TAKEN
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10bfe6: 83 ec 08 sub $0x8,%esp
10bfe9: 8d 45 fc lea -0x4(%ebp),%eax
10bfec: 50 push %eax
10bfed: ff 75 08 pushl 0x8(%ebp)
10bff0: e8 6f 1d 00 00 call 10dd64 <_Thread_Get>
switch ( location ) {
10bff5: 83 c4 10 add $0x10,%esp
10bff8: 8b 55 fc mov -0x4(%ebp),%edx
10bffb: 85 d2 test %edx,%edx
10bffd: 75 45 jne 10c044 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10bfff: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10c005: 8b 55 10 mov 0x10(%ebp),%edx
10c008: 8b 4d 0c mov 0xc(%ebp),%ecx
10c00b: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4)
_Thread_Enable_dispatch();
10c00f: e8 2c 1d 00 00 call 10dd40 <_Thread_Enable_dispatch>
10c014: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c016: c9 leave
10c017: c3 ret
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10c018: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c01d: c9 leave
10c01e: c3 ret
10c01f: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10c020: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c025: c9 leave <== NOT EXECUTED
10c026: c3 ret <== NOT EXECUTED
10c027: 90 nop <== NOT EXECUTED
10c028: a1 5c 3a 12 00 mov 0x123a5c,%eax
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10c02d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10c033: 8b 55 10 mov 0x10(%ebp),%edx
10c036: 8b 4d 0c mov 0xc(%ebp),%ecx
10c039: 89 54 88 20 mov %edx,0x20(%eax,%ecx,4)
10c03d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c03f: c9 leave
10c040: c3 ret
10c041: 8d 76 00 lea 0x0(%esi),%esi
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10c044: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c049: c9 leave
10c04a: c3 ret
0010b744 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10b744: 55 push %ebp
10b745: 89 e5 mov %esp,%ebp
10b747: 56 push %esi
10b748: 53 push %ebx
10b749: 83 ec 10 sub $0x10,%esp
10b74c: 8b 5d 0c mov 0xc(%ebp),%ebx
10b74f: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10b752: 85 db test %ebx,%ebx
10b754: 74 0b je 10b761 <rtems_task_set_priority+0x1d>
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
10b756: 0f b6 05 14 d1 11 00 movzbl 0x11d114,%eax
10b75d: 39 c3 cmp %eax,%ebx
10b75f: 77 5f ja 10b7c0 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10b761: 85 f6 test %esi,%esi
10b763: 74 67 je 10b7cc <rtems_task_set_priority+0x88><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10b765: 83 ec 08 sub $0x8,%esp
10b768: 8d 45 f4 lea -0xc(%ebp),%eax
10b76b: 50 push %eax
10b76c: ff 75 08 pushl 0x8(%ebp)
10b76f: e8 60 1c 00 00 call 10d3d4 <_Thread_Get>
10b774: 89 c2 mov %eax,%edx
switch ( location ) {
10b776: 83 c4 10 add $0x10,%esp
10b779: 8b 45 f4 mov -0xc(%ebp),%eax
10b77c: 85 c0 test %eax,%eax
10b77e: 74 0c je 10b78c <rtems_task_set_priority+0x48>
10b780: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b785: 8d 65 f8 lea -0x8(%ebp),%esp
10b788: 5b pop %ebx
10b789: 5e pop %esi
10b78a: c9 leave
10b78b: c3 ret
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10b78c: 8b 42 14 mov 0x14(%edx),%eax
10b78f: 89 06 mov %eax,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10b791: 85 db test %ebx,%ebx
10b793: 74 1c je 10b7b1 <rtems_task_set_priority+0x6d>
the_thread->real_priority = new_priority;
10b795: 89 5a 18 mov %ebx,0x18(%edx)
if ( the_thread->resource_count == 0 ||
10b798: 8b 4a 1c mov 0x1c(%edx),%ecx
10b79b: 85 c9 test %ecx,%ecx
10b79d: 74 05 je 10b7a4 <rtems_task_set_priority+0x60>
10b79f: 3b 5a 14 cmp 0x14(%edx),%ebx
10b7a2: 73 0d jae 10b7b1 <rtems_task_set_priority+0x6d><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, FALSE );
10b7a4: 50 push %eax
10b7a5: 6a 00 push $0x0
10b7a7: 53 push %ebx
10b7a8: 52 push %edx
10b7a9: e8 26 17 00 00 call 10ced4 <_Thread_Change_priority>
10b7ae: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10b7b1: e8 fa 1b 00 00 call 10d3b0 <_Thread_Enable_dispatch>
10b7b6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7b8: 8d 65 f8 lea -0x8(%ebp),%esp
10b7bb: 5b pop %ebx
10b7bc: 5e pop %esi
10b7bd: c9 leave
10b7be: c3 ret
10b7bf: 90 nop
10b7c0: b8 13 00 00 00 mov $0x13,%eax
10b7c5: 8d 65 f8 lea -0x8(%ebp),%esp
10b7c8: 5b pop %ebx
10b7c9: 5e pop %esi
10b7ca: c9 leave
10b7cb: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10b7cc: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7d1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10b7d4: 5b pop %ebx <== NOT EXECUTED
10b7d5: 5e pop %esi <== NOT EXECUTED
10b7d6: c9 leave <== NOT EXECUTED
10b7d7: c3 ret <== NOT EXECUTED
0010a828 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10a828: 55 push %ebp
10a829: 89 e5 mov %esp,%ebp
10a82b: 53 push %ebx
10a82c: 83 ec 14 sub $0x14,%esp
10a82f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10a832: 85 db test %ebx,%ebx
10a834: 74 5a je 10a890 <rtems_task_start+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10a836: 83 ec 08 sub $0x8,%esp
10a839: 8d 45 f8 lea -0x8(%ebp),%eax
10a83c: 50 push %eax
10a83d: ff 75 08 pushl 0x8(%ebp)
10a840: e8 cb 1a 00 00 call 10c310 <_Thread_Get>
switch ( location ) {
10a845: 83 c4 10 add $0x10,%esp
10a848: 8b 55 f8 mov -0x8(%ebp),%edx
10a84b: 85 d2 test %edx,%edx
10a84d: 74 0d je 10a85c <rtems_task_start+0x34>
10a84f: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a854: 8b 5d fc mov -0x4(%ebp),%ebx
10a857: c9 leave
10a858: c3 ret
10a859: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
10a85c: 83 ec 0c sub $0xc,%esp
10a85f: ff 75 10 pushl 0x10(%ebp)
10a862: 6a 00 push $0x0
10a864: 53 push %ebx
10a865: 6a 00 push $0x0
10a867: 50 push %eax
10a868: e8 7b 25 00 00 call 10cde8 <_Thread_Start>
10a86d: 83 c4 20 add $0x20,%esp
10a870: 84 c0 test %al,%al
10a872: 75 10 jne 10a884 <rtems_task_start+0x5c>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10a874: e8 73 1a 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a879: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a87e: 8b 5d fc mov -0x4(%ebp),%ebx
10a881: c9 leave
10a882: c3 ret
10a883: 90 nop
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10a884: e8 63 1a 00 00 call 10c2ec <_Thread_Enable_dispatch>
10a889: 31 c0 xor %eax,%eax
10a88b: eb c7 jmp 10a854 <rtems_task_start+0x2c>
10a88d: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10a890: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10a895: 8b 5d fc mov -0x4(%ebp),%ebx
10a898: c9 leave
10a899: c3 ret
0010ba38 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
Objects_Id id
)
{
10ba38: 55 push %ebp
10ba39: 89 e5 mov %esp,%ebp
10ba3b: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ba3e: 8d 45 fc lea -0x4(%ebp),%eax
10ba41: 50 push %eax
10ba42: ff 75 08 pushl 0x8(%ebp)
10ba45: e8 be 1d 00 00 call 10d808 <_Thread_Get>
switch ( location ) {
10ba4a: 83 c4 10 add $0x10,%esp
10ba4d: 8b 55 fc mov -0x4(%ebp),%edx
10ba50: 85 d2 test %edx,%edx
10ba52: 74 08 je 10ba5c <rtems_task_suspend+0x24>
10ba54: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba59: c9 leave
10ba5a: c3 ret
10ba5b: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
10ba5c: f6 40 10 02 testb $0x2,0x10(%eax)
10ba60: 74 0e je 10ba70 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ba62: e8 51 1d 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10ba67: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba6c: c9 leave
10ba6d: c3 ret
10ba6e: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
10ba70: 83 ec 0c sub $0xc,%esp
10ba73: 50 push %eax
10ba74: e8 77 29 00 00 call 10e3f0 <_Thread_Suspend>
_Thread_Enable_dispatch();
10ba79: e8 3a 1d 00 00 call 10d7b8 <_Thread_Enable_dispatch>
10ba7e: 31 c0 xor %eax,%eax
10ba80: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba83: c9 leave
10ba84: c3 ret
0010bce8 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10bce8: 55 push %ebp
10bce9: 89 e5 mov %esp,%ebp
10bceb: 56 push %esi
10bcec: 53 push %ebx
10bced: 83 ec 10 sub $0x10,%esp
10bcf0: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10bcf3: 85 db test %ebx,%ebx
10bcf5: 0f 84 a1 00 00 00 je 10bd9c <rtems_task_variable_add+0xb4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10bcfb: 83 ec 08 sub $0x8,%esp
10bcfe: 8d 45 f4 lea -0xc(%ebp),%eax
10bd01: 50 push %eax
10bd02: ff 75 08 pushl 0x8(%ebp)
10bd05: e8 9e 1c 00 00 call 10d9a8 <_Thread_Get>
10bd0a: 89 c6 mov %eax,%esi
switch (location) {
10bd0c: 83 c4 10 add $0x10,%esp
10bd0f: 8b 45 f4 mov -0xc(%ebp),%eax
10bd12: 85 c0 test %eax,%eax
10bd14: 75 2e jne 10bd44 <rtems_task_variable_add+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10bd16: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
while (tvp) {
10bd1c: 85 c0 test %eax,%eax
10bd1e: 75 0a jne 10bd2a <rtems_task_variable_add+0x42>
10bd20: eb 2e jmp 10bd50 <rtems_task_variable_add+0x68>
10bd22: 66 90 xchg %ax,%ax
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10bd24: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10bd26: 85 c0 test %eax,%eax
10bd28: 74 26 je 10bd50 <rtems_task_variable_add+0x68>
if (tvp->ptr == ptr) {
10bd2a: 39 58 04 cmp %ebx,0x4(%eax)
10bd2d: 75 f5 jne 10bd24 <rtems_task_variable_add+0x3c>
tvp->dtor = dtor;
10bd2f: 8b 55 10 mov 0x10(%ebp),%edx
10bd32: 89 50 10 mov %edx,0x10(%eax)
_Thread_Enable_dispatch();
10bd35: e8 4a 1c 00 00 call 10d984 <_Thread_Enable_dispatch>
10bd3a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bd3c: 8d 65 f8 lea -0x8(%ebp),%esp
10bd3f: 5b pop %ebx
10bd40: 5e pop %esi
10bd41: c9 leave
10bd42: c3 ret
10bd43: 90 nop
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10bd44: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bd49: 8d 65 f8 lea -0x8(%ebp),%esp
10bd4c: 5b pop %ebx
10bd4d: 5e pop %esi
10bd4e: c9 leave
10bd4f: c3 ret
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
10bd50: 83 ec 0c sub $0xc,%esp
10bd53: 6a 14 push $0x14
10bd55: e8 3a 2e 00 00 call 10eb94 <_Workspace_Allocate>
10bd5a: 89 c2 mov %eax,%edx
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
10bd5c: 83 c4 10 add $0x10,%esp
10bd5f: 85 c0 test %eax,%eax
10bd61: 74 2d je 10bd90 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10bd63: 8b 03 mov (%ebx),%eax
10bd65: 89 42 08 mov %eax,0x8(%edx)
new->ptr = ptr;
10bd68: 89 5a 04 mov %ebx,0x4(%edx)
new->dtor = dtor;
10bd6b: 8b 45 10 mov 0x10(%ebp),%eax
10bd6e: 89 42 10 mov %eax,0x10(%edx)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10bd71: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
10bd77: 89 02 mov %eax,(%edx)
the_thread->task_variables = new;
10bd79: 89 96 04 01 00 00 mov %edx,0x104(%esi)
_Thread_Enable_dispatch();
10bd7f: e8 00 1c 00 00 call 10d984 <_Thread_Enable_dispatch>
10bd84: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bd86: 8d 65 f8 lea -0x8(%ebp),%esp
10bd89: 5b pop %ebx
10bd8a: 5e pop %esi
10bd8b: c9 leave
10bd8c: c3 ret
10bd8d: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10bd90: e8 ef 1b 00 00 call 10d984 <_Thread_Enable_dispatch>
10bd95: b8 1a 00 00 00 mov $0x1a,%eax
10bd9a: eb ad jmp 10bd49 <rtems_task_variable_add+0x61>
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10bd9c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bda1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10bda4: 5b pop %ebx <== NOT EXECUTED
10bda5: 5e pop %esi <== NOT EXECUTED
10bda6: c9 leave <== NOT EXECUTED
10bda7: c3 ret <== NOT EXECUTED
0010bda8 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10bda8: 55 push %ebp
10bda9: 89 e5 mov %esp,%ebp
10bdab: 56 push %esi
10bdac: 53 push %ebx
10bdad: 83 ec 10 sub $0x10,%esp
10bdb0: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10bdb3: 85 db test %ebx,%ebx
10bdb5: 74 3f je 10bdf6 <rtems_task_variable_delete+0x4e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10bdb7: 83 ec 08 sub $0x8,%esp
10bdba: 8d 45 f4 lea -0xc(%ebp),%eax
10bdbd: 50 push %eax
10bdbe: ff 75 08 pushl 0x8(%ebp)
10bdc1: e8 e2 1b 00 00 call 10d9a8 <_Thread_Get>
10bdc6: 89 c6 mov %eax,%esi
switch (location) {
10bdc8: 83 c4 10 add $0x10,%esp
10bdcb: 8b 45 f4 mov -0xc(%ebp),%eax
10bdce: 85 c0 test %eax,%eax
10bdd0: 75 32 jne 10be04 <rtems_task_variable_delete+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10bdd2: 8b 96 04 01 00 00 mov 0x104(%esi),%edx
while (tvp) {
10bdd8: 85 d2 test %edx,%edx
10bdda: 74 15 je 10bdf1 <rtems_task_variable_delete+0x49>
if (tvp->ptr == ptr) {
10bddc: 39 5a 04 cmp %ebx,0x4(%edx)
10bddf: 75 08 jne 10bde9 <rtems_task_variable_delete+0x41>
10bde1: eb 4c jmp 10be2f <rtems_task_variable_delete+0x87>
10bde3: 90 nop
10bde4: 39 5a 04 cmp %ebx,0x4(%edx)
10bde7: 74 27 je 10be10 <rtems_task_variable_delete+0x68>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10bde9: 89 d1 mov %edx,%ecx
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10bdeb: 8b 12 mov (%edx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10bded: 85 d2 test %edx,%edx
10bdef: 75 f3 jne 10bde4 <rtems_task_variable_delete+0x3c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10bdf1: e8 8e 1b 00 00 call 10d984 <_Thread_Enable_dispatch>
10bdf6: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bdfb: 8d 65 f8 lea -0x8(%ebp),%esp
10bdfe: 5b pop %ebx
10bdff: 5e pop %esi
10be00: c9 leave
10be01: c3 ret
10be02: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10be04: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be09: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10be0c: 5b pop %ebx <== NOT EXECUTED
10be0d: 5e pop %esi <== NOT EXECUTED
10be0e: c9 leave <== NOT EXECUTED
10be0f: c3 ret <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10be10: 8b 02 mov (%edx),%eax
10be12: 89 01 mov %eax,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
10be14: 83 ec 08 sub $0x8,%esp
10be17: 52 push %edx
10be18: 56 push %esi
10be19: e8 a6 00 00 00 call 10bec4 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10be1e: e8 61 1b 00 00 call 10d984 <_Thread_Enable_dispatch>
10be23: 31 c0 xor %eax,%eax
10be25: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be28: 8d 65 f8 lea -0x8(%ebp),%esp
10be2b: 5b pop %ebx
10be2c: 5e pop %esi
10be2d: c9 leave
10be2e: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
10be2f: 8b 02 mov (%edx),%eax
10be31: 89 86 04 01 00 00 mov %eax,0x104(%esi)
10be37: eb db jmp 10be14 <rtems_task_variable_delete+0x6c>
0010be3c <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10be3c: 55 push %ebp
10be3d: 89 e5 mov %esp,%ebp
10be3f: 56 push %esi
10be40: 53 push %ebx
10be41: 83 ec 10 sub $0x10,%esp
10be44: 8b 5d 0c mov 0xc(%ebp),%ebx
10be47: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10be4a: 85 db test %ebx,%ebx
10be4c: 74 56 je 10bea4 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10be4e: 85 f6 test %esi,%esi
10be50: 74 52 je 10bea4 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10be52: 83 ec 08 sub $0x8,%esp
10be55: 8d 45 f4 lea -0xc(%ebp),%eax
10be58: 50 push %eax
10be59: ff 75 08 pushl 0x8(%ebp)
10be5c: e8 47 1b 00 00 call 10d9a8 <_Thread_Get>
switch (location) {
10be61: 83 c4 10 add $0x10,%esp
10be64: 8b 55 f4 mov -0xc(%ebp),%edx
10be67: 85 d2 test %edx,%edx
10be69: 75 2d jne 10be98 <rtems_task_variable_get+0x5c><== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10be6b: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
10be71: 85 c0 test %eax,%eax
10be73: 75 09 jne 10be7e <rtems_task_variable_get+0x42>
10be75: eb 39 jmp 10beb0 <rtems_task_variable_get+0x74>
10be77: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10be78: 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) {
10be7a: 85 c0 test %eax,%eax
10be7c: 74 32 je 10beb0 <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10be7e: 39 58 04 cmp %ebx,0x4(%eax)
10be81: 75 f5 jne 10be78 <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;
10be83: 8b 40 0c mov 0xc(%eax),%eax
10be86: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10be88: e8 f7 1a 00 00 call 10d984 <_Thread_Enable_dispatch>
10be8d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be8f: 8d 65 f8 lea -0x8(%ebp),%esp
10be92: 5b pop %ebx
10be93: 5e pop %esi
10be94: c9 leave
10be95: c3 ret
10be96: 66 90 xchg %ax,%ax
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10be98: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be9d: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10bea0: 5b pop %ebx <== NOT EXECUTED
10bea1: 5e pop %esi <== NOT EXECUTED
10bea2: c9 leave <== NOT EXECUTED
10bea3: c3 ret <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
10bea4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bea9: 8d 65 f8 lea -0x8(%ebp),%esp
10beac: 5b pop %ebx
10bead: 5e pop %esi
10beae: c9 leave
10beaf: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10beb0: e8 cf 1a 00 00 call 10d984 <_Thread_Enable_dispatch>
10beb5: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10beba: 8d 65 f8 lea -0x8(%ebp),%esp
10bebd: 5b pop %ebx
10bebe: 5e pop %esi
10bebf: c9 leave
10bec0: c3 ret
0010b524 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10b524: 55 push %ebp
10b525: 89 e5 mov %esp,%ebp
10b527: 53 push %ebx
10b528: 83 ec 04 sub $0x4,%esp
10b52b: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10b52e: 80 3d cc 16 12 00 00 cmpb $0x0,0x1216cc
10b535: 0f 84 a1 00 00 00 je 10b5dc <rtems_task_wake_when+0xb8>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10b53b: 85 db test %ebx,%ebx
10b53d: 0f 84 a5 00 00 00 je 10b5e8 <rtems_task_wake_when+0xc4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10b543: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10b54a: 83 ec 0c sub $0xc,%esp
10b54d: 53 push %ebx
10b54e: e8 c1 f3 ff ff call 10a914 <_TOD_Validate>
10b553: 83 c4 10 add $0x10,%esp
10b556: 84 c0 test %al,%al
10b558: 75 0a jne 10b564 <rtems_task_wake_when+0x40>
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10b55a: b8 14 00 00 00 mov $0x14,%eax
}
10b55f: 8b 5d fc mov -0x4(%ebp),%ebx
10b562: c9 leave
10b563: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10b564: 83 ec 0c sub $0xc,%esp
10b567: 53 push %ebx
10b568: e8 17 f3 ff ff call 10a884 <_TOD_To_seconds>
10b56d: 89 c3 mov %eax,%ebx
if ( seconds <= _TOD_Seconds_since_epoch )
10b56f: 83 c4 10 add $0x10,%esp
10b572: 3b 05 4c 17 12 00 cmp 0x12174c,%eax
10b578: 76 e0 jbe 10b55a <rtems_task_wake_when+0x36>
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
10b57a: a1 b8 16 12 00 mov 0x1216b8,%eax
10b57f: 40 inc %eax
10b580: a3 b8 16 12 00 mov %eax,0x1216b8
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10b585: 83 ec 08 sub $0x8,%esp
10b588: 6a 10 push $0x10
10b58a: ff 35 7c 17 12 00 pushl 0x12177c
10b590: e8 7f 23 00 00 call 10d914 <_Thread_Set_state>
_Watchdog_Initialize(
10b595: a1 7c 17 12 00 mov 0x12177c,%eax
10b59a: 8b 50 08 mov 0x8(%eax),%edx
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
10b59d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
* @param[in] the_heap is the heap to operate upon
10b5a4: c7 40 64 c8 ce 10 00 movl $0x10cec8,0x64(%eax)
* @param[in] starting_address is the starting address of the memory for
10b5ab: 89 50 68 mov %edx,0x68(%eax)
* the heap
10b5ae: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
10b5b5: 2b 1d 4c 17 12 00 sub 0x12174c,%ebx
10b5bb: 89 58 54 mov %ebx,0x54(%eax)
size_t size
);
10b5be: 5a pop %edx
10b5bf: 59 pop %ecx
10b5c0: 83 c0 48 add $0x48,%eax
10b5c3: 50 push %eax
10b5c4: 68 90 17 12 00 push $0x121790
10b5c9: e8 1e 2a 00 00 call 10dfec <_Watchdog_Insert>
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
10b5ce: e8 8d 1a 00 00 call 10d060 <_Thread_Enable_dispatch>
10b5d3: 31 c0 xor %eax,%eax
10b5d5: 83 c4 10 add $0x10,%esp
10b5d8: eb 85 jmp 10b55f <rtems_task_wake_when+0x3b>
10b5da: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10b5dc: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b5e1: 8b 5d fc mov -0x4(%ebp),%ebx
10b5e4: c9 leave
10b5e5: c3 ret
10b5e6: 66 90 xchg %ax,%ax
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10b5e8: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b5ed: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10b5f0: c9 leave <== NOT EXECUTED
10b5f1: c3 ret <== NOT EXECUTED
00114448 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
Objects_Id id
)
{
114448: 55 push %ebp
114449: 89 e5 mov %esp,%ebp
11444b: 83 ec 1c sub $0x1c,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11444e: 8d 45 fc lea -0x4(%ebp),%eax
114451: 50 push %eax
114452: ff 75 08 pushl 0x8(%ebp)
114455: 68 a0 5d 13 00 push $0x135da0
11445a: e8 81 27 00 00 call 116be0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11445f: 83 c4 10 add $0x10,%esp
114462: 8b 55 fc mov -0x4(%ebp),%edx
114465: 85 d2 test %edx,%edx
114467: 74 07 je 114470 <rtems_timer_cancel+0x28>
114469: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11446e: c9 leave
11446f: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
114470: 83 78 38 04 cmpl $0x4,0x38(%eax)
114474: 74 0f je 114485 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
114476: 83 ec 0c sub $0xc,%esp
114479: 83 c0 10 add $0x10,%eax
11447c: 50 push %eax
11447d: e8 9a 43 00 00 call 11881c <_Watchdog_Remove>
114482: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
114485: e8 9a 2f 00 00 call 117424 <_Thread_Enable_dispatch>
11448a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11448c: c9 leave
11448d: c3 ret
00114490 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
Objects_Id *id
)
{
114490: 55 push %ebp
114491: 89 e5 mov %esp,%ebp
114493: 57 push %edi
114494: 56 push %esi
114495: 53 push %ebx
114496: 83 ec 0c sub $0xc,%esp
114499: 8b 75 08 mov 0x8(%ebp),%esi
11449c: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
11449f: 85 f6 test %esi,%esi
1144a1: 74 71 je 114514 <rtems_timer_create+0x84>
return RTEMS_INVALID_NAME;
if ( !id )
1144a3: 85 ff test %edi,%edi
1144a5: 0f 84 8d 00 00 00 je 114538 <rtems_timer_create+0xa8><== NEVER TAKEN
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
1144ab: a1 38 5a 13 00 mov 0x135a38,%eax
1144b0: 40 inc %eax
1144b1: a3 38 5a 13 00 mov %eax,0x135a38
#ifdef __cplusplus
extern "C" {
#endif
/**
1144b6: 83 ec 0c sub $0xc,%esp
1144b9: 68 a0 5d 13 00 push $0x135da0
1144be: e8 e9 21 00 00 call 1166ac <_Objects_Allocate>
1144c3: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
1144c5: 83 c4 10 add $0x10,%esp
1144c8: 85 c0 test %eax,%eax
1144ca: 74 58 je 114524 <rtems_timer_create+0x94>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
1144cc: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
1144d3: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
* @param[in] the_heap is the heap to operate upon
1144da: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
* @param[in] starting_address is the starting address of the memory for
1144e1: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
* the heap
1144e8: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
1144ef: 8b 48 08 mov 0x8(%eax),%ecx
1144f2: 0f b7 d1 movzwl %cx,%edx
1144f5: a1 bc 5d 13 00 mov 0x135dbc,%eax
1144fa: 89 1c 90 mov %ebx,(%eax,%edx,4)
1144fd: 89 73 0c mov %esi,0xc(%ebx)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
114500: 89 0f mov %ecx,(%edi)
_Thread_Enable_dispatch();
114502: e8 1d 2f 00 00 call 117424 <_Thread_Enable_dispatch>
114507: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
114509: 8d 65 f4 lea -0xc(%ebp),%esp
11450c: 5b pop %ebx
11450d: 5e pop %esi
11450e: 5f pop %edi
11450f: c9 leave
114510: c3 ret
114511: 8d 76 00 lea 0x0(%esi),%esi
Objects_Id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
114514: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
114519: 8d 65 f4 lea -0xc(%ebp),%esp
11451c: 5b pop %ebx
11451d: 5e pop %esi
11451e: 5f pop %edi
11451f: c9 leave
114520: c3 ret
114521: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
114524: e8 fb 2e 00 00 call 117424 <_Thread_Enable_dispatch>
114529: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11452e: 8d 65 f4 lea -0xc(%ebp),%esp
114531: 5b pop %ebx
114532: 5e pop %esi
114533: 5f pop %edi
114534: c9 leave
114535: c3 ret
114536: 66 90 xchg %ax,%ax
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
114538: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11453d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
114540: 5b pop %ebx <== NOT EXECUTED
114541: 5e pop %esi <== NOT EXECUTED
114542: 5f pop %edi <== NOT EXECUTED
114543: c9 leave <== NOT EXECUTED
114544: c3 ret <== NOT EXECUTED
00114548 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
Objects_Id id
)
{
114548: 55 push %ebp
114549: 89 e5 mov %esp,%ebp
11454b: 53 push %ebx
11454c: 83 ec 18 sub $0x18,%esp
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
11454f: 8d 45 f8 lea -0x8(%ebp),%eax
114552: 50 push %eax
114553: ff 75 08 pushl 0x8(%ebp)
114556: 68 a0 5d 13 00 push $0x135da0
11455b: e8 80 26 00 00 call 116be0 <_Objects_Get>
114560: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114562: 83 c4 10 add $0x10,%esp
114565: 8b 4d f8 mov -0x8(%ebp),%ecx
114568: 85 c9 test %ecx,%ecx
11456a: 75 38 jne 1145a4 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
11456c: 83 ec 08 sub $0x8,%esp
11456f: 50 push %eax
114570: 68 a0 5d 13 00 push $0x135da0
114575: e8 b2 21 00 00 call 11672c <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
11457a: 8d 43 10 lea 0x10(%ebx),%eax
11457d: 89 04 24 mov %eax,(%esp)
114580: e8 97 42 00 00 call 11881c <_Watchdog_Remove>
* @param[in] starting_address is the starting address of the memory for
* the heap
* @param[in] size is the size in bytes of the memory area for the heap
* @param[in] page_size is the size in bytes of the allocation unit
*
* @return This method returns the maximum memory available. If
114585: 58 pop %eax
114586: 5a pop %edx
114587: 53 push %ebx
114588: 68 a0 5d 13 00 push $0x135da0
11458d: e8 da 24 00 00 call 116a6c <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
114592: e8 8d 2e 00 00 call 117424 <_Thread_Enable_dispatch>
114597: 31 c0 xor %eax,%eax
114599: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11459c: 8b 5d fc mov -0x4(%ebp),%ebx
11459f: c9 leave
1145a0: c3 ret
1145a1: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1145a4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1145a9: 8b 5d fc mov -0x4(%ebp),%ebx
1145ac: c9 leave
1145ad: c3 ret
001145b0 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1145b0: 55 push %ebp
1145b1: 89 e5 mov %esp,%ebp
1145b3: 57 push %edi
1145b4: 56 push %esi
1145b5: 53 push %ebx
1145b6: 83 ec 1c sub $0x1c,%esp
1145b9: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
1145bc: 85 f6 test %esi,%esi
1145be: 0f 84 98 00 00 00 je 11465c <rtems_timer_fire_after+0xac>
return RTEMS_INVALID_NUMBER;
if ( !routine )
1145c4: 8b 7d 10 mov 0x10(%ebp),%edi
1145c7: 85 ff test %edi,%edi
1145c9: 0f 84 9d 00 00 00 je 11466c <rtems_timer_fire_after+0xbc><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1145cf: 53 push %ebx
1145d0: 8d 45 f0 lea -0x10(%ebp),%eax
1145d3: 50 push %eax
1145d4: ff 75 08 pushl 0x8(%ebp)
1145d7: 68 a0 5d 13 00 push $0x135da0
1145dc: e8 ff 25 00 00 call 116be0 <_Objects_Get>
1145e1: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1145e3: 83 c4 10 add $0x10,%esp
1145e6: 8b 4d f0 mov -0x10(%ebp),%ecx
1145e9: 85 c9 test %ecx,%ecx
1145eb: 75 5f jne 11464c <rtems_timer_fire_after+0x9c>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1145ed: 8d 78 10 lea 0x10(%eax),%edi
1145f0: 83 ec 0c sub $0xc,%esp
1145f3: 57 push %edi
1145f4: e8 23 42 00 00 call 11881c <_Watchdog_Remove>
_ISR_Disable( level );
1145f9: 9c pushf
1145fa: fa cli
1145fb: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
1145fc: 83 c4 10 add $0x10,%esp
1145ff: 8b 53 18 mov 0x18(%ebx),%edx
114602: 85 d2 test %edx,%edx
114604: 75 76 jne 11467c <rtems_timer_fire_after+0xcc><== NEVER TAKEN
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
114606: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
11460d: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
114614: 8b 55 10 mov 0x10(%ebp),%edx
114617: 89 53 2c mov %edx,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
11461a: 8b 55 08 mov 0x8(%ebp),%edx
11461d: 89 53 30 mov %edx,0x30(%ebx)
* the heap
114620: 8b 55 14 mov 0x14(%ebp),%edx
114623: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
114626: 50 push %eax
114627: 9d popf
* @param[in] size points to a user area to return the size in
* @return TRUE if successfully able to determine the size, FALSE otherwise
* @return *size filled in with the size of the user area for this block
*/
bool _Protected_heap_Get_block_size(
Heap_Control *the_heap,
114628: 89 73 1c mov %esi,0x1c(%ebx)
void *starting_address,
size_t *size
11462b: 83 ec 08 sub $0x8,%esp
11462e: 57 push %edi
11462f: 68 1c 5b 13 00 push $0x135b1c
114634: e8 b3 40 00 00 call 1186ec <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
114639: e8 e6 2d 00 00 call 117424 <_Thread_Enable_dispatch>
11463e: 31 c0 xor %eax,%eax
114640: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114643: 8d 65 f4 lea -0xc(%ebp),%esp
114646: 5b pop %ebx
114647: 5e pop %esi
114648: 5f pop %edi
114649: c9 leave
11464a: c3 ret
11464b: 90 nop
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11464c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114651: 8d 65 f4 lea -0xc(%ebp),%esp
114654: 5b pop %ebx
114655: 5e pop %esi
114656: 5f pop %edi
114657: c9 leave
114658: c3 ret
114659: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
11465c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114661: 8d 65 f4 lea -0xc(%ebp),%esp
114664: 5b pop %ebx
114665: 5e pop %esi
114666: 5f pop %edi
114667: c9 leave
114668: c3 ret
114669: 8d 76 00 lea 0x0(%esi),%esi
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
11466c: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114671: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
114674: 5b pop %ebx <== NOT EXECUTED
114675: 5e pop %esi <== NOT EXECUTED
114676: 5f pop %edi <== NOT EXECUTED
114677: c9 leave <== NOT EXECUTED
114678: c3 ret <== NOT EXECUTED
114679: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
11467c: 50 push %eax <== NOT EXECUTED
11467d: 9d popf <== NOT EXECUTED
_Thread_Enable_dispatch();
11467e: e8 a1 2d 00 00 call 117424 <_Thread_Enable_dispatch><== NOT EXECUTED
114683: 31 c0 xor %eax,%eax <== NOT EXECUTED
114685: eb ca jmp 114651 <rtems_timer_fire_after+0xa1><== NOT EXECUTED
00114688 <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
114688: 55 push %ebp
114689: 89 e5 mov %esp,%ebp
11468b: 57 push %edi
11468c: 56 push %esi
11468d: 53 push %ebx
11468e: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
114691: 80 3d 4c 5a 13 00 00 cmpb $0x0,0x135a4c
114698: 75 0e jne 1146a8 <rtems_timer_fire_when+0x20>
11469a: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11469f: 8d 65 f4 lea -0xc(%ebp),%esp
1146a2: 5b pop %ebx
1146a3: 5e pop %esi
1146a4: 5f pop %edi
1146a5: c9 leave
1146a6: c3 ret
1146a7: 90 nop
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
1146a8: 83 ec 0c sub $0xc,%esp
1146ab: ff 75 0c pushl 0xc(%ebp)
1146ae: e8 d1 d6 ff ff call 111d84 <_TOD_Validate>
1146b3: 83 c4 10 add $0x10,%esp
1146b6: 84 c0 test %al,%al
1146b8: 74 23 je 1146dd <rtems_timer_fire_when+0x55>
return RTEMS_INVALID_CLOCK;
if ( !routine )
1146ba: 8b 75 10 mov 0x10(%ebp),%esi
1146bd: 85 f6 test %esi,%esi
1146bf: 0f 84 a3 00 00 00 je 114768 <rtems_timer_fire_when+0xe0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
1146c5: 83 ec 0c sub $0xc,%esp
1146c8: ff 75 0c pushl 0xc(%ebp)
1146cb: e8 24 d6 ff ff call 111cf4 <_TOD_To_seconds>
1146d0: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch )
1146d2: 83 c4 10 add $0x10,%esp
1146d5: 3b 05 cc 5a 13 00 cmp 0x135acc,%eax
1146db: 77 0f ja 1146ec <rtems_timer_fire_when+0x64>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1146dd: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1146e2: 8d 65 f4 lea -0xc(%ebp),%esp
1146e5: 5b pop %ebx
1146e6: 5e pop %esi
1146e7: 5f pop %edi
1146e8: c9 leave
1146e9: c3 ret
1146ea: 66 90 xchg %ax,%ax
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1146ec: 53 push %ebx
1146ed: 8d 45 f0 lea -0x10(%ebp),%eax
1146f0: 50 push %eax
1146f1: ff 75 08 pushl 0x8(%ebp)
1146f4: 68 a0 5d 13 00 push $0x135da0
1146f9: e8 e2 24 00 00 call 116be0 <_Objects_Get>
1146fe: 89 c6 mov %eax,%esi
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114700: 83 c4 10 add $0x10,%esp
114703: 8b 4d f0 mov -0x10(%ebp),%ecx
114706: 85 c9 test %ecx,%ecx
114708: 75 52 jne 11475c <rtems_timer_fire_when+0xd4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11470a: 8d 58 10 lea 0x10(%eax),%ebx
11470d: 83 ec 0c sub $0xc,%esp
114710: 53 push %ebx
114711: e8 06 41 00 00 call 11881c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
114716: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
11471d: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
* @param[in] the_heap is the heap to operate upon
114724: 8b 45 10 mov 0x10(%ebp),%eax
114727: 89 46 2c mov %eax,0x2c(%esi)
* @param[in] starting_address is the starting address of the memory for
11472a: 8b 45 08 mov 0x8(%ebp),%eax
11472d: 89 46 30 mov %eax,0x30(%esi)
* the heap
114730: 8b 45 14 mov 0x14(%ebp),%eax
114733: 89 46 34 mov %eax,0x34(%esi)
* @return TRUE if successfully able to resize the block.
* FALSE if the block can't be resized in place.
*/
bool _Protected_heap_Resize_block(
Heap_Control *the_heap,
void *starting_address,
114736: 2b 3d cc 5a 13 00 sub 0x135acc,%edi
11473c: 89 7e 1c mov %edi,0x1c(%esi)
size_t size
);
11473f: 58 pop %eax
114740: 5a pop %edx
114741: 53 push %ebx
114742: 68 10 5b 13 00 push $0x135b10
114747: e8 a0 3f 00 00 call 1186ec <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
11474c: e8 d3 2c 00 00 call 117424 <_Thread_Enable_dispatch>
114751: 31 c0 xor %eax,%eax
114753: 83 c4 10 add $0x10,%esp
114756: e9 44 ff ff ff jmp 11469f <rtems_timer_fire_when+0x17>
11475b: 90 nop
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11475c: b8 04 00 00 00 mov $0x4,%eax
114761: e9 39 ff ff ff jmp 11469f <rtems_timer_fire_when+0x17>
114766: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
114768: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
11476d: e9 2d ff ff ff jmp 11469f <rtems_timer_fire_when+0x17><== NOT EXECUTED
00114774 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
Objects_Id id,
rtems_timer_information *the_info
)
{
114774: 55 push %ebp
114775: 89 e5 mov %esp,%ebp
114777: 53 push %ebx
114778: 83 ec 14 sub $0x14,%esp
11477b: 8b 5d 0c mov 0xc(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
11477e: 85 db test %ebx,%ebx
114780: 74 4e je 1147d0 <rtems_timer_get_information+0x5c><== NEVER TAKEN
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
114782: 52 push %edx
114783: 8d 45 f8 lea -0x8(%ebp),%eax
114786: 50 push %eax
114787: ff 75 08 pushl 0x8(%ebp)
11478a: 68 a0 5d 13 00 push $0x135da0
11478f: e8 4c 24 00 00 call 116be0 <_Objects_Get>
114794: 89 c2 mov %eax,%edx
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114796: 83 c4 10 add $0x10,%esp
114799: 8b 45 f8 mov -0x8(%ebp),%eax
11479c: 85 c0 test %eax,%eax
11479e: 74 0c je 1147ac <rtems_timer_get_information+0x38>
1147a0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147a5: 8b 5d fc mov -0x4(%ebp),%ebx
1147a8: c9 leave
1147a9: c3 ret
1147aa: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
1147ac: 8b 42 38 mov 0x38(%edx),%eax
1147af: 89 03 mov %eax,(%ebx)
the_info->initial = the_timer->Ticker.initial;
1147b1: 8b 42 1c mov 0x1c(%edx),%eax
1147b4: 89 43 04 mov %eax,0x4(%ebx)
the_info->start_time = the_timer->Ticker.start_time;
1147b7: 8b 42 24 mov 0x24(%edx),%eax
1147ba: 89 43 08 mov %eax,0x8(%ebx)
the_info->stop_time = the_timer->Ticker.stop_time;
1147bd: 8b 42 28 mov 0x28(%edx),%eax
1147c0: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
1147c3: e8 5c 2c 00 00 call 117424 <_Thread_Enable_dispatch>
1147c8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147ca: 8b 5d fc mov -0x4(%ebp),%ebx
1147cd: c9 leave
1147ce: c3 ret
1147cf: 90 nop
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
1147d0: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1147d5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1147d8: c9 leave <== NOT EXECUTED
1147d9: c3 ret <== NOT EXECUTED
00114a84 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
114a84: 55 push %ebp
114a85: 89 e5 mov %esp,%ebp
114a87: 56 push %esi
114a88: 53 push %ebx
114a89: 83 ec 10 sub $0x10,%esp
114a8c: 8b 55 08 mov 0x8(%ebp),%edx
bool _Protected_heap_Extend(
Heap_Control *the_heap,
void *starting_address,
size_t size
);
114a8f: 85 d2 test %edx,%edx
114a91: 75 0d jne 114aa0 <rtems_timer_initiate_server+0x1c>
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
114a93: b8 13 00 00 00 mov $0x13,%eax
}
return status;
}
114a98: 8d 65 f8 lea -0x8(%ebp),%esp
114a9b: 5b pop %ebx
114a9c: 5e pop %esi
114a9d: c9 leave
114a9e: c3 ret
114a9f: 90 nop
114aa0: 0f b6 05 14 d1 12 00 movzbl 0x12d114,%eax
114aa7: 39 c2 cmp %eax,%edx
114aa9: 77 31 ja 114adc <rtems_timer_initiate_server+0x58><== ALWAYS TAKEN
114aab: 89 d6 mov %edx,%esi <== NOT EXECUTED
/**
* This routine walks the heap and tots up the free and allocated
* sizes.
*
* @param[in] the_heap pointer to heap header
114aad: a1 38 5a 13 00 mov 0x135a38,%eax
114ab2: 40 inc %eax
114ab3: a3 38 5a 13 00 mov %eax,0x135a38
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
114ab8: 8a 1d 00 14 13 00 mov 0x131400,%bl
initialized = true;
114abe: c6 05 00 14 13 00 01 movb $0x1,0x131400
_Thread_Enable_dispatch();
114ac5: e8 5a 29 00 00 call 117424 <_Thread_Enable_dispatch>
if ( tmpInitialized )
114aca: 84 db test %bl,%bl
114acc: 74 16 je 114ae4 <rtems_timer_initiate_server+0x60>
114ace: b8 0e 00 00 00 mov $0xe,%eax
*/
initialized = false;
}
return status;
}
114ad3: 8d 65 f8 lea -0x8(%ebp),%esp
114ad6: 5b pop %ebx
114ad7: 5e pop %esi
114ad8: c9 leave
114ad9: c3 ret
114ada: 66 90 xchg %ax,%ax
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
114adc: 42 inc %edx
114add: 75 b4 jne 114a93 <rtems_timer_initiate_server+0xf>
114adf: 31 f6 xor %esi,%esi
114ae1: eb ca jmp 114aad <rtems_timer_initiate_server+0x29>
114ae3: 90 nop
114ae4: c7 05 a0 59 13 00 a4 movl $0x1359a4,0x1359a0
114aeb: 59 13 00
114aee: c7 05 a4 59 13 00 00 movl $0x0,0x1359a4
114af5: 00 00 00
114af8: c7 05 a8 59 13 00 a0 movl $0x1359a0,0x1359a8
114aff: 59 13 00
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
114b02: 83 ec 08 sub $0x8,%esp
114b05: 8d 45 f4 lea -0xc(%ebp),%eax
114b08: 50 push %eax
114b09: 81 4d 10 00 80 00 00 orl $0x8000,0x10(%ebp)
114b10: ff 75 10 pushl 0x10(%ebp)
114b13: 68 00 01 00 00 push $0x100
114b18: ff 75 0c pushl 0xc(%ebp)
114b1b: 56 push %esi
114b1c: 68 45 4d 49 54 push $0x54494d45
114b21: e8 fa f1 ff ff call 113d20 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
114b26: 83 c4 20 add $0x20,%esp
114b29: 85 c0 test %eax,%eax
114b2b: 0f 85 b2 00 00 00 jne 114be3 <rtems_timer_initiate_server+0x15f>
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
114b31: 8b 4d f4 mov -0xc(%ebp),%ecx
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
114b34: 66 3b 0d 50 59 13 00 cmp 0x135950,%cx
114b3b: 0f 86 b3 00 00 00 jbe 114bf4 <rtems_timer_initiate_server+0x170><== ALWAYS TAKEN
114b41: 31 c0 xor %eax,%eax
114b43: a3 e4 5d 13 00 mov %eax,0x135de4
114b48: c7 05 80 59 13 00 84 movl $0x135984,0x135980
114b4f: 59 13 00
114b52: c7 05 84 59 13 00 00 movl $0x0,0x135984
114b59: 00 00 00
114b5c: c7 05 88 59 13 00 80 movl $0x135980,0x135988
114b63: 59 13 00
114b66: c7 05 94 59 13 00 98 movl $0x135998,0x135994
114b6d: 59 13 00
114b70: c7 05 98 59 13 00 00 movl $0x0,0x135998
114b77: 00 00 00
114b7a: c7 05 9c 59 13 00 94 movl $0x135994,0x13599c
114b81: 59 13 00
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114b84: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
* @param[in] the_heap is the heap to operate upon
114b8b: c7 40 64 8c 72 11 00 movl $0x11728c,0x64(%eax)
* @param[in] starting_address is the starting address of the memory for
114b92: 89 48 68 mov %ecx,0x68(%eax)
* the heap
114b95: c7 40 6c 00 00 00 00 movl $0x0,0x6c(%eax)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114b9c: c7 05 c8 59 13 00 00 movl $0x0,0x1359c8
114ba3: 00 00 00
* @param[in] the_heap is the heap to operate upon
114ba6: c7 05 dc 59 13 00 8c movl $0x11728c,0x1359dc
114bad: 72 11 00
* @param[in] starting_address is the starting address of the memory for
114bb0: 89 0d e0 59 13 00 mov %ecx,0x1359e0
* the heap
114bb6: c7 05 e4 59 13 00 00 movl $0x0,0x1359e4
114bbd: 00 00 00
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
114bc0: c7 05 e0 5d 13 00 04 movl $0x114c04,0x135de0
114bc7: 4c 11 00
/*
* Start the timer server
*/
status = rtems_task_start(
114bca: 50 push %eax
114bcb: 6a 00 push $0x0
114bcd: 68 a0 4c 11 00 push $0x114ca0
114bd2: 51 push %ecx
114bd3: e8 5c f6 ff ff call 114234 <rtems_task_start>
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
114bd8: 83 c4 10 add $0x10,%esp
114bdb: 85 c0 test %eax,%eax
114bdd: 0f 84 b5 fe ff ff je 114a98 <rtems_timer_initiate_server+0x14><== ALWAYS TAKEN
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
114be3: c6 05 00 14 13 00 00 movb $0x0,0x131400
}
return status;
}
114bea: 8d 65 f8 lea -0x8(%ebp),%esp
114bed: 5b pop %ebx
114bee: 5e pop %esi
114bef: c9 leave
114bf0: c3 ret
114bf1: 8d 76 00 lea 0x0(%esi),%esi
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
);
/**
114bf4: 0f b7 d1 movzwl %cx,%edx
114bf7: a1 5c 59 13 00 mov 0x13595c,%eax
114bfc: 8b 04 90 mov (%eax,%edx,4),%eax
114bff: e9 3f ff ff ff jmp 114b43 <rtems_timer_initiate_server+0xbf>
00114800 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
114800: 55 push %ebp
114801: 89 e5 mov %esp,%ebp
114803: 53 push %ebx
114804: 83 ec 18 sub $0x18,%esp
114807: 8d 45 f8 lea -0x8(%ebp),%eax
11480a: 50 push %eax
11480b: ff 75 08 pushl 0x8(%ebp)
11480e: 68 a0 5d 13 00 push $0x135da0
114813: e8 c8 23 00 00 call 116be0 <_Objects_Get>
114818: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
11481a: 83 c4 10 add $0x10,%esp
11481d: 8b 45 f8 mov -0x8(%ebp),%eax
114820: 85 c0 test %eax,%eax
114822: 74 0c je 114830 <rtems_timer_reset+0x30>
114824: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114829: 8b 5d fc mov -0x4(%ebp),%ebx
11482c: c9 leave
11482d: c3 ret
11482e: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
114830: 8b 43 38 mov 0x38(%ebx),%eax
114833: 83 f8 01 cmp $0x1,%eax
114836: 74 40 je 114878 <rtems_timer_reset+0x78>
114838: 73 2a jae 114864 <rtems_timer_reset+0x64>
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
11483a: 83 c3 10 add $0x10,%ebx
11483d: 83 ec 0c sub $0xc,%esp
114840: 53 push %ebx
114841: e8 d6 3f 00 00 call 11881c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
114846: 5a pop %edx
114847: 59 pop %ecx
114848: 53 push %ebx
114849: 68 1c 5b 13 00 push $0x135b1c
11484e: e8 99 3e 00 00 call 1186ec <_Watchdog_Insert>
114853: 83 c4 10 add $0x10,%esp
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
114856: e8 c9 2b 00 00 call 117424 <_Thread_Enable_dispatch>
11485b: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11485d: 8b 5d fc mov -0x4(%ebp),%ebx
114860: c9 leave
114861: c3 ret
114862: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
114864: 83 f8 04 cmp $0x4,%eax
114867: 77 ed ja 114856 <rtems_timer_reset+0x56><== NEVER TAKEN
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
114869: e8 b6 2b 00 00 call 117424 <_Thread_Enable_dispatch>
11486e: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114873: 8b 5d fc mov -0x4(%ebp),%ebx
114876: c9 leave
114877: c3 ret
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
114878: a1 e0 5d 13 00 mov 0x135de0,%eax
11487d: 85 c0 test %eax,%eax
11487f: 74 1b je 11489c <rtems_timer_reset+0x9c><== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
114881: 83 ec 0c sub $0xc,%esp
114884: 8d 43 10 lea 0x10(%ebx),%eax
114887: 50 push %eax
114888: e8 8f 3f 00 00 call 11881c <_Watchdog_Remove>
(*_Timer_Server_schedule_operation)( the_timer );
11488d: 89 1c 24 mov %ebx,(%esp)
114890: ff 15 e0 5d 13 00 call *0x135de0
114896: 83 c4 10 add $0x10,%esp
114899: eb bb jmp 114856 <rtems_timer_reset+0x56>
11489b: 90 nop
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
11489c: e8 83 2b 00 00 call 117424 <_Thread_Enable_dispatch><== NOT EXECUTED
1148a1: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED
1148a6: eb 81 jmp 114829 <rtems_timer_reset+0x29><== NOT EXECUTED
001148a8 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1148a8: 55 push %ebp
1148a9: 89 e5 mov %esp,%ebp
1148ab: 53 push %ebx
1148ac: 83 ec 14 sub $0x14,%esp
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
1148af: a1 e4 5d 13 00 mov 0x135de4,%eax
1148b4: 85 c0 test %eax,%eax
1148b6: 0f 84 b0 00 00 00 je 11496c <rtems_timer_server_fire_after+0xc4>
return RTEMS_INCORRECT_STATE;
if ( !routine )
1148bc: 8b 45 10 mov 0x10(%ebp),%eax
1148bf: 85 c0 test %eax,%eax
1148c1: 0f 84 b1 00 00 00 je 114978 <rtems_timer_server_fire_after+0xd0><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
1148c7: 8b 45 0c mov 0xc(%ebp),%eax
1148ca: 85 c0 test %eax,%eax
1148cc: 75 0a jne 1148d8 <rtems_timer_server_fire_after+0x30>
1148ce: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1148d3: 8b 5d fc mov -0x4(%ebp),%ebx
1148d6: c9 leave
1148d7: c3 ret
1148d8: 53 push %ebx
1148d9: 8d 45 f8 lea -0x8(%ebp),%eax
1148dc: 50 push %eax
1148dd: ff 75 08 pushl 0x8(%ebp)
1148e0: 68 a0 5d 13 00 push $0x135da0
1148e5: e8 f6 22 00 00 call 116be0 <_Objects_Get>
1148ea: 89 c3 mov %eax,%ebx
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1148ec: 83 c4 10 add $0x10,%esp
1148ef: 8b 4d f8 mov -0x8(%ebp),%ecx
1148f2: 85 c9 test %ecx,%ecx
1148f4: 75 5a jne 114950 <rtems_timer_server_fire_after+0xa8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1148f6: 83 ec 0c sub $0xc,%esp
1148f9: 8d 40 10 lea 0x10(%eax),%eax
1148fc: 50 push %eax
1148fd: e8 1a 3f 00 00 call 11881c <_Watchdog_Remove>
_ISR_Disable( level );
114902: 9c pushf
114903: fa cli
114904: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
114905: 83 c4 10 add $0x10,%esp
114908: 8b 53 18 mov 0x18(%ebx),%edx
11490b: 85 d2 test %edx,%edx
11490d: 75 4d jne 11495c <rtems_timer_server_fire_after+0xb4><== NEVER TAKEN
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
11490f: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114916: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
11491d: 8b 55 10 mov 0x10(%ebp),%edx
114920: 89 53 2c mov %edx,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
114923: 8b 55 08 mov 0x8(%ebp),%edx
114926: 89 53 30 mov %edx,0x30(%ebx)
* the heap
114929: 8b 55 14 mov 0x14(%ebp),%edx
11492c: 89 53 34 mov %edx,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
11492f: 8b 55 0c mov 0xc(%ebp),%edx
114932: 89 53 1c mov %edx,0x1c(%ebx)
_ISR_Enable( level );
114935: 50 push %eax
114936: 9d popf
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
114937: 83 ec 0c sub $0xc,%esp
11493a: 53 push %ebx
11493b: ff 15 e0 5d 13 00 call *0x135de0
_Thread_Enable_dispatch();
114941: e8 de 2a 00 00 call 117424 <_Thread_Enable_dispatch>
114946: 31 c0 xor %eax,%eax
114948: 83 c4 10 add $0x10,%esp
11494b: eb 86 jmp 1148d3 <rtems_timer_server_fire_after+0x2b>
11494d: 8d 76 00 lea 0x0(%esi),%esi
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114950: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114955: 8b 5d fc mov -0x4(%ebp),%ebx
114958: c9 leave
114959: c3 ret
11495a: 66 90 xchg %ax,%ax
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
11495c: 50 push %eax <== NOT EXECUTED
11495d: 9d popf <== NOT EXECUTED
_Thread_Enable_dispatch();
11495e: e8 c1 2a 00 00 call 117424 <_Thread_Enable_dispatch><== NOT EXECUTED
114963: 31 c0 xor %eax,%eax <== NOT EXECUTED
114965: e9 69 ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b><== NOT EXECUTED
11496a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
11496c: b8 0e 00 00 00 mov $0xe,%eax
114971: e9 5d ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b>
114976: 66 90 xchg %ax,%ax
return RTEMS_INCORRECT_STATE;
if ( !routine )
114978: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
11497d: e9 51 ff ff ff jmp 1148d3 <rtems_timer_server_fire_after+0x2b><== NOT EXECUTED
00114984 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
114984: 55 push %ebp
114985: 89 e5 mov %esp,%ebp
114987: 56 push %esi
114988: 53 push %ebx
114989: 83 ec 10 sub $0x10,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
11498c: 8b 1d e4 5d 13 00 mov 0x135de4,%ebx
114992: 85 db test %ebx,%ebx
114994: 0f 84 d2 00 00 00 je 114a6c <rtems_timer_server_fire_when+0xe8>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
11499a: 80 3d 4c 5a 13 00 00 cmpb $0x0,0x135a4c
1149a1: 0f 84 ad 00 00 00 je 114a54 <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
1149a7: 8b 4d 10 mov 0x10(%ebp),%ecx
1149aa: 85 c9 test %ecx,%ecx
1149ac: 0f 84 ae 00 00 00 je 114a60 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
1149b2: 83 ec 0c sub $0xc,%esp
1149b5: ff 75 0c pushl 0xc(%ebp)
1149b8: e8 c7 d3 ff ff call 111d84 <_TOD_Validate>
1149bd: 83 c4 10 add $0x10,%esp
1149c0: 84 c0 test %al,%al
1149c2: 75 0c jne 1149d0 <rtems_timer_server_fire_when+0x4c>
*/
(*_Timer_Server_schedule_operation)( the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
1149c4: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1149c9: 8d 65 f8 lea -0x8(%ebp),%esp
1149cc: 5b pop %ebx
1149cd: 5e pop %esi
1149ce: c9 leave
1149cf: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
1149d0: 83 ec 0c sub $0xc,%esp
1149d3: ff 75 0c pushl 0xc(%ebp)
1149d6: e8 19 d3 ff ff call 111cf4 <_TOD_To_seconds>
1149db: 89 c6 mov %eax,%esi
if ( seconds <= _TOD_Seconds_since_epoch )
1149dd: 83 c4 10 add $0x10,%esp
1149e0: 3b 05 cc 5a 13 00 cmp 0x135acc,%eax
1149e6: 76 dc jbe 1149c4 <rtems_timer_server_fire_when+0x40>
/**
* This routine grows @a the_heap memory area using the size bytes which
* begin at @a starting_address.
*
* @param[in] the_heap is the heap to operate upon
1149e8: 52 push %edx
1149e9: 8d 45 f4 lea -0xc(%ebp),%eax
1149ec: 50 push %eax
1149ed: ff 75 08 pushl 0x8(%ebp)
1149f0: 68 a0 5d 13 00 push $0x135da0
1149f5: e8 e6 21 00 00 call 116be0 <_Objects_Get>
1149fa: 89 c3 mov %eax,%ebx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1149fc: 83 c4 10 add $0x10,%esp
1149ff: 8b 45 f4 mov -0xc(%ebp),%eax
114a02: 85 c0 test %eax,%eax
114a04: 75 72 jne 114a78 <rtems_timer_server_fire_when+0xf4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
114a06: 83 ec 0c sub $0xc,%esp
114a09: 8d 43 10 lea 0x10(%ebx),%eax
114a0c: 50 push %eax
114a0d: e8 0a 3e 00 00 call 11881c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
114a12: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
* This routine initializes @a the_heap record to manage the
* contiguous heap of @a size bytes which starts at @a starting_address.
* Blocks of memory are allocated from the heap in multiples of
* @a page_size byte units. If @a page_size is 0 or is not multiple of
* CPU_ALIGNMENT, it's aligned up to the nearest CPU_ALIGNMENT boundary.
*
114a19: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
* @param[in] the_heap is the heap to operate upon
114a20: 8b 45 10 mov 0x10(%ebp),%eax
114a23: 89 43 2c mov %eax,0x2c(%ebx)
* @param[in] starting_address is the starting address of the memory for
114a26: 8b 45 08 mov 0x8(%ebp),%eax
114a29: 89 43 30 mov %eax,0x30(%ebx)
* the heap
114a2c: 8b 45 14 mov 0x14(%ebp),%eax
114a2f: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
114a32: 2b 35 cc 5a 13 00 sub 0x135acc,%esi
114a38: 89 73 1c mov %esi,0x1c(%ebx)
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
114a3b: 89 1c 24 mov %ebx,(%esp)
114a3e: ff 15 e0 5d 13 00 call *0x135de0
_Thread_Enable_dispatch();
114a44: e8 db 29 00 00 call 117424 <_Thread_Enable_dispatch>
114a49: 31 c0 xor %eax,%eax
114a4b: 83 c4 10 add $0x10,%esp
114a4e: e9 76 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>
114a53: 90 nop
rtems_interval seconds;
if ( !_Timer_Server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
114a54: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114a59: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
114a5c: 5b pop %ebx <== NOT EXECUTED
114a5d: 5e pop %esi <== NOT EXECUTED
114a5e: c9 leave <== NOT EXECUTED
114a5f: c3 ret <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
114a60: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
114a65: e9 5f ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45><== NOT EXECUTED
114a6a: 66 90 xchg %ax,%ax <== NOT EXECUTED
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
114a6c: b8 0e 00 00 00 mov $0xe,%eax
114a71: e9 53 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>
114a76: 66 90 xchg %ax,%ax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
114a78: b8 04 00 00 00 mov $0x4,%eax
114a7d: e9 47 ff ff ff jmp 1149c9 <rtems_timer_server_fire_when+0x45>