RTEMS 4.11Annotated Report
Sat Mar 19 18:40:58 2011
0010c2e4 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10c2e4: 55 push %ebp
10c2e5: 89 e5 mov %esp,%ebp
10c2e7: 53 push %ebx
10c2e8: 83 ec 04 sub $0x4,%esp
10c2eb: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10c2ee: 8b 15 18 88 12 00 mov 0x128818,%edx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10c2f4: 9c pushf
10c2f5: fa cli
10c2f6: 58 pop %eax
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10c2f7: 8b 4b 44 mov 0x44(%ebx),%ecx
10c2fa: 85 c9 test %ecx,%ecx
10c2fc: 75 0b jne 10c309 <_CORE_RWLock_Release+0x25>
_ISR_Enable( level );
10c2fe: 50 push %eax
10c2ff: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10c300: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
return CORE_RWLOCK_SUCCESSFUL;
10c307: eb 72 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10c309: 49 dec %ecx
10c30a: 75 0f jne 10c31b <_CORE_RWLock_Release+0x37>
the_rwlock->number_of_readers -= 1;
10c30c: 8b 4b 48 mov 0x48(%ebx),%ecx
10c30f: 49 dec %ecx
10c310: 89 4b 48 mov %ecx,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10c313: 85 c9 test %ecx,%ecx
10c315: 74 04 je 10c31b <_CORE_RWLock_Release+0x37>
/* must be unlocked again */
_ISR_Enable( level );
10c317: 50 push %eax
10c318: 9d popf
return CORE_RWLOCK_SUCCESSFUL;
10c319: eb 60 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10c31b: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10c322: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10c329: 50 push %eax
10c32a: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10c32b: 83 ec 0c sub $0xc,%esp
10c32e: 53 push %ebx
10c32f: e8 84 17 00 00 call 10dab8 <_Thread_queue_Dequeue>
if ( next ) {
10c334: 83 c4 10 add $0x10,%esp
10c337: 85 c0 test %eax,%eax
10c339: 74 40 je 10c37b <_CORE_RWLock_Release+0x97>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10c33b: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c33f: 75 09 jne 10c34a <_CORE_RWLock_Release+0x66>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10c341: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10c348: eb 31 jmp 10c37b <_CORE_RWLock_Release+0x97>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10c34a: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10c34d: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10c354: 83 ec 0c sub $0xc,%esp
10c357: 53 push %ebx
10c358: e8 53 1b 00 00 call 10deb0 <_Thread_queue_First>
if ( !next ||
10c35d: 83 c4 10 add $0x10,%esp
10c360: 85 c0 test %eax,%eax
10c362: 74 17 je 10c37b <_CORE_RWLock_Release+0x97>
10c364: 83 78 30 01 cmpl $0x1,0x30(%eax)
10c368: 74 11 je 10c37b <_CORE_RWLock_Release+0x97><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10c36a: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10c36d: 52 push %edx
10c36e: 52 push %edx
10c36f: 50 push %eax
10c370: 53 push %ebx
10c371: e8 2a 1a 00 00 call 10dda0 <_Thread_queue_Extract>
}
10c376: 83 c4 10 add $0x10,%esp
10c379: eb d9 jmp 10c354 <_CORE_RWLock_Release+0x70>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10c37b: 31 c0 xor %eax,%eax
10c37d: 8b 5d fc mov -0x4(%ebp),%ebx
10c380: c9 leave
10c381: c3 ret
0010c384 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10c384: 55 push %ebp
10c385: 89 e5 mov %esp,%ebp
10c387: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10c38a: 8d 45 f4 lea -0xc(%ebp),%eax
10c38d: 50 push %eax
10c38e: ff 75 08 pushl 0x8(%ebp)
10c391: e8 06 14 00 00 call 10d79c <_Thread_Get>
switch ( location ) {
10c396: 83 c4 10 add $0x10,%esp
10c399: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10c39d: 75 17 jne 10c3b6 <_CORE_RWLock_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10c39f: 83 ec 0c sub $0xc,%esp
10c3a2: 50 push %eax
10c3a3: e8 d4 1b 00 00 call 10df7c <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c3a8: a1 f4 82 12 00 mov 0x1282f4,%eax
10c3ad: 48 dec %eax
10c3ae: a3 f4 82 12 00 mov %eax,0x1282f4
10c3b3: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10c3b6: c9 leave
10c3b7: c3 ret
0010ecd4 <_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
)
{
10ecd4: 55 push %ebp
10ecd5: 89 e5 mov %esp,%ebp
10ecd7: 57 push %edi
10ecd8: 56 push %esi
10ecd9: 53 push %ebx
10ecda: 83 ec 1c sub $0x1c,%esp
10ecdd: 8b 5d 08 mov 0x8(%ebp),%ebx
10ece0: 8b 7d 10 mov 0x10(%ebp),%edi
10ece3: 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;
10ece6: 89 7b 44 mov %edi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
10ece9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
10ecf0: 89 53 4c mov %edx,0x4c(%ebx)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
10ecf3: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
10ecfa: 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)) {
10ed01: 89 d0 mov %edx,%eax
10ed03: f6 c2 03 test $0x3,%dl
10ed06: 74 0c je 10ed14 <_CORE_message_queue_Initialize+0x40>
allocated_message_size += sizeof(uint32_t);
10ed08: 83 c0 04 add $0x4,%eax
allocated_message_size &= ~(sizeof(uint32_t) - 1);
10ed0b: 83 e0 fc and $0xfffffffc,%eax
}
if (allocated_message_size < maximum_message_size)
return false;
10ed0e: 31 f6 xor %esi,%esi
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
10ed10: 39 d0 cmp %edx,%eax
10ed12: 72 68 jb 10ed7c <_CORE_message_queue_Initialize+0xa8><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
10ed14: 8d 50 14 lea 0x14(%eax),%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
10ed17: 89 d1 mov %edx,%ecx
10ed19: 0f af cf imul %edi,%ecx
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
10ed1c: 31 f6 xor %esi,%esi
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
10ed1e: 39 c1 cmp %eax,%ecx
10ed20: 72 5a jb 10ed7c <_CORE_message_queue_Initialize+0xa8><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
10ed22: 83 ec 0c sub $0xc,%esp
10ed25: 51 push %ecx
10ed26: 89 55 e4 mov %edx,-0x1c(%ebp)
10ed29: e8 a0 d7 ff ff call 10c4ce <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
10ed2e: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
10ed31: 83 c4 10 add $0x10,%esp
10ed34: 85 c0 test %eax,%eax
10ed36: 8b 55 e4 mov -0x1c(%ebp),%edx
10ed39: 74 41 je 10ed7c <_CORE_message_queue_Initialize+0xa8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
10ed3b: 52 push %edx
10ed3c: 57 push %edi
10ed3d: 50 push %eax
10ed3e: 8d 43 68 lea 0x68(%ebx),%eax
10ed41: 50 push %eax
10ed42: e8 d1 fe ff ff call 10ec18 <_Chain_Initialize>
Chain_Node *tail = _Chain_Tail( the_chain );
10ed47: 8d 43 54 lea 0x54(%ebx),%eax
10ed4a: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
10ed4d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10ed54: 8d 43 50 lea 0x50(%ebx),%eax
10ed57: 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(
10ed5a: 6a 06 push $0x6
10ed5c: 68 80 00 00 00 push $0x80
10ed61: 8b 45 0c mov 0xc(%ebp),%eax
10ed64: 83 38 01 cmpl $0x1,(%eax)
10ed67: 0f 94 c0 sete %al
10ed6a: 0f b6 c0 movzbl %al,%eax
10ed6d: 50 push %eax
10ed6e: 53 push %ebx
10ed6f: e8 80 cf ff ff call 10bcf4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
10ed74: 83 c4 20 add $0x20,%esp
10ed77: be 01 00 00 00 mov $0x1,%esi
}
10ed7c: 89 f0 mov %esi,%eax
10ed7e: 8d 65 f4 lea -0xc(%ebp),%esp
10ed81: 5b pop %ebx
10ed82: 5e pop %esi
10ed83: 5f pop %edi
10ed84: c9 leave
10ed85: c3 ret
0010ed88 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
10ed88: 55 push %ebp
10ed89: 89 e5 mov %esp,%ebp
10ed8b: 57 push %edi
10ed8c: 56 push %esi
10ed8d: 53 push %ebx
10ed8e: 83 ec 2c sub $0x2c,%esp
10ed91: 8b 55 08 mov 0x8(%ebp),%edx
10ed94: 8b 45 0c mov 0xc(%ebp),%eax
10ed97: 89 45 dc mov %eax,-0x24(%ebp)
10ed9a: 8b 5d 10 mov 0x10(%ebp),%ebx
10ed9d: 89 5d e0 mov %ebx,-0x20(%ebp)
10eda0: 8b 4d 14 mov 0x14(%ebp),%ecx
10eda3: 8b 75 1c mov 0x1c(%ebp),%esi
10eda6: 89 75 d4 mov %esi,-0x2c(%ebp)
10eda9: 8a 45 18 mov 0x18(%ebp),%al
10edac: 88 45 db mov %al,-0x25(%ebp)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
10edaf: a1 08 48 12 00 mov 0x124808,%eax
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10edb4: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_ISR_Disable( level );
10edbb: 9c pushf
10edbc: fa cli
10edbd: 8f 45 e4 popl -0x1c(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10edc0: 8b 5a 50 mov 0x50(%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10edc3: 8d 72 54 lea 0x54(%edx),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
10edc6: 39 f3 cmp %esi,%ebx
10edc8: 0f 84 8a 00 00 00 je 10ee58 <_CORE_message_queue_Seize+0xd0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
10edce: 8b 33 mov (%ebx),%esi
head->next = new_first;
10edd0: 89 72 50 mov %esi,0x50(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10edd3: 8d 7a 50 lea 0x50(%edx),%edi
10edd6: 89 7e 04 mov %edi,0x4(%esi)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
10edd9: 85 db test %ebx,%ebx
10eddb: 74 7b je 10ee58 <_CORE_message_queue_Seize+0xd0><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
10eddd: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
10ede0: ff 75 e4 pushl -0x1c(%ebp)
10ede3: 9d popf
*size_p = the_message->Contents.size;
10ede4: 8b 43 0c mov 0xc(%ebx),%eax
10ede7: 89 01 mov %eax,(%ecx)
_Thread_Executing->Wait.count =
10ede9: 8b 73 08 mov 0x8(%ebx),%esi
10edec: a1 08 48 12 00 mov 0x124808,%eax
10edf1: 89 70 24 mov %esi,0x24(%eax)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
10edf4: 8d 73 10 lea 0x10(%ebx),%esi
10edf7: 89 75 e4 mov %esi,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10edfa: 8b 09 mov (%ecx),%ecx
10edfc: 8b 7d e0 mov -0x20(%ebp),%edi
10edff: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10ee01: 83 ec 0c sub $0xc,%esp
10ee04: 52 push %edx
10ee05: 89 55 d0 mov %edx,-0x30(%ebp)
10ee08: e8 af cb ff ff call 10b9bc <_Thread_queue_Dequeue>
if ( !the_thread ) {
10ee0d: 83 c4 10 add $0x10,%esp
10ee10: 85 c0 test %eax,%eax
10ee12: 8b 55 d0 mov -0x30(%ebp),%edx
10ee15: 75 15 jne 10ee2c <_CORE_message_queue_Seize+0xa4>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
10ee17: 89 5d 0c mov %ebx,0xc(%ebp)
10ee1a: 83 c2 68 add $0x68,%edx
10ee1d: 89 55 08 mov %edx,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10ee20: 8d 65 f4 lea -0xc(%ebp),%esp
10ee23: 5b pop %ebx
10ee24: 5e pop %esi
10ee25: 5f pop %edi
10ee26: c9 leave
10ee27: e9 84 b1 ff ff jmp 109fb0 <_Chain_Append>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10ee2c: 8b 48 24 mov 0x24(%eax),%ecx
10ee2f: 89 4b 08 mov %ecx,0x8(%ebx)
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
10ee32: 8b 48 30 mov 0x30(%eax),%ecx
10ee35: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10ee38: 8b 70 2c mov 0x2c(%eax),%esi
10ee3b: 8b 7d e4 mov -0x1c(%ebp),%edi
10ee3e: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
10ee40: 8b 43 08 mov 0x8(%ebx),%eax
10ee43: 89 45 10 mov %eax,0x10(%ebp)
10ee46: 89 5d 0c mov %ebx,0xc(%ebp)
10ee49: 89 55 08 mov %edx,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10ee4c: 8d 65 f4 lea -0xc(%ebp),%esp
10ee4f: 5b pop %ebx
10ee50: 5e pop %esi
10ee51: 5f pop %edi
10ee52: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
10ee53: e9 18 1c 00 00 jmp 110a70 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
10ee58: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10ee5c: 75 13 jne 10ee71 <_CORE_message_queue_Seize+0xe9>
_ISR_Enable( level );
10ee5e: ff 75 e4 pushl -0x1c(%ebp)
10ee61: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
10ee62: c7 40 34 04 00 00 00 movl $0x4,0x34(%eax)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
10ee69: 8d 65 f4 lea -0xc(%ebp),%esp
10ee6c: 5b pop %ebx
10ee6d: 5e pop %esi
10ee6e: 5f pop %edi
10ee6f: c9 leave
10ee70: c3 ret
10ee71: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10ee78: 89 50 44 mov %edx,0x44(%eax)
executing->Wait.id = id;
10ee7b: 8b 5d dc mov -0x24(%ebp),%ebx
10ee7e: 89 58 20 mov %ebx,0x20(%eax)
executing->Wait.return_argument_second.mutable_object = buffer;
10ee81: 8b 75 e0 mov -0x20(%ebp),%esi
10ee84: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.return_argument = size_p;
10ee87: 89 48 28 mov %ecx,0x28(%eax)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
10ee8a: ff 75 e4 pushl -0x1c(%ebp)
10ee8d: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10ee8e: c7 45 10 a4 bd 10 00 movl $0x10bda4,0x10(%ebp)
10ee95: 8b 45 d4 mov -0x2c(%ebp),%eax
10ee98: 89 45 0c mov %eax,0xc(%ebp)
10ee9b: 89 55 08 mov %edx,0x8(%ebp)
}
10ee9e: 8d 65 f4 lea -0xc(%ebp),%esp
10eea1: 5b pop %ebx
10eea2: 5e pop %esi
10eea3: 5f pop %edi
10eea4: 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 );
10eea5: e9 1e cc ff ff jmp 10bac8 <_Thread_queue_Enqueue_with_handler>
0010a105 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10a105: 55 push %ebp
10a106: 89 e5 mov %esp,%ebp
10a108: 53 push %ebx
10a109: 83 ec 14 sub $0x14,%esp
10a10c: 8b 5d 08 mov 0x8(%ebp),%ebx
10a10f: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10a112: a1 e4 42 12 00 mov 0x1242e4,%eax
10a117: 85 c0 test %eax,%eax
10a119: 74 19 je 10a134 <_CORE_mutex_Seize+0x2f>
10a11b: 84 d2 test %dl,%dl
10a11d: 74 15 je 10a134 <_CORE_mutex_Seize+0x2f><== NEVER TAKEN
10a11f: 83 3d 3c 44 12 00 01 cmpl $0x1,0x12443c
10a126: 76 0c jbe 10a134 <_CORE_mutex_Seize+0x2f>
10a128: 53 push %ebx
10a129: 6a 12 push $0x12
10a12b: 6a 00 push $0x0
10a12d: 6a 00 push $0x0
10a12f: e8 dc 05 00 00 call 10a710 <_Internal_error_Occurred>
10a134: 51 push %ecx
10a135: 51 push %ecx
10a136: 8d 45 18 lea 0x18(%ebp),%eax
10a139: 50 push %eax
10a13a: 53 push %ebx
10a13b: 88 55 f4 mov %dl,-0xc(%ebp)
10a13e: e8 61 4e 00 00 call 10efa4 <_CORE_mutex_Seize_interrupt_trylock>
10a143: 83 c4 10 add $0x10,%esp
10a146: 85 c0 test %eax,%eax
10a148: 8a 55 f4 mov -0xc(%ebp),%dl
10a14b: 74 48 je 10a195 <_CORE_mutex_Seize+0x90>
10a14d: 84 d2 test %dl,%dl
10a14f: 75 12 jne 10a163 <_CORE_mutex_Seize+0x5e>
10a151: ff 75 18 pushl 0x18(%ebp)
10a154: 9d popf
10a155: a1 08 48 12 00 mov 0x124808,%eax
10a15a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
10a161: eb 32 jmp 10a195 <_CORE_mutex_Seize+0x90>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10a163: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10a16a: a1 08 48 12 00 mov 0x124808,%eax
10a16f: 89 58 44 mov %ebx,0x44(%eax)
10a172: 8b 55 0c mov 0xc(%ebp),%edx
10a175: 89 50 20 mov %edx,0x20(%eax)
10a178: a1 e4 42 12 00 mov 0x1242e4,%eax
10a17d: 40 inc %eax
10a17e: a3 e4 42 12 00 mov %eax,0x1242e4
10a183: ff 75 18 pushl 0x18(%ebp)
10a186: 9d popf
10a187: 50 push %eax
10a188: 50 push %eax
10a189: ff 75 14 pushl 0x14(%ebp)
10a18c: 53 push %ebx
10a18d: e8 26 ff ff ff call 10a0b8 <_CORE_mutex_Seize_interrupt_blocking>
10a192: 83 c4 10 add $0x10,%esp
}
10a195: 8b 5d fc mov -0x4(%ebp),%ebx
10a198: c9 leave
10a199: c3 ret
0010a2c0 <_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
)
{
10a2c0: 55 push %ebp
10a2c1: 89 e5 mov %esp,%ebp
10a2c3: 53 push %ebx
10a2c4: 83 ec 10 sub $0x10,%esp
10a2c7: 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)) ) {
10a2ca: 53 push %ebx
10a2cb: e8 ec 16 00 00 call 10b9bc <_Thread_queue_Dequeue>
10a2d0: 89 c2 mov %eax,%edx
10a2d2: 83 c4 10 add $0x10,%esp
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a2d5: 31 c0 xor %eax,%eax
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10a2d7: 85 d2 test %edx,%edx
10a2d9: 75 15 jne 10a2f0 <_CORE_semaphore_Surrender+0x30>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10a2db: 9c pushf
10a2dc: fa cli
10a2dd: 59 pop %ecx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a2de: 8b 53 48 mov 0x48(%ebx),%edx
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10a2e1: b0 04 mov $0x4,%al
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10a2e3: 3b 53 40 cmp 0x40(%ebx),%edx
10a2e6: 73 06 jae 10a2ee <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN
the_semaphore->count += 1;
10a2e8: 42 inc %edx
10a2e9: 89 53 48 mov %edx,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10a2ec: 30 c0 xor %al,%al
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10a2ee: 51 push %ecx
10a2ef: 9d popf
}
return status;
}
10a2f0: 8b 5d fc mov -0x4(%ebp),%ebx
10a2f3: c9 leave
10a2f4: c3 ret
001093c0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
1093c0: 55 push %ebp
1093c1: 89 e5 mov %esp,%ebp
1093c3: 57 push %edi
1093c4: 56 push %esi
1093c5: 53 push %ebx
1093c6: 83 ec 2c sub $0x2c,%esp
1093c9: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
1093cc: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
option_set = (rtems_option) the_thread->Wait.option;
1093d2: 8b 43 30 mov 0x30(%ebx),%eax
1093d5: 89 45 e0 mov %eax,-0x20(%ebp)
_ISR_Disable( level );
1093d8: 9c pushf
1093d9: fa cli
1093da: 58 pop %eax
pending_events = api->pending_events;
1093db: 8b 17 mov (%edi),%edx
1093dd: 89 55 d4 mov %edx,-0x2c(%ebp)
event_condition = (rtems_event_set) the_thread->Wait.count;
1093e0: 8b 73 24 mov 0x24(%ebx),%esi
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
1093e3: 21 f2 and %esi,%edx
1093e5: 75 07 jne 1093ee <_Event_Surrender+0x2e>
_ISR_Enable( level );
1093e7: 50 push %eax
1093e8: 9d popf
return;
1093e9: e9 af 00 00 00 jmp 10949d <_Event_Surrender+0xdd>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
1093ee: 83 3d 04 48 12 00 00 cmpl $0x0,0x124804
1093f5: 74 49 je 109440 <_Event_Surrender+0x80>
1093f7: 3b 1d 08 48 12 00 cmp 0x124808,%ebx
1093fd: 75 41 jne 109440 <_Event_Surrender+0x80>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
1093ff: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
109405: 83 f9 02 cmp $0x2,%ecx
109408: 74 09 je 109413 <_Event_Surrender+0x53> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10940a: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
109410: 49 dec %ecx
109411: 75 2d jne 109440 <_Event_Surrender+0x80>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
109413: 39 f2 cmp %esi,%edx
109415: 74 06 je 10941d <_Event_Surrender+0x5d>
109417: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10941b: 74 1f je 10943c <_Event_Surrender+0x7c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10941d: 89 d6 mov %edx,%esi
10941f: f7 d6 not %esi
109421: 23 75 d4 and -0x2c(%ebp),%esi
109424: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
109426: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10942d: 8b 4b 28 mov 0x28(%ebx),%ecx
109430: 89 11 mov %edx,(%ecx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
109432: c7 05 dc 4b 12 00 03 movl $0x3,0x124bdc
109439: 00 00 00
}
_ISR_Enable( level );
10943c: 50 push %eax
10943d: 9d popf
return;
10943e: eb 5d jmp 10949d <_Event_Surrender+0xdd>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
109440: f6 43 11 01 testb $0x1,0x11(%ebx)
109444: 74 55 je 10949b <_Event_Surrender+0xdb>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
109446: 39 f2 cmp %esi,%edx
109448: 74 06 je 109450 <_Event_Surrender+0x90>
10944a: f6 45 e0 02 testb $0x2,-0x20(%ebp)
10944e: 74 4b je 10949b <_Event_Surrender+0xdb> <== NEVER TAKEN
109450: 89 d6 mov %edx,%esi
109452: f7 d6 not %esi
109454: 23 75 d4 and -0x2c(%ebp),%esi
109457: 89 37 mov %esi,(%edi)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
109459: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
109460: 8b 4b 28 mov 0x28(%ebx),%ecx
109463: 89 11 mov %edx,(%ecx)
_ISR_Flash( level );
109465: 50 push %eax
109466: 9d popf
109467: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
109468: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10946c: 74 06 je 109474 <_Event_Surrender+0xb4>
_ISR_Enable( level );
10946e: 50 push %eax
10946f: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
109470: 51 push %ecx
109471: 51 push %ecx
109472: eb 17 jmp 10948b <_Event_Surrender+0xcb>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
109474: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10947b: 50 push %eax
10947c: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10947d: 83 ec 0c sub $0xc,%esp
109480: 8d 43 48 lea 0x48(%ebx),%eax
109483: 50 push %eax
109484: e8 2b 2f 00 00 call 10c3b4 <_Watchdog_Remove>
109489: 58 pop %eax
10948a: 5a pop %edx
10948b: 68 f8 ff 03 10 push $0x1003fff8
109490: 53 push %ebx
109491: e8 d2 1e 00 00 call 10b368 <_Thread_Clear_state>
109496: 83 c4 10 add $0x10,%esp
109499: eb 02 jmp 10949d <_Event_Surrender+0xdd>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10949b: 50 push %eax
10949c: 9d popf
}
10949d: 8d 65 f4 lea -0xc(%ebp),%esp
1094a0: 5b pop %ebx
1094a1: 5e pop %esi
1094a2: 5f pop %edi
1094a3: c9 leave
1094a4: c3 ret
001094a8 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
1094a8: 55 push %ebp
1094a9: 89 e5 mov %esp,%ebp
1094ab: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
1094ae: 8d 45 f4 lea -0xc(%ebp),%eax
1094b1: 50 push %eax
1094b2: ff 75 08 pushl 0x8(%ebp)
1094b5: e8 e6 21 00 00 call 10b6a0 <_Thread_Get>
switch ( location ) {
1094ba: 83 c4 10 add $0x10,%esp
1094bd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1094c1: 75 49 jne 10950c <_Event_Timeout+0x64> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
1094c3: 9c pushf
1094c4: fa cli
1094c5: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
1094c6: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
1094cd: 3b 05 08 48 12 00 cmp 0x124808,%eax
1094d3: 75 13 jne 1094e8 <_Event_Timeout+0x40>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
1094d5: 8b 0d dc 4b 12 00 mov 0x124bdc,%ecx
1094db: 49 dec %ecx
1094dc: 75 0a jne 1094e8 <_Event_Timeout+0x40>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
1094de: c7 05 dc 4b 12 00 02 movl $0x2,0x124bdc
1094e5: 00 00 00
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
1094e8: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
1094ef: 52 push %edx
1094f0: 9d popf
1094f1: 52 push %edx
1094f2: 52 push %edx
1094f3: 68 f8 ff 03 10 push $0x1003fff8
1094f8: 50 push %eax
1094f9: e8 6a 1e 00 00 call 10b368 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
1094fe: a1 e4 42 12 00 mov 0x1242e4,%eax
109503: 48 dec %eax
109504: a3 e4 42 12 00 mov %eax,0x1242e4
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
109509: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10950c: c9 leave
10950d: c3 ret
0010f58b <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
10f58b: 55 push %ebp
10f58c: 89 e5 mov %esp,%ebp
10f58e: 57 push %edi
10f58f: 56 push %esi
10f590: 53 push %ebx
10f591: 83 ec 4c sub $0x4c,%esp
10f594: 8b 5d 08 mov 0x8(%ebp),%ebx
10f597: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
10f59a: 8b 43 20 mov 0x20(%ebx),%eax
10f59d: 89 45 c0 mov %eax,-0x40(%ebp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
10f5a0: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
10f5a7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
10f5ae: 8b 53 10 mov 0x10(%ebx),%edx
10f5b1: 89 55 c4 mov %edx,-0x3c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10f5b4: 8b 43 14 mov 0x14(%ebx),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
10f5b7: 8b 7b 30 mov 0x30(%ebx),%edi
10f5ba: 89 7d bc mov %edi,-0x44(%ebp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
10f5bd: 31 f6 xor %esi,%esi
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
10f5bf: 8b 7d 0c mov 0xc(%ebp),%edi
10f5c2: 01 cf add %ecx,%edi
10f5c4: 0f 82 d4 01 00 00 jb 10f79e <_Heap_Extend+0x213>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
10f5ca: 52 push %edx
10f5cb: 52 push %edx
10f5cc: 8d 55 e0 lea -0x20(%ebp),%edx
10f5cf: 52 push %edx
10f5d0: 8d 55 e4 lea -0x1c(%ebp),%edx
10f5d3: 52 push %edx
10f5d4: 50 push %eax
10f5d5: ff 75 c4 pushl -0x3c(%ebp)
10f5d8: 51 push %ecx
10f5d9: ff 75 0c pushl 0xc(%ebp)
10f5dc: e8 52 b2 ff ff call 10a833 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
10f5e1: 83 c4 20 add $0x20,%esp
10f5e4: 84 c0 test %al,%al
10f5e6: 0f 84 b2 01 00 00 je 10f79e <_Heap_Extend+0x213>
10f5ec: 8b 4d c0 mov -0x40(%ebp),%ecx
10f5ef: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp)
10f5f6: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
10f5fd: 31 f6 xor %esi,%esi
10f5ff: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
10f606: 8b 43 18 mov 0x18(%ebx),%eax
10f609: 89 5d b8 mov %ebx,-0x48(%ebp)
10f60c: eb 02 jmp 10f610 <_Heap_Extend+0x85>
10f60e: 89 c8 mov %ecx,%eax
uintptr_t const sub_area_end = start_block->prev_size;
10f610: 8b 19 mov (%ecx),%ebx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
10f612: 39 c7 cmp %eax,%edi
10f614: 76 09 jbe 10f61f <_Heap_Extend+0x94>
10f616: 39 5d 0c cmp %ebx,0xc(%ebp)
10f619: 0f 82 7d 01 00 00 jb 10f79c <_Heap_Extend+0x211>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f61f: 39 c7 cmp %eax,%edi
10f621: 74 06 je 10f629 <_Heap_Extend+0x9e>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f623: 39 df cmp %ebx,%edi
10f625: 72 07 jb 10f62e <_Heap_Extend+0xa3>
10f627: eb 08 jmp 10f631 <_Heap_Extend+0xa6>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
10f629: 89 4d d0 mov %ecx,-0x30(%ebp)
10f62c: eb 03 jmp 10f631 <_Heap_Extend+0xa6>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
10f62e: 89 4d c8 mov %ecx,-0x38(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f631: 8d 43 f8 lea -0x8(%ebx),%eax
10f634: 89 45 d4 mov %eax,-0x2c(%ebp)
10f637: 89 d8 mov %ebx,%eax
10f639: 31 d2 xor %edx,%edx
10f63b: f7 75 c4 divl -0x3c(%ebp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f63e: 29 55 d4 sub %edx,-0x2c(%ebp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
10f641: 3b 5d 0c cmp 0xc(%ebp),%ebx
10f644: 75 07 jne 10f64d <_Heap_Extend+0xc2>
start_block->prev_size = extend_area_end;
10f646: 89 39 mov %edi,(%ecx)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
10f648: 8b 75 d4 mov -0x2c(%ebp),%esi
10f64b: eb 08 jmp 10f655 <_Heap_Extend+0xca>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
10f64d: 73 06 jae 10f655 <_Heap_Extend+0xca>
10f64f: 8b 55 d4 mov -0x2c(%ebp),%edx
10f652: 89 55 cc mov %edx,-0x34(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10f655: 8b 45 d4 mov -0x2c(%ebp),%eax
10f658: 8b 48 04 mov 0x4(%eax),%ecx
10f65b: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f65e: 01 c1 add %eax,%ecx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
10f660: 3b 4d c0 cmp -0x40(%ebp),%ecx
10f663: 75 a9 jne 10f60e <_Heap_Extend+0x83>
10f665: 8b 5d b8 mov -0x48(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
10f668: 8b 55 0c mov 0xc(%ebp),%edx
10f66b: 3b 53 18 cmp 0x18(%ebx),%edx
10f66e: 73 05 jae 10f675 <_Heap_Extend+0xea>
heap->area_begin = extend_area_begin;
10f670: 89 53 18 mov %edx,0x18(%ebx)
10f673: eb 08 jmp 10f67d <_Heap_Extend+0xf2>
} else if ( heap->area_end < extend_area_end ) {
10f675: 39 7b 1c cmp %edi,0x1c(%ebx)
10f678: 73 03 jae 10f67d <_Heap_Extend+0xf2>
heap->area_end = extend_area_end;
10f67a: 89 7b 1c mov %edi,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
10f67d: 8b 45 e0 mov -0x20(%ebp),%eax
10f680: 8b 55 e4 mov -0x1c(%ebp),%edx
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
10f683: 89 c1 mov %eax,%ecx
10f685: 29 d1 sub %edx,%ecx
10f687: 89 4d d4 mov %ecx,-0x2c(%ebp)
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
10f68a: 89 3a mov %edi,(%edx)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
10f68c: 83 c9 01 or $0x1,%ecx
10f68f: 89 4a 04 mov %ecx,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
10f692: 8b 4d d4 mov -0x2c(%ebp),%ecx
10f695: 89 08 mov %ecx,(%eax)
extend_last_block->size_and_flag = 0;
10f697: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
10f69e: 39 53 20 cmp %edx,0x20(%ebx)
10f6a1: 76 05 jbe 10f6a8 <_Heap_Extend+0x11d>
heap->first_block = extend_first_block;
10f6a3: 89 53 20 mov %edx,0x20(%ebx)
10f6a6: eb 08 jmp 10f6b0 <_Heap_Extend+0x125>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
10f6a8: 39 43 24 cmp %eax,0x24(%ebx)
10f6ab: 73 03 jae 10f6b0 <_Heap_Extend+0x125>
heap->last_block = extend_last_block;
10f6ad: 89 43 24 mov %eax,0x24(%ebx)
}
if ( merge_below_block != NULL ) {
10f6b0: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f6b4: 74 3b je 10f6f1 <_Heap_Extend+0x166>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
10f6b6: 8b 43 10 mov 0x10(%ebx),%eax
10f6b9: 89 45 d4 mov %eax,-0x2c(%ebp)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10f6bc: 8b 4d 0c mov 0xc(%ebp),%ecx
10f6bf: 83 c1 08 add $0x8,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10f6c2: 89 c8 mov %ecx,%eax
10f6c4: 31 d2 xor %edx,%edx
10f6c6: f7 75 d4 divl -0x2c(%ebp)
if ( remainder != 0 ) {
10f6c9: 85 d2 test %edx,%edx
10f6cb: 74 05 je 10f6d2 <_Heap_Extend+0x147>
return value - remainder + alignment;
10f6cd: 03 4d d4 add -0x2c(%ebp),%ecx
10f6d0: 29 d1 sub %edx,%ecx
uintptr_t const new_first_block_begin =
10f6d2: 8d 51 f8 lea -0x8(%ecx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
10f6d5: 8b 45 d0 mov -0x30(%ebp),%eax
10f6d8: 8b 00 mov (%eax),%eax
10f6da: 89 41 f8 mov %eax,-0x8(%ecx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
10f6dd: 8b 45 d0 mov -0x30(%ebp),%eax
10f6e0: 29 d0 sub %edx,%eax
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
10f6e2: 83 c8 01 or $0x1,%eax
10f6e5: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
10f6e8: 89 d8 mov %ebx,%eax
10f6ea: e8 81 fe ff ff call 10f570 <_Heap_Free_block>
10f6ef: eb 14 jmp 10f705 <_Heap_Extend+0x17a>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
10f6f1: 83 7d c8 00 cmpl $0x0,-0x38(%ebp)
10f6f5: 74 0e je 10f705 <_Heap_Extend+0x17a>
_Heap_Link_below(
10f6f7: 8b 55 e0 mov -0x20(%ebp),%edx
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
10f6fa: 8b 45 c8 mov -0x38(%ebp),%eax
10f6fd: 29 d0 sub %edx,%eax
10f6ff: 83 c8 01 or $0x1,%eax
10f702: 89 42 04 mov %eax,0x4(%edx)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
10f705: 85 f6 test %esi,%esi
10f707: 74 30 je 10f739 <_Heap_Extend+0x1ae>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
10f709: 83 ef 08 sub $0x8,%edi
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
10f70c: 29 f7 sub %esi,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10f70e: 89 f8 mov %edi,%eax
10f710: 31 d2 xor %edx,%edx
10f712: f7 73 10 divl 0x10(%ebx)
10f715: 29 d7 sub %edx,%edi
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
10f717: 8b 46 04 mov 0x4(%esi),%eax
10f71a: 29 f8 sub %edi,%eax
| HEAP_PREV_BLOCK_USED;
10f71c: 83 c8 01 or $0x1,%eax
10f71f: 89 44 37 04 mov %eax,0x4(%edi,%esi,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f723: 8b 46 04 mov 0x4(%esi),%eax
10f726: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
10f729: 09 f8 or %edi,%eax
10f72b: 89 46 04 mov %eax,0x4(%esi)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
10f72e: 89 f2 mov %esi,%edx
10f730: 89 d8 mov %ebx,%eax
10f732: e8 39 fe ff ff call 10f570 <_Heap_Free_block>
10f737: eb 21 jmp 10f75a <_Heap_Extend+0x1cf>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
10f739: 83 7d cc 00 cmpl $0x0,-0x34(%ebp)
10f73d: 74 1b je 10f75a <_Heap_Extend+0x1cf>
_Heap_Link_above(
10f73f: 8b 4d e0 mov -0x20(%ebp),%ecx
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
10f742: 8b 45 e4 mov -0x1c(%ebp),%eax
10f745: 2b 45 cc sub -0x34(%ebp),%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f748: 8b 7d cc mov -0x34(%ebp),%edi
10f74b: 8b 57 04 mov 0x4(%edi),%edx
10f74e: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
10f751: 09 d0 or %edx,%eax
10f753: 89 47 04 mov %eax,0x4(%edi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10f756: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
10f75a: 85 f6 test %esi,%esi
10f75c: 75 10 jne 10f76e <_Heap_Extend+0x1e3>
10f75e: 83 7d d0 00 cmpl $0x0,-0x30(%ebp)
10f762: 75 0a jne 10f76e <_Heap_Extend+0x1e3>
_Heap_Free_block( heap, extend_first_block );
10f764: 8b 55 e4 mov -0x1c(%ebp),%edx
10f767: 89 d8 mov %ebx,%eax
10f769: e8 02 fe ff ff call 10f570 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
10f76e: 8b 53 24 mov 0x24(%ebx),%edx
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
10f771: 8b 43 20 mov 0x20(%ebx),%eax
10f774: 29 d0 sub %edx,%eax
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
10f776: 8b 4a 04 mov 0x4(%edx),%ecx
10f779: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
10f77c: 09 c8 or %ecx,%eax
10f77e: 89 42 04 mov %eax,0x4(%edx)
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
10f781: 8b 43 30 mov 0x30(%ebx),%eax
10f784: 2b 45 bc sub -0x44(%ebp),%eax
/* Statistics */
stats->size += extended_size;
10f787: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
10f78a: be 01 00 00 00 mov $0x1,%esi
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
10f78f: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
10f793: 74 09 je 10f79e <_Heap_Extend+0x213> <== NEVER TAKEN
*extended_size_ptr = extended_size;
10f795: 8b 55 14 mov 0x14(%ebp),%edx
10f798: 89 02 mov %eax,(%edx)
10f79a: eb 02 jmp 10f79e <_Heap_Extend+0x213>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
10f79c: 31 f6 xor %esi,%esi
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
10f79e: 89 f0 mov %esi,%eax
10f7a0: 8d 65 f4 lea -0xc(%ebp),%esp
10f7a3: 5b pop %ebx
10f7a4: 5e pop %esi
10f7a5: 5f pop %edi
10f7a6: c9 leave
10f7a7: c3 ret
0010f240 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
10f240: 55 push %ebp
10f241: 89 e5 mov %esp,%ebp
10f243: 57 push %edi
10f244: 56 push %esi
10f245: 53 push %ebx
10f246: 83 ec 14 sub $0x14,%esp
10f249: 8b 4d 08 mov 0x8(%ebp),%ecx
10f24c: 8b 55 0c mov 0xc(%ebp),%edx
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
10f24f: b0 01 mov $0x1,%al
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
10f251: 85 d2 test %edx,%edx
10f253: 0f 84 4b 01 00 00 je 10f3a4 <_Heap_Free+0x164>
10f259: 8d 5a f8 lea -0x8(%edx),%ebx
10f25c: 89 d0 mov %edx,%eax
10f25e: 31 d2 xor %edx,%edx
10f260: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
10f263: 29 d3 sub %edx,%ebx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10f265: 8b 41 20 mov 0x20(%ecx),%eax
10f268: 89 45 ec mov %eax,-0x14(%ebp)
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f26b: 31 d2 xor %edx,%edx
10f26d: 39 c3 cmp %eax,%ebx
10f26f: 72 08 jb 10f279 <_Heap_Free+0x39>
10f271: 31 d2 xor %edx,%edx
10f273: 39 59 24 cmp %ebx,0x24(%ecx)
10f276: 0f 93 c2 setae %dl
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
10f279: 31 c0 xor %eax,%eax
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
10f27b: 85 d2 test %edx,%edx
10f27d: 0f 84 21 01 00 00 je 10f3a4 <_Heap_Free+0x164>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f283: 8b 43 04 mov 0x4(%ebx),%eax
10f286: 89 45 f0 mov %eax,-0x10(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10f289: 89 c6 mov %eax,%esi
10f28b: 83 e6 fe and $0xfffffffe,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f28e: 8d 14 33 lea (%ebx,%esi,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f291: 31 ff xor %edi,%edi
10f293: 3b 55 ec cmp -0x14(%ebp),%edx
10f296: 72 0a jb 10f2a2 <_Heap_Free+0x62> <== NEVER TAKEN
10f298: 31 c0 xor %eax,%eax
10f29a: 39 51 24 cmp %edx,0x24(%ecx)
10f29d: 0f 93 c0 setae %al
10f2a0: 89 c7 mov %eax,%edi
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
return false;
10f2a2: 31 c0 xor %eax,%eax
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10f2a4: 85 ff test %edi,%edi
10f2a6: 0f 84 f8 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
10f2ac: 8b 7a 04 mov 0x4(%edx),%edi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
10f2af: f7 c7 01 00 00 00 test $0x1,%edi
10f2b5: 0f 84 e9 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10f2bb: 83 e7 fe and $0xfffffffe,%edi
10f2be: 89 7d e8 mov %edi,-0x18(%ebp)
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f2c1: 8b 41 24 mov 0x24(%ecx),%eax
10f2c4: 89 45 e4 mov %eax,-0x1c(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
10f2c7: 31 c0 xor %eax,%eax
10f2c9: 3b 55 e4 cmp -0x1c(%ebp),%edx
10f2cc: 74 0a je 10f2d8 <_Heap_Free+0x98>
10f2ce: 31 c0 xor %eax,%eax
10f2d0: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
10f2d5: 0f 94 c0 sete %al
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
10f2d8: 88 45 e3 mov %al,-0x1d(%ebp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
10f2db: f6 45 f0 01 testb $0x1,-0x10(%ebp)
10f2df: 75 62 jne 10f343 <_Heap_Free+0x103>
uintptr_t const prev_size = block->prev_size;
10f2e1: 8b 03 mov (%ebx),%eax
10f2e3: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10f2e6: 29 c3 sub %eax,%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10f2e8: 31 ff xor %edi,%edi
10f2ea: 3b 5d ec cmp -0x14(%ebp),%ebx
10f2ed: 72 0a jb 10f2f9 <_Heap_Free+0xb9> <== NEVER TAKEN
10f2ef: 31 c0 xor %eax,%eax
10f2f1: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10f2f4: 0f 93 c0 setae %al
10f2f7: 89 c7 mov %eax,%edi
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
10f2f9: 31 c0 xor %eax,%eax
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
10f2fb: 85 ff test %edi,%edi
10f2fd: 0f 84 a1 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
10f303: f6 43 04 01 testb $0x1,0x4(%ebx)
10f307: 0f 84 97 00 00 00 je 10f3a4 <_Heap_Free+0x164> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
10f30d: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10f311: 74 1a je 10f32d <_Heap_Free+0xed>
uintptr_t const size = block_size + prev_size + next_block_size;
10f313: 8b 45 e8 mov -0x18(%ebp),%eax
10f316: 8d 04 06 lea (%esi,%eax,1),%eax
10f319: 03 45 f0 add -0x10(%ebp),%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10f31c: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = block->prev;
10f31f: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
10f322: 89 7a 08 mov %edi,0x8(%edx)
next->prev = prev;
10f325: 89 57 0c mov %edx,0xc(%edi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
10f328: ff 49 38 decl 0x38(%ecx)
10f32b: eb 33 jmp 10f360 <_Heap_Free+0x120>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
10f32d: 8b 45 f0 mov -0x10(%ebp),%eax
10f330: 8d 04 06 lea (%esi,%eax,1),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f333: 89 c7 mov %eax,%edi
10f335: 83 cf 01 or $0x1,%edi
10f338: 89 7b 04 mov %edi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f33b: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
10f33f: 89 02 mov %eax,(%edx)
10f341: eb 56 jmp 10f399 <_Heap_Free+0x159>
}
} else if ( next_is_free ) { /* coalesce next */
10f343: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
10f347: 74 24 je 10f36d <_Heap_Free+0x12d>
uintptr_t const size = block_size + next_block_size;
10f349: 8b 45 e8 mov -0x18(%ebp),%eax
10f34c: 01 f0 add %esi,%eax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10f34e: 8b 7a 08 mov 0x8(%edx),%edi
Heap_Block *prev = old_block->prev;
10f351: 8b 52 0c mov 0xc(%edx),%edx
new_block->next = next;
10f354: 89 7b 08 mov %edi,0x8(%ebx)
new_block->prev = prev;
10f357: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
10f35a: 89 5f 0c mov %ebx,0xc(%edi)
prev->next = new_block;
10f35d: 89 5a 08 mov %ebx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
10f360: 89 c2 mov %eax,%edx
10f362: 83 ca 01 or $0x1,%edx
10f365: 89 53 04 mov %edx,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
10f368: 89 04 03 mov %eax,(%ebx,%eax,1)
10f36b: eb 2c jmp 10f399 <_Heap_Free+0x159>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10f36d: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
10f370: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
10f373: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10f376: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10f379: 89 58 0c mov %ebx,0xc(%eax)
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
10f37c: 89 f0 mov %esi,%eax
10f37e: 83 c8 01 or $0x1,%eax
10f381: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10f384: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
10f388: 89 32 mov %esi,(%edx)
/* Statistics */
++stats->free_blocks;
10f38a: 8b 41 38 mov 0x38(%ecx),%eax
10f38d: 40 inc %eax
10f38e: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
10f391: 39 41 3c cmp %eax,0x3c(%ecx)
10f394: 73 03 jae 10f399 <_Heap_Free+0x159>
stats->max_free_blocks = stats->free_blocks;
10f396: 89 41 3c mov %eax,0x3c(%ecx)
}
}
/* Statistics */
--stats->used_blocks;
10f399: ff 49 40 decl 0x40(%ecx)
++stats->frees;
10f39c: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
10f39f: 01 71 30 add %esi,0x30(%ecx)
return( true );
10f3a2: b0 01 mov $0x1,%al
}
10f3a4: 83 c4 14 add $0x14,%esp
10f3a7: 5b pop %ebx
10f3a8: 5e pop %esi
10f3a9: 5f pop %edi
10f3aa: c9 leave
10f3ab: c3 ret
0011d090 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11d090: 55 push %ebp
11d091: 89 e5 mov %esp,%ebp
11d093: 57 push %edi
11d094: 56 push %esi
11d095: 53 push %ebx
11d096: 8b 5d 08 mov 0x8(%ebp),%ebx
11d099: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
11d09c: 8d 4e f8 lea -0x8(%esi),%ecx
11d09f: 89 f0 mov %esi,%eax
11d0a1: 31 d2 xor %edx,%edx
11d0a3: f7 73 10 divl 0x10(%ebx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11d0a6: 29 d1 sub %edx,%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
11d0a8: 8b 53 20 mov 0x20(%ebx),%edx
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11d0ab: 31 ff xor %edi,%edi
11d0ad: 39 d1 cmp %edx,%ecx
11d0af: 72 0a jb 11d0bb <_Heap_Size_of_alloc_area+0x2b>
11d0b1: 31 c0 xor %eax,%eax
11d0b3: 39 4b 24 cmp %ecx,0x24(%ebx)
11d0b6: 0f 93 c0 setae %al
11d0b9: 89 c7 mov %eax,%edi
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
11d0bb: 31 c0 xor %eax,%eax
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
11d0bd: 85 ff test %edi,%edi
11d0bf: 74 30 je 11d0f1 <_Heap_Size_of_alloc_area+0x61>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
11d0c1: 8b 41 04 mov 0x4(%ecx),%eax
11d0c4: 83 e0 fe and $0xfffffffe,%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11d0c7: 01 c1 add %eax,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11d0c9: 31 ff xor %edi,%edi
11d0cb: 39 d1 cmp %edx,%ecx
11d0cd: 72 0a jb 11d0d9 <_Heap_Size_of_alloc_area+0x49><== NEVER TAKEN
11d0cf: 31 c0 xor %eax,%eax
11d0d1: 39 4b 24 cmp %ecx,0x24(%ebx)
11d0d4: 0f 93 c0 setae %al
11d0d7: 89 c7 mov %eax,%edi
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
11d0d9: 31 c0 xor %eax,%eax
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
11d0db: 85 ff test %edi,%edi
11d0dd: 74 12 je 11d0f1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
11d0df: f6 41 04 01 testb $0x1,0x4(%ecx)
11d0e3: 74 0c je 11d0f1 <_Heap_Size_of_alloc_area+0x61><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11d0e5: 29 f1 sub %esi,%ecx
11d0e7: 8d 51 04 lea 0x4(%ecx),%edx
11d0ea: 8b 45 10 mov 0x10(%ebp),%eax
11d0ed: 89 10 mov %edx,(%eax)
return true;
11d0ef: b0 01 mov $0x1,%al
}
11d0f1: 5b pop %ebx
11d0f2: 5e pop %esi
11d0f3: 5f pop %edi
11d0f4: c9 leave
11d0f5: c3 ret
0010b12a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10b12a: 55 push %ebp
10b12b: 89 e5 mov %esp,%ebp
10b12d: 57 push %edi
10b12e: 56 push %esi
10b12f: 53 push %ebx
10b130: 83 ec 4c sub $0x4c,%esp
10b133: 8b 75 08 mov 0x8(%ebp),%esi
10b136: 8b 5d 0c mov 0xc(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10b139: 8b 46 10 mov 0x10(%esi),%eax
10b13c: 89 45 d8 mov %eax,-0x28(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10b13f: 8b 4e 14 mov 0x14(%esi),%ecx
10b142: 89 4d d4 mov %ecx,-0x2c(%ebp)
Heap_Block *const first_block = heap->first_block;
10b145: 8b 46 20 mov 0x20(%esi),%eax
10b148: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_block = heap->last_block;
10b14b: 8b 4e 24 mov 0x24(%esi),%ecx
10b14e: 89 4d c8 mov %ecx,-0x38(%ebp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10b151: c7 45 e4 ec b0 10 00 movl $0x10b0ec,-0x1c(%ebp)
10b158: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10b15c: 74 07 je 10b165 <_Heap_Walk+0x3b>
10b15e: c7 45 e4 f1 b0 10 00 movl $0x10b0f1,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
10b165: b0 01 mov $0x1,%al
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10b167: 83 3d 04 76 12 00 03 cmpl $0x3,0x127604
10b16e: 0f 85 e8 02 00 00 jne 10b45c <_Heap_Walk+0x332>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10b174: 52 push %edx
10b175: ff 76 0c pushl 0xc(%esi)
10b178: ff 76 08 pushl 0x8(%esi)
10b17b: ff 75 c8 pushl -0x38(%ebp)
10b17e: ff 75 d0 pushl -0x30(%ebp)
10b181: ff 76 1c pushl 0x1c(%esi)
10b184: ff 76 18 pushl 0x18(%esi)
10b187: ff 75 d4 pushl -0x2c(%ebp)
10b18a: ff 75 d8 pushl -0x28(%ebp)
10b18d: 68 b1 fa 11 00 push $0x11fab1
10b192: 6a 00 push $0x0
10b194: 53 push %ebx
10b195: ff 55 e4 call *-0x1c(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10b198: 83 c4 30 add $0x30,%esp
10b19b: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10b19f: 75 0b jne 10b1ac <_Heap_Walk+0x82>
(*printer)( source, true, "page size is zero\n" );
10b1a1: 50 push %eax
10b1a2: 68 42 fb 11 00 push $0x11fb42
10b1a7: e9 6b 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10b1ac: f6 45 d8 03 testb $0x3,-0x28(%ebp)
10b1b0: 74 0d je 10b1bf <_Heap_Walk+0x95>
(*printer)(
10b1b2: ff 75 d8 pushl -0x28(%ebp)
10b1b5: 68 55 fb 11 00 push $0x11fb55
10b1ba: e9 58 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b1bf: 8b 45 d4 mov -0x2c(%ebp),%eax
10b1c2: 31 d2 xor %edx,%edx
10b1c4: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10b1c7: 85 d2 test %edx,%edx
10b1c9: 74 0d je 10b1d8 <_Heap_Walk+0xae>
(*printer)(
10b1cb: ff 75 d4 pushl -0x2c(%ebp)
10b1ce: 68 73 fb 11 00 push $0x11fb73
10b1d3: e9 3f 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b1d8: 8b 45 d0 mov -0x30(%ebp),%eax
10b1db: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b1de: 31 d2 xor %edx,%edx
10b1e0: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if (
10b1e3: 85 d2 test %edx,%edx
10b1e5: 74 0d je 10b1f4 <_Heap_Walk+0xca>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10b1e7: ff 75 d0 pushl -0x30(%ebp)
10b1ea: 68 97 fb 11 00 push $0x11fb97
10b1ef: e9 23 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10b1f4: 8b 45 d0 mov -0x30(%ebp),%eax
10b1f7: f6 40 04 01 testb $0x1,0x4(%eax)
10b1fb: 75 0b jne 10b208 <_Heap_Walk+0xde>
(*printer)(
10b1fd: 57 push %edi
10b1fe: 68 c8 fb 11 00 push $0x11fbc8
10b203: e9 0f 02 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10b208: 8b 4d c8 mov -0x38(%ebp),%ecx
10b20b: 8b 79 04 mov 0x4(%ecx),%edi
10b20e: 83 e7 fe and $0xfffffffe,%edi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b211: 01 cf add %ecx,%edi
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10b213: f6 47 04 01 testb $0x1,0x4(%edi)
10b217: 75 0b jne 10b224 <_Heap_Walk+0xfa>
(*printer)(
10b219: 56 push %esi
10b21a: 68 f6 fb 11 00 push $0x11fbf6
10b21f: e9 f3 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if (
10b224: 3b 7d d0 cmp -0x30(%ebp),%edi
10b227: 74 0b je 10b234 <_Heap_Walk+0x10a>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10b229: 51 push %ecx
10b22a: 68 0b fc 11 00 push $0x11fc0b
10b22f: e9 e3 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10b234: 8b 46 10 mov 0x10(%esi),%eax
10b237: 89 45 e0 mov %eax,-0x20(%ebp)
block = next_block;
} while ( block != first_block );
return true;
}
10b23a: 8b 4e 08 mov 0x8(%esi),%ecx
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
10b23d: 89 75 dc mov %esi,-0x24(%ebp)
10b240: eb 75 jmp 10b2b7 <_Heap_Walk+0x18d>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10b242: 31 c0 xor %eax,%eax
10b244: 39 4e 20 cmp %ecx,0x20(%esi)
10b247: 77 08 ja 10b251 <_Heap_Walk+0x127>
10b249: 31 c0 xor %eax,%eax
10b24b: 39 4e 24 cmp %ecx,0x24(%esi)
10b24e: 0f 93 c0 setae %al
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
10b251: 85 c0 test %eax,%eax
10b253: 75 0b jne 10b260 <_Heap_Walk+0x136>
(*printer)(
10b255: 51 push %ecx
10b256: 68 3a fc 11 00 push $0x11fc3a
10b25b: e9 b7 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10b260: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b263: 31 d2 xor %edx,%edx
10b265: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if (
10b268: 85 d2 test %edx,%edx
10b26a: 74 0b je 10b277 <_Heap_Walk+0x14d>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10b26c: 51 push %ecx
10b26d: 68 5a fc 11 00 push $0x11fc5a
10b272: e9 a0 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10b277: 8b 41 04 mov 0x4(%ecx),%eax
10b27a: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10b27d: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10b282: 74 0b je 10b28f <_Heap_Walk+0x165>
(*printer)(
10b284: 51 push %ecx
10b285: 68 8a fc 11 00 push $0x11fc8a
10b28a: e9 88 01 00 00 jmp 10b417 <_Heap_Walk+0x2ed>
);
return false;
}
if ( free_block->prev != prev_block ) {
10b28f: 8b 41 0c mov 0xc(%ecx),%eax
10b292: 3b 45 dc cmp -0x24(%ebp),%eax
10b295: 74 1a je 10b2b1 <_Heap_Walk+0x187>
(*printer)(
10b297: 83 ec 0c sub $0xc,%esp
10b29a: 50 push %eax
10b29b: 51 push %ecx
10b29c: 68 a6 fc 11 00 push $0x11fca6
10b2a1: 6a 01 push $0x1
10b2a3: 53 push %ebx
10b2a4: ff 55 e4 call *-0x1c(%ebp)
10b2a7: 83 c4 20 add $0x20,%esp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
10b2aa: 31 c0 xor %eax,%eax
10b2ac: e9 ab 01 00 00 jmp 10b45c <_Heap_Walk+0x332>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10b2b1: 89 4d dc mov %ecx,-0x24(%ebp)
10b2b4: 8b 49 08 mov 0x8(%ecx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10b2b7: 39 f1 cmp %esi,%ecx
10b2b9: 75 87 jne 10b242 <_Heap_Walk+0x118>
10b2bb: 89 5d dc mov %ebx,-0x24(%ebp)
10b2be: eb 02 jmp 10b2c2 <_Heap_Walk+0x198>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b2c0: 89 df mov %ebx,%edi
return true;
}
10b2c2: 8b 4f 04 mov 0x4(%edi),%ecx
10b2c5: 89 4d cc mov %ecx,-0x34(%ebp)
10b2c8: 83 e1 fe and $0xfffffffe,%ecx
10b2cb: 89 4d e0 mov %ecx,-0x20(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10b2ce: 8d 1c 0f lea (%edi,%ecx,1),%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10b2d1: 31 c0 xor %eax,%eax
10b2d3: 39 5e 20 cmp %ebx,0x20(%esi)
10b2d6: 77 08 ja 10b2e0 <_Heap_Walk+0x1b6> <== NEVER TAKEN
10b2d8: 31 c0 xor %eax,%eax
10b2da: 39 5e 24 cmp %ebx,0x24(%esi)
10b2dd: 0f 93 c0 setae %al
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
10b2e0: 85 c0 test %eax,%eax
10b2e2: 75 11 jne 10b2f5 <_Heap_Walk+0x1cb>
10b2e4: 89 d9 mov %ebx,%ecx
10b2e6: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b2e9: 83 ec 0c sub $0xc,%esp
10b2ec: 51 push %ecx
10b2ed: 57 push %edi
10b2ee: 68 d8 fc 11 00 push $0x11fcd8
10b2f3: eb ac jmp 10b2a1 <_Heap_Walk+0x177>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10b2f5: 3b 7d c8 cmp -0x38(%ebp),%edi
10b2f8: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10b2fb: 8b 45 e0 mov -0x20(%ebp),%eax
10b2fe: 31 d2 xor %edx,%edx
10b300: f7 75 d8 divl -0x28(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10b303: 85 d2 test %edx,%edx
10b305: 74 15 je 10b31c <_Heap_Walk+0x1f2>
10b307: 84 c9 test %cl,%cl
10b309: 74 11 je 10b31c <_Heap_Walk+0x1f2>
10b30b: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b30e: 83 ec 0c sub $0xc,%esp
10b311: ff 75 e0 pushl -0x20(%ebp)
10b314: 57 push %edi
10b315: 68 05 fd 11 00 push $0x11fd05
10b31a: eb 85 jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10b31c: 8b 45 d4 mov -0x2c(%ebp),%eax
10b31f: 39 45 e0 cmp %eax,-0x20(%ebp)
10b322: 73 18 jae 10b33c <_Heap_Walk+0x212>
10b324: 84 c9 test %cl,%cl
10b326: 74 14 je 10b33c <_Heap_Walk+0x212> <== NEVER TAKEN
10b328: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b32b: 52 push %edx
10b32c: 52 push %edx
10b32d: 50 push %eax
10b32e: ff 75 e0 pushl -0x20(%ebp)
10b331: 57 push %edi
10b332: 68 33 fd 11 00 push $0x11fd33
10b337: e9 65 ff ff ff jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10b33c: 39 fb cmp %edi,%ebx
10b33e: 77 18 ja 10b358 <_Heap_Walk+0x22e>
10b340: 84 c9 test %cl,%cl
10b342: 74 14 je 10b358 <_Heap_Walk+0x22e>
10b344: 89 d9 mov %ebx,%ecx
10b346: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b349: 83 ec 0c sub $0xc,%esp
10b34c: 51 push %ecx
10b34d: 57 push %edi
10b34e: 68 5e fd 11 00 push $0x11fd5e
10b353: e9 49 ff ff ff jmp 10b2a1 <_Heap_Walk+0x177>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10b358: 8b 4d cc mov -0x34(%ebp),%ecx
10b35b: 83 e1 01 and $0x1,%ecx
10b35e: 89 4d c4 mov %ecx,-0x3c(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10b361: f6 43 04 01 testb $0x1,0x4(%ebx)
10b365: 0f 85 ba 00 00 00 jne 10b425 <_Heap_Walk+0x2fb>
block = next_block;
} while ( block != first_block );
return true;
}
10b36b: 8b 46 08 mov 0x8(%esi),%eax
10b36e: 89 45 c0 mov %eax,-0x40(%ebp)
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10b371: 8b 4f 08 mov 0x8(%edi),%ecx
10b374: 89 4d b4 mov %ecx,-0x4c(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10b377: ba 7e fa 11 00 mov $0x11fa7e,%edx
10b37c: 3b 4e 0c cmp 0xc(%esi),%ecx
10b37f: 74 0e je 10b38f <_Heap_Walk+0x265>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10b381: ba c5 f9 11 00 mov $0x11f9c5,%edx
10b386: 39 f1 cmp %esi,%ecx
10b388: 75 05 jne 10b38f <_Heap_Walk+0x265>
10b38a: ba 8d fa 11 00 mov $0x11fa8d,%edx
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10b38f: 8b 47 0c mov 0xc(%edi),%eax
10b392: 89 45 cc mov %eax,-0x34(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10b395: b8 97 fa 11 00 mov $0x11fa97,%eax
10b39a: 8b 4d c0 mov -0x40(%ebp),%ecx
10b39d: 39 4d cc cmp %ecx,-0x34(%ebp)
10b3a0: 74 0f je 10b3b1 <_Heap_Walk+0x287>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10b3a2: b8 c5 f9 11 00 mov $0x11f9c5,%eax
10b3a7: 39 75 cc cmp %esi,-0x34(%ebp)
10b3aa: 75 05 jne 10b3b1 <_Heap_Walk+0x287>
10b3ac: b8 a7 fa 11 00 mov $0x11faa7,%eax
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10b3b1: 83 ec 0c sub $0xc,%esp
10b3b4: 52 push %edx
10b3b5: ff 75 b4 pushl -0x4c(%ebp)
10b3b8: 50 push %eax
10b3b9: ff 75 cc pushl -0x34(%ebp)
10b3bc: ff 75 e0 pushl -0x20(%ebp)
10b3bf: 57 push %edi
10b3c0: 68 92 fd 11 00 push $0x11fd92
10b3c5: 6a 00 push $0x0
10b3c7: ff 75 dc pushl -0x24(%ebp)
10b3ca: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10b3cd: 8b 03 mov (%ebx),%eax
10b3cf: 83 c4 30 add $0x30,%esp
10b3d2: 39 45 e0 cmp %eax,-0x20(%ebp)
10b3d5: 74 16 je 10b3ed <_Heap_Walk+0x2c3>
10b3d7: 89 d9 mov %ebx,%ecx
10b3d9: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b3dc: 56 push %esi
10b3dd: 51 push %ecx
10b3de: 50 push %eax
10b3df: ff 75 e0 pushl -0x20(%ebp)
10b3e2: 57 push %edi
10b3e3: 68 c7 fd 11 00 push $0x11fdc7
10b3e8: e9 b4 fe ff ff jmp 10b2a1 <_Heap_Walk+0x177>
);
return false;
}
if ( !prev_used ) {
10b3ed: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b3f1: 75 0b jne 10b3fe <_Heap_Walk+0x2d4>
10b3f3: 8b 5d dc mov -0x24(%ebp),%ebx
(*printer)(
10b3f6: 57 push %edi
10b3f7: 68 00 fe 11 00 push $0x11fe00
10b3fc: eb 19 jmp 10b417 <_Heap_Walk+0x2ed>
block = next_block;
} while ( block != first_block );
return true;
}
10b3fe: 8b 46 08 mov 0x8(%esi),%eax
10b401: eb 07 jmp 10b40a <_Heap_Walk+0x2e0>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
10b403: 39 f8 cmp %edi,%eax
10b405: 74 4a je 10b451 <_Heap_Walk+0x327>
return true;
}
free_block = free_block->next;
10b407: 8b 40 08 mov 0x8(%eax),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10b40a: 39 f0 cmp %esi,%eax
10b40c: 75 f5 jne 10b403 <_Heap_Walk+0x2d9>
10b40e: 8b 5d dc mov -0x24(%ebp),%ebx
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10b411: 57 push %edi
10b412: 68 6b fe 11 00 push $0x11fe6b
10b417: 6a 01 push $0x1
10b419: 53 push %ebx
10b41a: ff 55 e4 call *-0x1c(%ebp)
10b41d: 83 c4 10 add $0x10,%esp
10b420: e9 85 fe ff ff jmp 10b2aa <_Heap_Walk+0x180>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10b425: 83 7d c4 00 cmpl $0x0,-0x3c(%ebp)
10b429: 74 0e je 10b439 <_Heap_Walk+0x30f>
(*printer)(
10b42b: 83 ec 0c sub $0xc,%esp
10b42e: ff 75 e0 pushl -0x20(%ebp)
10b431: 57 push %edi
10b432: 68 2f fe 11 00 push $0x11fe2f
10b437: eb 0d jmp 10b446 <_Heap_Walk+0x31c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10b439: 51 push %ecx
10b43a: 51 push %ecx
10b43b: ff 37 pushl (%edi)
10b43d: ff 75 e0 pushl -0x20(%ebp)
10b440: 57 push %edi
10b441: 68 46 fe 11 00 push $0x11fe46
10b446: 6a 00 push $0x0
10b448: ff 75 dc pushl -0x24(%ebp)
10b44b: ff 55 e4 call *-0x1c(%ebp)
10b44e: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10b451: 3b 5d d0 cmp -0x30(%ebp),%ebx
10b454: 0f 85 66 fe ff ff jne 10b2c0 <_Heap_Walk+0x196>
return true;
10b45a: b0 01 mov $0x1,%al
}
10b45c: 8d 65 f4 lea -0xc(%ebp),%esp
10b45f: 5b pop %ebx
10b460: 5e pop %esi
10b461: 5f pop %edi
10b462: c9 leave
10b463: c3 ret
0010a710 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10a710: 55 push %ebp
10a711: 89 e5 mov %esp,%ebp
10a713: 53 push %ebx
10a714: 83 ec 08 sub $0x8,%esp
10a717: 8b 45 08 mov 0x8(%ebp),%eax
10a71a: 8b 55 0c mov 0xc(%ebp),%edx
10a71d: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10a720: a3 78 43 12 00 mov %eax,0x124378
_Internal_errors_What_happened.is_internal = is_internal;
10a725: 88 15 7c 43 12 00 mov %dl,0x12437c
_Internal_errors_What_happened.the_error = the_error;
10a72b: 89 1d 80 43 12 00 mov %ebx,0x124380
_User_extensions_Fatal( the_source, is_internal, the_error );
10a731: 53 push %ebx
10a732: 0f b6 d2 movzbl %dl,%edx
10a735: 52 push %edx
10a736: 50 push %eax
10a737: e8 37 1a 00 00 call 10c173 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10a73c: c7 05 3c 44 12 00 05 movl $0x5,0x12443c <== NOT EXECUTED
10a743: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10a746: fa cli <== NOT EXECUTED
10a747: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10a749: f4 hlt <== NOT EXECUTED
10a74a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a74d: eb fe jmp 10a74d <_Internal_error_Occurred+0x3d><== NOT EXECUTED
0010a7a0 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10a7a0: 55 push %ebp
10a7a1: 89 e5 mov %esp,%ebp
10a7a3: 56 push %esi
10a7a4: 53 push %ebx
10a7a5: 8b 5d 08 mov 0x8(%ebp),%ebx
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10a7a8: 31 c9 xor %ecx,%ecx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10a7aa: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
10a7ae: 74 53 je 10a803 <_Objects_Allocate+0x63><== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10a7b0: 8d 73 20 lea 0x20(%ebx),%esi
10a7b3: 83 ec 0c sub $0xc,%esp
10a7b6: 56 push %esi
10a7b7: e8 30 f8 ff ff call 109fec <_Chain_Get>
10a7bc: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10a7be: 83 c4 10 add $0x10,%esp
10a7c1: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10a7c5: 74 3c je 10a803 <_Objects_Allocate+0x63>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10a7c7: 85 c0 test %eax,%eax
10a7c9: 75 1a jne 10a7e5 <_Objects_Allocate+0x45>
_Objects_Extend_information( information );
10a7cb: 83 ec 0c sub $0xc,%esp
10a7ce: 53 push %ebx
10a7cf: e8 60 00 00 00 call 10a834 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10a7d4: 89 34 24 mov %esi,(%esp)
10a7d7: e8 10 f8 ff ff call 109fec <_Chain_Get>
10a7dc: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10a7de: 83 c4 10 add $0x10,%esp
10a7e1: 85 c0 test %eax,%eax
10a7e3: 74 1e je 10a803 <_Objects_Allocate+0x63>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10a7e5: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10a7e9: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10a7ed: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10a7ef: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10a7f3: 31 d2 xor %edx,%edx
10a7f5: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10a7f7: c1 e0 02 shl $0x2,%eax
10a7fa: 03 43 30 add 0x30(%ebx),%eax
10a7fd: ff 08 decl (%eax)
information->inactive--;
10a7ff: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10a803: 89 c8 mov %ecx,%eax
10a805: 8d 65 f8 lea -0x8(%ebp),%esp
10a808: 5b pop %ebx
10a809: 5e pop %esi
10a80a: c9 leave
10a80b: c3 ret
0010ab24 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10ab24: 55 push %ebp
10ab25: 89 e5 mov %esp,%ebp
10ab27: 57 push %edi
10ab28: 56 push %esi
10ab29: 53 push %ebx
10ab2a: 83 ec 0c sub $0xc,%esp
10ab2d: 8b 75 08 mov 0x8(%ebp),%esi
10ab30: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10ab33: 31 db xor %ebx,%ebx
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10ab35: 66 85 ff test %di,%di
10ab38: 74 37 je 10ab71 <_Objects_Get_information+0x4d>
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10ab3a: 83 ec 0c sub $0xc,%esp
10ab3d: 56 push %esi
10ab3e: e8 69 48 00 00 call 10f3ac <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10ab43: 83 c4 10 add $0x10,%esp
10ab46: 85 c0 test %eax,%eax
10ab48: 74 27 je 10ab71 <_Objects_Get_information+0x4d>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10ab4a: 0f b7 ff movzwl %di,%edi
10ab4d: 39 c7 cmp %eax,%edi
10ab4f: 77 20 ja 10ab71 <_Objects_Get_information+0x4d>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ab51: 8b 04 b5 bc 42 12 00 mov 0x1242bc(,%esi,4),%eax
10ab58: 85 c0 test %eax,%eax
10ab5a: 74 15 je 10ab71 <_Objects_Get_information+0x4d><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ab5c: 8b 1c b8 mov (%eax,%edi,4),%ebx
if ( !info )
10ab5f: 85 db test %ebx,%ebx
10ab61: 74 0e je 10ab71 <_Objects_Get_information+0x4d><== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
10ab63: 31 c0 xor %eax,%eax
10ab65: 66 83 7b 10 00 cmpw $0x0,0x10(%ebx)
10ab6a: 0f 95 c0 setne %al
10ab6d: f7 d8 neg %eax
10ab6f: 21 c3 and %eax,%ebx
#endif
return info;
}
10ab71: 89 d8 mov %ebx,%eax
10ab73: 8d 65 f4 lea -0xc(%ebp),%esp
10ab76: 5b pop %ebx
10ab77: 5e pop %esi
10ab78: 5f pop %edi
10ab79: c9 leave
10ab7a: c3 ret
001181d0 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
1181d0: 55 push %ebp
1181d1: 89 e5 mov %esp,%ebp
1181d3: 53 push %ebx
1181d4: 8b 55 08 mov 0x8(%ebp),%edx
1181d7: 8b 4d 10 mov 0x10(%ebp),%ecx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
1181da: b8 01 00 00 00 mov $0x1,%eax
1181df: 2b 42 08 sub 0x8(%edx),%eax
1181e2: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
1181e5: 0f b7 5a 10 movzwl 0x10(%edx),%ebx
1181e9: 39 c3 cmp %eax,%ebx
1181eb: 72 12 jb 1181ff <_Objects_Get_no_protection+0x2f>
if ( (the_object = information->local_table[ index ]) != NULL ) {
1181ed: 8b 52 1c mov 0x1c(%edx),%edx
1181f0: 8b 04 82 mov (%edx,%eax,4),%eax
1181f3: 85 c0 test %eax,%eax
1181f5: 74 08 je 1181ff <_Objects_Get_no_protection+0x2f><== NEVER TAKEN
*location = OBJECTS_LOCAL;
1181f7: c7 01 00 00 00 00 movl $0x0,(%ecx)
return the_object;
1181fd: eb 08 jmp 118207 <_Objects_Get_no_protection+0x37>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
1181ff: c7 01 01 00 00 00 movl $0x1,(%ecx)
return NULL;
118205: 31 c0 xor %eax,%eax
}
118207: 5b pop %ebx
118208: c9 leave
118209: c3 ret
0010bd40 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10bd40: 55 push %ebp
10bd41: 89 e5 mov %esp,%ebp
10bd43: 53 push %ebx
10bd44: 83 ec 14 sub $0x14,%esp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bd47: 8b 45 08 mov 0x8(%ebp),%eax
10bd4a: 85 c0 test %eax,%eax
10bd4c: 75 08 jne 10bd56 <_Objects_Id_to_name+0x16>
10bd4e: a1 54 78 12 00 mov 0x127854,%eax
10bd53: 8b 40 08 mov 0x8(%eax),%eax
10bd56: 89 c2 mov %eax,%edx
10bd58: c1 ea 18 shr $0x18,%edx
10bd5b: 83 e2 07 and $0x7,%edx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10bd5e: 8d 4a ff lea -0x1(%edx),%ecx
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
10bd61: bb 03 00 00 00 mov $0x3,%ebx
10bd66: 83 f9 02 cmp $0x2,%ecx
10bd69: 77 36 ja 10bda1 <_Objects_Id_to_name+0x61>
10bd6b: eb 3b jmp 10bda8 <_Objects_Id_to_name+0x68>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10bd6d: 89 c1 mov %eax,%ecx
10bd6f: c1 e9 1b shr $0x1b,%ecx
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10bd72: 8b 14 8a mov (%edx,%ecx,4),%edx
if ( !information )
10bd75: 85 d2 test %edx,%edx
10bd77: 74 28 je 10bda1 <_Objects_Id_to_name+0x61><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10bd79: 80 7a 38 00 cmpb $0x0,0x38(%edx)
10bd7d: 75 22 jne 10bda1 <_Objects_Id_to_name+0x61><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
10bd7f: 51 push %ecx
10bd80: 8d 4d f4 lea -0xc(%ebp),%ecx
10bd83: 51 push %ecx
10bd84: 50 push %eax
10bd85: 52 push %edx
10bd86: e8 5d ff ff ff call 10bce8 <_Objects_Get>
if ( !the_object )
10bd8b: 83 c4 10 add $0x10,%esp
10bd8e: 85 c0 test %eax,%eax
10bd90: 74 0f je 10bda1 <_Objects_Id_to_name+0x61>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10bd92: 8b 50 0c mov 0xc(%eax),%edx
10bd95: 8b 45 0c mov 0xc(%ebp),%eax
10bd98: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10bd9a: e8 73 0a 00 00 call 10c812 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10bd9f: 31 db xor %ebx,%ebx
}
10bda1: 89 d8 mov %ebx,%eax
10bda3: 8b 5d fc mov -0x4(%ebp),%ebx
10bda6: c9 leave
10bda7: c3 ret
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10bda8: 8b 14 95 08 73 12 00 mov 0x127308(,%edx,4),%edx
10bdaf: 85 d2 test %edx,%edx
10bdb1: 75 ba jne 10bd6d <_Objects_Id_to_name+0x2d>
10bdb3: eb ec jmp 10bda1 <_Objects_Id_to_name+0x61>
0010d930 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10d930: 55 push %ebp
10d931: 89 e5 mov %esp,%ebp
10d933: 57 push %edi
10d934: 56 push %esi
10d935: 53 push %ebx
10d936: 83 ec 30 sub $0x30,%esp
10d939: 8b 75 08 mov 0x8(%ebp),%esi
10d93c: 8b 5d 14 mov 0x14(%ebp),%ebx
10d93f: 8a 55 18 mov 0x18(%ebp),%dl
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10d942: 8d 45 e4 lea -0x1c(%ebp),%eax
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
10d945: 50 push %eax
10d946: 56 push %esi
10d947: 68 d0 cc 12 00 push $0x12ccd0
10d94c: 88 55 d4 mov %dl,-0x2c(%ebp)
10d94f: e8 4c 2a 00 00 call 1103a0 <_Objects_Get>
switch ( location ) {
10d954: 83 c4 10 add $0x10,%esp
10d957: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10d95b: 8a 55 d4 mov -0x2c(%ebp),%dl
10d95e: 0f 85 aa 00 00 00 jne 10da0e <_POSIX_Message_queue_Receive_support+0xde>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10d964: 8b 78 14 mov 0x14(%eax),%edi
10d967: 89 f9 mov %edi,%ecx
10d969: 83 e1 03 and $0x3,%ecx
10d96c: 49 dec %ecx
10d96d: 75 0a jne 10d979 <_POSIX_Message_queue_Receive_support+0x49>
_Thread_Enable_dispatch();
10d96f: e8 e6 34 00 00 call 110e5a <_Thread_Enable_dispatch>
10d974: e9 95 00 00 00 jmp 10da0e <_POSIX_Message_queue_Receive_support+0xde>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10d979: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10d97c: 8b 48 68 mov 0x68(%eax),%ecx
10d97f: 39 4d 10 cmp %ecx,0x10(%ebp)
10d982: 73 15 jae 10d999 <_POSIX_Message_queue_Receive_support+0x69>
_Thread_Enable_dispatch();
10d984: e8 d1 34 00 00 call 110e5a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10d989: e8 b6 8d 00 00 call 116744 <__errno>
10d98e: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10d994: e9 80 00 00 00 jmp 10da19 <_POSIX_Message_queue_Receive_support+0xe9>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10d999: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10d9a0: 31 c9 xor %ecx,%ecx
10d9a2: 84 d2 test %dl,%dl
10d9a4: 74 09 je 10d9af <_POSIX_Message_queue_Receive_support+0x7f><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
10d9a6: 81 e7 00 40 00 00 and $0x4000,%edi
10d9ac: 0f 94 c1 sete %cl
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10d9af: 52 push %edx
10d9b0: 52 push %edx
10d9b1: ff 75 1c pushl 0x1c(%ebp)
10d9b4: 0f b6 c9 movzbl %cl,%ecx
10d9b7: 51 push %ecx
10d9b8: 8d 55 e0 lea -0x20(%ebp),%edx
10d9bb: 52 push %edx
10d9bc: ff 75 0c pushl 0xc(%ebp)
10d9bf: 56 push %esi
10d9c0: 83 c0 1c add $0x1c,%eax
10d9c3: 50 push %eax
10d9c4: e8 db 1b 00 00 call 10f5a4 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10d9c9: 83 c4 20 add $0x20,%esp
10d9cc: e8 89 34 00 00 call 110e5a <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10d9d1: a1 48 cd 12 00 mov 0x12cd48,%eax
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
10d9d6: 8b 50 24 mov 0x24(%eax),%edx
10d9d9: c1 fa 1f sar $0x1f,%edx
10d9dc: 8b 48 24 mov 0x24(%eax),%ecx
10d9df: 31 d1 xor %edx,%ecx
10d9e1: 89 0b mov %ecx,(%ebx)
10d9e3: 29 13 sub %edx,(%ebx)
if ( !_Thread_Executing->Wait.return_code )
10d9e5: 83 78 34 00 cmpl $0x0,0x34(%eax)
10d9e9: 75 05 jne 10d9f0 <_POSIX_Message_queue_Receive_support+0xc0>
return length_out;
10d9eb: 8b 45 e0 mov -0x20(%ebp),%eax
10d9ee: eb 2c jmp 10da1c <_POSIX_Message_queue_Receive_support+0xec>
rtems_set_errno_and_return_minus_one(
10d9f0: e8 4f 8d 00 00 call 116744 <__errno>
10d9f5: 89 c3 mov %eax,%ebx
10d9f7: 83 ec 0c sub $0xc,%esp
10d9fa: a1 48 cd 12 00 mov 0x12cd48,%eax
10d9ff: ff 70 34 pushl 0x34(%eax)
10da02: e8 ed 01 00 00 call 10dbf4 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10da07: 89 03 mov %eax,(%ebx)
10da09: 83 c4 10 add $0x10,%esp
10da0c: eb 0b jmp 10da19 <_POSIX_Message_queue_Receive_support+0xe9>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10da0e: e8 31 8d 00 00 call 116744 <__errno>
10da13: c7 00 09 00 00 00 movl $0x9,(%eax)
10da19: 83 c8 ff or $0xffffffff,%eax
}
10da1c: 8d 65 f4 lea -0xc(%ebp),%esp
10da1f: 5b pop %ebx
10da20: 5e pop %esi
10da21: 5f pop %edi
10da22: c9 leave
10da23: c3 ret
0010dfcc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
10dfcc: 55 push %ebp
10dfcd: 89 e5 mov %esp,%ebp
10dfcf: 83 ec 08 sub $0x8,%esp
10dfd2: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
10dfd5: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10dfdb: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
10dfe2: 75 2c jne 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44><== NEVER TAKEN
10dfe4: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
10dfeb: 75 23 jne 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
10dfed: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
10dff4: 74 1a je 10e010 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x44>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10dff6: a1 d4 52 12 00 mov 0x1252d4,%eax
10dffb: 48 dec %eax
10dffc: a3 d4 52 12 00 mov %eax,0x1252d4
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
10e001: 50 push %eax
10e002: 50 push %eax
10e003: 6a ff push $0xffffffff
10e005: 52 push %edx
10e006: e8 51 08 00 00 call 10e85c <_POSIX_Thread_Exit>
10e00b: 83 c4 10 add $0x10,%esp
} else
_Thread_Enable_dispatch();
}
10e00e: c9 leave
10e00f: c3 ret
10e010: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
10e011: e9 a0 d9 ff ff jmp 10b9b6 <_Thread_Enable_dispatch>
0010f254 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
10f254: 55 push %ebp
10f255: 89 e5 mov %esp,%ebp
10f257: 57 push %edi
10f258: 56 push %esi
10f259: 53 push %ebx
10f25a: 83 ec 28 sub $0x28,%esp
10f25d: 8b 55 08 mov 0x8(%ebp),%edx
10f260: 8b 5d 0c mov 0xc(%ebp),%ebx
10f263: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f266: ff 33 pushl (%ebx)
10f268: 89 55 e0 mov %edx,-0x20(%ebp)
10f26b: e8 c4 ff ff ff call 10f234 <_POSIX_Priority_Is_valid>
10f270: 83 c4 10 add $0x10,%esp
return EINVAL;
10f273: be 16 00 00 00 mov $0x16,%esi
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
10f278: 84 c0 test %al,%al
10f27a: 8b 55 e0 mov -0x20(%ebp),%edx
10f27d: 0f 84 a4 00 00 00 je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
10f283: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
10f289: 8b 45 14 mov 0x14(%ebp),%eax
10f28c: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
10f292: 85 d2 test %edx,%edx
10f294: 75 0b jne 10f2a1 <_POSIX_Thread_Translate_sched_param+0x4d>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
10f296: c7 07 01 00 00 00 movl $0x1,(%edi)
10f29c: e9 83 00 00 00 jmp 10f324 <_POSIX_Thread_Translate_sched_param+0xd0>
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
10f2a1: 31 f6 xor %esi,%esi
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
10f2a3: 83 fa 01 cmp $0x1,%edx
10f2a6: 74 7f je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
10f2a8: 83 fa 02 cmp $0x2,%edx
10f2ab: 75 08 jne 10f2b5 <_POSIX_Thread_Translate_sched_param+0x61>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
10f2ad: c7 07 02 00 00 00 movl $0x2,(%edi)
return 0;
10f2b3: eb 72 jmp 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
10f2b5: be 16 00 00 00 mov $0x16,%esi
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
10f2ba: 83 fa 04 cmp $0x4,%edx
10f2bd: 75 68 jne 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
10f2bf: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10f2c3: 75 06 jne 10f2cb <_POSIX_Thread_Translate_sched_param+0x77>
10f2c5: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
10f2c9: 74 5c je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f2cb: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10f2cf: 75 0b jne 10f2dc <_POSIX_Thread_Translate_sched_param+0x88>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
10f2d1: be 16 00 00 00 mov $0x16,%esi
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
10f2d6: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10f2da: 74 4b je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f2dc: 83 ec 0c sub $0xc,%esp
10f2df: 8d 43 08 lea 0x8(%ebx),%eax
10f2e2: 50 push %eax
10f2e3: e8 38 dc ff ff call 10cf20 <_Timespec_To_ticks>
10f2e8: 89 45 e4 mov %eax,-0x1c(%ebp)
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
10f2eb: 8d 43 10 lea 0x10(%ebx),%eax
10f2ee: 89 04 24 mov %eax,(%esp)
10f2f1: e8 2a dc ff ff call 10cf20 <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f2f6: 83 c4 10 add $0x10,%esp
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
10f2f9: be 16 00 00 00 mov $0x16,%esi
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
10f2fe: 39 45 e4 cmp %eax,-0x1c(%ebp)
10f301: 72 24 jb 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
10f303: 83 ec 0c sub $0xc,%esp
10f306: ff 73 04 pushl 0x4(%ebx)
10f309: e8 26 ff ff ff call 10f234 <_POSIX_Priority_Is_valid>
10f30e: 83 c4 10 add $0x10,%esp
10f311: 84 c0 test %al,%al
10f313: 74 12 je 10f327 <_POSIX_Thread_Translate_sched_param+0xd3>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
10f315: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
10f31b: 8b 45 14 mov 0x14(%ebp),%eax
10f31e: c7 00 61 9e 10 00 movl $0x109e61,(%eax)
return 0;
10f324: 66 31 f6 xor %si,%si
}
return EINVAL;
}
10f327: 89 f0 mov %esi,%eax
10f329: 8d 65 f4 lea -0xc(%ebp),%esp
10f32c: 5b pop %ebx
10f32d: 5e pop %esi
10f32e: 5f pop %edi
10f32f: c9 leave
10f330: c3 ret
00109b64 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
109b64: 55 push %ebp
109b65: 89 e5 mov %esp,%ebp
109b67: 57 push %edi
109b68: 56 push %esi
109b69: 53 push %ebx
109b6a: 83 ec 6c sub $0x6c,%esp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
109b6d: 8b 3d 40 12 12 00 mov 0x121240,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
109b73: 8b 15 3c 12 12 00 mov 0x12123c,%edx
if ( !user_threads || maximum == 0 )
109b79: 85 d2 test %edx,%edx
109b7b: 74 54 je 109bd1 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
109b7d: 85 ff test %edi,%edi
109b7f: 74 50 je 109bd1 <_POSIX_Threads_Initialize_user_threads_body+0x6d><== NEVER TAKEN
109b81: 31 db xor %ebx,%ebx
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
109b83: 8d 75 a4 lea -0x5c(%ebp),%esi
109b86: 83 ec 0c sub $0xc,%esp
109b89: 56 push %esi
109b8a: 89 55 94 mov %edx,-0x6c(%ebp)
109b8d: e8 a2 57 00 00 call 10f334 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
109b92: 5a pop %edx
109b93: 59 pop %ecx
109b94: 6a 02 push $0x2
109b96: 56 push %esi
109b97: e8 c0 57 00 00 call 10f35c <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
109b9c: 59 pop %ecx
109b9d: 58 pop %eax
109b9e: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
109ba2: 56 push %esi
109ba3: e8 e0 57 00 00 call 10f388 <pthread_attr_setstacksize>
status = pthread_create(
109ba8: 6a 00 push $0x0
109baa: ff 34 df pushl (%edi,%ebx,8)
109bad: 56 push %esi
109bae: 8d 45 e4 lea -0x1c(%ebp),%eax
109bb1: 50 push %eax
109bb2: e8 e5 fc ff ff call 10989c <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
109bb7: 83 c4 20 add $0x20,%esp
109bba: 85 c0 test %eax,%eax
109bbc: 8b 55 94 mov -0x6c(%ebp),%edx
109bbf: 74 0b je 109bcc <_POSIX_Threads_Initialize_user_threads_body+0x68>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
109bc1: 52 push %edx
109bc2: 50 push %eax
109bc3: 6a 01 push $0x1
109bc5: 6a 02 push $0x2
109bc7: e8 4c 1a 00 00 call 10b618 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
109bcc: 43 inc %ebx
109bcd: 39 d3 cmp %edx,%ebx
109bcf: 72 b5 jb 109b86 <_POSIX_Threads_Initialize_user_threads_body+0x22><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
109bd1: 8d 65 f4 lea -0xc(%ebp),%esp
109bd4: 5b pop %ebx
109bd5: 5e pop %esi
109bd6: 5f pop %edi
109bd7: c9 leave
109bd8: c3 ret
0010e41f <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
10e41f: 55 push %ebp
10e420: 89 e5 mov %esp,%ebp
10e422: 56 push %esi
10e423: 53 push %ebx
10e424: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e427: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
10e42d: 83 ec 0c sub $0xc,%esp
10e430: 8d 86 98 00 00 00 lea 0x98(%esi),%eax
10e436: 50 push %eax
10e437: e8 0c 12 00 00 call 10f648 <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
10e43c: 89 43 78 mov %eax,0x78(%ebx)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10e43f: 0f b6 05 24 02 12 00 movzbl 0x120224,%eax
10e446: 2b 86 88 00 00 00 sub 0x88(%esi),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
10e44c: 89 43 18 mov %eax,0x18(%ebx)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e44f: 83 c4 10 add $0x10,%esp
10e452: 83 7b 1c 00 cmpl $0x0,0x1c(%ebx)
10e456: 75 12 jne 10e46a <_POSIX_Threads_Sporadic_budget_TSR+0x4b><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
10e458: 39 43 14 cmp %eax,0x14(%ebx)
10e45b: 76 0d jbe 10e46a <_POSIX_Threads_Sporadic_budget_TSR+0x4b>
_Thread_Change_priority( the_thread, new_priority, true );
10e45d: 52 push %edx
10e45e: 6a 01 push $0x1
10e460: 50 push %eax
10e461: 53 push %ebx
10e462: e8 41 ce ff ff call 10b2a8 <_Thread_Change_priority>
10e467: 83 c4 10 add $0x10,%esp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
10e46a: 83 ec 0c sub $0xc,%esp
10e46d: 8d 86 90 00 00 00 lea 0x90(%esi),%eax
10e473: 50 push %eax
10e474: e8 cf 11 00 00 call 10f648 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10e479: 89 86 b4 00 00 00 mov %eax,0xb4(%esi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10e47f: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
10e482: 81 c6 a8 00 00 00 add $0xa8,%esi
10e488: 89 75 0c mov %esi,0xc(%ebp)
10e48b: c7 45 08 a4 43 12 00 movl $0x1243a4,0x8(%ebp)
}
10e492: 8d 65 f8 lea -0x8(%ebp),%esp
10e495: 5b pop %ebx
10e496: 5e pop %esi
10e497: c9 leave
10e498: e9 f7 dd ff ff jmp 10c294 <_Watchdog_Insert>
0010e49d <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
10e49d: 55 push %ebp
10e49e: 89 e5 mov %esp,%ebp
10e4a0: 83 ec 08 sub $0x8,%esp
10e4a3: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e4a6: 8b 88 ec 00 00 00 mov 0xec(%eax),%ecx
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
10e4ac: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
10e4b3: 0f b6 15 24 02 12 00 movzbl 0x120224,%edx
10e4ba: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
10e4c0: 89 50 18 mov %edx,0x18(%eax)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
10e4c3: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10e4c7: 75 12 jne 10e4db <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
10e4c9: 39 50 14 cmp %edx,0x14(%eax)
10e4cc: 73 0d jae 10e4db <_POSIX_Threads_Sporadic_budget_callout+0x3e><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
10e4ce: 51 push %ecx
10e4cf: 6a 01 push $0x1
10e4d1: 52 push %edx
10e4d2: 50 push %eax
10e4d3: e8 d0 cd ff ff call 10b2a8 <_Thread_Change_priority>
10e4d8: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
10e4db: c9 leave
10e4dc: c3 ret
00109924 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
109924: 55 push %ebp
109925: 89 e5 mov %esp,%ebp
109927: 53 push %ebx
109928: 83 ec 04 sub $0x4,%esp
10992b: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10992e: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
109931: 83 7b 54 00 cmpl $0x0,0x54(%ebx)
109935: 75 06 jne 10993d <_POSIX_Timer_TSR+0x19>
109937: 83 7b 58 00 cmpl $0x0,0x58(%ebx)
10993b: 74 34 je 109971 <_POSIX_Timer_TSR+0x4d> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10993d: 83 ec 0c sub $0xc,%esp
109940: 53 push %ebx
109941: 68 24 99 10 00 push $0x109924
109946: ff 73 08 pushl 0x8(%ebx)
109949: ff 73 64 pushl 0x64(%ebx)
10994c: 8d 43 10 lea 0x10(%ebx),%eax
10994f: 50 push %eax
109950: e8 b7 56 00 00 call 10f00c <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
109955: 83 c4 20 add $0x20,%esp
109958: 84 c0 test %al,%al
10995a: 74 30 je 10998c <_POSIX_Timer_TSR+0x68> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10995c: 83 ec 0c sub $0xc,%esp
10995f: 8d 43 6c lea 0x6c(%ebx),%eax
109962: 50 push %eax
109963: e8 c0 12 00 00 call 10ac28 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
109968: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10996c: 83 c4 10 add $0x10,%esp
10996f: eb 04 jmp 109975 <_POSIX_Timer_TSR+0x51>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109971: c6 43 3c 04 movb $0x4,0x3c(%ebx) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
109975: 50 push %eax
109976: 50 push %eax
109977: ff 73 44 pushl 0x44(%ebx)
10997a: ff 73 38 pushl 0x38(%ebx)
10997d: e8 62 52 00 00 call 10ebe4 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
109982: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
109989: 83 c4 10 add $0x10,%esp
}
10998c: 8b 5d fc mov -0x4(%ebp),%ebx
10998f: c9 leave
109990: c3 ret
00110628 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
110628: 55 push %ebp
110629: 89 e5 mov %esp,%ebp
11062b: 57 push %edi
11062c: 56 push %esi
11062d: 53 push %ebx
11062e: 83 ec 68 sub $0x68,%esp
110631: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
110634: 6a 01 push $0x1
110636: 0f b6 45 10 movzbl 0x10(%ebp),%eax
11063a: 50 push %eax
11063b: 8d 45 dc lea -0x24(%ebp),%eax
11063e: 50 push %eax
11063f: 53 push %ebx
110640: ff 75 08 pushl 0x8(%ebp)
110643: e8 8c 00 00 00 call 1106d4 <_POSIX_signals_Clear_signals>
110648: 83 c4 20 add $0x20,%esp
is_global, true ) )
return false;
11064b: 31 c9 xor %ecx,%ecx
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
11064d: 84 c0 test %al,%al
11064f: 74 78 je 1106c9 <_POSIX_signals_Check_signal+0xa1>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
110651: 6b d3 0c imul $0xc,%ebx,%edx
110654: 8b 82 44 48 12 00 mov 0x124844(%edx),%eax
11065a: 83 f8 01 cmp $0x1,%eax
11065d: 74 6a je 1106c9 <_POSIX_signals_Check_signal+0xa1><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11065f: 8b 4d 08 mov 0x8(%ebp),%ecx
110662: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
110668: 89 4d a4 mov %ecx,-0x5c(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
11066b: 0b 8a 40 48 12 00 or 0x124840(%edx),%ecx
110671: 8b 75 08 mov 0x8(%ebp),%esi
110674: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
11067a: 8d 7d b4 lea -0x4c(%ebp),%edi
11067d: 8b 35 08 48 12 00 mov 0x124808,%esi
110683: 83 c6 20 add $0x20,%esi
110686: b9 0a 00 00 00 mov $0xa,%ecx
11068b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
11068d: 83 ba 3c 48 12 00 02 cmpl $0x2,0x12483c(%edx)
110694: 75 09 jne 11069f <_POSIX_signals_Check_signal+0x77>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
110696: 52 push %edx
110697: 6a 00 push $0x0
110699: 8d 55 dc lea -0x24(%ebp),%edx
11069c: 52 push %edx
11069d: eb 03 jmp 1106a2 <_POSIX_signals_Check_signal+0x7a>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
11069f: 83 ec 0c sub $0xc,%esp
1106a2: 53 push %ebx
1106a3: ff d0 call *%eax
break;
1106a5: 83 c4 10 add $0x10,%esp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
1106a8: 8b 3d 08 48 12 00 mov 0x124808,%edi
1106ae: 83 c7 20 add $0x20,%edi
1106b1: 8d 75 b4 lea -0x4c(%ebp),%esi
1106b4: b9 0a 00 00 00 mov $0xa,%ecx
1106b9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
1106bb: 8b 75 a4 mov -0x5c(%ebp),%esi
1106be: 8b 4d 08 mov 0x8(%ebp),%ecx
1106c1: 89 b1 d0 00 00 00 mov %esi,0xd0(%ecx)
return true;
1106c7: b1 01 mov $0x1,%cl
}
1106c9: 88 c8 mov %cl,%al
1106cb: 8d 65 f4 lea -0xc(%ebp),%esp
1106ce: 5b pop %ebx
1106cf: 5e pop %esi
1106d0: 5f pop %edi
1106d1: c9 leave
1106d2: c3 ret
00110c94 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
110c94: 55 push %ebp
110c95: 89 e5 mov %esp,%ebp
110c97: 53 push %ebx
110c98: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
110c9b: 9c pushf
110c9c: fa cli
110c9d: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
110c9e: 6b c1 0c imul $0xc,%ecx,%eax
110ca1: 83 b8 3c 48 12 00 02 cmpl $0x2,0x12483c(%eax)
110ca8: 75 0e jne 110cb8 <_POSIX_signals_Clear_process_signals+0x24>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
110caa: 8d 98 38 4a 12 00 lea 0x124a38(%eax),%ebx
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
110cb0: 39 98 34 4a 12 00 cmp %ebx,0x124a34(%eax)
110cb6: 75 0e jne 110cc6 <_POSIX_signals_Clear_process_signals+0x32><== NEVER TAKEN
110cb8: 49 dec %ecx
110cb9: b8 fe ff ff ff mov $0xfffffffe,%eax
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
110cbe: d3 c0 rol %cl,%eax
110cc0: 21 05 30 4a 12 00 and %eax,0x124a30
}
_ISR_Enable( level );
110cc6: 52 push %edx
110cc7: 9d popf
}
110cc8: 5b pop %ebx
110cc9: c9 leave
110cca: c3 ret
0010a1d8 <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10a1d8: 55 push %ebp
10a1d9: 89 e5 mov %esp,%ebp
10a1db: 56 push %esi
10a1dc: 53 push %ebx
10a1dd: 8b 55 08 mov 0x8(%ebp),%edx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a1e0: b8 1b 00 00 00 mov $0x1b,%eax
10a1e5: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
10a1ea: 8d 48 ff lea -0x1(%eax),%ecx
10a1ed: 89 de mov %ebx,%esi
10a1ef: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a1f1: 85 d6 test %edx,%esi
10a1f3: 75 1e jne 10a213 <_POSIX_signals_Get_lowest+0x3b><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10a1f5: 40 inc %eax
10a1f6: 83 f8 20 cmp $0x20,%eax
10a1f9: 75 ef jne 10a1ea <_POSIX_signals_Get_lowest+0x12>
10a1fb: b0 01 mov $0x1,%al
10a1fd: bb 01 00 00 00 mov $0x1,%ebx
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
10a202: 8d 48 ff lea -0x1(%eax),%ecx
10a205: 89 de mov %ebx,%esi
10a207: d3 e6 shl %cl,%esi
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10a209: 85 d6 test %edx,%esi
10a20b: 75 06 jne 10a213 <_POSIX_signals_Get_lowest+0x3b>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10a20d: 40 inc %eax
10a20e: 83 f8 1b cmp $0x1b,%eax
10a211: 75 ef jne 10a202 <_POSIX_signals_Get_lowest+0x2a><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10a213: 5b pop %ebx
10a214: 5e pop %esi
10a215: c9 leave
10a216: c3 ret
00121ce0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
121ce0: 55 push %ebp
121ce1: 89 e5 mov %esp,%ebp
121ce3: 57 push %edi
121ce4: 56 push %esi
121ce5: 53 push %ebx
121ce6: 83 ec 0c sub $0xc,%esp
121ce9: 8b 5d 08 mov 0x8(%ebp),%ebx
121cec: 8b 75 0c mov 0xc(%ebp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121cef: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
121cf5: 8d 4e ff lea -0x1(%esi),%ecx
121cf8: ba 01 00 00 00 mov $0x1,%edx
121cfd: d3 e2 shl %cl,%edx
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
121cff: 8b 4b 10 mov 0x10(%ebx),%ecx
121d02: 89 cf mov %ecx,%edi
121d04: 81 e7 00 80 00 10 and $0x10008000,%edi
121d0a: 81 ff 00 80 00 10 cmp $0x10008000,%edi
121d10: 75 58 jne 121d6a <_POSIX_signals_Unblock_thread+0x8a>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
121d12: 85 53 30 test %edx,0x30(%ebx)
121d15: 75 12 jne 121d29 <_POSIX_signals_Unblock_thread+0x49>
121d17: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
121d1d: f7 d0 not %eax
/*
* This should only be reached via pthread_kill().
*/
return false;
121d1f: 31 ff xor %edi,%edi
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
121d21: 85 c2 test %eax,%edx
121d23: 0f 84 b0 00 00 00 je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
the_thread->Wait.return_code = EINTR;
121d29: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
121d30: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
121d33: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
121d37: 75 12 jne 121d4b <_POSIX_signals_Unblock_thread+0x6b>
the_info->si_signo = signo;
121d39: 89 30 mov %esi,(%eax)
the_info->si_code = SI_USER;
121d3b: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
121d42: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
121d49: eb 0c jmp 121d57 <_POSIX_signals_Unblock_thread+0x77>
} else {
*the_info = *info;
121d4b: b9 03 00 00 00 mov $0x3,%ecx
121d50: 89 c7 mov %eax,%edi
121d52: 8b 75 10 mov 0x10(%ebp),%esi
121d55: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
121d57: 83 ec 0c sub $0xc,%esp
121d5a: 53 push %ebx
121d5b: e8 98 e6 fe ff call 1103f8 <_Thread_queue_Extract_with_proxy>
return true;
121d60: 83 c4 10 add $0x10,%esp
121d63: bf 01 00 00 00 mov $0x1,%edi
121d68: eb 6f jmp 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
121d6a: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
121d70: f7 d0 not %eax
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
121d72: 31 ff xor %edi,%edi
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
121d74: 85 c2 test %eax,%edx
121d76: 74 61 je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
121d78: f7 c1 00 00 00 10 test $0x10000000,%ecx
121d7e: 74 3d je 121dbd <_POSIX_signals_Unblock_thread+0xdd>
the_thread->Wait.return_code = EINTR;
121d80: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
121d87: f7 c1 e0 be 03 00 test $0x3bee0,%ecx
121d8d: 74 0b je 121d9a <_POSIX_signals_Unblock_thread+0xba>
_Thread_queue_Extract_with_proxy( the_thread );
121d8f: 83 ec 0c sub $0xc,%esp
121d92: 53 push %ebx
121d93: e8 60 e6 fe ff call 1103f8 <_Thread_queue_Extract_with_proxy>
121d98: eb 1e jmp 121db8 <_POSIX_signals_Unblock_thread+0xd8>
else if ( _States_Is_delaying(the_thread->current_state) ) {
121d9a: 80 e1 08 and $0x8,%cl
121d9d: 74 3a je 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
121d9f: 83 ec 0c sub $0xc,%esp
121da2: 8d 43 48 lea 0x48(%ebx),%eax
121da5: 50 push %eax
121da6: e8 5d ed fe ff call 110b08 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
121dab: 58 pop %eax
121dac: 5a pop %edx
121dad: 68 f8 ff 03 10 push $0x1003fff8
121db2: 53 push %ebx
121db3: e8 04 dd fe ff call 10fabc <_Thread_Clear_state>
121db8: 83 c4 10 add $0x10,%esp
121dbb: eb 1c jmp 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
121dbd: 85 c9 test %ecx,%ecx
121dbf: 75 18 jne 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
121dc1: 83 3d 58 a9 12 00 00 cmpl $0x0,0x12a958
121dc8: 74 0f je 121dd9 <_POSIX_signals_Unblock_thread+0xf9>
121dca: 3b 1d 5c a9 12 00 cmp 0x12a95c,%ebx
121dd0: 75 07 jne 121dd9 <_POSIX_signals_Unblock_thread+0xf9><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
121dd2: c6 05 68 a9 12 00 01 movb $0x1,0x12a968
}
}
return false;
}
121dd9: 89 f8 mov %edi,%eax
121ddb: 8d 65 f4 lea -0xc(%ebp),%esp
121dde: 5b pop %ebx
121ddf: 5e pop %esi
121de0: 5f pop %edi
121de1: c9 leave
121de2: c3 ret
0010a978 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10a978: 55 push %ebp
10a979: 89 e5 mov %esp,%ebp
10a97b: 53 push %ebx
10a97c: 83 ec 18 sub $0x18,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
10a97f: 8d 45 f4 lea -0xc(%ebp),%eax
10a982: 50 push %eax
10a983: ff 75 08 pushl 0x8(%ebp)
10a986: 68 fc 72 12 00 push $0x1272fc
10a98b: e8 d0 19 00 00 call 10c360 <_Objects_Get>
10a990: 89 c3 mov %eax,%ebx
switch ( location ) {
10a992: 83 c4 10 add $0x10,%esp
10a995: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10a999: 75 64 jne 10a9ff <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10a99b: 8b 40 40 mov 0x40(%eax),%eax
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10a99e: f6 40 11 40 testb $0x40,0x11(%eax)
10a9a2: 74 18 je 10a9bc <_Rate_monotonic_Timeout+0x44>
10a9a4: 8b 53 08 mov 0x8(%ebx),%edx
10a9a7: 39 50 20 cmp %edx,0x20(%eax)
10a9aa: 75 10 jne 10a9bc <_Rate_monotonic_Timeout+0x44>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10a9ac: 52 push %edx
10a9ad: 52 push %edx
10a9ae: 68 f8 ff 03 10 push $0x1003fff8
10a9b3: 50 push %eax
10a9b4: e8 43 21 00 00 call 10cafc <_Thread_Clear_state>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
10a9b9: 59 pop %ecx
10a9ba: eb 10 jmp 10a9cc <_Rate_monotonic_Timeout+0x54>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
10a9bc: 83 7b 38 01 cmpl $0x1,0x38(%ebx)
10a9c0: 75 2b jne 10a9ed <_Rate_monotonic_Timeout+0x75>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
10a9c2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
_Rate_monotonic_Initiate_statistics( the_period );
10a9c9: 83 ec 0c sub $0xc,%esp
10a9cc: 53 push %ebx
10a9cd: e8 ec fa ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a9d2: 8b 43 3c mov 0x3c(%ebx),%eax
10a9d5: 89 43 1c mov %eax,0x1c(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a9d8: 58 pop %eax
10a9d9: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10a9da: 83 c3 10 add $0x10,%ebx
10a9dd: 53 push %ebx
10a9de: 68 a8 74 12 00 push $0x1274a8
10a9e3: e8 00 31 00 00 call 10dae8 <_Watchdog_Insert>
10a9e8: 83 c4 10 add $0x10,%esp
10a9eb: eb 07 jmp 10a9f4 <_Rate_monotonic_Timeout+0x7c>
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10a9ed: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10a9f4: a1 e8 73 12 00 mov 0x1273e8,%eax
10a9f9: 48 dec %eax
10a9fa: a3 e8 73 12 00 mov %eax,0x1273e8
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10a9ff: 8b 5d fc mov -0x4(%ebp),%ebx
10aa02: c9 leave
10aa03: c3 ret
0010aef0 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10aef0: 55 push %ebp
10aef1: 89 e5 mov %esp,%ebp
10aef3: 56 push %esi
10aef4: 53 push %ebx
10aef5: 8b 55 08 mov 0x8(%ebp),%edx
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10aef8: 8b 8a 8c 00 00 00 mov 0x8c(%edx),%ecx
ready = sched_info->ready_chain;
10aefe: 8b 01 mov (%ecx),%eax
if ( _Chain_Has_only_one_node( ready ) ) {
10af00: 8b 58 08 mov 0x8(%eax),%ebx
10af03: 39 18 cmp %ebx,(%eax)
10af05: 75 32 jne 10af39 <_Scheduler_priority_Block+0x49>
Chain_Node *tail = _Chain_Tail( the_chain );
10af07: 8d 58 04 lea 0x4(%eax),%ebx
10af0a: 89 18 mov %ebx,(%eax)
head->next = tail;
head->previous = NULL;
10af0c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10af13: 89 40 08 mov %eax,0x8(%eax)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10af16: 8b 59 04 mov 0x4(%ecx),%ebx
10af19: 66 8b 03 mov (%ebx),%ax
10af1c: 66 23 41 0e and 0xe(%ecx),%ax
10af20: 66 89 03 mov %ax,(%ebx)
if ( *the_priority_map->minor == 0 )
10af23: 66 85 c0 test %ax,%ax
10af26: 75 1b jne 10af43 <_Scheduler_priority_Block+0x53>
_Priority_Major_bit_map &= the_priority_map->block_major;
10af28: 66 a1 18 48 12 00 mov 0x124818,%ax
10af2e: 23 41 0c and 0xc(%ecx),%eax
10af31: 66 a3 18 48 12 00 mov %ax,0x124818
10af37: eb 0a jmp 10af43 <_Scheduler_priority_Block+0x53>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10af39: 8b 0a mov (%edx),%ecx
previous = the_node->previous;
10af3b: 8b 42 04 mov 0x4(%edx),%eax
next->previous = previous;
10af3e: 89 41 04 mov %eax,0x4(%ecx)
previous->next = next;
10af41: 89 08 mov %ecx,(%eax)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10af43: 3b 15 0c 48 12 00 cmp 0x12480c,%edx
10af49: 75 43 jne 10af8e <_Scheduler_priority_Block+0x9e>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10af4b: 66 8b 35 18 48 12 00 mov 0x124818,%si
10af52: 31 c9 xor %ecx,%ecx
10af54: 89 cb mov %ecx,%ebx
10af56: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10af5a: 0f b7 db movzwl %bx,%ebx
10af5d: 66 8b b4 1b 1c 48 12 mov 0x12481c(%ebx,%ebx,1),%si
10af64: 00
10af65: 66 0f bc ce bsf %si,%cx
return (_Priority_Bits_index( major ) << 4) +
10af69: c1 e3 04 shl $0x4,%ebx
10af6c: 0f b7 c9 movzwl %cx,%ecx
10af6f: 8d 04 0b lea (%ebx,%ecx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10af72: 6b c0 0c imul $0xc,%eax,%eax
10af75: 03 05 50 01 12 00 add 0x120150,%eax
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
10af7b: 8b 18 mov (%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10af7d: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10af80: 31 c9 xor %ecx,%ecx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10af82: 39 c3 cmp %eax,%ebx
10af84: 74 02 je 10af88 <_Scheduler_priority_Block+0x98><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10af86: 89 d9 mov %ebx,%ecx
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10af88: 89 0d 0c 48 12 00 mov %ecx,0x12480c
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10af8e: 3b 15 08 48 12 00 cmp 0x124808,%edx
10af94: 75 07 jne 10af9d <_Scheduler_priority_Block+0xad>
_Thread_Dispatch_necessary = true;
10af96: c6 05 14 48 12 00 01 movb $0x1,0x124814
}
10af9d: 5b pop %ebx
10af9e: 5e pop %esi
10af9f: c9 leave
10afa0: c3 ret
0010b0f0 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
10b0f0: 55 push %ebp
10b0f1: 89 e5 mov %esp,%ebp
10b0f3: 53 push %ebx
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10b0f4: 66 8b 1d 18 48 12 00 mov 0x124818,%bx
10b0fb: 31 d2 xor %edx,%edx
10b0fd: 89 d1 mov %edx,%ecx
10b0ff: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10b103: 0f b7 c9 movzwl %cx,%ecx
10b106: 66 8b 9c 09 1c 48 12 mov 0x12481c(%ecx,%ecx,1),%bx
10b10d: 00
10b10e: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10b112: c1 e1 04 shl $0x4,%ecx
10b115: 0f b7 d2 movzwl %dx,%edx
10b118: 8d 04 11 lea (%ecx,%edx,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10b11b: 6b c0 0c imul $0xc,%eax,%eax
10b11e: 03 05 50 01 12 00 add 0x120150,%eax
_Scheduler_priority_Schedule_body();
}
10b124: 8b 08 mov (%eax),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10b126: 83 c0 04 add $0x4,%eax
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10b129: 31 d2 xor %edx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10b12b: 39 c1 cmp %eax,%ecx
10b12d: 74 02 je 10b131 <_Scheduler_priority_Schedule+0x41><== NEVER TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
10b12f: 89 ca mov %ecx,%edx
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10b131: 89 15 0c 48 12 00 mov %edx,0x12480c
10b137: 5b pop %ebx
10b138: c9 leave
10b139: c3 ret
0010a364 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10a364: 55 push %ebp
10a365: 89 e5 mov %esp,%ebp
10a367: 56 push %esi
10a368: 53 push %ebx
10a369: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
10a36c: 8b 35 54 45 12 00 mov 0x124554,%esi
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10a372: 31 db xor %ebx,%ebx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a374: 85 c9 test %ecx,%ecx
10a376: 74 57 je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10a378: b8 40 42 0f 00 mov $0xf4240,%eax
10a37d: 31 d2 xor %edx,%edx
10a37f: f7 f6 div %esi
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10a381: 39 41 18 cmp %eax,0x18(%ecx)
10a384: 73 49 jae 10a3cf <_TOD_Validate+0x6b>
(the_tod->ticks >= ticks_per_second) ||
10a386: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10a38a: 77 43 ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10a38c: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10a390: 77 3d ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10a392: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10a396: 77 37 ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10a398: 8b 41 04 mov 0x4(%ecx),%eax
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10a39b: 85 c0 test %eax,%eax
10a39d: 74 30 je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->month == 0) ||
10a39f: 83 f8 0c cmp $0xc,%eax
10a3a2: 77 2b ja 10a3cf <_TOD_Validate+0x6b>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a3a4: 8b 31 mov (%ecx),%esi
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10a3a6: 81 fe c3 07 00 00 cmp $0x7c3,%esi
10a3ac: 76 21 jbe 10a3cf <_TOD_Validate+0x6b>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10a3ae: 8b 51 08 mov 0x8(%ecx),%edx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10a3b1: 85 d2 test %edx,%edx
10a3b3: 74 1a je 10a3cf <_TOD_Validate+0x6b> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10a3b5: 83 e6 03 and $0x3,%esi
10a3b8: 75 09 jne 10a3c3 <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10a3ba: 8b 04 85 44 17 12 00 mov 0x121744(,%eax,4),%eax
10a3c1: eb 07 jmp 10a3ca <_TOD_Validate+0x66>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10a3c3: 8b 04 85 10 17 12 00 mov 0x121710(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10a3ca: 39 c2 cmp %eax,%edx
10a3cc: 0f 96 c3 setbe %bl
if ( the_tod->day > days_in_month )
return false;
return true;
}
10a3cf: 88 d8 mov %bl,%al
10a3d1: 5b pop %ebx
10a3d2: 5e pop %esi
10a3d3: c9 leave
10a3d4: c3 ret
0010b2a8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10b2a8: 55 push %ebp
10b2a9: 89 e5 mov %esp,%ebp
10b2ab: 57 push %edi
10b2ac: 56 push %esi
10b2ad: 53 push %ebx
10b2ae: 83 ec 28 sub $0x28,%esp
10b2b1: 8b 5d 08 mov 0x8(%ebp),%ebx
10b2b4: 8b 75 0c mov 0xc(%ebp),%esi
10b2b7: 8a 45 10 mov 0x10(%ebp),%al
10b2ba: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10b2bd: 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 );
10b2c0: 53 push %ebx
10b2c1: e8 62 0b 00 00 call 10be28 <_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 )
10b2c6: 83 c4 10 add $0x10,%esp
10b2c9: 39 73 14 cmp %esi,0x14(%ebx)
10b2cc: 74 0c je 10b2da <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10b2ce: 50 push %eax
10b2cf: 50 push %eax
10b2d0: 56 push %esi
10b2d1: 53 push %ebx
10b2d2: e8 01 0b 00 00 call 10bdd8 <_Thread_Set_priority>
10b2d7: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10b2da: 9c pushf
10b2db: fa cli
10b2dc: 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;
10b2dd: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10b2e0: 83 f8 04 cmp $0x4,%eax
10b2e3: 74 2b je 10b310 <_Thread_Change_priority+0x68>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10b2e5: 83 e7 04 and $0x4,%edi
10b2e8: 75 08 jne 10b2f2 <_Thread_Change_priority+0x4a><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10b2ea: 89 c2 mov %eax,%edx
10b2ec: 83 e2 fb and $0xfffffffb,%edx
10b2ef: 89 53 10 mov %edx,0x10(%ebx)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10b2f2: 56 push %esi
10b2f3: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10b2f4: a9 e0 be 03 00 test $0x3bee0,%eax
10b2f9: 74 65 je 10b360 <_Thread_Change_priority+0xb8>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10b2fb: 89 5d 0c mov %ebx,0xc(%ebp)
10b2fe: 8b 43 44 mov 0x44(%ebx),%eax
10b301: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10b304: 8d 65 f4 lea -0xc(%ebp),%esp
10b307: 5b pop %ebx
10b308: 5e pop %esi
10b309: 5f pop %edi
10b30a: 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 );
10b30b: e9 40 0a 00 00 jmp 10bd50 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10b310: 83 e7 04 and $0x4,%edi
10b313: 75 26 jne 10b33b <_Thread_Change_priority+0x93><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10b315: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10b31c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10b320: 74 0c je 10b32e <_Thread_Change_priority+0x86>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10b322: 83 ec 0c sub $0xc,%esp
10b325: 53 push %ebx
10b326: ff 15 78 01 12 00 call *0x120178
10b32c: eb 0a jmp 10b338 <_Thread_Change_priority+0x90>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10b32e: 83 ec 0c sub $0xc,%esp
10b331: 53 push %ebx
10b332: ff 15 74 01 12 00 call *0x120174
10b338: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10b33b: 56 push %esi
10b33c: 9d popf
10b33d: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10b33e: ff 15 58 01 12 00 call *0x120158
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10b344: a1 08 48 12 00 mov 0x124808,%eax
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
10b349: 3b 05 0c 48 12 00 cmp 0x12480c,%eax
10b34f: 74 0d je 10b35e <_Thread_Change_priority+0xb6>
10b351: 80 78 74 00 cmpb $0x0,0x74(%eax)
10b355: 74 07 je 10b35e <_Thread_Change_priority+0xb6>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10b357: c6 05 14 48 12 00 01 movb $0x1,0x124814
_ISR_Enable( level );
10b35e: 56 push %esi
10b35f: 9d popf
}
10b360: 8d 65 f4 lea -0xc(%ebp),%esp
10b363: 5b pop %ebx
10b364: 5e pop %esi
10b365: 5f pop %edi
10b366: c9 leave
10b367: c3 ret
0010b50c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10b50c: 55 push %ebp
10b50d: 89 e5 mov %esp,%ebp
10b50f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10b512: 8d 45 f4 lea -0xc(%ebp),%eax
10b515: 50 push %eax
10b516: ff 75 08 pushl 0x8(%ebp)
10b519: e8 82 01 00 00 call 10b6a0 <_Thread_Get>
switch ( location ) {
10b51e: 83 c4 10 add $0x10,%esp
10b521: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10b525: 75 1b jne 10b542 <_Thread_Delay_ended+0x36><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10b527: 52 push %edx
10b528: 52 push %edx
10b529: 68 18 00 00 10 push $0x10000018
10b52e: 50 push %eax
10b52f: e8 34 fe ff ff call 10b368 <_Thread_Clear_state>
10b534: a1 e4 42 12 00 mov 0x1242e4,%eax
10b539: 48 dec %eax
10b53a: a3 e4 42 12 00 mov %eax,0x1242e4
10b53f: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10b542: c9 leave
10b543: c3 ret
0010b544 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10b544: 55 push %ebp
10b545: 89 e5 mov %esp,%ebp
10b547: 57 push %edi
10b548: 56 push %esi
10b549: 53 push %ebx
10b54a: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10b54d: 8b 1d 08 48 12 00 mov 0x124808,%ebx
_ISR_Disable( level );
10b553: 9c pushf
10b554: fa cli
10b555: 58 pop %eax
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
10b556: 8d 7d d8 lea -0x28(%ebp),%edi
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b559: e9 f9 00 00 00 jmp 10b657 <_Thread_Dispatch+0x113>
heir = _Thread_Heir;
10b55e: 8b 35 0c 48 12 00 mov 0x12480c,%esi
_Thread_Dispatch_disable_level = 1;
10b564: c7 05 e4 42 12 00 01 movl $0x1,0x1242e4
10b56b: 00 00 00
_Thread_Dispatch_necessary = false;
10b56e: c6 05 14 48 12 00 00 movb $0x0,0x124814
_Thread_Executing = heir;
10b575: 89 35 08 48 12 00 mov %esi,0x124808
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
10b57b: 39 de cmp %ebx,%esi
10b57d: 0f 84 e2 00 00 00 je 10b665 <_Thread_Dispatch+0x121>
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10b583: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10b587: 75 09 jne 10b592 <_Thread_Dispatch+0x4e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10b589: 8b 15 b8 42 12 00 mov 0x1242b8,%edx
10b58f: 89 56 78 mov %edx,0x78(%esi)
_ISR_Enable( level );
10b592: 50 push %eax
10b593: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10b594: 83 ec 0c sub $0xc,%esp
10b597: 8d 45 e0 lea -0x20(%ebp),%eax
10b59a: 50 push %eax
10b59b: e8 e8 3a 00 00 call 10f088 <_TOD_Get_uptime>
_Timestamp_Subtract(
10b5a0: 83 c4 0c add $0xc,%esp
10b5a3: 57 push %edi
10b5a4: 8d 45 e0 lea -0x20(%ebp),%eax
10b5a7: 50 push %eax
10b5a8: 68 90 43 12 00 push $0x124390
10b5ad: e8 76 0a 00 00 call 10c028 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10b5b2: 58 pop %eax
10b5b3: 5a pop %edx
10b5b4: 57 push %edi
10b5b5: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10b5bb: 50 push %eax
10b5bc: e8 37 0a 00 00 call 10bff8 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10b5c1: 8b 45 e0 mov -0x20(%ebp),%eax
10b5c4: 8b 55 e4 mov -0x1c(%ebp),%edx
10b5c7: a3 90 43 12 00 mov %eax,0x124390
10b5cc: 89 15 94 43 12 00 mov %edx,0x124394
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10b5d2: a1 68 43 12 00 mov 0x124368,%eax
10b5d7: 83 c4 10 add $0x10,%esp
10b5da: 85 c0 test %eax,%eax
10b5dc: 74 10 je 10b5ee <_Thread_Dispatch+0xaa> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10b5de: 8b 10 mov (%eax),%edx
10b5e0: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10b5e6: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx
10b5ec: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10b5ee: 51 push %ecx
10b5ef: 51 push %ecx
10b5f0: 56 push %esi
10b5f1: 53 push %ebx
10b5f2: e8 69 0c 00 00 call 10c260 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10b5f7: 58 pop %eax
10b5f8: 5a pop %edx
10b5f9: 81 c6 c8 00 00 00 add $0xc8,%esi
10b5ff: 56 push %esi
10b600: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
10b606: 50 push %eax
10b607: e8 24 0f 00 00 call 10c530 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10b60c: 83 c4 10 add $0x10,%esp
10b60f: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx)
10b616: 74 36 je 10b64e <_Thread_Dispatch+0x10a>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10b618: a1 64 43 12 00 mov 0x124364,%eax
10b61d: 39 c3 cmp %eax,%ebx
10b61f: 74 2d je 10b64e <_Thread_Dispatch+0x10a>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10b621: 85 c0 test %eax,%eax
10b623: 74 11 je 10b636 <_Thread_Dispatch+0xf2>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10b625: 83 ec 0c sub $0xc,%esp
10b628: 05 e0 00 00 00 add $0xe0,%eax
10b62d: 50 push %eax
10b62e: e8 31 0f 00 00 call 10c564 <_CPU_Context_save_fp>
10b633: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10b636: 83 ec 0c sub $0xc,%esp
10b639: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
10b63f: 50 push %eax
10b640: e8 29 0f 00 00 call 10c56e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10b645: 89 1d 64 43 12 00 mov %ebx,0x124364
10b64b: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10b64e: 8b 1d 08 48 12 00 mov 0x124808,%ebx
_ISR_Disable( level );
10b654: 9c pushf
10b655: fa cli
10b656: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10b657: 8a 15 14 48 12 00 mov 0x124814,%dl
10b65d: 84 d2 test %dl,%dl
10b65f: 0f 85 f9 fe ff ff jne 10b55e <_Thread_Dispatch+0x1a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10b665: c7 05 e4 42 12 00 00 movl $0x0,0x1242e4
10b66c: 00 00 00
_ISR_Enable( level );
10b66f: 50 push %eax
10b670: 9d popf
_API_extensions_Run_postswitch();
10b671: e8 35 e8 ff ff call 109eab <_API_extensions_Run_postswitch>
}
10b676: 8d 65 f4 lea -0xc(%ebp),%esp
10b679: 5b pop %ebx
10b67a: 5e pop %esi
10b67b: 5f pop %edi
10b67c: c9 leave
10b67d: c3 ret
00110b48 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
110b48: 55 push %ebp
110b49: 89 e5 mov %esp,%ebp
110b4b: 53 push %ebx
110b4c: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
110b4f: 8b 1d 08 48 12 00 mov 0x124808,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
110b55: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
110b5b: 85 c0 test %eax,%eax
110b5d: 74 03 je 110b62 <_Thread_Handler+0x1a>
110b5f: fa cli
110b60: eb 01 jmp 110b63 <_Thread_Handler+0x1b>
110b62: fb sti
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
110b63: a0 a8 3f 12 00 mov 0x123fa8,%al
110b68: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
110b6b: c6 05 a8 3f 12 00 01 movb $0x1,0x123fa8
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
110b72: 83 bb e0 00 00 00 00 cmpl $0x0,0xe0(%ebx)
110b79: 74 24 je 110b9f <_Thread_Handler+0x57>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
110b7b: a1 64 43 12 00 mov 0x124364,%eax
110b80: 39 c3 cmp %eax,%ebx
110b82: 74 1b je 110b9f <_Thread_Handler+0x57>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
110b84: 85 c0 test %eax,%eax
110b86: 74 11 je 110b99 <_Thread_Handler+0x51>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
110b88: 83 ec 0c sub $0xc,%esp
110b8b: 05 e0 00 00 00 add $0xe0,%eax
110b90: 50 push %eax
110b91: e8 ce b9 ff ff call 10c564 <_CPU_Context_save_fp>
110b96: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
110b99: 89 1d 64 43 12 00 mov %ebx,0x124364
/*
* 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 );
110b9f: 83 ec 0c sub $0xc,%esp
110ba2: 53 push %ebx
110ba3: e8 68 b5 ff ff call 10c110 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
110ba8: e8 d1 aa ff ff call 10b67e <_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) */ {
110bad: 83 c4 10 add $0x10,%esp
110bb0: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
110bb4: 75 05 jne 110bbb <_Thread_Handler+0x73>
INIT_NAME ();
110bb6: e8 35 c7 00 00 call 11d2f0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
110bbb: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
110bc1: 85 c0 test %eax,%eax
110bc3: 75 0b jne 110bd0 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
110bc5: 83 ec 0c sub $0xc,%esp
110bc8: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
110bce: eb 0c jmp 110bdc <_Thread_Handler+0x94>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
110bd0: 48 dec %eax
110bd1: 75 15 jne 110be8 <_Thread_Handler+0xa0> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
110bd3: 83 ec 0c sub $0xc,%esp
110bd6: ff b3 98 00 00 00 pushl 0x98(%ebx)
110bdc: ff 93 90 00 00 00 call *0x90(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
110be2: 89 43 28 mov %eax,0x28(%ebx)
110be5: 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 );
110be8: 83 ec 0c sub $0xc,%esp
110beb: 53 push %ebx
110bec: e8 50 b5 ff ff call 10c141 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
110bf1: 83 c4 0c add $0xc,%esp
110bf4: 6a 05 push $0x5
110bf6: 6a 01 push $0x1
110bf8: 6a 00 push $0x0
110bfa: e8 11 9b ff ff call 10a710 <_Internal_error_Occurred>
0010b714 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10b714: 55 push %ebp
10b715: 89 e5 mov %esp,%ebp
10b717: 57 push %edi
10b718: 56 push %esi
10b719: 53 push %ebx
10b71a: 83 ec 1c sub $0x1c,%esp
10b71d: 8b 5d 0c mov 0xc(%ebp),%ebx
10b720: 8b 4d 10 mov 0x10(%ebp),%ecx
10b723: 8b 75 14 mov 0x14(%ebp),%esi
10b726: 8a 55 18 mov 0x18(%ebp),%dl
10b729: 8a 45 20 mov 0x20(%ebp),%al
10b72c: 88 45 e7 mov %al,-0x19(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10b72f: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10b736: 00 00 00
10b739: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10b740: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10b743: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10b74a: 00 00 00
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
10b74d: 85 c9 test %ecx,%ecx
10b74f: 75 31 jne 10b782 <_Thread_Initialize+0x6e>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10b751: 57 push %edi
10b752: 57 push %edi
10b753: 56 push %esi
10b754: 53 push %ebx
10b755: 88 55 e0 mov %dl,-0x20(%ebp)
10b758: e8 fb 06 00 00 call 10be58 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10b75d: 83 c4 10 add $0x10,%esp
10b760: 39 f0 cmp %esi,%eax
10b762: 8a 55 e0 mov -0x20(%ebp),%dl
10b765: 0f 82 bf 01 00 00 jb 10b92a <_Thread_Initialize+0x216>
10b76b: 85 c0 test %eax,%eax
10b76d: 0f 84 b7 01 00 00 je 10b92a <_Thread_Initialize+0x216><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10b773: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10b779: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx)
10b780: eb 09 jmp 10b78b <_Thread_Initialize+0x77>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10b782: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx)
10b789: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10b78b: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx)
the_stack->size = size;
10b791: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10b797: 31 ff xor %edi,%edi
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10b799: 84 d2 test %dl,%dl
10b79b: 74 17 je 10b7b4 <_Thread_Initialize+0xa0>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10b79d: 83 ec 0c sub $0xc,%esp
10b7a0: 6a 6c push $0x6c
10b7a2: e8 27 0d 00 00 call 10c4ce <_Workspace_Allocate>
10b7a7: 89 c7 mov %eax,%edi
if ( !fp_area )
10b7a9: 83 c4 10 add $0x10,%esp
10b7ac: 85 c0 test %eax,%eax
10b7ae: 0f 84 23 01 00 00 je 10b8d7 <_Thread_Initialize+0x1c3>
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10b7b4: 89 bb e0 00 00 00 mov %edi,0xe0(%ebx)
the_thread->Start.fp_context = fp_area;
10b7ba: 89 bb c0 00 00 00 mov %edi,0xc0(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b7c0: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b7c7: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10b7ce: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10b7d5: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b7dc: a1 74 43 12 00 mov 0x124374,%eax
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10b7e1: 31 f6 xor %esi,%esi
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10b7e3: 85 c0 test %eax,%eax
10b7e5: 74 1d je 10b804 <_Thread_Initialize+0xf0>
extensions_area = _Workspace_Allocate(
10b7e7: 83 ec 0c sub $0xc,%esp
10b7ea: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10b7f1: 50 push %eax
10b7f2: e8 d7 0c 00 00 call 10c4ce <_Workspace_Allocate>
10b7f7: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10b7f9: 83 c4 10 add $0x10,%esp
10b7fc: 85 c0 test %eax,%eax
10b7fe: 0f 84 d5 00 00 00 je 10b8d9 <_Thread_Initialize+0x1c5>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10b804: 89 b3 f0 00 00 00 mov %esi,0xf0(%ebx)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
10b80a: 85 f6 test %esi,%esi
10b80c: 74 16 je 10b824 <_Thread_Initialize+0x110>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10b80e: 8b 15 74 43 12 00 mov 0x124374,%edx
10b814: 31 c0 xor %eax,%eax
10b816: eb 08 jmp 10b820 <_Thread_Initialize+0x10c>
the_thread->extensions[i] = NULL;
10b818: c7 04 86 00 00 00 00 movl $0x0,(%esi,%eax,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10b81f: 40 inc %eax
10b820: 39 d0 cmp %edx,%eax
10b822: 76 f4 jbe 10b818 <_Thread_Initialize+0x104>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10b824: 8a 45 e7 mov -0x19(%ebp),%al
10b827: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10b82d: 8b 45 24 mov 0x24(%ebp),%eax
10b830: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10b836: 8b 45 28 mov 0x28(%ebp),%eax
10b839: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
switch ( budget_algorithm ) {
10b83f: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10b843: 75 08 jne 10b84d <_Thread_Initialize+0x139>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10b845: a1 b8 42 12 00 mov 0x1242b8,%eax
10b84a: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10b84d: 8b 45 2c mov 0x2c(%ebp),%eax
10b850: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10b856: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10b85d: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10b864: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10b86b: 8b 45 1c mov 0x1c(%ebp),%eax
10b86e: 89 43 18 mov %eax,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10b871: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10b877: 83 ec 0c sub $0xc,%esp
10b87a: 53 push %ebx
10b87b: ff 15 68 01 12 00 call *0x120168
10b881: 89 c2 mov %eax,%edx
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10b883: 83 c4 10 add $0x10,%esp
10b886: 85 c0 test %eax,%eax
10b888: 74 51 je 10b8db <_Thread_Initialize+0x1c7>
goto failed;
_Thread_Set_priority( the_thread, priority );
10b88a: 51 push %ecx
10b88b: 51 push %ecx
10b88c: ff 75 1c pushl 0x1c(%ebp)
10b88f: 53 push %ebx
10b890: 89 45 e0 mov %eax,-0x20(%ebp)
10b893: e8 40 05 00 00 call 10bdd8 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10b898: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10b89f: 00 00 00
10b8a2: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10b8a9: 00 00 00
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b8ac: 8b 45 08 mov 0x8(%ebp),%eax
10b8af: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b8b2: 0f b7 4b 08 movzwl 0x8(%ebx),%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b8b6: 89 1c 88 mov %ebx,(%eax,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b8b9: 8b 45 30 mov 0x30(%ebp),%eax
10b8bc: 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 );
10b8bf: 89 1c 24 mov %ebx,(%esp)
10b8c2: e8 e9 08 00 00 call 10c1b0 <_User_extensions_Thread_create>
10b8c7: 88 c1 mov %al,%cl
if ( extension_status )
10b8c9: 83 c4 10 add $0x10,%esp
return true;
10b8cc: b0 01 mov $0x1,%al
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10b8ce: 84 c9 test %cl,%cl
10b8d0: 8b 55 e0 mov -0x20(%ebp),%edx
10b8d3: 74 06 je 10b8db <_Thread_Initialize+0x1c7>
10b8d5: eb 55 jmp 10b92c <_Thread_Initialize+0x218>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10b8d7: 31 f6 xor %esi,%esi
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10b8d9: 31 d2 xor %edx,%edx
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10b8db: 83 ec 0c sub $0xc,%esp
10b8de: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10b8e4: 89 55 e0 mov %edx,-0x20(%ebp)
10b8e7: e8 fb 0b 00 00 call 10c4e7 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10b8ec: 5a pop %edx
10b8ed: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
10b8f3: e8 ef 0b 00 00 call 10c4e7 <_Workspace_Free>
10b8f8: 58 pop %eax
10b8f9: ff b3 ec 00 00 00 pushl 0xec(%ebx)
10b8ff: e8 e3 0b 00 00 call 10c4e7 <_Workspace_Free>
_Workspace_Free( extensions_area );
10b904: 89 34 24 mov %esi,(%esp)
10b907: e8 db 0b 00 00 call 10c4e7 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10b90c: 89 3c 24 mov %edi,(%esp)
10b90f: e8 d3 0b 00 00 call 10c4e7 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10b914: 8b 55 e0 mov -0x20(%ebp),%edx
10b917: 89 14 24 mov %edx,(%esp)
10b91a: e8 c8 0b 00 00 call 10c4e7 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10b91f: 89 1c 24 mov %ebx,(%esp)
10b922: e8 81 05 00 00 call 10bea8 <_Thread_Stack_Free>
return false;
10b927: 83 c4 10 add $0x10,%esp
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
10b92a: 31 c0 xor %eax,%eax
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10b92c: 8d 65 f4 lea -0xc(%ebp),%esp
10b92f: 5b pop %ebx
10b930: 5e pop %esi
10b931: 5f pop %edi
10b932: c9 leave
10b933: c3 ret
0010bf90 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10bf90: 55 push %ebp
10bf91: 89 e5 mov %esp,%ebp
10bf93: 53 push %ebx
10bf94: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10bf97: 8b 1d 08 48 12 00 mov 0x124808,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10bf9d: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10bfa1: 74 4d je 10bff0 <_Thread_Tickle_timeslice+0x60>
return;
if ( !_States_Is_ready( executing->current_state ) )
10bfa3: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10bfa7: 75 47 jne 10bff0 <_Thread_Tickle_timeslice+0x60>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10bfa9: 8b 43 7c mov 0x7c(%ebx),%eax
10bfac: 83 f8 01 cmp $0x1,%eax
10bfaf: 72 3f jb 10bff0 <_Thread_Tickle_timeslice+0x60>
10bfb1: 83 f8 02 cmp $0x2,%eax
10bfb4: 76 07 jbe 10bfbd <_Thread_Tickle_timeslice+0x2d>
10bfb6: 83 f8 03 cmp $0x3,%eax
10bfb9: 75 35 jne 10bff0 <_Thread_Tickle_timeslice+0x60><== NEVER TAKEN
10bfbb: eb 1b jmp 10bfd8 <_Thread_Tickle_timeslice+0x48>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
10bfbd: 8b 43 78 mov 0x78(%ebx),%eax
10bfc0: 48 dec %eax
10bfc1: 89 43 78 mov %eax,0x78(%ebx)
10bfc4: 85 c0 test %eax,%eax
10bfc6: 7f 28 jg 10bff0 <_Thread_Tickle_timeslice+0x60>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10bfc8: ff 15 5c 01 12 00 call *0x12015c
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield( );
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10bfce: a1 b8 42 12 00 mov 0x1242b8,%eax
10bfd3: 89 43 78 mov %eax,0x78(%ebx)
10bfd6: eb 18 jmp 10bff0 <_Thread_Tickle_timeslice+0x60>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10bfd8: 8b 43 78 mov 0x78(%ebx),%eax
10bfdb: 48 dec %eax
10bfdc: 89 43 78 mov %eax,0x78(%ebx)
10bfdf: 85 c0 test %eax,%eax
10bfe1: 75 0d jne 10bff0 <_Thread_Tickle_timeslice+0x60>
(*executing->budget_callout)( executing );
10bfe3: 83 ec 0c sub $0xc,%esp
10bfe6: 53 push %ebx
10bfe7: ff 93 80 00 00 00 call *0x80(%ebx)
10bfed: 83 c4 10 add $0x10,%esp
break;
#endif
}
}
10bff0: 8b 5d fc mov -0x4(%ebp),%ebx
10bff3: c9 leave
10bff4: c3 ret
0010bd50 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10bd50: 55 push %ebp
10bd51: 89 e5 mov %esp,%ebp
10bd53: 57 push %edi
10bd54: 56 push %esi
10bd55: 53 push %ebx
10bd56: 83 ec 1c sub $0x1c,%esp
10bd59: 8b 75 08 mov 0x8(%ebp),%esi
10bd5c: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10bd5f: 85 f6 test %esi,%esi
10bd61: 74 36 je 10bd99 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10bd63: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10bd67: 75 30 jne 10bd99 <_Thread_queue_Requeue+0x49><== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10bd69: 9c pushf
10bd6a: fa cli
10bd6b: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10bd6c: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10bd73: 74 22 je 10bd97 <_Thread_queue_Requeue+0x47><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10bd75: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10bd7c: 50 push %eax
10bd7d: 6a 01 push $0x1
10bd7f: 57 push %edi
10bd80: 56 push %esi
10bd81: e8 9e 37 00 00 call 10f524 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10bd86: 83 c4 0c add $0xc,%esp
10bd89: 8d 45 e4 lea -0x1c(%ebp),%eax
10bd8c: 50 push %eax
10bd8d: 57 push %edi
10bd8e: 56 push %esi
10bd8f: e8 c0 fd ff ff call 10bb54 <_Thread_queue_Enqueue_priority>
10bd94: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10bd97: 53 push %ebx
10bd98: 9d popf
}
}
10bd99: 8d 65 f4 lea -0xc(%ebp),%esp
10bd9c: 5b pop %ebx
10bd9d: 5e pop %esi
10bd9e: 5f pop %edi
10bd9f: c9 leave
10bda0: c3 ret
0010bda4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10bda4: 55 push %ebp
10bda5: 89 e5 mov %esp,%ebp
10bda7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10bdaa: 8d 45 f4 lea -0xc(%ebp),%eax
10bdad: 50 push %eax
10bdae: ff 75 08 pushl 0x8(%ebp)
10bdb1: e8 ea f8 ff ff call 10b6a0 <_Thread_Get>
switch ( location ) {
10bdb6: 83 c4 10 add $0x10,%esp
10bdb9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10bdbd: 75 17 jne 10bdd6 <_Thread_queue_Timeout+0x32><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10bdbf: 83 ec 0c sub $0xc,%esp
10bdc2: 50 push %eax
10bdc3: e8 14 38 00 00 call 10f5dc <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10bdc8: a1 e4 42 12 00 mov 0x1242e4,%eax
10bdcd: 48 dec %eax
10bdce: a3 e4 42 12 00 mov %eax,0x1242e4
10bdd3: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10bdd6: c9 leave
10bdd7: c3 ret
00116084 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
116084: 55 push %ebp
116085: 89 e5 mov %esp,%ebp
116087: 57 push %edi
116088: 56 push %esi
116089: 53 push %ebx
11608a: 83 ec 4c sub $0x4c,%esp
11608d: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
116090: 8d 55 dc lea -0x24(%ebp),%edx
116093: 8d 45 e0 lea -0x20(%ebp),%eax
116096: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
116099: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
1160a0: 89 55 e4 mov %edx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1160a3: 8d 7d d0 lea -0x30(%ebp),%edi
1160a6: 8d 4d d4 lea -0x2c(%ebp),%ecx
1160a9: 89 4d d0 mov %ecx,-0x30(%ebp)
head->previous = NULL;
1160ac: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
1160b3: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160b6: 8d 53 30 lea 0x30(%ebx),%edx
1160b9: 89 55 c0 mov %edx,-0x40(%ebp)
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
1160bc: 8d 73 68 lea 0x68(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
1160bf: 89 45 b4 mov %eax,-0x4c(%ebp)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
1160c2: 8d 45 dc lea -0x24(%ebp),%eax
1160c5: 89 43 78 mov %eax,0x78(%ebx)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
1160c8: a1 c8 d7 13 00 mov 0x13d7c8,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160cd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
1160d0: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d3: 51 push %ecx
1160d4: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
1160d5: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160d7: 50 push %eax
1160d8: ff 75 c0 pushl -0x40(%ebp)
1160db: e8 64 39 00 00 call 119a44 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
1160e0: 8b 15 40 d7 13 00 mov 0x13d740,%edx
1160e6: 89 55 c4 mov %edx,-0x3c(%ebp)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
1160e9: 8b 43 74 mov 0x74(%ebx),%eax
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
1160ec: 83 c4 10 add $0x10,%esp
1160ef: 39 c2 cmp %eax,%edx
1160f1: 76 0d jbe 116100 <_Timer_server_Body+0x7c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160f3: 51 push %ecx
1160f4: 57 push %edi
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
1160f5: 29 c2 sub %eax,%edx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1160f7: 52 push %edx
1160f8: 56 push %esi
1160f9: e8 46 39 00 00 call 119a44 <_Watchdog_Adjust_to_chain>
1160fe: eb 0f jmp 11610f <_Timer_server_Body+0x8b>
} else if ( snapshot < last_snapshot ) {
116100: 73 10 jae 116112 <_Timer_server_Body+0x8e>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
116102: 52 push %edx
} else if ( snapshot < last_snapshot ) {
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
116103: 2b 45 c4 sub -0x3c(%ebp),%eax
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
116106: 50 push %eax
116107: 6a 01 push $0x1
116109: 56 push %esi
11610a: e8 c9 38 00 00 call 1199d8 <_Watchdog_Adjust>
11610f: 83 c4 10 add $0x10,%esp
}
watchdogs->last_snapshot = snapshot;
116112: 8b 45 c4 mov -0x3c(%ebp),%eax
116115: 89 43 74 mov %eax,0x74(%ebx)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
116118: 8b 43 78 mov 0x78(%ebx),%eax
11611b: 83 ec 0c sub $0xc,%esp
11611e: 50 push %eax
11611f: e8 00 09 00 00 call 116a24 <_Chain_Get>
if ( timer == NULL ) {
116124: 83 c4 10 add $0x10,%esp
116127: 85 c0 test %eax,%eax
116129: 74 29 je 116154 <_Timer_server_Body+0xd0><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11612b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11612e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
116131: 75 0b jne 11613e <_Timer_server_Body+0xba><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116133: 51 push %ecx <== NOT EXECUTED
116134: 51 push %ecx <== NOT EXECUTED
116135: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116138: 50 push %eax <== NOT EXECUTED
116139: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED
11613c: eb 0c jmp 11614a <_Timer_server_Body+0xc6><== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11613e: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
116141: 75 d5 jne 116118 <_Timer_server_Body+0x94><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
116143: 52 push %edx <== NOT EXECUTED
116144: 52 push %edx <== NOT EXECUTED
116145: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
116148: 50 push %eax <== NOT EXECUTED
116149: 56 push %esi <== NOT EXECUTED
11614a: e8 7d 39 00 00 call 119acc <_Watchdog_Insert> <== NOT EXECUTED
11614f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
116152: eb c4 jmp 116118 <_Timer_server_Body+0x94><== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
116154: 9c pushf
116155: fa cli
116156: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
116157: 8b 55 b4 mov -0x4c(%ebp),%edx
11615a: 39 55 dc cmp %edx,-0x24(%ebp)
11615d: 75 13 jne 116172 <_Timer_server_Body+0xee><== NEVER TAKEN
ts->insert_chain = NULL;
11615f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
116166: 50 push %eax
116167: 9d popf
116168: 8d 55 d4 lea -0x2c(%ebp),%edx
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
11616b: 39 55 d0 cmp %edx,-0x30(%ebp)
11616e: 75 09 jne 116179 <_Timer_server_Body+0xf5>
116170: eb 49 jmp 1161bb <_Timer_server_Body+0x137>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
116172: 50 push %eax <== NOT EXECUTED
116173: 9d popf <== NOT EXECUTED
116174: e9 4f ff ff ff jmp 1160c8 <_Timer_server_Body+0x44><== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
116179: 9c pushf
11617a: fa cli
11617b: 8f 45 c4 popl -0x3c(%ebp)
initialized = false;
}
#endif
return status;
}
11617e: 8b 45 d0 mov -0x30(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
116181: 39 d0 cmp %edx,%eax
116183: 74 2d je 1161b2 <_Timer_server_Body+0x12e>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
116185: 8b 08 mov (%eax),%ecx
head->next = new_first;
116187: 89 4d d0 mov %ecx,-0x30(%ebp)
new_first->previous = head;
11618a: 89 79 04 mov %edi,0x4(%ecx)
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
11618d: 85 c0 test %eax,%eax
11618f: 74 21 je 1161b2 <_Timer_server_Body+0x12e><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
116191: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
116198: ff 75 c4 pushl -0x3c(%ebp)
11619b: 9d popf
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
11619c: 51 push %ecx
11619d: 51 push %ecx
11619e: ff 70 24 pushl 0x24(%eax)
1161a1: ff 70 20 pushl 0x20(%eax)
1161a4: 89 55 bc mov %edx,-0x44(%ebp)
1161a7: ff 50 1c call *0x1c(%eax)
}
1161aa: 83 c4 10 add $0x10,%esp
1161ad: 8b 55 bc mov -0x44(%ebp),%edx
1161b0: eb c7 jmp 116179 <_Timer_server_Body+0xf5>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
1161b2: ff 75 c4 pushl -0x3c(%ebp)
1161b5: 9d popf
1161b6: e9 07 ff ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
1161bb: c6 43 7c 00 movb $0x0,0x7c(%ebx)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
1161bf: e8 24 fe ff ff call 115fe8 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
1161c4: 51 push %ecx
1161c5: 51 push %ecx
1161c6: 6a 08 push $0x8
1161c8: ff 33 pushl (%ebx)
1161ca: e8 e5 32 00 00 call 1194b4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1161cf: 89 d8 mov %ebx,%eax
1161d1: e8 22 fe ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
1161d6: 89 d8 mov %ebx,%eax
1161d8: e8 61 fe ff ff call 11603e <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1161dd: e8 dc 2a 00 00 call 118cbe <_Thread_Enable_dispatch>
ts->active = true;
1161e2: c6 43 7c 01 movb $0x1,0x7c(%ebx)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
1161e6: 8d 43 08 lea 0x8(%ebx),%eax
1161e9: 89 04 24 mov %eax,(%esp)
1161ec: e8 fb 39 00 00 call 119bec <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1161f1: 8d 43 40 lea 0x40(%ebx),%eax
1161f4: 89 04 24 mov %eax,(%esp)
1161f7: e8 f0 39 00 00 call 119bec <_Watchdog_Remove>
1161fc: 83 c4 10 add $0x10,%esp
1161ff: e9 be fe ff ff jmp 1160c2 <_Timer_server_Body+0x3e>
00116204 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
116204: 55 push %ebp
116205: 89 e5 mov %esp,%ebp
116207: 57 push %edi
116208: 56 push %esi
116209: 53 push %ebx
11620a: 83 ec 2c sub $0x2c,%esp
11620d: 8b 5d 08 mov 0x8(%ebp),%ebx
116210: 8b 75 0c mov 0xc(%ebp),%esi
if ( ts->insert_chain == NULL ) {
116213: 8b 43 78 mov 0x78(%ebx),%eax
116216: 85 c0 test %eax,%eax
116218: 0f 85 de 00 00 00 jne 1162fc <_Timer_server_Schedule_operation_method+0xf8><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
11621e: e8 c5 fd ff ff call 115fe8 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
116223: 8b 46 38 mov 0x38(%esi),%eax
116226: 83 f8 01 cmp $0x1,%eax
116229: 75 5a jne 116285 <_Timer_server_Schedule_operation_method+0x81>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11622b: 9c pushf
11622c: fa cli
11622d: 8f 45 e0 popl -0x20(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
116230: 8b 15 c8 d7 13 00 mov 0x13d7c8,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
116236: 8b 4b 3c mov 0x3c(%ebx),%ecx
initialized = false;
}
#endif
return status;
}
116239: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11623c: 8d 7b 34 lea 0x34(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
11623f: 39 f8 cmp %edi,%eax
116241: 74 19 je 11625c <_Timer_server_Schedule_operation_method+0x58>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
116243: 89 d7 mov %edx,%edi
116245: 29 cf sub %ecx,%edi
116247: 89 7d e4 mov %edi,-0x1c(%ebp)
delta_interval = first_watchdog->delta_interval;
11624a: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11624d: 31 c9 xor %ecx,%ecx
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
11624f: 3b 7d e4 cmp -0x1c(%ebp),%edi
116252: 76 05 jbe 116259 <_Timer_server_Schedule_operation_method+0x55>
delta_interval -= delta;
116254: 89 f9 mov %edi,%ecx
116256: 2b 4d e4 sub -0x1c(%ebp),%ecx
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
116259: 89 48 10 mov %ecx,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11625c: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11625f: ff 75 e0 pushl -0x20(%ebp)
116262: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
116263: 50 push %eax
116264: 50 push %eax
116265: 83 c6 10 add $0x10,%esi
116268: 56 push %esi
116269: 8d 43 30 lea 0x30(%ebx),%eax
11626c: 50 push %eax
11626d: e8 5a 38 00 00 call 119acc <_Watchdog_Insert>
if ( !ts->active ) {
116272: 8a 43 7c mov 0x7c(%ebx),%al
116275: 83 c4 10 add $0x10,%esp
116278: 84 c0 test %al,%al
11627a: 75 74 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_interval_system_watchdog( ts );
11627c: 89 d8 mov %ebx,%eax
11627e: e8 75 fd ff ff call 115ff8 <_Timer_server_Reset_interval_system_watchdog>
116283: eb 6b jmp 1162f0 <_Timer_server_Schedule_operation_method+0xec>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
116285: 83 f8 03 cmp $0x3,%eax
116288: 75 66 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11628a: 9c pushf
11628b: fa cli
11628c: 8f 45 e0 popl -0x20(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11628f: 8b 15 40 d7 13 00 mov 0x13d740,%edx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
116295: 8b 43 74 mov 0x74(%ebx),%eax
initialized = false;
}
#endif
return status;
}
116298: 8b 4b 68 mov 0x68(%ebx),%ecx
11629b: 8d 7b 6c lea 0x6c(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
11629e: 39 f9 cmp %edi,%ecx
1162a0: 74 27 je 1162c9 <_Timer_server_Schedule_operation_method+0xc5>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
1162a2: 8b 79 10 mov 0x10(%ecx),%edi
1162a5: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
1162a8: 39 c2 cmp %eax,%edx
1162aa: 76 15 jbe 1162c1 <_Timer_server_Schedule_operation_method+0xbd>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
1162ac: 89 d7 mov %edx,%edi
1162ae: 29 c7 sub %eax,%edi
1162b0: 89 7d e4 mov %edi,-0x1c(%ebp)
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1162b3: 31 c0 xor %eax,%eax
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
1162b5: 39 7d d4 cmp %edi,-0x2c(%ebp)
1162b8: 76 0c jbe 1162c6 <_Timer_server_Schedule_operation_method+0xc2><== NEVER TAKEN
delta_interval -= delta;
1162ba: 8b 45 d4 mov -0x2c(%ebp),%eax
1162bd: 29 f8 sub %edi,%eax
1162bf: eb 05 jmp 1162c6 <_Timer_server_Schedule_operation_method+0xc2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1162c1: 03 45 d4 add -0x2c(%ebp),%eax
delta_interval += delta;
1162c4: 29 d0 sub %edx,%eax
}
first_watchdog->delta_interval = delta_interval;
1162c6: 89 41 10 mov %eax,0x10(%ecx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
1162c9: 89 53 74 mov %edx,0x74(%ebx)
_ISR_Enable( level );
1162cc: ff 75 e0 pushl -0x20(%ebp)
1162cf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1162d0: 57 push %edi
1162d1: 57 push %edi
1162d2: 83 c6 10 add $0x10,%esi
1162d5: 56 push %esi
1162d6: 8d 43 68 lea 0x68(%ebx),%eax
1162d9: 50 push %eax
1162da: e8 ed 37 00 00 call 119acc <_Watchdog_Insert>
if ( !ts->active ) {
1162df: 8a 43 7c mov 0x7c(%ebx),%al
1162e2: 83 c4 10 add $0x10,%esp
1162e5: 84 c0 test %al,%al
1162e7: 75 07 jne 1162f0 <_Timer_server_Schedule_operation_method+0xec>
_Timer_server_Reset_tod_system_watchdog( ts );
1162e9: 89 d8 mov %ebx,%eax
1162eb: e8 4e fd ff ff call 11603e <_Timer_server_Reset_tod_system_watchdog>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
1162f0: 8d 65 f4 lea -0xc(%ebp),%esp
1162f3: 5b pop %ebx
1162f4: 5e pop %esi
1162f5: 5f pop %edi
1162f6: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
1162f7: e9 c2 29 00 00 jmp 118cbe <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
1162fc: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
1162ff: 89 75 0c mov %esi,0xc(%ebp) <== NOT EXECUTED
116302: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED
}
}
116305: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
116308: 5b pop %ebx <== NOT EXECUTED
116309: 5e pop %esi <== NOT EXECUTED
11630a: 5f pop %edi <== NOT EXECUTED
11630b: c9 leave <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11630c: e9 d7 06 00 00 jmp 1169e8 <_Chain_Append> <== NOT EXECUTED
0010c173 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c173: 55 push %ebp
10c174: 89 e5 mov %esp,%ebp
10c176: 57 push %edi
10c177: 56 push %esi
10c178: 53 push %ebx
10c179: 83 ec 0c sub $0xc,%esp
10c17c: 8b 7d 10 mov 0x10(%ebp),%edi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10c17f: 8b 1d b4 44 12 00 mov 0x1244b4,%ebx
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10c185: 0f b6 75 0c movzbl 0xc(%ebp),%esi
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10c189: eb 15 jmp 10c1a0 <_User_extensions_Fatal+0x2d>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10c18b: 8b 43 30 mov 0x30(%ebx),%eax
10c18e: 85 c0 test %eax,%eax
10c190: 74 0b je 10c19d <_User_extensions_Fatal+0x2a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10c192: 52 push %edx
10c193: 57 push %edi
10c194: 56 push %esi
10c195: ff 75 08 pushl 0x8(%ebp)
10c198: ff d0 call *%eax
10c19a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10c19d: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10c1a0: 81 fb ac 44 12 00 cmp $0x1244ac,%ebx
10c1a6: 75 e3 jne 10c18b <_User_extensions_Fatal+0x18><== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10c1a8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c1ab: 5b pop %ebx <== NOT EXECUTED
10c1ac: 5e pop %esi <== NOT EXECUTED
10c1ad: 5f pop %edi <== NOT EXECUTED
10c1ae: c9 leave <== NOT EXECUTED
10c1af: c3 ret <== NOT EXECUTED
0010c05c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10c05c: 55 push %ebp
10c05d: 89 e5 mov %esp,%ebp
10c05f: 57 push %edi
10c060: 56 push %esi
10c061: 53 push %ebx
10c062: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10c065: a1 60 02 12 00 mov 0x120260,%eax
10c06a: 89 45 e4 mov %eax,-0x1c(%ebp)
initial_extensions = Configuration.User_extension_table;
10c06d: 8b 35 64 02 12 00 mov 0x120264,%esi
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c073: c7 05 ac 44 12 00 b0 movl $0x1244b0,0x1244ac
10c07a: 44 12 00
head->previous = NULL;
10c07d: c7 05 b0 44 12 00 00 movl $0x0,0x1244b0
10c084: 00 00 00
tail->previous = head;
10c087: c7 05 b4 44 12 00 ac movl $0x1244ac,0x1244b4
10c08e: 44 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c091: c7 05 e8 42 12 00 ec movl $0x1242ec,0x1242e8
10c098: 42 12 00
head->previous = NULL;
10c09b: c7 05 ec 42 12 00 00 movl $0x0,0x1242ec
10c0a2: 00 00 00
tail->previous = head;
10c0a5: c7 05 f0 42 12 00 e8 movl $0x1242e8,0x1242f0
10c0ac: 42 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10c0af: 85 f6 test %esi,%esi
10c0b1: 74 53 je 10c106 <_User_extensions_Handler_initialization+0xaa><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10c0b3: 6b c8 34 imul $0x34,%eax,%ecx
10c0b6: 83 ec 0c sub $0xc,%esp
10c0b9: 51 push %ecx
10c0ba: 89 4d e0 mov %ecx,-0x20(%ebp)
10c0bd: e8 3d 04 00 00 call 10c4ff <_Workspace_Allocate_or_fatal_error>
10c0c2: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10c0c4: 31 c0 xor %eax,%eax
10c0c6: 8b 4d e0 mov -0x20(%ebp),%ecx
10c0c9: 89 df mov %ebx,%edi
10c0cb: f3 aa rep stos %al,%es:(%edi)
10c0cd: 89 f0 mov %esi,%eax
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c0cf: 83 c4 10 add $0x10,%esp
10c0d2: 31 d2 xor %edx,%edx
10c0d4: eb 2b jmp 10c101 <_User_extensions_Handler_initialization+0xa5>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10c0d6: 8d 7b 14 lea 0x14(%ebx),%edi
10c0d9: 89 c6 mov %eax,%esi
10c0db: b9 08 00 00 00 mov $0x8,%ecx
10c0e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10c0e2: 83 ec 0c sub $0xc,%esp
10c0e5: 53 push %ebx
10c0e6: 89 45 dc mov %eax,-0x24(%ebp)
10c0e9: 89 55 e0 mov %edx,-0x20(%ebp)
10c0ec: e8 97 35 00 00 call 10f688 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10c0f1: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10c0f4: 8b 55 e0 mov -0x20(%ebp),%edx
10c0f7: 42 inc %edx
10c0f8: 8b 45 dc mov -0x24(%ebp),%eax
10c0fb: 83 c0 20 add $0x20,%eax
10c0fe: 83 c4 10 add $0x10,%esp
10c101: 3b 55 e4 cmp -0x1c(%ebp),%edx
10c104: 72 d0 jb 10c0d6 <_User_extensions_Handler_initialization+0x7a>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10c106: 8d 65 f4 lea -0xc(%ebp),%esp
10c109: 5b pop %ebx
10c10a: 5e pop %esi
10c10b: 5f pop %edi
10c10c: c9 leave
10c10d: c3 ret
0010d910 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
10d910: 55 push %ebp
10d911: 89 e5 mov %esp,%ebp
10d913: 57 push %edi
10d914: 56 push %esi
10d915: 53 push %ebx
10d916: 83 ec 1c sub $0x1c,%esp
10d919: 8b 75 08 mov 0x8(%ebp),%esi
10d91c: 8b 7d 0c mov 0xc(%ebp),%edi
10d91f: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
10d922: 9c pushf
10d923: fa cli
10d924: 58 pop %eax
}
}
_ISR_Enable( level );
}
10d925: 8b 16 mov (%esi),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d927: 8d 4e 04 lea 0x4(%esi),%ecx
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
10d92a: 39 ca cmp %ecx,%edx
10d92c: 74 44 je 10d972 <_Watchdog_Adjust+0x62>
switch ( direction ) {
10d92e: 85 ff test %edi,%edi
10d930: 74 3c je 10d96e <_Watchdog_Adjust+0x5e>
10d932: 4f dec %edi
10d933: 75 3d jne 10d972 <_Watchdog_Adjust+0x62> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
10d935: 01 5a 10 add %ebx,0x10(%edx)
break;
10d938: eb 38 jmp 10d972 <_Watchdog_Adjust+0x62>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10d93a: 8b 16 mov (%esi),%edx
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
10d93c: 8b 7a 10 mov 0x10(%edx),%edi
10d93f: 39 fb cmp %edi,%ebx
10d941: 73 07 jae 10d94a <_Watchdog_Adjust+0x3a>
_Watchdog_First( header )->delta_interval -= units;
10d943: 29 df sub %ebx,%edi
10d945: 89 7a 10 mov %edi,0x10(%edx)
break;
10d948: eb 28 jmp 10d972 <_Watchdog_Adjust+0x62>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
10d94a: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
10d951: 50 push %eax
10d952: 9d popf
_Watchdog_Tickle( header );
10d953: 83 ec 0c sub $0xc,%esp
10d956: 56 push %esi
10d957: 89 4d e4 mov %ecx,-0x1c(%ebp)
10d95a: e8 a5 01 00 00 call 10db04 <_Watchdog_Tickle>
_ISR_Disable( level );
10d95f: 9c pushf
10d960: fa cli
10d961: 58 pop %eax
if ( _Chain_Is_empty( header ) )
10d962: 83 c4 10 add $0x10,%esp
10d965: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d968: 39 0e cmp %ecx,(%esi)
10d96a: 74 06 je 10d972 <_Watchdog_Adjust+0x62>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
10d96c: 29 fb sub %edi,%ebx
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
10d96e: 85 db test %ebx,%ebx
10d970: 75 c8 jne 10d93a <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
10d972: 50 push %eax
10d973: 9d popf
}
10d974: 8d 65 f4 lea -0xc(%ebp),%esp
10d977: 5b pop %ebx
10d978: 5e pop %esi
10d979: 5f pop %edi
10d97a: c9 leave
10d97b: c3 ret
0010c3b4 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10c3b4: 55 push %ebp
10c3b5: 89 e5 mov %esp,%ebp
10c3b7: 56 push %esi
10c3b8: 53 push %ebx
10c3b9: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10c3bc: 9c pushf
10c3bd: fa cli
10c3be: 5e pop %esi
previous_state = the_watchdog->state;
10c3bf: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10c3c2: 83 f8 01 cmp $0x1,%eax
10c3c5: 74 09 je 10c3d0 <_Watchdog_Remove+0x1c>
10c3c7: 72 42 jb 10c40b <_Watchdog_Remove+0x57>
10c3c9: 83 f8 03 cmp $0x3,%eax
10c3cc: 77 3d ja 10c40b <_Watchdog_Remove+0x57> <== NEVER TAKEN
10c3ce: eb 09 jmp 10c3d9 <_Watchdog_Remove+0x25>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10c3d0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10c3d7: eb 32 jmp 10c40b <_Watchdog_Remove+0x57>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10c3d9: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
10c3e0: 8b 0a mov (%edx),%ecx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10c3e2: 83 39 00 cmpl $0x0,(%ecx)
10c3e5: 74 06 je 10c3ed <_Watchdog_Remove+0x39>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10c3e7: 8b 5a 10 mov 0x10(%edx),%ebx
10c3ea: 01 59 10 add %ebx,0x10(%ecx)
if ( _Watchdog_Sync_count )
10c3ed: 8b 1d f0 43 12 00 mov 0x1243f0,%ebx
10c3f3: 85 db test %ebx,%ebx
10c3f5: 74 0c je 10c403 <_Watchdog_Remove+0x4f>
_Watchdog_Sync_level = _ISR_Nest_level;
10c3f7: 8b 1d 04 48 12 00 mov 0x124804,%ebx
10c3fd: 89 1d 88 43 12 00 mov %ebx,0x124388
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c403: 8b 5a 04 mov 0x4(%edx),%ebx
next->previous = previous;
10c406: 89 59 04 mov %ebx,0x4(%ecx)
previous->next = next;
10c409: 89 0b mov %ecx,(%ebx)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10c40b: 8b 0d f4 43 12 00 mov 0x1243f4,%ecx
10c411: 89 4a 18 mov %ecx,0x18(%edx)
_ISR_Enable( level );
10c414: 56 push %esi
10c415: 9d popf
return( previous_state );
}
10c416: 5b pop %ebx
10c417: 5e pop %esi
10c418: c9 leave
10c419: c3 ret
0010d4e0 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10d4e0: 55 push %ebp
10d4e1: 89 e5 mov %esp,%ebp
10d4e3: 57 push %edi
10d4e4: 56 push %esi
10d4e5: 53 push %ebx
10d4e6: 83 ec 20 sub $0x20,%esp
10d4e9: 8b 7d 08 mov 0x8(%ebp),%edi
10d4ec: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10d4ef: 9c pushf
10d4f0: fa cli
10d4f1: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10d4f4: 56 push %esi
10d4f5: 57 push %edi
10d4f6: 68 b0 12 12 00 push $0x1212b0
10d4fb: e8 5c ac ff ff call 10815c <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10d500: 8b 1e mov (%esi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d502: 83 c6 04 add $0x4,%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
10d505: 83 c4 10 add $0x10,%esp
10d508: 39 f3 cmp %esi,%ebx
10d50a: 74 1d je 10d529 <_Watchdog_Report_chain+0x49>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10d50c: 52 push %edx
10d50d: 52 push %edx
10d50e: 53 push %ebx
10d50f: 6a 00 push $0x0
10d511: e8 32 00 00 00 call 10d548 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10d516: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
10d518: 83 c4 10 add $0x10,%esp
10d51b: 39 f3 cmp %esi,%ebx
10d51d: 75 ed jne 10d50c <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10d51f: 50 push %eax
10d520: 50 push %eax
10d521: 57 push %edi
10d522: 68 c7 12 12 00 push $0x1212c7
10d527: eb 08 jmp 10d531 <_Watchdog_Report_chain+0x51>
} else {
printk( "Chain is empty\n" );
10d529: 83 ec 0c sub $0xc,%esp
10d52c: 68 d6 12 12 00 push $0x1212d6
10d531: e8 26 ac ff ff call 10815c <printk>
10d536: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10d539: ff 75 e4 pushl -0x1c(%ebp)
10d53c: 9d popf
}
10d53d: 8d 65 f4 lea -0xc(%ebp),%esp
10d540: 5b pop %ebx
10d541: 5e pop %esi
10d542: 5f pop %edi
10d543: c9 leave
10d544: c3 ret
0010c41c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10c41c: 55 push %ebp
10c41d: 89 e5 mov %esp,%ebp
10c41f: 57 push %edi
10c420: 56 push %esi
10c421: 53 push %ebx
10c422: 83 ec 1c sub $0x1c,%esp
10c425: 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 );
10c428: 9c pushf
10c429: fa cli
10c42a: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c42b: 8b 1f mov (%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c42d: 8d 47 04 lea 0x4(%edi),%eax
10c430: 89 45 e4 mov %eax,-0x1c(%ebp)
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
10c433: 39 c3 cmp %eax,%ebx
10c435: 74 40 je 10c477 <_Watchdog_Tickle+0x5b>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10c437: 8b 43 10 mov 0x10(%ebx),%eax
10c43a: 85 c0 test %eax,%eax
10c43c: 74 08 je 10c446 <_Watchdog_Tickle+0x2a>
the_watchdog->delta_interval--;
10c43e: 48 dec %eax
10c43f: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10c442: 85 c0 test %eax,%eax
10c444: 75 31 jne 10c477 <_Watchdog_Tickle+0x5b>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10c446: 83 ec 0c sub $0xc,%esp
10c449: 53 push %ebx
10c44a: e8 65 ff ff ff call 10c3b4 <_Watchdog_Remove>
_ISR_Enable( level );
10c44f: 56 push %esi
10c450: 9d popf
switch( watchdog_state ) {
10c451: 83 c4 10 add $0x10,%esp
10c454: 83 f8 02 cmp $0x2,%eax
10c457: 75 0e jne 10c467 <_Watchdog_Tickle+0x4b> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10c459: 50 push %eax
10c45a: 50 push %eax
10c45b: ff 73 24 pushl 0x24(%ebx)
10c45e: ff 73 20 pushl 0x20(%ebx)
10c461: ff 53 1c call *0x1c(%ebx)
the_watchdog->id,
the_watchdog->user_data
);
break;
10c464: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10c467: 9c pushf
10c468: fa cli
10c469: 5e pop %esi
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
10c46a: 8b 1f mov (%edi),%ebx
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10c46c: 3b 5d e4 cmp -0x1c(%ebp),%ebx
10c46f: 74 06 je 10c477 <_Watchdog_Tickle+0x5b>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10c471: 83 7b 10 00 cmpl $0x0,0x10(%ebx)
10c475: eb cd jmp 10c444 <_Watchdog_Tickle+0x28>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10c477: 56 push %esi
10c478: 9d popf
}
10c479: 8d 65 f4 lea -0xc(%ebp),%esp
10c47c: 5b pop %ebx
10c47d: 5e pop %esi
10c47e: 5f pop %edi
10c47f: c9 leave
10c480: c3 ret
00109e38 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
109e38: 55 push %ebp
109e39: 89 e5 mov %esp,%ebp
109e3b: 57 push %edi
109e3c: 56 push %esi
109e3d: 53 push %ebx
109e3e: 83 ec 18 sub $0x18,%esp
109e41: 8b 75 08 mov 0x8(%ebp),%esi
109e44: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
109e47: 68 60 72 12 00 push $0x127260
109e4c: e8 2f 10 00 00 call 10ae80 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
109e51: 5f pop %edi
109e52: 58 pop %eax
109e53: 6a 01 push $0x1
109e55: 56 push %esi
109e56: e8 6d 60 00 00 call 10fec8 <fcntl>
109e5b: 83 c4 10 add $0x10,%esp
109e5e: 85 c0 test %eax,%eax
109e60: 79 1d jns 109e7f <aio_cancel+0x47>
pthread_mutex_unlock(&aio_request_queue.mutex);
109e62: 83 ec 0c sub $0xc,%esp
109e65: 68 60 72 12 00 push $0x127260
109e6a: e8 91 10 00 00 call 10af00 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
109e6f: e8 b0 93 00 00 call 113224 <__errno>
109e74: c7 00 09 00 00 00 movl $0x9,(%eax)
109e7a: e9 e3 00 00 00 jmp 109f62 <aio_cancel+0x12a>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
109e7f: 85 db test %ebx,%ebx
109e81: 0f 85 bd 00 00 00 jne 109f44 <aio_cancel+0x10c>
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109e87: 51 push %ecx
109e88: 6a 00 push $0x0
109e8a: 56 push %esi
109e8b: 68 a8 72 12 00 push $0x1272a8
109e90: e8 27 03 00 00 call 10a1bc <rtems_aio_search_fd>
109e95: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109e97: 83 c4 10 add $0x10,%esp
109e9a: 85 c0 test %eax,%eax
109e9c: 75 6c jne 109f0a <aio_cancel+0xd2>
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109e9e: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
109ea5: 72 12 00
109ea8: 0f 84 07 01 00 00 je 109fb5 <aio_cancel+0x17d> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109eae: 52 push %edx
109eaf: 6a 00 push $0x0
109eb1: 56 push %esi
109eb2: 68 b4 72 12 00 push $0x1272b4
109eb7: e8 00 03 00 00 call 10a1bc <rtems_aio_search_fd>
109ebc: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
109ebe: 83 c4 10 add $0x10,%esp
109ec1: 85 c0 test %eax,%eax
109ec3: 75 17 jne 109edc <aio_cancel+0xa4>
pthread_mutex_unlock(&aio_request_queue.mutex);
109ec5: 83 ec 0c sub $0xc,%esp
109ec8: 68 60 72 12 00 push $0x127260
109ecd: e8 2e 10 00 00 call 10af00 <pthread_mutex_unlock>
return AIO_ALLDONE;
109ed2: 83 c4 10 add $0x10,%esp
109ed5: b3 02 mov $0x2,%bl
109ed7: e9 21 01 00 00 jmp 109ffd <aio_cancel+0x1c5>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
109edc: 83 ec 0c sub $0xc,%esp
109edf: 50 push %eax
109ee0: e8 57 26 00 00 call 10c53c <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109ee5: 89 1c 24 mov %ebx,(%esp)
109ee8: e8 12 06 00 00 call 10a4ff <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
109eed: 8d 73 1c lea 0x1c(%ebx),%esi
109ef0: 89 34 24 mov %esi,(%esp)
109ef3: e8 68 0d 00 00 call 10ac60 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
109ef8: 89 34 24 mov %esi,(%esp)
109efb: e8 6c 0a 00 00 call 10a96c <pthread_cond_destroy>
free (r_chain);
109f00: 89 1c 24 mov %ebx,(%esp)
109f03: e8 88 d4 ff ff call 107390 <free>
109f08: eb 24 jmp 109f2e <aio_cancel+0xf6>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109f0a: 8d 70 1c lea 0x1c(%eax),%esi
109f0d: 83 ec 0c sub $0xc,%esp
109f10: 56 push %esi
109f11: e8 6a 0f 00 00 call 10ae80 <pthread_mutex_lock>
109f16: 89 1c 24 mov %ebx,(%esp)
109f19: e8 1e 26 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
109f1e: 89 1c 24 mov %ebx,(%esp)
109f21: e8 d9 05 00 00 call 10a4ff <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
109f26: 89 34 24 mov %esi,(%esp)
109f29: e8 d2 0f 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109f2e: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
109f35: e8 c6 0f 00 00 call 10af00 <pthread_mutex_unlock>
return AIO_CANCELED;
109f3a: 83 c4 10 add $0x10,%esp
109f3d: 31 db xor %ebx,%ebx
109f3f: e9 b9 00 00 00 jmp 109ffd <aio_cancel+0x1c5>
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
109f44: 8b 3b mov (%ebx),%edi
109f46: 39 f7 cmp %esi,%edi
109f48: 74 23 je 109f6d <aio_cancel+0x135> <== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
109f4a: 83 ec 0c sub $0xc,%esp
109f4d: 68 60 72 12 00 push $0x127260
109f52: e8 a9 0f 00 00 call 10af00 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
109f57: e8 c8 92 00 00 call 113224 <__errno>
109f5c: c7 00 16 00 00 00 movl $0x16,(%eax)
109f62: 83 c4 10 add $0x10,%esp
109f65: 83 cb ff or $0xffffffff,%ebx
109f68: e9 90 00 00 00 jmp 109ffd <aio_cancel+0x1c5>
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
109f6d: 50 push %eax
109f6e: 6a 00 push $0x0
109f70: 57 push %edi
109f71: 68 a8 72 12 00 push $0x1272a8
109f76: e8 41 02 00 00 call 10a1bc <rtems_aio_search_fd>
109f7b: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
109f7d: 83 c4 10 add $0x10,%esp
109f80: 85 c0 test %eax,%eax
109f82: 75 48 jne 109fcc <aio_cancel+0x194>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
109f84: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
109f8b: 72 12 00
109f8e: 74 25 je 109fb5 <aio_cancel+0x17d> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
109f90: 56 push %esi
109f91: 6a 00 push $0x0
109f93: 57 push %edi
109f94: 68 b4 72 12 00 push $0x1272b4
109f99: e8 1e 02 00 00 call 10a1bc <rtems_aio_search_fd>
if (r_chain == NULL) {
109f9e: 83 c4 10 add $0x10,%esp
109fa1: 85 c0 test %eax,%eax
109fa3: 74 a5 je 109f4a <aio_cancel+0x112> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109fa5: 51 push %ecx
109fa6: 51 push %ecx
109fa7: 53 push %ebx
109fa8: 83 c0 08 add $0x8,%eax
109fab: 50 push %eax
109fac: e8 97 05 00 00 call 10a548 <rtems_aio_remove_req>
109fb1: 89 c3 mov %eax,%ebx
109fb3: eb 39 jmp 109fee <aio_cancel+0x1b6>
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
109fb5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109fb8: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
109fbd: e8 3e 0f 00 00 call 10af00 <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
109fc2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109fc5: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
109fca: eb 31 jmp 109ffd <aio_cancel+0x1c5> <== NOT EXECUTED
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
109fcc: 8d 78 1c lea 0x1c(%eax),%edi
109fcf: 83 ec 0c sub $0xc,%esp
109fd2: 57 push %edi
109fd3: e8 a8 0e 00 00 call 10ae80 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
109fd8: 58 pop %eax
109fd9: 5a pop %edx
109fda: 53 push %ebx
109fdb: 83 c6 08 add $0x8,%esi
109fde: 56 push %esi
109fdf: e8 64 05 00 00 call 10a548 <rtems_aio_remove_req>
109fe4: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
109fe6: 89 3c 24 mov %edi,(%esp)
109fe9: e8 12 0f 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
109fee: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
109ff5: e8 06 0f 00 00 call 10af00 <pthread_mutex_unlock>
return result;
109ffa: 83 c4 10 add $0x10,%esp
}
return AIO_ALLDONE;
}
109ffd: 89 d8 mov %ebx,%eax
109fff: 8d 65 f4 lea -0xc(%ebp),%esp
10a002: 5b pop %ebx
10a003: 5e pop %esi
10a004: 5f pop %edi
10a005: c9 leave
10a006: c3 ret
0010a014 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10a014: 55 push %ebp
10a015: 89 e5 mov %esp,%ebp
10a017: 53 push %ebx
10a018: 83 ec 04 sub $0x4,%esp
10a01b: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10a01e: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp)
10a025: 74 1b je 10a042 <aio_fsync+0x2e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a027: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a02e: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a035: e8 ea 91 00 00 call 113224 <__errno>
10a03a: c7 00 16 00 00 00 movl $0x16,(%eax)
10a040: eb 74 jmp 10a0b6 <aio_fsync+0xa2>
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a042: 50 push %eax
10a043: 50 push %eax
10a044: 6a 03 push $0x3
10a046: ff 33 pushl (%ebx)
10a048: e8 7b 5e 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a04d: 83 e0 03 and $0x3,%eax
10a050: 48 dec %eax
10a051: 83 c4 10 add $0x10,%esp
10a054: 83 f8 01 cmp $0x1,%eax
10a057: 76 1b jbe 10a074 <aio_fsync+0x60>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a059: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a060: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a067: e8 b8 91 00 00 call 113224 <__errno>
10a06c: c7 00 09 00 00 00 movl $0x9,(%eax)
10a072: eb 42 jmp 10a0b6 <aio_fsync+0xa2>
req = malloc (sizeof (rtems_aio_request));
10a074: 83 ec 0c sub $0xc,%esp
10a077: 6a 18 push $0x18
10a079: e8 96 d7 ff ff call 107814 <malloc>
if (req == NULL)
10a07e: 83 c4 10 add $0x10,%esp
10a081: 85 c0 test %eax,%eax
10a083: 75 1b jne 10a0a0 <aio_fsync+0x8c> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a085: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a08c: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a093: e8 8c 91 00 00 call 113224 <__errno> <== NOT EXECUTED
10a098: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a09e: eb 16 jmp 10a0b6 <aio_fsync+0xa2> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a0a0: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10a0a3: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a0aa: 89 45 08 mov %eax,0x8(%ebp)
}
10a0ad: 8b 5d fc mov -0x4(%ebp),%ebx
10a0b0: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10a0b1: e9 ef 04 00 00 jmp 10a5a5 <rtems_aio_enqueue>
}
10a0b6: 83 c8 ff or $0xffffffff,%eax
10a0b9: 8b 5d fc mov -0x4(%ebp),%ebx
10a0bc: c9 leave
10a0bd: c3 ret
0010a7a8 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10a7a8: 55 push %ebp
10a7a9: 89 e5 mov %esp,%ebp
10a7ab: 53 push %ebx
10a7ac: 83 ec 0c sub $0xc,%esp
10a7af: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a7b2: 6a 03 push $0x3
10a7b4: ff 33 pushl (%ebx)
10a7b6: e8 0d 57 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a7bb: 83 e0 03 and $0x3,%eax
10a7be: 83 c4 10 add $0x10,%esp
10a7c1: 83 f8 02 cmp $0x2,%eax
10a7c4: 74 1f je 10a7e5 <aio_read+0x3d>
10a7c6: 85 c0 test %eax,%eax
10a7c8: 74 1b je 10a7e5 <aio_read+0x3d> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a7ca: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a7d1: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7d8: e8 47 8a 00 00 call 113224 <__errno>
10a7dd: c7 00 09 00 00 00 movl $0x9,(%eax)
10a7e3: eb 69 jmp 10a84e <aio_read+0xa6>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a7e5: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a7e9: 75 06 jne 10a7f1 <aio_read+0x49>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a7eb: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a7ef: 79 1b jns 10a80c <aio_read+0x64>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a7f1: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a7f8: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a7ff: e8 20 8a 00 00 call 113224 <__errno>
10a804: c7 00 16 00 00 00 movl $0x16,(%eax)
10a80a: eb 42 jmp 10a84e <aio_read+0xa6>
req = malloc (sizeof (rtems_aio_request));
10a80c: 83 ec 0c sub $0xc,%esp
10a80f: 6a 18 push $0x18
10a811: e8 fe cf ff ff call 107814 <malloc>
if (req == NULL)
10a816: 83 c4 10 add $0x10,%esp
10a819: 85 c0 test %eax,%eax
10a81b: 75 1b jne 10a838 <aio_read+0x90> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a81d: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a824: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a82b: e8 f4 89 00 00 call 113224 <__errno> <== NOT EXECUTED
10a830: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a836: eb 16 jmp 10a84e <aio_read+0xa6> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a838: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10a83b: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a842: 89 45 08 mov %eax,0x8(%ebp)
}
10a845: 8b 5d fc mov -0x4(%ebp),%ebx
10a848: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10a849: e9 57 fd ff ff jmp 10a5a5 <rtems_aio_enqueue>
}
10a84e: 83 c8 ff or $0xffffffff,%eax
10a851: 8b 5d fc mov -0x4(%ebp),%ebx
10a854: c9 leave
10a855: c3 ret
0010a864 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10a864: 55 push %ebp
10a865: 89 e5 mov %esp,%ebp
10a867: 53 push %ebx
10a868: 83 ec 0c sub $0xc,%esp
10a86b: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10a86e: 6a 03 push $0x3
10a870: ff 33 pushl (%ebx)
10a872: e8 51 56 00 00 call 10fec8 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10a877: 83 e0 03 and $0x3,%eax
10a87a: 48 dec %eax
10a87b: 83 c4 10 add $0x10,%esp
10a87e: 83 f8 01 cmp $0x1,%eax
10a881: 76 1b jbe 10a89e <aio_write+0x3a>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10a883: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10a88a: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a891: e8 8e 89 00 00 call 113224 <__errno>
10a896: c7 00 09 00 00 00 movl $0x9,(%eax)
10a89c: eb 69 jmp 10a907 <aio_write+0xa3>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10a89e: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10a8a2: 75 06 jne 10a8aa <aio_write+0x46>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10a8a4: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10a8a8: 79 1b jns 10a8c5 <aio_write+0x61>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10a8aa: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10a8b1: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10a8b8: e8 67 89 00 00 call 113224 <__errno>
10a8bd: c7 00 16 00 00 00 movl $0x16,(%eax)
10a8c3: eb 42 jmp 10a907 <aio_write+0xa3>
req = malloc (sizeof (rtems_aio_request));
10a8c5: 83 ec 0c sub $0xc,%esp
10a8c8: 6a 18 push $0x18
10a8ca: e8 45 cf ff ff call 107814 <malloc>
if (req == NULL)
10a8cf: 83 c4 10 add $0x10,%esp
10a8d2: 85 c0 test %eax,%eax
10a8d4: 75 1b jne 10a8f1 <aio_write+0x8d> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10a8d6: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10a8dd: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10a8e4: e8 3b 89 00 00 call 113224 <__errno> <== NOT EXECUTED
10a8e9: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10a8ef: eb 16 jmp 10a907 <aio_write+0xa3> <== NOT EXECUTED
req->aiocbp = aiocbp;
10a8f1: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10a8f4: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10a8fb: 89 45 08 mov %eax,0x8(%ebp)
}
10a8fe: 8b 5d fc mov -0x4(%ebp),%ebx
10a901: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10a902: e9 9e fc ff ff jmp 10a5a5 <rtems_aio_enqueue>
}
10a907: 83 c8 ff or $0xffffffff,%eax
10a90a: 8b 5d fc mov -0x4(%ebp),%ebx
10a90d: c9 leave
10a90e: c3 ret
0010961c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10961c: 55 push %ebp
10961d: 89 e5 mov %esp,%ebp
10961f: 83 ec 08 sub $0x8,%esp
109622: 8b 45 08 mov 0x8(%ebp),%eax
109625: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109628: 85 d2 test %edx,%edx
10962a: 74 3c je 109668 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10962c: 83 f8 01 cmp $0x1,%eax
10962f: 75 0b jne 10963c <clock_gettime+0x20>
_TOD_Get(tp);
109631: 83 ec 0c sub $0xc,%esp
109634: 52 push %edx
109635: e8 0a 1a 00 00 call 10b044 <_TOD_Get>
10963a: eb 13 jmp 10964f <clock_gettime+0x33>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10963c: 83 f8 04 cmp $0x4,%eax
10963f: 74 05 je 109646 <clock_gettime+0x2a> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
109641: 83 f8 02 cmp $0x2,%eax
109644: 75 10 jne 109656 <clock_gettime+0x3a>
_TOD_Get_uptime_as_timespec( tp );
109646: 83 ec 0c sub $0xc,%esp
109649: 52 push %edx
10964a: e8 49 1a 00 00 call 10b098 <_TOD_Get_uptime_as_timespec>
return 0;
10964f: 83 c4 10 add $0x10,%esp
109652: 31 c0 xor %eax,%eax
109654: eb 20 jmp 109676 <clock_gettime+0x5a>
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
109656: 83 f8 03 cmp $0x3,%eax
109659: 75 0d jne 109668 <clock_gettime+0x4c>
rtems_set_errno_and_return_minus_one( ENOSYS );
10965b: e8 b8 84 00 00 call 111b18 <__errno>
109660: c7 00 58 00 00 00 movl $0x58,(%eax)
109666: eb 0b jmp 109673 <clock_gettime+0x57>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
109668: e8 ab 84 00 00 call 111b18 <__errno>
10966d: c7 00 16 00 00 00 movl $0x16,(%eax)
109673: 83 c8 ff or $0xffffffff,%eax
return 0;
}
109676: c9 leave
109677: c3 ret
00109678 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
109678: 55 push %ebp
109679: 89 e5 mov %esp,%ebp
10967b: 83 ec 08 sub $0x8,%esp
10967e: 8b 45 08 mov 0x8(%ebp),%eax
109681: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
109684: 85 d2 test %edx,%edx
109686: 74 44 je 1096cc <clock_settime+0x54> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
109688: 83 f8 01 cmp $0x1,%eax
10968b: 75 28 jne 1096b5 <clock_settime+0x3d>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10968d: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
109693: 76 37 jbe 1096cc <clock_settime+0x54>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109695: a1 24 63 12 00 mov 0x126324,%eax
10969a: 40 inc %eax
10969b: a3 24 63 12 00 mov %eax,0x126324
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
1096a0: 83 ec 0c sub $0xc,%esp
1096a3: 52 push %edx
1096a4: e8 47 1a 00 00 call 10b0f0 <_TOD_Set>
_Thread_Enable_dispatch();
1096a9: e8 30 2d 00 00 call 10c3de <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
1096ae: 83 c4 10 add $0x10,%esp
1096b1: 31 c0 xor %eax,%eax
1096b3: eb 25 jmp 1096da <clock_settime+0x62>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
1096b5: 83 f8 02 cmp $0x2,%eax
1096b8: 74 05 je 1096bf <clock_settime+0x47>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
1096ba: 83 f8 03 cmp $0x3,%eax
1096bd: 75 0d jne 1096cc <clock_settime+0x54>
rtems_set_errno_and_return_minus_one( ENOSYS );
1096bf: e8 54 84 00 00 call 111b18 <__errno>
1096c4: c7 00 58 00 00 00 movl $0x58,(%eax)
1096ca: eb 0b jmp 1096d7 <clock_settime+0x5f>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
1096cc: e8 47 84 00 00 call 111b18 <__errno>
1096d1: c7 00 16 00 00 00 movl $0x16,(%eax)
1096d7: 83 c8 ff or $0xffffffff,%eax
return 0;
}
1096da: c9 leave
1096db: c3 ret
00121a98 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
121a98: 55 push %ebp
121a99: 89 e5 mov %esp,%ebp
121a9b: 57 push %edi
121a9c: 56 push %esi
121a9d: 53 push %ebx
121a9e: 83 ec 4c sub $0x4c,%esp
121aa1: 8b 5d 0c mov 0xc(%ebp),%ebx
121aa4: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
121aa7: e8 64 fd ff ff call 121810 <getpid>
121aac: 39 45 08 cmp %eax,0x8(%ebp)
121aaf: 74 0d je 121abe <killinfo+0x26>
rtems_set_errno_and_return_minus_one( ESRCH );
121ab1: e8 56 3a ff ff call 11550c <__errno>
121ab6: c7 00 03 00 00 00 movl $0x3,(%eax)
121abc: eb 0f jmp 121acd <killinfo+0x35>
/*
* Validate the signal passed.
*/
if ( !sig )
121abe: 85 db test %ebx,%ebx
121ac0: 75 13 jne 121ad5 <killinfo+0x3d>
rtems_set_errno_and_return_minus_one( EINVAL );
121ac2: e8 45 3a ff ff call 11550c <__errno>
121ac7: c7 00 16 00 00 00 movl $0x16,(%eax)
121acd: 83 c8 ff or $0xffffffff,%eax
121ad0: e9 ef 01 00 00 jmp 121cc4 <killinfo+0x22c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
121ad5: 8d 4b ff lea -0x1(%ebx),%ecx
if ( !is_valid_signo(sig) )
121ad8: 83 f9 1f cmp $0x1f,%ecx
121adb: 77 e5 ja 121ac2 <killinfo+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
121add: 6b d3 0c imul $0xc,%ebx,%edx
return 0;
121ae0: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
121ae2: 83 ba 98 a9 12 00 01 cmpl $0x1,0x12a998(%edx)
121ae9: 0f 84 d5 01 00 00 je 121cc4 <killinfo+0x22c>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
121aef: 83 fb 04 cmp $0x4,%ebx
121af2: 74 0a je 121afe <killinfo+0x66>
121af4: 83 fb 08 cmp $0x8,%ebx
121af7: 74 05 je 121afe <killinfo+0x66>
121af9: 83 fb 0b cmp $0xb,%ebx
121afc: 75 16 jne 121b14 <killinfo+0x7c>
return pthread_kill( pthread_self(), sig );
121afe: e8 85 03 00 00 call 121e88 <pthread_self>
121b03: 56 push %esi
121b04: 56 push %esi
121b05: 53 push %ebx
121b06: 50 push %eax
121b07: e8 d8 02 00 00 call 121de4 <pthread_kill>
121b0c: 83 c4 10 add $0x10,%esp
121b0f: e9 b0 01 00 00 jmp 121cc4 <killinfo+0x22c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
121b14: be 01 00 00 00 mov $0x1,%esi
121b19: d3 e6 shl %cl,%esi
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
121b1b: 89 5d dc mov %ebx,-0x24(%ebp)
siginfo->si_code = SI_USER;
121b1e: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
121b25: 85 ff test %edi,%edi
121b27: 75 09 jne 121b32 <killinfo+0x9a>
siginfo->si_value.sival_int = 0;
121b29: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
121b30: eb 05 jmp 121b37 <killinfo+0x9f>
} else {
siginfo->si_value = *value;
121b32: 8b 07 mov (%edi),%eax
121b34: 89 45 e4 mov %eax,-0x1c(%ebp)
121b37: a1 38 a4 12 00 mov 0x12a438,%eax
121b3c: 40 inc %eax
121b3d: a3 38 a4 12 00 mov %eax,0x12a438
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
121b42: a1 5c a9 12 00 mov 0x12a95c,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
121b47: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
121b4d: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
121b53: f7 d2 not %edx
121b55: 85 d6 test %edx,%esi
121b57: 0f 85 ed 00 00 00 jne 121c4a <killinfo+0x1b2>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
121b5d: 8b 15 1c ab 12 00 mov 0x12ab1c,%edx
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
121b63: eb 23 jmp 121b88 <killinfo+0xf0>
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
121b65: 89 d0 mov %edx,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121b67: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
121b6d: 85 72 30 test %esi,0x30(%edx)
121b70: 0f 85 d4 00 00 00 jne 121c4a <killinfo+0x1b2>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
121b76: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
121b7c: f7 d1 not %ecx
121b7e: 85 ce test %ecx,%esi
121b80: 0f 85 c4 00 00 00 jne 121c4a <killinfo+0x1b2>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
121b86: 8b 12 mov (%edx),%edx
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
121b88: 81 fa 20 ab 12 00 cmp $0x12ab20,%edx
121b8e: 75 d5 jne 121b65 <killinfo+0xcd>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
121b90: 0f b6 0d 24 62 12 00 movzbl 0x126224,%ecx
121b97: 41 inc %ecx
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
121b98: 31 c0 xor %eax,%eax
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
121b9a: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
121ba1: 8b 7d cc mov -0x34(%ebp),%edi
121ba4: 8b 14 bd 10 a4 12 00 mov 0x12a410(,%edi,4),%edx
121bab: 85 d2 test %edx,%edx
121bad: 0f 84 86 00 00 00 je 121c39 <killinfo+0x1a1> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
121bb3: 8b 52 04 mov 0x4(%edx),%edx
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
121bb6: 0f b7 7a 10 movzwl 0x10(%edx),%edi
121bba: 89 7d c4 mov %edi,-0x3c(%ebp)
object_table = the_info->local_table;
121bbd: 8b 52 1c mov 0x1c(%edx),%edx
121bc0: 89 55 c0 mov %edx,-0x40(%ebp)
for ( index = 1 ; index <= maximum ; index++ ) {
121bc3: c7 45 d0 01 00 00 00 movl $0x1,-0x30(%ebp)
121bca: 89 5d b4 mov %ebx,-0x4c(%ebp)
121bcd: eb 5f jmp 121c2e <killinfo+0x196>
the_thread = (Thread_Control *) object_table[ index ];
121bcf: 8b 5d d0 mov -0x30(%ebp),%ebx
121bd2: 8b 7d c0 mov -0x40(%ebp),%edi
121bd5: 8b 14 9f mov (%edi,%ebx,4),%edx
if ( !the_thread )
121bd8: 85 d2 test %edx,%edx
121bda: 74 4f je 121c2b <killinfo+0x193>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
121bdc: 8b 5a 14 mov 0x14(%edx),%ebx
121bdf: 89 5d d4 mov %ebx,-0x2c(%ebp)
121be2: 39 cb cmp %ecx,%ebx
121be4: 77 45 ja 121c2b <killinfo+0x193>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
121be6: 8b ba ec 00 00 00 mov 0xec(%edx),%edi
121bec: 8b bf d0 00 00 00 mov 0xd0(%edi),%edi
121bf2: f7 d7 not %edi
121bf4: 85 fe test %edi,%esi
121bf6: 74 33 je 121c2b <killinfo+0x193>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
121bf8: 39 cb cmp %ecx,%ebx
121bfa: 72 2a jb 121c26 <killinfo+0x18e>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
121bfc: 85 c0 test %eax,%eax
121bfe: 74 2b je 121c2b <killinfo+0x193> <== NEVER TAKEN
121c00: 8b 78 10 mov 0x10(%eax),%edi
121c03: 89 7d c8 mov %edi,-0x38(%ebp)
121c06: 85 ff test %edi,%edi
121c08: 74 21 je 121c2b <killinfo+0x193> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
121c0a: 8b 7a 10 mov 0x10(%edx),%edi
121c0d: 85 ff test %edi,%edi
121c0f: 74 15 je 121c26 <killinfo+0x18e>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
121c11: f7 45 c8 00 00 00 10 testl $0x10000000,-0x38(%ebp)
121c18: 75 11 jne 121c2b <killinfo+0x193>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
121c1a: 81 e7 00 00 00 10 and $0x10000000,%edi
121c20: 74 09 je 121c2b <killinfo+0x193>
121c22: 89 d9 mov %ebx,%ecx
121c24: eb 03 jmp 121c29 <killinfo+0x191>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
121c26: 8b 4d d4 mov -0x2c(%ebp),%ecx
121c29: 89 d0 mov %edx,%eax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
121c2b: ff 45 d0 incl -0x30(%ebp)
121c2e: 8b 55 c4 mov -0x3c(%ebp),%edx
121c31: 39 55 d0 cmp %edx,-0x30(%ebp)
121c34: 76 99 jbe 121bcf <killinfo+0x137>
121c36: 8b 5d b4 mov -0x4c(%ebp),%ebx
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
121c39: ff 45 cc incl -0x34(%ebp)
121c3c: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
121c40: 0f 85 5b ff ff ff jne 121ba1 <killinfo+0x109>
}
}
}
}
if ( interested ) {
121c46: 85 c0 test %eax,%eax
121c48: 74 13 je 121c5d <killinfo+0x1c5>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
121c4a: 51 push %ecx
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
121c4b: 8d 55 dc lea -0x24(%ebp),%edx
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
121c4e: 52 push %edx
121c4f: 53 push %ebx
121c50: 50 push %eax
121c51: e8 8a 00 00 00 call 121ce0 <_POSIX_signals_Unblock_thread>
121c56: 83 c4 10 add $0x10,%esp
121c59: 84 c0 test %al,%al
121c5b: 75 60 jne 121cbd <killinfo+0x225>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
121c5d: 83 ec 0c sub $0xc,%esp
121c60: 56 push %esi
121c61: e8 66 00 00 00 call 121ccc <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
121c66: 6b db 0c imul $0xc,%ebx,%ebx
121c69: 83 c4 10 add $0x10,%esp
121c6c: 83 bb 90 a9 12 00 02 cmpl $0x2,0x12a990(%ebx)
121c73: 75 48 jne 121cbd <killinfo+0x225>
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
121c75: 83 ec 0c sub $0xc,%esp
121c78: 68 10 ab 12 00 push $0x12ab10
121c7d: e8 8a ca fe ff call 10e70c <_Chain_Get>
if ( !psiginfo ) {
121c82: 83 c4 10 add $0x10,%esp
121c85: 85 c0 test %eax,%eax
121c87: 75 15 jne 121c9e <killinfo+0x206>
_Thread_Enable_dispatch();
121c89: e8 44 e1 fe ff call 10fdd2 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
121c8e: e8 79 38 ff ff call 11550c <__errno>
121c93: c7 00 0b 00 00 00 movl $0xb,(%eax)
121c99: e9 2f fe ff ff jmp 121acd <killinfo+0x35>
}
psiginfo->Info = *siginfo;
121c9e: 8d 78 08 lea 0x8(%eax),%edi
121ca1: 8d 75 dc lea -0x24(%ebp),%esi
121ca4: b9 03 00 00 00 mov $0x3,%ecx
121ca9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
121cab: 52 push %edx
121cac: 52 push %edx
121cad: 50 push %eax
121cae: 81 c3 88 ab 12 00 add $0x12ab88,%ebx
121cb4: 53 push %ebx
121cb5: e8 16 ca fe ff call 10e6d0 <_Chain_Append>
121cba: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
121cbd: e8 10 e1 fe ff call 10fdd2 <_Thread_Enable_dispatch>
return 0;
121cc2: 31 c0 xor %eax,%eax
}
121cc4: 8d 65 f4 lea -0xc(%ebp),%esp
121cc7: 5b pop %ebx
121cc8: 5e pop %esi
121cc9: 5f pop %edi
121cca: c9 leave
121ccb: c3 ret
0010e86c <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
10e86c: 55 push %ebp
10e86d: 89 e5 mov %esp,%ebp
10e86f: 8b 55 08 mov 0x8(%ebp),%edx
10e872: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10e875: b8 16 00 00 00 mov $0x16,%eax
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
10e87a: 85 d2 test %edx,%edx
10e87c: 74 1e je 10e89c <pthread_attr_setschedpolicy+0x30>
10e87e: 83 3a 00 cmpl $0x0,(%edx)
10e881: 74 19 je 10e89c <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
10e883: 83 f9 04 cmp $0x4,%ecx
10e886: 77 0f ja 10e897 <pthread_attr_setschedpolicy+0x2b>
10e888: b0 01 mov $0x1,%al
10e88a: d3 e0 shl %cl,%eax
10e88c: a8 17 test $0x17,%al
10e88e: 74 07 je 10e897 <pthread_attr_setschedpolicy+0x2b><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
10e890: 89 4a 14 mov %ecx,0x14(%edx)
return 0;
10e893: 31 c0 xor %eax,%eax
10e895: eb 05 jmp 10e89c <pthread_attr_setschedpolicy+0x30>
default:
return ENOTSUP;
10e897: b8 86 00 00 00 mov $0x86,%eax
}
}
10e89c: c9 leave
10e89d: c3 ret
00109b8c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
109b8c: 55 push %ebp
109b8d: 89 e5 mov %esp,%ebp
109b8f: 57 push %edi
109b90: 56 push %esi
109b91: 53 push %ebx
109b92: 83 ec 1c sub $0x1c,%esp
109b95: 8b 5d 08 mov 0x8(%ebp),%ebx
109b98: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Error check parameters
*/
if ( !barrier )
return EINVAL;
109b9b: b8 16 00 00 00 mov $0x16,%eax
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
109ba0: 85 db test %ebx,%ebx
109ba2: 0f 84 96 00 00 00 je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
if ( count == 0 )
109ba8: 85 f6 test %esi,%esi
109baa: 0f 84 8e 00 00 00 je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
109bb0: 8b 7d 0c mov 0xc(%ebp),%edi
109bb3: 85 ff test %edi,%edi
109bb5: 75 0f jne 109bc6 <pthread_barrier_init+0x3a>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
109bb7: 83 ec 0c sub $0xc,%esp
109bba: 8d 7d d8 lea -0x28(%ebp),%edi
109bbd: 57 push %edi
109bbe: e8 19 ff ff ff call 109adc <pthread_barrierattr_init>
109bc3: 83 c4 10 add $0x10,%esp
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
109bc6: b8 16 00 00 00 mov $0x16,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
109bcb: 83 3f 00 cmpl $0x0,(%edi)
109bce: 74 6e je 109c3e <pthread_barrier_init+0xb2>
return EINVAL;
switch ( the_attr->process_shared ) {
109bd0: 83 7f 04 00 cmpl $0x0,0x4(%edi)
109bd4: 75 68 jne 109c3e <pthread_barrier_init+0xb2><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
109bd6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
109bdd: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
109be0: a1 f4 62 12 00 mov 0x1262f4,%eax
109be5: 40 inc %eax
109be6: a3 f4 62 12 00 mov %eax,0x1262f4
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
109beb: 83 ec 0c sub $0xc,%esp
109bee: 68 94 66 12 00 push $0x126694
109bf3: e8 70 1c 00 00 call 10b868 <_Objects_Allocate>
109bf8: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
109bfa: 83 c4 10 add $0x10,%esp
109bfd: 85 c0 test %eax,%eax
109bff: 75 0c jne 109c0d <pthread_barrier_init+0x81>
_Thread_Enable_dispatch();
109c01: e8 d4 2a 00 00 call 10c6da <_Thread_Enable_dispatch>
return EAGAIN;
109c06: b8 0b 00 00 00 mov $0xb,%eax
109c0b: eb 31 jmp 109c3e <pthread_barrier_init+0xb2>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
109c0d: 50 push %eax
109c0e: 50 push %eax
109c0f: 8d 45 e0 lea -0x20(%ebp),%eax
109c12: 50 push %eax
109c13: 8d 46 10 lea 0x10(%esi),%eax
109c16: 50 push %eax
109c17: e8 04 14 00 00 call 10b020 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
109c1c: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
109c1f: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
109c22: 8b 15 b0 66 12 00 mov 0x1266b0,%edx
109c28: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
109c2b: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
109c32: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
109c34: e8 a1 2a 00 00 call 10c6da <_Thread_Enable_dispatch>
return 0;
109c39: 83 c4 10 add $0x10,%esp
109c3c: 31 c0 xor %eax,%eax
}
109c3e: 8d 65 f4 lea -0xc(%ebp),%esp
109c41: 5b pop %ebx
109c42: 5e pop %esi
109c43: 5f pop %edi
109c44: c9 leave
109c45: c3 ret
00109540 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
109540: 55 push %ebp
109541: 89 e5 mov %esp,%ebp
109543: 56 push %esi
109544: 53 push %ebx
109545: 8b 5d 08 mov 0x8(%ebp),%ebx
109548: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
10954b: 85 db test %ebx,%ebx
10954d: 74 4b je 10959a <pthread_cleanup_push+0x5a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10954f: a1 cc 62 12 00 mov 0x1262cc,%eax
109554: 40 inc %eax
109555: a3 cc 62 12 00 mov %eax,0x1262cc
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10955a: 83 ec 0c sub $0xc,%esp
10955d: 6a 10 push $0x10
10955f: e8 36 3a 00 00 call 10cf9a <_Workspace_Allocate>
if ( handler ) {
109564: 83 c4 10 add $0x10,%esp
109567: 85 c0 test %eax,%eax
109569: 74 24 je 10958f <pthread_cleanup_push+0x4f><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10956b: 8b 15 f0 67 12 00 mov 0x1267f0,%edx
handler_stack = &thread_support->Cancellation_Handlers;
109571: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx
109577: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10957d: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
109580: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
109583: 51 push %ecx
109584: 51 push %ecx
109585: 50 push %eax
109586: 52 push %edx
109587: e8 e0 14 00 00 call 10aa6c <_Chain_Append>
10958c: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10958f: 8d 65 f8 lea -0x8(%ebp),%esp
109592: 5b pop %ebx
109593: 5e pop %esi
109594: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
109595: e9 34 2b 00 00 jmp 10c0ce <_Thread_Enable_dispatch>
}
10959a: 8d 65 f8 lea -0x8(%ebp),%esp
10959d: 5b pop %ebx
10959e: 5e pop %esi
10959f: c9 leave
1095a0: c3 ret
0010a2b4 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10a2b4: 55 push %ebp
10a2b5: 89 e5 mov %esp,%ebp
10a2b7: 56 push %esi
10a2b8: 53 push %ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10a2b9: 8b 5d 0c mov 0xc(%ebp),%ebx
10a2bc: 85 db test %ebx,%ebx
10a2be: 75 05 jne 10a2c5 <pthread_cond_init+0x11>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10a2c0: bb a8 0f 12 00 mov $0x120fa8,%ebx
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
10a2c5: b8 16 00 00 00 mov $0x16,%eax
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10a2ca: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10a2ce: 74 76 je 10a346 <pthread_cond_init+0x92><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10a2d0: 83 3b 00 cmpl $0x0,(%ebx)
10a2d3: 74 71 je 10a346 <pthread_cond_init+0x92>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a2d5: a1 e4 72 12 00 mov 0x1272e4,%eax
10a2da: 40 inc %eax
10a2db: a3 e4 72 12 00 mov %eax,0x1272e4
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
10a2e0: 83 ec 0c sub $0xc,%esp
10a2e3: 68 1c 77 12 00 push $0x12771c
10a2e8: e8 5b 21 00 00 call 10c448 <_Objects_Allocate>
10a2ed: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10a2ef: 83 c4 10 add $0x10,%esp
10a2f2: 85 c0 test %eax,%eax
10a2f4: 75 0c jne 10a302 <pthread_cond_init+0x4e>
_Thread_Enable_dispatch();
10a2f6: e8 bf 2f 00 00 call 10d2ba <_Thread_Enable_dispatch>
return ENOMEM;
10a2fb: b8 0c 00 00 00 mov $0xc,%eax
10a300: eb 44 jmp 10a346 <pthread_cond_init+0x92>
}
the_cond->process_shared = the_attr->process_shared;
10a302: 8b 43 04 mov 0x4(%ebx),%eax
10a305: 89 46 10 mov %eax,0x10(%esi)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10a308: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
_Thread_queue_Initialize(
10a30f: 6a 74 push $0x74
10a311: 68 00 08 00 10 push $0x10000800
10a316: 6a 00 push $0x0
10a318: 8d 46 18 lea 0x18(%esi),%eax
10a31b: 50 push %eax
10a31c: e8 57 36 00 00 call 10d978 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a321: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a324: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a327: 8b 15 38 77 12 00 mov 0x127738,%edx
10a32d: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a330: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10a337: 8b 55 08 mov 0x8(%ebp),%edx
10a33a: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10a33c: e8 79 2f 00 00 call 10d2ba <_Thread_Enable_dispatch>
return 0;
10a341: 83 c4 10 add $0x10,%esp
10a344: 31 c0 xor %eax,%eax
}
10a346: 8d 65 f8 lea -0x8(%ebp),%esp
10a349: 5b pop %ebx
10a34a: 5e pop %esi
10a34b: c9 leave
10a34c: c3 ret
0010a168 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10a168: 55 push %ebp
10a169: 89 e5 mov %esp,%ebp
10a16b: 8b 55 08 mov 0x8(%ebp),%edx
if ( !attr || attr->is_initialized == false )
return EINVAL;
10a16e: b8 16 00 00 00 mov $0x16,%eax
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
10a173: 85 d2 test %edx,%edx
10a175: 74 0d je 10a184 <pthread_condattr_destroy+0x1c>
10a177: 83 3a 00 cmpl $0x0,(%edx)
10a17a: 74 08 je 10a184 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10a17c: c7 02 00 00 00 00 movl $0x0,(%edx)
return 0;
10a182: 30 c0 xor %al,%al
}
10a184: c9 leave
10a185: c3 ret
0010989c <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10989c: 55 push %ebp
10989d: 89 e5 mov %esp,%ebp
10989f: 57 push %edi
1098a0: 56 push %esi
1098a1: 53 push %ebx
1098a2: 83 ec 5c sub $0x5c,%esp
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
1098a5: c7 45 b4 0e 00 00 00 movl $0xe,-0x4c(%ebp)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
1098ac: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1098b0: 0f 84 0f 02 00 00 je 109ac5 <pthread_create+0x229>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
1098b6: 8b 5d 0c mov 0xc(%ebp),%ebx
1098b9: 85 db test %ebx,%ebx
1098bb: 75 05 jne 1098c2 <pthread_create+0x26>
1098bd: bb 14 fc 11 00 mov $0x11fc14,%ebx
if ( !the_attr->is_initialized )
return EINVAL;
1098c2: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
if ( !the_attr->is_initialized )
1098c9: 83 3b 00 cmpl $0x0,(%ebx)
1098cc: 0f 84 f3 01 00 00 je 109ac5 <pthread_create+0x229>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
1098d2: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
1098d6: 74 0e je 1098e6 <pthread_create+0x4a>
1098d8: a1 44 12 12 00 mov 0x121244,%eax
1098dd: 39 43 08 cmp %eax,0x8(%ebx)
1098e0: 0f 82 df 01 00 00 jb 109ac5 <pthread_create+0x229>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
1098e6: 8b 43 10 mov 0x10(%ebx),%eax
1098e9: 83 f8 01 cmp $0x1,%eax
1098ec: 74 0b je 1098f9 <pthread_create+0x5d>
1098ee: 83 f8 02 cmp $0x2,%eax
1098f1: 0f 85 c7 01 00 00 jne 109abe <pthread_create+0x222>
1098f7: eb 1f jmp 109918 <pthread_create+0x7c>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
1098f9: a1 f8 57 12 00 mov 0x1257f8,%eax
1098fe: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
schedpolicy = api->schedpolicy;
109904: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10990a: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = api->schedparam;
10990d: 8d 7d c4 lea -0x3c(%ebp),%edi
109910: 81 c6 88 00 00 00 add $0x88,%esi
109916: eb 0c jmp 109924 <pthread_create+0x88>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
109918: 8b 43 14 mov 0x14(%ebx),%eax
10991b: 89 45 ac mov %eax,-0x54(%ebp)
schedparam = the_attr->schedparam;
10991e: 8d 7d c4 lea -0x3c(%ebp),%edi
109921: 8d 73 18 lea 0x18(%ebx),%esi
109924: b9 07 00 00 00 mov $0x7,%ecx
109929: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
return ENOTSUP;
10992b: c7 45 b4 86 00 00 00 movl $0x86,-0x4c(%ebp)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
109932: 83 7b 0c 00 cmpl $0x0,0xc(%ebx)
109936: 0f 85 89 01 00 00 jne 109ac5 <pthread_create+0x229>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10993c: 83 ec 0c sub $0xc,%esp
10993f: ff 75 c4 pushl -0x3c(%ebp)
109942: e8 ed 58 00 00 call 10f234 <_POSIX_Priority_Is_valid>
109947: 83 c4 10 add $0x10,%esp
return EINVAL;
10994a: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
109951: 84 c0 test %al,%al
109953: 0f 84 6c 01 00 00 je 109ac5 <pthread_create+0x229> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
109959: 8b 45 c4 mov -0x3c(%ebp),%eax
10995c: 89 45 a8 mov %eax,-0x58(%ebp)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10995f: 0f b6 3d 48 12 12 00 movzbl 0x121248,%edi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
109966: 8d 45 e0 lea -0x20(%ebp),%eax
109969: 50 push %eax
10996a: 8d 45 e4 lea -0x1c(%ebp),%eax
10996d: 50 push %eax
10996e: 8d 45 c4 lea -0x3c(%ebp),%eax
109971: 50 push %eax
109972: ff 75 ac pushl -0x54(%ebp)
109975: e8 da 58 00 00 call 10f254 <_POSIX_Thread_Translate_sched_param>
10997a: 89 45 b4 mov %eax,-0x4c(%ebp)
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10997d: 83 c4 10 add $0x10,%esp
109980: 85 c0 test %eax,%eax
109982: 0f 85 3d 01 00 00 jne 109ac5 <pthread_create+0x229>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
109988: 83 ec 0c sub $0xc,%esp
10998b: ff 35 74 53 12 00 pushl 0x125374
109991: e8 aa 14 00 00 call 10ae40 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
109996: c7 04 24 f4 54 12 00 movl $0x1254f4,(%esp)
10999d: e8 06 1d 00 00 call 10b6a8 <_Objects_Allocate>
1099a2: 89 45 b0 mov %eax,-0x50(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
1099a5: 83 c4 10 add $0x10,%esp
1099a8: 85 c0 test %eax,%eax
1099aa: 75 05 jne 1099b1 <pthread_create+0x115>
_RTEMS_Unlock_allocator();
1099ac: 83 ec 0c sub $0xc,%esp
1099af: eb 53 jmp 109a04 <pthread_create+0x168>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
1099b1: 8b 4d e0 mov -0x20(%ebp),%ecx
1099b4: 8b 75 e4 mov -0x1c(%ebp),%esi
1099b7: 8b 53 08 mov 0x8(%ebx),%edx
1099ba: a1 44 12 12 00 mov 0x121244,%eax
1099bf: d1 e0 shl %eax
1099c1: 39 d0 cmp %edx,%eax
1099c3: 73 02 jae 1099c7 <pthread_create+0x12b>
1099c5: 89 d0 mov %edx,%eax
1099c7: 52 push %edx
1099c8: 6a 00 push $0x0
1099ca: 6a 00 push $0x0
1099cc: 51 push %ecx
1099cd: 56 push %esi
1099ce: 6a 01 push $0x1
1099d0: 81 e7 ff 00 00 00 and $0xff,%edi
1099d6: 2b 7d a8 sub -0x58(%ebp),%edi
1099d9: 57 push %edi
1099da: 6a 01 push $0x1
1099dc: 50 push %eax
1099dd: ff 73 04 pushl 0x4(%ebx)
1099e0: ff 75 b0 pushl -0x50(%ebp)
1099e3: 68 f4 54 12 00 push $0x1254f4
1099e8: e8 c3 2b 00 00 call 10c5b0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
1099ed: 83 c4 30 add $0x30,%esp
1099f0: 84 c0 test %al,%al
1099f2: 75 2a jne 109a1e <pthread_create+0x182>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
1099f4: 56 push %esi
1099f5: 56 push %esi
1099f6: ff 75 b0 pushl -0x50(%ebp)
1099f9: 68 f4 54 12 00 push $0x1254f4
1099fe: e8 99 1f 00 00 call 10b99c <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
109a03: 5b pop %ebx
109a04: ff 35 74 53 12 00 pushl 0x125374
109a0a: e8 79 14 00 00 call 10ae88 <_API_Mutex_Unlock>
return EAGAIN;
109a0f: 83 c4 10 add $0x10,%esp
109a12: c7 45 b4 0b 00 00 00 movl $0xb,-0x4c(%ebp)
109a19: e9 a7 00 00 00 jmp 109ac5 <pthread_create+0x229>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
109a1e: 8b 45 b0 mov -0x50(%ebp),%eax
109a21: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
api->Attributes = *the_attr;
109a27: b9 10 00 00 00 mov $0x10,%ecx
109a2c: 89 d7 mov %edx,%edi
109a2e: 89 de mov %ebx,%esi
109a30: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
109a32: 8b 43 3c mov 0x3c(%ebx),%eax
109a35: 89 42 40 mov %eax,0x40(%edx)
api->schedpolicy = schedpolicy;
109a38: 8b 45 ac mov -0x54(%ebp),%eax
109a3b: 89 82 84 00 00 00 mov %eax,0x84(%edx)
api->schedparam = schedparam;
109a41: 8d ba 88 00 00 00 lea 0x88(%edx),%edi
109a47: 8d 75 c4 lea -0x3c(%ebp),%esi
109a4a: b1 07 mov $0x7,%cl
109a4c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
109a4e: 83 ec 0c sub $0xc,%esp
109a51: 6a 00 push $0x0
109a53: ff 75 14 pushl 0x14(%ebp)
109a56: ff 75 10 pushl 0x10(%ebp)
109a59: 6a 01 push $0x1
109a5b: ff 75 b0 pushl -0x50(%ebp)
109a5e: 89 55 a4 mov %edx,-0x5c(%ebp)
109a61: e8 6a 33 00 00 call 10cdd0 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
109a66: 83 c4 20 add $0x20,%esp
109a69: 83 7d ac 04 cmpl $0x4,-0x54(%ebp)
109a6d: 8b 55 a4 mov -0x5c(%ebp),%edx
109a70: 75 2e jne 109aa0 <pthread_create+0x204>
_Watchdog_Insert_ticks(
109a72: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
109a75: 8d 82 90 00 00 00 lea 0x90(%edx),%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
109a7b: 50 push %eax
109a7c: e8 9f 34 00 00 call 10cf20 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
109a81: 8b 55 a4 mov -0x5c(%ebp),%edx
109a84: 89 82 b4 00 00 00 mov %eax,0xb4(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
109a8a: 58 pop %eax
109a8b: 59 pop %ecx
109a8c: 81 c2 a8 00 00 00 add $0xa8,%edx
109a92: 52 push %edx
109a93: 68 94 53 12 00 push $0x125394
109a98: e8 37 37 00 00 call 10d1d4 <_Watchdog_Insert>
109a9d: 83 c4 10 add $0x10,%esp
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
109aa0: 8b 45 b0 mov -0x50(%ebp),%eax
109aa3: 8b 50 08 mov 0x8(%eax),%edx
109aa6: 8b 45 08 mov 0x8(%ebp),%eax
109aa9: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
109aab: 83 ec 0c sub $0xc,%esp
109aae: ff 35 74 53 12 00 pushl 0x125374
109ab4: e8 cf 13 00 00 call 10ae88 <_API_Mutex_Unlock>
return 0;
109ab9: 83 c4 10 add $0x10,%esp
109abc: eb 07 jmp 109ac5 <pthread_create+0x229>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
109abe: c7 45 b4 16 00 00 00 movl $0x16,-0x4c(%ebp)
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
109ac5: 8b 45 b4 mov -0x4c(%ebp),%eax
109ac8: 8d 65 f4 lea -0xc(%ebp),%esp
109acb: 5b pop %ebx
109acc: 5e pop %esi
109acd: 5f pop %edi
109ace: c9 leave
109acf: c3 ret
00110820 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
110820: 55 push %ebp
110821: 89 e5 mov %esp,%ebp
110823: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
110826: ff 75 08 pushl 0x8(%ebp)
110829: ff 35 08 48 12 00 pushl 0x124808
11082f: e8 88 ff ff ff call 1107bc <_POSIX_Thread_Exit>
110834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
110837: c9 leave <== NOT EXECUTED
110838: c3 ret <== NOT EXECUTED
00121de4 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
121de4: 55 push %ebp
121de5: 89 e5 mov %esp,%ebp
121de7: 57 push %edi
121de8: 56 push %esi
121de9: 53 push %ebx
121dea: 83 ec 1c sub $0x1c,%esp
121ded: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
121df0: 85 db test %ebx,%ebx
121df2: 74 08 je 121dfc <pthread_kill+0x18>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
121df4: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
121df7: 83 ff 1f cmp $0x1f,%edi
121dfa: 76 0d jbe 121e09 <pthread_kill+0x25>
rtems_set_errno_and_return_minus_one( EINVAL );
121dfc: e8 0b 37 ff ff call 11550c <__errno>
121e01: c7 00 16 00 00 00 movl $0x16,(%eax)
121e07: eb 73 jmp 121e7c <pthread_kill+0x98>
the_thread = _Thread_Get( thread, &location );
121e09: 52 push %edx
121e0a: 52 push %edx
121e0b: 8d 45 e4 lea -0x1c(%ebp),%eax
121e0e: 50 push %eax
121e0f: ff 75 08 pushl 0x8(%ebp)
121e12: e8 dd df fe ff call 10fdf4 <_Thread_Get>
121e17: 89 c6 mov %eax,%esi
switch ( location ) {
121e19: 83 c4 10 add $0x10,%esp
121e1c: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
121e20: 75 4f jne 121e71 <pthread_kill+0x8d> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
121e22: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
121e28: 6b c3 0c imul $0xc,%ebx,%eax
121e2b: 83 b8 98 a9 12 00 01 cmpl $0x1,0x12a998(%eax)
121e32: 74 34 je 121e68 <pthread_kill+0x84>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
121e34: b8 01 00 00 00 mov $0x1,%eax
121e39: 89 f9 mov %edi,%ecx
121e3b: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
121e3d: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
121e43: 50 push %eax
121e44: 6a 00 push $0x0
121e46: 53 push %ebx
121e47: 56 push %esi
121e48: e8 93 fe ff ff call 121ce0 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
121e4d: 83 c4 10 add $0x10,%esp
121e50: 83 3d 58 a9 12 00 00 cmpl $0x0,0x12a958
121e57: 74 0f je 121e68 <pthread_kill+0x84>
121e59: 3b 35 5c a9 12 00 cmp 0x12a95c,%esi
121e5f: 75 07 jne 121e68 <pthread_kill+0x84>
_Thread_Dispatch_necessary = true;
121e61: c6 05 68 a9 12 00 01 movb $0x1,0x12a968
}
_Thread_Enable_dispatch();
121e68: e8 65 df fe ff call 10fdd2 <_Thread_Enable_dispatch>
return 0;
121e6d: 31 c0 xor %eax,%eax
121e6f: eb 0e jmp 121e7f <pthread_kill+0x9b>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
121e71: e8 96 36 ff ff call 11550c <__errno> <== NOT EXECUTED
121e76: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
121e7c: 83 c8 ff or $0xffffffff,%eax
}
121e7f: 8d 65 f4 lea -0xc(%ebp),%esp
121e82: 5b pop %ebx
121e83: 5e pop %esi
121e84: 5f pop %edi
121e85: c9 leave
121e86: c3 ret
0010b598 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10b598: 55 push %ebp
10b599: 89 e5 mov %esp,%ebp
10b59b: 53 push %ebx
10b59c: 83 ec 2c sub $0x2c,%esp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10b59f: 8d 45 f4 lea -0xc(%ebp),%eax
10b5a2: 50 push %eax
10b5a3: ff 75 0c pushl 0xc(%ebp)
10b5a6: e8 b9 00 00 00 call 10b664 <_POSIX_Absolute_timeout_to_ticks>
10b5ab: 89 c3 mov %eax,%ebx
int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex));
int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex));
#if defined(_POSIX_TIMEOUTS)
int _EXFUN(pthread_mutex_timedlock,
10b5ad: 83 c4 0c add $0xc,%esp
10b5b0: 83 f8 03 cmp $0x3,%eax
10b5b3: 0f 94 c2 sete %dl
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10b5b6: ff 75 f4 pushl -0xc(%ebp)
10b5b9: 0f b6 c2 movzbl %dl,%eax
10b5bc: 50 push %eax
10b5bd: ff 75 08 pushl 0x8(%ebp)
10b5c0: 88 55 e4 mov %dl,-0x1c(%ebp)
10b5c3: e8 e8 fe ff ff call 10b4b0 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10b5c8: 83 c4 10 add $0x10,%esp
10b5cb: 8a 55 e4 mov -0x1c(%ebp),%dl
10b5ce: 84 d2 test %dl,%dl
10b5d0: 75 1d jne 10b5ef <pthread_mutex_timedlock+0x57>
10b5d2: 83 f8 10 cmp $0x10,%eax
10b5d5: 75 18 jne 10b5ef <pthread_mutex_timedlock+0x57><== NEVER TAKEN
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10b5d7: 85 db test %ebx,%ebx
10b5d9: 74 08 je 10b5e3 <pthread_mutex_timedlock+0x4b><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10b5db: 4b dec %ebx
10b5dc: 83 fb 01 cmp $0x1,%ebx
10b5df: 77 0e ja 10b5ef <pthread_mutex_timedlock+0x57><== NEVER TAKEN
10b5e1: eb 07 jmp 10b5ea <pthread_mutex_timedlock+0x52>
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10b5e3: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10b5e8: eb 05 jmp 10b5ef <pthread_mutex_timedlock+0x57><== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10b5ea: b8 74 00 00 00 mov $0x74,%eax
}
return lock_status;
}
10b5ef: 8b 5d fc mov -0x4(%ebp),%ebx
10b5f2: c9 leave
10b5f3: c3 ret
0010b210 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10b210: 55 push %ebp
10b211: 89 e5 mov %esp,%ebp
10b213: 8b 55 08 mov 0x8(%ebp),%edx
10b216: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
10b219: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
10b21e: 85 d2 test %edx,%edx
10b220: 74 0f je 10b231 <pthread_mutexattr_setpshared+0x21>
10b222: 83 3a 00 cmpl $0x0,(%edx)
10b225: 74 0a je 10b231 <pthread_mutexattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b227: 83 f9 01 cmp $0x1,%ecx
10b22a: 77 05 ja 10b231 <pthread_mutexattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b22c: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b22f: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b231: c9 leave
10b232: c3 ret
00109438 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
109438: 55 push %ebp
109439: 89 e5 mov %esp,%ebp
10943b: 8b 55 08 mov 0x8(%ebp),%edx
10943e: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr || !attr->is_initialized )
return EINVAL;
109441: b8 16 00 00 00 mov $0x16,%eax
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
109446: 85 d2 test %edx,%edx
109448: 74 0f je 109459 <pthread_mutexattr_settype+0x21>
10944a: 83 3a 00 cmpl $0x0,(%edx)
10944d: 74 0a je 109459 <pthread_mutexattr_settype+0x21><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10944f: 83 f9 03 cmp $0x3,%ecx
109452: 77 05 ja 109459 <pthread_mutexattr_settype+0x21>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
109454: 89 4a 10 mov %ecx,0x10(%edx)
return 0;
109457: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
109459: c9 leave
10945a: c3 ret
00109ee8 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
109ee8: 55 push %ebp
109ee9: 89 e5 mov %esp,%ebp
109eeb: 56 push %esi
109eec: 53 push %ebx
109eed: 83 ec 10 sub $0x10,%esp
109ef0: 8b 5d 08 mov 0x8(%ebp),%ebx
109ef3: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
109ef6: 85 f6 test %esi,%esi
109ef8: 74 51 je 109f4b <pthread_once+0x63>
109efa: 85 db test %ebx,%ebx
109efc: 74 4d je 109f4b <pthread_once+0x63>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
109efe: 31 c0 xor %eax,%eax
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
109f00: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
109f04: 75 4a jne 109f50 <pthread_once+0x68>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
109f06: 52 push %edx
109f07: 8d 45 f4 lea -0xc(%ebp),%eax
109f0a: 50 push %eax
109f0b: 68 00 01 00 00 push $0x100
109f10: 68 00 01 00 00 push $0x100
109f15: e8 fa 09 00 00 call 10a914 <rtems_task_mode>
if ( !once_control->init_executed ) {
109f1a: 83 c4 10 add $0x10,%esp
109f1d: 83 7b 04 00 cmpl $0x0,0x4(%ebx)
109f21: 75 0f jne 109f32 <pthread_once+0x4a> <== NEVER TAKEN
once_control->is_initialized = true;
109f23: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
109f29: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
109f30: ff d6 call *%esi
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
109f32: 50 push %eax
109f33: 8d 45 f4 lea -0xc(%ebp),%eax
109f36: 50 push %eax
109f37: 68 00 01 00 00 push $0x100
109f3c: ff 75 f4 pushl -0xc(%ebp)
109f3f: e8 d0 09 00 00 call 10a914 <rtems_task_mode>
109f44: 83 c4 10 add $0x10,%esp
}
return 0;
109f47: 31 c0 xor %eax,%eax
109f49: eb 05 jmp 109f50 <pthread_once+0x68>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
109f4b: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
109f50: 8d 65 f8 lea -0x8(%ebp),%esp
109f53: 5b pop %ebx
109f54: 5e pop %esi
109f55: c9 leave
109f56: c3 ret
0010a714 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10a714: 55 push %ebp
10a715: 89 e5 mov %esp,%ebp
10a717: 56 push %esi
10a718: 53 push %ebx
10a719: 83 ec 10 sub $0x10,%esp
10a71c: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Error check parameters
*/
if ( !rwlock )
return EINVAL;
10a71f: b8 16 00 00 00 mov $0x16,%eax
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10a724: 85 db test %ebx,%ebx
10a726: 0f 84 8b 00 00 00 je 10a7b7 <pthread_rwlock_init+0xa3>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10a72c: 8b 75 0c mov 0xc(%ebp),%esi
10a72f: 85 f6 test %esi,%esi
10a731: 75 0f jne 10a742 <pthread_rwlock_init+0x2e>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10a733: 83 ec 0c sub $0xc,%esp
10a736: 8d 75 ec lea -0x14(%ebp),%esi
10a739: 56 push %esi
10a73a: e8 5d 09 00 00 call 10b09c <pthread_rwlockattr_init>
10a73f: 83 c4 10 add $0x10,%esp
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
10a742: b8 16 00 00 00 mov $0x16,%eax
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10a747: 83 3e 00 cmpl $0x0,(%esi)
10a74a: 74 6b je 10a7b7 <pthread_rwlock_init+0xa3><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10a74c: 83 7e 04 00 cmpl $0x0,0x4(%esi)
10a750: 75 65 jne 10a7b7 <pthread_rwlock_init+0xa3><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10a752: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10a759: a1 f4 82 12 00 mov 0x1282f4,%eax
10a75e: 40 inc %eax
10a75f: a3 f4 82 12 00 mov %eax,0x1282f4
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
10a764: 83 ec 0c sub $0xc,%esp
10a767: 68 d4 84 12 00 push $0x1284d4
10a76c: e8 97 21 00 00 call 10c908 <_Objects_Allocate>
10a771: 89 c6 mov %eax,%esi
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10a773: 83 c4 10 add $0x10,%esp
10a776: 85 c0 test %eax,%eax
10a778: 75 0c jne 10a786 <pthread_rwlock_init+0x72>
_Thread_Enable_dispatch();
10a77a: e8 fb 2f 00 00 call 10d77a <_Thread_Enable_dispatch>
return EAGAIN;
10a77f: b8 0b 00 00 00 mov $0xb,%eax
10a784: eb 31 jmp 10a7b7 <pthread_rwlock_init+0xa3>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10a786: 50 push %eax
10a787: 50 push %eax
10a788: 8d 45 f4 lea -0xc(%ebp),%eax
10a78b: 50 push %eax
10a78c: 8d 46 10 lea 0x10(%esi),%eax
10a78f: 50 push %eax
10a790: e8 df 19 00 00 call 10c174 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10a795: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10a798: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10a79b: 8b 15 f0 84 12 00 mov 0x1284f0,%edx
10a7a1: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10a7a4: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10a7ab: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10a7ad: e8 c8 2f 00 00 call 10d77a <_Thread_Enable_dispatch>
return 0;
10a7b2: 83 c4 10 add $0x10,%esp
10a7b5: 31 c0 xor %eax,%eax
}
10a7b7: 8d 65 f8 lea -0x8(%ebp),%esp
10a7ba: 5b pop %ebx
10a7bb: 5e pop %esi
10a7bc: c9 leave
10a7bd: c3 ret
0010a828 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10a828: 55 push %ebp
10a829: 89 e5 mov %esp,%ebp
10a82b: 57 push %edi
10a82c: 56 push %esi
10a82d: 53 push %ebx
10a82e: 83 ec 2c sub $0x2c,%esp
10a831: 8b 7d 08 mov 0x8(%ebp),%edi
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
10a834: bb 16 00 00 00 mov $0x16,%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10a839: 85 ff test %edi,%edi
10a83b: 0f 84 87 00 00 00 je 10a8c8 <pthread_rwlock_timedrdlock+0xa0>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10a841: 50 push %eax
10a842: 50 push %eax
10a843: 8d 45 e0 lea -0x20(%ebp),%eax
10a846: 50 push %eax
10a847: ff 75 0c pushl 0xc(%ebp)
10a84a: e8 35 59 00 00 call 110184 <_POSIX_Absolute_timeout_to_ticks>
10a84f: 89 c6 mov %eax,%esi
10a851: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10a854: 8d 45 e4 lea -0x1c(%ebp),%eax
10a857: 50 push %eax
10a858: ff 37 pushl (%edi)
10a85a: 68 d4 84 12 00 push $0x1284d4
10a85f: e8 d0 24 00 00 call 10cd34 <_Objects_Get>
switch ( location ) {
10a864: 83 c4 10 add $0x10,%esp
10a867: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a86b: 75 5b jne 10a8c8 <pthread_rwlock_timedrdlock+0xa0>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
10a86d: 83 fe 03 cmp $0x3,%esi
10a870: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10a873: 83 ec 0c sub $0xc,%esp
10a876: 6a 00 push $0x0
10a878: ff 75 e0 pushl -0x20(%ebp)
10a87b: 0f b6 ca movzbl %dl,%ecx
10a87e: 51 push %ecx
10a87f: ff 37 pushl (%edi)
10a881: 83 c0 10 add $0x10,%eax
10a884: 50 push %eax
10a885: 88 55 d4 mov %dl,-0x2c(%ebp)
10a888: e8 1b 19 00 00 call 10c1a8 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10a88d: 83 c4 20 add $0x20,%esp
10a890: e8 e5 2e 00 00 call 10d77a <_Thread_Enable_dispatch>
if ( !do_wait ) {
10a895: 8a 55 d4 mov -0x2c(%ebp),%dl
10a898: 84 d2 test %dl,%dl
10a89a: 75 17 jne 10a8b3 <pthread_rwlock_timedrdlock+0x8b>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10a89c: a1 18 88 12 00 mov 0x128818,%eax
10a8a1: 83 78 34 02 cmpl $0x2,0x34(%eax)
10a8a5: 75 0c jne 10a8b3 <pthread_rwlock_timedrdlock+0x8b>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10a8a7: 85 f6 test %esi,%esi
10a8a9: 74 1d je 10a8c8 <pthread_rwlock_timedrdlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a8ab: 4e dec %esi
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10a8ac: b3 74 mov $0x74,%bl
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a8ae: 83 fe 01 cmp $0x1,%esi
10a8b1: 76 15 jbe 10a8c8 <pthread_rwlock_timedrdlock+0xa0><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a8b3: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10a8b6: a1 18 88 12 00 mov 0x128818,%eax
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a8bb: ff 70 34 pushl 0x34(%eax)
10a8be: e8 bd 00 00 00 call 10a980 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10a8c3: 89 c3 mov %eax,%ebx
10a8c5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a8c8: 89 d8 mov %ebx,%eax
10a8ca: 8d 65 f4 lea -0xc(%ebp),%esp
10a8cd: 5b pop %ebx
10a8ce: 5e pop %esi
10a8cf: 5f pop %edi
10a8d0: c9 leave
10a8d1: c3 ret
0010a8d4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10a8d4: 55 push %ebp
10a8d5: 89 e5 mov %esp,%ebp
10a8d7: 57 push %edi
10a8d8: 56 push %esi
10a8d9: 53 push %ebx
10a8da: 83 ec 2c sub $0x2c,%esp
10a8dd: 8b 7d 08 mov 0x8(%ebp),%edi
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
10a8e0: bb 16 00 00 00 mov $0x16,%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10a8e5: 85 ff test %edi,%edi
10a8e7: 0f 84 87 00 00 00 je 10a974 <pthread_rwlock_timedwrlock+0xa0>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
10a8ed: 50 push %eax
10a8ee: 50 push %eax
10a8ef: 8d 45 e0 lea -0x20(%ebp),%eax
10a8f2: 50 push %eax
10a8f3: ff 75 0c pushl 0xc(%ebp)
10a8f6: e8 89 58 00 00 call 110184 <_POSIX_Absolute_timeout_to_ticks>
10a8fb: 89 c6 mov %eax,%esi
10a8fd: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10a900: 8d 45 e4 lea -0x1c(%ebp),%eax
10a903: 50 push %eax
10a904: ff 37 pushl (%edi)
10a906: 68 d4 84 12 00 push $0x1284d4
10a90b: e8 24 24 00 00 call 10cd34 <_Objects_Get>
switch ( location ) {
10a910: 83 c4 10 add $0x10,%esp
10a913: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a917: 75 5b jne 10a974 <pthread_rwlock_timedwrlock+0xa0>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
10a919: 83 fe 03 cmp $0x3,%esi
10a91c: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10a91f: 83 ec 0c sub $0xc,%esp
10a922: 6a 00 push $0x0
10a924: ff 75 e0 pushl -0x20(%ebp)
10a927: 0f b6 ca movzbl %dl,%ecx
10a92a: 51 push %ecx
10a92b: ff 37 pushl (%edi)
10a92d: 83 c0 10 add $0x10,%eax
10a930: 50 push %eax
10a931: 88 55 d4 mov %dl,-0x2c(%ebp)
10a934: e8 27 19 00 00 call 10c260 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10a939: 83 c4 20 add $0x20,%esp
10a93c: e8 39 2e 00 00 call 10d77a <_Thread_Enable_dispatch>
if ( !do_wait &&
10a941: 8a 55 d4 mov -0x2c(%ebp),%dl
10a944: 84 d2 test %dl,%dl
10a946: 75 17 jne 10a95f <pthread_rwlock_timedwrlock+0x8b>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10a948: a1 18 88 12 00 mov 0x128818,%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10a94d: 83 78 34 02 cmpl $0x2,0x34(%eax)
10a951: 75 0c jne 10a95f <pthread_rwlock_timedwrlock+0x8b>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10a953: 85 f6 test %esi,%esi
10a955: 74 1d je 10a974 <pthread_rwlock_timedwrlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a957: 4e dec %esi
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10a958: b3 74 mov $0x74,%bl
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10a95a: 83 fe 01 cmp $0x1,%esi
10a95d: 76 15 jbe 10a974 <pthread_rwlock_timedwrlock+0xa0><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a95f: 83 ec 0c sub $0xc,%esp
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
10a962: a1 18 88 12 00 mov 0x128818,%eax
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10a967: ff 70 34 pushl 0x34(%eax)
10a96a: e8 11 00 00 00 call 10a980 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10a96f: 89 c3 mov %eax,%ebx
10a971: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10a974: 89 d8 mov %ebx,%eax
10a976: 8d 65 f4 lea -0xc(%ebp),%esp
10a979: 5b pop %ebx
10a97a: 5e pop %esi
10a97b: 5f pop %edi
10a97c: c9 leave
10a97d: c3 ret
0010b0bc <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10b0bc: 55 push %ebp
10b0bd: 89 e5 mov %esp,%ebp
10b0bf: 8b 55 08 mov 0x8(%ebp),%edx
10b0c2: 8b 4d 0c mov 0xc(%ebp),%ecx
if ( !attr )
return EINVAL;
10b0c5: b8 16 00 00 00 mov $0x16,%eax
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
10b0ca: 85 d2 test %edx,%edx
10b0cc: 74 0f je 10b0dd <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
if ( !attr->is_initialized )
10b0ce: 83 3a 00 cmpl $0x0,(%edx)
10b0d1: 74 0a je 10b0dd <pthread_rwlockattr_setpshared+0x21>
return EINVAL;
switch ( pshared ) {
10b0d3: 83 f9 01 cmp $0x1,%ecx
10b0d6: 77 05 ja 10b0dd <pthread_rwlockattr_setpshared+0x21><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10b0d8: 89 4a 04 mov %ecx,0x4(%edx)
return 0;
10b0db: 30 c0 xor %al,%al
default:
return EINVAL;
}
}
10b0dd: c9 leave
10b0de: c3 ret
0010bdb8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10bdb8: 55 push %ebp
10bdb9: 89 e5 mov %esp,%ebp
10bdbb: 57 push %edi
10bdbc: 56 push %esi
10bdbd: 53 push %ebx
10bdbe: 83 ec 2c sub $0x2c,%esp
10bdc1: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10bdc4: c7 45 d4 16 00 00 00 movl $0x16,-0x2c(%ebp)
int rc;
/*
* Check all the parameters
*/
if ( !param )
10bdcb: 85 f6 test %esi,%esi
10bdcd: 0f 84 fc 00 00 00 je 10becf <pthread_setschedparam+0x117>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10bdd3: 8d 45 e0 lea -0x20(%ebp),%eax
10bdd6: 50 push %eax
10bdd7: 8d 45 e4 lea -0x1c(%ebp),%eax
10bdda: 50 push %eax
10bddb: 56 push %esi
10bddc: ff 75 0c pushl 0xc(%ebp)
10bddf: e8 f0 52 00 00 call 1110d4 <_POSIX_Thread_Translate_sched_param>
10bde4: 89 45 d4 mov %eax,-0x2c(%ebp)
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10bde7: 83 c4 10 add $0x10,%esp
10bdea: 85 c0 test %eax,%eax
10bdec: 0f 85 dd 00 00 00 jne 10becf <pthread_setschedparam+0x117>
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10bdf2: 53 push %ebx
10bdf3: 53 push %ebx
10bdf4: 8d 45 dc lea -0x24(%ebp),%eax
10bdf7: 50 push %eax
10bdf8: ff 75 08 pushl 0x8(%ebp)
10bdfb: e8 4c 25 00 00 call 10e34c <_Thread_Get>
10be00: 89 c2 mov %eax,%edx
switch ( location ) {
10be02: 83 c4 10 add $0x10,%esp
10be05: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
10be09: 0f 85 b9 00 00 00 jne 10bec8 <pthread_setschedparam+0x110>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10be0f: 8b 98 ec 00 00 00 mov 0xec(%eax),%ebx
if ( api->schedpolicy == SCHED_SPORADIC )
10be15: 83 bb 84 00 00 00 04 cmpl $0x4,0x84(%ebx)
10be1c: 75 18 jne 10be36 <pthread_setschedparam+0x7e>
(void) _Watchdog_Remove( &api->Sporadic_timer );
10be1e: 83 ec 0c sub $0xc,%esp
10be21: 8d 83 a8 00 00 00 lea 0xa8(%ebx),%eax
10be27: 50 push %eax
10be28: 89 55 d0 mov %edx,-0x30(%ebp)
10be2b: e8 60 33 00 00 call 10f190 <_Watchdog_Remove>
10be30: 83 c4 10 add $0x10,%esp
10be33: 8b 55 d0 mov -0x30(%ebp),%edx
api->schedpolicy = policy;
10be36: 8b 45 0c mov 0xc(%ebp),%eax
10be39: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
api->schedparam = *param;
10be3f: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
10be45: b9 07 00 00 00 mov $0x7,%ecx
10be4a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10be4c: 8b 45 e4 mov -0x1c(%ebp),%eax
10be4f: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10be52: 8b 45 e0 mov -0x20(%ebp),%eax
10be55: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10be5b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
10be5f: 78 60 js 10bec1 <pthread_setschedparam+0x109><== NEVER TAKEN
10be61: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10be65: 7e 08 jle 10be6f <pthread_setschedparam+0xb7>
10be67: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10be6b: 75 54 jne 10bec1 <pthread_setschedparam+0x109><== NEVER TAKEN
10be6d: eb 24 jmp 10be93 <pthread_setschedparam+0xdb>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10be6f: a1 08 93 12 00 mov 0x129308,%eax
10be74: 89 42 78 mov %eax,0x78(%edx)
10be77: 0f b6 05 48 52 12 00 movzbl 0x125248,%eax
10be7e: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
the_thread->real_priority =
10be84: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10be87: 51 push %ecx
10be88: 6a 01 push $0x1
10be8a: 50 push %eax
10be8b: 52 push %edx
10be8c: e8 c3 20 00 00 call 10df54 <_Thread_Change_priority>
10be91: eb 2b jmp 10bebe <pthread_setschedparam+0x106>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10be93: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10be99: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
_Watchdog_Remove( &api->Sporadic_timer );
10be9f: 83 ec 0c sub $0xc,%esp
10bea2: 81 c3 a8 00 00 00 add $0xa8,%ebx
10bea8: 53 push %ebx
10bea9: 89 55 d0 mov %edx,-0x30(%ebp)
10beac: e8 df 32 00 00 call 10f190 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10beb1: 58 pop %eax
10beb2: 5a pop %edx
10beb3: 8b 55 d0 mov -0x30(%ebp),%edx
10beb6: 52 push %edx
10beb7: 6a 00 push $0x0
10beb9: e8 e5 fd ff ff call 10bca3 <_POSIX_Threads_Sporadic_budget_TSR>
break;
10bebe: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10bec1: e8 64 24 00 00 call 10e32a <_Thread_Enable_dispatch>
return 0;
10bec6: eb 07 jmp 10becf <pthread_setschedparam+0x117>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10bec8: c7 45 d4 03 00 00 00 movl $0x3,-0x2c(%ebp)
}
10becf: 8b 45 d4 mov -0x2c(%ebp),%eax
10bed2: 8d 65 f4 lea -0xc(%ebp),%esp
10bed5: 5b pop %ebx
10bed6: 5e pop %esi
10bed7: 5f pop %edi
10bed8: c9 leave
10bed9: c3 ret
00109cb0 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
109cb0: 55 push %ebp
109cb1: 89 e5 mov %esp,%ebp
109cb3: 53 push %ebx
109cb4: 83 ec 04 sub $0x4,%esp
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
109cb7: 83 3d ec 67 12 00 00 cmpl $0x0,0x1267ec
109cbe: 75 48 jne 109d08 <pthread_testcancel+0x58><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
109cc0: a1 f0 67 12 00 mov 0x1267f0,%eax
109cc5: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
109ccb: 8b 15 cc 62 12 00 mov 0x1262cc,%edx
109cd1: 42 inc %edx
109cd2: 89 15 cc 62 12 00 mov %edx,0x1262cc
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
109cd8: 31 db xor %ebx,%ebx
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
109cda: 83 b8 d8 00 00 00 00 cmpl $0x0,0xd8(%eax)
109ce1: 75 0a jne 109ced <pthread_testcancel+0x3d><== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
109ce3: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax)
109cea: 0f 95 c3 setne %bl
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
109ced: e8 dc 23 00 00 call 10c0ce <_Thread_Enable_dispatch>
if ( cancel )
109cf2: 84 db test %bl,%bl
109cf4: 74 12 je 109d08 <pthread_testcancel+0x58>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
109cf6: 50 push %eax
109cf7: 50 push %eax
109cf8: 6a ff push $0xffffffff
109cfa: ff 35 f0 67 12 00 pushl 0x1267f0
109d00: e8 8f 52 00 00 call 10ef94 <_POSIX_Thread_Exit>
109d05: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
109d08: 8b 5d fc mov -0x4(%ebp),%ebx
109d0b: c9 leave
109d0c: c3 ret
0010a5a5 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10a5a5: 55 push %ebp
10a5a6: 89 e5 mov %esp,%ebp
10a5a8: 57 push %edi
10a5a9: 56 push %esi
10a5aa: 53 push %ebx
10a5ab: 83 ec 58 sub $0x58,%esp
10a5ae: 8b 5d 08 mov 0x8(%ebp),%ebx
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
10a5b1: 68 60 72 12 00 push $0x127260
10a5b6: e8 c5 08 00 00 call 10ae80 <pthread_mutex_lock>
10a5bb: 89 45 b4 mov %eax,-0x4c(%ebp)
if (result != 0) {
10a5be: 83 c4 10 add $0x10,%esp
10a5c1: 85 c0 test %eax,%eax
10a5c3: 74 0e je 10a5d3 <rtems_aio_enqueue+0x2e><== ALWAYS TAKEN
free (req);
10a5c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a5c8: 53 push %ebx <== NOT EXECUTED
10a5c9: e8 c2 cd ff ff call 107390 <free> <== NOT EXECUTED
10a5ce: e9 c6 01 00 00 jmp 10a799 <rtems_aio_enqueue+0x1f4><== NOT EXECUTED
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10a5d3: e8 a4 10 00 00 call 10b67c <pthread_self>
10a5d8: 57 push %edi
10a5d9: 8d 55 c4 lea -0x3c(%ebp),%edx
10a5dc: 52 push %edx
10a5dd: 8d 55 e0 lea -0x20(%ebp),%edx
10a5e0: 52 push %edx
10a5e1: 50 push %eax
10a5e2: e8 9d 0c 00 00 call 10b284 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10a5e7: e8 90 10 00 00 call 10b67c <pthread_self>
10a5ec: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10a5ef: 8b 43 14 mov 0x14(%ebx),%eax
10a5f2: 8b 55 c4 mov -0x3c(%ebp),%edx
10a5f5: 2b 50 14 sub 0x14(%eax),%edx
10a5f8: 89 53 0c mov %edx,0xc(%ebx)
req->policy = policy;
10a5fb: 8b 55 e0 mov -0x20(%ebp),%edx
10a5fe: 89 53 08 mov %edx,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10a601: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax)
req->aiocbp->return_value = 0;
10a608: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
if ((aio_request_queue.idle_threads == 0) &&
10a60f: 83 c4 10 add $0x10,%esp
10a612: 83 3d c8 72 12 00 00 cmpl $0x0,0x1272c8
10a619: 0f 85 b7 00 00 00 jne 10a6d6 <rtems_aio_enqueue+0x131><== NEVER TAKEN
10a61f: 83 3d c4 72 12 00 04 cmpl $0x4,0x1272c4
10a626: 0f 8f aa 00 00 00 jg 10a6d6 <rtems_aio_enqueue+0x131>
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10a62c: 56 push %esi
10a62d: 6a 01 push $0x1
10a62f: ff 30 pushl (%eax)
10a631: 68 a8 72 12 00 push $0x1272a8
10a636: e8 81 fb ff ff call 10a1bc <rtems_aio_search_fd>
10a63b: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a63d: 83 c4 10 add $0x10,%esp
10a640: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a644: 8d 50 08 lea 0x8(%eax),%edx
10a647: 8d 78 1c lea 0x1c(%eax),%edi
10a64a: 8d 40 20 lea 0x20(%eax),%eax
10a64d: 89 45 b0 mov %eax,-0x50(%ebp)
10a650: 75 66 jne 10a6b8 <rtems_aio_enqueue+0x113>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10a652: 51 push %ecx
10a653: 51 push %ecx
10a654: 53 push %ebx
10a655: 52 push %edx
10a656: e8 1d 1f 00 00 call 10c578 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10a65b: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a662: 5b pop %ebx
10a663: 58 pop %eax
10a664: 6a 00 push $0x0
10a666: 57 push %edi
10a667: e8 f4 06 00 00 call 10ad60 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a66c: 5a pop %edx
10a66d: 59 pop %ecx
10a66e: 6a 00 push $0x0
10a670: ff 75 b0 pushl -0x50(%ebp)
10a673: e8 a8 03 00 00 call 10aa20 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10a678: 56 push %esi
10a679: 68 98 a2 10 00 push $0x10a298
10a67e: 68 68 72 12 00 push $0x127268
10a683: 8d 45 e4 lea -0x1c(%ebp),%eax
10a686: 50 push %eax
10a687: e8 c4 09 00 00 call 10b050 <pthread_create>
10a68c: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10a68e: 83 c4 20 add $0x20,%esp
10a691: 85 c0 test %eax,%eax
10a693: 74 18 je 10a6ad <rtems_aio_enqueue+0x108><== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
10a695: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a698: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
10a69d: e8 5e 08 00 00 call 10af00 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10a6a2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a6a5: 89 5d b4 mov %ebx,-0x4c(%ebp) <== NOT EXECUTED
10a6a8: e9 ef 00 00 00 jmp 10a79c <rtems_aio_enqueue+0x1f7><== NOT EXECUTED
}
++aio_request_queue.active_threads;
10a6ad: ff 05 c4 72 12 00 incl 0x1272c4
10a6b3: e9 d4 00 00 00 jmp 10a78c <rtems_aio_enqueue+0x1e7>
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
10a6b8: 83 ec 0c sub $0xc,%esp
10a6bb: 57 push %edi
10a6bc: 89 55 ac mov %edx,-0x54(%ebp)
10a6bf: e8 bc 07 00 00 call 10ae80 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10a6c4: 5e pop %esi
10a6c5: 58 pop %eax
10a6c6: 53 push %ebx
10a6c7: 8b 55 ac mov -0x54(%ebp),%edx
10a6ca: 52 push %edx
10a6cb: e8 ec fd ff ff call 10a4bc <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10a6d0: 5b pop %ebx
10a6d1: ff 75 b0 pushl -0x50(%ebp)
10a6d4: eb 36 jmp 10a70c <rtems_aio_enqueue+0x167>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10a6d6: 51 push %ecx
10a6d7: 6a 00 push $0x0
10a6d9: ff 30 pushl (%eax)
10a6db: 68 a8 72 12 00 push $0x1272a8
10a6e0: e8 d7 fa ff ff call 10a1bc <rtems_aio_search_fd>
10a6e5: 89 c6 mov %eax,%esi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10a6e7: 83 c4 10 add $0x10,%esp
10a6ea: 85 c0 test %eax,%eax
10a6ec: 74 2d je 10a71b <rtems_aio_enqueue+0x176>
{
pthread_mutex_lock (&r_chain->mutex);
10a6ee: 8d 78 1c lea 0x1c(%eax),%edi
10a6f1: 83 ec 0c sub $0xc,%esp
10a6f4: 57 push %edi
10a6f5: e8 86 07 00 00 call 10ae80 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10a6fa: 58 pop %eax
10a6fb: 5a pop %edx
10a6fc: 53 push %ebx
10a6fd: 8d 46 08 lea 0x8(%esi),%eax
10a700: 50 push %eax
10a701: e8 b6 fd ff ff call 10a4bc <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10a706: 83 c6 20 add $0x20,%esi
10a709: 89 34 24 mov %esi,(%esp)
10a70c: e8 ab 03 00 00 call 10aabc <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10a711: 89 3c 24 mov %edi,(%esp)
10a714: e8 e7 07 00 00 call 10af00 <pthread_mutex_unlock>
10a719: eb 6e jmp 10a789 <rtems_aio_enqueue+0x1e4>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10a71b: 56 push %esi
10a71c: 6a 01 push $0x1
10a71e: 8b 43 14 mov 0x14(%ebx),%eax
10a721: ff 30 pushl (%eax)
10a723: 68 b4 72 12 00 push $0x1272b4
10a728: e8 8f fa ff ff call 10a1bc <rtems_aio_search_fd>
10a72d: 89 c6 mov %eax,%esi
if (r_chain->new_fd == 1) {
10a72f: 83 c4 10 add $0x10,%esp
10a732: 83 78 18 01 cmpl $0x1,0x18(%eax)
10a736: 8d 40 08 lea 0x8(%eax),%eax
10a739: 75 2c jne 10a767 <rtems_aio_enqueue+0x1c2>
10a73b: 51 push %ecx
10a73c: 51 push %ecx
10a73d: 53 push %ebx
10a73e: 50 push %eax
10a73f: e8 34 1e 00 00 call 10c578 <_Chain_Insert>
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10a744: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
pthread_mutex_init (&r_chain->mutex, NULL);
10a74b: 58 pop %eax
10a74c: 5a pop %edx
10a74d: 6a 00 push $0x0
10a74f: 8d 46 1c lea 0x1c(%esi),%eax
10a752: 50 push %eax
10a753: e8 08 06 00 00 call 10ad60 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10a758: 5b pop %ebx
10a759: 5f pop %edi
10a75a: 6a 00 push $0x0
10a75c: 83 c6 20 add $0x20,%esi
10a75f: 56 push %esi
10a760: e8 bb 02 00 00 call 10aa20 <pthread_cond_init>
10a765: eb 09 jmp 10a770 <rtems_aio_enqueue+0x1cb>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10a767: 51 push %ecx
10a768: 51 push %ecx
10a769: 53 push %ebx
10a76a: 50 push %eax
10a76b: e8 4c fd ff ff call 10a4bc <rtems_aio_insert_prio>
10a770: 83 c4 10 add $0x10,%esp
if (aio_request_queue.idle_threads > 0)
10a773: 83 3d c8 72 12 00 00 cmpl $0x0,0x1272c8
10a77a: 7e 10 jle 10a78c <rtems_aio_enqueue+0x1e7><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10a77c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a77f: 68 64 72 12 00 push $0x127264 <== NOT EXECUTED
10a784: e8 33 03 00 00 call 10aabc <pthread_cond_signal> <== NOT EXECUTED
10a789: 83 c4 10 add $0x10,%esp
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10a78c: 83 ec 0c sub $0xc,%esp
10a78f: 68 60 72 12 00 push $0x127260
10a794: e8 67 07 00 00 call 10af00 <pthread_mutex_unlock>
return 0;
10a799: 83 c4 10 add $0x10,%esp
}
10a79c: 8b 45 b4 mov -0x4c(%ebp),%eax
10a79f: 8d 65 f4 lea -0xc(%ebp),%esp
10a7a2: 5b pop %ebx
10a7a3: 5e pop %esi
10a7a4: 5f pop %edi
10a7a5: c9 leave
10a7a6: c3 ret
0010a298 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10a298: 55 push %ebp
10a299: 89 e5 mov %esp,%ebp
10a29b: 57 push %edi
10a29c: 56 push %esi
10a29d: 53 push %ebx
10a29e: 83 ec 4c sub $0x4c,%esp
rtems_aio_request_chain *r_chain = arg;
10a2a1: 8b 5d 08 mov 0x8(%ebp),%ebx
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
10a2a4: 8d 7d dc lea -0x24(%ebp),%edi
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10a2a7: 8d 43 1c lea 0x1c(%ebx),%eax
10a2aa: 89 45 b4 mov %eax,-0x4c(%ebp)
10a2ad: 83 ec 0c sub $0xc,%esp
10a2b0: 50 push %eax
10a2b1: e8 ca 0b 00 00 call 10ae80 <pthread_mutex_lock>
if (result != 0)
10a2b6: 83 c4 10 add $0x10,%esp
10a2b9: 85 c0 test %eax,%eax
10a2bb: 0f 85 f1 01 00 00 jne 10a4b2 <rtems_aio_handle+0x21a><== NEVER TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a2c1: 8b 73 08 mov 0x8(%ebx),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a2c4: 8d 43 0c lea 0xc(%ebx),%eax
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
10a2c7: 39 c6 cmp %eax,%esi
10a2c9: 0f 84 cd 00 00 00 je 10a39c <rtems_aio_handle+0x104>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10a2cf: e8 a8 13 00 00 call 10b67c <pthread_self>
10a2d4: 52 push %edx
10a2d5: 8d 55 c0 lea -0x40(%ebp),%edx
10a2d8: 52 push %edx
10a2d9: 8d 4d e4 lea -0x1c(%ebp),%ecx
10a2dc: 51 push %ecx
10a2dd: 50 push %eax
10a2de: e8 a1 0f 00 00 call 10b284 <pthread_getschedparam>
param.sched_priority = req->priority;
10a2e3: 8b 46 0c mov 0xc(%esi),%eax
10a2e6: 89 45 c0 mov %eax,-0x40(%ebp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10a2e9: 8b 56 08 mov 0x8(%esi),%edx
10a2ec: 89 55 b0 mov %edx,-0x50(%ebp)
10a2ef: e8 88 13 00 00 call 10b67c <pthread_self>
10a2f4: 83 c4 0c add $0xc,%esp
10a2f7: 8d 4d c0 lea -0x40(%ebp),%ecx
10a2fa: 51 push %ecx
10a2fb: 8b 55 b0 mov -0x50(%ebp),%edx
10a2fe: 52 push %edx
10a2ff: 50 push %eax
10a300: e8 87 13 00 00 call 10b68c <pthread_setschedparam>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10a305: 89 34 24 mov %esi,(%esp)
10a308: e8 2f 22 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10a30d: 59 pop %ecx
10a30e: ff 75 b4 pushl -0x4c(%ebp)
10a311: e8 ea 0b 00 00 call 10af00 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10a316: 8b 46 14 mov 0x14(%esi),%eax
10a319: 83 c4 10 add $0x10,%esp
10a31c: 8b 50 2c mov 0x2c(%eax),%edx
10a31f: 83 fa 02 cmp $0x2,%edx
10a322: 74 20 je 10a344 <rtems_aio_handle+0xac>
10a324: 83 fa 03 cmp $0x3,%edx
10a327: 74 36 je 10a35f <rtems_aio_handle+0xc7> <== NEVER TAKEN
10a329: 4a dec %edx
10a32a: 75 45 jne 10a371 <rtems_aio_handle+0xd9> <== NEVER TAKEN
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10a32c: 83 ec 0c sub $0xc,%esp
10a32f: ff 70 08 pushl 0x8(%eax)
10a332: ff 70 04 pushl 0x4(%eax)
10a335: ff 70 10 pushl 0x10(%eax)
10a338: ff 70 0c pushl 0xc(%eax)
10a33b: ff 30 pushl (%eax)
10a33d: e8 1a 99 00 00 call 113c5c <pread>
10a342: eb 16 jmp 10a35a <rtems_aio_handle+0xc2>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10a344: 83 ec 0c sub $0xc,%esp
10a347: ff 70 08 pushl 0x8(%eax)
10a34a: ff 70 04 pushl 0x4(%eax)
10a34d: ff 70 10 pushl 0x10(%eax)
10a350: ff 70 0c pushl 0xc(%eax)
10a353: ff 30 pushl (%eax)
10a355: e8 b6 99 00 00 call 113d10 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10a35a: 83 c4 20 add $0x20,%esp
10a35d: eb 0d jmp 10a36c <rtems_aio_handle+0xd4>
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10a35f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a362: ff 30 pushl (%eax) <== NOT EXECUTED
10a364: e8 af 5c 00 00 call 110018 <fsync> <== NOT EXECUTED
break;
10a369: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
10a36c: 83 f8 ff cmp $0xffffffff,%eax
10a36f: 75 19 jne 10a38a <rtems_aio_handle+0xf2> <== ALWAYS TAKEN
req->aiocbp->return_value = -1;
10a371: 8b 76 14 mov 0x14(%esi),%esi <== NOT EXECUTED
10a374: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10a37b: e8 a4 8e 00 00 call 113224 <__errno> <== NOT EXECUTED
10a380: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10a382: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED
10a385: e9 1d ff ff ff jmp 10a2a7 <rtems_aio_handle+0xf> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
10a38a: 8b 56 14 mov 0x14(%esi),%edx
10a38d: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10a390: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10a397: e9 0b ff ff ff jmp 10a2a7 <rtems_aio_handle+0xf>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10a39c: 83 ec 0c sub $0xc,%esp
10a39f: ff 75 b4 pushl -0x4c(%ebp)
10a3a2: e8 59 0b 00 00 call 10af00 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10a3a7: c7 04 24 60 72 12 00 movl $0x127260,(%esp)
10a3ae: e8 cd 0a 00 00 call 10ae80 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10a3b3: 83 c4 10 add $0x10,%esp
10a3b6: 39 73 08 cmp %esi,0x8(%ebx)
10a3b9: 0f 85 de 00 00 00 jne 10a49d <rtems_aio_handle+0x205><== NEVER TAKEN
{
clock_gettime (CLOCK_REALTIME, &timeout);
10a3bf: 52 push %edx
10a3c0: 52 push %edx
10a3c1: 57 push %edi
10a3c2: 6a 01 push $0x1
10a3c4: e8 47 05 00 00 call 10a910 <clock_gettime>
timeout.tv_sec += 3;
10a3c9: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10a3cd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&r_chain->cond,
10a3d4: 8d 73 20 lea 0x20(%ebx),%esi
10a3d7: 83 c4 0c add $0xc,%esp
10a3da: 57 push %edi
10a3db: 68 60 72 12 00 push $0x127260
10a3e0: 56 push %esi
10a3e1: e8 46 07 00 00 call 10ab2c <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
10a3e6: 83 c4 10 add $0x10,%esp
10a3e9: 83 f8 74 cmp $0x74,%eax
10a3ec: 0f 85 ab 00 00 00 jne 10a49d <rtems_aio_handle+0x205><== NEVER TAKEN
10a3f2: 83 ec 0c sub $0xc,%esp
10a3f5: 53 push %ebx
10a3f6: e8 41 21 00 00 call 10c53c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10a3fb: 58 pop %eax
10a3fc: ff 75 b4 pushl -0x4c(%ebp)
10a3ff: e8 5c 08 00 00 call 10ac60 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10a404: 89 34 24 mov %esi,(%esp)
10a407: e8 60 05 00 00 call 10a96c <pthread_cond_destroy>
free (r_chain);
10a40c: 89 1c 24 mov %ebx,(%esp)
10a40f: e8 7c cf ff ff call 107390 <free>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10a414: 83 c4 10 add $0x10,%esp
10a417: 81 3d b4 72 12 00 b8 cmpl $0x1272b8,0x1272b4
10a41e: 72 12 00
10a421: 75 54 jne 10a477 <rtems_aio_handle+0x1df>
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10a423: ff 05 c8 72 12 00 incl 0x1272c8
--aio_request_queue.active_threads;
10a429: ff 0d c4 72 12 00 decl 0x1272c4
clock_gettime (CLOCK_REALTIME, &timeout);
10a42f: 53 push %ebx
10a430: 53 push %ebx
10a431: 57 push %edi
10a432: 6a 01 push $0x1
10a434: e8 d7 04 00 00 call 10a910 <clock_gettime>
timeout.tv_sec += 3;
10a439: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10a43d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10a444: 83 c4 0c add $0xc,%esp
10a447: 57 push %edi
10a448: 68 60 72 12 00 push $0x127260
10a44d: 68 64 72 12 00 push $0x127264
10a452: e8 d5 06 00 00 call 10ab2c <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10a457: 83 c4 10 add $0x10,%esp
10a45a: 83 f8 74 cmp $0x74,%eax
10a45d: 75 18 jne 10a477 <rtems_aio_handle+0x1df><== NEVER TAKEN
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10a45f: ff 0d c8 72 12 00 decl 0x1272c8
pthread_mutex_unlock (&aio_request_queue.mutex);
10a465: 83 ec 0c sub $0xc,%esp
10a468: 68 60 72 12 00 push $0x127260
10a46d: e8 8e 0a 00 00 call 10af00 <pthread_mutex_unlock>
return NULL;
10a472: 83 c4 10 add $0x10,%esp
10a475: eb 3b jmp 10a4b2 <rtems_aio_handle+0x21a>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
10a477: ff 0d c8 72 12 00 decl 0x1272c8
++aio_request_queue.active_threads;
10a47d: ff 05 c4 72 12 00 incl 0x1272c4
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a483: 8b 1d b4 72 12 00 mov 0x1272b4,%ebx
10a489: 83 ec 0c sub $0xc,%esp
10a48c: 53 push %ebx
10a48d: e8 aa 20 00 00 call 10c53c <_Chain_Extract>
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
10a492: 89 1c 24 mov %ebx,(%esp)
10a495: e8 cd fd ff ff call 10a267 <rtems_aio_move_to_work>
10a49a: 83 c4 10 add $0x10,%esp
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
10a49d: 83 ec 0c sub $0xc,%esp
10a4a0: 68 60 72 12 00 push $0x127260
10a4a5: e8 56 0a 00 00 call 10af00 <pthread_mutex_unlock>
10a4aa: 83 c4 10 add $0x10,%esp
10a4ad: e9 f5 fd ff ff jmp 10a2a7 <rtems_aio_handle+0xf>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4b2: 31 c0 xor %eax,%eax
10a4b4: 8d 65 f4 lea -0xc(%ebp),%esp
10a4b7: 5b pop %ebx
10a4b8: 5e pop %esi
10a4b9: 5f pop %edi
10a4ba: c9 leave
10a4bb: c3 ret
0010a0c0 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10a0c0: 55 push %ebp
10a0c1: 89 e5 mov %esp,%ebp
10a0c3: 53 push %ebx
10a0c4: 83 ec 10 sub $0x10,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10a0c7: 68 68 72 12 00 push $0x127268
10a0cc: e8 33 0f 00 00 call 10b004 <pthread_attr_init>
10a0d1: 89 c3 mov %eax,%ebx
if (result != 0)
10a0d3: 83 c4 10 add $0x10,%esp
10a0d6: 85 c0 test %eax,%eax
10a0d8: 0f 85 d7 00 00 00 jne 10a1b5 <rtems_aio_init+0xf5> <== NEVER TAKEN
return result;
result =
10a0de: 51 push %ecx
10a0df: 51 push %ecx
10a0e0: 6a 00 push $0x0
10a0e2: 68 68 72 12 00 push $0x127268
10a0e7: e8 40 0f 00 00 call 10b02c <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10a0ec: 83 c4 10 add $0x10,%esp
10a0ef: 85 c0 test %eax,%eax
10a0f1: 74 10 je 10a103 <rtems_aio_init+0x43> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a0f3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a0f6: 68 68 72 12 00 push $0x127268 <== NOT EXECUTED
10a0fb: e8 e4 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a100: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10a103: 52 push %edx
10a104: 52 push %edx
10a105: 6a 00 push $0x0
10a107: 68 60 72 12 00 push $0x127260
10a10c: e8 4f 0c 00 00 call 10ad60 <pthread_mutex_init>
if (result != 0)
10a111: 83 c4 10 add $0x10,%esp
10a114: 85 c0 test %eax,%eax
10a116: 74 10 je 10a128 <rtems_aio_init+0x68> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
10a118: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a11b: 68 68 72 12 00 push $0x127268 <== NOT EXECUTED
10a120: e8 bf 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a125: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10a128: 50 push %eax
10a129: 50 push %eax
10a12a: 6a 00 push $0x0
10a12c: 68 64 72 12 00 push $0x127264
10a131: e8 ea 08 00 00 call 10aa20 <pthread_cond_init>
10a136: 89 c3 mov %eax,%ebx
if (result != 0) {
10a138: 83 c4 10 add $0x10,%esp
10a13b: 85 c0 test %eax,%eax
10a13d: 74 1c je 10a15b <rtems_aio_init+0x9b> <== ALWAYS TAKEN
pthread_mutex_destroy (&aio_request_queue.mutex);
10a13f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a142: 68 60 72 12 00 push $0x127260 <== NOT EXECUTED
10a147: e8 14 0b 00 00 call 10ac60 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10a14c: c7 04 24 68 72 12 00 movl $0x127268,(%esp) <== NOT EXECUTED
10a153: e8 8c 0e 00 00 call 10afe4 <pthread_attr_destroy> <== NOT EXECUTED
10a158: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a15b: c7 05 a8 72 12 00 ac movl $0x1272ac,0x1272a8
10a162: 72 12 00
head->previous = NULL;
10a165: c7 05 ac 72 12 00 00 movl $0x0,0x1272ac
10a16c: 00 00 00
tail->previous = head;
10a16f: c7 05 b0 72 12 00 a8 movl $0x1272a8,0x1272b0
10a176: 72 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10a179: c7 05 b4 72 12 00 b8 movl $0x1272b8,0x1272b4
10a180: 72 12 00
head->previous = NULL;
10a183: c7 05 b8 72 12 00 00 movl $0x0,0x1272b8
10a18a: 00 00 00
tail->previous = head;
10a18d: c7 05 bc 72 12 00 b4 movl $0x1272b4,0x1272bc
10a194: 72 12 00
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
10a197: c7 05 c4 72 12 00 00 movl $0x0,0x1272c4
10a19e: 00 00 00
aio_request_queue.idle_threads = 0;
10a1a1: c7 05 c8 72 12 00 00 movl $0x0,0x1272c8
10a1a8: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10a1ab: c7 05 c0 72 12 00 0b movl $0xb00b,0x1272c0
10a1b2: b0 00 00
return result;
}
10a1b5: 89 d8 mov %ebx,%eax
10a1b7: 8b 5d fc mov -0x4(%ebp),%ebx
10a1ba: c9 leave
10a1bb: c3 ret
0010a4bc <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10a4bc: 55 push %ebp
10a4bd: 89 e5 mov %esp,%ebp
10a4bf: 56 push %esi
10a4c0: 53 push %ebx
10a4c1: 8b 4d 08 mov 0x8(%ebp),%ecx
10a4c4: 8b 55 0c mov 0xc(%ebp),%edx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4c7: 8b 01 mov (%ecx),%eax
10a4c9: 8d 59 04 lea 0x4(%ecx),%ebx
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10a4cc: 39 d8 cmp %ebx,%eax
10a4ce: 74 27 je 10a4f7 <rtems_aio_insert_prio+0x3b><== NEVER TAKEN
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10a4d0: 8b 48 14 mov 0x14(%eax),%ecx
10a4d3: 8b 49 14 mov 0x14(%ecx),%ecx
while (req->aiocbp->aio_reqprio > prio &&
10a4d6: 8b 72 14 mov 0x14(%edx),%esi
10a4d9: 8b 76 14 mov 0x14(%esi),%esi
10a4dc: eb 08 jmp 10a4e6 <rtems_aio_insert_prio+0x2a>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a4de: 8b 00 mov (%eax),%eax <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10a4e0: 8b 48 14 mov 0x14(%eax),%ecx <== NOT EXECUTED
10a4e3: 8b 49 14 mov 0x14(%ecx),%ecx <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10a4e6: 39 ce cmp %ecx,%esi
10a4e8: 7e 04 jle 10a4ee <rtems_aio_insert_prio+0x32><== ALWAYS TAKEN
10a4ea: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
10a4ec: 75 f0 jne 10a4de <rtems_aio_insert_prio+0x22><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10a4ee: 89 55 0c mov %edx,0xc(%ebp)
10a4f1: 8b 40 04 mov 0x4(%eax),%eax
10a4f4: 89 45 08 mov %eax,0x8(%ebp)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10a4f7: 5b pop %ebx
10a4f8: 5e pop %esi
10a4f9: c9 leave
10a4fa: e9 79 20 00 00 jmp 10c578 <_Chain_Insert>
0010a267 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
10a267: 55 push %ebp
10a268: 89 e5 mov %esp,%ebp
10a26a: 83 ec 08 sub $0x8,%esp
10a26d: 8b 55 08 mov 0x8(%ebp),%edx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a270: a1 a8 72 12 00 mov 0x1272a8,%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a275: 8b 4a 14 mov 0x14(%edx),%ecx
10a278: eb 02 jmp 10a27c <rtems_aio_move_to_work+0x15>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a27a: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10a27c: 39 48 14 cmp %ecx,0x14(%eax)
10a27f: 7d 07 jge 10a288 <rtems_aio_move_to_work+0x21>
10a281: 3d ac 72 12 00 cmp $0x1272ac,%eax
10a286: 75 f2 jne 10a27a <rtems_aio_move_to_work+0x13><== ALWAYS TAKEN
10a288: 51 push %ecx
10a289: 51 push %ecx
10a28a: 52 push %edx
10a28b: ff 70 04 pushl 0x4(%eax)
10a28e: e8 e5 22 00 00 call 10c578 <_Chain_Insert>
10a293: 83 c4 10 add $0x10,%esp
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
10a296: c9 leave
10a297: c3 ret
0010a548 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
10a548: 55 push %ebp
10a549: 89 e5 mov %esp,%ebp
10a54b: 53 push %ebx
10a54c: 83 ec 04 sub $0x4,%esp
10a54f: 8b 55 08 mov 0x8(%ebp),%edx
10a552: 8b 4d 0c mov 0xc(%ebp),%ecx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a555: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10a557: 83 c2 04 add $0x4,%edx
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10a55a: b8 02 00 00 00 mov $0x2,%eax
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
10a55f: 39 d3 cmp %edx,%ebx
10a561: 75 08 jne 10a56b <rtems_aio_remove_req+0x23>
10a563: eb 3b jmp 10a5a0 <rtems_aio_remove_req+0x58>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10a565: 8b 18 mov (%eax),%ebx <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10a567: 39 d3 cmp %edx,%ebx <== NOT EXECUTED
10a569: 74 30 je 10a59b <rtems_aio_remove_req+0x53><== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
10a56b: 89 d8 mov %ebx,%eax
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10a56d: 39 4b 14 cmp %ecx,0x14(%ebx)
10a570: 75 f3 jne 10a565 <rtems_aio_remove_req+0x1d><== NEVER TAKEN
10a572: 83 ec 0c sub $0xc,%esp
10a575: 53 push %ebx
10a576: e8 c1 1f 00 00 call 10c53c <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10a57b: 8b 43 14 mov 0x14(%ebx),%eax
10a57e: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10a585: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10a58c: 89 1c 24 mov %ebx,(%esp)
10a58f: e8 fc cd ff ff call 107390 <free>
}
return AIO_CANCELED;
10a594: 83 c4 10 add $0x10,%esp
10a597: 31 c0 xor %eax,%eax
10a599: eb 05 jmp 10a5a0 <rtems_aio_remove_req+0x58>
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10a59b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10a5a0: 8b 5d fc mov -0x4(%ebp),%ebx
10a5a3: c9 leave
10a5a4: c3 ret
0010a244 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10a244: 55 push %ebp
10a245: 89 e5 mov %esp,%ebp
10a247: 57 push %edi
10a248: 56 push %esi
10a249: 53 push %ebx
10a24a: 83 ec 1c sub $0x1c,%esp
10a24d: 8b 7d 0c mov 0xc(%ebp),%edi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10a250: 8d 75 e4 lea -0x1c(%ebp),%esi
10a253: eb 13 jmp 10a268 <rtems_chain_get_with_wait+0x24>
10a255: 56 push %esi
10a256: ff 75 10 pushl 0x10(%ebp)
10a259: 6a 00 push $0x0
10a25b: 57 push %edi
10a25c: e8 b3 f5 ff ff call 109814 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10a261: 83 c4 10 add $0x10,%esp
10a264: 85 c0 test %eax,%eax
10a266: 75 16 jne 10a27e <rtems_chain_get_with_wait+0x3a><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10a268: 83 ec 0c sub $0xc,%esp
10a26b: ff 75 08 pushl 0x8(%ebp)
10a26e: e8 a5 04 00 00 call 10a718 <_Chain_Get>
10a273: 89 c3 mov %eax,%ebx
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10a275: 83 c4 10 add $0x10,%esp
10a278: 85 c0 test %eax,%eax
10a27a: 74 d9 je 10a255 <rtems_chain_get_with_wait+0x11>
10a27c: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10a27e: 8b 55 14 mov 0x14(%ebp),%edx
10a281: 89 1a mov %ebx,(%edx)
return sc;
}
10a283: 8d 65 f4 lea -0xc(%ebp),%esp
10a286: 5b pop %ebx
10a287: 5e pop %esi
10a288: 5f pop %edi
10a289: c9 leave
10a28a: c3 ret
0010bc54 <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)
{
10bc54: 55 push %ebp
10bc55: 89 e5 mov %esp,%ebp
10bc57: 57 push %edi
10bc58: 56 push %esi
10bc59: 53 push %ebx
10bc5a: 83 ec 0c sub $0xc,%esp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10bc5d: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
10bc61: 74 3d je 10bca0 <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
10bc63: bb 01 00 00 00 mov $0x1,%ebx
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10bc68: 8b 04 9d e0 89 12 00 mov 0x1289e0(,%ebx,4),%eax
10bc6f: 8b 78 04 mov 0x4(%eax),%edi
if ( !information )
10bc72: be 01 00 00 00 mov $0x1,%esi
10bc77: 85 ff test %edi,%edi
10bc79: 75 17 jne 10bc92 <rtems_iterate_over_all_threads+0x3e>
10bc7b: eb 1d jmp 10bc9a <rtems_iterate_over_all_threads+0x46>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
10bc7d: 8b 47 1c mov 0x1c(%edi),%eax
10bc80: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !the_thread )
10bc83: 85 c0 test %eax,%eax
10bc85: 74 0a je 10bc91 <rtems_iterate_over_all_threads+0x3d><== NEVER TAKEN
continue;
(*routine)(the_thread);
10bc87: 83 ec 0c sub $0xc,%esp
10bc8a: 50 push %eax
10bc8b: ff 55 08 call *0x8(%ebp)
10bc8e: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10bc91: 46 inc %esi
10bc92: 0f b7 47 10 movzwl 0x10(%edi),%eax
10bc96: 39 c6 cmp %eax,%esi
10bc98: 76 e3 jbe 10bc7d <rtems_iterate_over_all_threads+0x29>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10bc9a: 43 inc %ebx
10bc9b: 83 fb 04 cmp $0x4,%ebx
10bc9e: 75 c8 jne 10bc68 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10bca0: 8d 65 f4 lea -0xc(%ebp),%esp
10bca3: 5b pop %ebx
10bca4: 5e pop %esi
10bca5: 5f pop %edi
10bca6: c9 leave
10bca7: c3 ret
001099c0 <rtems_object_get_api_class_name>:
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
1099c0: 55 push %ebp
1099c1: 89 e5 mov %esp,%ebp
1099c3: 83 ec 08 sub $0x8,%esp
1099c6: 8b 55 08 mov 0x8(%ebp),%edx
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
1099c9: 83 fa 01 cmp $0x1,%edx
1099cc: 74 16 je 1099e4 <rtems_object_get_api_class_name+0x24><== NEVER TAKEN
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
1099ce: 83 fa 02 cmp $0x2,%edx
1099d1: 74 18 je 1099eb <rtems_object_get_api_class_name+0x2b><== NEVER TAKEN
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
1099d3: b8 0f 01 12 00 mov $0x12010f,%eax
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
1099d8: 83 fa 03 cmp $0x3,%edx
1099db: 75 2e jne 109a0b <rtems_object_get_api_class_name+0x4b>
api_assoc = rtems_object_api_posix_assoc;
1099dd: b8 08 41 12 00 mov $0x124108,%eax
1099e2: eb 0c jmp 1099f0 <rtems_object_get_api_class_name+0x30>
{
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;
1099e4: b8 78 40 12 00 mov $0x124078,%eax
1099e9: eb 05 jmp 1099f0 <rtems_object_get_api_class_name+0x30>
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
1099eb: b8 90 40 12 00 mov $0x124090,%eax
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
1099f0: 52 push %edx
1099f1: 52 push %edx
1099f2: ff 75 0c pushl 0xc(%ebp)
1099f5: 50 push %eax
1099f6: e8 25 43 00 00 call 10dd20 <rtems_assoc_ptr_by_local>
1099fb: 89 c2 mov %eax,%edx
if ( class_assoc )
1099fd: 83 c4 10 add $0x10,%esp
return class_assoc->name;
return "BAD CLASS";
109a00: b8 17 01 12 00 mov $0x120117,%eax
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
109a05: 85 d2 test %edx,%edx
109a07: 74 02 je 109a0b <rtems_object_get_api_class_name+0x4b>
return class_assoc->name;
109a09: 8b 02 mov (%edx),%eax
return "BAD CLASS";
}
109a0b: c9 leave
109a0c: c3 ret
00113f00 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
113f00: 55 push %ebp
113f01: 89 e5 mov %esp,%ebp
113f03: 57 push %edi
113f04: 56 push %esi
113f05: 53 push %ebx
113f06: 83 ec 1c sub $0x1c,%esp
113f09: 8b 75 0c mov 0xc(%ebp),%esi
113f0c: 8b 55 10 mov 0x10(%ebp),%edx
113f0f: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
113f12: b8 03 00 00 00 mov $0x3,%eax
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
113f17: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
113f1b: 0f 84 ce 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
113f21: b0 09 mov $0x9,%al
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
113f23: 85 f6 test %esi,%esi
113f25: 0f 84 c4 00 00 00 je 113fef <rtems_partition_create+0xef>
return RTEMS_INVALID_ADDRESS;
if ( !id )
113f2b: 83 7d 1c 00 cmpl $0x0,0x1c(%ebp)
113f2f: 0f 84 ba 00 00 00 je 113fef <rtems_partition_create+0xef><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f35: 85 ff test %edi,%edi
113f37: 0f 84 ad 00 00 00 je 113fea <rtems_partition_create+0xea>
113f3d: 85 d2 test %edx,%edx
113f3f: 0f 84 a5 00 00 00 je 113fea <rtems_partition_create+0xea>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
113f45: b0 08 mov $0x8,%al
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
113f47: 39 fa cmp %edi,%edx
113f49: 0f 82 a0 00 00 00 jb 113fef <rtems_partition_create+0xef>
113f4f: f7 c7 03 00 00 00 test $0x3,%edi
113f55: 0f 85 94 00 00 00 jne 113fef <rtems_partition_create+0xef>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
113f5b: b0 09 mov $0x9,%al
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
113f5d: f7 c6 03 00 00 00 test $0x3,%esi
113f63: 0f 85 86 00 00 00 jne 113fef <rtems_partition_create+0xef>
113f69: a1 b8 d6 13 00 mov 0x13d6b8,%eax
113f6e: 40 inc %eax
113f6f: a3 b8 d6 13 00 mov %eax,0x13d6b8
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
113f74: 83 ec 0c sub $0xc,%esp
113f77: 68 4c d5 13 00 push $0x13d54c
113f7c: 89 55 e4 mov %edx,-0x1c(%ebp)
113f7f: e8 20 3e 00 00 call 117da4 <_Objects_Allocate>
113f84: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
113f86: 83 c4 10 add $0x10,%esp
113f89: 85 c0 test %eax,%eax
113f8b: 8b 55 e4 mov -0x1c(%ebp),%edx
113f8e: 75 0c jne 113f9c <rtems_partition_create+0x9c>
_Thread_Enable_dispatch();
113f90: e8 29 4d 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113f95: b8 05 00 00 00 mov $0x5,%eax
113f9a: eb 53 jmp 113fef <rtems_partition_create+0xef>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
113f9c: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
113f9f: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
113fa2: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
113fa5: 8b 45 18 mov 0x18(%ebp),%eax
113fa8: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
113fab: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
113fb2: 57 push %edi
113fb3: 89 d0 mov %edx,%eax
113fb5: 31 d2 xor %edx,%edx
113fb7: f7 f7 div %edi
113fb9: 50 push %eax
113fba: 56 push %esi
113fbb: 8d 43 24 lea 0x24(%ebx),%eax
113fbe: 50 push %eax
113fbf: e8 84 2a 00 00 call 116a48 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113fc4: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113fc7: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113fca: 8b 15 68 d5 13 00 mov 0x13d568,%edx
113fd0: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
113fd3: 8b 55 08 mov 0x8(%ebp),%edx
113fd6: 89 53 0c mov %edx,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
113fd9: 8b 55 1c mov 0x1c(%ebp),%edx
113fdc: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
113fde: e8 db 4c 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113fe3: 83 c4 10 add $0x10,%esp
113fe6: 31 c0 xor %eax,%eax
113fe8: eb 05 jmp 113fef <rtems_partition_create+0xef>
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
113fea: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
113fef: 8d 65 f4 lea -0xc(%ebp),%esp
113ff2: 5b pop %ebx
113ff3: 5e pop %esi
113ff4: 5f pop %edi
113ff5: c9 leave
113ff6: c3 ret
0010a601 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10a601: 55 push %ebp
10a602: 89 e5 mov %esp,%ebp
10a604: 57 push %edi
10a605: 56 push %esi
10a606: 53 push %ebx
10a607: 83 ec 30 sub $0x30,%esp
10a60a: 8b 75 08 mov 0x8(%ebp),%esi
10a60d: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
10a610: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10a613: 50 push %eax
10a614: 56 push %esi
10a615: 68 fc 72 12 00 push $0x1272fc
10a61a: e8 41 1d 00 00 call 10c360 <_Objects_Get>
10a61f: 89 c7 mov %eax,%edi
switch ( location ) {
10a621: 83 c4 10 add $0x10,%esp
10a624: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10a628: 0f 85 3b 01 00 00 jne 10a769 <rtems_rate_monotonic_period+0x168>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10a62e: a1 0c 79 12 00 mov 0x12790c,%eax
10a633: 39 47 40 cmp %eax,0x40(%edi)
10a636: 74 0f je 10a647 <rtems_rate_monotonic_period+0x46>
_Thread_Enable_dispatch();
10a638: e8 d5 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10a63d: be 17 00 00 00 mov $0x17,%esi
10a642: e9 27 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
if ( length == RTEMS_PERIOD_STATUS ) {
10a647: 85 db test %ebx,%ebx
10a649: 75 1b jne 10a666 <rtems_rate_monotonic_period+0x65>
switch ( the_period->state ) {
10a64b: 8b 47 38 mov 0x38(%edi),%eax
10a64e: 31 f6 xor %esi,%esi
10a650: 83 f8 04 cmp $0x4,%eax
10a653: 77 07 ja 10a65c <rtems_rate_monotonic_period+0x5b><== NEVER TAKEN
10a655: 8b 34 85 e0 10 12 00 mov 0x1210e0(,%eax,4),%esi
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10a65c: e8 b1 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return( return_value );
10a661: e9 08 01 00 00 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
}
_ISR_Disable( level );
10a666: 9c pushf
10a667: fa cli
10a668: 8f 45 d4 popl -0x2c(%ebp)
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10a66b: 8b 47 38 mov 0x38(%edi),%eax
10a66e: 85 c0 test %eax,%eax
10a670: 75 4c jne 10a6be <rtems_rate_monotonic_period+0xbd>
_ISR_Enable( level );
10a672: ff 75 d4 pushl -0x2c(%ebp)
10a675: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10a676: 83 ec 0c sub $0xc,%esp
10a679: 57 push %edi
10a67a: e8 3f fe ff ff call 10a4be <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10a67f: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10a686: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10a68d: c7 47 2c 78 a9 10 00 movl $0x10a978,0x2c(%edi)
the_watchdog->id = id;
10a694: 89 77 30 mov %esi,0x30(%edi)
the_watchdog->user_data = user_data;
10a697: c7 47 34 00 00 00 00 movl $0x0,0x34(%edi)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10a69e: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a6a1: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a6a4: 58 pop %eax
10a6a5: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a6a6: 83 c7 10 add $0x10,%edi
10a6a9: 57 push %edi
10a6aa: 68 a8 74 12 00 push $0x1274a8
10a6af: e8 34 34 00 00 call 10dae8 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a6b4: e8 59 27 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a6b9: 83 c4 10 add $0x10,%esp
10a6bc: eb 65 jmp 10a723 <rtems_rate_monotonic_period+0x122>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10a6be: 83 f8 02 cmp $0x2,%eax
10a6c1: 75 64 jne 10a727 <rtems_rate_monotonic_period+0x126>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10a6c3: 83 ec 0c sub $0xc,%esp
10a6c6: 57 push %edi
10a6c7: e8 5a fe ff ff call 10a526 <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
10a6cc: c7 47 38 01 00 00 00 movl $0x1,0x38(%edi)
the_period->next_length = length;
10a6d3: 89 5f 3c mov %ebx,0x3c(%edi)
_ISR_Enable( level );
10a6d6: ff 75 d4 pushl -0x2c(%ebp)
10a6d9: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10a6da: a1 0c 79 12 00 mov 0x12790c,%eax
10a6df: 8b 57 08 mov 0x8(%edi),%edx
10a6e2: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a6e5: 5b pop %ebx
10a6e6: 5e pop %esi
10a6e7: 68 00 40 00 00 push $0x4000
10a6ec: 50 push %eax
10a6ed: e8 92 2e 00 00 call 10d584 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10a6f2: 9c pushf
10a6f3: fa cli
10a6f4: 5a pop %edx
local_state = the_period->state;
10a6f5: 8b 47 38 mov 0x38(%edi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
10a6f8: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
_ISR_Enable( level );
10a6ff: 52 push %edx
10a700: 9d popf
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
10a701: 83 c4 10 add $0x10,%esp
10a704: 83 f8 03 cmp $0x3,%eax
10a707: 75 15 jne 10a71e <rtems_rate_monotonic_period+0x11d>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10a709: 51 push %ecx
10a70a: 51 push %ecx
10a70b: 68 00 40 00 00 push $0x4000
10a710: ff 35 0c 79 12 00 pushl 0x12790c
10a716: e8 e1 23 00 00 call 10cafc <_Thread_Clear_state>
10a71b: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
10a71e: e8 ef 26 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10a723: 31 f6 xor %esi,%esi
10a725: eb 47 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a727: be 04 00 00 00 mov $0x4,%esi
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10a72c: 83 f8 04 cmp $0x4,%eax
10a72f: 75 3d jne 10a76e <rtems_rate_monotonic_period+0x16d><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10a731: 83 ec 0c sub $0xc,%esp
10a734: 57 push %edi
10a735: e8 ec fd ff ff call 10a526 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10a73a: ff 75 d4 pushl -0x2c(%ebp)
10a73d: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10a73e: c7 47 38 02 00 00 00 movl $0x2,0x38(%edi)
the_period->next_length = length;
10a745: 89 5f 3c mov %ebx,0x3c(%edi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10a748: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10a74b: 58 pop %eax
10a74c: 5a pop %edx
_Watchdog_Insert_ticks( &the_period->Timer, length );
10a74d: 83 c7 10 add $0x10,%edi
10a750: 57 push %edi
10a751: 68 a8 74 12 00 push $0x1274a8
10a756: e8 8d 33 00 00 call 10dae8 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10a75b: e8 b2 26 00 00 call 10ce12 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10a760: 83 c4 10 add $0x10,%esp
10a763: 66 be 06 00 mov $0x6,%si
10a767: eb 05 jmp 10a76e <rtems_rate_monotonic_period+0x16d>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10a769: be 04 00 00 00 mov $0x4,%esi
}
10a76e: 89 f0 mov %esi,%eax
10a770: 8d 65 f4 lea -0xc(%ebp),%esp
10a773: 5b pop %ebx
10a774: 5e pop %esi
10a775: 5f pop %edi
10a776: c9 leave
10a777: c3 ret
0010a778 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10a778: 55 push %ebp
10a779: 89 e5 mov %esp,%ebp
10a77b: 57 push %edi
10a77c: 56 push %esi
10a77d: 53 push %ebx
10a77e: 83 ec 7c sub $0x7c,%esp
10a781: 8b 5d 08 mov 0x8(%ebp),%ebx
10a784: 8b 7d 0c mov 0xc(%ebp),%edi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10a787: 85 ff test %edi,%edi
10a789: 0f 84 2b 01 00 00 je 10a8ba <rtems_rate_monotonic_report_statistics_with_plugin+0x142><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10a78f: 52 push %edx
10a790: 52 push %edx
10a791: 68 f4 10 12 00 push $0x1210f4
10a796: 53 push %ebx
10a797: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10a799: 5e pop %esi
10a79a: 58 pop %eax
10a79b: 68 12 11 12 00 push $0x121112
10a7a0: 53 push %ebx
10a7a1: ff d7 call *%edi
(*print)( context, "--- Wall times are in seconds ---\n" );
10a7a3: 5a pop %edx
10a7a4: 59 pop %ecx
10a7a5: 68 34 11 12 00 push $0x121134
10a7aa: 53 push %ebx
10a7ab: ff d7 call *%edi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10a7ad: 5e pop %esi
10a7ae: 58 pop %eax
10a7af: 68 57 11 12 00 push $0x121157
10a7b4: 53 push %ebx
10a7b5: ff d7 call *%edi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10a7b7: 5a pop %edx
10a7b8: 59 pop %ecx
10a7b9: 68 a2 11 12 00 push $0x1211a2
10a7be: 53 push %ebx
10a7bf: ff d7 call *%edi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10a7c1: 8b 35 04 73 12 00 mov 0x127304,%esi
10a7c7: 83 c4 10 add $0x10,%esp
10a7ca: e9 df 00 00 00 jmp 10a8ae <rtems_rate_monotonic_report_statistics_with_plugin+0x136>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10a7cf: 50 push %eax
10a7d0: 50 push %eax
10a7d1: 8d 45 88 lea -0x78(%ebp),%eax
10a7d4: 50 push %eax
10a7d5: 56 push %esi
10a7d6: e8 85 59 00 00 call 110160 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10a7db: 83 c4 10 add $0x10,%esp
10a7de: 85 c0 test %eax,%eax
10a7e0: 0f 85 c7 00 00 00 jne 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
10a7e6: 51 push %ecx
10a7e7: 51 push %ecx
10a7e8: 8d 55 c0 lea -0x40(%ebp),%edx
10a7eb: 52 push %edx
10a7ec: 56 push %esi
10a7ed: e8 12 5a 00 00 call 110204 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10a7f2: 83 c4 0c add $0xc,%esp
10a7f5: 8d 45 e3 lea -0x1d(%ebp),%eax
10a7f8: 50 push %eax
10a7f9: 6a 05 push $0x5
10a7fb: ff 75 c0 pushl -0x40(%ebp)
10a7fe: e8 01 02 00 00 call 10aa04 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10a803: 58 pop %eax
10a804: 5a pop %edx
10a805: ff 75 8c pushl -0x74(%ebp)
10a808: ff 75 88 pushl -0x78(%ebp)
10a80b: 8d 55 e3 lea -0x1d(%ebp),%edx
10a80e: 52 push %edx
10a80f: 56 push %esi
10a810: 68 ee 11 12 00 push $0x1211ee
10a815: 53 push %ebx
10a816: ff d7 call *%edi
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10a818: 8b 45 88 mov -0x78(%ebp),%eax
10a81b: 83 c4 20 add $0x20,%esp
10a81e: 85 c0 test %eax,%eax
10a820: 75 0f jne 10a831 <rtems_rate_monotonic_report_statistics_with_plugin+0xb9>
(*print)( context, "\n" );
10a822: 51 push %ecx
10a823: 51 push %ecx
10a824: 68 58 14 12 00 push $0x121458
10a829: 53 push %ebx
10a82a: ff d7 call *%edi
continue;
10a82c: 83 c4 10 add $0x10,%esp
10a82f: eb 7c jmp 10a8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x135>
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
10a831: 52 push %edx
10a832: 8d 55 d8 lea -0x28(%ebp),%edx
10a835: 52 push %edx
10a836: 50 push %eax
10a837: 8d 45 a0 lea -0x60(%ebp),%eax
10a83a: 50 push %eax
10a83b: e8 7c 2f 00 00 call 10d7bc <_Timespec_Divide_by_integer>
(*print)( context,
10a840: 8b 45 dc mov -0x24(%ebp),%eax
10a843: b9 e8 03 00 00 mov $0x3e8,%ecx
10a848: 99 cltd
10a849: f7 f9 idiv %ecx
10a84b: 50 push %eax
10a84c: ff 75 d8 pushl -0x28(%ebp)
10a84f: 8b 45 9c mov -0x64(%ebp),%eax
10a852: 99 cltd
10a853: f7 f9 idiv %ecx
10a855: 50 push %eax
10a856: ff 75 98 pushl -0x68(%ebp)
10a859: 8b 45 94 mov -0x6c(%ebp),%eax
10a85c: 99 cltd
10a85d: f7 f9 idiv %ecx
10a85f: 50 push %eax
10a860: ff 75 90 pushl -0x70(%ebp)
10a863: 68 05 12 12 00 push $0x121205
10a868: 53 push %ebx
10a869: 89 4d 84 mov %ecx,-0x7c(%ebp)
10a86c: ff d7 call *%edi
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10a86e: 83 c4 2c add $0x2c,%esp
10a871: 8d 55 d8 lea -0x28(%ebp),%edx
10a874: 52 push %edx
10a875: ff 75 88 pushl -0x78(%ebp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
10a878: 8d 45 b8 lea -0x48(%ebp),%eax
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
10a87b: 50 push %eax
10a87c: e8 3b 2f 00 00 call 10d7bc <_Timespec_Divide_by_integer>
(*print)( context,
10a881: 8b 45 dc mov -0x24(%ebp),%eax
10a884: 8b 4d 84 mov -0x7c(%ebp),%ecx
10a887: 99 cltd
10a888: f7 f9 idiv %ecx
10a88a: 50 push %eax
10a88b: ff 75 d8 pushl -0x28(%ebp)
10a88e: 8b 45 b4 mov -0x4c(%ebp),%eax
10a891: 99 cltd
10a892: f7 f9 idiv %ecx
10a894: 50 push %eax
10a895: ff 75 b0 pushl -0x50(%ebp)
10a898: 8b 45 ac mov -0x54(%ebp),%eax
10a89b: 99 cltd
10a89c: f7 f9 idiv %ecx
10a89e: 50 push %eax
10a89f: ff 75 a8 pushl -0x58(%ebp)
10a8a2: 68 24 12 12 00 push $0x121224
10a8a7: 53 push %ebx
10a8a8: ff d7 call *%edi
10a8aa: 83 c4 30 add $0x30,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10a8ad: 46 inc %esi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10a8ae: 3b 35 08 73 12 00 cmp 0x127308,%esi
10a8b4: 0f 86 15 ff ff ff jbe 10a7cf <rtems_rate_monotonic_report_statistics_with_plugin+0x57>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10a8ba: 8d 65 f4 lea -0xc(%ebp),%esp
10a8bd: 5b pop %ebx
10a8be: 5e pop %esi
10a8bf: 5f pop %edi
10a8c0: c9 leave
10a8c1: c3 ret
00115260 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
115260: 55 push %ebp
115261: 89 e5 mov %esp,%ebp
115263: 53 push %ebx
115264: 83 ec 14 sub $0x14,%esp
115267: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
11526a: b8 0a 00 00 00 mov $0xa,%eax
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11526f: 85 db test %ebx,%ebx
115271: 74 6d je 1152e0 <rtems_signal_send+0x80>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
115273: 50 push %eax
115274: 50 push %eax
115275: 8d 45 f4 lea -0xc(%ebp),%eax
115278: 50 push %eax
115279: ff 75 08 pushl 0x8(%ebp)
11527c: e8 5f 3a 00 00 call 118ce0 <_Thread_Get>
switch ( location ) {
115281: 83 c4 10 add $0x10,%esp
115284: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115288: 75 51 jne 1152db <rtems_signal_send+0x7b>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11528a: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
115290: 83 7a 0c 00 cmpl $0x0,0xc(%edx)
115294: 74 39 je 1152cf <rtems_signal_send+0x6f>
if ( asr->is_enabled ) {
115296: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11529a: 74 22 je 1152be <rtems_signal_send+0x5e>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11529c: 9c pushf
11529d: fa cli
11529e: 59 pop %ecx
*signal_set |= signals;
11529f: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
1152a2: 51 push %ecx
1152a3: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1152a4: 83 3d e0 db 13 00 00 cmpl $0x0,0x13dbe0
1152ab: 74 19 je 1152c6 <rtems_signal_send+0x66>
1152ad: 3b 05 e4 db 13 00 cmp 0x13dbe4,%eax
1152b3: 75 11 jne 1152c6 <rtems_signal_send+0x66><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1152b5: c6 05 f0 db 13 00 01 movb $0x1,0x13dbf0
1152bc: eb 08 jmp 1152c6 <rtems_signal_send+0x66>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1152be: 9c pushf
1152bf: fa cli
1152c0: 58 pop %eax
*signal_set |= signals;
1152c1: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
1152c4: 50 push %eax
1152c5: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
1152c6: e8 f3 39 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1152cb: 31 c0 xor %eax,%eax
1152cd: eb 11 jmp 1152e0 <rtems_signal_send+0x80>
}
_Thread_Enable_dispatch();
1152cf: e8 ea 39 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
1152d4: b8 0b 00 00 00 mov $0xb,%eax
1152d9: eb 05 jmp 1152e0 <rtems_signal_send+0x80>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1152db: b8 04 00 00 00 mov $0x4,%eax
}
1152e0: 8b 5d fc mov -0x4(%ebp),%ebx
1152e3: c9 leave
1152e4: c3 ret
00110850 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
110850: 55 push %ebp
110851: 89 e5 mov %esp,%ebp
110853: 57 push %edi
110854: 56 push %esi
110855: 53 push %ebx
110856: 83 ec 1c sub $0x1c,%esp
110859: 8b 4d 10 mov 0x10(%ebp),%ecx
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
11085c: b8 09 00 00 00 mov $0x9,%eax
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
110861: 85 c9 test %ecx,%ecx
110863: 0f 84 fb 00 00 00 je 110964 <rtems_task_mode+0x114>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
110869: 8b 35 08 48 12 00 mov 0x124808,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
11086f: 8b 9e e8 00 00 00 mov 0xe8(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
110875: 80 7e 74 01 cmpb $0x1,0x74(%esi)
110879: 19 ff sbb %edi,%edi
11087b: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
110881: 83 7e 7c 00 cmpl $0x0,0x7c(%esi)
110885: 74 06 je 11088d <rtems_task_mode+0x3d>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
110887: 81 cf 00 02 00 00 or $0x200,%edi
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
11088d: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
110891: 19 d2 sbb %edx,%edx
110893: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
110899: 89 55 e4 mov %edx,-0x1c(%ebp)
11089c: 89 4d e0 mov %ecx,-0x20(%ebp)
11089f: e8 f1 bf ff ff call 10c895 <_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;
1108a4: 8b 55 e4 mov -0x1c(%ebp),%edx
1108a7: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
1108a9: 09 f8 or %edi,%eax
1108ab: 8b 4d e0 mov -0x20(%ebp),%ecx
1108ae: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
1108b0: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
1108b7: 74 0b je 1108c4 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
1108b9: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
1108c0: 0f 94 46 74 sete 0x74(%esi)
if ( mask & RTEMS_TIMESLICE_MASK ) {
1108c4: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
1108cb: 74 21 je 1108ee <rtems_task_mode+0x9e>
if ( _Modes_Is_timeslice(mode_set) ) {
1108cd: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
1108d4: 74 11 je 1108e7 <rtems_task_mode+0x97>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
1108d6: c7 46 7c 01 00 00 00 movl $0x1,0x7c(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
1108dd: a1 b8 42 12 00 mov 0x1242b8,%eax
1108e2: 89 46 78 mov %eax,0x78(%esi)
1108e5: eb 07 jmp 1108ee <rtems_task_mode+0x9e>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1108e7: c7 46 7c 00 00 00 00 movl $0x0,0x7c(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
1108ee: f6 45 0c 01 testb $0x1,0xc(%ebp)
1108f2: 74 0a je 1108fe <rtems_task_mode+0xae>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
1108f4: f6 45 08 01 testb $0x1,0x8(%ebp)
1108f8: 74 03 je 1108fd <rtems_task_mode+0xad>
1108fa: fa cli
1108fb: eb 01 jmp 1108fe <rtems_task_mode+0xae>
1108fd: fb sti
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
1108fe: 31 c9 xor %ecx,%ecx
if ( mask & RTEMS_ASR_MASK ) {
110900: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
110907: 74 2a je 110933 <rtems_task_mode+0xe3>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
110909: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
110910: 0f 94 c0 sete %al
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
110913: 3a 43 08 cmp 0x8(%ebx),%al
110916: 74 1b je 110933 <rtems_task_mode+0xe3>
asr->is_enabled = is_asr_enabled;
110918: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
11091b: 9c pushf
11091c: fa cli
11091d: 58 pop %eax
_signals = information->signals_pending;
11091e: 8b 53 18 mov 0x18(%ebx),%edx
information->signals_pending = information->signals_posted;
110921: 8b 4b 14 mov 0x14(%ebx),%ecx
110924: 89 4b 18 mov %ecx,0x18(%ebx)
information->signals_posted = _signals;
110927: 89 53 14 mov %edx,0x14(%ebx)
_ISR_Enable( _level );
11092a: 50 push %eax
11092b: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
11092c: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
110930: 0f 95 c1 setne %cl
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
110933: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
110935: 83 3d 3c 44 12 00 03 cmpl $0x3,0x12443c
11093c: 75 26 jne 110964 <rtems_task_mode+0x114>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
11093e: 8b 15 08 48 12 00 mov 0x124808,%edx
if ( are_signals_pending ||
110944: 84 c9 test %cl,%cl
110946: 75 0e jne 110956 <rtems_task_mode+0x106>
110948: 3b 15 0c 48 12 00 cmp 0x12480c,%edx
11094e: 74 14 je 110964 <rtems_task_mode+0x114>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
110950: 80 7a 74 00 cmpb $0x0,0x74(%edx)
110954: 74 0e je 110964 <rtems_task_mode+0x114> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
110956: c6 05 14 48 12 00 01 movb $0x1,0x124814
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
11095d: e8 e2 ab ff ff call 10b544 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
110962: 31 c0 xor %eax,%eax
}
110964: 83 c4 1c add $0x1c,%esp
110967: 5b pop %ebx
110968: 5e pop %esi
110969: 5f pop %edi
11096a: c9 leave
11096b: c3 ret
0010d300 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10d300: 55 push %ebp
10d301: 89 e5 mov %esp,%ebp
10d303: 56 push %esi
10d304: 53 push %ebx
10d305: 83 ec 10 sub $0x10,%esp
10d308: 8b 5d 0c mov 0xc(%ebp),%ebx
10d30b: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d30e: 85 db test %ebx,%ebx
10d310: 74 10 je 10d322 <rtems_task_set_priority+0x22>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10d312: 0f b6 15 24 42 12 00 movzbl 0x124224,%edx
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10d319: b8 13 00 00 00 mov $0x13,%eax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10d31e: 39 d3 cmp %edx,%ebx
10d320: 77 52 ja 10d374 <rtems_task_set_priority+0x74>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10d322: b8 09 00 00 00 mov $0x9,%eax
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10d327: 85 f6 test %esi,%esi
10d329: 74 49 je 10d374 <rtems_task_set_priority+0x74>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10d32b: 51 push %ecx
10d32c: 51 push %ecx
10d32d: 8d 45 f4 lea -0xc(%ebp),%eax
10d330: 50 push %eax
10d331: ff 75 08 pushl 0x8(%ebp)
10d334: e8 67 1d 00 00 call 10f0a0 <_Thread_Get>
switch ( location ) {
10d339: 83 c4 10 add $0x10,%esp
10d33c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10d340: 75 2d jne 10d36f <rtems_task_set_priority+0x6f>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10d342: 8b 50 14 mov 0x14(%eax),%edx
10d345: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10d347: 85 db test %ebx,%ebx
10d349: 74 1b je 10d366 <rtems_task_set_priority+0x66>
the_thread->real_priority = new_priority;
10d34b: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10d34e: 83 78 1c 00 cmpl $0x0,0x1c(%eax)
10d352: 74 05 je 10d359 <rtems_task_set_priority+0x59>
10d354: 39 58 14 cmp %ebx,0x14(%eax)
10d357: 76 0d jbe 10d366 <rtems_task_set_priority+0x66><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10d359: 52 push %edx
10d35a: 6a 00 push $0x0
10d35c: 53 push %ebx
10d35d: 50 push %eax
10d35e: e8 45 19 00 00 call 10eca8 <_Thread_Change_priority>
10d363: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10d366: e8 13 1d 00 00 call 10f07e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d36b: 31 c0 xor %eax,%eax
10d36d: eb 05 jmp 10d374 <rtems_task_set_priority+0x74>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d36f: b8 04 00 00 00 mov $0x4,%eax
}
10d374: 8d 65 f8 lea -0x8(%ebp),%esp
10d377: 5b pop %ebx
10d378: 5e pop %esi
10d379: c9 leave
10d37a: c3 ret
00115aac <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
115aac: 55 push %ebp
115aad: 89 e5 mov %esp,%ebp
115aaf: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
115ab2: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
115ab5: 50 push %eax
115ab6: ff 75 08 pushl 0x8(%ebp)
115ab9: 68 fc df 13 00 push $0x13dffc
115abe: e8 49 27 00 00 call 11820c <_Objects_Get>
switch ( location ) {
115ac3: 83 c4 10 add $0x10,%esp
115ac6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
115aca: 75 1e jne 115aea <rtems_timer_cancel+0x3e>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
115acc: 83 78 38 04 cmpl $0x4,0x38(%eax)
115ad0: 74 0f je 115ae1 <rtems_timer_cancel+0x35><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
115ad2: 83 ec 0c sub $0xc,%esp
115ad5: 83 c0 10 add $0x10,%eax
115ad8: 50 push %eax
115ad9: e8 0e 41 00 00 call 119bec <_Watchdog_Remove>
115ade: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
115ae1: e8 d8 31 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115ae6: 31 c0 xor %eax,%eax
115ae8: eb 05 jmp 115aef <rtems_timer_cancel+0x43>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115aea: b8 04 00 00 00 mov $0x4,%eax
}
115aef: c9 leave
115af0: c3 ret
00115f0c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
115f0c: 55 push %ebp
115f0d: 89 e5 mov %esp,%ebp
115f0f: 57 push %edi
115f10: 56 push %esi
115f11: 53 push %ebx
115f12: 83 ec 1c sub $0x1c,%esp
115f15: 8b 7d 0c mov 0xc(%ebp),%edi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
115f18: 8b 35 3c e0 13 00 mov 0x13e03c,%esi
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
115f1e: bb 0e 00 00 00 mov $0xe,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
115f23: 85 f6 test %esi,%esi
115f25: 0f 84 b1 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
115f2b: b3 0b mov $0xb,%bl
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
115f2d: 80 3d c8 d6 13 00 00 cmpb $0x0,0x13d6c8
115f34: 0f 84 a2 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
115f3a: b3 09 mov $0x9,%bl
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
115f3c: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
115f40: 0f 84 96 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f46: 83 ec 0c sub $0xc,%esp
115f49: 57 push %edi
115f4a: e8 b5 d6 ff ff call 113604 <_TOD_Validate>
115f4f: 83 c4 10 add $0x10,%esp
return RTEMS_INVALID_CLOCK;
115f52: b3 14 mov $0x14,%bl
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
115f54: 84 c0 test %al,%al
115f56: 0f 84 80 00 00 00 je 115fdc <rtems_timer_server_fire_when+0xd0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
115f5c: 83 ec 0c sub $0xc,%esp
115f5f: 57 push %edi
115f60: e8 37 d6 ff ff call 11359c <_TOD_To_seconds>
115f65: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
115f67: 83 c4 10 add $0x10,%esp
115f6a: 3b 05 40 d7 13 00 cmp 0x13d740,%eax
115f70: 76 6a jbe 115fdc <rtems_timer_server_fire_when+0xd0>
115f72: 51 push %ecx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
115f73: 8d 45 e4 lea -0x1c(%ebp),%eax
115f76: 50 push %eax
115f77: ff 75 08 pushl 0x8(%ebp)
115f7a: 68 fc df 13 00 push $0x13dffc
115f7f: e8 88 22 00 00 call 11820c <_Objects_Get>
115f84: 89 c3 mov %eax,%ebx
switch ( location ) {
115f86: 83 c4 10 add $0x10,%esp
115f89: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
115f8d: 75 48 jne 115fd7 <rtems_timer_server_fire_when+0xcb>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
115f8f: 83 ec 0c sub $0xc,%esp
115f92: 8d 40 10 lea 0x10(%eax),%eax
115f95: 50 push %eax
115f96: e8 51 3c 00 00 call 119bec <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
115f9b: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
115fa2: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_watchdog->routine = routine;
115fa9: 8b 45 10 mov 0x10(%ebp),%eax
115fac: 89 43 2c mov %eax,0x2c(%ebx)
the_watchdog->id = id;
115faf: 8b 45 08 mov 0x8(%ebp),%eax
115fb2: 89 43 30 mov %eax,0x30(%ebx)
the_watchdog->user_data = user_data;
115fb5: 8b 45 14 mov 0x14(%ebp),%eax
115fb8: 89 43 34 mov %eax,0x34(%ebx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
115fbb: 2b 3d 40 d7 13 00 sub 0x13d740,%edi
115fc1: 89 7b 1c mov %edi,0x1c(%ebx)
(*timer_server->schedule_operation)( timer_server, the_timer );
115fc4: 58 pop %eax
115fc5: 5a pop %edx
115fc6: 53 push %ebx
115fc7: 56 push %esi
115fc8: ff 56 04 call *0x4(%esi)
_Thread_Enable_dispatch();
115fcb: e8 ee 2c 00 00 call 118cbe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fd0: 83 c4 10 add $0x10,%esp
115fd3: 31 db xor %ebx,%ebx
115fd5: eb 05 jmp 115fdc <rtems_timer_server_fire_when+0xd0>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fd7: bb 04 00 00 00 mov $0x4,%ebx
}
115fdc: 89 d8 mov %ebx,%eax
115fde: 8d 65 f4 lea -0xc(%ebp),%esp
115fe1: 5b pop %ebx
115fe2: 5e pop %esi
115fe3: 5f pop %edi
115fe4: c9 leave
115fe5: c3 ret
00109f68 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
109f68: 55 push %ebp
109f69: 89 e5 mov %esp,%ebp
109f6b: 83 ec 08 sub $0x8,%esp
109f6e: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
109f71: 83 f9 04 cmp $0x4,%ecx
109f74: 77 0b ja 109f81 <sched_get_priority_max+0x19>
109f76: b8 01 00 00 00 mov $0x1,%eax
109f7b: d3 e0 shl %cl,%eax
109f7d: a8 17 test $0x17,%al
109f7f: 75 10 jne 109f91 <sched_get_priority_max+0x29><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
109f81: e8 fe 78 00 00 call 111884 <__errno>
109f86: c7 00 16 00 00 00 movl $0x16,(%eax)
109f8c: 83 c8 ff or $0xffffffff,%eax
109f8f: eb 08 jmp 109f99 <sched_get_priority_max+0x31>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
109f91: 0f b6 05 48 12 12 00 movzbl 0x121248,%eax
109f98: 48 dec %eax
}
109f99: c9 leave
109f9a: c3 ret
00109f9c <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
109f9c: 55 push %ebp
109f9d: 89 e5 mov %esp,%ebp
109f9f: 83 ec 08 sub $0x8,%esp
109fa2: 8b 4d 08 mov 0x8(%ebp),%ecx
switch ( policy ) {
109fa5: 83 f9 04 cmp $0x4,%ecx
109fa8: 77 11 ja 109fbb <sched_get_priority_min+0x1f>
109faa: ba 01 00 00 00 mov $0x1,%edx
109faf: d3 e2 shl %cl,%edx
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
109fb1: b8 01 00 00 00 mov $0x1,%eax
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
109fb6: 80 e2 17 and $0x17,%dl
109fb9: 75 0e jne 109fc9 <sched_get_priority_min+0x2d><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
109fbb: e8 c4 78 00 00 call 111884 <__errno>
109fc0: c7 00 16 00 00 00 movl $0x16,(%eax)
109fc6: 83 c8 ff or $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
109fc9: c9 leave
109fca: c3 ret
00109fcc <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
109fcc: 55 push %ebp
109fcd: 89 e5 mov %esp,%ebp
109fcf: 56 push %esi
109fd0: 53 push %ebx
109fd1: 8b 75 08 mov 0x8(%ebp),%esi
109fd4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
109fd7: 85 f6 test %esi,%esi
109fd9: 74 16 je 109ff1 <sched_rr_get_interval+0x25><== NEVER TAKEN
109fdb: e8 90 d0 ff ff call 107070 <getpid>
109fe0: 39 c6 cmp %eax,%esi
109fe2: 74 0d je 109ff1 <sched_rr_get_interval+0x25>
rtems_set_errno_and_return_minus_one( ESRCH );
109fe4: e8 9b 78 00 00 call 111884 <__errno>
109fe9: c7 00 03 00 00 00 movl $0x3,(%eax)
109fef: eb 0f jmp 10a000 <sched_rr_get_interval+0x34>
if ( !interval )
109ff1: 85 db test %ebx,%ebx
109ff3: 75 10 jne 10a005 <sched_rr_get_interval+0x39><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
109ff5: e8 8a 78 00 00 call 111884 <__errno>
109ffa: c7 00 16 00 00 00 movl $0x16,(%eax)
10a000: 83 c8 ff or $0xffffffff,%eax
10a003: eb 13 jmp 10a018 <sched_rr_get_interval+0x4c>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10a005: 50 push %eax
10a006: 50 push %eax
10a007: 53 push %ebx
10a008: ff 35 a8 52 12 00 pushl 0x1252a8
10a00e: e8 b1 2e 00 00 call 10cec4 <_Timespec_From_ticks>
return 0;
10a013: 83 c4 10 add $0x10,%esp
10a016: 31 c0 xor %eax,%eax
}
10a018: 8d 65 f8 lea -0x8(%ebp),%esp
10a01b: 5b pop %ebx
10a01c: 5e pop %esi
10a01d: c9 leave
10a01e: c3 ret
0010c6b8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10c6b8: 55 push %ebp
10c6b9: 89 e5 mov %esp,%ebp
10c6bb: 57 push %edi
10c6bc: 56 push %esi
10c6bd: 53 push %ebx
10c6be: 83 ec 2c sub $0x2c,%esp
10c6c1: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c6c4: a1 cc a4 12 00 mov 0x12a4cc,%eax
10c6c9: 40 inc %eax
10c6ca: a3 cc a4 12 00 mov %eax,0x12a4cc
va_list arg;
mode_t mode;
unsigned int value = 0;
10c6cf: 31 ff xor %edi,%edi
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10c6d1: 8b 45 0c mov 0xc(%ebp),%eax
10c6d4: 25 00 02 00 00 and $0x200,%eax
10c6d9: 89 45 d4 mov %eax,-0x2c(%ebp)
10c6dc: 74 03 je 10c6e1 <sem_open+0x29>
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
10c6de: 8b 7d 14 mov 0x14(%ebp),%edi
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10c6e1: 52 push %edx
10c6e2: 52 push %edx
10c6e3: 8d 45 e4 lea -0x1c(%ebp),%eax
10c6e6: 50 push %eax
10c6e7: 56 push %esi
10c6e8: e8 83 59 00 00 call 112070 <_POSIX_Semaphore_Name_to_id>
10c6ed: 89 c3 mov %eax,%ebx
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
10c6ef: 83 c4 10 add $0x10,%esp
10c6f2: 85 c0 test %eax,%eax
10c6f4: 74 19 je 10c70f <sem_open+0x57>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
10c6f6: 83 f8 02 cmp $0x2,%eax
10c6f9: 75 06 jne 10c701 <sem_open+0x49> <== NEVER TAKEN
10c6fb: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
10c6ff: 75 59 jne 10c75a <sem_open+0xa2>
_Thread_Enable_dispatch();
10c701: e8 34 26 00 00 call 10ed3a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10c706: e8 95 84 00 00 call 114ba0 <__errno>
10c70b: 89 18 mov %ebx,(%eax)
10c70d: eb 1f jmp 10c72e <sem_open+0x76>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10c70f: 8b 45 0c mov 0xc(%ebp),%eax
10c712: 25 00 0a 00 00 and $0xa00,%eax
10c717: 3d 00 0a 00 00 cmp $0xa00,%eax
10c71c: 75 15 jne 10c733 <sem_open+0x7b>
_Thread_Enable_dispatch();
10c71e: e8 17 26 00 00 call 10ed3a <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10c723: e8 78 84 00 00 call 114ba0 <__errno>
10c728: c7 00 11 00 00 00 movl $0x11,(%eax)
10c72e: 83 c8 ff or $0xffffffff,%eax
10c731: eb 4a jmp 10c77d <sem_open+0xc5>
10c733: 50 push %eax
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10c734: 8d 45 dc lea -0x24(%ebp),%eax
10c737: 50 push %eax
10c738: ff 75 e4 pushl -0x1c(%ebp)
10c73b: 68 6c a7 12 00 push $0x12a76c
10c740: e8 3b 1b 00 00 call 10e280 <_Objects_Get>
10c745: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10c748: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10c74b: e8 ea 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10c750: e8 e5 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
goto return_id;
10c755: 83 c4 10 add $0x10,%esp
10c758: eb 1d jmp 10c777 <sem_open+0xbf>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
10c75a: 8d 45 e0 lea -0x20(%ebp),%eax
10c75d: 50 push %eax
10c75e: 57 push %edi
10c75f: 6a 00 push $0x0
10c761: 56 push %esi
10c762: e8 d5 57 00 00 call 111f3c <_POSIX_Semaphore_Create_support>
10c767: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10c769: e8 cc 25 00 00 call 10ed3a <_Thread_Enable_dispatch>
if ( status == -1 )
10c76e: 83 c4 10 add $0x10,%esp
return SEM_FAILED;
10c771: 83 c8 ff or $0xffffffff,%eax
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
10c774: 43 inc %ebx
10c775: 74 06 je 10c77d <sem_open+0xc5>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
10c777: 8b 45 e0 mov -0x20(%ebp),%eax
10c77a: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10c77d: 8d 65 f4 lea -0xc(%ebp),%esp
10c780: 5b pop %ebx
10c781: 5e pop %esi
10c782: 5f pop %edi
10c783: c9 leave
10c784: c3 ret
00109e50 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
109e50: 55 push %ebp
109e51: 89 e5 mov %esp,%ebp
109e53: 57 push %edi
109e54: 56 push %esi
109e55: 53 push %ebx
109e56: 83 ec 1c sub $0x1c,%esp
109e59: 8b 5d 08 mov 0x8(%ebp),%ebx
109e5c: 8b 55 0c mov 0xc(%ebp),%edx
109e5f: 8b 45 10 mov 0x10(%ebp),%eax
ISR_Level level;
if ( oact )
109e62: 85 c0 test %eax,%eax
109e64: 74 12 je 109e78 <sigaction+0x28>
*oact = _POSIX_signals_Vectors[ sig ];
109e66: 6b f3 0c imul $0xc,%ebx,%esi
109e69: 81 c6 7c 68 12 00 add $0x12687c,%esi
109e6f: b9 03 00 00 00 mov $0x3,%ecx
109e74: 89 c7 mov %eax,%edi
109e76: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
109e78: 85 db test %ebx,%ebx
109e7a: 74 0d je 109e89 <sigaction+0x39>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
109e7c: 8d 43 ff lea -0x1(%ebx),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
109e7f: 83 f8 1f cmp $0x1f,%eax
109e82: 77 05 ja 109e89 <sigaction+0x39>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
109e84: 83 fb 09 cmp $0x9,%ebx
109e87: 75 10 jne 109e99 <sigaction+0x49>
rtems_set_errno_and_return_minus_one( EINVAL );
109e89: e8 8a 7c 00 00 call 111b18 <__errno>
109e8e: c7 00 16 00 00 00 movl $0x16,(%eax)
109e94: 83 c8 ff or $0xffffffff,%eax
109e97: eb 57 jmp 109ef0 <sigaction+0xa0>
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
109e99: 31 c0 xor %eax,%eax
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
109e9b: 85 d2 test %edx,%edx
109e9d: 74 51 je 109ef0 <sigaction+0xa0> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
109e9f: 9c pushf
109ea0: fa cli
109ea1: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
109ea4: 83 7a 08 00 cmpl $0x0,0x8(%edx)
109ea8: 75 1a jne 109ec4 <sigaction+0x74>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
109eaa: 6b f3 0c imul $0xc,%ebx,%esi
109ead: 8d 86 7c 68 12 00 lea 0x12687c(%esi),%eax
109eb3: 81 c6 64 0c 12 00 add $0x120c64,%esi
109eb9: b9 03 00 00 00 mov $0x3,%ecx
109ebe: 89 c7 mov %eax,%edi
109ec0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109ec2: eb 26 jmp 109eea <sigaction+0x9a>
} else {
_POSIX_signals_Clear_process_signals( sig );
109ec4: 83 ec 0c sub $0xc,%esp
109ec7: 53 push %ebx
109ec8: 89 55 e0 mov %edx,-0x20(%ebp)
109ecb: e8 7c 4e 00 00 call 10ed4c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
109ed0: 6b db 0c imul $0xc,%ebx,%ebx
109ed3: 81 c3 7c 68 12 00 add $0x12687c,%ebx
109ed9: b9 03 00 00 00 mov $0x3,%ecx
109ede: 8b 55 e0 mov -0x20(%ebp),%edx
109ee1: 89 df mov %ebx,%edi
109ee3: 89 d6 mov %edx,%esi
109ee5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
109ee7: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
109eea: ff 75 e4 pushl -0x1c(%ebp)
109eed: 9d popf
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
109eee: 31 c0 xor %eax,%eax
}
109ef0: 8d 65 f4 lea -0xc(%ebp),%esp
109ef3: 5b pop %ebx
109ef4: 5e pop %esi
109ef5: 5f pop %edi
109ef6: c9 leave
109ef7: c3 ret
0010a217 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10a217: 55 push %ebp
10a218: 89 e5 mov %esp,%ebp
10a21a: 57 push %edi
10a21b: 56 push %esi
10a21c: 53 push %ebx
10a21d: 83 ec 3c sub $0x3c,%esp
10a220: 8b 75 08 mov 0x8(%ebp),%esi
10a223: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10a226: 85 f6 test %esi,%esi
10a228: 74 24 je 10a24e <sigtimedwait+0x37>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10a22a: 85 db test %ebx,%ebx
10a22c: 74 30 je 10a25e <sigtimedwait+0x47>
if ( !_Timespec_Is_valid( timeout ) )
10a22e: 83 ec 0c sub $0xc,%esp
10a231: 53 push %ebx
10a232: e8 55 2f 00 00 call 10d18c <_Timespec_Is_valid>
10a237: 83 c4 10 add $0x10,%esp
10a23a: 84 c0 test %al,%al
10a23c: 74 10 je 10a24e <sigtimedwait+0x37>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10a23e: 83 ec 0c sub $0xc,%esp
10a241: 53 push %ebx
10a242: e8 9d 2f 00 00 call 10d1e4 <_Timespec_To_ticks>
if ( !interval )
10a247: 83 c4 10 add $0x10,%esp
10a24a: 85 c0 test %eax,%eax
10a24c: 75 12 jne 10a260 <sigtimedwait+0x49> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
10a24e: e8 6d 7e 00 00 call 1120c0 <__errno>
10a253: c7 00 16 00 00 00 movl $0x16,(%eax)
10a259: e9 39 01 00 00 jmp 10a397 <sigtimedwait+0x180>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10a25e: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10a260: 8b 7d 0c mov 0xc(%ebp),%edi
10a263: 85 ff test %edi,%edi
10a265: 75 03 jne 10a26a <sigtimedwait+0x53>
10a267: 8d 7d dc lea -0x24(%ebp),%edi
the_thread = _Thread_Executing;
10a26a: 8b 15 48 78 12 00 mov 0x127848,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10a270: 8b 8a ec 00 00 00 mov 0xec(%edx),%ecx
10a276: 89 4d d4 mov %ecx,-0x2c(%ebp)
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10a279: 9c pushf
10a27a: fa cli
10a27b: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10a27e: 8b 1e mov (%esi),%ebx
10a280: 89 5d c4 mov %ebx,-0x3c(%ebp)
10a283: 8b 5d d4 mov -0x2c(%ebp),%ebx
10a286: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx
10a28c: 85 4d c4 test %ecx,-0x3c(%ebp)
10a28f: 74 32 je 10a2c3 <sigtimedwait+0xac>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10a291: 83 ec 0c sub $0xc,%esp
10a294: 51 push %ecx
10a295: e8 3e ff ff ff call 10a1d8 <_POSIX_signals_Get_lowest>
10a29a: 89 07 mov %eax,(%edi)
_POSIX_signals_Clear_signals(
10a29c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a2a3: 6a 00 push $0x0
10a2a5: 57 push %edi
10a2a6: 50 push %eax
10a2a7: 53 push %ebx
10a2a8: e8 eb 50 00 00 call 10f398 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10a2ad: ff 75 d0 pushl -0x30(%ebp)
10a2b0: 9d popf
the_info->si_code = SI_USER;
10a2b1: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10a2b8: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return the_info->si_signo;
10a2bf: 8b 1f mov (%edi),%ebx
10a2c1: eb 3d jmp 10a300 <sigtimedwait+0xe9>
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10a2c3: 8b 0d 70 7a 12 00 mov 0x127a70,%ecx
10a2c9: 85 4d c4 test %ecx,-0x3c(%ebp)
10a2cc: 74 3a je 10a308 <sigtimedwait+0xf1>
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10a2ce: 83 ec 0c sub $0xc,%esp
10a2d1: 51 push %ecx
10a2d2: e8 01 ff ff ff call 10a1d8 <_POSIX_signals_Get_lowest>
10a2d7: 89 c3 mov %eax,%ebx
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10a2d9: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a2e0: 6a 01 push $0x1
10a2e2: 57 push %edi
10a2e3: 50 push %eax
10a2e4: ff 75 d4 pushl -0x2c(%ebp)
10a2e7: e8 ac 50 00 00 call 10f398 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10a2ec: ff 75 d0 pushl -0x30(%ebp)
10a2ef: 9d popf
the_info->si_signo = signo;
10a2f0: 89 1f mov %ebx,(%edi)
the_info->si_code = SI_USER;
10a2f2: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10a2f9: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return signo;
10a300: 83 c4 20 add $0x20,%esp
10a303: e9 92 00 00 00 jmp 10a39a <sigtimedwait+0x183>
}
the_info->si_signo = -1;
10a308: c7 07 ff ff ff ff movl $0xffffffff,(%edi)
10a30e: 8b 0d 24 73 12 00 mov 0x127324,%ecx
10a314: 41 inc %ecx
10a315: 89 0d 24 73 12 00 mov %ecx,0x127324
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10a31b: c7 42 44 08 7a 12 00 movl $0x127a08,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10a322: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10a329: 8b 0e mov (%esi),%ecx
10a32b: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10a32e: 89 7a 28 mov %edi,0x28(%edx)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10a331: c7 05 38 7a 12 00 01 movl $0x1,0x127a38
10a338: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10a33b: ff 75 d0 pushl -0x30(%ebp)
10a33e: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10a33f: 52 push %edx
10a340: 68 08 cf 10 00 push $0x10cf08
10a345: 50 push %eax
10a346: 68 08 7a 12 00 push $0x127a08
10a34b: e8 dc 28 00 00 call 10cc2c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10a350: e8 8d 24 00 00 call 10c7e2 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
10a355: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10a35c: 6a 00 push $0x0
10a35e: 57 push %edi
10a35f: ff 37 pushl (%edi)
10a361: ff 75 d4 pushl -0x2c(%ebp)
10a364: e8 2f 50 00 00 call 10f398 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
10a369: 83 c4 20 add $0x20,%esp
10a36c: a1 48 78 12 00 mov 0x127848,%eax
10a371: 83 78 34 04 cmpl $0x4,0x34(%eax)
10a375: 75 10 jne 10a387 <sigtimedwait+0x170>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10a377: 8b 1f mov (%edi),%ebx
10a379: 8d 4b ff lea -0x1(%ebx),%ecx
10a37c: b8 01 00 00 00 mov $0x1,%eax
10a381: d3 e0 shl %cl,%eax
10a383: 85 06 test %eax,(%esi)
10a385: 75 13 jne 10a39a <sigtimedwait+0x183>
errno = _Thread_Executing->Wait.return_code;
10a387: e8 34 7d 00 00 call 1120c0 <__errno>
10a38c: 8b 15 48 78 12 00 mov 0x127848,%edx
10a392: 8b 52 34 mov 0x34(%edx),%edx
10a395: 89 10 mov %edx,(%eax)
return -1;
10a397: 83 cb ff or $0xffffffff,%ebx
}
return the_info->si_signo;
}
10a39a: 89 d8 mov %ebx,%eax
10a39c: 8d 65 f4 lea -0xc(%ebp),%esp
10a39f: 5b pop %ebx
10a3a0: 5e pop %esi
10a3a1: 5f pop %edi
10a3a2: c9 leave
10a3a3: c3 ret
0010c028 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10c028: 55 push %ebp
10c029: 89 e5 mov %esp,%ebp
10c02b: 53 push %ebx
10c02c: 83 ec 08 sub $0x8,%esp
10c02f: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10c032: 6a 00 push $0x0
10c034: 6a 00 push $0x0
10c036: ff 75 08 pushl 0x8(%ebp)
10c039: e8 45 fe ff ff call 10be83 <sigtimedwait>
10c03e: 89 c2 mov %eax,%edx
if ( status != -1 ) {
10c040: 83 c4 10 add $0x10,%esp
10c043: 83 f8 ff cmp $0xffffffff,%eax
10c046: 74 0a je 10c052 <sigwait+0x2a>
if ( sig )
*sig = status;
return 0;
10c048: 31 c0 xor %eax,%eax
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
10c04a: 85 db test %ebx,%ebx
10c04c: 74 0b je 10c059 <sigwait+0x31> <== NEVER TAKEN
*sig = status;
10c04e: 89 13 mov %edx,(%ebx)
10c050: eb 07 jmp 10c059 <sigwait+0x31>
return 0;
}
return errno;
10c052: e8 21 78 00 00 call 113878 <__errno>
10c057: 8b 00 mov (%eax),%eax
}
10c059: 8b 5d fc mov -0x4(%ebp),%ebx
10c05c: c9 leave
10c05d: c3 ret
001096a4 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
1096a4: 55 push %ebp
1096a5: 89 e5 mov %esp,%ebp
1096a7: 56 push %esi
1096a8: 53 push %ebx
1096a9: 8b 5d 0c mov 0xc(%ebp),%ebx
1096ac: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
1096af: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
1096b3: 75 1d jne 1096d2 <timer_create+0x2e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
1096b5: 85 f6 test %esi,%esi
1096b7: 74 19 je 1096d2 <timer_create+0x2e>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
1096b9: 85 db test %ebx,%ebx
1096bb: 74 22 je 1096df <timer_create+0x3b>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
1096bd: 8b 03 mov (%ebx),%eax
1096bf: 48 dec %eax
1096c0: 83 f8 01 cmp $0x1,%eax
1096c3: 77 0d ja 1096d2 <timer_create+0x2e> <== NEVER TAKEN
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
1096c5: 8b 43 04 mov 0x4(%ebx),%eax
1096c8: 85 c0 test %eax,%eax
1096ca: 74 06 je 1096d2 <timer_create+0x2e> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1096cc: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
1096cd: 83 f8 1f cmp $0x1f,%eax
1096d0: 76 0d jbe 1096df <timer_create+0x3b> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1096d2: e8 c9 81 00 00 call 1118a0 <__errno>
1096d7: c7 00 16 00 00 00 movl $0x16,(%eax)
1096dd: eb 2f jmp 10970e <timer_create+0x6a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1096df: a1 38 63 12 00 mov 0x126338,%eax
1096e4: 40 inc %eax
1096e5: a3 38 63 12 00 mov %eax,0x126338
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
1096ea: 83 ec 0c sub $0xc,%esp
1096ed: 68 18 66 12 00 push $0x126618
1096f2: e8 d9 19 00 00 call 10b0d0 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
1096f7: 83 c4 10 add $0x10,%esp
1096fa: 85 c0 test %eax,%eax
1096fc: 75 18 jne 109716 <timer_create+0x72>
_Thread_Enable_dispatch();
1096fe: e8 3f 28 00 00 call 10bf42 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
109703: e8 98 81 00 00 call 1118a0 <__errno>
109708: c7 00 0b 00 00 00 movl $0xb,(%eax)
10970e: 83 c8 ff or $0xffffffff,%eax
109711: e9 83 00 00 00 jmp 109799 <timer_create+0xf5>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
109716: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10971a: 8b 15 5c 68 12 00 mov 0x12685c,%edx
109720: 8b 52 08 mov 0x8(%edx),%edx
109723: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
109726: 85 db test %ebx,%ebx
109728: 74 11 je 10973b <timer_create+0x97>
ptimer->inf.sigev_notify = evp->sigev_notify;
10972a: 8b 13 mov (%ebx),%edx
10972c: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10972f: 8b 53 04 mov 0x4(%ebx),%edx
109732: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
109735: 8b 53 08 mov 0x8(%ebx),%edx
109738: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10973b: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
109742: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
109749: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
109750: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
109757: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10975e: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
109765: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10976c: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
109773: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10977a: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10977d: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
109780: 8b 0d 34 66 12 00 mov 0x126634,%ecx
109786: 89 04 99 mov %eax,(%ecx,%ebx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
109789: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
109790: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
109792: e8 ab 27 00 00 call 10bf42 <_Thread_Enable_dispatch>
return 0;
109797: 31 c0 xor %eax,%eax
}
109799: 8d 65 f8 lea -0x8(%ebp),%esp
10979c: 5b pop %ebx
10979d: 5e pop %esi
10979e: c9 leave
10979f: c3 ret
001097a0 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
1097a0: 55 push %ebp
1097a1: 89 e5 mov %esp,%ebp
1097a3: 57 push %edi
1097a4: 56 push %esi
1097a5: 53 push %ebx
1097a6: 83 ec 2c sub $0x2c,%esp
1097a9: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
1097ac: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
1097b0: 0f 84 58 01 00 00 je 10990e <timer_settime+0x16e> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
1097b6: 83 ec 0c sub $0xc,%esp
1097b9: 8b 45 10 mov 0x10(%ebp),%eax
1097bc: 83 c0 08 add $0x8,%eax
1097bf: 50 push %eax
1097c0: e8 4b 31 00 00 call 10c910 <_Timespec_Is_valid>
1097c5: 83 c4 10 add $0x10,%esp
1097c8: 84 c0 test %al,%al
1097ca: 0f 84 3e 01 00 00 je 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
1097d0: 83 ec 0c sub $0xc,%esp
1097d3: ff 75 10 pushl 0x10(%ebp)
1097d6: e8 35 31 00 00 call 10c910 <_Timespec_Is_valid>
1097db: 83 c4 10 add $0x10,%esp
1097de: 84 c0 test %al,%al
1097e0: 0f 84 28 01 00 00 je 10990e <timer_settime+0x16e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
1097e6: 85 db test %ebx,%ebx
1097e8: 74 09 je 1097f3 <timer_settime+0x53>
1097ea: 83 fb 04 cmp $0x4,%ebx
1097ed: 0f 85 1b 01 00 00 jne 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
1097f3: 8d 7d cc lea -0x34(%ebp),%edi
1097f6: b9 04 00 00 00 mov $0x4,%ecx
1097fb: 8b 75 10 mov 0x10(%ebp),%esi
1097fe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
109800: 83 fb 04 cmp $0x4,%ebx
109803: 75 2f jne 109834 <timer_settime+0x94>
struct timespec now;
_TOD_Get( &now );
109805: 83 ec 0c sub $0xc,%esp
109808: 8d 5d dc lea -0x24(%ebp),%ebx
10980b: 53 push %ebx
10980c: e8 17 14 00 00 call 10ac28 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
109811: 59 pop %ecx
109812: 5e pop %esi
109813: 8d 75 d4 lea -0x2c(%ebp),%esi
109816: 56 push %esi
109817: 53 push %ebx
109818: e8 cf 30 00 00 call 10c8ec <_Timespec_Greater_than>
10981d: 83 c4 10 add $0x10,%esp
109820: 84 c0 test %al,%al
109822: 0f 85 e6 00 00 00 jne 10990e <timer_settime+0x16e>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
109828: 52 push %edx
109829: 56 push %esi
10982a: 56 push %esi
10982b: 53 push %ebx
10982c: e8 03 31 00 00 call 10c934 <_Timespec_Subtract>
109831: 83 c4 10 add $0x10,%esp
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
109834: 50 push %eax
/* If the function reaches this point, then it will be necessary to do
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
109835: 8d 45 e4 lea -0x1c(%ebp),%eax
109838: 50 push %eax
109839: ff 75 08 pushl 0x8(%ebp)
10983c: 68 18 66 12 00 push $0x126618
109841: e8 b6 1c 00 00 call 10b4fc <_Objects_Get>
109846: 89 c3 mov %eax,%ebx
switch ( location ) {
109848: 83 c4 10 add $0x10,%esp
10984b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
10984f: 0f 85 b9 00 00 00 jne 10990e <timer_settime+0x16e>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
109855: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
109859: 75 3b jne 109896 <timer_settime+0xf6>
10985b: 83 7d d8 00 cmpl $0x0,-0x28(%ebp)
10985f: 75 35 jne 109896 <timer_settime+0xf6>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
109861: 83 ec 0c sub $0xc,%esp
109864: 8d 40 10 lea 0x10(%eax),%eax
109867: 50 push %eax
109868: e8 93 34 00 00 call 10cd00 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10986d: 83 c4 10 add $0x10,%esp
109870: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
109874: 74 0d je 109883 <timer_settime+0xe3>
*ovalue = ptimer->timer_data;
109876: 8d 73 54 lea 0x54(%ebx),%esi
109879: b9 04 00 00 00 mov $0x4,%ecx
10987e: 8b 7d 14 mov 0x14(%ebp),%edi
109881: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
109883: 8d 7b 54 lea 0x54(%ebx),%edi
109886: 8d 75 cc lea -0x34(%ebp),%esi
109889: b9 04 00 00 00 mov $0x4,%ecx
10988e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
109890: c6 43 3c 04 movb $0x4,0x3c(%ebx)
109894: eb 35 jmp 1098cb <timer_settime+0x12b>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
109896: 83 ec 0c sub $0xc,%esp
109899: ff 75 10 pushl 0x10(%ebp)
10989c: e8 c7 30 00 00 call 10c968 <_Timespec_To_ticks>
1098a1: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
1098a4: 8d 45 d4 lea -0x2c(%ebp),%eax
1098a7: 89 04 24 mov %eax,(%esp)
1098aa: e8 b9 30 00 00 call 10c968 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
1098af: 89 1c 24 mov %ebx,(%esp)
1098b2: 68 24 99 10 00 push $0x109924
1098b7: ff 73 08 pushl 0x8(%ebx)
1098ba: 50 push %eax
1098bb: 8d 43 10 lea 0x10(%ebx),%eax
1098be: 50 push %eax
1098bf: e8 48 57 00 00 call 10f00c <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
1098c4: 83 c4 20 add $0x20,%esp
1098c7: 84 c0 test %al,%al
1098c9: 75 07 jne 1098d2 <timer_settime+0x132>
_Thread_Enable_dispatch();
1098cb: e8 72 26 00 00 call 10bf42 <_Thread_Enable_dispatch>
1098d0: eb 38 jmp 10990a <timer_settime+0x16a>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
1098d2: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
1098d6: 74 0d je 1098e5 <timer_settime+0x145>
*ovalue = ptimer->timer_data;
1098d8: 8d 73 54 lea 0x54(%ebx),%esi
1098db: b9 04 00 00 00 mov $0x4,%ecx
1098e0: 8b 7d 14 mov 0x14(%ebp),%edi
1098e3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
1098e5: 8d 7b 54 lea 0x54(%ebx),%edi
1098e8: 8d 75 cc lea -0x34(%ebp),%esi
1098eb: b9 04 00 00 00 mov $0x4,%ecx
1098f0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
1098f2: c6 43 3c 03 movb $0x3,0x3c(%ebx)
_TOD_Get( &ptimer->time );
1098f6: 83 ec 0c sub $0xc,%esp
1098f9: 83 c3 6c add $0x6c,%ebx
1098fc: 53 push %ebx
1098fd: e8 26 13 00 00 call 10ac28 <_TOD_Get>
_Thread_Enable_dispatch();
109902: e8 3b 26 00 00 call 10bf42 <_Thread_Enable_dispatch>
return 0;
109907: 83 c4 10 add $0x10,%esp
10990a: 31 c0 xor %eax,%eax
10990c: eb 0e jmp 10991c <timer_settime+0x17c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10990e: e8 8d 7f 00 00 call 1118a0 <__errno>
109913: c7 00 16 00 00 00 movl $0x16,(%eax)
109919: 83 c8 ff or $0xffffffff,%eax
}
10991c: 8d 65 f4 lea -0xc(%ebp),%esp
10991f: 5b pop %ebx
109920: 5e pop %esi
109921: 5f pop %edi
109922: c9 leave
109923: c3 ret
001095e0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
1095e0: 55 push %ebp
1095e1: 89 e5 mov %esp,%ebp
1095e3: 57 push %edi
1095e4: 56 push %esi
1095e5: 53 push %ebx
1095e6: 83 ec 1c sub $0x1c,%esp
1095e9: 8b 75 08 mov 0x8(%ebp),%esi
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
1095ec: 83 3d 20 6c 12 00 00 cmpl $0x0,0x126c20
1095f3: 75 2c jne 109621 <ualarm+0x41>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1095f5: c7 05 0c 6c 12 00 00 movl $0x0,0x126c0c
1095fc: 00 00 00
the_watchdog->routine = routine;
1095ff: c7 05 20 6c 12 00 a8 movl $0x1095a8,0x126c20
109606: 95 10 00
the_watchdog->id = id;
109609: c7 05 24 6c 12 00 00 movl $0x0,0x126c24
109610: 00 00 00
the_watchdog->user_data = user_data;
109613: c7 05 28 6c 12 00 00 movl $0x0,0x126c28
10961a: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10961d: 31 db xor %ebx,%ebx
10961f: eb 4f jmp 109670 <ualarm+0x90>
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
109621: 83 ec 0c sub $0xc,%esp
109624: 68 04 6c 12 00 push $0x126c04
109629: e8 ba 32 00 00 call 10c8e8 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10962e: 83 e8 02 sub $0x2,%eax
109631: 83 c4 10 add $0x10,%esp
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
109634: 31 db xor %ebx,%ebx
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
109636: 83 f8 01 cmp $0x1,%eax
109639: 77 35 ja 109670 <ualarm+0x90> <== NEVER TAKEN
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10963b: a1 18 6c 12 00 mov 0x126c18,%eax
109640: 03 05 10 6c 12 00 add 0x126c10,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109646: 57 push %edi
109647: 57 push %edi
109648: 8d 55 e0 lea -0x20(%ebp),%edx
10964b: 52 push %edx
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
10964c: 2b 05 1c 6c 12 00 sub 0x126c1c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
109652: 50 push %eax
109653: e8 30 2e 00 00 call 10c488 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
109658: 69 4d e0 40 42 0f 00 imul $0xf4240,-0x20(%ebp),%ecx
remaining += tp.tv_nsec / 1000;
10965f: 8b 45 e4 mov -0x1c(%ebp),%eax
109662: bf e8 03 00 00 mov $0x3e8,%edi
109667: 99 cltd
109668: f7 ff idiv %edi
10966a: 8d 1c 08 lea (%eax,%ecx,1),%ebx
10966d: 83 c4 10 add $0x10,%esp
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
109670: 85 f6 test %esi,%esi
109672: 74 44 je 1096b8 <ualarm+0xd8>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
109674: b9 40 42 0f 00 mov $0xf4240,%ecx
109679: 89 f0 mov %esi,%eax
10967b: 31 d2 xor %edx,%edx
10967d: f7 f1 div %ecx
10967f: 89 45 e0 mov %eax,-0x20(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
109682: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
109688: 89 55 e4 mov %edx,-0x1c(%ebp)
ticks = _Timespec_To_ticks( &tp );
10968b: 83 ec 0c sub $0xc,%esp
10968e: 8d 75 e0 lea -0x20(%ebp),%esi
109691: 56 push %esi
109692: e8 4d 2e 00 00 call 10c4e4 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
109697: 89 34 24 mov %esi,(%esp)
10969a: e8 45 2e 00 00 call 10c4e4 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10969f: a3 10 6c 12 00 mov %eax,0x126c10
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1096a4: 59 pop %ecx
1096a5: 5e pop %esi
1096a6: 68 04 6c 12 00 push $0x126c04
1096ab: 68 f4 63 12 00 push $0x1263f4
1096b0: e8 13 31 00 00 call 10c7c8 <_Watchdog_Insert>
1096b5: 83 c4 10 add $0x10,%esp
}
return remaining;
}
1096b8: 89 d8 mov %ebx,%eax
1096ba: 8d 65 f4 lea -0xc(%ebp),%esp
1096bd: 5b pop %ebx
1096be: 5e pop %esi
1096bf: 5f pop %edi
1096c0: c9 leave
1096c1: c3 ret