RTEMS 4.11Annotated Report
Wed Sep 12 22:36:02 2012
0010c260 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10c260: 53 push %ebx
10c261: 83 ec 08 sub $0x8,%esp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10c264: 8b 1d 38 21 13 00 mov 0x132138,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c26a: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c270: 74 0f je 10c281 <_API_extensions_Run_postdriver+0x21><== NEVER TAKEN
10c272: 66 90 xchg %ax,%ax
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
10c274: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c277: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c279: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c27f: 75 f3 jne 10c274 <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10c281: 83 c4 08 add $0x8,%esp
10c284: 5b pop %ebx
10c285: c3 ret
0010c288 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10c288: 53 push %ebx
10c289: 83 ec 18 sub $0x18,%esp
10c28c: 8b 1d 38 21 13 00 mov 0x132138,%ebx
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c292: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c298: 74 17 je 10c2b1 <_API_extensions_Run_postswitch+0x29><== NEVER TAKEN
10c29a: 66 90 xchg %ax,%ax
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
10c29c: a1 cc 24 13 00 mov 0x1324cc,%eax
10c2a1: 89 04 24 mov %eax,(%esp)
10c2a4: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c2a7: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10c2a9: 81 fb 3c 21 13 00 cmp $0x13213c,%ebx
10c2af: 75 eb jne 10c29c <_API_extensions_Run_postswitch+0x14>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10c2b1: 83 c4 18 add $0x18,%esp
10c2b4: 5b pop %ebx
10c2b5: c3 ret
0010e9d4 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e9d4: 53 push %ebx
10e9d5: 83 ec 18 sub $0x18,%esp
10e9d8: 8b 5c 24 20 mov 0x20(%esp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e9dc: 8b 0d 2c 4c 13 00 mov 0x134c2c,%ecx
* 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 );
10e9e2: 9c pushf
10e9e3: fa cli
10e9e4: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e9e5: 8b 43 44 mov 0x44(%ebx),%eax
10e9e8: 85 c0 test %eax,%eax
10e9ea: 74 6c je 10ea58 <_CORE_RWLock_Release+0x84>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e9ec: 48 dec %eax
10e9ed: 74 59 je 10ea48 <_CORE_RWLock_Release+0x74>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e9ef: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
10e9f6: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e9fd: 52 push %edx
10e9fe: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e9ff: 89 1c 24 mov %ebx,(%esp)
10ea02: e8 15 1b 00 00 call 11051c <_Thread_queue_Dequeue>
if ( next ) {
10ea07: 85 c0 test %eax,%eax
10ea09: 74 36 je 10ea41 <_CORE_RWLock_Release+0x6d>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10ea0b: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ea0f: 74 57 je 10ea68 <_CORE_RWLock_Release+0x94>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10ea11: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10ea14: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10ea1b: eb 18 jmp 10ea35 <_CORE_RWLock_Release+0x61>
10ea1d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10ea20: 83 78 30 01 cmpl $0x1,0x30(%eax)
10ea24: 74 1b je 10ea41 <_CORE_RWLock_Release+0x6d><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10ea26: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10ea29: 89 44 24 04 mov %eax,0x4(%esp)
10ea2d: 89 1c 24 mov %ebx,(%esp)
10ea30: e8 ff 1d 00 00 call 110834 <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10ea35: 89 1c 24 mov %ebx,(%esp)
10ea38: e8 0f 1f 00 00 call 11094c <_Thread_queue_First>
if ( !next ||
10ea3d: 85 c0 test %eax,%eax
10ea3f: 75 df jne 10ea20 <_CORE_RWLock_Release+0x4c>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea41: 31 c0 xor %eax,%eax
10ea43: 83 c4 18 add $0x18,%esp
10ea46: 5b pop %ebx
10ea47: c3 ret
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
if ( the_rwlock->number_of_readers != 0 ) {
10ea48: ff 4b 48 decl 0x48(%ebx)
10ea4b: 74 a2 je 10e9ef <_CORE_RWLock_Release+0x1b>
/* must be unlocked again */
_ISR_Enable( level );
10ea4d: 52 push %edx
10ea4e: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea4f: 31 c0 xor %eax,%eax
10ea51: 83 c4 18 add $0x18,%esp
10ea54: 5b pop %ebx
10ea55: c3 ret
10ea56: 66 90 xchg %ax,%ax
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10ea58: 52 push %edx
10ea59: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10ea5a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10ea61: 31 c0 xor %eax,%eax
10ea63: 83 c4 18 add $0x18,%esp
10ea66: 5b pop %ebx
10ea67: c3 ret
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10ea68: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10ea6f: eb d0 jmp 10ea41 <_CORE_RWLock_Release+0x6d>
0010ea74 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10ea74: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ea77: 8d 44 24 1c lea 0x1c(%esp),%eax
10ea7b: 89 44 24 04 mov %eax,0x4(%esp)
10ea7f: 8b 44 24 30 mov 0x30(%esp),%eax
10ea83: 89 04 24 mov %eax,(%esp)
10ea86: e8 e9 16 00 00 call 110174 <_Thread_Get>
switch ( location ) {
10ea8b: 8b 54 24 1c mov 0x1c(%esp),%edx
10ea8f: 85 d2 test %edx,%edx
10ea91: 75 18 jne 10eaab <_CORE_RWLock_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10ea93: 89 04 24 mov %eax,(%esp)
10ea96: e8 75 1f 00 00 call 110a10 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10ea9b: a1 a4 46 13 00 mov 0x1346a4,%eax
10eaa0: 48 dec %eax
10eaa1: a3 a4 46 13 00 mov %eax,0x1346a4
return _Thread_Dispatch_disable_level;
10eaa6: a1 a4 46 13 00 mov 0x1346a4,%eax
_Thread_Unnest_dispatch();
break;
}
}
10eaab: 83 c4 2c add $0x2c,%esp
10eaae: c3 ret
0010c594 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c594: 56 push %esi
10c595: 53 push %ebx
10c596: 83 ec 14 sub $0x14,%esp
10c599: 8b 74 24 20 mov 0x20(%esp),%esi
10c59d: 8a 5c 24 28 mov 0x28(%esp),%bl
* This routine returns true if thread dispatch indicates
* that we are in a critical section.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void)
{
if ( _Thread_Dispatch_disable_level == 0 )
10c5a1: a1 44 1f 13 00 mov 0x131f44,%eax
10c5a6: 85 c0 test %eax,%eax
10c5a8: 74 6e je 10c618 <_CORE_mutex_Seize+0x84>
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c5aa: 84 db test %bl,%bl
10c5ac: 0f 84 95 00 00 00 je 10c647 <_CORE_mutex_Seize+0xb3>
10c5b2: 83 3d a0 20 13 00 01 cmpl $0x1,0x1320a0
10c5b9: 0f 87 9e 00 00 00 ja 10c65d <_CORE_mutex_Seize+0xc9>
10c5bf: 8d 44 24 30 lea 0x30(%esp),%eax
10c5c3: 89 44 24 04 mov %eax,0x4(%esp)
10c5c7: 89 34 24 mov %esi,(%esp)
10c5ca: e8 e5 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c5cf: 85 c0 test %eax,%eax
10c5d1: 74 3c je 10c60f <_CORE_mutex_Seize+0x7b><== ALWAYS TAKEN
10c5d3: 90 nop
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10c5d4: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
10c5db: a1 cc 24 13 00 mov 0x1324cc,%eax
10c5e0: 89 70 44 mov %esi,0x44(%eax)
10c5e3: 8b 54 24 24 mov 0x24(%esp),%edx
10c5e7: 89 50 20 mov %edx,0x20(%eax)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c5ea: a1 44 1f 13 00 mov 0x131f44,%eax
10c5ef: 40 inc %eax
10c5f0: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10c5f5: a1 44 1f 13 00 mov 0x131f44,%eax
10c5fa: ff 74 24 30 pushl 0x30(%esp)
10c5fe: 9d popf
10c5ff: 8b 44 24 2c mov 0x2c(%esp),%eax
10c603: 89 44 24 04 mov %eax,0x4(%esp)
10c607: 89 34 24 mov %esi,(%esp)
10c60a: e8 11 ff ff ff call 10c520 <_CORE_mutex_Seize_interrupt_blocking>
}
10c60f: 83 c4 14 add $0x14,%esp
10c612: 5b pop %ebx
10c613: 5e pop %esi
10c614: c3 ret
10c615: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c618: 8d 44 24 30 lea 0x30(%esp),%eax
10c61c: 89 44 24 04 mov %eax,0x4(%esp)
10c620: 89 34 24 mov %esi,(%esp)
10c623: e8 8c 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c628: 85 c0 test %eax,%eax
10c62a: 74 e3 je 10c60f <_CORE_mutex_Seize+0x7b>
10c62c: 84 db test %bl,%bl
10c62e: 75 a4 jne 10c5d4 <_CORE_mutex_Seize+0x40>
10c630: ff 74 24 30 pushl 0x30(%esp)
10c634: 9d popf
10c635: a1 cc 24 13 00 mov 0x1324cc,%eax
10c63a: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c641: 83 c4 14 add $0x14,%esp
10c644: 5b pop %ebx
10c645: 5e pop %esi
10c646: c3 ret
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c647: 8d 44 24 30 lea 0x30(%esp),%eax
10c64b: 89 44 24 04 mov %eax,0x4(%esp)
10c64f: 89 34 24 mov %esi,(%esp)
10c652: e8 5d 52 00 00 call 1118b4 <_CORE_mutex_Seize_interrupt_trylock>
10c657: 85 c0 test %eax,%eax
10c659: 75 d5 jne 10c630 <_CORE_mutex_Seize+0x9c><== NEVER TAKEN
10c65b: eb b2 jmp 10c60f <_CORE_mutex_Seize+0x7b>
10c65d: c7 44 24 08 12 00 00 movl $0x12,0x8(%esp)
10c664: 00
10c665: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c66c: 00
10c66d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c674: e8 93 05 00 00 call 10cc0c <_Internal_error_Occurred>
0010c7b4 <_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
)
{
10c7b4: 53 push %ebx
10c7b5: 83 ec 18 sub $0x18,%esp
10c7b8: 8b 5c 24 20 mov 0x20(%esp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10c7bc: 89 1c 24 mov %ebx,(%esp)
10c7bf: e8 28 1a 00 00 call 10e1ec <_Thread_queue_Dequeue>
10c7c4: 85 c0 test %eax,%eax
10c7c6: 74 08 je 10c7d0 <_CORE_semaphore_Surrender+0x1c>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c7c8: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c7ca: 83 c4 18 add $0x18,%esp
10c7cd: 5b pop %ebx
10c7ce: c3 ret
10c7cf: 90 nop
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c7d0: 9c pushf
10c7d1: fa cli
10c7d2: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c7d3: 8b 43 48 mov 0x48(%ebx),%eax
10c7d6: 3b 43 40 cmp 0x40(%ebx),%eax
10c7d9: 72 0d jb 10c7e8 <_CORE_semaphore_Surrender+0x34><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c7db: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c7e0: 52 push %edx
10c7e1: 9d popf
}
return status;
}
10c7e2: 83 c4 18 add $0x18,%esp
10c7e5: 5b pop %ebx
10c7e6: c3 ret
10c7e7: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c7e8: 40 inc %eax
10c7e9: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c7ec: 31 c0 xor %eax,%eax
10c7ee: eb f0 jmp 10c7e0 <_CORE_semaphore_Surrender+0x2c>
0010c418 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
10c418: 55 push %ebp
10c419: 57 push %edi
10c41a: 56 push %esi
10c41b: 53 push %ebx
10c41c: 8b 74 24 14 mov 0x14(%esp),%esi
10c420: 8b 44 24 1c mov 0x1c(%esp),%eax
10c424: 8b 5c 24 20 mov 0x20(%esp),%ebx
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c428: 8d 6e 04 lea 0x4(%esi),%ebp
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
10c42b: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
while ( count-- ) {
10c432: 8d 78 ff lea -0x1(%eax),%edi
10c435: 85 c0 test %eax,%eax
10c437: 74 2b je 10c464 <_Chain_Initialize+0x4c><== NEVER TAKEN
10c439: 89 f9 mov %edi,%ecx
10c43b: 8b 44 24 18 mov 0x18(%esp),%eax
10c43f: 89 f2 mov %esi,%edx
10c441: 8d 76 00 lea 0x0(%esi),%esi
current->next = next;
10c444: 89 02 mov %eax,(%edx)
next->previous = current;
10c446: 89 50 04 mov %edx,0x4(%eax)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c449: 49 dec %ecx
10c44a: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
10c44c: 01 d8 add %ebx,%eax
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
10c44e: 83 f9 ff cmp $0xffffffff,%ecx
10c451: 75 f1 jne 10c444 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
10c453: 0f af df imul %edi,%ebx
10c456: 03 5c 24 18 add 0x18(%esp),%ebx
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
10c45a: 89 2b mov %ebp,(%ebx)
tail->previous = current;
10c45c: 89 5e 08 mov %ebx,0x8(%esi)
}
10c45f: 5b pop %ebx
10c460: 5e pop %esi
10c461: 5f pop %edi
10c462: 5d pop %ebp
10c463: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
10c464: 89 f3 mov %esi,%ebx <== NOT EXECUTED
10c466: eb f2 jmp 10c45a <_Chain_Initialize+0x42><== NOT EXECUTED
0010b544 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b544: 55 push %ebp
10b545: 57 push %edi
10b546: 56 push %esi
10b547: 53 push %ebx
10b548: 83 ec 2c sub $0x2c,%esp
10b54b: 8b 5c 24 40 mov 0x40(%esp),%ebx
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b54f: 8b 8b e4 00 00 00 mov 0xe4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b555: 8b 6b 30 mov 0x30(%ebx),%ebp
_ISR_Disable( level );
10b558: 9c pushf
10b559: fa cli
10b55a: 5e pop %esi
pending_events = api->pending_events;
10b55b: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b55d: 8b 43 24 mov 0x24(%ebx),%eax
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
10b560: 89 c7 mov %eax,%edi
10b562: 21 d7 and %edx,%edi
10b564: 89 7c 24 18 mov %edi,0x18(%esp)
10b568: 0f 84 ae 00 00 00 je 10b61c <_Event_Surrender+0xd8>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
10b56e: 8b 3d c8 24 13 00 mov 0x1324c8,%edi
10b574: 85 ff test %edi,%edi
10b576: 74 08 je 10b580 <_Event_Surrender+0x3c>
10b578: 3b 1d cc 24 13 00 cmp 0x1324cc,%ebx
10b57e: 74 58 je 10b5d8 <_Event_Surrender+0x94>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b580: f6 43 11 01 testb $0x1,0x11(%ebx)
10b584: 0f 84 92 00 00 00 je 10b61c <_Event_Surrender+0xd8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b58a: 3b 44 24 18 cmp 0x18(%esp),%eax
10b58e: 74 09 je 10b599 <_Event_Surrender+0x55>
10b590: 83 e5 02 and $0x2,%ebp
10b593: 0f 84 83 00 00 00 je 10b61c <_Event_Surrender+0xd8> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
10b599: 8b 44 24 18 mov 0x18(%esp),%eax
10b59d: f7 d0 not %eax
10b59f: 21 d0 and %edx,%eax
10b5a1: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b5a3: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b5aa: 8b 43 28 mov 0x28(%ebx),%eax
10b5ad: 8b 7c 24 18 mov 0x18(%esp),%edi
10b5b1: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
10b5b3: 56 push %esi
10b5b4: 9d popf
10b5b5: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b5b6: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b5ba: 74 6c je 10b628 <_Event_Surrender+0xe4>
_ISR_Enable( level );
10b5bc: 56 push %esi
10b5bd: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b5be: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b5c5: 10
10b5c6: 89 1c 24 mov %ebx,(%esp)
10b5c9: e8 b2 24 00 00 call 10da80 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
10b5ce: 83 c4 2c add $0x2c,%esp
10b5d1: 5b pop %ebx
10b5d2: 5e pop %esi
10b5d3: 5f pop %edi
10b5d4: 5d pop %ebp
10b5d5: c3 ret
10b5d6: 66 90 xchg %ax,%ax
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b5d8: 8b 3d 08 29 13 00 mov 0x132908,%edi
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
10b5de: 83 ff 02 cmp $0x2,%edi
10b5e1: 74 09 je 10b5ec <_Event_Surrender+0xa8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b5e3: 8b 3d 08 29 13 00 mov 0x132908,%edi
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
10b5e9: 4f dec %edi
10b5ea: 75 94 jne 10b580 <_Event_Surrender+0x3c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b5ec: 3b 44 24 18 cmp 0x18(%esp),%eax
10b5f0: 74 05 je 10b5f7 <_Event_Surrender+0xb3>
10b5f2: 83 e5 02 and $0x2,%ebp
10b5f5: 74 25 je 10b61c <_Event_Surrender+0xd8> <== NEVER TAKEN
10b5f7: 8b 44 24 18 mov 0x18(%esp),%eax
10b5fb: f7 d0 not %eax
10b5fd: 21 d0 and %edx,%eax
10b5ff: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b601: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b608: 8b 43 28 mov 0x28(%ebx),%eax
10b60b: 8b 54 24 18 mov 0x18(%esp),%edx
10b60f: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b611: c7 05 08 29 13 00 03 movl $0x3,0x132908
10b618: 00 00 00
10b61b: 90 nop
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b61c: 56 push %esi
10b61d: 9d popf
}
10b61e: 83 c4 2c add $0x2c,%esp
10b621: 5b pop %ebx
10b622: 5e pop %esi
10b623: 5f pop %edi
10b624: 5d pop %ebp
10b625: c3 ret
10b626: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b628: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10b62f: 56 push %esi
10b630: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b631: 8d 43 48 lea 0x48(%ebx),%eax
10b634: 89 04 24 mov %eax,(%esp)
10b637: e8 24 35 00 00 call 10eb60 <_Watchdog_Remove>
10b63c: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b643: 10
10b644: 89 1c 24 mov %ebx,(%esp)
10b647: e8 34 24 00 00 call 10da80 <_Thread_Clear_state>
10b64c: eb d0 jmp 10b61e <_Event_Surrender+0xda>
0010b650 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b650: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b653: 8d 44 24 1c lea 0x1c(%esp),%eax
10b657: 89 44 24 04 mov %eax,0x4(%esp)
10b65b: 8b 44 24 30 mov 0x30(%esp),%eax
10b65f: 89 04 24 mov %eax,(%esp)
10b662: e8 dd 27 00 00 call 10de44 <_Thread_Get>
switch ( location ) {
10b667: 8b 54 24 1c mov 0x1c(%esp),%edx
10b66b: 85 d2 test %edx,%edx
10b66d: 75 3b jne 10b6aa <_Event_Timeout+0x5a> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
10b66f: 9c pushf
10b670: fa cli
10b671: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b672: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b679: 3b 05 cc 24 13 00 cmp 0x1324cc,%eax
10b67f: 74 2f je 10b6b0 <_Event_Timeout+0x60>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b681: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b688: 52 push %edx
10b689: 9d popf
10b68a: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
10b691: 10
10b692: 89 04 24 mov %eax,(%esp)
10b695: e8 e6 23 00 00 call 10da80 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10b69a: a1 44 1f 13 00 mov 0x131f44,%eax
10b69f: 48 dec %eax
10b6a0: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10b6a5: a1 44 1f 13 00 mov 0x131f44,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b6aa: 83 c4 2c add $0x2c,%esp
10b6ad: c3 ret
10b6ae: 66 90 xchg %ax,%ax
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b6b0: 8b 0d 08 29 13 00 mov 0x132908,%ecx
10b6b6: 49 dec %ecx
10b6b7: 75 c8 jne 10b681 <_Event_Timeout+0x31>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b6b9: c7 05 08 29 13 00 02 movl $0x2,0x132908
10b6c0: 00 00 00
10b6c3: eb bc jmp 10b681 <_Event_Timeout+0x31>
001119e8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
1119e8: 55 push %ebp
1119e9: 57 push %edi
1119ea: 56 push %esi
1119eb: 53 push %ebx
1119ec: 83 ec 3c sub $0x3c,%esp
1119ef: 8b 6c 24 54 mov 0x54(%esp),%ebp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
1119f3: 8d 45 04 lea 0x4(%ebp),%eax
1119f6: 89 44 24 10 mov %eax,0x10(%esp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
1119fa: 8b 54 24 50 mov 0x50(%esp),%edx
1119fe: 8b 52 10 mov 0x10(%edx),%edx
111a01: 89 54 24 18 mov %edx,0x18(%esp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
111a05: 39 c5 cmp %eax,%ebp
111a07: 0f 87 ab 01 00 00 ja 111bb8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
111a0d: 8b 5c 24 5c mov 0x5c(%esp),%ebx
111a11: 85 db test %ebx,%ebx
111a13: 0f 85 77 01 00 00 jne 111b90 <_Heap_Allocate_aligned_with_boundary+0x1a8>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
111a19: 8b 54 24 50 mov 0x50(%esp),%edx
111a1d: 8b 72 08 mov 0x8(%edx),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a20: 31 ff xor %edi,%edi
111a22: 39 f2 cmp %esi,%edx
111a24: 74 4a je 111a70 <_Heap_Allocate_aligned_with_boundary+0x88>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111a26: 8b 44 24 18 mov 0x18(%esp),%eax
111a2a: 83 c0 07 add $0x7,%eax
111a2d: 89 44 24 24 mov %eax,0x24(%esp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
111a31: c7 44 24 14 04 00 00 movl $0x4,0x14(%esp)
111a38: 00
111a39: 29 6c 24 14 sub %ebp,0x14(%esp)
111a3d: eb 1e jmp 111a5d <_Heap_Allocate_aligned_with_boundary+0x75>
111a3f: 90 nop
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
111a40: 8b 54 24 58 mov 0x58(%esp),%edx
111a44: 85 d2 test %edx,%edx
111a46: 75 40 jne 111a88 <_Heap_Allocate_aligned_with_boundary+0xa0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111a48: 8d 5e 08 lea 0x8(%esi),%ebx
);
}
}
/* Statistics */
++search_count;
111a4b: 47 inc %edi
if ( alloc_begin != 0 ) {
111a4c: 85 db test %ebx,%ebx
111a4e: 0f 85 14 01 00 00 jne 111b68 <_Heap_Allocate_aligned_with_boundary+0x180><== ALWAYS TAKEN
break;
}
block = block->next;
111a54: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a57: 39 74 24 50 cmp %esi,0x50(%esp)
111a5b: 74 13 je 111a70 <_Heap_Allocate_aligned_with_boundary+0x88>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
111a5d: 8b 5e 04 mov 0x4(%esi),%ebx
111a60: 39 5c 24 10 cmp %ebx,0x10(%esp)
111a64: 72 da jb 111a40 <_Heap_Allocate_aligned_with_boundary+0x58>
);
}
}
/* Statistics */
++search_count;
111a66: 47 inc %edi
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
111a67: 8b 76 08 mov 0x8(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111a6a: 39 74 24 50 cmp %esi,0x50(%esp)
111a6e: 75 ed jne 111a5d <_Heap_Allocate_aligned_with_boundary+0x75>
);
}
}
/* Statistics */
++search_count;
111a70: 31 c0 xor %eax,%eax
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
111a72: 8b 54 24 50 mov 0x50(%esp),%edx
111a76: 39 7a 44 cmp %edi,0x44(%edx)
111a79: 73 03 jae 111a7e <_Heap_Allocate_aligned_with_boundary+0x96>
stats->max_search = search_count;
111a7b: 89 7a 44 mov %edi,0x44(%edx)
}
return (void *) alloc_begin;
}
111a7e: 83 c4 3c add $0x3c,%esp
111a81: 5b pop %ebx
111a82: 5e pop %esi
111a83: 5f pop %edi
111a84: 5d pop %ebp
111a85: c3 ret
111a86: 66 90 xchg %ax,%ax
111a88: 8b 54 24 50 mov 0x50(%esp),%edx
111a8c: 8b 52 14 mov 0x14(%edx),%edx
111a8f: 89 54 24 1c mov %edx,0x1c(%esp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111a93: 83 e3 fe and $0xfffffffe,%ebx
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
111a96: 01 f3 add %esi,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
111a98: 8d 46 08 lea 0x8(%esi),%eax
111a9b: 89 44 24 20 mov %eax,0x20(%esp)
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
111a9f: 8b 4c 24 24 mov 0x24(%esp),%ecx
111aa3: 29 d1 sub %edx,%ecx
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
111aa5: 01 d9 add %ebx,%ecx
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
111aa7: 03 5c 24 14 add 0x14(%esp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111aab: 89 d8 mov %ebx,%eax
111aad: 31 d2 xor %edx,%edx
111aaf: f7 74 24 58 divl 0x58(%esp)
111ab3: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
111ab5: 39 d9 cmp %ebx,%ecx
111ab7: 73 0c jae 111ac5 <_Heap_Allocate_aligned_with_boundary+0xdd>
111ab9: 89 c8 mov %ecx,%eax
111abb: 31 d2 xor %edx,%edx
111abd: f7 74 24 58 divl 0x58(%esp)
111ac1: 89 cb mov %ecx,%ebx
111ac3: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
111ac5: 8b 44 24 5c mov 0x5c(%esp),%eax
111ac9: 85 c0 test %eax,%eax
111acb: 74 64 je 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
111acd: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
111ad0: 8b 54 24 20 mov 0x20(%esp),%edx
111ad4: 01 ea add %ebp,%edx
111ad6: 89 54 24 28 mov %edx,0x28(%esp)
111ada: 89 c8 mov %ecx,%eax
111adc: 31 d2 xor %edx,%edx
111ade: f7 74 24 5c divl 0x5c(%esp)
111ae2: 89 c8 mov %ecx,%eax
111ae4: 29 d0 sub %edx,%eax
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111ae6: 39 c3 cmp %eax,%ebx
111ae8: 73 47 jae 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
111aea: 39 c1 cmp %eax,%ecx
111aec: 76 43 jbe 111b31 <_Heap_Allocate_aligned_with_boundary+0x149>
if ( boundary_line < boundary_floor ) {
111aee: 39 44 24 28 cmp %eax,0x28(%esp)
111af2: 77 68 ja 111b5c <_Heap_Allocate_aligned_with_boundary+0x174>
111af4: 89 74 24 2c mov %esi,0x2c(%esp)
111af8: 8b 74 24 28 mov 0x28(%esp),%esi
111afc: eb 0e jmp 111b0c <_Heap_Allocate_aligned_with_boundary+0x124>
111afe: 66 90 xchg %ax,%ax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111b00: 39 c1 cmp %eax,%ecx
111b02: 76 29 jbe 111b2d <_Heap_Allocate_aligned_with_boundary+0x145>
if ( boundary_line < boundary_floor ) {
111b04: 39 c6 cmp %eax,%esi
111b06: 0f 87 a0 00 00 00 ja 111bac <_Heap_Allocate_aligned_with_boundary+0x1c4><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
111b0c: 89 c3 mov %eax,%ebx
111b0e: 29 eb sub %ebp,%ebx
111b10: 89 d8 mov %ebx,%eax
111b12: 31 d2 xor %edx,%edx
111b14: f7 74 24 58 divl 0x58(%esp)
111b18: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
111b1a: 8d 0c 2b lea (%ebx,%ebp,1),%ecx
111b1d: 89 c8 mov %ecx,%eax
111b1f: 31 d2 xor %edx,%edx
111b21: f7 74 24 5c divl 0x5c(%esp)
111b25: 89 c8 mov %ecx,%eax
111b27: 29 d0 sub %edx,%eax
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
111b29: 39 c3 cmp %eax,%ebx
111b2b: 72 d3 jb 111b00 <_Heap_Allocate_aligned_with_boundary+0x118>
111b2d: 8b 74 24 2c mov 0x2c(%esp),%esi
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
111b31: 39 5c 24 20 cmp %ebx,0x20(%esp)
111b35: 77 25 ja 111b5c <_Heap_Allocate_aligned_with_boundary+0x174>
111b37: b9 f8 ff ff ff mov $0xfffffff8,%ecx
111b3c: 29 f1 sub %esi,%ecx
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111b3e: 01 d9 add %ebx,%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111b40: 89 d8 mov %ebx,%eax
111b42: 31 d2 xor %edx,%edx
111b44: f7 74 24 18 divl 0x18(%esp)
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
111b48: 29 d1 sub %edx,%ecx
if ( free_size >= min_block_size || free_size == 0 ) {
111b4a: 39 4c 24 1c cmp %ecx,0x1c(%esp)
111b4e: 0f 86 f7 fe ff ff jbe 111a4b <_Heap_Allocate_aligned_with_boundary+0x63>
111b54: 85 c9 test %ecx,%ecx
111b56: 0f 84 ef fe ff ff je 111a4b <_Heap_Allocate_aligned_with_boundary+0x63>
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
return 0;
111b5c: 31 db xor %ebx,%ebx
);
}
}
/* Statistics */
++search_count;
111b5e: 47 inc %edi
if ( alloc_begin != 0 ) {
111b5f: 85 db test %ebx,%ebx
111b61: 0f 84 ed fe ff ff je 111a54 <_Heap_Allocate_aligned_with_boundary+0x6c><== ALWAYS TAKEN
111b67: 90 nop
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
111b68: 8b 44 24 50 mov 0x50(%esp),%eax
111b6c: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
111b6f: 01 78 4c add %edi,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
111b72: 89 6c 24 0c mov %ebp,0xc(%esp)
111b76: 89 5c 24 08 mov %ebx,0x8(%esp)
111b7a: 89 74 24 04 mov %esi,0x4(%esp)
111b7e: 89 04 24 mov %eax,(%esp)
111b81: e8 a2 af ff ff call 10cb28 <_Heap_Block_allocate>
111b86: 89 d8 mov %ebx,%eax
111b88: e9 e5 fe ff ff jmp 111a72 <_Heap_Allocate_aligned_with_boundary+0x8a>
111b8d: 8d 76 00 lea 0x0(%esi),%esi
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
111b90: 3b 6c 24 5c cmp 0x5c(%esp),%ebp
111b94: 77 22 ja 111bb8 <_Heap_Allocate_aligned_with_boundary+0x1d0>
return NULL;
}
if ( alignment == 0 ) {
111b96: 8b 4c 24 58 mov 0x58(%esp),%ecx
111b9a: 85 c9 test %ecx,%ecx
111b9c: 0f 85 77 fe ff ff jne 111a19 <_Heap_Allocate_aligned_with_boundary+0x31>
alignment = page_size;
111ba2: 89 54 24 58 mov %edx,0x58(%esp)
111ba6: e9 6e fe ff ff jmp 111a19 <_Heap_Allocate_aligned_with_boundary+0x31>
111bab: 90 nop
111bac: 8b 74 24 2c mov 0x2c(%esp),%esi <== NOT EXECUTED
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
return 0;
111bb0: 31 db xor %ebx,%ebx <== NOT EXECUTED
111bb2: e9 94 fe ff ff jmp 111a4b <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
111bb7: 90 nop <== NOT EXECUTED
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
/* Integer overflow occured */
return NULL;
111bb8: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111bba: 83 c4 3c add $0x3c,%esp
111bbd: 5b pop %ebx
111bbe: 5e pop %esi
111bbf: 5f pop %edi
111bc0: 5d pop %ebp
111bc1: c3 ret
00111c10 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
111c10: 55 push %ebp
111c11: 57 push %edi
111c12: 56 push %esi
111c13: 53 push %ebx
111c14: 83 ec 5c sub $0x5c,%esp
111c17: 8b 7c 24 70 mov 0x70(%esp),%edi
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
111c1b: 8b 4f 20 mov 0x20(%edi),%ecx
111c1e: 89 4c 24 28 mov %ecx,0x28(%esp)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
111c22: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
111c29: 00
Heap_Block *extend_last_block = NULL;
111c2a: c7 44 24 4c 00 00 00 movl $0x0,0x4c(%esp)
111c31: 00
uintptr_t const page_size = heap->page_size;
111c32: 8b 4f 10 mov 0x10(%edi),%ecx
111c35: 89 4c 24 24 mov %ecx,0x24(%esp)
uintptr_t const min_block_size = heap->min_block_size;
111c39: 8b 47 14 mov 0x14(%edi),%eax
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
111c3c: 8b 4f 30 mov 0x30(%edi),%ecx
111c3f: 89 4c 24 2c mov %ecx,0x2c(%esp)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
111c43: 8b 6c 24 74 mov 0x74(%esp),%ebp
111c47: 03 6c 24 78 add 0x78(%esp),%ebp
111c4b: 73 0b jae 111c58 <_Heap_Extend+0x48>
return false;
111c4d: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111c4f: 83 c4 5c add $0x5c,%esp
111c52: 5b pop %ebx
111c53: 5e pop %esi
111c54: 5f pop %edi
111c55: 5d pop %ebp
111c56: c3 ret
111c57: 90 nop
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
111c58: 8d 54 24 4c lea 0x4c(%esp),%edx
111c5c: 89 54 24 14 mov %edx,0x14(%esp)
111c60: 8d 54 24 48 lea 0x48(%esp),%edx
111c64: 89 54 24 10 mov %edx,0x10(%esp)
111c68: 89 44 24 0c mov %eax,0xc(%esp)
111c6c: 8b 4c 24 24 mov 0x24(%esp),%ecx
111c70: 89 4c 24 08 mov %ecx,0x8(%esp)
111c74: 8b 44 24 78 mov 0x78(%esp),%eax
111c78: 89 44 24 04 mov %eax,0x4(%esp)
111c7c: 8b 4c 24 74 mov 0x74(%esp),%ecx
111c80: 89 0c 24 mov %ecx,(%esp)
111c83: e8 80 ad ff ff call 10ca08 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
111c88: 84 c0 test %al,%al
111c8a: 74 c1 je 111c4d <_Heap_Extend+0x3d>
111c8c: 8b 5c 24 28 mov 0x28(%esp),%ebx
111c90: c7 44 24 34 00 00 00 movl $0x0,0x34(%esp)
111c97: 00
111c98: c7 44 24 38 00 00 00 movl $0x0,0x38(%esp)
111c9f: 00
111ca0: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp)
111ca7: 00
111ca8: c7 44 24 30 00 00 00 movl $0x0,0x30(%esp)
111caf: 00
111cb0: 89 7c 24 3c mov %edi,0x3c(%esp)
111cb4: eb 28 jmp 111cde <_Heap_Extend+0xce>
111cb6: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
111cb8: 39 cd cmp %ecx,%ebp
111cba: 73 04 jae 111cc0 <_Heap_Extend+0xb0>
111cbc: 89 5c 24 38 mov %ebx,0x38(%esp)
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
111cc0: 3b 4c 24 74 cmp 0x74(%esp),%ecx
111cc4: 74 4f je 111d15 <_Heap_Extend+0x105>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
111cc6: 39 4c 24 74 cmp %ecx,0x74(%esp)
111cca: 76 04 jbe 111cd0 <_Heap_Extend+0xc0>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
111ccc: 89 74 24 34 mov %esi,0x34(%esp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111cd0: 8b 5e 04 mov 0x4(%esi),%ebx
111cd3: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111cd6: 01 f3 add %esi,%ebx
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111cd8: 39 5c 24 28 cmp %ebx,0x28(%esp)
111cdc: 74 4b je 111d29 <_Heap_Extend+0x119>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111cde: 3b 5c 24 28 cmp 0x28(%esp),%ebx
111ce2: 0f 84 40 01 00 00 je 111e28 <_Heap_Extend+0x218>
111ce8: 89 df mov %ebx,%edi
uintptr_t const sub_area_end = start_block->prev_size;
111cea: 8b 0b mov (%ebx),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111cec: 8d 71 f8 lea -0x8(%ecx),%esi
111cef: 89 c8 mov %ecx,%eax
111cf1: 31 d2 xor %edx,%edx
111cf3: f7 74 24 24 divl 0x24(%esp)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
111cf7: 29 d6 sub %edx,%esi
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
111cf9: 39 4c 24 74 cmp %ecx,0x74(%esp)
111cfd: 73 08 jae 111d07 <_Heap_Extend+0xf7>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
111cff: 39 ef cmp %ebp,%edi
111d01: 0f 82 46 ff ff ff jb 111c4d <_Heap_Extend+0x3d>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
111d07: 39 ef cmp %ebp,%edi
111d09: 75 ad jne 111cb8 <_Heap_Extend+0xa8>
111d0b: 89 5c 24 30 mov %ebx,0x30(%esp)
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
111d0f: 3b 4c 24 74 cmp 0x74(%esp),%ecx
111d13: 75 b1 jne 111cc6 <_Heap_Extend+0xb6> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
111d15: 89 2b mov %ebp,(%ebx)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
111d17: 89 74 24 20 mov %esi,0x20(%esp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111d1b: 8b 5e 04 mov 0x4(%esi),%ebx
111d1e: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111d21: 01 f3 add %esi,%ebx
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
111d23: 39 5c 24 28 cmp %ebx,0x28(%esp)
111d27: 75 b5 jne 111cde <_Heap_Extend+0xce> <== NEVER TAKEN
111d29: 8b 7c 24 3c mov 0x3c(%esp),%edi
if ( extend_area_begin < heap->area_begin ) {
111d2d: 8b 4c 24 74 mov 0x74(%esp),%ecx
111d31: 3b 4f 18 cmp 0x18(%edi),%ecx
111d34: 0f 82 fa 00 00 00 jb 111e34 <_Heap_Extend+0x224>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
111d3a: 3b 6f 1c cmp 0x1c(%edi),%ebp
111d3d: 76 03 jbe 111d42 <_Heap_Extend+0x132>
heap->area_end = extend_area_end;
111d3f: 89 6f 1c mov %ebp,0x1c(%edi)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
111d42: 8b 54 24 4c mov 0x4c(%esp),%edx
111d46: 8b 44 24 48 mov 0x48(%esp),%eax
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
111d4a: 89 d1 mov %edx,%ecx
111d4c: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
111d4e: 89 28 mov %ebp,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
111d50: 89 cb mov %ecx,%ebx
111d52: 83 cb 01 or $0x1,%ebx
111d55: 89 58 04 mov %ebx,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
111d58: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
111d5a: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
111d61: 39 47 20 cmp %eax,0x20(%edi)
111d64: 0f 86 d2 00 00 00 jbe 111e3c <_Heap_Extend+0x22c>
heap->first_block = extend_first_block;
111d6a: 89 47 20 mov %eax,0x20(%edi)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
111d6d: 8b 44 24 30 mov 0x30(%esp),%eax
111d71: 85 c0 test %eax,%eax
111d73: 0f 84 d7 00 00 00 je 111e50 <_Heap_Extend+0x240>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
111d79: 8b 4f 10 mov 0x10(%edi),%ecx
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
111d7c: 8b 5c 24 74 mov 0x74(%esp),%ebx
111d80: 83 c3 08 add $0x8,%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
111d83: 89 d8 mov %ebx,%eax
111d85: 31 d2 xor %edx,%edx
111d87: f7 f1 div %ecx
if ( remainder != 0 ) {
111d89: 85 d2 test %edx,%edx
111d8b: 74 04 je 111d91 <_Heap_Extend+0x181>
return value - remainder + alignment;
111d8d: 01 cb add %ecx,%ebx
111d8f: 29 d3 sub %edx,%ebx
uintptr_t const new_first_block_begin =
111d91: 8d 53 f8 lea -0x8(%ebx),%edx
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
111d94: 8b 4c 24 30 mov 0x30(%esp),%ecx
111d98: 8b 01 mov (%ecx),%eax
111d9a: 89 43 f8 mov %eax,-0x8(%ebx)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
111d9d: 89 c8 mov %ecx,%eax
111d9f: 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;
111da1: 83 c8 01 or $0x1,%eax
111da4: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
111da7: 89 f8 mov %edi,%eax
111da9: e8 46 fe ff ff call 111bf4 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
111dae: 8b 5c 24 20 mov 0x20(%esp),%ebx
111db2: 85 db test %ebx,%ebx
111db4: 0f 84 b6 00 00 00 je 111e70 <_Heap_Extend+0x260>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
111dba: 8d 4d f8 lea -0x8(%ebp),%ecx
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
111dbd: 2b 4c 24 20 sub 0x20(%esp),%ecx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111dc1: 89 c8 mov %ecx,%eax
111dc3: 31 d2 xor %edx,%edx
111dc5: f7 77 10 divl 0x10(%edi)
111dc8: 29 d1 sub %edx,%ecx
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
111dca: 8b 54 24 20 mov 0x20(%esp),%edx
111dce: 8b 42 04 mov 0x4(%edx),%eax
111dd1: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
111dd3: 83 c8 01 or $0x1,%eax
111dd6: 89 44 11 04 mov %eax,0x4(%ecx,%edx,1)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111dda: 8b 42 04 mov 0x4(%edx),%eax
111ddd: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
111de0: 09 c8 or %ecx,%eax
111de2: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
111de5: 89 f8 mov %edi,%eax
111de7: e8 08 fe ff ff call 111bf4 <_Heap_Free_block>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111dec: 8b 57 24 mov 0x24(%edi),%edx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111def: 8b 42 04 mov 0x4(%edx),%eax
111df2: 83 e0 01 and $0x1,%eax
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
111df5: 8b 4f 20 mov 0x20(%edi),%ecx
111df8: 29 d1 sub %edx,%ecx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
111dfa: 09 c8 or %ecx,%eax
111dfc: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
111dff: 8b 47 30 mov 0x30(%edi),%eax
111e02: 2b 44 24 2c sub 0x2c(%esp),%eax
/* Statistics */
stats->size += extended_size;
111e06: 01 47 2c add %eax,0x2c(%edi)
if ( extended_size_ptr != NULL )
111e09: 8b 54 24 7c mov 0x7c(%esp),%edx
111e0d: 85 d2 test %edx,%edx
111e0f: 0f 84 a3 00 00 00 je 111eb8 <_Heap_Extend+0x2a8> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111e15: 8b 4c 24 7c mov 0x7c(%esp),%ecx
111e19: 89 01 mov %eax,(%ecx)
return true;
111e1b: b0 01 mov $0x1,%al
}
111e1d: 83 c4 5c add $0x5c,%esp
111e20: 5b pop %ebx
111e21: 5e pop %esi
111e22: 5f pop %edi
111e23: 5d pop %ebp
111e24: c3 ret
111e25: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111e28: 8b 4c 24 3c mov 0x3c(%esp),%ecx
111e2c: 8b 79 18 mov 0x18(%ecx),%edi
111e2f: e9 b6 fe ff ff jmp 111cea <_Heap_Extend+0xda>
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
111e34: 89 4f 18 mov %ecx,0x18(%edi)
111e37: e9 06 ff ff ff jmp 111d42 <_Heap_Extend+0x132>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
111e3c: 39 57 24 cmp %edx,0x24(%edi)
111e3f: 0f 83 28 ff ff ff jae 111d6d <_Heap_Extend+0x15d>
heap->last_block = extend_last_block;
111e45: 89 57 24 mov %edx,0x24(%edi)
111e48: e9 20 ff ff ff jmp 111d6d <_Heap_Extend+0x15d>
111e4d: 8d 76 00 lea 0x0(%esi),%esi
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
111e50: 8b 74 24 38 mov 0x38(%esp),%esi
111e54: 85 f6 test %esi,%esi
111e56: 0f 84 52 ff ff ff je 111dae <_Heap_Extend+0x19e>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
111e5c: 8b 44 24 38 mov 0x38(%esp),%eax
111e60: 29 d0 sub %edx,%eax
111e62: 83 c8 01 or $0x1,%eax
111e65: 89 42 04 mov %eax,0x4(%edx)
111e68: e9 41 ff ff ff jmp 111dae <_Heap_Extend+0x19e>
111e6d: 8d 76 00 lea 0x0(%esi),%esi
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
111e70: 8b 4c 24 34 mov 0x34(%esp),%ecx
111e74: 85 c9 test %ecx,%ecx
111e76: 74 23 je 111e9b <_Heap_Extend+0x28b>
_Heap_Link_above(
111e78: 8b 4c 24 4c mov 0x4c(%esp),%ecx
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
111e7c: 8b 54 24 34 mov 0x34(%esp),%edx
111e80: 8b 42 04 mov 0x4(%edx),%eax
111e83: 83 e0 01 and $0x1,%eax
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
111e86: 8b 54 24 48 mov 0x48(%esp),%edx
111e8a: 2b 54 24 34 sub 0x34(%esp),%edx
block->size_and_flag = size | flag;
111e8e: 09 d0 or %edx,%eax
111e90: 8b 54 24 34 mov 0x34(%esp),%edx
111e94: 89 42 04 mov %eax,0x4(%edx)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
111e97: 83 49 04 01 orl $0x1,0x4(%ecx)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111e9b: 83 7c 24 30 00 cmpl $0x0,0x30(%esp)
111ea0: 0f 85 46 ff ff ff jne 111dec <_Heap_Extend+0x1dc>
_Heap_Free_block( heap, extend_first_block );
111ea6: 8b 54 24 48 mov 0x48(%esp),%edx
111eaa: 89 f8 mov %edi,%eax
111eac: e8 43 fd ff ff call 111bf4 <_Heap_Free_block>
111eb1: e9 36 ff ff ff jmp 111dec <_Heap_Extend+0x1dc>
111eb6: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
111eb8: b0 01 mov $0x1,%al <== NOT EXECUTED
111eba: e9 90 fd ff ff jmp 111c4f <_Heap_Extend+0x3f> <== NOT EXECUTED
00111bc4 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
111bc4: 55 push %ebp
111bc5: 57 push %edi
111bc6: 56 push %esi
111bc7: 53 push %ebx
111bc8: 83 ec 0c sub $0xc,%esp
111bcb: 8b 4c 24 20 mov 0x20(%esp),%ecx
111bcf: 8b 44 24 24 mov 0x24(%esp),%eax
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
111bd3: 85 c0 test %eax,%eax
111bd5: 0f 84 a1 00 00 00 je 111c7c <_Heap_Free+0xb8>
111bdb: 8d 58 f8 lea -0x8(%eax),%ebx
111bde: 31 d2 xor %edx,%edx
111be0: 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);
111be3: 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
111be5: 8b 41 20 mov 0x20(%ecx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111be8: 39 c3 cmp %eax,%ebx
111bea: 72 1c jb 111c08 <_Heap_Free+0x44>
111bec: 8b 71 24 mov 0x24(%ecx),%esi
111bef: 39 f3 cmp %esi,%ebx
111bf1: 77 15 ja 111c08 <_Heap_Free+0x44>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111bf3: 8b 53 04 mov 0x4(%ebx),%edx
111bf6: 89 14 24 mov %edx,(%esp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111bf9: 89 d7 mov %edx,%edi
111bfb: 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);
111bfe: 8d 14 1f lea (%edi,%ebx,1),%edx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111c01: 39 d0 cmp %edx,%eax
111c03: 76 0f jbe 111c14 <_Heap_Free+0x50> <== ALWAYS TAKEN
111c05: 8d 76 00 lea 0x0(%esi),%esi
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
111c08: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c0a: 83 c4 0c add $0xc,%esp
111c0d: 5b pop %ebx
111c0e: 5e pop %esi
111c0f: 5f pop %edi
111c10: 5d pop %ebp
111c11: c3 ret
111c12: 66 90 xchg %ax,%ax
111c14: 39 d6 cmp %edx,%esi
111c16: 72 f0 jb 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
111c18: 8b 6a 04 mov 0x4(%edx),%ebp
111c1b: 89 6c 24 04 mov %ebp,0x4(%esp)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
111c1f: 83 e5 01 and $0x1,%ebp
111c22: 74 e4 je 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111c24: 8b 6c 24 04 mov 0x4(%esp),%ebp
111c28: 83 e5 fe and $0xfffffffe,%ebp
111c2b: 89 6c 24 04 mov %ebp,0x4(%esp)
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
111c2f: 39 d6 cmp %edx,%esi
111c31: 74 53 je 111c86 <_Heap_Free+0xc2>
111c33: f6 44 2a 04 01 testb $0x1,0x4(%edx,%ebp,1)
111c38: 75 4c jne 111c86 <_Heap_Free+0xc2>
if ( !_Heap_Is_prev_used( block ) ) {
111c3a: f6 04 24 01 testb $0x1,(%esp)
111c3e: 0f 84 df 00 00 00 je 111d23 <_Heap_Free+0x15f>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
111c44: 8b 6c 24 04 mov 0x4(%esp),%ebp
111c48: 01 fd add %edi,%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c4a: 8b 72 08 mov 0x8(%edx),%esi
111c4d: 8b 42 0c mov 0xc(%edx),%eax
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
111c50: 89 73 08 mov %esi,0x8(%ebx)
new_block->prev = prev;
111c53: 89 43 0c mov %eax,0xc(%ebx)
next->prev = new_block;
111c56: 89 5e 0c mov %ebx,0xc(%esi)
prev->next = new_block;
111c59: 89 58 08 mov %ebx,0x8(%eax)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111c5c: 89 e8 mov %ebp,%eax
111c5e: 83 c8 01 or $0x1,%eax
111c61: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
111c64: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
111c68: ff 49 40 decl 0x40(%ecx)
++stats->frees;
111c6b: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
111c6e: 01 79 30 add %edi,0x30(%ecx)
return( true );
111c71: b0 01 mov $0x1,%al
}
111c73: 83 c4 0c add $0xc,%esp
111c76: 5b pop %ebx
111c77: 5e pop %esi
111c78: 5f pop %edi
111c79: 5d pop %ebp
111c7a: c3 ret
111c7b: 90 nop
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
111c7c: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111c7e: 83 c4 0c add $0xc,%esp
111c81: 5b pop %ebx
111c82: 5e pop %esi
111c83: 5f pop %edi
111c84: 5d pop %ebp
111c85: c3 ret
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
111c86: f6 04 24 01 testb $0x1,(%esp)
111c8a: 75 4d jne 111cd9 <_Heap_Free+0x115>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
111c8c: c6 44 24 0b 00 movb $0x0,0xb(%esp)
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
111c91: 8b 2b mov (%ebx),%ebp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111c93: 29 eb sub %ebp,%ebx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111c95: 39 d8 cmp %ebx,%eax
111c97: 0f 87 6b ff ff ff ja 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
111c9d: 39 de cmp %ebx,%esi
111c9f: 0f 82 63 ff ff ff jb 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
111ca5: f6 43 04 01 testb $0x1,0x4(%ebx)
111ca9: 0f 84 59 ff ff ff je 111c08 <_Heap_Free+0x44> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
111caf: 01 fd add %edi,%ebp
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
111cb1: 80 7c 24 0b 00 cmpb $0x0,0xb(%esp)
111cb6: 74 58 je 111d10 <_Heap_Free+0x14c>
uintptr_t const size = block_size + prev_size + next_block_size;
111cb8: 03 6c 24 04 add 0x4(%esp),%ebp
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111cbc: 8b 42 08 mov 0x8(%edx),%eax
111cbf: 8b 52 0c mov 0xc(%edx),%edx
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
111cc2: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
111cc5: 89 50 0c mov %edx,0xc(%eax)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
111cc8: ff 49 38 decl 0x38(%ecx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111ccb: 89 e8 mov %ebp,%eax
111ccd: 83 c8 01 or $0x1,%eax
111cd0: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
111cd3: 89 6c 1d 00 mov %ebp,0x0(%ebp,%ebx,1)
111cd7: eb 8f jmp 111c68 <_Heap_Free+0xa4>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
111cd9: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
111cdc: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
111cdf: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
111ce2: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
111ce5: 89 58 0c mov %ebx,0xc(%eax)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
111ce8: 89 f8 mov %edi,%eax
111cea: 83 c8 01 or $0x1,%eax
111ced: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111cf0: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
111cf4: 89 3a mov %edi,(%edx)
/* Statistics */
++stats->free_blocks;
111cf6: 8b 41 38 mov 0x38(%ecx),%eax
111cf9: 40 inc %eax
111cfa: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
111cfd: 3b 41 3c cmp 0x3c(%ecx),%eax
111d00: 0f 86 62 ff ff ff jbe 111c68 <_Heap_Free+0xa4>
stats->max_free_blocks = stats->free_blocks;
111d06: 89 41 3c mov %eax,0x3c(%ecx)
111d09: e9 5a ff ff ff jmp 111c68 <_Heap_Free+0xa4>
111d0e: 66 90 xchg %ax,%ax
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
111d10: 89 e8 mov %ebp,%eax
111d12: 83 c8 01 or $0x1,%eax
111d15: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111d18: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
111d1c: 89 2a mov %ebp,(%edx)
111d1e: e9 45 ff ff ff jmp 111c68 <_Heap_Free+0xa4>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
111d23: c6 44 24 0b 01 movb $0x1,0xb(%esp)
111d28: e9 64 ff ff ff jmp 111c91 <_Heap_Free+0xcd>
00115d34 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
115d34: 55 push %ebp
115d35: 57 push %edi
115d36: 56 push %esi
115d37: 53 push %ebx
115d38: 8b 6c 24 14 mov 0x14(%esp),%ebp
115d3c: 8b 7c 24 18 mov 0x18(%esp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
115d40: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
115d46: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
115d4d: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
115d54: 8b 55 08 mov 0x8(%ebp),%edx
for(the_block = _Heap_Free_list_first(the_heap);
115d57: 39 d5 cmp %edx,%ebp
115d59: 74 30 je 115d8b <_Heap_Get_free_information+0x57><== NEVER TAKEN
115d5b: bb 01 00 00 00 mov $0x1,%ebx
115d60: 31 f6 xor %esi,%esi
115d62: 31 c9 xor %ecx,%ecx
115d64: eb 07 jmp 115d6d <_Heap_Get_free_information+0x39>
115d66: 66 90 xchg %ax,%ax
115d68: 8b 77 04 mov 0x4(%edi),%esi
115d6b: 89 c3 mov %eax,%ebx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
115d6d: 8b 42 04 mov 0x4(%edx),%eax
115d70: 83 e0 fe and $0xfffffffe,%eax
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
115d73: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
115d75: 39 f0 cmp %esi,%eax
115d77: 76 03 jbe 115d7c <_Heap_Get_free_information+0x48>
info->largest = the_size;
115d79: 89 47 04 mov %eax,0x4(%edi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
115d7c: 8b 52 08 mov 0x8(%edx),%edx
115d7f: 8d 43 01 lea 0x1(%ebx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
115d82: 39 d5 cmp %edx,%ebp
115d84: 75 e2 jne 115d68 <_Heap_Get_free_information+0x34>
115d86: 89 1f mov %ebx,(%edi)
115d88: 89 4f 08 mov %ecx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115d8b: 5b pop %ebx
115d8c: 5e pop %esi
115d8d: 5f pop %edi
115d8e: 5d pop %ebp
115d8f: c3 ret
0010e864 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
10e864: 55 push %ebp
10e865: 57 push %edi
10e866: 56 push %esi
10e867: 53 push %ebx
10e868: 83 ec 1c sub $0x1c,%esp
10e86b: 8b 5c 24 30 mov 0x30(%esp),%ebx
10e86f: 8b 7c 24 34 mov 0x34(%esp),%edi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e873: 8b 44 24 38 mov 0x38(%esp),%eax
10e877: 85 c0 test %eax,%eax
10e879: 0f 84 9f 00 00 00 je 10e91e <_Heap_Greedy_allocate+0xba>
10e87f: 31 ed xor %ebp,%ebp
10e881: 31 f6 xor %esi,%esi
10e883: 90 nop
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
10e884: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10e88b: 00
10e88c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10e893: 00
10e894: 8b 04 af mov (%edi,%ebp,4),%eax
10e897: 89 44 24 04 mov %eax,0x4(%esp)
10e89b: 89 1c 24 mov %ebx,(%esp)
10e89e: e8 21 77 00 00 call 115fc4 <_Heap_Allocate_aligned_with_boundary>
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
10e8a3: 85 c0 test %eax,%eax
10e8a5: 74 0f je 10e8b6 <_Heap_Greedy_allocate+0x52><== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10e8a7: 8d 48 f8 lea -0x8(%eax),%ecx
10e8aa: 31 d2 xor %edx,%edx
10e8ac: 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);
10e8af: 29 d1 sub %edx,%ecx
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
10e8b1: 89 71 08 mov %esi,0x8(%ecx)
10e8b4: 89 ce mov %ecx,%esi
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
10e8b6: 45 inc %ebp
10e8b7: 3b 6c 24 38 cmp 0x38(%esp),%ebp
10e8bb: 75 c7 jne 10e884 <_Heap_Greedy_allocate+0x20>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e8bd: 8b 7b 08 mov 0x8(%ebx),%edi
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e8c0: 39 fb cmp %edi,%ebx
10e8c2: 74 5e je 10e922 <_Heap_Greedy_allocate+0xbe><== NEVER TAKEN
10e8c4: 31 ed xor %ebp,%ebp
10e8c6: eb 02 jmp 10e8ca <_Heap_Greedy_allocate+0x66>
10e8c8: 89 c7 mov %eax,%edi
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10e8ca: 8b 47 04 mov 0x4(%edi),%eax
10e8cd: 83 e0 fe and $0xfffffffe,%eax
_Heap_Block_allocate(
10e8d0: 83 e8 08 sub $0x8,%eax
10e8d3: 89 44 24 0c mov %eax,0xc(%esp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e8d7: 8d 47 08 lea 0x8(%edi),%eax
10e8da: 89 44 24 08 mov %eax,0x8(%esp)
10e8de: 89 7c 24 04 mov %edi,0x4(%esp)
10e8e2: 89 1c 24 mov %ebx,(%esp)
10e8e5: e8 ce 02 00 00 call 10ebb8 <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
10e8ea: 89 6f 08 mov %ebp,0x8(%edi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10e8ed: 8b 43 08 mov 0x8(%ebx),%eax
10e8f0: 89 fd mov %edi,%ebp
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e8f2: 39 c3 cmp %eax,%ebx
10e8f4: 75 d2 jne 10e8c8 <_Heap_Greedy_allocate+0x64>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e8f6: 85 f6 test %esi,%esi
10e8f8: 74 1a je 10e914 <_Heap_Greedy_allocate+0xb0>
10e8fa: 66 90 xchg %ax,%ax
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e8fc: 8b 6e 08 mov 0x8(%esi),%ebp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10e8ff: 83 c6 08 add $0x8,%esi
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e902: 89 74 24 04 mov %esi,0x4(%esp)
10e906: 89 1c 24 mov %ebx,(%esp)
10e909: e8 92 78 00 00 call 1161a0 <_Heap_Free>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
10e90e: 89 ee mov %ebp,%esi
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
10e910: 85 f6 test %esi,%esi
10e912: 75 e8 jne 10e8fc <_Heap_Greedy_allocate+0x98>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
10e914: 89 f8 mov %edi,%eax
10e916: 83 c4 1c add $0x1c,%esp
10e919: 5b pop %ebx
10e91a: 5e pop %esi
10e91b: 5f pop %edi
10e91c: 5d pop %ebp
10e91d: c3 ret
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
10e91e: 31 f6 xor %esi,%esi
10e920: eb 9b jmp 10e8bd <_Heap_Greedy_allocate+0x59>
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
10e922: 31 ff xor %edi,%edi <== NOT EXECUTED
10e924: eb ea jmp 10e910 <_Heap_Greedy_allocate+0xac><== NOT EXECUTED
0010e928 <_Heap_Greedy_free>:
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
10e928: 56 push %esi
10e929: 53 push %ebx
10e92a: 83 ec 14 sub $0x14,%esp
10e92d: 8b 74 24 20 mov 0x20(%esp),%esi
10e931: 8b 44 24 24 mov 0x24(%esp),%eax
while ( blocks != NULL ) {
10e935: 85 c0 test %eax,%eax
10e937: 74 1b je 10e954 <_Heap_Greedy_free+0x2c><== NEVER TAKEN
10e939: 8d 76 00 lea 0x0(%esi),%esi
Heap_Block *current = blocks;
blocks = blocks->next;
10e93c: 8b 58 08 mov 0x8(%eax),%ebx
10e93f: 83 c0 08 add $0x8,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
10e942: 89 44 24 04 mov %eax,0x4(%esp)
10e946: 89 34 24 mov %esi,(%esp)
10e949: e8 52 78 00 00 call 1161a0 <_Heap_Free>
)
{
while ( blocks != NULL ) {
Heap_Block *current = blocks;
blocks = blocks->next;
10e94e: 89 d8 mov %ebx,%eax
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
while ( blocks != NULL ) {
10e950: 85 db test %ebx,%ebx
10e952: 75 e8 jne 10e93c <_Heap_Greedy_free+0x14>
Heap_Block *current = blocks;
blocks = blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
}
10e954: 83 c4 14 add $0x14,%esp
10e957: 5b pop %ebx
10e958: 5e pop %esi
10e959: c3 ret
00115de4 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
115de4: 55 push %ebp
115de5: 57 push %edi
115de6: 56 push %esi
115de7: 53 push %ebx
115de8: 83 ec 1c sub $0x1c,%esp
115deb: 8b 54 24 30 mov 0x30(%esp),%edx
115def: 8b 7c 24 34 mov 0x34(%esp),%edi
115df3: 8b 74 24 38 mov 0x38(%esp),%esi
Heap_Block *current = heap->first_block;
115df7: 8b 42 20 mov 0x20(%edx),%eax
Heap_Block *end = heap->last_block;
115dfa: 8b 5a 24 mov 0x24(%edx),%ebx
bool stop = false;
while ( !stop && current != end ) {
115dfd: 39 d8 cmp %ebx,%eax
115dff: 75 09 jne 115e0a <_Heap_Iterate+0x26> <== ALWAYS TAKEN
115e01: eb 2b jmp 115e2e <_Heap_Iterate+0x4a> <== NOT EXECUTED
115e03: 90 nop <== NOT EXECUTED
115e04: 89 e8 mov %ebp,%eax
115e06: 39 eb cmp %ebp,%ebx
115e08: 74 24 je 115e2e <_Heap_Iterate+0x4a>
115e0a: 8b 50 04 mov 0x4(%eax),%edx
115e0d: 83 e2 fe and $0xfffffffe,%edx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
115e10: 8d 2c 10 lea (%eax,%edx,1),%ebp
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
115e13: 89 74 24 0c mov %esi,0xc(%esp)
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
115e17: 8b 4d 04 mov 0x4(%ebp),%ecx
115e1a: 83 e1 01 and $0x1,%ecx
115e1d: 89 4c 24 08 mov %ecx,0x8(%esp)
115e21: 89 54 24 04 mov %edx,0x4(%esp)
115e25: 89 04 24 mov %eax,(%esp)
115e28: ff d7 call *%edi
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
115e2a: 84 c0 test %al,%al
115e2c: 74 d6 je 115e04 <_Heap_Iterate+0x20> <== ALWAYS TAKEN
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
115e2e: 83 c4 1c add $0x1c,%esp
115e31: 5b pop %ebx
115e32: 5e pop %esi
115e33: 5f pop %edi
115e34: 5d pop %ebp
115e35: c3 ret
00111e3c <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
111e3c: 56 push %esi
111e3d: 53 push %ebx
111e3e: 8b 5c 24 0c mov 0xc(%esp),%ebx
111e42: 8b 74 24 10 mov 0x10(%esp),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
111e46: 8d 4e f8 lea -0x8(%esi),%ecx
111e49: 89 f0 mov %esi,%eax
111e4b: 31 d2 xor %edx,%edx
111e4d: 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);
111e50: 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
111e52: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111e55: 39 c1 cmp %eax,%ecx
111e57: 72 07 jb 111e60 <_Heap_Size_of_alloc_area+0x24>
111e59: 8b 53 24 mov 0x24(%ebx),%edx
111e5c: 39 d1 cmp %edx,%ecx
111e5e: 76 08 jbe 111e68 <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
111e60: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
111e62: 5b pop %ebx
111e63: 5e pop %esi
111e64: c3 ret
111e65: 8d 76 00 lea 0x0(%esi),%esi
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
111e68: 8b 59 04 mov 0x4(%ecx),%ebx
111e6b: 83 e3 fe and $0xfffffffe,%ebx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
111e6e: 01 d9 add %ebx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111e70: 39 c8 cmp %ecx,%eax
111e72: 77 ec ja 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
111e74: 39 ca cmp %ecx,%edx
111e76: 72 e8 jb 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
111e78: f6 41 04 01 testb $0x1,0x4(%ecx)
111e7c: 74 e2 je 111e60 <_Heap_Size_of_alloc_area+0x24><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
111e7e: 29 f1 sub %esi,%ecx
111e80: 8d 51 04 lea 0x4(%ecx),%edx
111e83: 8b 44 24 14 mov 0x14(%esp),%eax
111e87: 89 10 mov %edx,(%eax)
return true;
111e89: b0 01 mov $0x1,%al
}
111e8b: 5b pop %ebx
111e8c: 5e pop %esi
111e8d: c3 ret
0010d508 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d508: 55 push %ebp
10d509: 57 push %edi
10d50a: 56 push %esi
10d50b: 53 push %ebx
10d50c: 83 ec 5c sub $0x5c,%esp
10d50f: 8b 5c 24 70 mov 0x70(%esp),%ebx
uintptr_t const page_size = heap->page_size;
10d513: 8b 4b 10 mov 0x10(%ebx),%ecx
10d516: 89 4c 24 30 mov %ecx,0x30(%esp)
uintptr_t const min_block_size = heap->min_block_size;
10d51a: 8b 43 14 mov 0x14(%ebx),%eax
10d51d: 89 44 24 38 mov %eax,0x38(%esp)
Heap_Block *const first_block = heap->first_block;
10d521: 8b 4b 20 mov 0x20(%ebx),%ecx
10d524: 89 4c 24 34 mov %ecx,0x34(%esp)
Heap_Block *const last_block = heap->last_block;
10d528: 8b 4b 24 mov 0x24(%ebx),%ecx
10d52b: 89 4c 24 3c mov %ecx,0x3c(%esp)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d52f: 80 7c 24 78 00 cmpb $0x0,0x78(%esp)
10d534: 74 1a je 10d550 <_Heap_Walk+0x48>
10d536: bd c0 d4 10 00 mov $0x10d4c0,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d53b: 83 3d a0 38 13 00 03 cmpl $0x3,0x1338a0
10d542: 74 1a je 10d55e <_Heap_Walk+0x56> <== ALWAYS TAKEN
}
block = next_block;
} while ( block != first_block );
return true;
10d544: b0 01 mov $0x1,%al
}
10d546: 83 c4 5c add $0x5c,%esp
10d549: 5b pop %ebx
10d54a: 5e pop %esi
10d54b: 5f pop %edi
10d54c: 5d pop %ebp
10d54d: c3 ret
10d54e: 66 90 xchg %ax,%ax
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d550: bd bc d4 10 00 mov $0x10d4bc,%ebp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d555: 83 3d a0 38 13 00 03 cmpl $0x3,0x1338a0
10d55c: 75 e6 jne 10d544 <_Heap_Walk+0x3c>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
10d55e: 8b 43 0c mov 0xc(%ebx),%eax
10d561: 89 44 24 28 mov %eax,0x28(%esp)
10d565: 8b 43 08 mov 0x8(%ebx),%eax
10d568: 89 44 24 24 mov %eax,0x24(%esp)
10d56c: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10d570: 89 4c 24 20 mov %ecx,0x20(%esp)
10d574: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d578: 89 4c 24 1c mov %ecx,0x1c(%esp)
10d57c: 8b 43 1c mov 0x1c(%ebx),%eax
10d57f: 89 44 24 18 mov %eax,0x18(%esp)
10d583: 8b 43 18 mov 0x18(%ebx),%eax
10d586: 89 44 24 14 mov %eax,0x14(%esp)
10d58a: 8b 44 24 38 mov 0x38(%esp),%eax
10d58e: 89 44 24 10 mov %eax,0x10(%esp)
10d592: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d596: 89 4c 24 0c mov %ecx,0xc(%esp)
10d59a: c7 44 24 08 10 3c 12 movl $0x123c10,0x8(%esp)
10d5a1: 00
10d5a2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d5a9: 00
10d5aa: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d5ae: 89 0c 24 mov %ecx,(%esp)
10d5b1: ff d5 call *%ebp
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d5b3: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d5b7: 85 c9 test %ecx,%ecx
10d5b9: 0f 84 a1 00 00 00 je 10d660 <_Heap_Walk+0x158>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d5bf: f6 44 24 30 03 testb $0x3,0x30(%esp)
10d5c4: 0f 85 b6 00 00 00 jne 10d680 <_Heap_Walk+0x178>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d5ca: 8b 44 24 38 mov 0x38(%esp),%eax
10d5ce: 31 d2 xor %edx,%edx
10d5d0: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d5d4: 85 d2 test %edx,%edx
10d5d6: 0f 85 cc 00 00 00 jne 10d6a8 <_Heap_Walk+0x1a0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d5dc: 8b 44 24 34 mov 0x34(%esp),%eax
10d5e0: 83 c0 08 add $0x8,%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d5e3: 31 d2 xor %edx,%edx
10d5e5: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if (
10d5e9: 85 d2 test %edx,%edx
10d5eb: 0f 85 df 00 00 00 jne 10d6d0 <_Heap_Walk+0x1c8>
block = next_block;
} while ( block != first_block );
return true;
}
10d5f1: 8b 44 24 34 mov 0x34(%esp),%eax
10d5f5: 8b 48 04 mov 0x4(%eax),%ecx
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d5f8: f6 c1 01 test $0x1,%cl
10d5fb: 0f 84 f7 00 00 00 je 10d6f8 <_Heap_Walk+0x1f0>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d601: 8b 54 24 3c mov 0x3c(%esp),%edx
10d605: 8b 42 04 mov 0x4(%edx),%eax
10d608: 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);
10d60b: 01 d0 add %edx,%eax
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d60d: f6 40 04 01 testb $0x1,0x4(%eax)
10d611: 74 2d je 10d640 <_Heap_Walk+0x138>
);
return false;
}
if (
10d613: 39 44 24 34 cmp %eax,0x34(%esp)
10d617: 0f 84 fb 00 00 00 je 10d718 <_Heap_Walk+0x210>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
10d61d: c7 44 24 08 2c 3d 12 movl $0x123d2c,0x8(%esp)
10d624: 00
10d625: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d62c: 00
10d62d: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d631: 89 0c 24 mov %ecx,(%esp)
10d634: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d636: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d638: 83 c4 5c add $0x5c,%esp
10d63b: 5b pop %ebx
10d63c: 5e pop %esi
10d63d: 5f pop %edi
10d63e: 5d pop %ebp
10d63f: c3 ret
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d640: c7 44 24 08 c5 3b 12 movl $0x123bc5,0x8(%esp)
10d647: 00
10d648: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d64f: 00
10d650: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d654: 89 0c 24 mov %ecx,(%esp)
10d657: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d659: 31 c0 xor %eax,%eax
10d65b: eb db jmp 10d638 <_Heap_Walk+0x130>
10d65d: 8d 76 00 lea 0x0(%esi),%esi
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
10d660: c7 44 24 08 94 3b 12 movl $0x123b94,0x8(%esp)
10d667: 00
10d668: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d66f: 00
10d670: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d674: 89 0c 24 mov %ecx,(%esp)
10d677: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d679: 31 c0 xor %eax,%eax
10d67b: eb bb jmp 10d638 <_Heap_Walk+0x130>
10d67d: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10d680: 8b 4c 24 30 mov 0x30(%esp),%ecx
10d684: 89 4c 24 0c mov %ecx,0xc(%esp)
10d688: c7 44 24 08 a7 3b 12 movl $0x123ba7,0x8(%esp)
10d68f: 00
10d690: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d697: 00
10d698: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d69c: 89 0c 24 mov %ecx,(%esp)
10d69f: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6a1: 31 c0 xor %eax,%eax
10d6a3: eb 93 jmp 10d638 <_Heap_Walk+0x130>
10d6a5: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d6a8: 8b 44 24 38 mov 0x38(%esp),%eax
10d6ac: 89 44 24 0c mov %eax,0xc(%esp)
10d6b0: c7 44 24 08 a4 3c 12 movl $0x123ca4,0x8(%esp)
10d6b7: 00
10d6b8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6bf: 00
10d6c0: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6c4: 89 0c 24 mov %ecx,(%esp)
10d6c7: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6c9: 31 c0 xor %eax,%eax
10d6cb: e9 68 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d6d0: 8b 4c 24 34 mov 0x34(%esp),%ecx
10d6d4: 89 4c 24 0c mov %ecx,0xc(%esp)
10d6d8: c7 44 24 08 c8 3c 12 movl $0x123cc8,0x8(%esp)
10d6df: 00
10d6e0: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d6e7: 00
10d6e8: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d6ec: 89 0c 24 mov %ecx,(%esp)
10d6ef: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d6f1: 31 c0 xor %eax,%eax
10d6f3: e9 40 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d6f8: c7 44 24 08 fc 3c 12 movl $0x123cfc,0x8(%esp)
10d6ff: 00
10d700: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d707: 00
10d708: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d70c: 89 0c 24 mov %ecx,(%esp)
10d70f: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d711: 31 c0 xor %eax,%eax
10d713: e9 20 ff ff ff jmp 10d638 <_Heap_Walk+0x130>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10d718: 8b 43 10 mov 0x10(%ebx),%eax
10d71b: 89 44 24 40 mov %eax,0x40(%esp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d71f: 8b 73 08 mov 0x8(%ebx),%esi
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d722: 39 f3 cmp %esi,%ebx
10d724: 0f 84 f3 03 00 00 je 10db1d <_Heap_Walk+0x615>
block = next_block;
} while ( block != first_block );
return true;
}
10d72a: 8b 43 20 mov 0x20(%ebx),%eax
10d72d: 89 44 24 48 mov %eax,0x48(%esp)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d731: 39 f0 cmp %esi,%eax
10d733: 76 27 jbe 10d75c <_Heap_Walk+0x254> <== ALWAYS TAKEN
10d735: 8d 76 00 lea 0x0(%esi),%esi
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d738: 89 74 24 0c mov %esi,0xc(%esp)
10d73c: c7 44 24 08 5c 3d 12 movl $0x123d5c,0x8(%esp)
10d743: 00
10d744: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d74b: 00
10d74c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d750: 89 0c 24 mov %ecx,(%esp)
10d753: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d755: 31 c0 xor %eax,%eax
10d757: e9 dc fe ff ff jmp 10d638 <_Heap_Walk+0x130>
10d75c: 8b 53 24 mov 0x24(%ebx),%edx
10d75f: 89 54 24 44 mov %edx,0x44(%esp)
10d763: 39 f2 cmp %esi,%edx
10d765: 72 d1 jb 10d738 <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d767: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d76a: 31 d2 xor %edx,%edx
10d76c: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d770: 85 d2 test %edx,%edx
10d772: 0f 85 a2 00 00 00 jne 10d81a <_Heap_Walk+0x312> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d778: 8b 46 04 mov 0x4(%esi),%eax
10d77b: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d77e: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d783: 75 71 jne 10d7f6 <_Heap_Walk+0x2ee> <== NEVER TAKEN
10d785: 89 da mov %ebx,%edx
10d787: 89 f7 mov %esi,%edi
10d789: 89 4c 24 4c mov %ecx,0x4c(%esp)
10d78d: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d791: eb 34 jmp 10d7c7 <_Heap_Walk+0x2bf>
10d793: 90 nop
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d794: 8b 76 08 mov 0x8(%esi),%esi
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10d797: 39 f3 cmp %esi,%ebx
10d799: 0f 84 9f 00 00 00 je 10d83e <_Heap_Walk+0x336>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d79f: 39 ce cmp %ecx,%esi
10d7a1: 72 95 jb 10d738 <_Heap_Walk+0x230>
10d7a3: 3b 74 24 44 cmp 0x44(%esp),%esi
10d7a7: 77 8f ja 10d738 <_Heap_Walk+0x230> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d7a9: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d7ac: 31 d2 xor %edx,%edx
10d7ae: f7 74 24 40 divl 0x40(%esp)
);
return false;
}
if (
10d7b2: 85 d2 test %edx,%edx
10d7b4: 75 64 jne 10d81a <_Heap_Walk+0x312>
10d7b6: 89 fa mov %edi,%edx
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10d7b8: 8b 46 04 mov 0x4(%esi),%eax
10d7bb: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d7be: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d7c3: 75 31 jne 10d7f6 <_Heap_Walk+0x2ee>
10d7c5: 89 f7 mov %esi,%edi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d7c7: 8b 46 0c mov 0xc(%esi),%eax
10d7ca: 39 d0 cmp %edx,%eax
10d7cc: 74 c6 je 10d794 <_Heap_Walk+0x28c>
(*printer)(
10d7ce: 89 44 24 10 mov %eax,0x10(%esp)
10d7d2: 89 74 24 0c mov %esi,0xc(%esp)
10d7d6: c7 44 24 08 ac 3d 12 movl $0x123dac,0x8(%esp)
10d7dd: 00
10d7de: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d7e5: 00
10d7e6: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d7ea: 89 0c 24 mov %ecx,(%esp)
10d7ed: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d7ef: 31 c0 xor %eax,%eax
10d7f1: e9 42 fe ff ff jmp 10d638 <_Heap_Walk+0x130>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10d7f6: 89 74 24 0c mov %esi,0xc(%esp)
10d7fa: c7 44 24 08 da 3b 12 movl $0x123bda,0x8(%esp)
10d801: 00
10d802: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d809: 00
10d80a: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d80e: 89 0c 24 mov %ecx,(%esp)
10d811: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d813: 31 c0 xor %eax,%eax
10d815: e9 1e fe ff ff jmp 10d638 <_Heap_Walk+0x130>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d81a: 89 74 24 0c mov %esi,0xc(%esp)
10d81e: c7 44 24 08 7c 3d 12 movl $0x123d7c,0x8(%esp)
10d825: 00
10d826: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d82d: 00
10d82e: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d832: 89 0c 24 mov %ecx,(%esp)
10d835: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d837: 31 c0 xor %eax,%eax
10d839: e9 fa fd ff ff jmp 10d638 <_Heap_Walk+0x130>
10d83e: 8b 4c 24 4c mov 0x4c(%esp),%ecx
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d842: 8b 74 24 34 mov 0x34(%esp),%esi
10d846: 89 6c 24 44 mov %ebp,0x44(%esp)
10d84a: 8b 44 24 48 mov 0x48(%esp),%eax
10d84e: 89 dd mov %ebx,%ebp
10d850: 89 cb mov %ecx,%ebx
10d852: 83 e3 fe and $0xfffffffe,%ebx
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
10d855: 83 e1 01 and $0x1,%ecx
10d858: 89 4c 24 40 mov %ecx,0x40(%esp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10d85c: 8d 3c 33 lea (%ebx,%esi,1),%edi
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10d85f: 39 f8 cmp %edi,%eax
10d861: 76 2d jbe 10d890 <_Heap_Walk+0x388> <== ALWAYS TAKEN
10d863: 8b 6c 24 44 mov 0x44(%esp),%ebp
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10d867: 89 7c 24 10 mov %edi,0x10(%esp)
10d86b: 89 74 24 0c mov %esi,0xc(%esp)
10d86f: c7 44 24 08 e0 3d 12 movl $0x123de0,0x8(%esp)
10d876: 00
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d877: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d87e: 00
10d87f: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d883: 89 0c 24 mov %ecx,(%esp)
10d886: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10d888: 31 c0 xor %eax,%eax
10d88a: e9 a9 fd ff ff jmp 10d638 <_Heap_Walk+0x130>
10d88f: 90 nop
10d890: 39 7d 24 cmp %edi,0x24(%ebp)
10d893: 72 ce jb 10d863 <_Heap_Walk+0x35b>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
10d895: 3b 74 24 3c cmp 0x3c(%esp),%esi
10d899: 0f 95 c1 setne %cl
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d89c: 89 d8 mov %ebx,%eax
10d89e: 31 d2 xor %edx,%edx
10d8a0: f7 74 24 30 divl 0x30(%esp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d8a4: 85 d2 test %edx,%edx
10d8a6: 74 5c je 10d904 <_Heap_Walk+0x3fc>
10d8a8: 84 c9 test %cl,%cl
10d8aa: 0f 85 54 02 00 00 jne 10db04 <_Heap_Walk+0x5fc>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d8b0: f6 47 04 01 testb $0x1,0x4(%edi)
10d8b4: 0f 84 e6 00 00 00 je 10d9a0 <_Heap_Walk+0x498>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d8ba: 8b 44 24 40 mov 0x40(%esp),%eax
10d8be: 85 c0 test %eax,%eax
10d8c0: 0f 84 aa 00 00 00 je 10d970 <_Heap_Walk+0x468>
(*printer)(
10d8c6: 89 5c 24 10 mov %ebx,0x10(%esp)
10d8ca: 89 74 24 0c mov %esi,0xc(%esp)
10d8ce: c7 44 24 08 f6 3b 12 movl $0x123bf6,0x8(%esp)
10d8d5: 00
10d8d6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d8dd: 00
10d8de: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d8e2: 89 0c 24 mov %ecx,(%esp)
10d8e5: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d8e9: ff d1 call *%ecx
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d8eb: 39 7c 24 34 cmp %edi,0x34(%esp)
10d8ef: 0f 84 4f fc ff ff je 10d544 <_Heap_Walk+0x3c>
10d8f5: 8b 4f 04 mov 0x4(%edi),%ecx
10d8f8: 8b 45 20 mov 0x20(%ebp),%eax
10d8fb: 89 fe mov %edi,%esi
10d8fd: e9 4e ff ff ff jmp 10d850 <_Heap_Walk+0x348>
10d902: 66 90 xchg %ax,%ax
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d904: 39 5c 24 38 cmp %ebx,0x38(%esp)
10d908: 76 3a jbe 10d944 <_Heap_Walk+0x43c>
10d90a: 84 c9 test %cl,%cl
10d90c: 74 a2 je 10d8b0 <_Heap_Walk+0x3a8> <== NEVER TAKEN
10d90e: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d912: 8b 44 24 38 mov 0x38(%esp),%eax
10d916: 89 44 24 14 mov %eax,0x14(%esp)
10d91a: 89 5c 24 10 mov %ebx,0x10(%esp)
10d91e: 89 74 24 0c mov %esi,0xc(%esp)
10d922: c7 44 24 08 40 3e 12 movl $0x123e40,0x8(%esp)
10d929: 00
10d92a: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10d931: 00
10d932: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d936: 89 0c 24 mov %ecx,(%esp)
10d939: ff d5 call *%ebp
block,
block_size,
min_block_size
);
return false;
10d93b: 31 c0 xor %eax,%eax
10d93d: e9 04 fc ff ff jmp 10d546 <_Heap_Walk+0x3e>
10d942: 66 90 xchg %ax,%ax
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d944: 39 fe cmp %edi,%esi
10d946: 0f 82 64 ff ff ff jb 10d8b0 <_Heap_Walk+0x3a8>
10d94c: 84 c9 test %cl,%cl
10d94e: 0f 84 5c ff ff ff je 10d8b0 <_Heap_Walk+0x3a8>
10d954: 8b 6c 24 44 mov 0x44(%esp),%ebp
(*printer)(
10d958: 89 7c 24 10 mov %edi,0x10(%esp)
10d95c: 89 74 24 0c mov %esi,0xc(%esp)
10d960: c7 44 24 08 6c 3e 12 movl $0x123e6c,0x8(%esp)
10d967: 00
10d968: e9 0a ff ff ff jmp 10d877 <_Heap_Walk+0x36f>
10d96d: 8d 76 00 lea 0x0(%esi),%esi
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d970: 8b 06 mov (%esi),%eax
10d972: 89 44 24 14 mov %eax,0x14(%esp)
10d976: 89 5c 24 10 mov %ebx,0x10(%esp)
10d97a: 89 74 24 0c mov %esi,0xc(%esp)
10d97e: c7 44 24 08 44 3f 12 movl $0x123f44,0x8(%esp)
10d985: 00
10d986: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d98d: 00
10d98e: 8b 4c 24 74 mov 0x74(%esp),%ecx
10d992: 89 0c 24 mov %ecx,(%esp)
10d995: 8b 4c 24 44 mov 0x44(%esp),%ecx
10d999: ff d1 call *%ecx
10d99b: e9 4b ff ff ff jmp 10d8eb <_Heap_Walk+0x3e3>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10d9a0: 8b 4d 08 mov 0x8(%ebp),%ecx
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
10d9a3: 8b 56 08 mov 0x8(%esi),%edx
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d9a6: 39 55 0c cmp %edx,0xc(%ebp)
10d9a9: 0f 84 fd 00 00 00 je 10daac <_Heap_Walk+0x5a4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d9af: 39 d5 cmp %edx,%ebp
10d9b1: 0f 84 05 01 00 00 je 10dabc <_Heap_Walk+0x5b4>
10d9b7: c7 44 24 48 01 3a 12 movl $0x123a01,0x48(%esp)
10d9be: 00
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
10d9bf: 8b 46 0c mov 0xc(%esi),%eax
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d9c2: 39 c1 cmp %eax,%ecx
10d9c4: 0f 84 d2 00 00 00 je 10da9c <_Heap_Walk+0x594>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d9ca: 39 c5 cmp %eax,%ebp
10d9cc: 0f 84 fa 00 00 00 je 10dacc <_Heap_Walk+0x5c4>
10d9d2: c7 44 24 4c 01 3a 12 movl $0x123a01,0x4c(%esp)
10d9d9: 00
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10d9da: 8b 4c 24 48 mov 0x48(%esp),%ecx
10d9de: 89 4c 24 20 mov %ecx,0x20(%esp)
10d9e2: 89 54 24 1c mov %edx,0x1c(%esp)
10d9e6: 8b 54 24 4c mov 0x4c(%esp),%edx
10d9ea: 89 54 24 18 mov %edx,0x18(%esp)
10d9ee: 89 44 24 14 mov %eax,0x14(%esp)
10d9f2: 89 5c 24 10 mov %ebx,0x10(%esp)
10d9f6: 89 74 24 0c mov %esi,0xc(%esp)
10d9fa: c7 44 24 08 a0 3e 12 movl $0x123ea0,0x8(%esp)
10da01: 00
10da02: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10da09: 00
10da0a: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da0e: 89 0c 24 mov %ecx,(%esp)
10da11: 8b 4c 24 44 mov 0x44(%esp),%ecx
10da15: ff d1 call *%ecx
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10da17: 8b 07 mov (%edi),%eax
10da19: 39 c3 cmp %eax,%ebx
10da1b: 75 4b jne 10da68 <_Heap_Walk+0x560>
);
return false;
}
if ( !prev_used ) {
10da1d: 8b 54 24 40 mov 0x40(%esp),%edx
10da21: 85 d2 test %edx,%edx
10da23: 0f 84 b3 00 00 00 je 10dadc <_Heap_Walk+0x5d4>
10da29: 8b 45 08 mov 0x8(%ebp),%eax
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
10da2c: 39 c5 cmp %eax,%ebp
10da2e: 74 0f je 10da3f <_Heap_Walk+0x537> <== NEVER TAKEN
if ( free_block == block ) {
10da30: 39 c6 cmp %eax,%esi
10da32: 0f 84 b3 fe ff ff je 10d8eb <_Heap_Walk+0x3e3>
return true;
}
free_block = free_block->next;
10da38: 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 ) {
10da3b: 39 c5 cmp %eax,%ebp
10da3d: 75 f1 jne 10da30 <_Heap_Walk+0x528>
10da3f: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10da43: 89 74 24 0c mov %esi,0xc(%esp)
10da47: c7 44 24 08 6c 3f 12 movl $0x123f6c,0x8(%esp)
10da4e: 00
10da4f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da56: 00
10da57: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da5b: 89 0c 24 mov %ecx,(%esp)
10da5e: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da60: 31 c0 xor %eax,%eax
10da62: e9 d1 fb ff ff jmp 10d638 <_Heap_Walk+0x130>
10da67: 90 nop
10da68: 8b 6c 24 44 mov 0x44(%esp),%ebp
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10da6c: 89 7c 24 18 mov %edi,0x18(%esp)
10da70: 89 44 24 14 mov %eax,0x14(%esp)
10da74: 89 5c 24 10 mov %ebx,0x10(%esp)
10da78: 89 74 24 0c mov %esi,0xc(%esp)
10da7c: c7 44 24 08 d8 3e 12 movl $0x123ed8,0x8(%esp)
10da83: 00
10da84: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10da8b: 00
10da8c: 8b 4c 24 74 mov 0x74(%esp),%ecx
10da90: 89 0c 24 mov %ecx,(%esp)
10da93: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10da95: 31 c0 xor %eax,%eax
10da97: e9 9c fb ff ff jmp 10d638 <_Heap_Walk+0x130>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10da9c: c7 44 24 4c 7a 3b 12 movl $0x123b7a,0x4c(%esp)
10daa3: 00
10daa4: e9 31 ff ff ff jmp 10d9da <_Heap_Walk+0x4d2>
10daa9: 8d 76 00 lea 0x0(%esi),%esi
10daac: c7 44 24 48 61 3b 12 movl $0x123b61,0x48(%esp)
10dab3: 00
10dab4: e9 06 ff ff ff jmp 10d9bf <_Heap_Walk+0x4b7>
10dab9: 8d 76 00 lea 0x0(%esi),%esi
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10dabc: c7 44 24 48 70 3b 12 movl $0x123b70,0x48(%esp)
10dac3: 00
10dac4: e9 f6 fe ff ff jmp 10d9bf <_Heap_Walk+0x4b7>
10dac9: 8d 76 00 lea 0x0(%esi),%esi
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10dacc: c7 44 24 4c 8a 3b 12 movl $0x123b8a,0x4c(%esp)
10dad3: 00
10dad4: e9 01 ff ff ff jmp 10d9da <_Heap_Walk+0x4d2>
10dad9: 8d 76 00 lea 0x0(%esi),%esi
10dadc: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !prev_used ) {
(*printer)(
10dae0: 89 74 24 0c mov %esi,0xc(%esp)
10dae4: c7 44 24 08 14 3f 12 movl $0x123f14,0x8(%esp)
10daeb: 00
10daec: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10daf3: 00
10daf4: 8b 4c 24 74 mov 0x74(%esp),%ecx
10daf8: 89 0c 24 mov %ecx,(%esp)
10dafb: ff d5 call *%ebp
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
10dafd: 31 c0 xor %eax,%eax
10daff: e9 34 fb ff ff jmp 10d638 <_Heap_Walk+0x130>
10db04: 8b 6c 24 44 mov 0x44(%esp),%ebp
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10db08: 89 5c 24 10 mov %ebx,0x10(%esp)
10db0c: 89 74 24 0c mov %esi,0xc(%esp)
10db10: c7 44 24 08 10 3e 12 movl $0x123e10,0x8(%esp)
10db17: 00
10db18: e9 5a fd ff ff jmp 10d877 <_Heap_Walk+0x36f>
10db1d: 8b 53 20 mov 0x20(%ebx),%edx
10db20: 89 54 24 48 mov %edx,0x48(%esp)
10db24: e9 19 fd ff ff jmp 10d842 <_Heap_Walk+0x33a>
0010c15c <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10c15c: 53 push %ebx
10c15d: 83 ec 18 sub $0x18,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c160: 31 db xor %ebx,%ebx
10c162: a1 60 29 13 00 mov 0x132960,%eax
10c167: 85 c0 test %eax,%eax
10c169: 74 22 je 10c18d <_IO_Initialize_all_drivers+0x31><== NEVER TAKEN
10c16b: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10c16c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c173: 00
10c174: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c17b: 00
10c17c: 89 1c 24 mov %ebx,(%esp)
10c17f: e8 64 53 00 00 call 1114e8 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c184: 43 inc %ebx
10c185: 39 1d 60 29 13 00 cmp %ebx,0x132960
10c18b: 77 df ja 10c16c <_IO_Initialize_all_drivers+0x10>
(void) rtems_io_initialize( major, 0, NULL );
}
10c18d: 83 c4 18 add $0x18,%esp
10c190: 5b pop %ebx
10c191: c3 ret
0010c0d4 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10c0d4: 55 push %ebp
10c0d5: 57 push %edi
10c0d6: 56 push %esi
10c0d7: 53 push %ebx
10c0d8: 83 ec 1c sub $0x1c,%esp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
10c0db: 8b 1d 40 da 12 00 mov 0x12da40,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10c0e1: 8b 35 3c da 12 00 mov 0x12da3c,%esi
number_of_drivers = Configuration.maximum_drivers;
10c0e7: 8b 3d 38 da 12 00 mov 0x12da38,%edi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10c0ed: 39 fe cmp %edi,%esi
10c0ef: 73 57 jae 10c148 <_IO_Manager_initialization+0x74>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
10c0f1: 8d 2c 7f lea (%edi,%edi,2),%ebp
10c0f4: c1 e5 03 shl $0x3,%ebp
10c0f7: 89 2c 24 mov %ebp,(%esp)
10c0fa: e8 fd 2b 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10c0ff: 89 c2 mov %eax,%edx
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
10c101: a3 64 29 13 00 mov %eax,0x132964
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10c106: 89 3d 60 29 13 00 mov %edi,0x132960
memset(
10c10c: 31 c0 xor %eax,%eax
10c10e: 89 d7 mov %edx,%edi
10c110: 89 e9 mov %ebp,%ecx
10c112: f3 aa rep stos %al,%es:(%edi)
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c114: 85 f6 test %esi,%esi
10c116: 74 28 je 10c140 <_IO_Manager_initialization+0x6c><== NEVER TAKEN
10c118: 8b 15 64 29 13 00 mov 0x132964,%edx
* registration. The driver table is now allocated in the
* workspace.
*
*/
void _IO_Manager_initialization(void)
10c11e: 8d 04 76 lea (%esi,%esi,2),%eax
10c121: 8d 2c c5 00 00 00 00 lea 0x0(,%eax,8),%ebp
10c128: 31 c0 xor %eax,%eax
10c12a: 66 90 xchg %ax,%ax
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
10c12c: 8d 3c 02 lea (%edx,%eax,1),%edi
10c12f: 8d 34 03 lea (%ebx,%eax,1),%esi
10c132: b9 06 00 00 00 mov $0x6,%ecx
10c137: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c139: 83 c0 18 add $0x18,%eax
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c13c: 39 e8 cmp %ebp,%eax
10c13e: 75 ec jne 10c12c <_IO_Manager_initialization+0x58>
_IO_Driver_address_table[index] = driver_table[index];
}
10c140: 83 c4 1c add $0x1c,%esp
10c143: 5b pop %ebx
10c144: 5e pop %esi
10c145: 5f pop %edi
10c146: 5d pop %ebp
10c147: c3 ret
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
10c148: 89 1d 64 29 13 00 mov %ebx,0x132964
_IO_Number_of_drivers = number_of_drivers;
10c14e: 89 35 60 29 13 00 mov %esi,0x132960
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10c154: 83 c4 1c add $0x1c,%esp
10c157: 5b pop %ebx
10c158: 5e pop %esi
10c159: 5f pop %edi
10c15a: 5d pop %ebp
10c15b: c3 ret
0010cc0c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10cc0c: 53 push %ebx
10cc0d: 83 ec 18 sub $0x18,%esp
10cc10: 8b 54 24 20 mov 0x20(%esp),%edx
10cc14: 8b 44 24 24 mov 0x24(%esp),%eax
10cc18: 8b 5c 24 28 mov 0x28(%esp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10cc1c: 89 15 c4 1f 13 00 mov %edx,0x131fc4
_Internal_errors_What_happened.is_internal = is_internal;
10cc22: a2 c8 1f 13 00 mov %al,0x131fc8
_Internal_errors_What_happened.the_error = the_error;
10cc27: 89 1d cc 1f 13 00 mov %ebx,0x131fcc
_User_extensions_Fatal( the_source, is_internal, the_error );
10cc2d: 89 5c 24 08 mov %ebx,0x8(%esp)
10cc31: 0f b6 c0 movzbl %al,%eax
10cc34: 89 44 24 04 mov %eax,0x4(%esp)
10cc38: 89 14 24 mov %edx,(%esp)
10cc3b: e8 bc 1c 00 00 call 10e8fc <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10cc40: c7 05 a0 20 13 00 05 movl $0x5,0x1320a0 <== NOT EXECUTED
10cc47: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10cc4a: fa cli <== NOT EXECUTED
10cc4b: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10cc4d: f4 hlt <== NOT EXECUTED
10cc4e: eb fe jmp 10cc4e <_Internal_error_Occurred+0x42><== NOT EXECUTED
0010cca8 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10cca8: 56 push %esi
10cca9: 53 push %ebx
10ccaa: 83 ec 14 sub $0x14,%esp
10ccad: 8b 5c 24 20 mov 0x20(%esp),%ebx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10ccb1: 8b 43 18 mov 0x18(%ebx),%eax
10ccb4: 85 c0 test %eax,%eax
10ccb6: 74 54 je 10cd0c <_Objects_Allocate+0x64><== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ccb8: 8d 73 20 lea 0x20(%ebx),%esi
10ccbb: 89 34 24 mov %esi,(%esp)
10ccbe: e8 35 f7 ff ff call 10c3f8 <_Chain_Get>
10ccc3: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10ccc5: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10ccc9: 74 20 je 10cceb <_Objects_Allocate+0x43>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10cccb: 85 c0 test %eax,%eax
10cccd: 74 25 je 10ccf4 <_Objects_Allocate+0x4c>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10cccf: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10ccd3: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10ccd7: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10ccd9: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10ccdd: 31 d2 xor %edx,%edx
10ccdf: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10cce1: 8b 53 30 mov 0x30(%ebx),%edx
10cce4: ff 0c 82 decl (%edx,%eax,4)
information->inactive--;
10cce7: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10cceb: 89 c8 mov %ecx,%eax
10cced: 83 c4 14 add $0x14,%esp
10ccf0: 5b pop %ebx
10ccf1: 5e pop %esi
10ccf2: c3 ret
10ccf3: 90 nop
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10ccf4: 89 1c 24 mov %ebx,(%esp)
10ccf7: e8 3c 00 00 00 call 10cd38 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ccfc: 89 34 24 mov %esi,(%esp)
10ccff: e8 f4 f6 ff ff call 10c3f8 <_Chain_Get>
10cd04: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10cd06: 85 c0 test %eax,%eax
10cd08: 75 c5 jne 10cccf <_Objects_Allocate+0x27>
10cd0a: 66 90 xchg %ax,%ax
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
return NULL;
10cd0c: 31 c9 xor %ecx,%ecx
);
}
#endif
return the_object;
}
10cd0e: 89 c8 mov %ecx,%eax
10cd10: 83 c4 14 add $0x14,%esp
10cd13: 5b pop %ebx
10cd14: 5e pop %esi
10cd15: c3 ret
0010cd38 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10cd38: 55 push %ebp
10cd39: 57 push %edi
10cd3a: 56 push %esi
10cd3b: 53 push %ebx
10cd3c: 83 ec 4c sub $0x4c,%esp
10cd3f: 8b 5c 24 60 mov 0x60(%esp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd43: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10cd47: 89 44 24 20 mov %eax,0x20(%esp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cd4b: 8b 4b 34 mov 0x34(%ebx),%ecx
10cd4e: 8b 7b 10 mov 0x10(%ebx),%edi
10cd51: 85 c9 test %ecx,%ecx
10cd53: 0f 84 73 02 00 00 je 10cfcc <_Objects_Extend_information+0x294>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10cd59: 8b 73 14 mov 0x14(%ebx),%esi
10cd5c: 89 f8 mov %edi,%eax
10cd5e: 31 d2 xor %edx,%edx
10cd60: 66 f7 f6 div %si
10cd63: 0f b7 c0 movzwl %ax,%eax
10cd66: 89 44 24 18 mov %eax,0x18(%esp)
for ( ; block < block_count; block++ ) {
10cd6a: 85 c0 test %eax,%eax
10cd6c: 0f b7 c6 movzwl %si,%eax
10cd6f: 0f 84 77 02 00 00 je 10cfec <_Objects_Extend_information+0x2b4><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10cd75: 8b 11 mov (%ecx),%edx
10cd77: 85 d2 test %edx,%edx
10cd79: 0f 84 81 02 00 00 je 10d000 <_Objects_Extend_information+0x2c8><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd7f: 8b 74 24 18 mov 0x18(%esp),%esi
10cd83: 4e dec %esi
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cd84: 8b 54 24 20 mov 0x20(%esp),%edx
10cd88: 89 54 24 14 mov %edx,0x14(%esp)
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cd8c: 31 d2 xor %edx,%edx
10cd8e: 89 5c 24 1c mov %ebx,0x1c(%esp)
10cd92: 8b 5c 24 14 mov 0x14(%esp),%ebx
10cd96: eb 0c jmp 10cda4 <_Objects_Extend_information+0x6c>
10cd98: 89 ea mov %ebp,%edx
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
10cd9a: 83 3c a9 00 cmpl $0x0,(%ecx,%ebp,4)
10cd9e: 0f 84 d4 01 00 00 je 10cf78 <_Objects_Extend_information+0x240>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10cda4: 01 c3 add %eax,%ebx
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10cda6: 8d 6a 01 lea 0x1(%edx),%ebp
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cda9: 39 f2 cmp %esi,%edx
10cdab: 75 eb jne 10cd98 <_Objects_Extend_information+0x60>
10cdad: 89 5c 24 14 mov %ebx,0x14(%esp)
10cdb1: 8b 5c 24 1c mov 0x1c(%esp),%ebx
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cdb5: be 01 00 00 00 mov $0x1,%esi
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10cdba: 0f b7 d7 movzwl %di,%edx
10cdbd: 01 c2 add %eax,%edx
10cdbf: 89 54 24 1c mov %edx,0x1c(%esp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10cdc3: 81 fa ff ff 00 00 cmp $0xffff,%edx
10cdc9: 0f 87 9f 01 00 00 ja 10cf6e <_Objects_Extend_information+0x236>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10cdcf: 0f af 43 18 imul 0x18(%ebx),%eax
if ( information->auto_extend ) {
10cdd3: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
new_object_block = _Workspace_Allocate( block_size );
10cdd7: 89 04 24 mov %eax,(%esp)
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
10cdda: 0f 84 a8 01 00 00 je 10cf88 <_Objects_Extend_information+0x250>
new_object_block = _Workspace_Allocate( block_size );
10cde0: e8 cf 1e 00 00 call 10ecb4 <_Workspace_Allocate>
10cde5: 89 44 24 28 mov %eax,0x28(%esp)
if ( !new_object_block )
10cde9: 85 c0 test %eax,%eax
10cdeb: 0f 84 7d 01 00 00 je 10cf6e <_Objects_Extend_information+0x236>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cdf1: 89 f0 mov %esi,%eax
10cdf3: 84 c0 test %al,%al
10cdf5: 0f 84 ee 00 00 00 je 10cee9 <_Objects_Extend_information+0x1b1>
*/
/*
* Up the block count and maximum
*/
block_count++;
10cdfb: 8b 74 24 18 mov 0x18(%esp),%esi
10cdff: 46 inc %esi
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ce00: 8d 04 76 lea (%esi,%esi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10ce03: 03 44 24 1c add 0x1c(%esp),%eax
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
10ce07: 03 44 24 20 add 0x20(%esp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10ce0b: c1 e0 02 shl $0x2,%eax
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10ce0e: 89 04 24 mov %eax,(%esp)
10ce11: e8 9e 1e 00 00 call 10ecb4 <_Workspace_Allocate>
10ce16: 89 c2 mov %eax,%edx
if ( !object_blocks ) {
10ce18: 85 c0 test %eax,%eax
10ce1a: 0f 84 f1 01 00 00 je 10d011 <_Objects_Extend_information+0x2d9>
10ce20: 8d 3c b0 lea (%eax,%esi,4),%edi
10ce23: 89 7c 24 2c mov %edi,0x2c(%esp)
10ce27: 8d 34 f0 lea (%eax,%esi,8),%esi
10ce2a: 89 74 24 24 mov %esi,0x24(%esp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10ce2e: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10ce32: 39 44 24 20 cmp %eax,0x20(%esp)
10ce36: 0f 82 5a 01 00 00 jb 10cf96 <_Objects_Extend_information+0x25e>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ce3c: 8b 44 24 20 mov 0x20(%esp),%eax
10ce40: 85 c0 test %eax,%eax
10ce42: 74 1d je 10ce61 <_Objects_Extend_information+0x129><== NEVER TAKEN
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10ce44: 8b 44 24 20 mov 0x20(%esp),%eax
10ce48: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce4c: 8d 0c 87 lea (%edi,%eax,4),%ecx
10ce4f: 89 f8 mov %edi,%eax
10ce51: 8d 76 00 lea 0x0(%esi),%esi
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10ce54: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce5a: 83 c0 04 add $0x4,%eax
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10ce5d: 39 c8 cmp %ecx,%eax
10ce5f: 75 f3 jne 10ce54 <_Objects_Extend_information+0x11c><== NEVER TAKEN
10ce61: 8b 44 24 18 mov 0x18(%esp),%eax
10ce65: c1 e0 02 shl $0x2,%eax
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10ce68: c7 04 02 00 00 00 00 movl $0x0,(%edx,%eax,1)
inactive_per_block[block_count] = 0;
10ce6f: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ce73: c7 04 07 00 00 00 00 movl $0x0,(%edi,%eax,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10ce7a: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx
10ce7e: 03 4c 24 14 add 0x14(%esp),%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10ce82: 39 4c 24 14 cmp %ecx,0x14(%esp)
10ce86: 73 1d jae 10cea5 <_Objects_Extend_information+0x16d><== NEVER TAKEN
10ce88: 8b 74 24 14 mov 0x14(%esp),%esi
10ce8c: 8b 7c 24 24 mov 0x24(%esp),%edi
10ce90: 8d 04 b7 lea (%edi,%esi,4),%eax
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
10ce93: 8d 0c 8f lea (%edi,%ecx,4),%ecx
10ce96: 66 90 xchg %ax,%ax
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10ce98: c7 00 00 00 00 00 movl $0x0,(%eax)
10ce9e: 83 c0 04 add $0x4,%eax
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10cea1: 39 c8 cmp %ecx,%eax
10cea3: 75 f3 jne 10ce98 <_Objects_Extend_information+0x160>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cea5: 9c pushf
10cea6: fa cli
10cea7: 59 pop %ecx
old_tables = information->object_blocks;
10cea8: 8b 43 34 mov 0x34(%ebx),%eax
information->object_blocks = object_blocks;
10ceab: 89 53 34 mov %edx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10ceae: 8b 7c 24 2c mov 0x2c(%esp),%edi
10ceb2: 89 7b 30 mov %edi,0x30(%ebx)
information->local_table = local_table;
10ceb5: 8b 7c 24 24 mov 0x24(%esp),%edi
10ceb9: 89 7b 1c mov %edi,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cebc: 8b 54 24 1c mov 0x1c(%esp),%edx
10cec0: 66 89 53 10 mov %dx,0x10(%ebx)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cec4: 8b 13 mov (%ebx),%edx
10cec6: c1 e2 18 shl $0x18,%edx
10cec9: 81 ca 00 00 01 00 or $0x10000,%edx
information->maximum_id = _Objects_Build_id(
10cecf: 0f b7 73 04 movzwl 0x4(%ebx),%esi
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10ced3: c1 e6 1b shl $0x1b,%esi
10ced6: 09 f2 or %esi,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10ced8: 0b 54 24 1c or 0x1c(%esp),%edx
10cedc: 89 53 0c mov %edx,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cedf: 51 push %ecx
10cee0: 9d popf
_Workspace_Free( old_tables );
10cee1: 89 04 24 mov %eax,(%esp)
10cee4: e8 f7 1d 00 00 call 10ece0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cee9: c1 e5 02 shl $0x2,%ebp
10ceec: 89 6c 24 18 mov %ebp,0x18(%esp)
10cef0: 8b 43 34 mov 0x34(%ebx),%eax
10cef3: 8b 54 24 28 mov 0x28(%esp),%edx
10cef7: 89 14 28 mov %edx,(%eax,%ebp,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cefa: 8b 43 18 mov 0x18(%ebx),%eax
10cefd: 89 44 24 0c mov %eax,0xc(%esp)
10cf01: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10cf05: 89 44 24 08 mov %eax,0x8(%esp)
10cf09: 8b 43 34 mov 0x34(%ebx),%eax
10cf0c: 8b 04 28 mov (%eax,%ebp,1),%eax
10cf0f: 89 44 24 04 mov %eax,0x4(%esp)
10cf13: 8d 74 24 34 lea 0x34(%esp),%esi
10cf17: 89 34 24 mov %esi,(%esp)
10cf1a: e8 f9 f4 ff ff call 10c418 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cf1f: 8b 6c 24 14 mov 0x14(%esp),%ebp
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cf23: 8d 7b 20 lea 0x20(%ebx),%edi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cf26: eb 26 jmp 10cf4e <_Objects_Extend_information+0x216>
10cf28: 8b 13 mov (%ebx),%edx
10cf2a: c1 e2 18 shl $0x18,%edx
10cf2d: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cf33: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cf37: c1 e1 1b shl $0x1b,%ecx
10cf3a: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cf3c: 09 ea or %ebp,%edx
10cf3e: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cf41: 89 44 24 04 mov %eax,0x4(%esp)
10cf45: 89 3c 24 mov %edi,(%esp)
10cf48: e8 87 f4 ff ff call 10c3d4 <_Chain_Append>
index++;
10cf4d: 45 inc %ebp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10cf4e: 89 34 24 mov %esi,(%esp)
10cf51: e8 a2 f4 ff ff call 10c3f8 <_Chain_Get>
10cf56: 85 c0 test %eax,%eax
10cf58: 75 ce jne 10cf28 <_Objects_Extend_information+0x1f0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cf5a: 8b 43 14 mov 0x14(%ebx),%eax
10cf5d: 8b 53 30 mov 0x30(%ebx),%edx
10cf60: 0f b7 c8 movzwl %ax,%ecx
10cf63: 8b 74 24 18 mov 0x18(%esp),%esi
10cf67: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cf6a: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cf6e: 83 c4 4c add $0x4c,%esp
10cf71: 5b pop %ebx
10cf72: 5e pop %esi
10cf73: 5f pop %edi
10cf74: 5d pop %ebp
10cf75: c3 ret
10cf76: 66 90 xchg %ax,%ax
10cf78: 89 5c 24 14 mov %ebx,0x14(%esp)
10cf7c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10cf80: 31 f6 xor %esi,%esi
10cf82: e9 33 fe ff ff jmp 10cdba <_Objects_Extend_information+0x82>
10cf87: 90 nop
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10cf88: e8 6f 1d 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10cf8d: 89 44 24 28 mov %eax,0x28(%esp)
10cf91: e9 5b fe ff ff jmp 10cdf1 <_Objects_Extend_information+0xb9>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
10cf96: 8b 44 24 18 mov 0x18(%esp),%eax
10cf9a: c1 e0 02 shl $0x2,%eax
10cf9d: 8b 73 34 mov 0x34(%ebx),%esi
10cfa0: 89 d7 mov %edx,%edi
10cfa2: 89 c1 mov %eax,%ecx
10cfa4: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cfa6: 8b 73 30 mov 0x30(%ebx),%esi
10cfa9: 8b 7c 24 2c mov 0x2c(%esp),%edi
10cfad: 89 c1 mov %eax,%ecx
10cfaf: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
10cfb1: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cfb5: 03 4c 24 20 add 0x20(%esp),%ecx
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10cfb9: c1 e1 02 shl $0x2,%ecx
10cfbc: 8b 73 1c mov 0x1c(%ebx),%esi
10cfbf: 8b 7c 24 24 mov 0x24(%esp),%edi
10cfc3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10cfc5: e9 9e fe ff ff jmp 10ce68 <_Objects_Extend_information+0x130>
10cfca: 66 90 xchg %ax,%ax
10cfcc: 0f b7 43 14 movzwl 0x14(%ebx),%eax
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cfd0: 8b 54 24 20 mov 0x20(%esp),%edx
10cfd4: 89 54 24 14 mov %edx,0x14(%esp)
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cfd8: be 01 00 00 00 mov $0x1,%esi
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cfdd: 31 ed xor %ebp,%ebp
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cfdf: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10cfe6: 00
10cfe7: e9 ce fd ff ff jmp 10cdba <_Objects_Extend_information+0x82>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10cfec: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10cff0: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
10cff4: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cff9: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10cffb: e9 ba fd ff ff jmp 10cdba <_Objects_Extend_information+0x82><== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
10d000: 8b 4c 24 20 mov 0x20(%esp),%ecx <== NOT EXECUTED
10d004: 89 4c 24 14 mov %ecx,0x14(%esp) <== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
10d008: 31 f6 xor %esi,%esi <== NOT EXECUTED
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10d00a: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10d00c: e9 a9 fd ff ff jmp 10cdba <_Objects_Extend_information+0x82><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
10d011: 8b 44 24 28 mov 0x28(%esp),%eax
10d015: 89 04 24 mov %eax,(%esp)
10d018: e8 c3 1c 00 00 call 10ece0 <_Workspace_Free>
10d01d: e9 4c ff ff ff jmp 10cf6e <_Objects_Extend_information+0x236>
0010d0bc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10d0bc: 56 push %esi
10d0bd: 53 push %ebx
10d0be: 83 ec 14 sub $0x14,%esp
10d0c1: 8b 74 24 20 mov 0x20(%esp),%esi
10d0c5: 0f b7 5c 24 24 movzwl 0x24(%esp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10d0ca: 66 85 db test %bx,%bx
10d0cd: 74 31 je 10d100 <_Objects_Get_information+0x44>
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
10d0cf: 89 34 24 mov %esi,(%esp)
10d0d2: e8 b9 4d 00 00 call 111e90 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10d0d7: 85 c0 test %eax,%eax
10d0d9: 74 25 je 10d100 <_Objects_Get_information+0x44>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10d0db: 39 d8 cmp %ebx,%eax
10d0dd: 72 21 jb 10d100 <_Objects_Get_information+0x44>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10d0df: 8b 04 b5 1c 1f 13 00 mov 0x131f1c(,%esi,4),%eax
10d0e6: 85 c0 test %eax,%eax
10d0e8: 74 16 je 10d100 <_Objects_Get_information+0x44><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10d0ea: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10d0ed: 85 c0 test %eax,%eax
10d0ef: 74 0f je 10d100 <_Objects_Get_information+0x44><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
10d0f1: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10d0f6: 74 08 je 10d100 <_Objects_Get_information+0x44>
return NULL;
#endif
return info;
}
10d0f8: 83 c4 14 add $0x14,%esp
10d0fb: 5b pop %ebx
10d0fc: 5e pop %esi
10d0fd: c3 ret
10d0fe: 66 90 xchg %ax,%ax
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
10d100: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10d102: 83 c4 14 add $0x14,%esp
10d105: 5b pop %ebx
10d106: 5e pop %esi
10d107: c3 ret
0011a2c4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
11a2c4: 55 push %ebp
11a2c5: 57 push %edi
11a2c6: 56 push %esi
11a2c7: 53 push %ebx
11a2c8: 83 ec 2c sub $0x2c,%esp
11a2cb: 8b 6c 24 40 mov 0x40(%esp),%ebp
11a2cf: 8b 5c 24 44 mov 0x44(%esp),%ebx
11a2d3: 8b 74 24 48 mov 0x48(%esp),%esi
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
11a2d7: 85 db test %ebx,%ebx
11a2d9: 74 36 je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
if ( name == NULL )
11a2db: 85 f6 test %esi,%esi
11a2dd: 74 32 je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
11a2df: 85 ed test %ebp,%ebp
11a2e1: 0f 84 b5 00 00 00 je 11a39c <_Objects_Get_name_as_string+0xd8>
information = _Objects_Get_information_id( tmpId );
11a2e7: 89 2c 24 mov %ebp,(%esp)
11a2ea: e8 fd 85 ff ff call 1128ec <_Objects_Get_information_id>
11a2ef: 89 c7 mov %eax,%edi
if ( !information )
11a2f1: 85 c0 test %eax,%eax
11a2f3: 74 1c je 11a311 <_Objects_Get_name_as_string+0x4d>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
11a2f5: 8d 44 24 14 lea 0x14(%esp),%eax
11a2f9: 89 44 24 08 mov %eax,0x8(%esp)
11a2fd: 89 6c 24 04 mov %ebp,0x4(%esp)
11a301: 89 3c 24 mov %edi,(%esp)
11a304: e8 ab 86 ff ff call 1129b4 <_Objects_Get>
switch ( location ) {
11a309: 8b 54 24 14 mov 0x14(%esp),%edx
11a30d: 85 d2 test %edx,%edx
11a30f: 74 0f je 11a320 <_Objects_Get_name_as_string+0x5c>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
11a311: 31 f6 xor %esi,%esi
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
11a313: 89 f0 mov %esi,%eax
11a315: 83 c4 2c add $0x2c,%esp
11a318: 5b pop %ebx
11a319: 5e pop %esi
11a31a: 5f pop %edi
11a31b: 5d pop %ebp
11a31c: c3 ret
11a31d: 8d 76 00 lea 0x0(%esi),%esi
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
11a320: 80 7f 38 00 cmpb $0x0,0x38(%edi)
11a324: 0f 85 82 00 00 00 jne 11a3ac <_Objects_Get_name_as_string+0xe8>
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
11a32a: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
11a32d: 89 c2 mov %eax,%edx
11a32f: c1 ea 18 shr $0x18,%edx
11a332: 88 54 24 1b mov %dl,0x1b(%esp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
11a336: 89 c2 mov %eax,%edx
11a338: c1 ea 10 shr $0x10,%edx
11a33b: 88 54 24 1c mov %dl,0x1c(%esp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
11a33f: 89 c2 mov %eax,%edx
11a341: c1 ea 08 shr $0x8,%edx
11a344: 88 54 24 1d mov %dl,0x1d(%esp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
11a348: 88 44 24 1e mov %al,0x1e(%esp)
lname[ 4 ] = '\0';
11a34c: c6 44 24 1f 00 movb $0x0,0x1f(%esp)
s = lname;
11a351: 8d 4c 24 1b lea 0x1b(%esp),%ecx
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a355: 83 fb 01 cmp $0x1,%ebx
11a358: 74 59 je 11a3b3 <_Objects_Get_name_as_string+0xef><== NEVER TAKEN
11a35a: 8a 11 mov (%ecx),%dl
11a35c: 84 d2 test %dl,%dl
11a35e: 74 53 je 11a3b3 <_Objects_Get_name_as_string+0xef>
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
11a360: 8d 7c 19 ff lea -0x1(%ecx,%ebx,1),%edi
11a364: 89 f3 mov %esi,%ebx
11a366: eb 06 jmp 11a36e <_Objects_Get_name_as_string+0xaa>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a368: 8a 11 mov (%ecx),%dl
11a36a: 84 d2 test %dl,%dl
11a36c: 74 1c je 11a38a <_Objects_Get_name_as_string+0xc6>
*d = (isprint((unsigned char)*s)) ? *s : '*';
11a36e: 0f b6 c2 movzbl %dl,%eax
11a371: 8b 2d e8 f6 13 00 mov 0x13f6e8,%ebp
11a377: 0f be 44 05 01 movsbl 0x1(%ebp,%eax,1),%eax
11a37c: a8 97 test $0x97,%al
11a37e: 75 02 jne 11a382 <_Objects_Get_name_as_string+0xbe>
11a380: b2 2a mov $0x2a,%dl
11a382: 88 13 mov %dl,(%ebx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
11a384: 41 inc %ecx
11a385: 43 inc %ebx
11a386: 39 f9 cmp %edi,%ecx
11a388: 75 de jne 11a368 <_Objects_Get_name_as_string+0xa4>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
11a38a: c6 03 00 movb $0x0,(%ebx)
_Thread_Enable_dispatch();
11a38d: e8 62 93 ff ff call 1136f4 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
11a392: 89 f0 mov %esi,%eax
11a394: 83 c4 2c add $0x2c,%esp
11a397: 5b pop %ebx
11a398: 5e pop %esi
11a399: 5f pop %edi
11a39a: 5d pop %ebp
11a39b: c3 ret
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
11a39c: a1 0c 26 14 00 mov 0x14260c,%eax
11a3a1: 8b 68 08 mov 0x8(%eax),%ebp
11a3a4: e9 3e ff ff ff jmp 11a2e7 <_Objects_Get_name_as_string+0x23>
11a3a9: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
s = the_object->name.name_p;
11a3ac: 8b 48 0c mov 0xc(%eax),%ecx
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
11a3af: 85 c9 test %ecx,%ecx
11a3b1: 75 a2 jne 11a355 <_Objects_Get_name_as_string+0x91>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
11a3b3: 89 f3 mov %esi,%ebx
}
}
*d = '\0';
11a3b5: c6 03 00 movb $0x0,(%ebx)
_Thread_Enable_dispatch();
11a3b8: e8 37 93 ff ff call 1136f4 <_Thread_Enable_dispatch>
11a3bd: eb d3 jmp 11a392 <_Objects_Get_name_as_string+0xce>
0011cce0 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
11cce0: 55 push %ebp
11cce1: 57 push %edi
11cce2: 56 push %esi
11cce3: 53 push %ebx
11cce4: 83 ec 1c sub $0x1c,%esp
11cce7: 8b 74 24 30 mov 0x30(%esp),%esi
11cceb: 8b 5c 24 34 mov 0x34(%esp),%ebx
11ccef: 8b 7c 24 38 mov 0x38(%esp),%edi
11ccf3: 8b 6c 24 3c mov 0x3c(%esp),%ebp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
11ccf7: 85 f6 test %esi,%esi
11ccf9: 74 59 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if ( !location_p )
11ccfb: 85 ff test %edi,%edi
11ccfd: 74 55 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if ( !next_id_p )
11ccff: 85 ed test %ebp,%ebp
11cd01: 74 51 je 11cd54 <_Objects_Get_next+0x74>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
11cd03: 66 85 db test %bx,%bx
11cd06: 74 28 je 11cd30 <_Objects_Get_next+0x50>
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11cd08: 66 39 5e 10 cmp %bx,0x10(%esi)
11cd0c: 72 2e jb 11cd3c <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
11cd0e: 89 7c 24 08 mov %edi,0x8(%esp)
11cd12: 89 5c 24 04 mov %ebx,0x4(%esp)
11cd16: 89 34 24 mov %esi,(%esp)
11cd19: e8 96 5c ff ff call 1129b4 <_Objects_Get>
next_id++;
11cd1e: 43 inc %ebx
} while (*location_p != OBJECTS_LOCAL);
11cd1f: 8b 17 mov (%edi),%edx
11cd21: 85 d2 test %edx,%edx
11cd23: 75 e3 jne 11cd08 <_Objects_Get_next+0x28>
*next_id_p = next_id;
11cd25: 89 5d 00 mov %ebx,0x0(%ebp)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
11cd28: 83 c4 1c add $0x1c,%esp
11cd2b: 5b pop %ebx
11cd2c: 5e pop %esi
11cd2d: 5f pop %edi
11cd2e: 5d pop %ebp
11cd2f: c3 ret
if ( !next_id_p )
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
next_id = information->minimum_id;
11cd30: 8b 5e 08 mov 0x8(%esi),%ebx
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
11cd33: 66 39 5e 10 cmp %bx,0x10(%esi)
11cd37: 73 d5 jae 11cd0e <_Objects_Get_next+0x2e><== ALWAYS TAKEN
11cd39: 8d 76 00 lea 0x0(%esi),%esi
{
*location_p = OBJECTS_ERROR;
11cd3c: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
11cd42: c7 45 00 ff ff ff ff movl $0xffffffff,0x0(%ebp)
return 0;
11cd49: 31 c0 xor %eax,%eax
}
11cd4b: 83 c4 1c add $0x1c,%esp
11cd4e: 5b pop %ebx
11cd4f: 5e pop %esi
11cd50: 5f pop %edi
11cd51: 5d pop %ebp
11cd52: c3 ret
11cd53: 90 nop
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
11cd54: 31 c0 xor %eax,%eax
11cd56: eb d0 jmp 11cd28 <_Objects_Get_next+0x48>
0011e4a0 <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11e4a0: 8b 54 24 04 mov 0x4(%esp),%edx
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
11e4a4: b8 01 00 00 00 mov $0x1,%eax
11e4a9: 2b 42 08 sub 0x8(%edx),%eax
11e4ac: 03 44 24 08 add 0x8(%esp),%eax
if ( information->maximum >= index ) {
11e4b0: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11e4b4: 39 c8 cmp %ecx,%eax
11e4b6: 77 18 ja 11e4d0 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11e4b8: 8b 52 1c mov 0x1c(%edx),%edx
11e4bb: 8b 04 82 mov (%edx,%eax,4),%eax
11e4be: 85 c0 test %eax,%eax
11e4c0: 74 0e je 11e4d0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11e4c2: 8b 54 24 0c mov 0xc(%esp),%edx
11e4c6: c7 02 00 00 00 00 movl $0x0,(%edx)
return the_object;
11e4cc: c3 ret
11e4cd: 8d 76 00 lea 0x0(%esi),%esi
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11e4d0: 8b 44 24 0c mov 0xc(%esp),%eax
11e4d4: c7 00 01 00 00 00 movl $0x1,(%eax)
return NULL;
11e4da: 31 c0 xor %eax,%eax
}
11e4dc: c3 ret
00112a28 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
112a28: 83 ec 2c sub $0x2c,%esp
112a2b: 8b 44 24 30 mov 0x30(%esp),%eax
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112a2f: 85 c0 test %eax,%eax
112a31: 75 41 jne 112a74 <_Objects_Id_to_name+0x4c>
112a33: a1 0c 26 14 00 mov 0x14260c,%eax
112a38: 8b 50 08 mov 0x8(%eax),%edx
112a3b: 89 d0 mov %edx,%eax
112a3d: c1 e8 18 shr $0x18,%eax
112a40: 83 e0 07 and $0x7,%eax
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
112a43: 8d 48 ff lea -0x1(%eax),%ecx
112a46: 83 f9 02 cmp $0x2,%ecx
112a49: 77 1d ja 112a68 <_Objects_Id_to_name+0x40>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
112a4b: 8b 04 85 1c 20 14 00 mov 0x14201c(,%eax,4),%eax
112a52: 85 c0 test %eax,%eax
112a54: 74 12 je 112a68 <_Objects_Id_to_name+0x40>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
112a56: 89 d1 mov %edx,%ecx
112a58: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
112a5b: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
112a5e: 85 c0 test %eax,%eax
112a60: 74 06 je 112a68 <_Objects_Id_to_name+0x40><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
112a62: 80 78 38 00 cmpb $0x0,0x38(%eax)
112a66: 74 10 je 112a78 <_Objects_Id_to_name+0x50><== ALWAYS TAKEN
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
112a68: b8 03 00 00 00 mov $0x3,%eax
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
112a6d: 83 c4 2c add $0x2c,%esp
112a70: c3 ret
112a71: 8d 76 00 lea 0x0(%esi),%esi
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
112a74: 89 c2 mov %eax,%edx
112a76: eb c3 jmp 112a3b <_Objects_Id_to_name+0x13>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
112a78: 8d 4c 24 1c lea 0x1c(%esp),%ecx
112a7c: 89 4c 24 08 mov %ecx,0x8(%esp)
112a80: 89 54 24 04 mov %edx,0x4(%esp)
112a84: 89 04 24 mov %eax,(%esp)
112a87: e8 28 ff ff ff call 1129b4 <_Objects_Get>
if ( !the_object )
112a8c: 85 c0 test %eax,%eax
112a8e: 74 d8 je 112a68 <_Objects_Id_to_name+0x40>
return OBJECTS_INVALID_ID;
*name = the_object->name;
112a90: 8b 50 0c mov 0xc(%eax),%edx
112a93: 8b 44 24 34 mov 0x34(%esp),%eax
112a97: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
112a99: e8 56 0c 00 00 call 1136f4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
112a9e: 31 c0 xor %eax,%eax
112aa0: eb cb jmp 112a6d <_Objects_Id_to_name+0x45>
0010d36c <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d36c: 55 push %ebp
10d36d: 57 push %edi
10d36e: 56 push %esi
10d36f: 53 push %ebx
10d370: 83 ec 1c sub $0x1c,%esp
10d373: 8b 7c 24 30 mov 0x30(%esp),%edi
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d377: 0f b7 5f 08 movzwl 0x8(%edi),%ebx
block_count = (information->maximum - index_base) /
10d37b: 0f b7 77 14 movzwl 0x14(%edi),%esi
10d37f: 0f b7 47 10 movzwl 0x10(%edi),%eax
10d383: 29 d8 sub %ebx,%eax
10d385: 31 d2 xor %edx,%edx
10d387: f7 f6 div %esi
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d389: 85 c0 test %eax,%eax
10d38b: 74 1e je 10d3ab <_Objects_Shrink_information+0x3f><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d38d: 8b 57 30 mov 0x30(%edi),%edx
10d390: 3b 32 cmp (%edx),%esi
10d392: 74 1f je 10d3b3 <_Objects_Shrink_information+0x47><== NEVER TAKEN
10d394: 31 c9 xor %ecx,%ecx
10d396: eb 0c jmp 10d3a4 <_Objects_Shrink_information+0x38>
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
10d398: 8d 2c 8d 00 00 00 00 lea 0x0(,%ecx,4),%ebp
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d39f: 3b 34 8a cmp (%edx,%ecx,4),%esi
10d3a2: 74 14 je 10d3b8 <_Objects_Shrink_information+0x4c>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d3a4: 01 f3 add %esi,%ebx
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d3a6: 41 inc %ecx
10d3a7: 39 c1 cmp %eax,%ecx
10d3a9: 75 ed jne 10d398 <_Objects_Shrink_information+0x2c>
return;
}
index_base += information->allocation_size;
}
}
10d3ab: 83 c4 1c add $0x1c,%esp
10d3ae: 5b pop %ebx
10d3af: 5e pop %esi
10d3b0: 5f pop %edi
10d3b1: 5d pop %ebp
10d3b2: c3 ret
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d3b3: 31 ed xor %ebp,%ebp <== NOT EXECUTED
10d3b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10d3b8: 8b 47 20 mov 0x20(%edi),%eax
10d3bb: eb 09 jmp 10d3c6 <_Objects_Shrink_information+0x5a>
10d3bd: 8d 76 00 lea 0x0(%esi),%esi
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3c0: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d3c2: 85 f6 test %esi,%esi
10d3c4: 74 22 je 10d3e8 <_Objects_Shrink_information+0x7c>
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10d3c6: 0f b7 50 08 movzwl 0x8(%eax),%edx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3ca: 8b 30 mov (%eax),%esi
if ((index >= index_base) &&
10d3cc: 39 da cmp %ebx,%edx
10d3ce: 72 f0 jb 10d3c0 <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
10d3d0: 0f b7 4f 14 movzwl 0x14(%edi),%ecx
10d3d4: 01 d9 add %ebx,%ecx
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
10d3d6: 39 ca cmp %ecx,%edx
10d3d8: 73 e6 jae 10d3c0 <_Objects_Shrink_information+0x54>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d3da: 89 04 24 mov %eax,(%esp)
10d3dd: e8 32 41 00 00 call 111514 <_Chain_Extract>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
10d3e2: 89 f0 mov %esi,%eax
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d3e4: 85 f6 test %esi,%esi
10d3e6: 75 de jne 10d3c6 <_Objects_Shrink_information+0x5a>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d3e8: 8b 47 34 mov 0x34(%edi),%eax
10d3eb: 8b 04 28 mov (%eax,%ebp,1),%eax
10d3ee: 89 04 24 mov %eax,(%esp)
10d3f1: e8 ea 18 00 00 call 10ece0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d3f6: 8b 47 34 mov 0x34(%edi),%eax
10d3f9: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive_per_block[ block ] = 0;
10d400: 8b 47 30 mov 0x30(%edi),%eax
10d403: c7 04 28 00 00 00 00 movl $0x0,(%eax,%ebp,1)
information->inactive -= information->allocation_size;
10d40a: 8b 47 14 mov 0x14(%edi),%eax
10d40d: 66 29 47 2c sub %ax,0x2c(%edi)
return;
}
index_base += information->allocation_size;
}
}
10d411: 83 c4 1c add $0x1c,%esp
10d414: 5b pop %ebx
10d415: 5e pop %esi
10d416: 5f pop %edi
10d417: 5d pop %ebp
10d418: c3 ret
00113350 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
113350: 55 push %ebp
113351: 57 push %edi
113352: 56 push %esi
113353: 53 push %ebx
113354: 83 ec 2c sub $0x2c,%esp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
113357: 8b 44 24 40 mov 0x40(%esp),%eax
11335b: 8b 40 08 mov 0x8(%eax),%eax
11335e: 89 c7 mov %eax,%edi
113360: c1 ef 18 shr $0x18,%edi
113363: 83 e7 07 and $0x7,%edi
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
113366: 25 ff ff 00 00 and $0xffff,%eax
11336b: c1 e0 02 shl $0x2,%eax
11336e: 89 44 24 1c mov %eax,0x1c(%esp)
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
113372: 8b 1d 90 23 13 00 mov 0x132390,%ebx
done = true;
for ( index = 1 ; index <= max ; ++index ) {
113378: 66 85 db test %bx,%bx
11337b: 75 0b jne 113388 <_POSIX_Keys_Run_destructors+0x38>
done = false;
}
}
}
}
}
11337d: 83 c4 2c add $0x2c,%esp
113380: 5b pop %ebx
113381: 5e pop %esi
113382: 5f pop %edi
113383: 5d pop %ebp
113384: c3 ret
113385: 8d 76 00 lea 0x0(%esi),%esi
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
113388: be 01 00 00 00 mov $0x1,%esi
11338d: b2 01 mov $0x1,%dl
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
11338f: 0f b7 ce movzwl %si,%ecx
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
113392: a1 9c 23 13 00 mov 0x13239c,%eax
113397: 8b 04 88 mov (%eax,%ecx,4),%eax
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
11339a: 85 c0 test %eax,%eax
11339c: 74 25 je 1133c3 <_POSIX_Keys_Run_destructors+0x73>
11339e: 8b 48 10 mov 0x10(%eax),%ecx
1133a1: 85 c9 test %ecx,%ecx
1133a3: 74 1e je 1133c3 <_POSIX_Keys_Run_destructors+0x73>
void *value = key->Values [ thread_api ][ thread_index ];
1133a5: 8b 6c 24 1c mov 0x1c(%esp),%ebp
1133a9: 03 6c b8 14 add 0x14(%eax,%edi,4),%ebp
1133ad: 8b 4d 00 mov 0x0(%ebp),%ecx
if ( value != NULL ) {
1133b0: 85 c9 test %ecx,%ecx
1133b2: 74 0f je 1133c3 <_POSIX_Keys_Run_destructors+0x73><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
1133b4: c7 45 00 00 00 00 00 movl $0x0,0x0(%ebp) <== NOT EXECUTED
(*key->destructor)( value );
1133bb: 89 0c 24 mov %ecx,(%esp) <== NOT EXECUTED
1133be: ff 50 10 call *0x10(%eax) <== NOT EXECUTED
done = false;
1133c1: 31 d2 xor %edx,%edx <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
1133c3: 46 inc %esi
1133c4: 66 39 f3 cmp %si,%bx
1133c7: 73 c6 jae 11338f <_POSIX_Keys_Run_destructors+0x3f>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
1133c9: 84 d2 test %dl,%dl
1133cb: 74 a5 je 113372 <_POSIX_Keys_Run_destructors+0x22><== NEVER TAKEN
1133cd: eb ae jmp 11337d <_POSIX_Keys_Run_destructors+0x2d>
00110da4 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
110da4: 57 push %edi
110da5: 56 push %esi
110da6: 53 push %ebx
110da7: 83 ec 30 sub $0x30,%esp
110daa: 8b 7c 24 40 mov 0x40(%esp),%edi
110dae: 8b 74 24 4c mov 0x4c(%esp),%esi
110db2: 8a 5c 24 50 mov 0x50(%esp),%bl
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 );
110db6: 8d 44 24 28 lea 0x28(%esp),%eax
110dba: 89 44 24 08 mov %eax,0x8(%esp)
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(
110dbe: 89 7c 24 04 mov %edi,0x4(%esp)
110dc2: c7 04 24 20 b1 13 00 movl $0x13b120,(%esp)
110dc9: e8 22 32 00 00 call 113ff0 <_Objects_Get>
switch ( location ) {
110dce: 8b 54 24 28 mov 0x28(%esp),%edx
110dd2: 85 d2 test %edx,%edx
110dd4: 74 1a je 110df0 <_POSIX_Message_queue_Receive_support+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
110dd6: e8 8d 9e 00 00 call 11ac68 <__errno>
110ddb: c7 00 09 00 00 00 movl $0x9,(%eax)
110de1: b8 ff ff ff ff mov $0xffffffff,%eax
}
110de6: 83 c4 30 add $0x30,%esp
110de9: 5b pop %ebx
110dea: 5e pop %esi
110deb: 5f pop %edi
110dec: c3 ret
110ded: 8d 76 00 lea 0x0(%esi),%esi
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
110df0: 8b 50 14 mov 0x14(%eax),%edx
110df3: 89 d1 mov %edx,%ecx
110df5: 83 e1 03 and $0x3,%ecx
110df8: 49 dec %ecx
110df9: 0f 84 c0 00 00 00 je 110ebf <_POSIX_Message_queue_Receive_support+0x11b>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110dff: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
110e02: 8b 4c 24 48 mov 0x48(%esp),%ecx
110e06: 39 48 68 cmp %ecx,0x68(%eax)
110e09: 77 75 ja 110e80 <_POSIX_Message_queue_Receive_support+0xdc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
110e0b: c7 44 24 2c ff ff ff movl $0xffffffff,0x2c(%esp)
110e12: ff
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110e13: 84 db test %bl,%bl
110e15: 75 59 jne 110e70 <_POSIX_Message_queue_Receive_support+0xcc>
110e17: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
110e19: 8b 4c 24 54 mov 0x54(%esp),%ecx
110e1d: 89 4c 24 14 mov %ecx,0x14(%esp)
110e21: 89 54 24 10 mov %edx,0x10(%esp)
110e25: 8d 54 24 2c lea 0x2c(%esp),%edx
110e29: 89 54 24 0c mov %edx,0xc(%esp)
110e2d: 8b 54 24 44 mov 0x44(%esp),%edx
110e31: 89 54 24 08 mov %edx,0x8(%esp)
110e35: 89 7c 24 04 mov %edi,0x4(%esp)
110e39: 83 c0 1c add $0x1c,%eax
110e3c: 89 04 24 mov %eax,(%esp)
110e3f: e8 0c 22 00 00 call 113050 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
110e44: e8 7f 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
110e49: 8b 15 ac b1 13 00 mov 0x13b1ac,%edx
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
110e4f: 85 f6 test %esi,%esi
110e51: 74 09 je 110e5c <_POSIX_Message_queue_Receive_support+0xb8><== NEVER TAKEN
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
110e53: 8b 42 24 mov 0x24(%edx),%eax
110e56: 85 c0 test %eax,%eax
110e58: 78 22 js 110e7c <_POSIX_Message_queue_Receive_support+0xd8>
*msg_prio = _POSIX_Message_queue_Priority_from_core(
110e5a: 89 06 mov %eax,(%esi)
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
110e5c: 8b 42 34 mov 0x34(%edx),%eax
110e5f: 85 c0 test %eax,%eax
110e61: 75 39 jne 110e9c <_POSIX_Message_queue_Receive_support+0xf8>
return length_out;
110e63: 8b 44 24 2c mov 0x2c(%esp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110e67: 83 c4 30 add $0x30,%esp
110e6a: 5b pop %ebx
110e6b: 5e pop %esi
110e6c: 5f pop %edi
110e6d: c3 ret
110e6e: 66 90 xchg %ax,%ax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
110e70: 80 e6 40 and $0x40,%dh
110e73: 0f 94 c2 sete %dl
110e76: 0f b6 d2 movzbl %dl,%edx
110e79: eb 9e jmp 110e19 <_POSIX_Message_queue_Receive_support+0x75>
110e7b: 90 nop
110e7c: f7 d8 neg %eax
110e7e: eb da jmp 110e5a <_POSIX_Message_queue_Receive_support+0xb6>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
110e80: e8 43 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
110e85: e8 de 9d 00 00 call 11ac68 <__errno>
110e8a: c7 00 7a 00 00 00 movl $0x7a,(%eax)
110e90: b8 ff ff ff ff mov $0xffffffff,%eax
110e95: e9 4c ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
110e9a: 66 90 xchg %ax,%ax
}
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
110e9c: e8 c7 9d 00 00 call 11ac68 <__errno>
110ea1: 89 c3 mov %eax,%ebx
110ea3: a1 ac b1 13 00 mov 0x13b1ac,%eax
110ea8: 8b 40 34 mov 0x34(%eax),%eax
110eab: 89 04 24 mov %eax,(%esp)
110eae: e8 b1 02 00 00 call 111164 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
110eb3: 89 03 mov %eax,(%ebx)
110eb5: b8 ff ff ff ff mov $0xffffffff,%eax
110eba: e9 27 ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
110ebf: e8 04 3e 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
110ec4: e8 9f 9d 00 00 call 11ac68 <__errno>
110ec9: c7 00 09 00 00 00 movl $0x9,(%eax)
110ecf: b8 ff ff ff ff mov $0xffffffff,%eax
110ed4: e9 0d ff ff ff jmp 110de6 <_POSIX_Message_queue_Receive_support+0x42>
00110f18 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
unsigned int msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
110f18: 56 push %esi
110f19: 53 push %ebx
110f1a: 83 ec 34 sub $0x34,%esp
110f1d: 8b 74 24 40 mov 0x40(%esp),%esi
110f21: 8a 5c 24 50 mov 0x50(%esp),%bl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
110f25: 83 7c 24 4c 20 cmpl $0x20,0x4c(%esp)
110f2a: 0f 87 bc 00 00 00 ja 110fec <_POSIX_Message_queue_Send_support+0xd4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
110f30: 8d 44 24 2c lea 0x2c(%esp),%eax
110f34: 89 44 24 08 mov %eax,0x8(%esp)
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(
110f38: 89 74 24 04 mov %esi,0x4(%esp)
110f3c: c7 04 24 20 b1 13 00 movl $0x13b120,(%esp)
110f43: e8 a8 30 00 00 call 113ff0 <_Objects_Get>
switch ( location ) {
110f48: 8b 54 24 2c mov 0x2c(%esp),%edx
110f4c: 85 d2 test %edx,%edx
110f4e: 0f 85 84 00 00 00 jne 110fd8 <_POSIX_Message_queue_Send_support+0xc0>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
110f54: 8b 50 14 mov 0x14(%eax),%edx
110f57: f6 c2 03 test $0x3,%dl
110f5a: 0f 84 a0 00 00 00 je 111000 <_POSIX_Message_queue_Send_support+0xe8><== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110f60: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110f63: 84 db test %bl,%bl
110f65: 75 59 jne 110fc0 <_POSIX_Message_queue_Send_support+0xa8>
110f67: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
110f69: 8b 4c 24 54 mov 0x54(%esp),%ecx
110f6d: 89 4c 24 1c mov %ecx,0x1c(%esp)
110f71: 89 54 24 18 mov %edx,0x18(%esp)
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return (CORE_message_queue_Submit_types) priority * -1;
110f75: 8b 54 24 4c mov 0x4c(%esp),%edx
110f79: f7 da neg %edx
110f7b: 89 54 24 14 mov %edx,0x14(%esp)
110f7f: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
110f86: 00
110f87: 89 74 24 0c mov %esi,0xc(%esp)
110f8b: 8b 54 24 48 mov 0x48(%esp),%edx
110f8f: 89 54 24 08 mov %edx,0x8(%esp)
110f93: 8b 54 24 44 mov 0x44(%esp),%edx
110f97: 89 54 24 04 mov %edx,0x4(%esp)
110f9b: 83 c0 1c add $0x1c,%eax
110f9e: 89 04 24 mov %eax,(%esp)
110fa1: e8 da 21 00 00 call 113180 <_CORE_message_queue_Submit>
110fa6: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
110fa8: e8 1b 3d 00 00 call 114cc8 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
110fad: 83 fb 07 cmp $0x7,%ebx
110fb0: 74 1a je 110fcc <_POSIX_Message_queue_Send_support+0xb4>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
110fb2: 85 db test %ebx,%ebx
110fb4: 75 62 jne 111018 <_POSIX_Message_queue_Send_support+0x100>
return msg_status;
110fb6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110fb8: 83 c4 34 add $0x34,%esp
110fbb: 5b pop %ebx
110fbc: 5e pop %esi
110fbd: c3 ret
110fbe: 66 90 xchg %ax,%ax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
110fc0: 80 e6 40 and $0x40,%dh
110fc3: 0f 94 c2 sete %dl
110fc6: 0f b6 d2 movzbl %dl,%edx
110fc9: eb 9e jmp 110f69 <_POSIX_Message_queue_Send_support+0x51>
110fcb: 90 nop
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
msg_status = _Thread_Executing->Wait.return_code;
110fcc: a1 ac b1 13 00 mov 0x13b1ac,%eax
110fd1: 8b 58 34 mov 0x34(%eax),%ebx
110fd4: eb dc jmp 110fb2 <_POSIX_Message_queue_Send_support+0x9a>
110fd6: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
110fd8: e8 8b 9c 00 00 call 11ac68 <__errno>
110fdd: c7 00 09 00 00 00 movl $0x9,(%eax)
110fe3: b8 ff ff ff ff mov $0xffffffff,%eax
110fe8: eb ce jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
110fea: 66 90 xchg %ax,%ax
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
110fec: e8 77 9c 00 00 call 11ac68 <__errno>
110ff1: c7 00 16 00 00 00 movl $0x16,(%eax)
110ff7: b8 ff ff ff ff mov $0xffffffff,%eax
110ffc: eb ba jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
110ffe: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
111000: e8 c3 3c 00 00 call 114cc8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
111005: e8 5e 9c 00 00 call 11ac68 <__errno>
11100a: c7 00 09 00 00 00 movl $0x9,(%eax)
111010: b8 ff ff ff ff mov $0xffffffff,%eax
111015: eb a1 jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
111017: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
111018: e8 4b 9c 00 00 call 11ac68 <__errno>
11101d: 89 c6 mov %eax,%esi
11101f: 89 1c 24 mov %ebx,(%esp)
111022: e8 3d 01 00 00 call 111164 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
111027: 89 06 mov %eax,(%esi)
111029: b8 ff ff ff ff mov $0xffffffff,%eax
11102e: eb 88 jmp 110fb8 <_POSIX_Message_queue_Send_support+0xa0>
00112b48 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
112b48: 56 push %esi
112b49: 53 push %ebx
112b4a: 83 ec 14 sub $0x14,%esp
112b4d: 8b 74 24 20 mov 0x20(%esp),%esi
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
112b51: 8b 44 24 28 mov 0x28(%esp),%eax
112b55: 85 c0 test %eax,%eax
112b57: 0f 85 c3 00 00 00 jne 112c20 <_POSIX_Semaphore_Create_support+0xd8>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
112b5d: a1 64 60 13 00 mov 0x136064,%eax
112b62: 40 inc %eax
112b63: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
112b68: a1 64 60 13 00 mov 0x136064,%eax
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
112b6d: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
112b74: e8 63 bd ff ff call 10e8dc <_Objects_Allocate>
112b79: 89 c3 mov %eax,%ebx
rtems_set_errno_and_return_minus_one( ENOSYS );
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
112b7b: 85 c0 test %eax,%eax
112b7d: 0f 84 af 00 00 00 je 112c32 <_POSIX_Semaphore_Create_support+0xea>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
112b83: 85 f6 test %esi,%esi
112b85: 74 7d je 112c04 <_POSIX_Semaphore_Create_support+0xbc>
name = _Workspace_String_duplicate( name_arg, name_len );
112b87: 8b 44 24 24 mov 0x24(%esp),%eax
112b8b: 89 44 24 04 mov %eax,0x4(%esp)
112b8f: 89 34 24 mov %esi,(%esp)
112b92: e8 f5 15 00 00 call 11418c <_Workspace_String_duplicate>
112b97: 89 c6 mov %eax,%esi
if ( !name ) {
112b99: 85 c0 test %eax,%eax
112b9b: 0f 84 a8 00 00 00 je 112c49 <_POSIX_Semaphore_Create_support+0x101><== NEVER TAKEN
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
112ba1: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( name ) {
the_semaphore->named = true;
112ba8: c6 43 14 01 movb $0x1,0x14(%ebx)
the_semaphore->open_count = 1;
112bac: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_semaphore->linked = true;
112bb3: c6 43 15 01 movb $0x1,0x15(%ebx)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
112bb7: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
112bbe: c7 43 5c ff ff ff ff movl $0xffffffff,0x5c(%ebx)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
112bc5: 8b 44 24 2c mov 0x2c(%esp),%eax
112bc9: 89 44 24 08 mov %eax,0x8(%esp)
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
}
the_sem_attr = &the_semaphore->Semaphore.Attributes;
112bcd: 8d 43 5c lea 0x5c(%ebx),%eax
112bd0: 89 44 24 04 mov %eax,0x4(%esp)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
112bd4: 8d 43 1c lea 0x1c(%ebx),%eax
112bd7: 89 04 24 mov %eax,(%esp)
112bda: e8 9d b7 ff ff call 10e37c <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
112bdf: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
112be3: a1 9c 63 13 00 mov 0x13639c,%eax
112be8: 89 1c 90 mov %ebx,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
112beb: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
112bee: 8b 44 24 30 mov 0x30(%esp),%eax
112bf2: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
112bf4: e8 bf ce ff ff call 10fab8 <_Thread_Enable_dispatch>
return 0;
112bf9: 31 c0 xor %eax,%eax
}
112bfb: 83 c4 14 add $0x14,%esp
112bfe: 5b pop %ebx
112bff: 5e pop %esi
112c00: c3 ret
112c01: 8d 76 00 lea 0x0(%esi),%esi
}
} else {
name = NULL;
}
the_semaphore->process_shared = pshared;
112c04: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
112c0b: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
112c0f: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
112c16: c6 40 15 00 movb $0x0,0x15(%eax)
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
} else {
name = NULL;
112c1a: 31 f6 xor %esi,%esi
112c1c: eb 99 jmp 112bb7 <_POSIX_Semaphore_Create_support+0x6f>
112c1e: 66 90 xchg %ax,%ax
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
112c20: e8 eb 2d 00 00 call 115a10 <__errno>
112c25: c7 00 58 00 00 00 movl $0x58,(%eax)
112c2b: b8 ff ff ff ff mov $0xffffffff,%eax
112c30: eb c9 jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
112c32: e8 81 ce ff ff call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
112c37: e8 d4 2d 00 00 call 115a10 <__errno>
112c3c: c7 00 1c 00 00 00 movl $0x1c,(%eax)
112c42: b8 ff ff ff ff mov $0xffffffff,%eax
112c47: eb b2 jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3>
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
112c49: 89 5c 24 04 mov %ebx,0x4(%esp) <== NOT EXECUTED
112c4d: c7 04 24 80 63 13 00 movl $0x136380,(%esp) <== NOT EXECUTED
112c54: e8 ff bf ff ff call 10ec58 <_Objects_Free> <== NOT EXECUTED
*/
if ( name_arg != NULL ) {
name = _Workspace_String_duplicate( name_arg, name_len );
if ( !name ) {
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
112c59: e8 5a ce ff ff call 10fab8 <_Thread_Enable_dispatch><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
112c5e: e8 ad 2d 00 00 call 115a10 <__errno> <== NOT EXECUTED
112c63: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
112c69: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
112c6e: eb 8b jmp 112bfb <_POSIX_Semaphore_Create_support+0xb3><== NOT EXECUTED
001106ac <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
1106ac: 83 ec 1c sub $0x1c,%esp
1106af: 8b 54 24 20 mov 0x20(%esp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
1106b3: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
1106b9: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx
1106bf: 85 c9 test %ecx,%ecx
1106c1: 75 09 jne 1106cc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20><== NEVER TAKEN
1106c3: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
1106ca: 74 08 je 1106d4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
1106cc: 83 c4 1c add $0x1c,%esp
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();
1106cf: e9 bc d8 ff ff jmp 10df90 <_Thread_Enable_dispatch>
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
1106d4: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
1106da: 85 c0 test %eax,%eax
1106dc: 74 ee je 1106cc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x20>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
1106de: a1 84 16 13 00 mov 0x131684,%eax
1106e3: 48 dec %eax
1106e4: a3 84 16 13 00 mov %eax,0x131684
return _Thread_Dispatch_disable_level;
1106e9: a1 84 16 13 00 mov 0x131684,%eax
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
1106ee: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp)
1106f5: ff
1106f6: 89 14 24 mov %edx,(%esp)
1106f9: e8 8e 07 00 00 call 110e8c <_POSIX_Thread_Exit>
} else
_Thread_Enable_dispatch();
}
1106fe: 83 c4 1c add $0x1c,%esp
110701: c3 ret
00111ad4 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
111ad4: 56 push %esi
111ad5: 53 push %ebx
111ad6: 83 ec 14 sub $0x14,%esp
111ad9: 8b 5c 24 24 mov 0x24(%esp),%ebx
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
111add: 8b 03 mov (%ebx),%eax
111adf: 89 04 24 mov %eax,(%esp)
111ae2: e8 d1 ff ff ff call 111ab8 <_POSIX_Priority_Is_valid>
111ae7: 84 c0 test %al,%al
111ae9: 75 0d jne 111af8 <_POSIX_Thread_Translate_sched_param+0x24><== ALWAYS TAKEN
return EINVAL;
111aeb: b8 16 00 00 00 mov $0x16,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111af0: 83 c4 14 add $0x14,%esp
111af3: 5b pop %ebx
111af4: 5e pop %esi
111af5: c3 ret
111af6: 66 90 xchg %ax,%ax
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
111af8: 8b 44 24 28 mov 0x28(%esp),%eax
111afc: c7 00 00 00 00 00 movl $0x0,(%eax)
*budget_callout = NULL;
111b02: 8b 44 24 2c mov 0x2c(%esp),%eax
111b06: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
111b0c: 8b 44 24 20 mov 0x20(%esp),%eax
111b10: 85 c0 test %eax,%eax
111b12: 0f 84 88 00 00 00 je 111ba0 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
111b18: 83 7c 24 20 01 cmpl $0x1,0x20(%esp)
111b1d: 0f 84 91 00 00 00 je 111bb4 <_POSIX_Thread_Translate_sched_param+0xe0>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
111b23: 83 7c 24 20 02 cmpl $0x2,0x20(%esp)
111b28: 0f 84 8e 00 00 00 je 111bbc <_POSIX_Thread_Translate_sched_param+0xe8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
111b2e: 83 7c 24 20 04 cmpl $0x4,0x20(%esp)
111b33: 75 b6 jne 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
111b35: 8b 73 08 mov 0x8(%ebx),%esi
111b38: 85 f6 test %esi,%esi
111b3a: 75 07 jne 111b43 <_POSIX_Thread_Translate_sched_param+0x6f>
111b3c: 8b 4b 0c mov 0xc(%ebx),%ecx
111b3f: 85 c9 test %ecx,%ecx
111b41: 74 a8 je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
111b43: 8b 53 10 mov 0x10(%ebx),%edx
111b46: 85 d2 test %edx,%edx
111b48: 75 07 jne 111b51 <_POSIX_Thread_Translate_sched_param+0x7d>
111b4a: 8b 43 14 mov 0x14(%ebx),%eax
111b4d: 85 c0 test %eax,%eax
111b4f: 74 9a je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
111b51: 8d 43 08 lea 0x8(%ebx),%eax
111b54: 89 04 24 mov %eax,(%esp)
111b57: e8 60 dc ff ff call 10f7bc <_Timespec_To_ticks>
111b5c: 89 c6 mov %eax,%esi
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
111b5e: 8d 43 10 lea 0x10(%ebx),%eax
111b61: 89 04 24 mov %eax,(%esp)
111b64: e8 53 dc ff ff call 10f7bc <_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 ) <
111b69: 39 c6 cmp %eax,%esi
111b6b: 0f 82 7a ff ff ff jb 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
111b71: 8b 43 04 mov 0x4(%ebx),%eax
111b74: 89 04 24 mov %eax,(%esp)
111b77: e8 3c ff ff ff call 111ab8 <_POSIX_Priority_Is_valid>
111b7c: 84 c0 test %al,%al
111b7e: 0f 84 67 ff ff ff je 111aeb <_POSIX_Thread_Translate_sched_param+0x17>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
111b84: 8b 44 24 28 mov 0x28(%esp),%eax
111b88: c7 00 03 00 00 00 movl $0x3,(%eax)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
111b8e: 8b 44 24 2c mov 0x2c(%esp),%eax
111b92: c7 00 40 c0 10 00 movl $0x10c040,(%eax)
return 0;
111b98: 31 c0 xor %eax,%eax
111b9a: e9 51 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
111b9f: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
111ba0: 8b 44 24 28 mov 0x28(%esp),%eax
111ba4: c7 00 01 00 00 00 movl $0x1,(%eax)
return 0;
111baa: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111bac: 83 c4 14 add $0x14,%esp
111baf: 5b pop %ebx
111bb0: 5e pop %esi
111bb1: c3 ret
111bb2: 66 90 xchg %ax,%ax
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
111bb4: 31 c0 xor %eax,%eax
111bb6: e9 35 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
111bbb: 90 nop
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
111bbc: 8b 44 24 28 mov 0x28(%esp),%eax
111bc0: c7 00 02 00 00 00 movl $0x2,(%eax)
return 0;
111bc6: 31 c0 xor %eax,%eax
111bc8: e9 23 ff ff ff jmp 111af0 <_POSIX_Thread_Translate_sched_param+0x1c>
001109b8 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
1109b8: 55 push %ebp
1109b9: 57 push %edi
1109ba: 56 push %esi
1109bb: 53 push %ebx
1109bc: 83 ec 1c sub $0x1c,%esp
1109bf: 8b 7c 24 34 mov 0x34(%esp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
1109c3: 8b af e8 00 00 00 mov 0xe8(%edi),%ebp
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
1109c9: 89 3c 24 mov %edi,(%esp)
1109cc: e8 1f 29 00 00 call 1132f0 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
1109d1: 89 3c 24 mov %edi,(%esp)
1109d4: e8 77 29 00 00 call 113350 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
1109d9: 8b 77 28 mov 0x28(%edi),%esi
1109dc: 8d 5d 44 lea 0x44(%ebp),%ebx
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1109df: eb 08 jmp 1109e9 <_POSIX_Threads_Delete_extension+0x31>
1109e1: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
1109e4: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED
1109e7: 89 30 mov %esi,(%eax) <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1109e9: 89 1c 24 mov %ebx,(%esp)
1109ec: e8 fb d7 ff ff call 10e1ec <_Thread_queue_Dequeue>
1109f1: 85 c0 test %eax,%eax
1109f3: 75 ef jne 1109e4 <_POSIX_Threads_Delete_extension+0x2c><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
1109f5: 83 bd 84 00 00 00 04 cmpl $0x4,0x84(%ebp)
1109fc: 74 1a je 110a18 <_POSIX_Threads_Delete_extension+0x60>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
1109fe: c7 87 e8 00 00 00 00 movl $0x0,0xe8(%edi)
110a05: 00 00 00
_Workspace_Free( api );
110a08: 89 6c 24 30 mov %ebp,0x30(%esp)
}
110a0c: 83 c4 1c add $0x1c,%esp
110a0f: 5b pop %ebx
110a10: 5e pop %esi
110a11: 5f pop %edi
110a12: 5d pop %ebp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
110a13: e9 c8 e2 ff ff jmp 10ece0 <_Workspace_Free>
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
110a18: 8d 85 a8 00 00 00 lea 0xa8(%ebp),%eax
110a1e: 89 04 24 mov %eax,(%esp)
110a21: e8 3a e1 ff ff call 10eb60 <_Watchdog_Remove>
110a26: eb d6 jmp 1109fe <_POSIX_Threads_Delete_extension+0x46>
0010bd44 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10bd44: 55 push %ebp
10bd45: 57 push %edi
10bd46: 56 push %esi
10bd47: 53 push %ebx
10bd48: 83 ec 7c sub $0x7c,%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;
10bd4b: 8b 35 14 ee 12 00 mov 0x12ee14,%esi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10bd51: a1 10 ee 12 00 mov 0x12ee10,%eax
10bd56: 89 44 24 1c mov %eax,0x1c(%esp)
if ( !user_threads || maximum == 0 )
10bd5a: 85 f6 test %esi,%esi
10bd5c: 74 5d je 10bdbb <_POSIX_Threads_Initialize_user_threads_body+0x77><== NEVER TAKEN
10bd5e: 85 c0 test %eax,%eax
10bd60: 74 59 je 10bdbb <_POSIX_Threads_Initialize_user_threads_body+0x77><== NEVER TAKEN
10bd62: 31 ff xor %edi,%edi
10bd64: 8d 5c 24 30 lea 0x30(%esp),%ebx
10bd68: 8d 6c 24 2c lea 0x2c(%esp),%ebp
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10bd6c: 89 1c 24 mov %ebx,(%esp)
10bd6f: e8 5c 5e 00 00 call 111bd0 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10bd74: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
10bd7b: 00
10bd7c: 89 1c 24 mov %ebx,(%esp)
10bd7f: e8 74 5e 00 00 call 111bf8 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10bd84: 8b 46 04 mov 0x4(%esi),%eax
10bd87: 89 44 24 04 mov %eax,0x4(%esp)
10bd8b: 89 1c 24 mov %ebx,(%esp)
10bd8e: e8 95 5e 00 00 call 111c28 <pthread_attr_setstacksize>
status = pthread_create(
10bd93: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10bd9a: 00
10bd9b: 8b 06 mov (%esi),%eax
10bd9d: 89 44 24 08 mov %eax,0x8(%esp)
&thread_id,
&attr,
10bda1: 89 5c 24 04 mov %ebx,0x4(%esp)
*/
(void) pthread_attr_init( &attr );
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
10bda5: 89 2c 24 mov %ebp,(%esp)
10bda8: e8 cb fb ff ff call 10b978 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10bdad: 85 c0 test %eax,%eax
10bdaf: 75 12 jne 10bdc3 <_POSIX_Threads_Initialize_user_threads_body+0x7f>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bdb1: 47 inc %edi
10bdb2: 83 c6 08 add $0x8,%esi
10bdb5: 3b 7c 24 1c cmp 0x1c(%esp),%edi
10bdb9: 75 b1 jne 10bd6c <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10bdbb: 83 c4 7c add $0x7c,%esp
10bdbe: 5b pop %ebx
10bdbf: 5e pop %esi
10bdc0: 5f pop %edi
10bdc1: 5d pop %ebp
10bdc2: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10bdc3: 89 44 24 08 mov %eax,0x8(%esp)
10bdc7: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10bdce: 00
10bdcf: c7 04 24 02 00 00 00 movl $0x2,(%esp)
10bdd6: e8 45 1e 00 00 call 10dc20 <_Internal_error_Occurred>
00110b68 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
110b68: 56 push %esi
110b69: 53 push %ebx
110b6a: 83 ec 14 sub $0x14,%esp
110b6d: 8b 74 24 24 mov 0x24(%esp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110b71: 8b 9e e8 00 00 00 mov 0xe8(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
110b77: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax
110b7d: 89 04 24 mov %eax,(%esp)
110b80: e8 b7 15 00 00 call 11213c <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
110b85: 89 46 74 mov %eax,0x74(%esi)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
110b88: 0f b6 05 4c da 12 00 movzbl 0x12da4c,%eax
110b8f: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
110b95: 89 46 18 mov %eax,0x18(%esi)
*/
#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 ) {
110b98: 8b 56 1c mov 0x1c(%esi),%edx
110b9b: 85 d2 test %edx,%edx
110b9d: 75 05 jne 110ba4 <_POSIX_Threads_Sporadic_budget_TSR+0x3c><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
110b9f: 39 46 14 cmp %eax,0x14(%esi)
110ba2: 77 30 ja 110bd4 <_POSIX_Threads_Sporadic_budget_TSR+0x6c>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
110ba4: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax
110baa: 89 04 24 mov %eax,(%esp)
110bad: e8 8a 15 00 00 call 11213c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
110bb2: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
110bb8: 81 c3 a8 00 00 00 add $0xa8,%ebx
110bbe: 89 5c 24 24 mov %ebx,0x24(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
110bc2: c7 44 24 20 e8 1f 13 movl $0x131fe8,0x20(%esp)
110bc9: 00
}
110bca: 83 c4 14 add $0x14,%esp
110bcd: 5b pop %ebx
110bce: 5e pop %esi
110bcf: e9 70 de ff ff jmp 10ea44 <_Watchdog_Insert>
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
110bd4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
110bdb: 00
110bdc: 89 44 24 04 mov %eax,0x4(%esp)
110be0: 89 34 24 mov %esi,(%esp)
110be3: e8 d0 cd ff ff call 10d9b8 <_Thread_Change_priority>
110be8: eb ba jmp 110ba4 <_POSIX_Threads_Sporadic_budget_TSR+0x3c>
00110bec <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
110bec: 83 ec 1c sub $0x1c,%esp
110bef: 8b 44 24 20 mov 0x20(%esp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110bf3: 8b 88 e8 00 00 00 mov 0xe8(%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 */
110bf9: c7 40 74 ff ff ff ff movl $0xffffffff,0x74(%eax)
110c00: 0f b6 15 4c da 12 00 movzbl 0x12da4c,%edx
110c07: 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;
110c0d: 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 ) {
110c10: 8b 48 1c mov 0x1c(%eax),%ecx
110c13: 85 c9 test %ecx,%ecx
110c15: 75 05 jne 110c1c <_POSIX_Threads_Sporadic_budget_callout+0x30><== 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 ) {
110c17: 39 50 14 cmp %edx,0x14(%eax)
110c1a: 72 04 jb 110c20 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110c1c: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
110c1f: c3 ret <== NOT EXECUTED
* 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 ) {
_Thread_Change_priority( the_thread, new_priority, true );
110c20: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
110c27: 00
110c28: 89 54 24 04 mov %edx,0x4(%esp)
110c2c: 89 04 24 mov %eax,(%esp)
110c2f: e8 84 cd ff ff call 10d9b8 <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110c34: 83 c4 1c add $0x1c,%esp
110c37: c3 ret
001132f0 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
1132f0: 57 push %edi
1132f1: 56 push %esi
1132f2: 53 push %ebx
1132f3: 83 ec 10 sub $0x10,%esp
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
1132f6: 8b 44 24 20 mov 0x20(%esp),%eax
1132fa: 8b b8 e8 00 00 00 mov 0xe8(%eax),%edi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
113300: c7 87 d8 00 00 00 01 movl $0x1,0xd8(%edi)
113307: 00 00 00
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11330a: 8d b7 e8 00 00 00 lea 0xe8(%edi),%esi
while ( !_Chain_Is_empty( handler_stack ) ) {
113310: 39 b7 e4 00 00 00 cmp %esi,0xe4(%edi)
113316: 74 2e je 113346 <_POSIX_Threads_cancel_run+0x56>
_ISR_Disable( level );
113318: 9c pushf
113319: fa cli
11331a: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
11331b: 8b 9f ec 00 00 00 mov 0xec(%edi),%ebx
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
113321: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
113323: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
113326: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
113329: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
11332b: 51 push %ecx
11332c: 9d popf
(*handler->routine)( handler->arg );
11332d: 8b 43 0c mov 0xc(%ebx),%eax
113330: 89 04 24 mov %eax,(%esp)
113333: ff 53 08 call *0x8(%ebx)
_Workspace_Free( handler );
113336: 89 1c 24 mov %ebx,(%esp)
113339: e8 a2 b9 ff ff call 10ece0 <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
11333e: 39 b7 e4 00 00 00 cmp %esi,0xe4(%edi)
113344: 75 d2 jne 113318 <_POSIX_Threads_cancel_run+0x28><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
113346: 83 c4 10 add $0x10,%esp
113349: 5b pop %ebx
11334a: 5e pop %esi
11334b: 5f pop %edi
11334c: c3 ret
0010b754 <_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)
{
10b754: 57 push %edi
10b755: 56 push %esi
10b756: 53 push %ebx
10b757: 83 ec 30 sub $0x30,%esp
10b75a: 8b 5c 24 44 mov 0x44(%esp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b75e: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b761: 8b 53 54 mov 0x54(%ebx),%edx
10b764: 85 d2 test %edx,%edx
10b766: 75 2c jne 10b794 <_POSIX_Timer_TSR+0x40>
10b768: 8b 43 58 mov 0x58(%ebx),%eax
10b76b: 85 c0 test %eax,%eax
10b76d: 75 25 jne 10b794 <_POSIX_Timer_TSR+0x40> <== ALWAYS TAKEN
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b76f: 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 ) ) {
10b773: 8b 43 44 mov 0x44(%ebx),%eax
10b776: 89 44 24 04 mov %eax,0x4(%esp)
10b77a: 8b 43 38 mov 0x38(%ebx),%eax
10b77d: 89 04 24 mov %eax,(%esp)
10b780: e8 b3 58 00 00 call 111038 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b785: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
}
10b78c: 83 c4 30 add $0x30,%esp
10b78f: 5b pop %ebx
10b790: 5e pop %esi
10b791: 5f pop %edi
10b792: c3 ret
10b793: 90 nop
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
10b794: 89 5c 24 10 mov %ebx,0x10(%esp)
10b798: c7 44 24 0c 54 b7 10 movl $0x10b754,0xc(%esp)
10b79f: 00
10b7a0: 8b 43 08 mov 0x8(%ebx),%eax
10b7a3: 89 44 24 08 mov %eax,0x8(%esp)
10b7a7: 8b 43 64 mov 0x64(%ebx),%eax
10b7aa: 89 44 24 04 mov %eax,0x4(%esp)
10b7ae: 8d 43 10 lea 0x10(%ebx),%eax
10b7b1: 89 04 24 mov %eax,(%esp)
10b7b4: e8 07 5d 00 00 call 1114c0 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b7b9: 84 c0 test %al,%al
10b7bb: 74 cf je 10b78c <_POSIX_Timer_TSR+0x38> <== NEVER TAKEN
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b7bd: 8d 44 24 28 lea 0x28(%esp),%eax
10b7c1: 89 04 24 mov %eax,(%esp)
10b7c4: e8 97 16 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b7c9: 8b 74 24 28 mov 0x28(%esp),%esi
10b7cd: 8b 7c 24 2c mov 0x2c(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b7d1: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b7d8: 3b
10b7d9: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b7e0: 00
10b7e1: 89 34 24 mov %esi,(%esp)
10b7e4: 89 7c 24 04 mov %edi,0x4(%esp)
10b7e8: e8 d7 51 01 00 call 1209c4 <__divdi3>
10b7ed: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b7f0: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b7f7: 3b
10b7f8: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b7ff: 00
10b800: 89 34 24 mov %esi,(%esp)
10b803: 89 7c 24 04 mov %edi,0x4(%esp)
10b807: e8 0c 53 01 00 call 120b18 <__moddi3>
10b80c: 89 43 70 mov %eax,0x70(%ebx)
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b80f: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b813: e9 5b ff ff ff jmp 10b773 <_POSIX_Timer_TSR+0x1f>
001133d0 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
1133d0: 55 push %ebp
1133d1: 57 push %edi
1133d2: 56 push %esi
1133d3: 53 push %ebx
1133d4: 83 ec 7c sub $0x7c,%esp
1133d7: 8b ac 24 94 00 00 00 mov 0x94(%esp),%ebp
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,
1133de: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
1133e5: 00
1133e6: 0f b6 84 24 98 00 00 movzbl 0x98(%esp),%eax
1133ed: 00
1133ee: 89 44 24 0c mov %eax,0xc(%esp)
1133f2: 8d 5c 24 3c lea 0x3c(%esp),%ebx
1133f6: 89 5c 24 08 mov %ebx,0x8(%esp)
1133fa: 89 6c 24 04 mov %ebp,0x4(%esp)
1133fe: 8b 94 24 90 00 00 00 mov 0x90(%esp),%edx
113405: 89 14 24 mov %edx,(%esp)
113408: e8 bb 00 00 00 call 1134c8 <_POSIX_signals_Clear_signals>
11340d: 84 c0 test %al,%al
11340f: 0f 84 a7 00 00 00 je 1134bc <_POSIX_signals_Check_signal+0xec>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
113415: 8d 44 6d 00 lea 0x0(%ebp,%ebp,2),%eax
113419: c1 e0 02 shl $0x2,%eax
11341c: 8b 90 48 25 13 00 mov 0x132548(%eax),%edx
113422: 83 fa 01 cmp $0x1,%edx
113425: 0f 84 91 00 00 00 je 1134bc <_POSIX_signals_Check_signal+0xec><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11342b: 8b 8c 24 90 00 00 00 mov 0x90(%esp),%ecx
113432: 8b 89 d0 00 00 00 mov 0xd0(%ecx),%ecx
113438: 89 4c 24 2c mov %ecx,0x2c(%esp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
11343c: 0b 88 44 25 13 00 or 0x132544(%eax),%ecx
113442: 8b b4 24 90 00 00 00 mov 0x90(%esp),%esi
113449: 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,
11344f: 8d 74 24 48 lea 0x48(%esp),%esi
113453: 89 74 24 28 mov %esi,0x28(%esp)
113457: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
11345d: 83 c6 20 add $0x20,%esi
113460: b9 0a 00 00 00 mov $0xa,%ecx
113465: 8b 7c 24 28 mov 0x28(%esp),%edi
113469: 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 ) {
11346b: 83 b8 40 25 13 00 02 cmpl $0x2,0x132540(%eax)
113472: 74 34 je 1134a8 <_POSIX_signals_Check_signal+0xd8>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
113474: 89 2c 24 mov %ebp,(%esp)
113477: ff d2 call *%edx
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
113479: 8b 3d cc 24 13 00 mov 0x1324cc,%edi
11347f: 83 c7 20 add $0x20,%edi
113482: b9 0a 00 00 00 mov $0xa,%ecx
113487: 8b 74 24 28 mov 0x28(%esp),%esi
11348b: 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;
11348d: 8b 44 24 2c mov 0x2c(%esp),%eax
113491: 8b 94 24 90 00 00 00 mov 0x90(%esp),%edx
113498: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return true;
11349e: b0 01 mov $0x1,%al
}
1134a0: 83 c4 7c add $0x7c,%esp
1134a3: 5b pop %ebx
1134a4: 5e pop %esi
1134a5: 5f pop %edi
1134a6: 5d pop %ebp
1134a7: c3 ret
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
1134a8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
1134af: 00
1134b0: 89 5c 24 04 mov %ebx,0x4(%esp)
1134b4: 89 2c 24 mov %ebp,(%esp)
1134b7: ff d2 call *%edx
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
1134b9: eb be jmp 113479 <_POSIX_signals_Check_signal+0xa9>
1134bb: 90 nop
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
is_global, true ) )
return false;
1134bc: 31 c0 xor %eax,%eax
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
1134be: 83 c4 7c add $0x7c,%esp
1134c1: 5b pop %ebx
1134c2: 5e pop %esi
1134c3: 5f pop %edi
1134c4: 5d pop %ebp
1134c5: c3 ret
00113b78 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
113b78: 53 push %ebx
113b79: 8b 44 24 08 mov 0x8(%esp),%eax
113b7d: 8d 48 ff lea -0x1(%eax),%ecx
113b80: ba 01 00 00 00 mov $0x1,%edx
113b85: d3 e2 shl %cl,%edx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
113b87: 9c pushf
113b88: fa cli
113b89: 59 pop %ecx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
113b8a: 8d 04 40 lea (%eax,%eax,2),%eax
113b8d: c1 e0 02 shl $0x2,%eax
113b90: 83 b8 40 25 13 00 02 cmpl $0x2,0x132540(%eax)
113b97: 74 0f je 113ba8 <_POSIX_signals_Clear_process_signals+0x30>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
113b99: f7 d2 not %edx
113b9b: 21 15 48 27 13 00 and %edx,0x132748
}
_ISR_Enable( level );
113ba1: 51 push %ecx
113ba2: 9d popf
}
113ba3: 5b pop %ebx
113ba4: c3 ret
113ba5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
113ba8: 8d 98 64 27 13 00 lea 0x132764(%eax),%ebx
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
113bae: 39 98 60 27 13 00 cmp %ebx,0x132760(%eax)
113bb4: 75 eb jne 113ba1 <_POSIX_signals_Clear_process_signals+0x29><== NEVER TAKEN
113bb6: eb e1 jmp 113b99 <_POSIX_signals_Clear_process_signals+0x21>
0010c45c <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10c45c: 56 push %esi
10c45d: 53 push %ebx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c45e: ba 1b 00 00 00 mov $0x1b,%edx
10c463: 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>
static int _POSIX_signals_Get_lowest(
10c468: 8d 4a ff lea -0x1(%edx),%ecx
10c46b: 89 de mov %ebx,%esi
10c46d: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c46f: 85 c6 test %eax,%esi
10c471: 75 22 jne 10c495 <_POSIX_signals_Get_lowest+0x39><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c473: 42 inc %edx
10c474: 83 fa 20 cmp $0x20,%edx
10c477: 75 ef jne 10c468 <_POSIX_signals_Get_lowest+0xc>
10c479: b2 01 mov $0x1,%dl
10c47b: bb 01 00 00 00 mov $0x1,%ebx
10c480: eb 08 jmp 10c48a <_POSIX_signals_Get_lowest+0x2e>
10c482: 66 90 xchg %ax,%ax
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c484: 42 inc %edx
10c485: 83 fa 1b cmp $0x1b,%edx
10c488: 74 0b je 10c495 <_POSIX_signals_Get_lowest+0x39><== NEVER TAKEN
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
10c48a: 8d 4a ff lea -0x1(%edx),%ecx
10c48d: 89 de mov %ebx,%esi
10c48f: 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 ) ) {
10c491: 85 c6 test %eax,%esi
10c493: 74 ef je 10c484 <_POSIX_signals_Get_lowest+0x28>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c495: 89 d0 mov %edx,%eax
10c497: 5b pop %ebx
10c498: 5e pop %esi
10c499: c3 ret
00120974 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
120974: 57 push %edi
120975: 56 push %esi
120976: 53 push %ebx
120977: 83 ec 10 sub $0x10,%esp
12097a: 8b 5c 24 20 mov 0x20(%esp),%ebx
12097e: 8b 74 24 24 mov 0x24(%esp),%esi
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120982: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
120988: 8d 4e ff lea -0x1(%esi),%ecx
12098b: b8 01 00 00 00 mov $0x1,%eax
120990: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
120992: 8b 53 10 mov 0x10(%ebx),%edx
120995: 89 d1 mov %edx,%ecx
120997: 81 e1 00 80 00 10 and $0x10008000,%ecx
12099d: 81 f9 00 80 00 10 cmp $0x10008000,%ecx
1209a3: 74 73 je 120a18 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
1209a5: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
1209ab: f7 d1 not %ecx
1209ad: 85 c8 test %ecx,%eax
1209af: 74 5b je 120a0c <_POSIX_signals_Unblock_thread+0x98>
* 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 ) ) {
1209b1: f7 c2 00 00 00 10 test $0x10000000,%edx
1209b7: 74 37 je 1209f0 <_POSIX_signals_Unblock_thread+0x7c>
the_thread->Wait.return_code = EINTR;
1209b9: 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) )
1209c0: f7 c2 e0 be 03 00 test $0x3bee0,%edx
1209c6: 0f 85 94 00 00 00 jne 120a60 <_POSIX_signals_Unblock_thread+0xec>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
1209cc: 83 e2 08 and $0x8,%edx
1209cf: 74 3b je 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
1209d1: 8d 43 48 lea 0x48(%ebx),%eax
1209d4: 89 04 24 mov %eax,(%esp)
1209d7: e8 84 e1 fe ff call 10eb60 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1209dc: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
1209e3: 10
1209e4: 89 1c 24 mov %ebx,(%esp)
1209e7: e8 94 d0 fe ff call 10da80 <_Thread_Clear_state>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
1209ec: 31 c0 xor %eax,%eax
1209ee: eb 1e jmp 120a0e <_POSIX_signals_Unblock_thread+0x9a>
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
1209f0: 85 d2 test %edx,%edx
1209f2: 75 18 jne 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1209f4: a1 c8 24 13 00 mov 0x1324c8,%eax
1209f9: 85 c0 test %eax,%eax
1209fb: 74 0f je 120a0c <_POSIX_signals_Unblock_thread+0x98>
1209fd: 3b 1d cc 24 13 00 cmp 0x1324cc,%ebx
120a03: 75 07 jne 120a0c <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
120a05: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
}
}
return false;
120a0c: 31 c0 xor %eax,%eax
}
120a0e: 83 c4 10 add $0x10,%esp
120a11: 5b pop %ebx
120a12: 5e pop %esi
120a13: 5f pop %edi
120a14: c3 ret
120a15: 8d 76 00 lea 0x0(%esi),%esi
* 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) ) {
120a18: 85 43 30 test %eax,0x30(%ebx)
120a1b: 74 33 je 120a50 <_POSIX_signals_Unblock_thread+0xdc>
the_thread->Wait.return_code = EINTR;
120a1d: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
120a24: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
120a27: 8b 54 24 28 mov 0x28(%esp),%edx
120a2b: 85 d2 test %edx,%edx
120a2d: 74 3d je 120a6c <_POSIX_signals_Unblock_thread+0xf8>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
120a2f: b9 03 00 00 00 mov $0x3,%ecx
120a34: 89 c7 mov %eax,%edi
120a36: 8b 74 24 28 mov 0x28(%esp),%esi
120a3a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
120a3c: 89 1c 24 mov %ebx,(%esp)
120a3f: e8 c0 da fe ff call 10e504 <_Thread_queue_Extract_with_proxy>
return true;
120a44: b0 01 mov $0x1,%al
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
120a46: 83 c4 10 add $0x10,%esp
120a49: 5b pop %ebx
120a4a: 5e pop %esi
120a4b: 5f pop %edi
120a4c: c3 ret
120a4d: 8d 76 00 lea 0x0(%esi),%esi
* 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) ) {
120a50: 8b 97 d0 00 00 00 mov 0xd0(%edi),%edx
120a56: f7 d2 not %edx
120a58: 85 d0 test %edx,%eax
120a5a: 75 c1 jne 120a1d <_POSIX_signals_Unblock_thread+0xa9>
120a5c: eb ae jmp 120a0c <_POSIX_signals_Unblock_thread+0x98>
120a5e: 66 90 xchg %ax,%ax
/*
* 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) )
_Thread_queue_Extract_with_proxy( the_thread );
120a60: 89 1c 24 mov %ebx,(%esp)
120a63: e8 9c da fe ff call 10e504 <_Thread_queue_Extract_with_proxy>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
120a68: 31 c0 xor %eax,%eax
120a6a: eb a2 jmp 120a0e <_POSIX_signals_Unblock_thread+0x9a>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
120a6c: 89 30 mov %esi,(%eax)
the_info->si_code = SI_USER;
120a6e: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
120a75: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
120a7c: eb be jmp 120a3c <_POSIX_signals_Unblock_thread+0xc8>
0010e170 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e170: 55 push %ebp
10e171: 57 push %edi
10e172: 56 push %esi
10e173: 53 push %ebx
10e174: 83 ec 1c sub $0x1c,%esp
10e177: 8b 6c 24 30 mov 0x30(%esp),%ebp
10e17b: 8b 74 24 34 mov 0x34(%esp),%esi
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
10e17f: 85 f6 test %esi,%esi
10e181: 0f 84 ae 00 00 00 je 10e235 <_RBTree_Extract_unprotected+0xc5>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
10e187: 39 75 08 cmp %esi,0x8(%ebp)
10e18a: 0f 84 d8 00 00 00 je 10e268 <_RBTree_Extract_unprotected+0xf8>
the_rbtree->first[RBT_LEFT] = next;
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
10e190: 39 75 0c cmp %esi,0xc(%ebp)
10e193: 0f 84 e7 00 00 00 je 10e280 <_RBTree_Extract_unprotected+0x110>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10e199: 8b 5e 04 mov 0x4(%esi),%ebx
10e19c: 85 db test %ebx,%ebx
10e19e: 0f 84 00 01 00 00 je 10e2a4 <_RBTree_Extract_unprotected+0x134>
10e1a4: 8b 7e 08 mov 0x8(%esi),%edi
10e1a7: 85 ff test %edi,%edi
10e1a9: 75 07 jne 10e1b2 <_RBTree_Extract_unprotected+0x42>
10e1ab: e9 9d 00 00 00 jmp 10e24d <_RBTree_Extract_unprotected+0xdd>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
10e1b0: 89 c3 mov %eax,%ebx
10e1b2: 8b 43 08 mov 0x8(%ebx),%eax
10e1b5: 85 c0 test %eax,%eax
10e1b7: 75 f7 jne 10e1b0 <_RBTree_Extract_unprotected+0x40>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
10e1b9: 8b 7b 04 mov 0x4(%ebx),%edi
if(leaf) {
10e1bc: 85 ff test %edi,%edi
10e1be: 0f 84 d4 00 00 00 je 10e298 <_RBTree_Extract_unprotected+0x128>
leaf->parent = target->parent;
10e1c4: 8b 03 mov (%ebx),%eax
10e1c6: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
10e1c8: 8b 53 0c mov 0xc(%ebx),%edx
dir = target != target->parent->child[0];
10e1cb: 8b 03 mov (%ebx),%eax
10e1cd: 31 c9 xor %ecx,%ecx
10e1cf: 3b 58 04 cmp 0x4(%eax),%ebx
10e1d2: 0f 95 c1 setne %cl
target->parent->child[dir] = leaf;
10e1d5: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
10e1d9: 8b 06 mov (%esi),%eax
10e1db: 31 c9 xor %ecx,%ecx
10e1dd: 39 70 04 cmp %esi,0x4(%eax)
10e1e0: 0f 95 c1 setne %cl
the_node->parent->child[dir] = target;
10e1e3: 89 5c 88 04 mov %ebx,0x4(%eax,%ecx,4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
10e1e7: 8b 46 08 mov 0x8(%esi),%eax
10e1ea: 89 43 08 mov %eax,0x8(%ebx)
if (the_node->child[RBT_RIGHT])
10e1ed: 8b 46 08 mov 0x8(%esi),%eax
10e1f0: 85 c0 test %eax,%eax
10e1f2: 74 02 je 10e1f6 <_RBTree_Extract_unprotected+0x86><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
10e1f4: 89 18 mov %ebx,(%eax)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
10e1f6: 8b 46 04 mov 0x4(%esi),%eax
10e1f9: 89 43 04 mov %eax,0x4(%ebx)
if (the_node->child[RBT_LEFT])
10e1fc: 8b 46 04 mov 0x4(%esi),%eax
10e1ff: 85 c0 test %eax,%eax
10e201: 74 02 je 10e205 <_RBTree_Extract_unprotected+0x95>
the_node->child[RBT_LEFT]->parent = target;
10e203: 89 18 mov %ebx,(%eax)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
10e205: 8b 06 mov (%esi),%eax
10e207: 89 03 mov %eax,(%ebx)
target->color = the_node->color;
10e209: 8b 46 0c mov 0xc(%esi),%eax
10e20c: 89 43 0c mov %eax,0xc(%ebx)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
10e20f: 85 d2 test %edx,%edx
10e211: 74 2d je 10e240 <_RBTree_Extract_unprotected+0xd0>
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
10e213: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
10e21a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10e221: c7 06 00 00 00 00 movl $0x0,(%esi)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
10e227: 8b 45 04 mov 0x4(%ebp),%eax
10e22a: 85 c0 test %eax,%eax
10e22c: 74 07 je 10e235 <_RBTree_Extract_unprotected+0xc5>
10e22e: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
}
10e235: 83 c4 1c add $0x1c,%esp
10e238: 5b pop %ebx
10e239: 5e pop %esi
10e23a: 5f pop %edi
10e23b: 5d pop %ebp
10e23c: c3 ret
10e23d: 8d 76 00 lea 0x0(%esi),%esi
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
if (leaf) {
10e240: 85 ff test %edi,%edi
10e242: 74 cf je 10e213 <_RBTree_Extract_unprotected+0xa3>
leaf->color = RBT_BLACK; /* case 2 */
10e244: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e24b: eb c6 jmp 10e213 <_RBTree_Extract_unprotected+0xa3>
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
10e24d: 89 df mov %ebx,%edi
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
10e24f: 8b 06 mov (%esi),%eax
10e251: 89 07 mov %eax,(%edi)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
10e253: 8b 56 0c mov 0xc(%esi),%edx
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
10e256: 8b 06 mov (%esi),%eax
10e258: 31 c9 xor %ecx,%ecx
10e25a: 39 70 04 cmp %esi,0x4(%eax)
10e25d: 0f 95 c1 setne %cl
the_node->parent->child[dir] = leaf;
10e260: 89 7c 88 04 mov %edi,0x4(%eax,%ecx,4)
10e264: eb a9 jmp 10e20f <_RBTree_Extract_unprotected+0x9f>
10e266: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
10e268: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e26f: 00
10e270: 89 34 24 mov %esi,(%esp)
10e273: e8 00 03 00 00 call 10e578 <_RBTree_Next_unprotected>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
10e278: 89 45 08 mov %eax,0x8(%ebp)
10e27b: e9 10 ff ff ff jmp 10e190 <_RBTree_Extract_unprotected+0x20>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
10e280: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10e287: 00
10e288: 89 34 24 mov %esi,(%esp)
10e28b: e8 e8 02 00 00 call 10e578 <_RBTree_Next_unprotected>
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
10e290: 89 45 0c mov %eax,0xc(%ebp)
10e293: e9 01 ff ff ff jmp 10e199 <_RBTree_Extract_unprotected+0x29>
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
10e298: 89 d8 mov %ebx,%eax
10e29a: e8 95 fc ff ff call 10df34 <_RBTree_Extract_validate_unprotected>
10e29f: e9 24 ff ff ff jmp 10e1c8 <_RBTree_Extract_unprotected+0x58>
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
10e2a4: 8b 7e 08 mov 0x8(%esi),%edi
if( leaf ) {
10e2a7: 85 ff test %edi,%edi
10e2a9: 75 a4 jne 10e24f <_RBTree_Extract_unprotected+0xdf>
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
10e2ab: 89 f0 mov %esi,%eax
10e2ad: e8 82 fc ff ff call 10df34 <_RBTree_Extract_validate_unprotected>
10e2b2: eb 9f jmp 10e253 <_RBTree_Extract_unprotected+0xe3>
0010df34 <_RBTree_Extract_validate_unprotected>:
)
{
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
10df34: 8b 10 mov (%eax),%edx
if(!parent->parent) return;
10df36: 8b 0a mov (%edx),%ecx
10df38: 85 c9 test %ecx,%ecx
10df3a: 0f 84 8f 00 00 00 je 10dfcf <_RBTree_Extract_validate_unprotected+0x9b>
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
10df40: 55 push %ebp
10df41: 57 push %edi
10df42: 56 push %esi
10df43: 53 push %ebx
10df44: 83 ec 08 sub $0x8,%esp
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10df47: 8b 4a 04 mov 0x4(%edx),%ecx
10df4a: 39 c8 cmp %ecx,%eax
10df4c: 75 68 jne 10dfb6 <_RBTree_Extract_validate_unprotected+0x82>
return the_node->parent->child[RBT_RIGHT];
10df4e: 8b 4a 08 mov 0x8(%edx),%ecx
10df51: eb 63 jmp 10dfb6 <_RBTree_Extract_validate_unprotected+0x82>
10df53: 90 nop
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
10df54: 8b 1a mov (%edx),%ebx
10df56: 85 db test %ebx,%ebx
10df58: 74 62 je 10dfbc <_RBTree_Extract_validate_unprotected+0x88>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10df5a: 85 c9 test %ecx,%ecx
10df5c: 74 0a je 10df68 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN
10df5e: 83 79 0c 01 cmpl $0x1,0xc(%ecx)
10df62: 0f 84 18 01 00 00 je 10e080 <_RBTree_Extract_validate_unprotected+0x14c>
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
10df68: 8b 59 08 mov 0x8(%ecx),%ebx
10df6b: 85 db test %ebx,%ebx
10df6d: 74 06 je 10df75 <_RBTree_Extract_validate_unprotected+0x41>
10df6f: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10df73: 74 5b je 10dfd0 <_RBTree_Extract_validate_unprotected+0x9c>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
10df75: 8b 59 04 mov 0x4(%ecx),%ebx
10df78: 85 db test %ebx,%ebx
10df7a: 74 06 je 10df82 <_RBTree_Extract_validate_unprotected+0x4e>
10df7c: 83 7b 0c 01 cmpl $0x1,0xc(%ebx)
10df80: 74 4e je 10dfd0 <_RBTree_Extract_validate_unprotected+0x9c>
sibling->color = RBT_RED;
10df82: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
10df89: 83 7a 0c 01 cmpl $0x1,0xc(%edx)
10df8d: 0f 84 d1 01 00 00 je 10e164 <_RBTree_Extract_validate_unprotected+0x230>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
10df93: 8b 1a mov (%edx),%ebx
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10df95: 85 db test %ebx,%ebx
10df97: 0f 84 3b 01 00 00 je 10e0d8 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
10df9d: 8b 3b mov (%ebx),%edi
10df9f: 85 ff test %edi,%edi
10dfa1: 0f 84 31 01 00 00 je 10e0d8 <_RBTree_Extract_validate_unprotected+0x1a4>
if(the_node == the_node->parent->child[RBT_LEFT])
10dfa7: 8b 4b 04 mov 0x4(%ebx),%ecx
10dfaa: 39 ca cmp %ecx,%edx
10dfac: 0f 84 2e 01 00 00 je 10e0e0 <_RBTree_Extract_validate_unprotected+0x1ac>
10dfb2: 89 d0 mov %edx,%eax
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10dfb4: 89 da mov %ebx,%edx
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10dfb6: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10dfba: 75 98 jne 10df54 <_RBTree_Extract_validate_unprotected+0x20>
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10dfbc: 8b 10 mov (%eax),%edx
10dfbe: 8b 32 mov (%edx),%esi
10dfc0: 85 f6 test %esi,%esi
10dfc2: 0f 84 8e 01 00 00 je 10e156 <_RBTree_Extract_validate_unprotected+0x222>
}
10dfc8: 83 c4 08 add $0x8,%esp
10dfcb: 5b pop %ebx
10dfcc: 5e pop %esi
10dfcd: 5f pop %edi
10dfce: 5d pop %ebp
10dfcf: c3 ret
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
10dfd0: 3b 42 04 cmp 0x4(%edx),%eax
10dfd3: 0f 95 c3 setne %bl
10dfd6: 89 dd mov %ebx,%ebp
10dfd8: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10dfdb: 83 f3 01 xor $0x1,%ebx
10dfde: 0f b6 db movzbl %bl,%ebx
10dfe1: 89 1c 24 mov %ebx,(%esp)
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
10dfe4: 8b 7c 99 04 mov 0x4(%ecx,%ebx,4),%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10dfe8: 85 ff test %edi,%edi
10dfea: 74 0a je 10dff6 <_RBTree_Extract_validate_unprotected+0xc2>
10dfec: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10dff0: 0f 84 f9 00 00 00 je 10e0ef <_RBTree_Extract_validate_unprotected+0x1bb>
sibling->color = RBT_RED;
10dff6: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
sibling->child[dir]->color = RBT_BLACK;
10dffd: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e001: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e008: 89 eb mov %ebp,%ebx
10e00a: 0f b6 eb movzbl %bl,%ebp
10e00d: 89 6c 24 04 mov %ebp,0x4(%esp)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e011: 8b 6c a9 04 mov 0x4(%ecx,%ebp,4),%ebp
10e015: 85 ed test %ebp,%ebp
10e017: 74 36 je 10e04f <_RBTree_Extract_validate_unprotected+0x11b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e019: 8b 3c 24 mov (%esp),%edi
10e01c: 8b 5c bd 04 mov 0x4(%ebp,%edi,4),%ebx
10e020: 8b 7c 24 04 mov 0x4(%esp),%edi
10e024: 89 5c b9 04 mov %ebx,0x4(%ecx,%edi,4)
if (c->child[dir])
10e028: 8b 1c 24 mov (%esp),%ebx
10e02b: 8b 7c 9d 04 mov 0x4(%ebp,%ebx,4),%edi
10e02f: 85 ff test %edi,%edi
10e031: 74 02 je 10e035 <_RBTree_Extract_validate_unprotected+0x101>
c->child[dir]->parent = the_node;
10e033: 89 0f mov %ecx,(%edi)
c->child[dir] = the_node;
10e035: 8b 3c 24 mov (%esp),%edi
10e038: 89 4c bd 04 mov %ecx,0x4(%ebp,%edi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e03c: 8b 39 mov (%ecx),%edi
10e03e: 31 db xor %ebx,%ebx
10e040: 3b 4f 04 cmp 0x4(%edi),%ecx
10e043: 0f 95 c3 setne %bl
10e046: 89 6c 9f 04 mov %ebp,0x4(%edi,%ebx,4)
c->parent = the_node->parent;
10e04a: 89 7d 00 mov %edi,0x0(%ebp)
the_node->parent = c;
10e04d: 89 29 mov %ebp,(%ecx)
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
10e04f: 8b 3c 24 mov (%esp),%edi
10e052: 8b 7c ba 04 mov 0x4(%edx,%edi,4),%edi
10e056: 89 7c 24 04 mov %edi,0x4(%esp)
10e05a: 8b 2c 24 mov (%esp),%ebp
10e05d: 8b 4c af 04 mov 0x4(%edi,%ebp,4),%ecx
}
sibling->color = parent->color;
10e061: 8b 7a 0c mov 0xc(%edx),%edi
10e064: 8b 5c 24 04 mov 0x4(%esp),%ebx
10e068: 89 7b 0c mov %edi,0xc(%ebx)
parent->color = RBT_BLACK;
10e06b: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10e072: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
10e079: e9 95 00 00 00 jmp 10e113 <_RBTree_Extract_validate_unprotected+0x1df>
10e07e: 66 90 xchg %ax,%ax
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
10e080: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
sibling->color = RBT_BLACK;
10e087: c7 41 0c 00 00 00 00 movl $0x0,0xc(%ecx)
dir = the_node != parent->child[0];
10e08e: 39 42 04 cmp %eax,0x4(%edx)
10e091: 0f 95 c3 setne %bl
10e094: 0f b6 f3 movzbl %bl,%esi
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e097: 83 f3 01 xor $0x1,%ebx
10e09a: 0f b6 eb movzbl %bl,%ebp
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e09d: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e0a1: 85 c9 test %ecx,%ecx
10e0a3: 74 43 je 10e0e8 <_RBTree_Extract_validate_unprotected+0x1b4><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e0a5: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e0a9: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
if (c->child[dir])
10e0ad: 8b 7c b1 04 mov 0x4(%ecx,%esi,4),%edi
10e0b1: 85 ff test %edi,%edi
10e0b3: 74 02 je 10e0b7 <_RBTree_Extract_validate_unprotected+0x183><== NEVER TAKEN
c->child[dir]->parent = the_node;
10e0b5: 89 17 mov %edx,(%edi)
c->child[dir] = the_node;
10e0b7: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e0bb: 8b 32 mov (%edx),%esi
10e0bd: 31 db xor %ebx,%ebx
10e0bf: 3b 56 04 cmp 0x4(%esi),%edx
10e0c2: 0f 95 c3 setne %bl
10e0c5: 89 df mov %ebx,%edi
10e0c7: 89 4c be 04 mov %ecx,0x4(%esi,%edi,4)
c->parent = the_node->parent;
10e0cb: 89 31 mov %esi,(%ecx)
the_node->parent = c;
10e0cd: 89 0a mov %ecx,(%edx)
10e0cf: 8b 4c aa 04 mov 0x4(%edx,%ebp,4),%ecx
10e0d3: e9 90 fe ff ff jmp 10df68 <_RBTree_Extract_validate_unprotected+0x34>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
10e0d8: 31 c9 xor %ecx,%ecx
10e0da: e9 d3 fe ff ff jmp 10dfb2 <_RBTree_Extract_validate_unprotected+0x7e>
10e0df: 90 nop
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
10e0e0: 8b 4b 08 mov 0x8(%ebx),%ecx
10e0e3: e9 ca fe ff ff jmp 10dfb2 <_RBTree_Extract_validate_unprotected+0x7e>
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e0e8: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10e0ea: e9 79 fe ff ff jmp 10df68 <_RBTree_Extract_validate_unprotected+0x34><== NOT EXECUTED
10e0ef: 8b 6c 9a 04 mov 0x4(%edx,%ebx,4),%ebp
10e0f3: 89 6c 24 04 mov %ebp,0x4(%esp)
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
sibling->color = parent->color;
10e0f7: 8b 5a 0c mov 0xc(%edx),%ebx
10e0fa: 89 59 0c mov %ebx,0xc(%ecx)
parent->color = RBT_BLACK;
10e0fd: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
10e104: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
10e10b: 85 ed test %ebp,%ebp
10e10d: 0f 84 a9 fe ff ff je 10dfbc <_RBTree_Extract_validate_unprotected+0x88><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e113: 8b 7c 24 04 mov 0x4(%esp),%edi
10e117: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e11b: 8b 2c 24 mov (%esp),%ebp
10e11e: 89 4c aa 04 mov %ecx,0x4(%edx,%ebp,4)
if (c->child[dir])
10e122: 8b 4c b7 04 mov 0x4(%edi,%esi,4),%ecx
10e126: 85 c9 test %ecx,%ecx
10e128: 74 02 je 10e12c <_RBTree_Extract_validate_unprotected+0x1f8>
c->child[dir]->parent = the_node;
10e12a: 89 11 mov %edx,(%ecx)
c->child[dir] = the_node;
10e12c: 8b 4c 24 04 mov 0x4(%esp),%ecx
10e130: 89 54 b1 04 mov %edx,0x4(%ecx,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e134: 8b 0a mov (%edx),%ecx
10e136: 31 db xor %ebx,%ebx
10e138: 3b 51 04 cmp 0x4(%ecx),%edx
10e13b: 0f 95 c3 setne %bl
10e13e: 8b 74 24 04 mov 0x4(%esp),%esi
10e142: 89 74 99 04 mov %esi,0x4(%ecx,%ebx,4)
c->parent = the_node->parent;
10e146: 89 0e mov %ecx,(%esi)
the_node->parent = c;
10e148: 89 32 mov %esi,(%edx)
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10e14a: 8b 10 mov (%eax),%edx
10e14c: 8b 32 mov (%edx),%esi
10e14e: 85 f6 test %esi,%esi
10e150: 0f 85 72 fe ff ff jne 10dfc8 <_RBTree_Extract_validate_unprotected+0x94><== ALWAYS TAKEN
10e156: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10e15d: e9 66 fe ff ff jmp 10dfc8 <_RBTree_Extract_validate_unprotected+0x94>
10e162: 66 90 xchg %ax,%ax
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
10e164: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
break;
10e16b: e9 4c fe ff ff jmp 10dfbc <_RBTree_Extract_validate_unprotected+0x88>
0010e834 <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
10e834: 55 push %ebp
10e835: 57 push %edi
10e836: 56 push %esi
10e837: 53 push %ebx
10e838: 83 ec 2c sub $0x2c,%esp
10e83b: 8b 5c 24 40 mov 0x40(%esp),%ebx
10e83f: 8b 74 24 44 mov 0x44(%esp),%esi
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
10e843: 9c pushf
10e844: fa cli
10e845: 8f 44 24 1c popl 0x1c(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10e849: 8b 6b 04 mov 0x4(%ebx),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e84c: 31 ff xor %edi,%edi
10e84e: 85 ed test %ebp,%ebp
10e850: 74 28 je 10e87a <_RBTree_Find+0x46> <== NEVER TAKEN
10e852: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(the_node, iter_node);
10e854: 89 6c 24 04 mov %ebp,0x4(%esp)
10e858: 89 34 24 mov %esi,(%esp)
10e85b: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10e85e: 85 c0 test %eax,%eax
10e860: 75 08 jne 10e86a <_RBTree_Find+0x36>
found = iter_node;
if ( the_rbtree->is_unique )
10e862: 89 ef mov %ebp,%edi
10e864: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10e868: 75 10 jne 10e87a <_RBTree_Find+0x46>
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10e86a: 85 c0 test %eax,%eax
10e86c: 0f 9f c0 setg %al
10e86f: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10e872: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10e876: 85 ed test %ebp,%ebp
10e878: 75 da jne 10e854 <_RBTree_Find+0x20>
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
10e87a: ff 74 24 1c pushl 0x1c(%esp)
10e87e: 9d popf
return return_node;
}
10e87f: 89 f8 mov %edi,%eax
10e881: 83 c4 2c add $0x2c,%esp
10e884: 5b pop %ebx
10e885: 5e pop %esi
10e886: 5f pop %edi
10e887: 5d pop %ebp
10e888: c3 ret
0010eb7c <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
10eb7c: 55 push %ebp
10eb7d: 57 push %edi
10eb7e: 56 push %esi
10eb7f: 53 push %ebx
10eb80: 83 ec 1c sub $0x1c,%esp
10eb83: 8b 7c 24 30 mov 0x30(%esp),%edi
10eb87: 8b 5c 24 3c mov 0x3c(%esp),%ebx
10eb8b: 8b 6c 24 40 mov 0x40(%esp),%ebp
10eb8f: 8b 44 24 44 mov 0x44(%esp),%eax
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
10eb93: 85 ff test %edi,%edi
10eb95: 74 3e je 10ebd5 <_RBTree_Initialize+0x59><== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10eb97: c7 07 00 00 00 00 movl $0x0,(%edi)
the_rbtree->root = NULL;
10eb9d: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
the_rbtree->first[0] = NULL;
10eba4: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
the_rbtree->first[1] = NULL;
10ebab: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
the_rbtree->compare_function = compare_function;
10ebb2: 8b 54 24 34 mov 0x34(%esp),%edx
10ebb6: 89 57 10 mov %edx,0x10(%edi)
the_rbtree->is_unique = is_unique;
10ebb9: 88 47 14 mov %al,0x14(%edi)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10ebbc: 85 db test %ebx,%ebx
10ebbe: 74 15 je 10ebd5 <_RBTree_Initialize+0x59><== NEVER TAKEN
10ebc0: 8b 74 24 38 mov 0x38(%esp),%esi
_RBTree_Insert_unprotected(the_rbtree, next);
10ebc4: 89 74 24 04 mov %esi,0x4(%esp)
10ebc8: 89 3c 24 mov %edi,(%esp)
10ebcb: e8 e8 fc ff ff call 10e8b8 <_RBTree_Insert_unprotected>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
10ebd0: 01 ee add %ebp,%esi
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
10ebd2: 4b dec %ebx
10ebd3: 75 ef jne 10ebc4 <_RBTree_Initialize+0x48>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
10ebd5: 83 c4 1c add $0x1c,%esp
10ebd8: 5b pop %ebx
10ebd9: 5e pop %esi
10ebda: 5f pop %edi
10ebdb: 5d pop %ebp
10ebdc: c3 ret
0010e2d8 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
10e2d8: 55 push %ebp
10e2d9: 57 push %edi
10e2da: 56 push %esi
10e2db: 53 push %ebx
10e2dc: 83 ec 2c sub $0x2c,%esp
10e2df: 8b 6c 24 40 mov 0x40(%esp),%ebp
10e2e3: 8b 5c 24 44 mov 0x44(%esp),%ebx
if(!the_node) return (RBTree_Node*)-1;
10e2e7: 85 db test %ebx,%ebx
10e2e9: 0f 84 c5 01 00 00 je 10e4b4 <_RBTree_Insert_unprotected+0x1dc>
RBTree_Node *iter_node = the_rbtree->root;
10e2ef: 8b 7d 04 mov 0x4(%ebp),%edi
int compare_result;
if (!iter_node) { /* special case: first node inserted */
10e2f2: 85 ff test %edi,%edi
10e2f4: 75 08 jne 10e2fe <_RBTree_Insert_unprotected+0x26>
10e2f6: e9 d6 01 00 00 jmp 10e4d1 <_RBTree_Insert_unprotected+0x1f9>
10e2fb: 90 nop
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
10e2fc: 89 d7 mov %edx,%edi
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
10e2fe: 89 7c 24 04 mov %edi,0x4(%esp)
10e302: 89 1c 24 mov %ebx,(%esp)
10e305: ff 55 10 call *0x10(%ebp)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e308: 80 7d 14 00 cmpb $0x0,0x14(%ebp)
10e30c: 74 08 je 10e316 <_RBTree_Insert_unprotected+0x3e>
10e30e: 85 c0 test %eax,%eax
10e310: 0f 84 b2 01 00 00 je 10e4c8 <_RBTree_Insert_unprotected+0x1f0>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
10e316: f7 d0 not %eax
10e318: c1 e8 1f shr $0x1f,%eax
if (!iter_node->child[dir]) {
10e31b: 8b 54 87 04 mov 0x4(%edi,%eax,4),%edx
10e31f: 85 d2 test %edx,%edx
10e321: 75 d9 jne 10e2fc <_RBTree_Insert_unprotected+0x24>
10e323: 89 54 24 1c mov %edx,0x1c(%esp)
10e327: 89 c6 mov %eax,%esi
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e329: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e330: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
the_node->color = RBT_RED;
10e337: c7 43 0c 01 00 00 00 movl $0x1,0xc(%ebx)
iter_node->child[dir] = the_node;
10e33e: 89 5c 87 04 mov %ebx,0x4(%edi,%eax,4)
the_node->parent = iter_node;
10e342: 89 3b mov %edi,(%ebx)
/* update min/max */
compare_result = the_rbtree->compare_function(
10e344: 8b 44 85 08 mov 0x8(%ebp,%eax,4),%eax
10e348: 89 44 24 04 mov %eax,0x4(%esp)
10e34c: 89 1c 24 mov %ebx,(%esp)
10e34f: ff 55 10 call *0x10(%ebp)
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
10e352: 85 f6 test %esi,%esi
10e354: 75 2e jne 10e384 <_RBTree_Insert_unprotected+0xac>
10e356: 85 c0 test %eax,%eax
10e358: 78 2e js 10e388 <_RBTree_Insert_unprotected+0xb0>
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e35a: 89 5c 24 18 mov %ebx,0x18(%esp)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e35e: 8b 54 24 18 mov 0x18(%esp),%edx
10e362: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e364: 8b 10 mov (%eax),%edx
10e366: 89 d1 mov %edx,%ecx
10e368: 85 d2 test %edx,%edx
10e36a: 0f 84 03 01 00 00 je 10e473 <_RBTree_Insert_unprotected+0x19b>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e370: 83 78 0c 01 cmpl $0x1,0xc(%eax)
10e374: 74 1a je 10e390 <_RBTree_Insert_unprotected+0xb8>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e376: 8b 44 24 1c mov 0x1c(%esp),%eax
10e37a: 83 c4 2c add $0x2c,%esp
10e37d: 5b pop %ebx
10e37e: 5e pop %esi
10e37f: 5f pop %edi
10e380: 5d pop %ebp
10e381: c3 ret
10e382: 66 90 xchg %ax,%ax
compare_result = the_rbtree->compare_function(
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
(dir && _RBTree_Is_greater(compare_result)) ) {
10e384: 85 c0 test %eax,%eax
10e386: 7e d2 jle 10e35a <_RBTree_Insert_unprotected+0x82>
the_rbtree->first[dir] = the_node;
10e388: 89 5c b5 08 mov %ebx,0x8(%ebp,%esi,4)
10e38c: eb cc jmp 10e35a <_RBTree_Insert_unprotected+0x82>
10e38e: 66 90 xchg %ax,%ax
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
10e390: 8b 1a mov (%edx),%ebx
10e392: 85 db test %ebx,%ebx
10e394: 8b 72 04 mov 0x4(%edx),%esi
10e397: 74 18 je 10e3b1 <_RBTree_Insert_unprotected+0xd9><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
10e399: 39 f0 cmp %esi,%eax
10e39b: 0f 84 0b 01 00 00 je 10e4ac <_RBTree_Insert_unprotected+0x1d4>
10e3a1: 89 f7 mov %esi,%edi
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
10e3a3: 85 ff test %edi,%edi
10e3a5: 74 0a je 10e3b1 <_RBTree_Insert_unprotected+0xd9>
10e3a7: 83 7f 0c 01 cmpl $0x1,0xc(%edi)
10e3ab: 0f 84 db 00 00 00 je 10e48c <_RBTree_Insert_unprotected+0x1b4>
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
10e3b1: 31 db xor %ebx,%ebx
10e3b3: 39 f0 cmp %esi,%eax
10e3b5: 0f 95 c3 setne %bl
10e3b8: 89 de mov %ebx,%esi
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
10e3ba: 8b 5c 24 18 mov 0x18(%esp),%ebx
10e3be: 3b 58 04 cmp 0x4(%eax),%ebx
10e3c1: 0f 95 c3 setne %bl
10e3c4: 0f b6 db movzbl %bl,%ebx
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
10e3c7: 39 f3 cmp %esi,%ebx
10e3c9: 74 46 je 10e411 <_RBTree_Insert_unprotected+0x139>
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e3cb: 89 f3 mov %esi,%ebx
10e3cd: 83 f3 01 xor $0x1,%ebx
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e3d0: 8b 7c 98 04 mov 0x4(%eax,%ebx,4),%edi
10e3d4: 85 ff test %edi,%edi
10e3d6: 74 2b je 10e403 <_RBTree_Insert_unprotected+0x12b><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e3d8: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e3dc: 89 6c 98 04 mov %ebp,0x4(%eax,%ebx,4)
if (c->child[dir])
10e3e0: 8b 6c b7 04 mov 0x4(%edi,%esi,4),%ebp
10e3e4: 85 ed test %ebp,%ebp
10e3e6: 74 05 je 10e3ed <_RBTree_Insert_unprotected+0x115>
c->child[dir]->parent = the_node;
10e3e8: 89 45 00 mov %eax,0x0(%ebp)
10e3eb: 8b 10 mov (%eax),%edx
c->child[dir] = the_node;
10e3ed: 89 44 b7 04 mov %eax,0x4(%edi,%esi,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e3f1: 31 db xor %ebx,%ebx
10e3f3: 3b 42 04 cmp 0x4(%edx),%eax
10e3f6: 0f 95 c3 setne %bl
10e3f9: 89 dd mov %ebx,%ebp
10e3fb: 89 7c aa 04 mov %edi,0x4(%edx,%ebp,4)
c->parent = the_node->parent;
10e3ff: 89 17 mov %edx,(%edi)
the_node->parent = c;
10e401: 89 38 mov %edi,(%eax)
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
10e403: 8b 44 24 18 mov 0x18(%esp),%eax
10e407: 8b 44 b0 04 mov 0x4(%eax,%esi,4),%eax
10e40b: 89 44 24 18 mov %eax,0x18(%esp)
10e40f: 8b 00 mov (%eax),%eax
}
the_node->parent->color = RBT_BLACK;
10e411: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
g->color = RBT_RED;
10e418: c7 41 0c 01 00 00 00 movl $0x1,0xc(%ecx)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
10e41f: ba 01 00 00 00 mov $0x1,%edx
10e424: 29 f2 sub %esi,%edx
10e426: 89 d6 mov %edx,%esi
10e428: 83 f6 01 xor $0x1,%esi
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
10e42b: 8b 44 b1 04 mov 0x4(%ecx,%esi,4),%eax
10e42f: 85 c0 test %eax,%eax
10e431: 0f 84 27 ff ff ff je 10e35e <_RBTree_Insert_unprotected+0x86><== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
10e437: 8b 7c 90 04 mov 0x4(%eax,%edx,4),%edi
10e43b: 89 7c b1 04 mov %edi,0x4(%ecx,%esi,4)
if (c->child[dir])
10e43f: 8b 74 90 04 mov 0x4(%eax,%edx,4),%esi
10e443: 85 f6 test %esi,%esi
10e445: 74 02 je 10e449 <_RBTree_Insert_unprotected+0x171>
c->child[dir]->parent = the_node;
10e447: 89 0e mov %ecx,(%esi)
c->child[dir] = the_node;
10e449: 89 4c 90 04 mov %ecx,0x4(%eax,%edx,4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
10e44d: 8b 11 mov (%ecx),%edx
10e44f: 31 db xor %ebx,%ebx
10e451: 3b 4a 04 cmp 0x4(%edx),%ecx
10e454: 0f 95 c3 setne %bl
10e457: 89 de mov %ebx,%esi
10e459: 89 44 b2 04 mov %eax,0x4(%edx,%esi,4)
c->parent = the_node->parent;
10e45d: 89 10 mov %edx,(%eax)
the_node->parent = c;
10e45f: 89 01 mov %eax,(%ecx)
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
10e461: 8b 54 24 18 mov 0x18(%esp),%edx
10e465: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
10e467: 8b 10 mov (%eax),%edx
10e469: 89 d1 mov %edx,%ecx
10e46b: 85 d2 test %edx,%edx
10e46d: 0f 85 fd fe ff ff jne 10e370 <_RBTree_Insert_unprotected+0x98><== ALWAYS TAKEN
10e473: 8b 5c 24 18 mov 0x18(%esp),%ebx
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
10e477: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e47e: 8b 44 24 1c mov 0x1c(%esp),%eax
10e482: 83 c4 2c add $0x2c,%esp
10e485: 5b pop %ebx
10e486: 5e pop %esi
10e487: 5f pop %edi
10e488: 5d pop %ebp
10e489: c3 ret
10e48a: 66 90 xchg %ax,%ax
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
10e48c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
u->color = RBT_BLACK;
10e493: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
g->color = RBT_RED;
10e49a: c7 42 0c 01 00 00 00 movl $0x1,0xc(%edx)
10e4a1: 89 54 24 18 mov %edx,0x18(%esp)
10e4a5: e9 b4 fe ff ff jmp 10e35e <_RBTree_Insert_unprotected+0x86>
10e4aa: 66 90 xchg %ax,%ax
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
10e4ac: 8b 7a 08 mov 0x8(%edx),%edi
10e4af: e9 ef fe ff ff jmp 10e3a3 <_RBTree_Insert_unprotected+0xcb>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
10e4b4: c7 44 24 1c ff ff ff movl $0xffffffff,0x1c(%esp)
10e4bb: ff
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
10e4bc: 8b 44 24 1c mov 0x1c(%esp),%eax
10e4c0: 83 c4 2c add $0x2c,%esp
10e4c3: 5b pop %ebx
10e4c4: 5e pop %esi
10e4c5: 5f pop %edi
10e4c6: 5d pop %ebp
10e4c7: c3 ret
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
10e4c8: 89 7c 24 1c mov %edi,0x1c(%esp)
10e4cc: e9 a5 fe ff ff jmp 10e376 <_RBTree_Insert_unprotected+0x9e>
RBTree_Node *iter_node = the_rbtree->root;
int compare_result;
if (!iter_node) { /* special case: first node inserted */
the_node->color = RBT_BLACK;
10e4d1: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_rbtree->root = the_node;
10e4d8: 89 5d 04 mov %ebx,0x4(%ebp)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
10e4db: 89 5d 0c mov %ebx,0xc(%ebp)
10e4de: 89 5d 08 mov %ebx,0x8(%ebp)
the_node->parent = (RBTree_Node *) the_rbtree;
10e4e1: 89 2b mov %ebp,(%ebx)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
10e4e3: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
10e4ea: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
10e4f1: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
10e4f8: 00
10e4f9: e9 78 fe ff ff jmp 10e376 <_RBTree_Insert_unprotected+0x9e>
0010e524 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
10e524: 55 push %ebp
10e525: 57 push %edi
10e526: 56 push %esi
10e527: 53 push %ebx
10e528: 83 ec 1c sub $0x1c,%esp
10e52b: 8b 74 24 34 mov 0x34(%esp),%esi
10e52f: 8b 6c 24 38 mov 0x38(%esp),%ebp
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
10e533: 31 d2 xor %edx,%edx
10e535: 85 f6 test %esi,%esi
10e537: 0f 94 c2 sete %dl
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
10e53a: 8b 44 24 30 mov 0x30(%esp),%eax
10e53e: 8b 5c 90 08 mov 0x8(%eax,%edx,4),%ebx
10e542: 66 90 xchg %ax,%ax
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e544: 85 db test %ebx,%ebx
10e546: 74 27 je 10e56f <_RBTree_Iterate_unprotected+0x4b>
stop = (*visitor)( current, dir, visitor_arg );
10e548: 8b 44 24 3c mov 0x3c(%esp),%eax
10e54c: 89 44 24 08 mov %eax,0x8(%esp)
10e550: 89 74 24 04 mov %esi,0x4(%esp)
10e554: 89 1c 24 mov %ebx,(%esp)
10e557: ff d5 call *%ebp
10e559: 89 c7 mov %eax,%edi
current = _RBTree_Next_unprotected( current, dir );
10e55b: 89 74 24 04 mov %esi,0x4(%esp)
10e55f: 89 1c 24 mov %ebx,(%esp)
10e562: e8 11 00 00 00 call 10e578 <_RBTree_Next_unprotected>
10e567: 89 c3 mov %eax,%ebx
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
10e569: 89 f8 mov %edi,%eax
10e56b: 84 c0 test %al,%al
10e56d: 74 d5 je 10e544 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
10e56f: 83 c4 1c add $0x1c,%esp
10e572: 5b pop %ebx
10e573: 5e pop %esi
10e574: 5f pop %edi
10e575: 5d pop %ebp
10e576: c3 ret
0010bda0 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10bda0: 55 push %ebp
10bda1: 57 push %edi
10bda2: 56 push %esi
10bda3: 53 push %ebx
10bda4: 83 ec 3c sub $0x3c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10bda7: 8b 1d 8c da 12 00 mov 0x12da8c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10bdad: 8b 3d 88 da 12 00 mov 0x12da88,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10bdb3: 85 db test %ebx,%ebx
10bdb5: 74 61 je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bdb7: 85 ff test %edi,%edi
10bdb9: 74 5d je 10be18 <_RTEMS_tasks_Initialize_user_tasks_body+0x78><== NEVER TAKEN
10bdbb: 31 f6 xor %esi,%esi
10bdbd: 8d 6c 24 2c lea 0x2c(%esp),%ebp
10bdc1: 8d 76 00 lea 0x0(%esi),%esi
return_value = rtems_task_create(
10bdc4: 89 6c 24 14 mov %ebp,0x14(%esp)
10bdc8: 8b 43 0c mov 0xc(%ebx),%eax
10bdcb: 89 44 24 10 mov %eax,0x10(%esp)
10bdcf: 8b 43 14 mov 0x14(%ebx),%eax
10bdd2: 89 44 24 0c mov %eax,0xc(%esp)
10bdd6: 8b 43 04 mov 0x4(%ebx),%eax
10bdd9: 89 44 24 08 mov %eax,0x8(%esp)
10bddd: 8b 43 08 mov 0x8(%ebx),%eax
10bde0: 89 44 24 04 mov %eax,0x4(%esp)
10bde4: 8b 03 mov (%ebx),%eax
10bde6: 89 04 24 mov %eax,(%esp)
10bde9: e8 5a fd ff ff call 10bb48 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
10bdee: 85 c0 test %eax,%eax
10bdf0: 75 2e jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bdf2: 8b 43 18 mov 0x18(%ebx),%eax
10bdf5: 89 44 24 08 mov %eax,0x8(%esp)
10bdf9: 8b 43 10 mov 0x10(%ebx),%eax
10bdfc: 89 44 24 04 mov %eax,0x4(%esp)
10be00: 8b 44 24 2c mov 0x2c(%esp),%eax
10be04: 89 04 24 mov %eax,(%esp)
10be07: e8 2c 00 00 00 call 10be38 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10be0c: 85 c0 test %eax,%eax
10be0e: 75 10 jne 10be20 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10be10: 46 inc %esi
10be11: 83 c3 1c add $0x1c,%ebx
10be14: 39 fe cmp %edi,%esi
10be16: 75 ac jne 10bdc4 <_RTEMS_tasks_Initialize_user_tasks_body+0x24><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10be18: 83 c4 3c add $0x3c,%esp
10be1b: 5b pop %ebx
10be1c: 5e pop %esi
10be1d: 5f pop %edi
10be1e: 5d pop %ebp
10be1f: c3 ret
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
10be20: 89 44 24 08 mov %eax,0x8(%esp)
10be24: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10be2b: 00
10be2c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10be33: e8 d4 0d 00 00 call 10cc0c <_Internal_error_Occurred>
00111258 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
111258: 8b 44 24 04 mov 0x4(%esp),%eax
11125c: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
111262: 85 c0 test %eax,%eax
111264: 74 15 je 11127b <_RTEMS_tasks_Switch_extension+0x23>
111266: 66 90 xchg %ax,%ax
tvp->tval = *tvp->ptr;
111268: 8b 50 04 mov 0x4(%eax),%edx
11126b: 8b 0a mov (%edx),%ecx
11126d: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
111270: 8b 48 08 mov 0x8(%eax),%ecx
111273: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111275: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
111277: 85 c0 test %eax,%eax
111279: 75 ed jne 111268 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
11127b: 8b 44 24 08 mov 0x8(%esp),%eax
11127f: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
111285: 85 c0 test %eax,%eax
111287: 74 17 je 1112a0 <_RTEMS_tasks_Switch_extension+0x48>
111289: 8d 76 00 lea 0x0(%esi),%esi
tvp->gval = *tvp->ptr;
11128c: 8b 50 04 mov 0x4(%eax),%edx
11128f: 8b 0a mov (%edx),%ecx
111291: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
111294: 8b 48 0c mov 0xc(%eax),%ecx
111297: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111299: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
11129b: 85 c0 test %eax,%eax
11129d: 75 ed jne 11128c <_RTEMS_tasks_Switch_extension+0x34><== NEVER TAKEN
11129f: c3 ret
1112a0: c3 ret
001382b0 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
1382b0: 55 push %ebp
1382b1: 57 push %edi
1382b2: 56 push %esi
1382b3: 53 push %ebx
1382b4: 83 ec 2c sub $0x2c,%esp
1382b7: 8b 74 24 40 mov 0x40(%esp),%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
1382bb: 8b 7e 40 mov 0x40(%esi),%edi
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
1382be: 8d 44 24 18 lea 0x18(%esp),%eax
1382c2: 89 04 24 mov %eax,(%esp)
1382c5: e8 e2 b8 fd ff call 113bac <_TOD_Get_uptime>
_Timestamp_Subtract(
1382ca: 8b 44 24 18 mov 0x18(%esp),%eax
1382ce: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
1382d2: 89 c1 mov %eax,%ecx
1382d4: 89 d3 mov %edx,%ebx
1382d6: 2b 4e 4c sub 0x4c(%esi),%ecx
1382d9: 1b 5e 50 sbb 0x50(%esi),%ebx
1382dc: 8b 6c 24 44 mov 0x44(%esp),%ebp
1382e0: 89 4d 00 mov %ecx,0x0(%ebp)
1382e3: 89 5d 04 mov %ebx,0x4(%ebp)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
1382e6: 8b 8f 80 00 00 00 mov 0x80(%edi),%ecx
1382ec: 8b 9f 84 00 00 00 mov 0x84(%edi),%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
1382f2: 39 3d 2c c4 17 00 cmp %edi,0x17c42c
1382f8: 74 0a je 138304 <_Rate_monotonic_Get_status+0x54>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
1382fa: b0 01 mov $0x1,%al
}
1382fc: 83 c4 2c add $0x2c,%esp
1382ff: 5b pop %ebx
138300: 5e pop %esi
138301: 5f pop %edi
138302: 5d pop %ebp
138303: c3 ret
138304: 2b 05 3c c4 17 00 sub 0x17c43c,%eax
13830a: 1b 15 40 c4 17 00 sbb 0x17c440,%edx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
138310: 01 c8 add %ecx,%eax
138312: 11 da adc %ebx,%edx
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
138314: 8b 4e 44 mov 0x44(%esi),%ecx
138317: 8b 5e 48 mov 0x48(%esi),%ebx
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
13831a: 39 d3 cmp %edx,%ebx
13831c: 7f 06 jg 138324 <_Rate_monotonic_Get_status+0x74><== NEVER TAKEN
13831e: 7c 08 jl 138328 <_Rate_monotonic_Get_status+0x78>
138320: 39 c1 cmp %eax,%ecx
138322: 76 04 jbe 138328 <_Rate_monotonic_Get_status+0x78>
return false;
138324: 31 c0 xor %eax,%eax
138326: eb d4 jmp 1382fc <_Rate_monotonic_Get_status+0x4c>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
138328: 29 c8 sub %ecx,%eax
13832a: 19 da sbb %ebx,%edx
13832c: 8b 4c 24 48 mov 0x48(%esp),%ecx
138330: 89 01 mov %eax,(%ecx)
138332: 89 51 04 mov %edx,0x4(%ecx)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
138335: b0 01 mov $0x1,%al
}
138337: 83 c4 2c add $0x2c,%esp
13833a: 5b pop %ebx
13833b: 5e pop %esi
13833c: 5f pop %edi
13833d: 5d pop %ebp
13833e: c3 ret
00138640 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
138640: 83 ec 3c sub $0x3c,%esp
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
138643: 8d 44 24 2c lea 0x2c(%esp),%eax
138647: 89 44 24 08 mov %eax,0x8(%esp)
13864b: 8b 44 24 40 mov 0x40(%esp),%eax
13864f: 89 44 24 04 mov %eax,0x4(%esp)
138653: c7 04 24 60 ca 17 00 movl $0x17ca60,(%esp)
13865a: e8 49 48 fd ff call 10cea8 <_Objects_Get>
switch ( location ) {
13865f: 8b 54 24 2c mov 0x2c(%esp),%edx
138663: 85 d2 test %edx,%edx
138665: 75 2e jne 138695 <_Rate_monotonic_Timeout+0x55><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
138667: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
13866a: f6 42 11 40 testb $0x40,0x11(%edx)
13866e: 74 08 je 138678 <_Rate_monotonic_Timeout+0x38>
138670: 8b 48 08 mov 0x8(%eax),%ecx
138673: 39 4a 20 cmp %ecx,0x20(%edx)
138676: 74 58 je 1386d0 <_Rate_monotonic_Timeout+0x90>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
138678: 83 78 38 01 cmpl $0x1,0x38(%eax)
13867c: 74 1e je 13869c <_Rate_monotonic_Timeout+0x5c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
13867e: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
138685: a1 a4 be 17 00 mov 0x17bea4,%eax
13868a: 48 dec %eax
13868b: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
138690: a1 a4 be 17 00 mov 0x17bea4,%eax
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
138695: 83 c4 3c add $0x3c,%esp
138698: c3 ret
138699: 8d 76 00 lea 0x0(%esi),%esi
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
13869c: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
1386a3: 89 04 24 mov %eax,(%esp)
1386a6: 89 44 24 1c mov %eax,0x1c(%esp)
1386aa: e8 71 fd ff ff call 138420 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1386af: 8b 44 24 1c mov 0x1c(%esp),%eax
1386b3: 8b 50 3c mov 0x3c(%eax),%edx
1386b6: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
1386b9: 83 c0 10 add $0x10,%eax
1386bc: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1386c0: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
1386c7: e8 40 60 fd ff call 10e70c <_Watchdog_Insert>
1386cc: eb b7 jmp 138685 <_Rate_monotonic_Timeout+0x45>
1386ce: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
1386d0: c7 44 24 04 f8 ff 03 movl $0x1003fff8,0x4(%esp)
1386d7: 10
1386d8: 89 14 24 mov %edx,(%esp)
1386db: 89 44 24 1c mov %eax,0x1c(%esp)
1386df: e8 64 50 fd ff call 10d748 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
1386e4: 8b 44 24 1c mov 0x1c(%esp),%eax
1386e8: 89 04 24 mov %eax,(%esp)
1386eb: eb bd jmp 1386aa <_Rate_monotonic_Timeout+0x6a>
00138340 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
138340: 56 push %esi
138341: 53 push %ebx
138342: 83 ec 24 sub $0x24,%esp
138345: 89 c6 mov %eax,%esi
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
138347: ff 40 54 incl 0x54(%eax)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
13834a: 83 78 38 04 cmpl $0x4,0x38(%eax)
13834e: 0f 84 a0 00 00 00 je 1383f4 <_Rate_monotonic_Update_statistics+0xb4>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
138354: 8d 44 24 10 lea 0x10(%esp),%eax
138358: 89 44 24 08 mov %eax,0x8(%esp)
13835c: 8d 44 24 18 lea 0x18(%esp),%eax
138360: 89 44 24 04 mov %eax,0x4(%esp)
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
138364: 89 34 24 mov %esi,(%esp)
138367: e8 44 ff ff ff call 1382b0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
13836c: 84 c0 test %al,%al
13836e: 74 3c je 1383ac <_Rate_monotonic_Update_statistics+0x6c>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
138370: 8b 4c 24 10 mov 0x10(%esp),%ecx
138374: 8b 5c 24 14 mov 0x14(%esp),%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
138378: 01 4e 6c add %ecx,0x6c(%esi)
13837b: 11 5e 70 adc %ebx,0x70(%esi)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
13837e: 3b 5e 60 cmp 0x60(%esi),%ebx
138381: 7e 59 jle 1383dc <_Rate_monotonic_Update_statistics+0x9c><== ALWAYS TAKEN
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
138383: 3b 5e 68 cmp 0x68(%esi),%ebx
138386: 7d 61 jge 1383e9 <_Rate_monotonic_Update_statistics+0xa9><== ALWAYS TAKEN
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
138388: 8b 4c 24 18 mov 0x18(%esp),%ecx
13838c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
138390: 01 8e 84 00 00 00 add %ecx,0x84(%esi)
138396: 11 9e 88 00 00 00 adc %ebx,0x88(%esi)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
13839c: 3b 5e 78 cmp 0x78(%esi),%ebx
13839f: 7e 27 jle 1383c8 <_Rate_monotonic_Update_statistics+0x88><== ALWAYS TAKEN
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383a1: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
1383a7: 7d 0b jge 1383b4 <_Rate_monotonic_Update_statistics+0x74>
1383a9: 8d 76 00 lea 0x0(%esi),%esi
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
1383ac: 83 c4 24 add $0x24,%esp
1383af: 5b pop %ebx
1383b0: 5e pop %esi
1383b1: c3 ret
1383b2: 66 90 xchg %ax,%ax
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383b4: 7e 62 jle 138418 <_Rate_monotonic_Update_statistics+0xd8><== ALWAYS TAKEN
stats->max_wall_time = since_last_period;
1383b6: 89 4e 7c mov %ecx,0x7c(%esi)
1383b9: 89 9e 80 00 00 00 mov %ebx,0x80(%esi)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
1383bf: 83 c4 24 add $0x24,%esp
1383c2: 5b pop %ebx
1383c3: 5e pop %esi
1383c4: c3 ret
1383c5: 8d 76 00 lea 0x0(%esi),%esi
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
1383c8: 7d 46 jge 138410 <_Rate_monotonic_Update_statistics+0xd0>
stats->min_wall_time = since_last_period;
1383ca: 89 4e 74 mov %ecx,0x74(%esi)
1383cd: 89 5e 78 mov %ebx,0x78(%esi)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
1383d0: 3b 9e 80 00 00 00 cmp 0x80(%esi),%ebx
1383d6: 7c d4 jl 1383ac <_Rate_monotonic_Update_statistics+0x6c>
1383d8: eb da jmp 1383b4 <_Rate_monotonic_Update_statistics+0x74>
1383da: 66 90 xchg %ax,%ax
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
1383dc: 7d 26 jge 138404 <_Rate_monotonic_Update_statistics+0xc4>
stats->min_cpu_time = executed;
1383de: 89 4e 5c mov %ecx,0x5c(%esi)
1383e1: 89 5e 60 mov %ebx,0x60(%esi)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
1383e4: 3b 5e 68 cmp 0x68(%esi),%ebx
1383e7: 7c 9f jl 138388 <_Rate_monotonic_Update_statistics+0x48><== NEVER TAKEN
1383e9: 7e 11 jle 1383fc <_Rate_monotonic_Update_statistics+0xbc><== ALWAYS TAKEN
stats->max_cpu_time = executed;
1383eb: 89 4e 64 mov %ecx,0x64(%esi)
1383ee: 89 5e 68 mov %ebx,0x68(%esi)
1383f1: eb 95 jmp 138388 <_Rate_monotonic_Update_statistics+0x48>
1383f3: 90 nop
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
1383f4: ff 40 58 incl 0x58(%eax)
1383f7: e9 58 ff ff ff jmp 138354 <_Rate_monotonic_Update_statistics+0x14>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
1383fc: 3b 4e 64 cmp 0x64(%esi),%ecx
1383ff: 76 87 jbe 138388 <_Rate_monotonic_Update_statistics+0x48>
138401: eb e8 jmp 1383eb <_Rate_monotonic_Update_statistics+0xab>
138403: 90 nop
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
138404: 3b 4e 5c cmp 0x5c(%esi),%ecx
138407: 0f 83 76 ff ff ff jae 138383 <_Rate_monotonic_Update_statistics+0x43>
13840d: eb cf jmp 1383de <_Rate_monotonic_Update_statistics+0x9e>
13840f: 90 nop
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
138410: 3b 4e 74 cmp 0x74(%esi),%ecx
138413: 73 8c jae 1383a1 <_Rate_monotonic_Update_statistics+0x61>
138415: eb b3 jmp 1383ca <_Rate_monotonic_Update_statistics+0x8a>
138417: 90 nop
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
138418: 3b 4e 7c cmp 0x7c(%esi),%ecx
13841b: 76 8f jbe 1383ac <_Rate_monotonic_Update_statistics+0x6c>
13841d: eb 97 jmp 1383b6 <_Rate_monotonic_Update_statistics+0x76>
0010de10 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
10de10: 53 push %ebx
10de11: 83 ec 18 sub $0x18,%esp
10de14: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
10de18: c7 04 24 1c 00 00 00 movl $0x1c,(%esp)
10de1f: e8 b0 17 00 00 call 10f5d4 <_Workspace_Allocate>
if ( sched ) {
10de24: 85 c0 test %eax,%eax
10de26: 74 16 je 10de3e <_Scheduler_CBS_Allocate+0x2e><== NEVER TAKEN
the_thread->scheduler_info = sched;
10de28: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
10de2e: 89 18 mov %ebx,(%eax)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10de30: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
schinfo->cbs_server = NULL;
10de37: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
}
return sched;
}
10de3e: 83 c4 18 add $0x18,%esp
10de41: 5b pop %ebx
10de42: c3 ret
0010f430 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
10f430: 53 push %ebx
10f431: 83 ec 28 sub $0x28,%esp
10f434: 8b 5c 24 30 mov 0x30(%esp),%ebx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10f438: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
if ( the_thread->real_priority != new_priority )
10f43e: 39 43 18 cmp %eax,0x18(%ebx)
10f441: 74 03 je 10f446 <_Scheduler_CBS_Budget_callout+0x16><== NEVER TAKEN
the_thread->real_priority = new_priority;
10f443: 89 43 18 mov %eax,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10f446: 39 43 14 cmp %eax,0x14(%ebx)
10f449: 74 14 je 10f45f <_Scheduler_CBS_Budget_callout+0x2f><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
10f44b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10f452: 00
10f453: 89 44 24 04 mov %eax,0x4(%esp)
10f457: 89 1c 24 mov %ebx,(%esp)
10f45a: e8 e9 04 00 00 call 10f948 <_Thread_Change_priority>
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
10f45f: 8b 9b 88 00 00 00 mov 0x88(%ebx),%ebx
if ( sched_info->cbs_server->cbs_budget_overrun ) {
10f465: 8b 43 18 mov 0x18(%ebx),%eax
10f468: 8b 50 0c mov 0xc(%eax),%edx
10f46b: 85 d2 test %edx,%edx
10f46d: 74 1f je 10f48e <_Scheduler_CBS_Budget_callout+0x5e><== NEVER TAKEN
_Scheduler_CBS_Get_server_id(
10f46f: 8d 54 24 1c lea 0x1c(%esp),%edx
10f473: 89 54 24 04 mov %edx,0x4(%esp)
10f477: 8b 00 mov (%eax),%eax
10f479: 89 04 24 mov %eax,(%esp)
10f47c: e8 73 ff ff ff call 10f3f4 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
10f481: 8b 43 18 mov 0x18(%ebx),%eax
10f484: 8b 54 24 1c mov 0x1c(%esp),%edx
10f488: 89 14 24 mov %edx,(%esp)
10f48b: ff 50 0c call *0xc(%eax)
}
}
10f48e: 83 c4 28 add $0x28,%esp
10f491: 5b pop %ebx
10f492: c3 ret
0010f058 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
10f058: 53 push %ebx
10f059: 83 ec 18 sub $0x18,%esp
10f05c: a1 24 62 13 00 mov 0x136224,%eax
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f061: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f067: 31 db xor %ebx,%ebx
10f069: 85 c9 test %ecx,%ecx
10f06b: 74 20 je 10f08d <_Scheduler_CBS_Cleanup+0x35><== NEVER TAKEN
10f06d: 8d 76 00 lea 0x0(%esi),%esi
if ( _Scheduler_CBS_Server_list[ i ] )
10f070: 8b 14 98 mov (%eax,%ebx,4),%edx
10f073: 85 d2 test %edx,%edx
10f075: 74 0d je 10f084 <_Scheduler_CBS_Cleanup+0x2c>
_Scheduler_CBS_Destroy_server( i );
10f077: 89 1c 24 mov %ebx,(%esp)
10f07a: e8 d1 00 00 00 call 10f150 <_Scheduler_CBS_Destroy_server>
10f07f: a1 24 62 13 00 mov 0x136224,%eax
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f084: 43 inc %ebx
10f085: 39 1d fc 17 13 00 cmp %ebx,0x1317fc
10f08b: 77 e3 ja 10f070 <_Scheduler_CBS_Cleanup+0x18>
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
10f08d: 89 04 24 mov %eax,(%esp)
10f090: e8 db 1b 00 00 call 110c70 <_Workspace_Free>
return SCHEDULER_CBS_OK;
}
10f095: 31 c0 xor %eax,%eax
10f097: 83 c4 18 add $0x18,%esp
10f09a: 5b pop %ebx
10f09b: c3 ret
0010f09c <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
10f09c: 57 push %edi
10f09d: 56 push %esi
10f09e: 53 push %ebx
10f09f: 83 ec 10 sub $0x10,%esp
10f0a2: 8b 74 24 20 mov 0x20(%esp),%esi
10f0a6: 8b 5c 24 28 mov 0x28(%esp),%ebx
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
10f0aa: 8b 46 04 mov 0x4(%esi),%eax
10f0ad: 85 c0 test %eax,%eax
10f0af: 0f 8e 8d 00 00 00 jle 10f142 <_Scheduler_CBS_Create_server+0xa6>
10f0b5: 8b 06 mov (%esi),%eax
10f0b7: 85 c0 test %eax,%eax
10f0b9: 0f 8e 83 00 00 00 jle 10f142 <_Scheduler_CBS_Create_server+0xa6>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f0bf: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f0c5: 85 c9 test %ecx,%ecx
10f0c7: 74 1f je 10f0e8 <_Scheduler_CBS_Create_server+0x4c><== NEVER TAKEN
if ( !_Scheduler_CBS_Server_list[i] )
10f0c9: 8b 15 24 62 13 00 mov 0x136224,%edx
10f0cf: 8b 02 mov (%edx),%eax
10f0d1: 85 c0 test %eax,%eax
10f0d3: 74 67 je 10f13c <_Scheduler_CBS_Create_server+0xa0>
10f0d5: 31 c0 xor %eax,%eax
10f0d7: eb 0a jmp 10f0e3 <_Scheduler_CBS_Create_server+0x47>
10f0d9: 8d 76 00 lea 0x0(%esi),%esi
10f0dc: 8b 3c 82 mov (%edx,%eax,4),%edi
10f0df: 85 ff test %edi,%edi
10f0e1: 74 11 je 10f0f4 <_Scheduler_CBS_Create_server+0x58>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f0e3: 40 inc %eax
10f0e4: 39 c8 cmp %ecx,%eax
10f0e6: 75 f4 jne 10f0dc <_Scheduler_CBS_Create_server+0x40>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
10f0e8: b8 e6 ff ff ff mov $0xffffffe6,%eax
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
10f0ed: 83 c4 10 add $0x10,%esp
10f0f0: 5b pop %ebx
10f0f1: 5e pop %esi
10f0f2: 5f pop %edi
10f0f3: c3 ret
10f0f4: 8d 3c 85 00 00 00 00 lea 0x0(,%eax,4),%edi
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
10f0fb: 89 03 mov %eax,(%ebx)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10f0fd: 01 d7 add %edx,%edi
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
10f0ff: c7 04 24 10 00 00 00 movl $0x10,(%esp)
10f106: e8 39 1b 00 00 call 110c44 <_Workspace_Allocate>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
10f10b: 89 07 mov %eax,(%edi)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
10f10d: 8b 13 mov (%ebx),%edx
10f10f: a1 24 62 13 00 mov 0x136224,%eax
10f114: 8b 0c 90 mov (%eax,%edx,4),%ecx
if ( !the_server )
10f117: 85 c9 test %ecx,%ecx
10f119: 74 2e je 10f149 <_Scheduler_CBS_Create_server+0xad><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
10f11b: 8b 06 mov (%esi),%eax
10f11d: 8b 56 04 mov 0x4(%esi),%edx
10f120: 89 41 04 mov %eax,0x4(%ecx)
10f123: 89 51 08 mov %edx,0x8(%ecx)
the_server->task_id = -1;
10f126: c7 01 ff ff ff ff movl $0xffffffff,(%ecx)
the_server->cbs_budget_overrun = budget_overrun_callback;
10f12c: 8b 44 24 24 mov 0x24(%esp),%eax
10f130: 89 41 0c mov %eax,0xc(%ecx)
return SCHEDULER_CBS_OK;
10f133: 31 c0 xor %eax,%eax
}
10f135: 83 c4 10 add $0x10,%esp
10f138: 5b pop %ebx
10f139: 5e pop %esi
10f13a: 5f pop %edi
10f13b: c3 ret
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
10f13c: 31 ff xor %edi,%edi
10f13e: 31 c0 xor %eax,%eax
10f140: eb b9 jmp 10f0fb <_Scheduler_CBS_Create_server+0x5f>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10f142: b8 ee ff ff ff mov $0xffffffee,%eax
10f147: eb a4 jmp 10f0ed <_Scheduler_CBS_Create_server+0x51>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10f149: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f14e: eb 9d jmp 10f0ed <_Scheduler_CBS_Create_server+0x51><== NOT EXECUTED
0010f1c8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
10f1c8: 56 push %esi
10f1c9: 53 push %ebx
10f1ca: 83 ec 34 sub $0x34,%esp
10f1cd: 8b 74 24 40 mov 0x40(%esp),%esi
10f1d1: 8b 5c 24 44 mov 0x44(%esp),%ebx
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
10f1d5: 8d 44 24 2c lea 0x2c(%esp),%eax
10f1d9: 89 44 24 04 mov %eax,0x4(%esp)
10f1dd: 89 1c 24 mov %ebx,(%esp)
10f1e0: e8 ef 0b 00 00 call 10fdd4 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
10f1e5: 85 c0 test %eax,%eax
10f1e7: 74 5f je 10f248 <_Scheduler_CBS_Detach_thread+0x80>
_Thread_Enable_dispatch();
10f1e9: 89 44 24 1c mov %eax,0x1c(%esp)
10f1ed: e8 c2 0b 00 00 call 10fdb4 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
10f1f2: 3b 35 fc 17 13 00 cmp 0x1317fc,%esi
10f1f8: 8b 44 24 1c mov 0x1c(%esp),%eax
10f1fc: 73 4a jae 10f248 <_Scheduler_CBS_Detach_thread+0x80>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
10f1fe: 8b 15 24 62 13 00 mov 0x136224,%edx
10f204: 8b 14 b2 mov (%edx,%esi,4),%edx
10f207: 85 d2 test %edx,%edx
10f209: 74 48 je 10f253 <_Scheduler_CBS_Detach_thread+0x8b>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
10f20b: 39 1a cmp %ebx,(%edx)
10f20d: 75 39 jne 10f248 <_Scheduler_CBS_Detach_thread+0x80><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
10f20f: c7 02 ff ff ff ff movl $0xffffffff,(%edx)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
10f215: 8b 90 88 00 00 00 mov 0x88(%eax),%edx
10f21b: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
10f222: 8b 90 a0 00 00 00 mov 0xa0(%eax),%edx
10f228: 89 50 78 mov %edx,0x78(%eax)
the_thread->budget_callout = the_thread->Start.budget_callout;
10f22b: 8b 90 a4 00 00 00 mov 0xa4(%eax),%edx
10f231: 89 50 7c mov %edx,0x7c(%eax)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
10f234: 8a 90 9c 00 00 00 mov 0x9c(%eax),%dl
10f23a: 88 50 70 mov %dl,0x70(%eax)
return SCHEDULER_CBS_OK;
10f23d: 31 c0 xor %eax,%eax
}
10f23f: 83 c4 34 add $0x34,%esp
10f242: 5b pop %ebx
10f243: 5e pop %esi
10f244: c3 ret
10f245: 8d 76 00 lea 0x0(%esi),%esi
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
10f248: b8 ee ff ff ff mov $0xffffffee,%eax
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
10f24d: 83 c4 34 add $0x34,%esp
10f250: 5b pop %ebx
10f251: 5e pop %esi
10f252: c3 ret
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
10f253: b8 e7 ff ff ff mov $0xffffffe7,%eax
10f258: eb e5 jmp 10f23f <_Scheduler_CBS_Detach_thread+0x77>
0010f3f4 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
10f3f4: 56 push %esi
10f3f5: 53 push %ebx
10f3f6: 8b 74 24 0c mov 0xc(%esp),%esi
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f3fa: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f400: 85 c9 test %ecx,%ecx
10f402: 74 18 je 10f41c <_Scheduler_CBS_Get_server_id+0x28><== NEVER TAKEN
10f404: 8b 1d 24 62 13 00 mov 0x136224,%ebx
10f40a: 31 c0 xor %eax,%eax
if ( _Scheduler_CBS_Server_list[i] &&
10f40c: 8b 14 83 mov (%ebx,%eax,4),%edx
10f40f: 85 d2 test %edx,%edx
10f411: 74 04 je 10f417 <_Scheduler_CBS_Get_server_id+0x23>
10f413: 39 32 cmp %esi,(%edx)
10f415: 74 0d je 10f424 <_Scheduler_CBS_Get_server_id+0x30>
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
10f417: 40 inc %eax
10f418: 39 c8 cmp %ecx,%eax
10f41a: 75 f0 jne 10f40c <_Scheduler_CBS_Get_server_id+0x18>
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
10f41c: b8 e7 ff ff ff mov $0xffffffe7,%eax
}
10f421: 5b pop %ebx
10f422: 5e pop %esi
10f423: c3 ret
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
10f424: 8b 54 24 10 mov 0x10(%esp),%edx
10f428: 89 02 mov %eax,(%edx)
return SCHEDULER_CBS_OK;
10f42a: 31 c0 xor %eax,%eax
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
}
10f42c: 5b pop %ebx
10f42d: 5e pop %esi
10f42e: c3 ret
0010f494 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
10f494: 83 ec 1c sub $0x1c,%esp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
10f497: a1 fc 17 13 00 mov 0x1317fc,%eax
10f49c: c1 e0 02 shl $0x2,%eax
10f49f: 89 04 24 mov %eax,(%esp)
10f4a2: e8 9d 17 00 00 call 110c44 <_Workspace_Allocate>
10f4a7: a3 24 62 13 00 mov %eax,0x136224
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
10f4ac: 85 c0 test %eax,%eax
10f4ae: 74 27 je 10f4d7 <_Scheduler_CBS_Initialize+0x43><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10f4b0: 8b 0d fc 17 13 00 mov 0x1317fc,%ecx
10f4b6: 31 d2 xor %edx,%edx
10f4b8: 85 c9 test %ecx,%ecx
10f4ba: 75 09 jne 10f4c5 <_Scheduler_CBS_Initialize+0x31><== ALWAYS TAKEN
10f4bc: eb 13 jmp 10f4d1 <_Scheduler_CBS_Initialize+0x3d><== NOT EXECUTED
10f4be: 66 90 xchg %ax,%ax <== NOT EXECUTED
10f4c0: a1 24 62 13 00 mov 0x136224,%eax
_Scheduler_CBS_Server_list[i] = NULL;
10f4c5: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
10f4cc: 42 inc %edx
10f4cd: 39 ca cmp %ecx,%edx
10f4cf: 75 ef jne 10f4c0 <_Scheduler_CBS_Initialize+0x2c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
10f4d1: 31 c0 xor %eax,%eax
}
10f4d3: 83 c4 1c add $0x1c,%esp
10f4d6: c3 ret
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
10f4d7: b8 ef ff ff ff mov $0xffffffef,%eax <== NOT EXECUTED
10f4dc: eb f5 jmp 10f4d3 <_Scheduler_CBS_Initialize+0x3f><== NOT EXECUTED
0010de44 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
10de44: 83 ec 1c sub $0x1c,%esp
10de47: 8b 44 24 20 mov 0x20(%esp),%eax
10de4b: 8b 54 24 24 mov 0x24(%esp),%edx
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
10de4f: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
10de55: 8b 49 18 mov 0x18(%ecx),%ecx
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
10de58: 85 d2 test %edx,%edx
10de5a: 74 34 je 10de90 <_Scheduler_CBS_Release_job+0x4c>
/* Initializing or shifting deadline. */
if (serv_info)
10de5c: 85 c9 test %ecx,%ecx
10de5e: 74 3c je 10de9c <_Scheduler_CBS_Release_job+0x58>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
10de60: 8b 15 e4 3c 13 00 mov 0x133ce4,%edx
10de66: 03 51 04 add 0x4(%ecx),%edx
10de69: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
10de6f: 8b 49 08 mov 0x8(%ecx),%ecx
10de72: 89 48 74 mov %ecx,0x74(%eax)
the_thread->real_priority = new_priority;
10de75: 89 50 18 mov %edx,0x18(%eax)
_Thread_Change_priority(the_thread, new_priority, true);
10de78: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10de7f: 00
10de80: 89 54 24 04 mov %edx,0x4(%esp)
10de84: 89 04 24 mov %eax,(%esp)
10de87: e8 dc 03 00 00 call 10e268 <_Thread_Change_priority>
}
10de8c: 83 c4 1c add $0x1c,%esp
10de8f: c3 ret
new_priority = (_Watchdog_Ticks_since_boot + deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
10de90: 8b 90 ac 00 00 00 mov 0xac(%eax),%edx
}
/* Budget replenishment for the next job. */
if (serv_info)
10de96: 85 c9 test %ecx,%ecx
10de98: 75 d5 jne 10de6f <_Scheduler_CBS_Release_job+0x2b><== ALWAYS TAKEN
10de9a: eb d9 jmp 10de75 <_Scheduler_CBS_Release_job+0x31><== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
10de9c: 8b 0d e4 3c 13 00 mov 0x133ce4,%ecx
10dea2: 01 ca add %ecx,%edx
10dea4: 81 e2 ff ff ff 7f and $0x7fffffff,%edx
10deaa: eb c9 jmp 10de75 <_Scheduler_CBS_Release_job+0x31>
0010deac <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
10deac: 56 push %esi
10dead: 53 push %ebx
10deae: 83 ec 14 sub $0x14,%esp
10deb1: 8b 5c 24 20 mov 0x20(%esp),%ebx
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
10deb5: 89 1c 24 mov %ebx,(%esp)
10deb8: e8 e3 00 00 00 call 10dfa0 <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
10debd: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax
10dec3: 8b 40 18 mov 0x18(%eax),%eax
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
10dec6: 85 c0 test %eax,%eax
10dec8: 74 46 je 10df10 <_Scheduler_CBS_Unblock+0x64>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
10deca: 8b 4b 18 mov 0x18(%ebx),%ecx
10decd: 8b 15 e4 3c 13 00 mov 0x133ce4,%edx
10ded3: 89 ce mov %ecx,%esi
10ded5: 29 d6 sub %edx,%esi
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
10ded7: 8b 50 04 mov 0x4(%eax),%edx
10deda: 0f af d6 imul %esi,%edx
10dedd: 8b 40 08 mov 0x8(%eax),%eax
10dee0: 0f af 43 74 imul 0x74(%ebx),%eax
10dee4: 39 c2 cmp %eax,%edx
10dee6: 7e 28 jle 10df10 <_Scheduler_CBS_Unblock+0x64>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
10dee8: 8b 93 ac 00 00 00 mov 0xac(%ebx),%edx
if ( the_thread->real_priority != new_priority )
10deee: 39 d1 cmp %edx,%ecx
10def0: 74 03 je 10def5 <_Scheduler_CBS_Unblock+0x49>
the_thread->real_priority = new_priority;
10def2: 89 53 18 mov %edx,0x18(%ebx)
if ( the_thread->current_priority != new_priority )
10def5: 8b 43 14 mov 0x14(%ebx),%eax
10def8: 39 d0 cmp %edx,%eax
10defa: 74 17 je 10df13 <_Scheduler_CBS_Unblock+0x67>
_Thread_Change_priority(the_thread, new_priority, true);
10defc: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10df03: 00
10df04: 89 54 24 04 mov %edx,0x4(%esp)
10df08: 89 1c 24 mov %ebx,(%esp)
10df0b: e8 58 03 00 00 call 10e268 <_Thread_Change_priority>
10df10: 8b 43 14 mov 0x14(%ebx),%eax
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
10df13: 8b 15 70 41 13 00 mov 0x134170,%edx
10df19: 8b 52 14 mov 0x14(%edx),%edx
10df1c: 89 54 24 04 mov %edx,0x4(%esp)
10df20: 89 04 24 mov %eax,(%esp)
10df23: ff 15 90 f7 12 00 call *0x12f790
10df29: 85 c0 test %eax,%eax
10df2b: 7e 18 jle 10df45 <_Scheduler_CBS_Unblock+0x99>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
10df2d: 89 1d 70 41 13 00 mov %ebx,0x134170
if ( _Thread_Executing->is_preemptible ||
10df33: a1 6c 41 13 00 mov 0x13416c,%eax
10df38: 80 78 70 00 cmpb $0x0,0x70(%eax)
10df3c: 74 0e je 10df4c <_Scheduler_CBS_Unblock+0xa0>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10df3e: c6 05 78 41 13 00 01 movb $0x1,0x134178
}
}
10df45: 83 c4 14 add $0x14,%esp
10df48: 5b pop %ebx
10df49: 5e pop %esi
10df4a: c3 ret
10df4b: 90 nop
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10df4c: 8b 43 14 mov 0x14(%ebx),%eax
10df4f: 85 c0 test %eax,%eax
10df51: 74 eb je 10df3e <_Scheduler_CBS_Unblock+0x92><== NEVER TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10df53: 83 c4 14 add $0x14,%esp
10df56: 5b pop %ebx
10df57: 5e pop %esi
10df58: c3 ret
0010de10 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
10de10: 53 push %ebx
10de11: 83 ec 18 sub $0x18,%esp
10de14: 8b 5c 24 20 mov 0x20(%esp),%ebx
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
10de18: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10de1f: e8 34 17 00 00 call 10f558 <_Workspace_Allocate>
if ( sched ) {
10de24: 85 c0 test %eax,%eax
10de26: 74 0f je 10de37 <_Scheduler_EDF_Allocate+0x27><== NEVER TAKEN
the_thread->scheduler_info = sched;
10de28: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
10de2e: 89 18 mov %ebx,(%eax)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
10de30: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax)
}
return sched;
}
10de37: 83 c4 18 add $0x18,%esp
10de3a: 5b pop %ebx
10de3b: c3 ret
0010dfe4 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
10dfe4: 53 push %ebx
10dfe5: 83 ec 18 sub $0x18,%esp
10dfe8: 8b 5c 24 20 mov 0x20(%esp),%ebx
_Scheduler_EDF_Enqueue(the_thread);
10dfec: 89 1c 24 mov %ebx,(%esp)
10dfef: e8 8c fe ff ff call 10de80 <_Scheduler_EDF_Enqueue>
10dff4: 8b 43 14 mov 0x14(%ebx),%eax
10dff7: 89 44 24 04 mov %eax,0x4(%esp)
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
10dffb: a1 f0 40 13 00 mov 0x1340f0,%eax
10e000: 8b 40 14 mov 0x14(%eax),%eax
10e003: 89 04 24 mov %eax,(%esp)
10e006: ff 15 10 f7 12 00 call *0x12f710
10e00c: 85 c0 test %eax,%eax
10e00e: 78 08 js 10e018 <_Scheduler_EDF_Unblock+0x34>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
10e010: 83 c4 18 add $0x18,%esp
10e013: 5b pop %ebx
10e014: c3 ret
10e015: 8d 76 00 lea 0x0(%esi),%esi
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
10e018: 89 1d f0 40 13 00 mov %ebx,0x1340f0
if ( _Thread_Executing->is_preemptible ||
10e01e: a1 ec 40 13 00 mov 0x1340ec,%eax
10e023: 80 78 70 00 cmpb $0x0,0x70(%eax)
10e027: 74 0f je 10e038 <_Scheduler_EDF_Unblock+0x54>
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10e029: c6 05 f8 40 13 00 01 movb $0x1,0x1340f8
}
}
10e030: 83 c4 18 add $0x18,%esp
10e033: 5b pop %ebx
10e034: c3 ret
10e035: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10e038: 8b 43 14 mov 0x14(%ebx),%eax
10e03b: 85 c0 test %eax,%eax
10e03d: 75 d1 jne 10e010 <_Scheduler_EDF_Unblock+0x2c><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
10e03f: c6 05 f8 40 13 00 01 movb $0x1,0x1340f8 <== NOT EXECUTED
10e046: eb e8 jmp 10e030 <_Scheduler_EDF_Unblock+0x4c><== NOT EXECUTED
0010d57c <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10d57c: 53 push %ebx
10d57d: 8b 44 24 08 mov 0x8(%esp),%eax
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10d581: 8b 88 88 00 00 00 mov 0x88(%eax),%ecx
ready = sched_info->ready_chain;
10d587: 8b 11 mov (%ecx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
10d589: 8b 5a 08 mov 0x8(%edx),%ebx
10d58c: 39 1a cmp %ebx,(%edx)
10d58e: 74 28 je 10d5b8 <_Scheduler_priority_Block+0x3c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d590: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10d592: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10d595: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10d598: 89 0a mov %ecx,(%edx)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10d59a: 3b 05 d0 24 13 00 cmp 0x1324d0,%eax
10d5a0: 74 4a je 10d5ec <_Scheduler_priority_Block+0x70>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10d5a2: 3b 05 cc 24 13 00 cmp 0x1324cc,%eax
10d5a8: 74 02 je 10d5ac <_Scheduler_priority_Block+0x30>
_Thread_Dispatch_necessary = true;
}
10d5aa: 5b pop %ebx
10d5ab: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
10d5ac: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
}
10d5b3: 5b pop %ebx
10d5b4: c3 ret
10d5b5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10d5b8: 8d 5a 04 lea 0x4(%edx),%ebx
10d5bb: 89 1a mov %ebx,(%edx)
head->next = tail;
head->previous = NULL;
10d5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10d5c4: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10d5c7: 8b 59 04 mov 0x4(%ecx),%ebx
10d5ca: 66 8b 13 mov (%ebx),%dx
10d5cd: 66 23 51 0e and 0xe(%ecx),%dx
10d5d1: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
10d5d4: 66 85 d2 test %dx,%dx
10d5d7: 75 c1 jne 10d59a <_Scheduler_priority_Block+0x1e>
_Priority_Major_bit_map &= the_priority_map->block_major;
10d5d9: 66 8b 15 00 25 13 00 mov 0x132500,%dx
10d5e0: 23 51 0c and 0xc(%ecx),%edx
10d5e3: 66 89 15 00 25 13 00 mov %dx,0x132500
10d5ea: eb ae jmp 10d59a <_Scheduler_priority_Block+0x1e>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d5ec: 66 8b 1d 00 25 13 00 mov 0x132500,%bx
10d5f3: 31 d2 xor %edx,%edx
10d5f5: 89 d1 mov %edx,%ecx
10d5f7: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d5fb: 0f b7 c9 movzwl %cx,%ecx
10d5fe: 66 8b 9c 09 20 25 13 mov 0x132520(%ecx,%ecx,1),%bx
10d605: 00
10d606: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10d60a: c1 e1 04 shl $0x4,%ecx
10d60d: 0f b7 d2 movzwl %dx,%edx
10d610: 01 ca add %ecx,%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d612: 8d 0c 52 lea (%edx,%edx,2),%ecx
10d615: 8b 15 20 db 12 00 mov 0x12db20,%edx
10d61b: 8d 0c 8a lea (%edx,%ecx,4),%ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d61e: 8b 11 mov (%ecx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d620: 83 c1 04 add $0x4,%ecx
10d623: 39 ca cmp %ecx,%edx
10d625: 74 0b je 10d632 <_Scheduler_priority_Block+0xb6><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d627: 89 15 d0 24 13 00 mov %edx,0x1324d0
10d62d: e9 70 ff ff ff jmp 10d5a2 <_Scheduler_priority_Block+0x26>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d632: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d634: eb f1 jmp 10d627 <_Scheduler_priority_Block+0xab><== NOT EXECUTED
0010d794 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d794: 66 8b 0d 00 25 13 00 mov 0x132500,%cx
10d79b: 31 c0 xor %eax,%eax
10d79d: 89 c2 mov %eax,%edx
10d79f: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d7a3: 0f b7 d2 movzwl %dx,%edx
10d7a6: 66 8b 8c 12 20 25 13 mov 0x132520(%edx,%edx,1),%cx
10d7ad: 00
10d7ae: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d7b2: c1 e2 04 shl $0x4,%edx
10d7b5: 0f b7 c0 movzwl %ax,%eax
10d7b8: 01 d0 add %edx,%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d7ba: 8d 14 40 lea (%eax,%eax,2),%edx
10d7bd: a1 20 db 12 00 mov 0x12db20,%eax
10d7c2: 8d 14 90 lea (%eax,%edx,4),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10d7c5: 8b 02 mov (%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d7c7: 83 c2 04 add $0x4,%edx
10d7ca: 39 d0 cmp %edx,%eax
10d7cc: 74 06 je 10d7d4 <_Scheduler_priority_Schedule+0x40><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d7ce: a3 d0 24 13 00 mov %eax,0x1324d0
10d7d3: c3 ret
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d7d4: 31 c0 xor %eax,%eax
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d7d6: a3 d0 24 13 00 mov %eax,0x1324d0 <== NOT EXECUTED
10d7db: c3 ret <== NOT EXECUTED
0010d7dc <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
10d7dc: 53 push %ebx
10d7dd: 83 ec 18 sub $0x18,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10d7e0: 8b 1d cc 24 13 00 mov 0x1324cc,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10d7e6: 80 7b 70 00 cmpb $0x0,0x70(%ebx)
10d7ea: 74 1c je 10d808 <_Scheduler_priority_Tick+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10d7ec: 8b 43 10 mov 0x10(%ebx),%eax
10d7ef: 85 c0 test %eax,%eax
10d7f1: 75 15 jne 10d808 <_Scheduler_priority_Tick+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10d7f3: 8b 43 78 mov 0x78(%ebx),%eax
10d7f6: 83 f8 01 cmp $0x1,%eax
10d7f9: 72 0d jb 10d808 <_Scheduler_priority_Tick+0x2c>
10d7fb: 83 f8 02 cmp $0x2,%eax
10d7fe: 76 20 jbe 10d820 <_Scheduler_priority_Tick+0x44>
10d800: 83 f8 03 cmp $0x3,%eax
10d803: 74 0b je 10d810 <_Scheduler_priority_Tick+0x34><== ALWAYS TAKEN
10d805: 8d 76 00 lea 0x0(%esi),%esi
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10d808: 83 c4 18 add $0x18,%esp
10d80b: 5b pop %ebx
10d80c: c3 ret
10d80d: 8d 76 00 lea 0x0(%esi),%esi
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10d810: ff 4b 74 decl 0x74(%ebx)
10d813: 75 f3 jne 10d808 <_Scheduler_priority_Tick+0x2c>
(*executing->budget_callout)( executing );
10d815: 89 1c 24 mov %ebx,(%esp)
10d818: ff 53 7c call *0x7c(%ebx)
10d81b: eb eb jmp 10d808 <_Scheduler_priority_Tick+0x2c>
10d81d: 8d 76 00 lea 0x0(%esi),%esi
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 ) {
10d820: 8b 43 74 mov 0x74(%ebx),%eax
10d823: 48 dec %eax
10d824: 89 43 74 mov %eax,0x74(%ebx)
10d827: 85 c0 test %eax,%eax
10d829: 7f dd jg 10d808 <_Scheduler_priority_Tick+0x2c>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10d82b: ff 15 2c db 12 00 call *0x12db2c
* 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;
10d831: a1 18 1f 13 00 mov 0x131f18,%eax
10d836: 89 43 74 mov %eax,0x74(%ebx)
10d839: eb cd jmp 10d808 <_Scheduler_priority_Tick+0x2c>
0010df60 <_Scheduler_simple_Ready_queue_enqueue_first>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_enqueue_first(
Thread_Control *the_thread
)
{
10df60: 8b 4c 24 04 mov 0x4(%esp),%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10df64: a1 80 ec 12 00 mov 0x12ec80,%eax
10df69: 8b 00 mov (%eax),%eax
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10df6b: 8b 51 14 mov 0x14(%ecx),%edx
10df6e: 39 50 14 cmp %edx,0x14(%eax)
10df71: 73 08 jae 10df7b <_Scheduler_simple_Ready_queue_enqueue_first+0x1b>
10df73: 90 nop
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
10df74: 8b 00 mov (%eax),%eax
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
10df76: 39 50 14 cmp %edx,0x14(%eax)
10df79: 72 f9 jb 10df74 <_Scheduler_simple_Ready_queue_enqueue_first+0x14><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
10df7b: 8b 40 04 mov 0x4(%eax),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10df7e: 89 41 04 mov %eax,0x4(%ecx)
before_node = after_node->next;
10df81: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10df83: 89 08 mov %ecx,(%eax)
the_node->next = before_node;
10df85: 89 11 mov %edx,(%ecx)
before_node->previous = the_node;
10df87: 89 4a 04 mov %ecx,0x4(%edx)
10df8a: c3 ret
0010c4d8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c4d8: 8b 4c 24 04 mov 0x4(%esp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c4dc: b8 40 42 0f 00 mov $0xf4240,%eax
10c4e1: 31 d2 xor %edx,%edx
10c4e3: f7 35 90 f1 12 00 divl 0x12f190
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c4e9: 85 c9 test %ecx,%ecx
10c4eb: 74 47 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
10c4ed: 3b 41 18 cmp 0x18(%ecx),%eax
10c4f0: 76 42 jbe 10c534 <_TOD_Validate+0x5c>
(the_tod->ticks >= ticks_per_second) ||
10c4f2: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c4f6: 77 3c ja 10c534 <_TOD_Validate+0x5c>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c4f8: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c4fc: 77 36 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c4fe: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c502: 77 30 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c504: 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) ||
10c507: 85 c0 test %eax,%eax
10c509: 74 29 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->month == 0) ||
10c50b: 83 f8 0c cmp $0xc,%eax
10c50e: 77 24 ja 10c534 <_TOD_Validate+0x5c>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c510: 8b 11 mov (%ecx),%edx
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
10c512: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c518: 76 1a jbe 10c534 <_TOD_Validate+0x5c>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c51a: 8b 49 08 mov 0x8(%ecx),%ecx
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c51d: 85 c9 test %ecx,%ecx
10c51f: 74 13 je 10c534 <_TOD_Validate+0x5c> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c521: 83 e2 03 and $0x3,%edx
10c524: 75 11 jne 10c537 <_TOD_Validate+0x5f>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c526: 8b 04 85 14 4d 12 00 mov 0x124d14(,%eax,4),%eax
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
if ( the_tod->day > days_in_month )
10c52d: 39 c8 cmp %ecx,%eax
10c52f: 0f 93 c0 setae %al
10c532: c3 ret
10c533: 90 nop
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
10c534: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c536: c3 ret
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
10c537: 8b 04 85 e0 4c 12 00 mov 0x124ce0(,%eax,4),%eax
10c53e: eb ed jmp 10c52d <_TOD_Validate+0x55>
0010d9b8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d9b8: 57 push %edi
10d9b9: 56 push %esi
10d9ba: 53 push %ebx
10d9bb: 83 ec 20 sub $0x20,%esp
10d9be: 8b 5c 24 30 mov 0x30(%esp),%ebx
10d9c2: 8b 7c 24 34 mov 0x34(%esp),%edi
10d9c6: 8a 44 24 38 mov 0x38(%esp),%al
10d9ca: 88 44 24 1f mov %al,0x1f(%esp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10d9ce: 8b 73 10 mov 0x10(%ebx),%esi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10d9d1: 89 1c 24 mov %ebx,(%esp)
10d9d4: e8 cf 0c 00 00 call 10e6a8 <_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 )
10d9d9: 39 7b 14 cmp %edi,0x14(%ebx)
10d9dc: 74 0c je 10d9ea <_Thread_Change_priority+0x32>
_Thread_Set_priority( the_thread, new_priority );
10d9de: 89 7c 24 04 mov %edi,0x4(%esp)
10d9e2: 89 1c 24 mov %ebx,(%esp)
10d9e5: e8 72 0c 00 00 call 10e65c <_Thread_Set_priority>
_ISR_Disable( level );
10d9ea: 9c pushf
10d9eb: fa cli
10d9ec: 5f pop %edi
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
10d9ed: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d9f0: 83 f8 04 cmp $0x4,%eax
10d9f3: 74 23 je 10da18 <_Thread_Change_priority+0x60>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d9f5: 83 e6 04 and $0x4,%esi
10d9f8: 74 12 je 10da0c <_Thread_Change_priority+0x54><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d9fa: 57 push %edi
10d9fb: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d9fc: a9 e0 be 03 00 test $0x3bee0,%eax
10da01: 75 5d jne 10da60 <_Thread_Change_priority+0xa8>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10da03: 83 c4 20 add $0x20,%esp
10da06: 5b pop %ebx
10da07: 5e pop %esi
10da08: 5f pop %edi
10da09: c3 ret
10da0a: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10da0c: 89 c2 mov %eax,%edx
10da0e: 83 e2 fb and $0xfffffffb,%edx
10da11: 89 53 10 mov %edx,0x10(%ebx)
10da14: eb e4 jmp 10d9fa <_Thread_Change_priority+0x42>
10da16: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10da18: 83 e6 04 and $0x4,%esi
10da1b: 75 17 jne 10da34 <_Thread_Change_priority+0x7c><== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
10da1d: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10da24: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10da29: 89 1c 24 mov %ebx,(%esp)
10da2c: 74 4a je 10da78 <_Thread_Change_priority+0xc0>
10da2e: ff 15 48 db 12 00 call *0x12db48
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10da34: 57 push %edi
10da35: 9d popf
10da36: 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();
10da37: ff 15 28 db 12 00 call *0x12db28
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10da3d: a1 cc 24 13 00 mov 0x1324cc,%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() &&
10da42: 3b 05 d0 24 13 00 cmp 0x1324d0,%eax
10da48: 74 0d je 10da57 <_Thread_Change_priority+0x9f>
10da4a: 80 78 70 00 cmpb $0x0,0x70(%eax)
10da4e: 74 07 je 10da57 <_Thread_Change_priority+0x9f>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10da50: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
_ISR_Enable( level );
10da57: 57 push %edi
10da58: 9d popf
}
10da59: 83 c4 20 add $0x20,%esp
10da5c: 5b pop %ebx
10da5d: 5e pop %esi
10da5e: 5f pop %edi
10da5f: c3 ret
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10da60: 89 5c 24 34 mov %ebx,0x34(%esp)
10da64: 8b 43 44 mov 0x44(%ebx),%eax
10da67: 89 44 24 30 mov %eax,0x30(%esp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10da6b: 83 c4 20 add $0x20,%esp
10da6e: 5b pop %ebx
10da6f: 5e pop %esi
10da70: 5f pop %edi
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10da71: e9 3e 0b 00 00 jmp 10e5b4 <_Thread_queue_Requeue>
10da76: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10da78: ff 15 44 db 12 00 call *0x12db44
10da7e: eb b4 jmp 10da34 <_Thread_Change_priority+0x7c>
0010dc7c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dc7c: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dc7f: 8d 44 24 1c lea 0x1c(%esp),%eax
10dc83: 89 44 24 04 mov %eax,0x4(%esp)
10dc87: 8b 44 24 30 mov 0x30(%esp),%eax
10dc8b: 89 04 24 mov %eax,(%esp)
10dc8e: e8 b1 01 00 00 call 10de44 <_Thread_Get>
switch ( location ) {
10dc93: 8b 54 24 1c mov 0x1c(%esp),%edx
10dc97: 85 d2 test %edx,%edx
10dc99: 75 20 jne 10dcbb <_Thread_Delay_ended+0x3f><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10dc9b: c7 44 24 04 18 00 00 movl $0x10000018,0x4(%esp)
10dca2: 10
10dca3: 89 04 24 mov %eax,(%esp)
10dca6: e8 d5 fd ff ff call 10da80 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10dcab: a1 44 1f 13 00 mov 0x131f44,%eax
10dcb0: 48 dec %eax
10dcb1: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10dcb6: a1 44 1f 13 00 mov 0x131f44,%eax
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10dcbb: 83 c4 2c add $0x2c,%esp
10dcbe: c3 ret
0010dcc0 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10dcc0: 55 push %ebp
10dcc1: 57 push %edi
10dcc2: 56 push %esi
10dcc3: 53 push %ebx
10dcc4: 83 ec 2c sub $0x2c,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10dcc7: a1 44 1f 13 00 mov 0x131f44,%eax
10dccc: 40 inc %eax
10dccd: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10dcd2: a1 44 1f 13 00 mov 0x131f44,%eax
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
10dcd7: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
_ISR_Disable( level );
10dcdd: 9c pushf
10dcde: fa cli
10dcdf: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10dce0: 8a 15 d8 24 13 00 mov 0x1324d8,%dl
10dce6: 84 d2 test %dl,%dl
10dce8: 0f 84 16 01 00 00 je 10de04 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10dcee: 8b 2d d0 24 13 00 mov 0x1324d0,%ebp
_Thread_Dispatch_necessary = false;
10dcf4: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = heir;
10dcfb: 89 2d cc 24 13 00 mov %ebp,0x1324cc
/*
* 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 )
10dd01: 39 ee cmp %ebp,%esi
10dd03: 0f 84 fb 00 00 00 je 10de04 <_Thread_Dispatch+0x144>
10dd09: 8d 7c 24 18 lea 0x18(%esp),%edi
10dd0d: e9 da 00 00 00 jmp 10ddec <_Thread_Dispatch+0x12c>
10dd12: 66 90 xchg %ax,%ax
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10dd14: 50 push %eax
10dd15: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10dd16: 89 3c 24 mov %edi,(%esp)
10dd19: e8 9e 3c 00 00 call 1119bc <_TOD_Get_uptime>
_Timestamp_Subtract(
10dd1e: 8b 44 24 18 mov 0x18(%esp),%eax
10dd22: 8b 54 24 1c mov 0x1c(%esp),%edx
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
10dd26: 89 c1 mov %eax,%ecx
10dd28: 89 d3 mov %edx,%ebx
10dd2a: 2b 0d dc 24 13 00 sub 0x1324dc,%ecx
10dd30: 1b 1d e0 24 13 00 sbb 0x1324e0,%ebx
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
10dd36: 01 8e 80 00 00 00 add %ecx,0x80(%esi)
10dd3c: 11 9e 84 00 00 00 adc %ebx,0x84(%esi)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
10dd42: a3 dc 24 13 00 mov %eax,0x1324dc
10dd47: 89 15 e0 24 13 00 mov %edx,0x1324e0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10dd4d: a1 bc 1f 13 00 mov 0x131fbc,%eax
10dd52: 85 c0 test %eax,%eax
10dd54: 74 10 je 10dd66 <_Thread_Dispatch+0xa6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10dd56: 8b 10 mov (%eax),%edx
10dd58: 89 96 e0 00 00 00 mov %edx,0xe0(%esi)
*_Thread_libc_reent = heir->libc_reent;
10dd5e: 8b 95 e0 00 00 00 mov 0xe0(%ebp),%edx
10dd64: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10dd66: 89 6c 24 04 mov %ebp,0x4(%esp)
10dd6a: 89 34 24 mov %esi,(%esp)
10dd6d: e8 9a 0c 00 00 call 10ea0c <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10dd72: 81 c5 c4 00 00 00 add $0xc4,%ebp
10dd78: 89 6c 24 04 mov %ebp,0x4(%esp)
10dd7c: 8d 86 c4 00 00 00 lea 0xc4(%esi),%eax
10dd82: 89 04 24 mov %eax,(%esp)
10dd85: e8 c6 0f 00 00 call 10ed50 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10dd8a: 8b 86 dc 00 00 00 mov 0xdc(%esi),%eax
10dd90: 85 c0 test %eax,%eax
10dd92: 74 2e je 10ddc2 <_Thread_Dispatch+0x102>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
10dd94: a1 b8 1f 13 00 mov 0x131fb8,%eax
10dd99: 39 c6 cmp %eax,%esi
10dd9b: 74 25 je 10ddc2 <_Thread_Dispatch+0x102>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10dd9d: 85 c0 test %eax,%eax
10dd9f: 74 0d je 10ddae <_Thread_Dispatch+0xee>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10dda1: 05 dc 00 00 00 add $0xdc,%eax
10dda6: 89 04 24 mov %eax,(%esp)
10dda9: e8 d6 0f 00 00 call 10ed84 <_CPU_Context_save_fp>
_Context_Restore_fp( &executing->fp_context );
10ddae: 8d 86 dc 00 00 00 lea 0xdc(%esi),%eax
10ddb4: 89 04 24 mov %eax,(%esp)
10ddb7: e8 d2 0f 00 00 call 10ed8e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10ddbc: 89 35 b8 1f 13 00 mov %esi,0x131fb8
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10ddc2: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
_ISR_Disable( level );
10ddc8: 9c pushf
10ddc9: fa cli
10ddca: 58 pop %eax
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10ddcb: 8a 15 d8 24 13 00 mov 0x1324d8,%dl
10ddd1: 84 d2 test %dl,%dl
10ddd3: 74 2f je 10de04 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
10ddd5: 8b 2d d0 24 13 00 mov 0x1324d0,%ebp
_Thread_Dispatch_necessary = false;
10dddb: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = heir;
10dde2: 89 2d cc 24 13 00 mov %ebp,0x1324cc
/*
* 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 )
10dde8: 39 f5 cmp %esi,%ebp
10ddea: 74 18 je 10de04 <_Thread_Dispatch+0x144><== NEVER TAKEN
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
10ddec: 83 7d 78 01 cmpl $0x1,0x78(%ebp)
10ddf0: 0f 85 1e ff ff ff jne 10dd14 <_Thread_Dispatch+0x54>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ddf6: 8b 15 18 1f 13 00 mov 0x131f18,%edx
10ddfc: 89 55 74 mov %edx,0x74(%ebp)
10ddff: e9 10 ff ff ff jmp 10dd14 <_Thread_Dispatch+0x54>
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
10de04: 50 push %eax
10de05: 9d popf
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10de06: a1 44 1f 13 00 mov 0x131f44,%eax
10de0b: 48 dec %eax
10de0c: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10de11: a1 44 1f 13 00 mov 0x131f44,%eax
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
10de16: e8 6d e4 ff ff call 10c288 <_API_extensions_Run_postswitch>
}
10de1b: 83 c4 2c add $0x2c,%esp
10de1e: 5b pop %ebx
10de1f: 5e pop %esi
10de20: 5f pop %edi
10de21: 5d pop %ebp
10de22: c3 ret
00113a0c <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
113a0c: 53 push %ebx
113a0d: 83 ec 28 sub $0x28,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
113a10: 8b 1d cc 24 13 00 mov 0x1324cc,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
113a16: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
_ISR_Set_level(level);
113a1c: 85 c0 test %eax,%eax
113a1e: 0f 84 80 00 00 00 je 113aa4 <_Thread_Handler+0x98>
113a24: fa cli
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
113a25: a0 f4 1b 13 00 mov 0x131bf4,%al
113a2a: 88 44 24 1f mov %al,0x1f(%esp)
doneConstructors = true;
113a2e: c6 05 f4 1b 13 00 01 movb $0x1,0x131bf4
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
113a35: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
113a3b: 85 c0 test %eax,%eax
113a3d: 74 20 je 113a5f <_Thread_Handler+0x53>
#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 );
113a3f: a1 b8 1f 13 00 mov 0x131fb8,%eax
113a44: 39 c3 cmp %eax,%ebx
113a46: 74 17 je 113a5f <_Thread_Handler+0x53>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
113a48: 85 c0 test %eax,%eax
113a4a: 74 0d je 113a59 <_Thread_Handler+0x4d>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
113a4c: 05 dc 00 00 00 add $0xdc,%eax
113a51: 89 04 24 mov %eax,(%esp)
113a54: e8 2b b3 ff ff call 10ed84 <_CPU_Context_save_fp>
_Thread_Allocated_fp = executing;
113a59: 89 1d b8 1f 13 00 mov %ebx,0x131fb8
/*
* 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 );
113a5f: 89 1c 24 mov %ebx,(%esp)
113a62: e8 29 ae ff ff call 10e890 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
113a67: e8 b8 a3 ff ff call 10de24 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
113a6c: 80 7c 24 1f 00 cmpb $0x0,0x1f(%esp)
113a71: 74 37 je 113aaa <_Thread_Handler+0x9e>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
113a73: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
113a79: 85 c0 test %eax,%eax
113a7b: 74 34 je 113ab1 <_Thread_Handler+0xa5>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
113a7d: 48 dec %eax
113a7e: 74 45 je 113ac5 <_Thread_Handler+0xb9> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
113a80: 89 1c 24 mov %ebx,(%esp)
113a83: e8 3c ae ff ff call 10e8c4 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
113a88: c7 44 24 08 05 00 00 movl $0x5,0x8(%esp)
113a8f: 00
113a90: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
113a97: 00
113a98: c7 04 24 00 00 00 00 movl $0x0,(%esp)
113a9f: e8 68 91 ff ff call 10cc0c <_Internal_error_Occurred>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
_ISR_Set_level(level);
113aa4: fb sti
113aa5: e9 7b ff ff ff jmp 113a25 <_Thread_Handler+0x19>
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
113aaa: e8 29 d1 00 00 call 120bd8 <__start_set_sysctl_set>
113aaf: eb c2 jmp 113a73 <_Thread_Handler+0x67>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
113ab1: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
113ab7: 89 04 24 mov %eax,(%esp)
113aba: ff 93 8c 00 00 00 call *0x8c(%ebx)
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
113ac0: 89 43 28 mov %eax,0x28(%ebx)
113ac3: eb bb jmp 113a80 <_Thread_Handler+0x74>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
113ac5: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
113acb: 89 04 24 mov %eax,(%esp)
113ace: ff 93 8c 00 00 00 call *0x8c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
113ad4: 89 43 28 mov %eax,0x28(%ebx)
113ad7: eb a7 jmp 113a80 <_Thread_Handler+0x74>
0010e11c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
10e11c: 56 push %esi
10e11d: 53 push %ebx
10e11e: 83 ec 24 sub $0x24,%esp
uint32_t ticks_per_timeslice =
10e121: 8b 1d 18 da 12 00 mov 0x12da18,%ebx
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
10e127: 8b 35 0c da 12 00 mov 0x12da0c,%esi
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
10e12d: a1 28 da 12 00 mov 0x12da28,%eax
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
10e132: 8b 0d 2c da 12 00 mov 0x12da2c,%ecx
10e138: 85 c9 test %ecx,%ecx
10e13a: 0f 84 90 00 00 00 je 10e1d0 <_Thread_Handler_initialization+0xb4>
10e140: 8b 15 30 da 12 00 mov 0x12da30,%edx
10e146: 85 d2 test %edx,%edx
10e148: 0f 84 82 00 00 00 je 10e1d0 <_Thread_Handler_initialization+0xb4><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
10e14e: 85 c0 test %eax,%eax
10e150: 74 0b je 10e15d <_Thread_Handler_initialization+0x41>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
10e152: 8b 15 08 da 12 00 mov 0x12da08,%edx
10e158: 89 14 24 mov %edx,(%esp)
10e15b: ff d0 call *%eax
_Thread_Dispatch_necessary = false;
10e15d: c6 05 d8 24 13 00 00 movb $0x0,0x1324d8
_Thread_Executing = NULL;
10e164: c7 05 cc 24 13 00 00 movl $0x0,0x1324cc
10e16b: 00 00 00
_Thread_Heir = NULL;
10e16e: c7 05 d0 24 13 00 00 movl $0x0,0x1324d0
10e175: 00 00 00
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
10e178: c7 05 b8 1f 13 00 00 movl $0x0,0x131fb8
10e17f: 00 00 00
#endif
_Thread_Maximum_extensions = maximum_extensions;
10e182: 89 35 c0 1f 13 00 mov %esi,0x131fc0
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
10e188: 89 1d 18 1f 13 00 mov %ebx,0x131f18
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
10e18e: c7 44 24 18 08 00 00 movl $0x8,0x18(%esp)
10e195: 00
10e196: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10e19d: 00
10e19e: c7 44 24 10 f4 00 00 movl $0xf4,0x10(%esp)
10e1a5: 00
10e1a6: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
10e1ad: 00
10e1ae: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e1b5: 00
10e1b6: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e1bd: 00
10e1be: c7 04 24 60 20 13 00 movl $0x132060,(%esp)
10e1c5: e8 0a f0 ff ff call 10d1d4 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
10e1ca: 83 c4 24 add $0x24,%esp
10e1cd: 5b pop %ebx
10e1ce: 5e pop %esi
10e1cf: c3 ret
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
10e1d0: c7 44 24 08 0e 00 00 movl $0xe,0x8(%esp)
10e1d7: 00
10e1d8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10e1df: 00
10e1e0: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10e1e7: e8 20 ea ff ff call 10cc0c <_Internal_error_Occurred>
0010dec4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10dec4: 55 push %ebp
10dec5: 57 push %edi
10dec6: 56 push %esi
10dec7: 53 push %ebx
10dec8: 83 ec 2c sub $0x2c,%esp
10decb: 8b 5c 24 44 mov 0x44(%esp),%ebx
10decf: 8b 44 24 48 mov 0x48(%esp),%eax
10ded3: 8a 54 24 50 mov 0x50(%esp),%dl
10ded7: 8a 4c 24 58 mov 0x58(%esp),%cl
10dedb: 88 4c 24 1f mov %cl,0x1f(%esp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10dedf: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10dee6: 00 00 00
10dee9: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10def0: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10def3: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
10defa: 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 ) {
10defd: 85 c0 test %eax,%eax
10deff: 0f 84 d0 01 00 00 je 10e0d5 <_Thread_Initialize+0x211>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
10df05: c6 83 b0 00 00 00 00 movb $0x0,0xb0(%ebx)
10df0c: 8b 4c 24 4c mov 0x4c(%esp),%ecx
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10df10: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_stack->size = size;
10df16: 89 8b b4 00 00 00 mov %ecx,0xb4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10df1c: 84 d2 test %dl,%dl
10df1e: 0f 85 50 01 00 00 jne 10e074 <_Thread_Initialize+0x1b0>
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
10df24: 31 f6 xor %esi,%esi
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
10df26: 89 b3 dc 00 00 00 mov %esi,0xdc(%ebx)
the_thread->Start.fp_context = fp_area;
10df2c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10df32: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10df39: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10df40: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10df47: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10df4e: a1 c0 1f 13 00 mov 0x131fc0,%eax
10df53: 85 c0 test %eax,%eax
10df55: 0f 85 35 01 00 00 jne 10e090 <_Thread_Initialize+0x1cc>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10df5b: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10df62: 00 00 00
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10df65: 31 ff xor %edi,%edi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10df67: 8a 54 24 1f mov 0x1f(%esp),%dl
10df6b: 88 93 9c 00 00 00 mov %dl,0x9c(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10df71: 8b 4c 24 5c mov 0x5c(%esp),%ecx
10df75: 89 8b a0 00 00 00 mov %ecx,0xa0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10df7b: 8b 44 24 60 mov 0x60(%esp),%eax
10df7f: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
switch ( budget_algorithm ) {
10df85: 83 f9 02 cmp $0x2,%ecx
10df88: 75 08 jne 10df92 <_Thread_Initialize+0xce>
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;
10df8a: a1 18 1f 13 00 mov 0x131f18,%eax
10df8f: 89 43 74 mov %eax,0x74(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10df92: 8b 44 24 64 mov 0x64(%esp),%eax
10df96: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
the_thread->current_state = STATES_DORMANT;
10df9c: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10dfa3: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10dfaa: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10dfb1: 8b 54 24 54 mov 0x54(%esp),%edx
10dfb5: 89 53 18 mov %edx,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10dfb8: 89 93 ac 00 00 00 mov %edx,0xac(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10dfbe: 89 1c 24 mov %ebx,(%esp)
10dfc1: ff 15 38 db 12 00 call *0x12db38
10dfc7: 89 c5 mov %eax,%ebp
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10dfc9: 85 c0 test %eax,%eax
10dfcb: 74 45 je 10e012 <_Thread_Initialize+0x14e>
goto failed;
_Thread_Set_priority( the_thread, priority );
10dfcd: 8b 4c 24 54 mov 0x54(%esp),%ecx
10dfd1: 89 4c 24 04 mov %ecx,0x4(%esp)
10dfd5: 89 1c 24 mov %ebx,(%esp)
10dfd8: e8 7f 06 00 00 call 10e65c <_Thread_Set_priority>
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
10dfdd: c7 83 80 00 00 00 00 movl $0x0,0x80(%ebx)
10dfe4: 00 00 00
10dfe7: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10dfee: 00 00 00
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10dff1: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10dff5: 8b 44 24 40 mov 0x40(%esp),%eax
10dff9: 8b 40 1c mov 0x1c(%eax),%eax
10dffc: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10dfff: 8b 44 24 68 mov 0x68(%esp),%eax
10e003: 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 );
10e006: 89 1c 24 mov %ebx,(%esp)
10e009: e8 3a 09 00 00 call 10e948 <_User_extensions_Thread_create>
if ( extension_status )
10e00e: 84 c0 test %al,%al
10e010: 75 56 jne 10e068 <_Thread_Initialize+0x1a4>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10e012: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10e018: 89 04 24 mov %eax,(%esp)
10e01b: e8 c0 0c 00 00 call 10ece0 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10e020: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10e026: 89 04 24 mov %eax,(%esp)
10e029: e8 b2 0c 00 00 call 10ece0 <_Workspace_Free>
10e02e: 8b 83 e8 00 00 00 mov 0xe8(%ebx),%eax
10e034: 89 04 24 mov %eax,(%esp)
10e037: e8 a4 0c 00 00 call 10ece0 <_Workspace_Free>
_Workspace_Free( extensions_area );
10e03c: 89 3c 24 mov %edi,(%esp)
10e03f: e8 9c 0c 00 00 call 10ece0 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10e044: 89 34 24 mov %esi,(%esp)
10e047: e8 94 0c 00 00 call 10ece0 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10e04c: 89 2c 24 mov %ebp,(%esp)
10e04f: e8 8c 0c 00 00 call 10ece0 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10e054: 89 1c 24 mov %ebx,(%esp)
10e057: e8 b0 06 00 00 call 10e70c <_Thread_Stack_Free>
return false;
10e05c: 31 c0 xor %eax,%eax
}
10e05e: 83 c4 2c add $0x2c,%esp
10e061: 5b pop %ebx
10e062: 5e pop %esi
10e063: 5f pop %edi
10e064: 5d pop %ebp
10e065: c3 ret
10e066: 66 90 xchg %ax,%ax
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
10e068: b0 01 mov $0x1,%al
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10e06a: 83 c4 2c add $0x2c,%esp
10e06d: 5b pop %ebx
10e06e: 5e pop %esi
10e06f: 5f pop %edi
10e070: 5d pop %ebp
10e071: c3 ret
10e072: 66 90 xchg %ax,%ax
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
10e074: c7 04 24 6c 00 00 00 movl $0x6c,(%esp)
10e07b: e8 34 0c 00 00 call 10ecb4 <_Workspace_Allocate>
10e080: 89 c6 mov %eax,%esi
if ( !fp_area )
10e082: 85 c0 test %eax,%eax
10e084: 0f 85 9c fe ff ff jne 10df26 <_Thread_Initialize+0x62>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
10e08a: 31 ff xor %edi,%edi
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;
10e08c: 31 ed xor %ebp,%ebp
10e08e: eb 82 jmp 10e012 <_Thread_Initialize+0x14e>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10e090: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10e097: 89 04 24 mov %eax,(%esp)
10e09a: e8 15 0c 00 00 call 10ecb4 <_Workspace_Allocate>
10e09f: 89 c7 mov %eax,%edi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10e0a1: 85 c0 test %eax,%eax
10e0a3: 74 6d je 10e112 <_Thread_Initialize+0x24e>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e0a5: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
10e0ab: 8b 2d c0 1f 13 00 mov 0x131fc0,%ebp
10e0b1: 89 c1 mov %eax,%ecx
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10e0b3: 31 c0 xor %eax,%eax
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10e0b5: 31 d2 xor %edx,%edx
10e0b7: eb 09 jmp 10e0c2 <_Thread_Initialize+0x1fe>
10e0b9: 8d 76 00 lea 0x0(%esi),%esi
10e0bc: 8b 8b ec 00 00 00 mov 0xec(%ebx),%ecx
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
10e0c2: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
10e0c9: 42 inc %edx
10e0ca: 89 d0 mov %edx,%eax
10e0cc: 39 ea cmp %ebp,%edx
10e0ce: 76 ec jbe 10e0bc <_Thread_Initialize+0x1f8>
10e0d0: e9 92 fe ff ff jmp 10df67 <_Thread_Initialize+0xa3>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10e0d5: 8b 44 24 4c mov 0x4c(%esp),%eax
10e0d9: 89 44 24 04 mov %eax,0x4(%esp)
10e0dd: 89 1c 24 mov %ebx,(%esp)
10e0e0: 88 54 24 18 mov %dl,0x18(%esp)
10e0e4: e8 eb 05 00 00 call 10e6d4 <_Thread_Stack_Allocate>
10e0e9: 89 c1 mov %eax,%ecx
if ( !actual_stack_size || actual_stack_size < stack_size )
10e0eb: 85 c0 test %eax,%eax
10e0ed: 8a 54 24 18 mov 0x18(%esp),%dl
10e0f1: 74 18 je 10e10b <_Thread_Initialize+0x247>
10e0f3: 39 44 24 4c cmp %eax,0x4c(%esp)
10e0f7: 77 12 ja 10e10b <_Thread_Initialize+0x247><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10e0f9: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax
the_thread->Start.core_allocated_stack = true;
10e0ff: c6 83 b0 00 00 00 01 movb $0x1,0xb0(%ebx)
10e106: e9 05 fe ff ff jmp 10df10 <_Thread_Initialize+0x4c>
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 */
10e10b: 31 c0 xor %eax,%eax
10e10d: e9 4c ff ff ff jmp 10e05e <_Thread_Initialize+0x19a>
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;
10e112: 31 ed xor %ebp,%ebp
10e114: e9 f9 fe ff ff jmp 10e012 <_Thread_Initialize+0x14e>
0010e70c <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e70c: 8b 44 24 04 mov 0x4(%esp),%eax
rtems_stack_free_hook stack_free_hook =
10e710: 8b 15 30 da 12 00 mov 0x12da30,%edx
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
10e716: 80 b8 b0 00 00 00 00 cmpb $0x0,0xb0(%eax)
10e71d: 75 01 jne 10e720 <_Thread_Stack_Free+0x14><== ALWAYS TAKEN
10e71f: c3 ret <== NOT EXECUTED
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
10e720: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
10e726: 89 44 24 04 mov %eax,0x4(%esp)
10e72a: ff e2 jmp *%edx
0010e5b4 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e5b4: 56 push %esi
10e5b5: 53 push %ebx
10e5b6: 83 ec 24 sub $0x24,%esp
10e5b9: 8b 5c 24 30 mov 0x30(%esp),%ebx
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10e5bd: 85 db test %ebx,%ebx
10e5bf: 74 06 je 10e5c7 <_Thread_queue_Requeue+0x13><== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10e5c1: 83 7b 34 01 cmpl $0x1,0x34(%ebx)
10e5c5: 74 09 je 10e5d0 <_Thread_queue_Requeue+0x1c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e5c7: 83 c4 24 add $0x24,%esp <== NOT EXECUTED
10e5ca: 5b pop %ebx <== NOT EXECUTED
10e5cb: 5e pop %esi <== NOT EXECUTED
10e5cc: c3 ret <== NOT EXECUTED
10e5cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
10e5d0: 9c pushf
10e5d1: fa cli
10e5d2: 5e pop %esi
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e5d3: 8b 44 24 34 mov 0x34(%esp),%eax
10e5d7: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e5de: 75 08 jne 10e5e8 <_Thread_queue_Requeue+0x34><== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
10e5e0: 56 push %esi
10e5e1: 9d popf
}
}
10e5e2: 83 c4 24 add $0x24,%esp
10e5e5: 5b pop %ebx
10e5e6: 5e pop %esi
10e5e7: c3 ret
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10e5e8: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
10e5ef: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e5f6: 00
10e5f7: 89 44 24 04 mov %eax,0x4(%esp)
10e5fb: 89 1c 24 mov %ebx,(%esp)
10e5fe: e8 25 3a 00 00 call 112028 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e603: 8d 44 24 1c lea 0x1c(%esp),%eax
10e607: 89 44 24 08 mov %eax,0x8(%esp)
10e60b: 8b 44 24 34 mov 0x34(%esp),%eax
10e60f: 89 44 24 04 mov %eax,0x4(%esp)
10e613: 89 1c 24 mov %ebx,(%esp)
10e616: e8 81 fd ff ff call 10e39c <_Thread_queue_Enqueue_priority>
10e61b: eb c3 jmp 10e5e0 <_Thread_queue_Requeue+0x2c>
0010e620 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e620: 83 ec 2c sub $0x2c,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e623: 8d 44 24 1c lea 0x1c(%esp),%eax
10e627: 89 44 24 04 mov %eax,0x4(%esp)
10e62b: 8b 44 24 30 mov 0x30(%esp),%eax
10e62f: 89 04 24 mov %eax,(%esp)
10e632: e8 0d f8 ff ff call 10de44 <_Thread_Get>
switch ( location ) {
10e637: 8b 54 24 1c mov 0x1c(%esp),%edx
10e63b: 85 d2 test %edx,%edx
10e63d: 75 18 jne 10e657 <_Thread_queue_Timeout+0x37><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e63f: 89 04 24 mov %eax,(%esp)
10e642: e8 8d 3a 00 00 call 1120d4 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
10e647: a1 44 1f 13 00 mov 0x131f44,%eax
10e64c: 48 dec %eax
10e64d: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
10e652: a1 44 1f 13 00 mov 0x131f44,%eax
_Thread_Unnest_dispatch();
break;
}
}
10e657: 83 c4 2c add $0x2c,%esp
10e65a: c3 ret
0011bf68 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
11bf68: 55 push %ebp
11bf69: 57 push %edi
11bf6a: 56 push %esi
11bf6b: 53 push %ebx
11bf6c: 83 ec 5c sub $0x5c,%esp
11bf6f: 8b 5c 24 70 mov 0x70(%esp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf73: 8d 4c 24 3c lea 0x3c(%esp),%ecx
11bf77: 89 4c 24 20 mov %ecx,0x20(%esp)
11bf7b: 89 4c 24 38 mov %ecx,0x38(%esp)
head->previous = NULL;
11bf7f: c7 44 24 3c 00 00 00 movl $0x0,0x3c(%esp)
11bf86: 00
tail->previous = head;
11bf87: 8d 44 24 38 lea 0x38(%esp),%eax
11bf8b: 89 44 24 40 mov %eax,0x40(%esp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
11bf8f: 8d 7c 24 44 lea 0x44(%esp),%edi
11bf93: 8d 4c 24 48 lea 0x48(%esp),%ecx
11bf97: 89 4c 24 24 mov %ecx,0x24(%esp)
11bf9b: 89 4c 24 44 mov %ecx,0x44(%esp)
head->previous = NULL;
11bf9f: c7 44 24 48 00 00 00 movl $0x0,0x48(%esp)
11bfa6: 00
tail->previous = head;
11bfa7: 89 7c 24 4c mov %edi,0x4c(%esp)
11bfab: 8d 6b 30 lea 0x30(%ebx),%ebp
11bfae: 8d 73 68 lea 0x68(%ebx),%esi
11bfb1: 8d 4b 08 lea 0x8(%ebx),%ecx
11bfb4: 89 4c 24 28 mov %ecx,0x28(%esp)
11bfb8: 8d 4b 40 lea 0x40(%ebx),%ecx
11bfbb: 89 4c 24 2c mov %ecx,0x2c(%esp)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
11bfbf: 8d 44 24 38 lea 0x38(%esp),%eax
11bfc3: 89 43 78 mov %eax,0x78(%ebx)
11bfc6: 66 90 xchg %ax,%ax
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
11bfc8: a1 c4 eb 14 00 mov 0x14ebc4,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfcd: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
11bfd0: 89 43 3c mov %eax,0x3c(%ebx)
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11bfd3: 89 7c 24 08 mov %edi,0x8(%esp)
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
11bfd7: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11bfd9: 89 44 24 04 mov %eax,0x4(%esp)
11bfdd: 89 2c 24 mov %ebp,(%esp)
11bfe0: e8 17 3f 00 00 call 11fefc <_Watchdog_Adjust_to_chain>
11bfe5: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bfec: 3b
11bfed: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bff4: 00
11bff5: a1 80 ea 14 00 mov 0x14ea80,%eax
11bffa: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11c000: 89 04 24 mov %eax,(%esp)
11c003: 89 54 24 04 mov %edx,0x4(%esp)
11c007: e8 38 4f 01 00 call 130f44 <__divdi3>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11c00c: 8b 53 74 mov 0x74(%ebx),%edx
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
11c00f: 39 d0 cmp %edx,%eax
11c011: 0f 87 89 00 00 00 ja 11c0a0 <_Timer_server_Body+0x138>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
11c017: 73 1e jae 11c037 <_Timer_server_Body+0xcf>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
11c019: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
11c01b: 89 54 24 08 mov %edx,0x8(%esp)
11c01f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
11c026: 00
11c027: 89 34 24 mov %esi,(%esp)
11c02a: 89 44 24 1c mov %eax,0x1c(%esp)
11c02e: e8 59 3e 00 00 call 11fe8c <_Watchdog_Adjust>
11c033: 8b 44 24 1c mov 0x1c(%esp),%eax
}
watchdogs->last_snapshot = snapshot;
11c037: 89 43 74 mov %eax,0x74(%ebx)
11c03a: 66 90 xchg %ax,%ax
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c03c: 8b 43 78 mov 0x78(%ebx),%eax
11c03f: 89 04 24 mov %eax,(%esp)
11c042: e8 e1 08 00 00 call 11c928 <_Chain_Get>
if ( timer == NULL ) {
11c047: 85 c0 test %eax,%eax
11c049: 74 2d je 11c078 <_Timer_server_Body+0x110><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11c04b: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
11c04e: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
11c051: 74 39 je 11c08c <_Timer_server_Body+0x124><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11c053: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
11c056: 75 e4 jne 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11c058: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c05b: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c05f: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED
11c062: e8 1d 3f 00 00 call 11ff84 <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
11c067: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11c06a: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
11c06d: e8 b6 08 00 00 call 11c928 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
11c072: 85 c0 test %eax,%eax <== NOT EXECUTED
11c074: 75 d5 jne 11c04b <_Timer_server_Body+0xe3><== NOT EXECUTED
11c076: 66 90 xchg %ax,%ax <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
11c078: 9c pushf
11c079: fa cli
11c07a: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
11c07b: 8b 4c 24 20 mov 0x20(%esp),%ecx
11c07f: 39 4c 24 38 cmp %ecx,0x38(%esp)
11c083: 74 3c je 11c0c1 <_Timer_server_Body+0x159><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
11c085: 50 push %eax <== NOT EXECUTED
11c086: 9d popf <== NOT EXECUTED
11c087: e9 3c ff ff ff jmp 11bfc8 <_Timer_server_Body+0x60><== NOT EXECUTED
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11c08c: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
11c08f: 89 44 24 04 mov %eax,0x4(%esp) <== NOT EXECUTED
11c093: 89 2c 24 mov %ebp,(%esp) <== NOT EXECUTED
11c096: e8 e9 3e 00 00 call 11ff84 <_Watchdog_Insert> <== NOT EXECUTED
11c09b: eb 9f jmp 11c03c <_Timer_server_Body+0xd4><== NOT EXECUTED
11c09d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Chain_Initialize_empty( &insert_chain );
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
11c0a0: 89 7c 24 08 mov %edi,0x8(%esp)
if ( snapshot > last_snapshot ) {
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
11c0a4: 89 c1 mov %eax,%ecx
11c0a6: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11c0a8: 89 4c 24 04 mov %ecx,0x4(%esp)
11c0ac: 89 34 24 mov %esi,(%esp)
11c0af: 89 44 24 1c mov %eax,0x1c(%esp)
11c0b3: e8 44 3e 00 00 call 11fefc <_Watchdog_Adjust_to_chain>
11c0b8: 8b 44 24 1c mov 0x1c(%esp),%eax
11c0bc: e9 76 ff ff ff jmp 11c037 <_Timer_server_Body+0xcf>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
11c0c1: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11c0c8: 50 push %eax
11c0c9: 9d popf
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
11c0ca: 8b 4c 24 24 mov 0x24(%esp),%ecx
11c0ce: 39 4c 24 44 cmp %ecx,0x44(%esp)
11c0d2: 75 26 jne 11c0fa <_Timer_server_Body+0x192>
11c0d4: eb 38 jmp 11c10e <_Timer_server_Body+0x1a6>
11c0d6: 66 90 xchg %ax,%ax
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
11c0d8: 8b 10 mov (%eax),%edx
head->next = new_first;
11c0da: 89 54 24 44 mov %edx,0x44(%esp)
new_first->previous = head;
11c0de: 89 7a 04 mov %edi,0x4(%edx)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
11c0e1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
11c0e8: 51 push %ecx
11c0e9: 9d popf
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
11c0ea: 8b 50 24 mov 0x24(%eax),%edx
11c0ed: 89 54 24 04 mov %edx,0x4(%esp)
11c0f1: 8b 50 20 mov 0x20(%eax),%edx
11c0f4: 89 14 24 mov %edx,(%esp)
11c0f7: ff 50 1c call *0x1c(%eax)
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
11c0fa: 9c pushf
11c0fb: fa cli
11c0fc: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11c0fd: 8b 44 24 44 mov 0x44(%esp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11c101: 3b 44 24 24 cmp 0x24(%esp),%eax
11c105: 75 d1 jne 11c0d8 <_Timer_server_Body+0x170>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
11c107: 51 push %ecx
11c108: 9d popf
11c109: e9 b1 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
11c10e: c6 43 7c 00 movb $0x0,0x7c(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11c112: a1 c4 ea 14 00 mov 0x14eac4,%eax
11c117: 40 inc %eax
11c118: a3 c4 ea 14 00 mov %eax,0x14eac4
return _Thread_Dispatch_disable_level;
11c11d: a1 c4 ea 14 00 mov 0x14eac4,%eax
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
11c122: c7 44 24 04 08 00 00 movl $0x8,0x4(%esp)
11c129: 00
11c12a: 8b 03 mov (%ebx),%eax
11c12c: 89 04 24 mov %eax,(%esp)
11c12f: e8 44 39 00 00 call 11fa78 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
11c134: 89 d8 mov %ebx,%eax
11c136: e8 3d fc ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
11c13b: 89 d8 mov %ebx,%eax
11c13d: e8 7e fc ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
11c142: e8 5d 30 00 00 call 11f1a4 <_Thread_Enable_dispatch>
ts->active = true;
11c147: c6 43 7c 01 movb $0x1,0x7c(%ebx)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
11c14b: 8b 4c 24 28 mov 0x28(%esp),%ecx
11c14f: 89 0c 24 mov %ecx,(%esp)
11c152: e8 49 3f 00 00 call 1200a0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
11c157: 8b 4c 24 2c mov 0x2c(%esp),%ecx
11c15b: 89 0c 24 mov %ecx,(%esp)
11c15e: e8 3d 3f 00 00 call 1200a0 <_Watchdog_Remove>
11c163: e9 57 fe ff ff jmp 11bfbf <_Timer_server_Body+0x57>
0011be08 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
11be08: 55 push %ebp
11be09: 57 push %edi
11be0a: 56 push %esi
11be0b: 53 push %ebx
11be0c: 83 ec 2c sub $0x2c,%esp
11be0f: 8b 5c 24 40 mov 0x40(%esp),%ebx
11be13: 8b 74 24 44 mov 0x44(%esp),%esi
if ( ts->insert_chain == NULL ) {
11be17: 8b 43 78 mov 0x78(%ebx),%eax
11be1a: 85 c0 test %eax,%eax
11be1c: 74 1a je 11be38 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11be1e: 8b 43 78 mov 0x78(%ebx),%eax <== NOT EXECUTED
11be21: 89 74 24 44 mov %esi,0x44(%esp) <== NOT EXECUTED
11be25: 89 44 24 40 mov %eax,0x40(%esp) <== NOT EXECUTED
}
}
11be29: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
11be2c: 5b pop %ebx <== NOT EXECUTED
11be2d: 5e pop %esi <== NOT EXECUTED
11be2e: 5f pop %edi <== NOT EXECUTED
11be2f: 5d pop %ebp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
11be30: e9 cf 0a 00 00 jmp 11c904 <_Chain_Append> <== NOT EXECUTED
11be35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
11be38: a1 c4 ea 14 00 mov 0x14eac4,%eax
11be3d: 40 inc %eax
11be3e: a3 c4 ea 14 00 mov %eax,0x14eac4
return _Thread_Dispatch_disable_level;
11be43: a1 c4 ea 14 00 mov 0x14eac4,%eax
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
11be48: 8b 46 38 mov 0x38(%esi),%eax
11be4b: 83 f8 01 cmp $0x1,%eax
11be4e: 0f 84 a8 00 00 00 je 11befc <_Timer_server_Schedule_operation_method+0xf4>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
11be54: 83 f8 03 cmp $0x3,%eax
11be57: 74 0f je 11be68 <_Timer_server_Schedule_operation_method+0x60>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
11be59: 83 c4 2c add $0x2c,%esp
11be5c: 5b pop %ebx
11be5d: 5e pop %esi
11be5e: 5f pop %edi
11be5f: 5d pop %ebp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
11be60: e9 3f 33 00 00 jmp 11f1a4 <_Thread_Enable_dispatch>
11be65: 8d 76 00 lea 0x0(%esi),%esi
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11be68: 9c pushf
11be69: fa cli
11be6a: 5f pop %edi
11be6b: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11be72: 3b
11be73: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11be7a: 00
11be7b: a1 80 ea 14 00 mov 0x14ea80,%eax
11be80: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11be86: 89 04 24 mov %eax,(%esp)
11be89: 89 54 24 04 mov %edx,0x4(%esp)
11be8d: e8 b2 50 01 00 call 130f44 <__divdi3>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
11be92: 8b 53 74 mov 0x74(%ebx),%edx
11be95: 89 54 24 1c mov %edx,0x1c(%esp)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11be99: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11be9c: 8d 6b 6c lea 0x6c(%ebx),%ebp
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
11be9f: 39 ea cmp %ebp,%edx
11bea1: 74 28 je 11becb <_Timer_server_Schedule_operation_method+0xc3>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
11bea3: 8b 6a 10 mov 0x10(%edx),%ebp
if ( snapshot > last_snapshot ) {
11bea6: 3b 44 24 1c cmp 0x1c(%esp),%eax
11beaa: 0f 86 a4 00 00 00 jbe 11bf54 <_Timer_server_Schedule_operation_method+0x14c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
11beb0: 89 c1 mov %eax,%ecx
11beb2: 2b 4c 24 1c sub 0x1c(%esp),%ecx
11beb6: 89 4c 24 1c mov %ecx,0x1c(%esp)
if (delta_interval > delta) {
11beba: 39 cd cmp %ecx,%ebp
11bebc: 0f 86 9f 00 00 00 jbe 11bf61 <_Timer_server_Schedule_operation_method+0x159><== NEVER TAKEN
delta_interval -= delta;
11bec2: 89 e9 mov %ebp,%ecx
11bec4: 2b 4c 24 1c sub 0x1c(%esp),%ecx
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
11bec8: 89 4a 10 mov %ecx,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
11becb: 89 43 74 mov %eax,0x74(%ebx)
_ISR_Enable( level );
11bece: 57 push %edi
11becf: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11bed0: 83 c6 10 add $0x10,%esi
11bed3: 89 74 24 04 mov %esi,0x4(%esp)
11bed7: 8d 43 68 lea 0x68(%ebx),%eax
11beda: 89 04 24 mov %eax,(%esp)
11bedd: e8 a2 40 00 00 call 11ff84 <_Watchdog_Insert>
if ( !ts->active ) {
11bee2: 8a 43 7c mov 0x7c(%ebx),%al
11bee5: 84 c0 test %al,%al
11bee7: 0f 85 6c ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_tod_system_watchdog( ts );
11beed: 89 d8 mov %ebx,%eax
11beef: e8 cc fe ff ff call 11bdc0 <_Timer_server_Reset_tod_system_watchdog>
11bef4: e9 60 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
11bef9: 8d 76 00 lea 0x0(%esi),%esi
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
11befc: 9c pushf
11befd: fa cli
11befe: 5d pop %ebp
snapshot = _Watchdog_Ticks_since_boot;
11beff: 8b 15 c4 eb 14 00 mov 0x14ebc4,%edx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11bf05: 8b 7b 3c mov 0x3c(%ebx),%edi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
11bf08: 8b 43 30 mov 0x30(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11bf0b: 8d 4b 34 lea 0x34(%ebx),%ecx
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
11bf0e: 39 c8 cmp %ecx,%eax
11bf10: 74 10 je 11bf22 <_Timer_server_Schedule_operation_method+0x11a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11bf12: 89 d1 mov %edx,%ecx
11bf14: 29 f9 sub %edi,%ecx
delta_interval = first_watchdog->delta_interval;
11bf16: 8b 78 10 mov 0x10(%eax),%edi
if (delta_interval > delta) {
11bf19: 39 f9 cmp %edi,%ecx
11bf1b: 73 33 jae 11bf50 <_Timer_server_Schedule_operation_method+0x148>
delta_interval -= delta;
11bf1d: 29 cf sub %ecx,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
11bf1f: 89 78 10 mov %edi,0x10(%eax)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
11bf22: 89 53 3c mov %edx,0x3c(%ebx)
_ISR_Enable( level );
11bf25: 55 push %ebp
11bf26: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
11bf27: 83 c6 10 add $0x10,%esi
11bf2a: 89 74 24 04 mov %esi,0x4(%esp)
11bf2e: 8d 43 30 lea 0x30(%ebx),%eax
11bf31: 89 04 24 mov %eax,(%esp)
11bf34: e8 4b 40 00 00 call 11ff84 <_Watchdog_Insert>
if ( !ts->active ) {
11bf39: 8a 43 7c mov 0x7c(%ebx),%al
11bf3c: 84 c0 test %al,%al
11bf3e: 0f 85 15 ff ff ff jne 11be59 <_Timer_server_Schedule_operation_method+0x51>
_Timer_server_Reset_interval_system_watchdog( ts );
11bf44: 89 d8 mov %ebx,%eax
11bf46: e8 2d fe ff ff call 11bd78 <_Timer_server_Reset_interval_system_watchdog>
11bf4b: e9 09 ff ff ff jmp 11be59 <_Timer_server_Schedule_operation_method+0x51>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf50: 31 ff xor %edi,%edi
11bf52: eb cb jmp 11bf1f <_Timer_server_Schedule_operation_method+0x117>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
11bf54: 8b 4c 24 1c mov 0x1c(%esp),%ecx
11bf58: 01 e9 add %ebp,%ecx
delta_interval += delta;
11bf5a: 29 c1 sub %eax,%ecx
11bf5c: e9 67 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
11bf61: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
11bf63: e9 60 ff ff ff jmp 11bec8 <_Timer_server_Schedule_operation_method+0xc0><== NOT EXECUTED
00110374 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
110374: 56 push %esi
110375: 53 push %ebx
110376: 8b 74 24 0c mov 0xc(%esp),%esi
11037a: 8b 4c 24 10 mov 0x10(%esp),%ecx
uint32_t seconds = add->tv_sec;
11037e: 8b 01 mov (%ecx),%eax
/* Add the basics */
time->tv_sec += add->tv_sec;
110380: 01 06 add %eax,(%esi)
time->tv_nsec += add->tv_nsec;
110382: 8b 56 04 mov 0x4(%esi),%edx
110385: 03 51 04 add 0x4(%ecx),%edx
110388: 89 56 04 mov %edx,0x4(%esi)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
11038b: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
110391: 76 1c jbe 1103af <_Timespec_Add_to+0x3b>
110393: 8b 0e mov (%esi),%ecx
110395: 41 inc %ecx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
110396: 29 c1 sub %eax,%ecx
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
110398: 81 ea 00 ca 9a 3b sub $0x3b9aca00,%edx
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
11039e: 8d 1c 01 lea (%ecx,%eax,1),%ebx
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
seconds++;
1103a1: 40 inc %eax
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
1103a2: 81 fa ff c9 9a 3b cmp $0x3b9ac9ff,%edx
1103a8: 77 ee ja 110398 <_Timespec_Add_to+0x24> <== NEVER TAKEN
1103aa: 89 56 04 mov %edx,0x4(%esi)
1103ad: 89 1e mov %ebx,(%esi)
time->tv_sec++;
seconds++;
}
return seconds;
}
1103af: 5b pop %ebx
1103b0: 5e pop %esi
1103b1: c3 ret
0010fe48 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
10fe48: 57 push %edi
10fe49: 56 push %esi
10fe4a: 53 push %ebx
10fe4b: 83 ec 10 sub $0x10,%esp
10fe4e: 8b 54 24 20 mov 0x20(%esp),%edx
10fe52: 8b 44 24 24 mov 0x24(%esp),%eax
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
10fe56: 8b 18 mov (%eax),%ebx
10fe58: 8b 48 04 mov 0x4(%eax),%ecx
10fe5b: 89 c8 mov %ecx,%eax
10fe5d: 09 d8 or %ebx,%eax
10fe5f: 74 73 je 10fed4 <_Timestamp64_Divide+0x8c><== NEVER TAKEN
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
10fe61: 69 72 04 a0 86 01 00 imul $0x186a0,0x4(%edx),%esi
10fe68: b8 a0 86 01 00 mov $0x186a0,%eax
10fe6d: f7 22 mull (%edx)
10fe6f: 01 f2 add %esi,%edx
10fe71: 89 5c 24 08 mov %ebx,0x8(%esp)
10fe75: 89 4c 24 0c mov %ecx,0xc(%esp)
10fe79: 89 04 24 mov %eax,(%esp)
10fe7c: 89 54 24 04 mov %edx,0x4(%esp)
10fe80: e8 23 1c 01 00 call 121aa8 <__divdi3>
10fe85: 89 c6 mov %eax,%esi
10fe87: 89 d7 mov %edx,%edi
*_ival_percentage = answer / 1000;
10fe89: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10fe90: 00
10fe91: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10fe98: 00
10fe99: 89 04 24 mov %eax,(%esp)
10fe9c: 89 54 24 04 mov %edx,0x4(%esp)
10fea0: e8 03 1c 01 00 call 121aa8 <__divdi3>
10fea5: 8b 4c 24 28 mov 0x28(%esp),%ecx
10fea9: 89 01 mov %eax,(%ecx)
*_fval_percentage = answer % 1000;
10feab: c7 44 24 08 e8 03 00 movl $0x3e8,0x8(%esp)
10feb2: 00
10feb3: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10feba: 00
10febb: 89 34 24 mov %esi,(%esp)
10febe: 89 7c 24 04 mov %edi,0x4(%esp)
10fec2: e8 35 1d 01 00 call 121bfc <__moddi3>
10fec7: 8b 4c 24 2c mov 0x2c(%esp),%ecx
10fecb: 89 01 mov %eax,(%ecx)
}
10fecd: 83 c4 10 add $0x10,%esp
10fed0: 5b pop %ebx
10fed1: 5e pop %esi
10fed2: 5f pop %edi
10fed3: c3 ret
)
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
10fed4: 8b 4c 24 28 mov 0x28(%esp),%ecx <== NOT EXECUTED
10fed8: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
*_fval_percentage = 0;
10fede: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
10fee2: c7 01 00 00 00 00 movl $0x0,(%ecx) <== NOT EXECUTED
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
*_fval_percentage = answer % 1000;
}
10fee8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10feeb: 5b pop %ebx <== NOT EXECUTED
10feec: 5e pop %esi <== NOT EXECUTED
10feed: 5f pop %edi <== NOT EXECUTED
10feee: c3 ret <== NOT EXECUTED
0010e8fc <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e8fc: 55 push %ebp
10e8fd: 57 push %edi
10e8fe: 56 push %esi
10e8ff: 53 push %ebx
10e900: 83 ec 1c sub $0x1c,%esp
10e903: 8b 74 24 30 mov 0x30(%esp),%esi
10e907: 8b 7c 24 38 mov 0x38(%esp),%edi
10e90b: 8a 44 24 34 mov 0x34(%esp),%al
10e90f: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e915: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e91b: 74 22 je 10e93f <_User_extensions_Fatal+0x43><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e91d: 0f b6 e8 movzbl %al,%ebp
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
10e920: 8b 43 30 mov 0x30(%ebx),%eax
10e923: 85 c0 test %eax,%eax
10e925: 74 0d je 10e934 <_User_extensions_Fatal+0x38>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e927: 89 7c 24 08 mov %edi,0x8(%esp)
10e92b: 89 6c 24 04 mov %ebp,0x4(%esp)
10e92f: 89 34 24 mov %esi,(%esp)
10e932: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e934: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e937: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e93d: 75 e1 jne 10e920 <_User_extensions_Fatal+0x24>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e93f: 83 c4 1c add $0x1c,%esp
10e942: 5b pop %ebx
10e943: 5e pop %esi
10e944: 5f pop %edi
10e945: 5d pop %ebp
10e946: c3 ret
0010e7e0 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e7e0: 55 push %ebp
10e7e1: 57 push %edi
10e7e2: 56 push %esi
10e7e3: 53 push %ebx
10e7e4: 83 ec 2c sub $0x2c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10e7e7: 8b 15 44 da 12 00 mov 0x12da44,%edx
10e7ed: 89 54 24 1c mov %edx,0x1c(%esp)
initial_extensions = Configuration.User_extension_table;
10e7f1: 8b 2d 48 da 12 00 mov 0x12da48,%ebp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e7f7: c7 05 2c 21 13 00 30 movl $0x132130,0x13212c
10e7fe: 21 13 00
head->previous = NULL;
10e801: c7 05 30 21 13 00 00 movl $0x0,0x132130
10e808: 00 00 00
tail->previous = head;
10e80b: c7 05 34 21 13 00 2c movl $0x13212c,0x132134
10e812: 21 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e815: c7 05 48 1f 13 00 4c movl $0x131f4c,0x131f48
10e81c: 1f 13 00
head->previous = NULL;
10e81f: c7 05 4c 1f 13 00 00 movl $0x0,0x131f4c
10e826: 00 00 00
tail->previous = head;
10e829: c7 05 50 1f 13 00 48 movl $0x131f48,0x131f50
10e830: 1f 13 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e833: 85 ed test %ebp,%ebp
10e835: 74 4e je 10e885 <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e837: 8d 04 52 lea (%edx,%edx,2),%eax
10e83a: 8d 34 82 lea (%edx,%eax,4),%esi
10e83d: c1 e6 02 shl $0x2,%esi
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
10e840: 89 34 24 mov %esi,(%esp)
10e843: e8 b4 04 00 00 call 10ecfc <_Workspace_Allocate_or_fatal_error>
10e848: 89 c3 mov %eax,%ebx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e84a: 31 c0 xor %eax,%eax
10e84c: 89 df mov %ebx,%edi
10e84e: 89 f1 mov %esi,%ecx
10e850: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e852: 8b 44 24 1c mov 0x1c(%esp),%eax
10e856: 85 c0 test %eax,%eax
10e858: 74 2b je 10e885 <_User_extensions_Handler_initialization+0xa5><== NEVER TAKEN
10e85a: 89 6c 24 18 mov %ebp,0x18(%esp)
10e85e: 31 ed xor %ebp,%ebp
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e860: 8d 7b 14 lea 0x14(%ebx),%edi
10e863: 8b 74 24 18 mov 0x18(%esp),%esi
10e867: b9 08 00 00 00 mov $0x8,%ecx
10e86c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e86e: 89 1c 24 mov %ebx,(%esp)
10e871: e8 06 39 00 00 call 11217c <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e876: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e879: 45 inc %ebp
10e87a: 83 44 24 18 20 addl $0x20,0x18(%esp)
10e87f: 3b 6c 24 1c cmp 0x1c(%esp),%ebp
10e883: 75 db jne 10e860 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e885: 83 c4 2c add $0x2c,%esp
10e888: 5b pop %ebx
10e889: 5e pop %esi
10e88a: 5f pop %edi
10e88b: 5d pop %ebp
10e88c: c3 ret
0010e890 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e890: 56 push %esi
10e891: 53 push %ebx
10e892: 83 ec 14 sub $0x14,%esp
10e895: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e899: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e89f: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e8a5: 74 17 je 10e8be <_User_extensions_Thread_begin+0x2e><== NEVER TAKEN
10e8a7: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
10e8a8: 8b 43 28 mov 0x28(%ebx),%eax
10e8ab: 85 c0 test %eax,%eax
10e8ad: 74 05 je 10e8b4 <_User_extensions_Thread_begin+0x24>
(*the_extension->Callouts.thread_begin)( executing );
10e8af: 89 34 24 mov %esi,(%esp)
10e8b2: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e8b4: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e8b6: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e8bc: 75 ea jne 10e8a8 <_User_extensions_Thread_begin+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
10e8be: 83 c4 14 add $0x14,%esp
10e8c1: 5b pop %ebx
10e8c2: 5e pop %esi
10e8c3: c3 ret
0010e948 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e948: 56 push %esi
10e949: 53 push %ebx
10e94a: 83 ec 14 sub $0x14,%esp
10e94d: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e951: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e957: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e95d: 74 25 je 10e984 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e95f: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
10e960: 8b 43 14 mov 0x14(%ebx),%eax
10e963: 85 c0 test %eax,%eax
10e965: 74 13 je 10e97a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e967: 89 74 24 04 mov %esi,0x4(%esp)
10e96b: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e971: 89 14 24 mov %edx,(%esp)
10e974: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e976: 84 c0 test %al,%al
10e978: 74 0c je 10e986 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e97a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e97c: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e982: 75 dc jne 10e960 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e984: b0 01 mov $0x1,%al
}
10e986: 83 c4 14 add $0x14,%esp
10e989: 5b pop %ebx
10e98a: 5e pop %esi
10e98b: c3 ret
0010e98c <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e98c: 56 push %esi
10e98d: 53 push %ebx
10e98e: 83 ec 14 sub $0x14,%esp
10e991: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e995: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e99b: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e9a1: 74 22 je 10e9c5 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e9a3: 90 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
10e9a4: 8b 43 20 mov 0x20(%ebx),%eax
10e9a7: 85 c0 test %eax,%eax
10e9a9: 74 0f je 10e9ba <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e9ab: 89 74 24 04 mov %esi,0x4(%esp)
10e9af: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e9b5: 89 14 24 mov %edx,(%esp)
10e9b8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e9ba: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e9bd: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e9c3: 75 df jne 10e9a4 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e9c5: 83 c4 14 add $0x14,%esp
10e9c8: 5b pop %ebx
10e9c9: 5e pop %esi
10e9ca: c3 ret
0010e8c4 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e8c4: 56 push %esi
10e8c5: 53 push %ebx
10e8c6: 83 ec 14 sub $0x14,%esp
10e8c9: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
10e8cd: 8b 1d 34 21 13 00 mov 0x132134,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e8d3: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e8d9: 74 18 je 10e8f3 <_User_extensions_Thread_exitted+0x2f><== NEVER TAKEN
10e8db: 90 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
10e8dc: 8b 43 2c mov 0x2c(%ebx),%eax
10e8df: 85 c0 test %eax,%eax
10e8e1: 74 05 je 10e8e8 <_User_extensions_Thread_exitted+0x24>
(*the_extension->Callouts.thread_exitted)( executing );
10e8e3: 89 34 24 mov %esi,(%esp)
10e8e6: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e8e8: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e8eb: 81 fb 2c 21 13 00 cmp $0x13212c,%ebx
10e8f1: 75 e9 jne 10e8dc <_User_extensions_Thread_exitted+0x18>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
10e8f3: 83 c4 14 add $0x14,%esp
10e8f6: 5b pop %ebx
10e8f7: 5e pop %esi
10e8f8: c3 ret
0010f1cc <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f1cc: 56 push %esi
10f1cd: 53 push %ebx
10f1ce: 83 ec 14 sub $0x14,%esp
10f1d1: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10f1d5: 8b 1d ac 2c 13 00 mov 0x132cac,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f1db: 81 fb b0 2c 13 00 cmp $0x132cb0,%ebx
10f1e1: 74 21 je 10f204 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f1e3: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
10f1e4: 8b 43 1c mov 0x1c(%ebx),%eax
10f1e7: 85 c0 test %eax,%eax
10f1e9: 74 0f je 10f1fa <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f1eb: 89 74 24 04 mov %esi,0x4(%esp)
10f1ef: 8b 15 4c 30 13 00 mov 0x13304c,%edx
10f1f5: 89 14 24 mov %edx,(%esp)
10f1f8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f1fa: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f1fc: 81 fb b0 2c 13 00 cmp $0x132cb0,%ebx
10f202: 75 e0 jne 10f1e4 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f204: 83 c4 14 add $0x14,%esp
10f207: 5b pop %ebx
10f208: 5e pop %esi
10f209: c3 ret
0010e9cc <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e9cc: 56 push %esi
10e9cd: 53 push %ebx
10e9ce: 83 ec 14 sub $0x14,%esp
10e9d1: 8b 74 24 20 mov 0x20(%esp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10e9d5: 8b 1d 2c 21 13 00 mov 0x13212c,%ebx
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e9db: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10e9e1: 74 21 je 10ea04 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e9e3: 90 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
10e9e4: 8b 43 18 mov 0x18(%ebx),%eax
10e9e7: 85 c0 test %eax,%eax
10e9e9: 74 0f je 10e9fa <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e9eb: 89 74 24 04 mov %esi,0x4(%esp)
10e9ef: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
10e9f5: 89 14 24 mov %edx,(%esp)
10e9f8: ff d0 call *%eax
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e9fa: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e9fc: 81 fb 30 21 13 00 cmp $0x132130,%ebx
10ea02: 75 e0 jne 10e9e4 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10ea04: 83 c4 14 add $0x14,%esp
10ea07: 5b pop %ebx
10ea08: 5e pop %esi
10ea09: c3 ret
0010ea0c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10ea0c: 57 push %edi
10ea0d: 56 push %esi
10ea0e: 53 push %ebx
10ea0f: 83 ec 10 sub $0x10,%esp
10ea12: 8b 7c 24 20 mov 0x20(%esp),%edi
10ea16: 8b 74 24 24 mov 0x24(%esp),%esi
10ea1a: 8b 1d 48 1f 13 00 mov 0x131f48,%ebx
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10ea20: 81 fb 4c 1f 13 00 cmp $0x131f4c,%ebx
10ea26: 74 14 je 10ea3c <_User_extensions_Thread_switch+0x30><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
10ea28: 89 74 24 04 mov %esi,0x4(%esp)
10ea2c: 89 3c 24 mov %edi,(%esp)
10ea2f: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10ea32: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10ea34: 81 fb 4c 1f 13 00 cmp $0x131f4c,%ebx
10ea3a: 75 ec jne 10ea28 <_User_extensions_Thread_switch+0x1c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10ea3c: 83 c4 10 add $0x10,%esp
10ea3f: 5b pop %ebx
10ea40: 5e pop %esi
10ea41: 5f pop %edi
10ea42: c3 ret
00110190 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
110190: 57 push %edi
110191: 56 push %esi
110192: 53 push %ebx
110193: 83 ec 10 sub $0x10,%esp
110196: 8b 74 24 20 mov 0x20(%esp),%esi
11019a: 8b 4c 24 24 mov 0x24(%esp),%ecx
11019e: 8b 5c 24 28 mov 0x28(%esp),%ebx
ISR_Level level;
_ISR_Disable( level );
1101a2: 9c pushf
1101a3: fa cli
1101a4: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1101a5: 8b 06 mov (%esi),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1101a7: 8d 7e 04 lea 0x4(%esi),%edi
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
1101aa: 39 f8 cmp %edi,%eax
1101ac: 74 39 je 1101e7 <_Watchdog_Adjust+0x57>
switch ( direction ) {
1101ae: 85 c9 test %ecx,%ecx
1101b0: 75 3e jne 1101f0 <_Watchdog_Adjust+0x60>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1101b2: 85 db test %ebx,%ebx
1101b4: 74 31 je 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1101b6: 8b 48 10 mov 0x10(%eax),%ecx
1101b9: 39 cb cmp %ecx,%ebx
1101bb: 73 0e jae 1101cb <_Watchdog_Adjust+0x3b> <== ALWAYS TAKEN
1101bd: eb 39 jmp 1101f8 <_Watchdog_Adjust+0x68> <== NOT EXECUTED
1101bf: 90 nop <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1101c0: 85 db test %ebx,%ebx
1101c2: 74 23 je 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1101c4: 8b 48 10 mov 0x10(%eax),%ecx
1101c7: 39 d9 cmp %ebx,%ecx
1101c9: 77 2d ja 1101f8 <_Watchdog_Adjust+0x68>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
1101cb: 29 cb sub %ecx,%ebx
_Watchdog_First( header )->delta_interval = 1;
1101cd: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
_ISR_Enable( level );
1101d4: 52 push %edx
1101d5: 9d popf
_Watchdog_Tickle( header );
1101d6: 89 34 24 mov %esi,(%esp)
1101d9: e8 aa 01 00 00 call 110388 <_Watchdog_Tickle>
_ISR_Disable( level );
1101de: 9c pushf
1101df: fa cli
1101e0: 5a pop %edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
1101e1: 8b 06 mov (%esi),%eax
if ( _Chain_Is_empty( header ) )
1101e3: 39 c7 cmp %eax,%edi
1101e5: 75 d9 jne 1101c0 <_Watchdog_Adjust+0x30>
}
break;
}
}
_ISR_Enable( level );
1101e7: 52 push %edx
1101e8: 9d popf
}
1101e9: 83 c4 10 add $0x10,%esp
1101ec: 5b pop %ebx
1101ed: 5e pop %esi
1101ee: 5f pop %edi
1101ef: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
1101f0: 49 dec %ecx
1101f1: 75 f4 jne 1101e7 <_Watchdog_Adjust+0x57> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
1101f3: 01 58 10 add %ebx,0x10(%eax)
break;
1101f6: eb ef jmp 1101e7 <_Watchdog_Adjust+0x57>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
1101f8: 29 d9 sub %ebx,%ecx
1101fa: 89 48 10 mov %ecx,0x10(%eax)
break;
1101fd: eb e8 jmp 1101e7 <_Watchdog_Adjust+0x57>
0010eb60 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10eb60: 56 push %esi
10eb61: 53 push %ebx
10eb62: 8b 54 24 0c mov 0xc(%esp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10eb66: 9c pushf
10eb67: fa cli
10eb68: 59 pop %ecx
previous_state = the_watchdog->state;
10eb69: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10eb6c: 83 f8 01 cmp $0x1,%eax
10eb6f: 74 4f je 10ebc0 <_Watchdog_Remove+0x60>
10eb71: 73 11 jae 10eb84 <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10eb73: 8b 1d 44 20 13 00 mov 0x132044,%ebx
10eb79: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10eb7c: 51 push %ecx
10eb7d: 9d popf
return( previous_state );
}
10eb7e: 5b pop %ebx
10eb7f: 5e pop %esi
10eb80: c3 ret
10eb81: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10eb84: 83 f8 03 cmp $0x3,%eax
10eb87: 77 ea ja 10eb73 <_Watchdog_Remove+0x13> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10eb89: 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 );
}
10eb90: 8b 1a mov (%edx),%ebx
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10eb92: 8b 33 mov (%ebx),%esi
10eb94: 85 f6 test %esi,%esi
10eb96: 74 06 je 10eb9e <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10eb98: 8b 72 10 mov 0x10(%edx),%esi
10eb9b: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10eb9e: 8b 35 40 20 13 00 mov 0x132040,%esi
10eba4: 85 f6 test %esi,%esi
10eba6: 74 0c je 10ebb4 <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10eba8: 8b 35 c8 24 13 00 mov 0x1324c8,%esi
10ebae: 89 35 d4 1f 13 00 mov %esi,0x131fd4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ebb4: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10ebb7: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10ebba: 89 1e mov %ebx,(%esi)
10ebbc: eb b5 jmp 10eb73 <_Watchdog_Remove+0x13>
10ebbe: 66 90 xchg %ax,%ax
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
10ebc0: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ebc7: eb aa jmp 10eb73 <_Watchdog_Remove+0x13>
0010fb6c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fb6c: 55 push %ebp
10fb6d: 57 push %edi
10fb6e: 56 push %esi
10fb6f: 53 push %ebx
10fb70: 83 ec 1c sub $0x1c,%esp
10fb73: 8b 7c 24 30 mov 0x30(%esp),%edi
10fb77: 8b 74 24 34 mov 0x34(%esp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fb7b: 9c pushf
10fb7c: fa cli
10fb7d: 5d pop %ebp
printk( "Watchdog Chain: %s %p\n", name, header );
10fb7e: 89 74 24 08 mov %esi,0x8(%esp)
10fb82: 89 7c 24 04 mov %edi,0x4(%esp)
10fb86: c7 04 24 eb 46 12 00 movl $0x1246eb,(%esp)
10fb8d: e8 86 95 ff ff call 109118 <printk>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10fb92: 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 );
10fb94: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
10fb97: 39 f3 cmp %esi,%ebx
10fb99: 74 31 je 10fbcc <_Watchdog_Report_chain+0x60>
10fb9b: 90 nop
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fb9c: 89 5c 24 04 mov %ebx,0x4(%esp)
10fba0: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10fba7: e8 30 00 00 00 call 10fbdc <_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 )
10fbac: 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 ) ;
10fbae: 39 f3 cmp %esi,%ebx
10fbb0: 75 ea jne 10fb9c <_Watchdog_Report_chain+0x30><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fbb2: 89 7c 24 04 mov %edi,0x4(%esp)
10fbb6: c7 04 24 02 47 12 00 movl $0x124702,(%esp)
10fbbd: e8 56 95 ff ff call 109118 <printk>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fbc2: 55 push %ebp
10fbc3: 9d popf
}
10fbc4: 83 c4 1c add $0x1c,%esp
10fbc7: 5b pop %ebx
10fbc8: 5e pop %esi
10fbc9: 5f pop %edi
10fbca: 5d pop %ebp
10fbcb: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fbcc: c7 04 24 11 47 12 00 movl $0x124711,(%esp)
10fbd3: e8 40 95 ff ff call 109118 <printk>
10fbd8: eb e8 jmp 10fbc2 <_Watchdog_Report_chain+0x56>
0010ebcc <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10ebcc: 55 push %ebp
10ebcd: 57 push %edi
10ebce: 56 push %esi
10ebcf: 53 push %ebx
10ebd0: 83 ec 1c sub $0x1c,%esp
10ebd3: 8b 7c 24 30 mov 0x30(%esp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10ebd7: 9c pushf
10ebd8: fa cli
10ebd9: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10ebda: 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 );
10ebdc: 8d 6f 04 lea 0x4(%edi),%ebp
if ( _Chain_Is_empty( header ) )
10ebdf: 39 eb cmp %ebp,%ebx
10ebe1: 74 11 je 10ebf4 <_Watchdog_Tickle+0x28>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
10ebe3: 8b 43 10 mov 0x10(%ebx),%eax
10ebe6: 85 c0 test %eax,%eax
10ebe8: 74 34 je 10ec1e <_Watchdog_Tickle+0x52>
the_watchdog->delta_interval--;
10ebea: 48 dec %eax
10ebeb: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10ebee: 85 c0 test %eax,%eax
10ebf0: 74 2c je 10ec1e <_Watchdog_Tickle+0x52>
10ebf2: 66 90 xchg %ax,%ax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10ebf4: 56 push %esi
10ebf5: 9d popf
}
10ebf6: 83 c4 1c add $0x1c,%esp
10ebf9: 5b pop %ebx
10ebfa: 5e pop %esi
10ebfb: 5f pop %edi
10ebfc: 5d pop %ebp
10ebfd: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10ebfe: 8b 43 24 mov 0x24(%ebx),%eax
10ec01: 89 44 24 04 mov %eax,0x4(%esp)
10ec05: 8b 43 20 mov 0x20(%ebx),%eax
10ec08: 89 04 24 mov %eax,(%esp)
10ec0b: ff 53 1c call *0x1c(%ebx)
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10ec0e: 9c pushf
10ec0f: fa cli
10ec10: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ec11: 8b 1f mov (%edi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10ec13: 39 dd cmp %ebx,%ebp
10ec15: 74 dd je 10ebf4 <_Watchdog_Tickle+0x28>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
10ec17: 8b 43 10 mov 0x10(%ebx),%eax
10ec1a: 85 c0 test %eax,%eax
10ec1c: 75 d6 jne 10ebf4 <_Watchdog_Tickle+0x28>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10ec1e: 89 1c 24 mov %ebx,(%esp)
10ec21: e8 3a ff ff ff call 10eb60 <_Watchdog_Remove>
_ISR_Enable( level );
10ec26: 56 push %esi
10ec27: 9d popf
switch( watchdog_state ) {
10ec28: 83 f8 02 cmp $0x2,%eax
10ec2b: 75 e1 jne 10ec0e <_Watchdog_Tickle+0x42> <== NEVER TAKEN
10ec2d: eb cf jmp 10ebfe <_Watchdog_Tickle+0x32>
0010ec30 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10ec30: 57 push %edi
10ec31: 53 push %ebx
10ec32: 83 ec 14 sub $0x14,%esp
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
10ec35: 8b 15 00 da 12 00 mov 0x12da00,%edx
uintptr_t size = rtems_configuration_get_work_space_size();
10ec3b: a1 04 da 12 00 mov 0x12da04,%eax
10ec40: 80 3d 36 da 12 00 00 cmpb $0x0,0x12da36
10ec47: 75 37 jne 10ec80 <_Workspace_Handler_initialization+0x50><== NEVER TAKEN
10ec49: 8b 1d 08 da 12 00 mov 0x12da08,%ebx
10ec4f: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10ec51: 80 3d 34 da 12 00 00 cmpb $0x0,0x12da34
10ec58: 75 33 jne 10ec8d <_Workspace_Handler_initialization+0x5d>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10ec5a: c7 44 24 0c 04 00 00 movl $0x4,0xc(%esp)
10ec61: 00
10ec62: 89 5c 24 08 mov %ebx,0x8(%esp)
10ec66: 89 54 24 04 mov %edx,0x4(%esp)
10ec6a: c7 04 24 60 1f 13 00 movl $0x131f60,(%esp)
10ec71: e8 8e dd ff ff call 10ca04 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10ec76: 85 c0 test %eax,%eax
10ec78: 74 1d je 10ec97 <_Workspace_Handler_initialization+0x67>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10ec7a: 83 c4 14 add $0x14,%esp
10ec7d: 5b pop %ebx
10ec7e: 5f pop %edi
10ec7f: c3 ret
*/
void _Workspace_Handler_initialization(void)
{
uintptr_t memory_available = 0;
void *starting_address = rtems_configuration_get_work_space_start();
uintptr_t size = rtems_configuration_get_work_space_size();
10ec80: 31 db xor %ebx,%ebx
10ec82: 01 c3 add %eax,%ebx
if ( rtems_configuration_get_do_zero_of_workspace() )
10ec84: 80 3d 34 da 12 00 00 cmpb $0x0,0x12da34
10ec8b: 74 cd je 10ec5a <_Workspace_Handler_initialization+0x2a>
memset( starting_address, 0, size );
10ec8d: 31 c0 xor %eax,%eax
10ec8f: 89 d7 mov %edx,%edi
10ec91: 89 d9 mov %ebx,%ecx
10ec93: f3 aa rep stos %al,%es:(%edi)
10ec95: eb c3 jmp 10ec5a <_Workspace_Handler_initialization+0x2a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10ec97: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
10ec9e: 00
10ec9f: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10eca6: 00
10eca7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10ecae: e8 59 df ff ff call 10cc0c <_Internal_error_Occurred>
0010b7e0 <adjtime>:
int adjtime(
const struct timeval *delta,
struct timeval *olddelta
)
{
10b7e0: 55 push %ebp
10b7e1: 57 push %edi
10b7e2: 56 push %esi
10b7e3: 53 push %ebx
10b7e4: 83 ec 3c sub $0x3c,%esp
10b7e7: 8b 6c 24 50 mov 0x50(%esp),%ebp
10b7eb: 8b 74 24 54 mov 0x54(%esp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10b7ef: 85 ed test %ebp,%ebp
10b7f1: 0f 84 3f 01 00 00 je 10b936 <adjtime+0x156>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10b7f7: 8b 55 04 mov 0x4(%ebp),%edx
10b7fa: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10b800: 0f 87 30 01 00 00 ja 10b936 <adjtime+0x156>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10b806: 85 f6 test %esi,%esi
10b808: 74 10 je 10b81a <adjtime+0x3a>
olddelta->tv_sec = 0;
10b80a: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10b810: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10b817: 8b 55 04 mov 0x4(%ebp),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10b81a: 8b 45 00 mov 0x0(%ebp),%eax
10b81d: 8d 04 80 lea (%eax,%eax,4),%eax
10b820: 8d 04 80 lea (%eax,%eax,4),%eax
10b823: 8d 04 80 lea (%eax,%eax,4),%eax
10b826: 8d 04 80 lea (%eax,%eax,4),%eax
10b829: 8d 04 80 lea (%eax,%eax,4),%eax
10b82c: 8d 04 80 lea (%eax,%eax,4),%eax
10b82f: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
10b832: 01 d0 add %edx,%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10b834: 3b 05 b0 f2 12 00 cmp 0x12f2b0,%eax
10b83a: 73 0c jae 10b848 <adjtime+0x68>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
10b83c: 31 c0 xor %eax,%eax
}
10b83e: 83 c4 3c add $0x3c,%esp
10b841: 5b pop %ebx
10b842: 5e pop %esi
10b843: 5f pop %edi
10b844: 5d pop %ebp
10b845: c3 ret
10b846: 66 90 xchg %ax,%ax
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10b848: a1 04 39 13 00 mov 0x133904,%eax
10b84d: 40 inc %eax
10b84e: a3 04 39 13 00 mov %eax,0x133904
return _Thread_Dispatch_disable_level;
10b853: a1 04 39 13 00 mov 0x133904,%eax
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b858: 8d 7c 24 28 lea 0x28(%esp),%edi
10b85c: 89 3c 24 mov %edi,(%esp)
10b85f: e8 30 18 00 00 call 10d094 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b864: 8b 44 24 28 mov 0x28(%esp),%eax
10b868: 8b 54 24 2c mov 0x2c(%esp),%edx
10b86c: 89 44 24 18 mov %eax,0x18(%esp)
10b870: 89 54 24 1c mov %edx,0x1c(%esp)
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b874: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b87b: 3b
10b87c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b883: 00
10b884: 89 04 24 mov %eax,(%esp)
10b887: 89 54 24 04 mov %edx,0x4(%esp)
10b88b: e8 9c 57 01 00 call 12102c <__divdi3>
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
10b890: 8b 5d 00 mov 0x0(%ebp),%ebx
10b893: 01 c3 add %eax,%ebx
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b895: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b89c: 3b
10b89d: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b8a4: 00
10b8a5: 8b 44 24 18 mov 0x18(%esp),%eax
10b8a9: 8b 54 24 1c mov 0x1c(%esp),%edx
10b8ad: 89 04 24 mov %eax,(%esp)
10b8b0: 89 54 24 04 mov %edx,0x4(%esp)
10b8b4: e8 c7 58 01 00 call 121180 <__moddi3>
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10b8b9: 8b 55 04 mov 0x4(%ebp),%edx
10b8bc: 8d 14 92 lea (%edx,%edx,4),%edx
10b8bf: 8d 14 92 lea (%edx,%edx,4),%edx
10b8c2: 8d 14 92 lea (%edx,%edx,4),%edx
10b8c5: 8d 0c d0 lea (%eax,%edx,8),%ecx
int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
struct itimerval *__ovalue));
#if defined(__rtems__)
/* BSD function used by RTEMS code */
int _EXFUN(adjtime,(const struct timeval *, struct timeval *));
10b8c8: 8d 43 01 lea 0x1(%ebx),%eax
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b8cb: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx
10b8d1: 76 12 jbe 10b8e5 <adjtime+0x105>
10b8d3: 90 nop
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10b8d4: 81 e9 00 ca 9a 3b sub $0x3b9aca00,%ecx
ts.tv_sec++;
10b8da: 89 c3 mov %eax,%ebx
10b8dc: 40 inc %eax
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b8dd: 81 f9 ff c9 9a 3b cmp $0x3b9ac9ff,%ecx
10b8e3: 77 ef ja 10b8d4 <adjtime+0xf4> <== NEVER TAKEN
10b8e5: 4b dec %ebx
10b8e6: 66 90 xchg %ax,%ax
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10b8e8: 81 c1 00 ca 9a 3b add $0x3b9aca00,%ecx
ts.tv_sec--;
10b8ee: 89 d8 mov %ebx,%eax
10b8f0: 4b dec %ebx
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
10b8f1: 81 f9 00 36 65 c4 cmp $0xc4653600,%ecx
10b8f7: 76 ef jbe 10b8e8 <adjtime+0x108>
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
10b8f9: 89 cb mov %ecx,%ebx
10b8fb: c1 fb 1f sar $0x1f,%ebx
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
10b8fe: ba 00 ca 9a 3b mov $0x3b9aca00,%edx
10b903: f7 ea imul %edx
10b905: 01 c1 add %eax,%ecx
10b907: 11 d3 adc %edx,%ebx
10b909: 89 4c 24 28 mov %ecx,0x28(%esp)
10b90d: 89 5c 24 2c mov %ebx,0x2c(%esp)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
10b911: 89 3c 24 mov %edi,(%esp)
10b914: e8 d7 17 00 00 call 10d0f0 <_TOD_Set_with_timestamp>
ts.tv_sec--;
}
_TOD_Set( &ts );
_Thread_Enable_dispatch();
10b919: e8 16 2e 00 00 call 10e734 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10b91e: 85 f6 test %esi,%esi
10b920: 0f 84 16 ff ff ff je 10b83c <adjtime+0x5c>
*olddelta = *delta;
10b926: 8b 45 00 mov 0x0(%ebp),%eax
10b929: 8b 55 04 mov 0x4(%ebp),%edx
10b92c: 89 06 mov %eax,(%esi)
10b92e: 89 56 04 mov %edx,0x4(%esi)
10b931: e9 06 ff ff ff jmp 10b83c <adjtime+0x5c>
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
10b936: e8 e9 8c 00 00 call 114624 <__errno>
10b93b: c7 00 16 00 00 00 movl $0x16,(%eax)
10b941: b8 ff ff ff ff mov $0xffffffff,%eax
10b946: e9 f3 fe ff ff jmp 10b83e <adjtime+0x5e>
0010b8e4 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
10b8e4: 57 push %edi
10b8e5: 56 push %esi
10b8e6: 53 push %ebx
10b8e7: 83 ec 10 sub $0x10,%esp
10b8ea: 8b 74 24 20 mov 0x20(%esp),%esi
10b8ee: 8b 5c 24 24 mov 0x24(%esp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
10b8f2: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b8f9: e8 a2 12 00 00 call 10cba0 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
10b8fe: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10b905: 00
10b906: 89 34 24 mov %esi,(%esp)
10b909: e8 0a 68 00 00 call 112118 <fcntl>
10b90e: 85 c0 test %eax,%eax
10b910: 0f 88 b6 01 00 00 js 10bacc <aio_cancel+0x1e8>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
10b916: 85 db test %ebx,%ebx
10b918: 0f 84 ea 00 00 00 je 10ba08 <aio_cancel+0x124>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
10b91e: 8b 3b mov (%ebx),%edi
10b920: 39 f7 cmp %esi,%edi
10b922: 0f 85 bc 00 00 00 jne 10b9e4 <aio_cancel+0x100>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10b928: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10b92f: 00
10b930: 89 7c 24 04 mov %edi,0x4(%esp)
10b934: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10b93b: e8 84 06 00 00 call 10bfc4 <rtems_aio_search_fd>
10b940: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
10b942: 85 c0 test %eax,%eax
10b944: 74 3a je 10b980 <aio_cancel+0x9c>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10b946: 8d 78 1c lea 0x1c(%eax),%edi
10b949: 89 3c 24 mov %edi,(%esp)
10b94c: e8 4f 12 00 00 call 10cba0 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10b951: 89 5c 24 04 mov %ebx,0x4(%esp)
10b955: 83 c6 08 add $0x8,%esi
10b958: 89 34 24 mov %esi,(%esp)
10b95b: e8 5c 07 00 00 call 10c0bc <rtems_aio_remove_req>
10b960: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
10b962: 89 3c 24 mov %edi,(%esp)
10b965: e8 da 12 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10b96a: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b971: e8 ce 12 00 00 call 10cc44 <pthread_mutex_unlock>
return result;
}
return AIO_ALLDONE;
}
10b976: 89 d8 mov %ebx,%eax
10b978: 83 c4 10 add $0x10,%esp
10b97b: 5b pop %ebx
10b97c: 5e pop %esi
10b97d: 5f pop %edi
10b97e: c3 ret
10b97f: 90 nop
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10b980: 81 3d d4 4d 13 00 d8 cmpl $0x134dd8,0x134dd4
10b987: 4d 13 00
10b98a: 74 44 je 10b9d0 <aio_cancel+0xec> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10b98c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10b993: 00
10b994: 89 7c 24 04 mov %edi,0x4(%esp)
10b998: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10b99f: e8 20 06 00 00 call 10bfc4 <rtems_aio_search_fd>
if (r_chain == NULL) {
10b9a4: 85 c0 test %eax,%eax
10b9a6: 74 3c je 10b9e4 <aio_cancel+0x100>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10b9a8: 89 5c 24 04 mov %ebx,0x4(%esp)
10b9ac: 83 c0 08 add $0x8,%eax
10b9af: 89 04 24 mov %eax,(%esp)
10b9b2: e8 05 07 00 00 call 10c0bc <rtems_aio_remove_req>
10b9b7: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&aio_request_queue.mutex);
10b9b9: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9c0: e8 7f 12 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
10b9c5: 89 d8 mov %ebx,%eax
10b9c7: 83 c4 10 add $0x10,%esp
10b9ca: 5b pop %ebx
10b9cb: 5e pop %esi
10b9cc: 5f pop %edi
10b9cd: c3 ret
10b9ce: 66 90 xchg %ax,%ax
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10b9d0: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9d7: e8 68 12 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_ALLDONE;
10b9dc: bb 02 00 00 00 mov $0x2,%ebx
10b9e1: eb 93 jmp 10b976 <aio_cancel+0x92>
10b9e3: 90 nop
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10b9e4: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10b9eb: e8 54 12 00 00 call 10cc44 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
10b9f0: e8 c3 a4 00 00 call 115eb8 <__errno>
10b9f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b9fb: bb ff ff ff ff mov $0xffffffff,%ebx
10ba00: e9 71 ff ff ff jmp 10b976 <aio_cancel+0x92>
10ba05: 8d 76 00 lea 0x0(%esi),%esi
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10ba08: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ba0f: 00
10ba10: 89 74 24 04 mov %esi,0x4(%esp)
10ba14: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10ba1b: e8 a4 05 00 00 call 10bfc4 <rtems_aio_search_fd>
10ba20: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10ba22: 85 c0 test %eax,%eax
10ba24: 74 36 je 10ba5c <aio_cancel+0x178>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10ba26: 8d 70 1c lea 0x1c(%eax),%esi
10ba29: 89 34 24 mov %esi,(%esp)
10ba2c: e8 6f 11 00 00 call 10cba0 <pthread_mutex_lock>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10ba31: 89 1c 24 mov %ebx,(%esp)
10ba34: e8 43 2c 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10ba39: 89 1c 24 mov %ebx,(%esp)
10ba3c: e8 37 06 00 00 call 10c078 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
10ba41: 89 34 24 mov %esi,(%esp)
10ba44: e8 fb 11 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10ba49: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10ba50: e8 ef 11 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_CANCELED;
10ba55: 31 db xor %ebx,%ebx
10ba57: e9 1a ff ff ff jmp 10b976 <aio_cancel+0x92>
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10ba5c: 81 3d d4 4d 13 00 d8 cmpl $0x134dd8,0x134dd4
10ba63: 4d 13 00
10ba66: 0f 84 64 ff ff ff je 10b9d0 <aio_cancel+0xec> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10ba6c: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10ba73: 00
10ba74: 89 74 24 04 mov %esi,0x4(%esp)
10ba78: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10ba7f: e8 40 05 00 00 call 10bfc4 <rtems_aio_search_fd>
10ba84: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10ba86: 85 c0 test %eax,%eax
10ba88: 0f 84 42 ff ff ff je 10b9d0 <aio_cancel+0xec>
10ba8e: 89 04 24 mov %eax,(%esp)
10ba91: e8 e6 2b 00 00 call 10e67c <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10ba96: 89 1c 24 mov %ebx,(%esp)
10ba99: e8 da 05 00 00 call 10c078 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
10ba9e: 8d 73 1c lea 0x1c(%ebx),%esi
10baa1: 89 34 24 mov %esi,(%esp)
10baa4: e8 4f 0e 00 00 call 10c8f8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
10baa9: 89 34 24 mov %esi,(%esp)
10baac: e8 cf 0a 00 00 call 10c580 <pthread_cond_destroy>
free (r_chain);
10bab1: 89 1c 24 mov %ebx,(%esp)
10bab4: e8 b7 c2 ff ff call 107d70 <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
10bab9: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bac0: e8 7f 11 00 00 call 10cc44 <pthread_mutex_unlock>
return AIO_CANCELED;
10bac5: 31 db xor %ebx,%ebx
10bac7: e9 aa fe ff ff jmp 10b976 <aio_cancel+0x92>
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10bacc: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bad3: e8 6c 11 00 00 call 10cc44 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
10bad8: e8 db a3 00 00 call 115eb8 <__errno>
10badd: c7 00 09 00 00 00 movl $0x9,(%eax)
10bae3: bb ff ff ff ff mov $0xffffffff,%ebx
10bae8: e9 89 fe ff ff jmp 10b976 <aio_cancel+0x92>
0010baf8 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10baf8: 53 push %ebx
10baf9: 83 ec 18 sub $0x18,%esp
10bafc: 8b 5c 24 24 mov 0x24(%esp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10bb00: 81 7c 24 20 00 20 00 cmpl $0x2000,0x20(%esp)
10bb07: 00
10bb08: 75 42 jne 10bb4c <aio_fsync+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10bb0a: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10bb11: 00
10bb12: 8b 03 mov (%ebx),%eax
10bb14: 89 04 24 mov %eax,(%esp)
10bb17: e8 fc 65 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10bb1c: 83 e0 03 and $0x3,%eax
10bb1f: 48 dec %eax
10bb20: 83 f8 01 cmp $0x1,%eax
10bb23: 77 4b ja 10bb70 <aio_fsync+0x78>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10bb25: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10bb2c: e8 83 c6 ff ff call 1081b4 <malloc>
if (req == NULL)
10bb31: 85 c0 test %eax,%eax
10bb33: 74 56 je 10bb8b <aio_fsync+0x93> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10bb35: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10bb38: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10bb3f: 89 44 24 20 mov %eax,0x20(%esp)
}
10bb43: 83 c4 18 add $0x18,%esp
10bb46: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10bb47: e9 d0 05 00 00 jmp 10c11c <rtems_aio_enqueue>
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10bb4c: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10bb53: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bb5a: e8 59 a3 00 00 call 115eb8 <__errno>
10bb5f: c7 00 16 00 00 00 movl $0x16,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
10bb65: b8 ff ff ff ff mov $0xffffffff,%eax
10bb6a: 83 c4 18 add $0x18,%esp
10bb6d: 5b pop %ebx
10bb6e: c3 ret
10bb6f: 90 nop
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10bb70: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10bb77: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bb7e: e8 35 a3 00 00 call 115eb8 <__errno>
10bb83: c7 00 09 00 00 00 movl $0x9,(%eax)
10bb89: eb da jmp 10bb65 <aio_fsync+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10bb8b: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10bb92: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10bb99: e8 1a a3 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10bb9e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10bba4: eb bf jmp 10bb65 <aio_fsync+0x6d> <== NOT EXECUTED
0010c348 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10c348: 53 push %ebx
10c349: 83 ec 18 sub $0x18,%esp
10c34c: 8b 5c 24 20 mov 0x20(%esp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c350: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10c357: 00
10c358: 8b 03 mov (%ebx),%eax
10c35a: 89 04 24 mov %eax,(%esp)
10c35d: e8 b6 5d 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c362: 83 e0 03 and $0x3,%eax
10c365: 74 05 je 10c36c <aio_read+0x24> <== NEVER TAKEN
10c367: 83 f8 02 cmp $0x2,%eax
10c36a: 75 38 jne 10c3a4 <aio_read+0x5c>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c36c: 8b 53 14 mov 0x14(%ebx),%edx
10c36f: 85 d2 test %edx,%edx
10c371: 75 55 jne 10c3c8 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c373: 8b 43 08 mov 0x8(%ebx),%eax
10c376: 85 c0 test %eax,%eax
10c378: 78 4e js 10c3c8 <aio_read+0x80>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c37a: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10c381: e8 2e be ff ff call 1081b4 <malloc>
if (req == NULL)
10c386: 85 c0 test %eax,%eax
10c388: 74 59 je 10c3e3 <aio_read+0x9b> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c38a: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10c38d: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c394: 89 44 24 20 mov %eax,0x20(%esp)
}
10c398: 83 c4 18 add $0x18,%esp
10c39b: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10c39c: e9 7b fd ff ff jmp 10c11c <rtems_aio_enqueue>
10c3a1: 8d 76 00 lea 0x0(%esi),%esi
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c3a4: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c3ab: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c3b2: e8 01 9b 00 00 call 115eb8 <__errno>
10c3b7: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
10c3bd: b8 ff ff ff ff mov $0xffffffff,%eax
10c3c2: 83 c4 18 add $0x18,%esp
10c3c5: 5b pop %ebx
10c3c6: c3 ret
10c3c7: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c3c8: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c3cf: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c3d6: e8 dd 9a 00 00 call 115eb8 <__errno>
10c3db: c7 00 16 00 00 00 movl $0x16,(%eax)
10c3e1: eb da jmp 10c3bd <aio_read+0x75>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c3e3: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c3ea: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c3f1: e8 c2 9a 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10c3f6: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c3fc: eb bf jmp 10c3bd <aio_read+0x75> <== NOT EXECUTED
0010c408 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10c408: 53 push %ebx
10c409: 83 ec 18 sub $0x18,%esp
10c40c: 8b 5c 24 20 mov 0x20(%esp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c410: c7 44 24 04 03 00 00 movl $0x3,0x4(%esp)
10c417: 00
10c418: 8b 03 mov (%ebx),%eax
10c41a: 89 04 24 mov %eax,(%esp)
10c41d: e8 f6 5c 00 00 call 112118 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c422: 83 e0 03 and $0x3,%eax
10c425: 48 dec %eax
10c426: 83 f8 01 cmp $0x1,%eax
10c429: 77 35 ja 10c460 <aio_write+0x58>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c42b: 8b 53 14 mov 0x14(%ebx),%edx
10c42e: 85 d2 test %edx,%edx
10c430: 75 52 jne 10c484 <aio_write+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c432: 8b 43 08 mov 0x8(%ebx),%eax
10c435: 85 c0 test %eax,%eax
10c437: 78 4b js 10c484 <aio_write+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c439: c7 04 24 18 00 00 00 movl $0x18,(%esp)
10c440: e8 6f bd ff ff call 1081b4 <malloc>
if (req == NULL)
10c445: 85 c0 test %eax,%eax
10c447: 74 56 je 10c49f <aio_write+0x97> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c449: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10c44c: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c453: 89 44 24 20 mov %eax,0x20(%esp)
}
10c457: 83 c4 18 add $0x18,%esp
10c45a: 5b pop %ebx
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10c45b: e9 bc fc ff ff jmp 10c11c <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c460: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c467: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c46e: e8 45 9a 00 00 call 115eb8 <__errno>
10c473: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
10c479: b8 ff ff ff ff mov $0xffffffff,%eax
10c47e: 83 c4 18 add $0x18,%esp
10c481: 5b pop %ebx
10c482: c3 ret
10c483: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c484: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c48b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c492: e8 21 9a 00 00 call 115eb8 <__errno>
10c497: c7 00 16 00 00 00 movl $0x16,(%eax)
10c49d: eb da jmp 10c479 <aio_write+0x71>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c49f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c4a6: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c4ad: e8 06 9a 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10c4b2: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c4b8: eb bf jmp 10c479 <aio_write+0x71> <== NOT EXECUTED
0010c890 <check_and_merge>:
rtems_chain_control *free_chain,
rtems_rbtree_control *chunk_tree,
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
10c890: 57 push %edi
10c891: 56 push %esi
10c892: 53 push %ebx
10c893: 83 ec 10 sub $0x10,%esp
10c896: 8b 5c 24 20 mov 0x20(%esp),%ebx
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
10c89a: 83 fb f8 cmp $0xfffffff8,%ebx
10c89d: 74 37 je 10c8d6 <check_and_merge+0x46>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c89f: 8b 33 mov (%ebx),%esi
10c8a1: 85 f6 test %esi,%esi
10c8a3: 74 47 je 10c8ec <check_and_merge+0x5c>
if (b->begin < a->begin) {
10c8a5: 8b 79 18 mov 0x18(%ecx),%edi
10c8a8: 39 7b 18 cmp %edi,0x18(%ebx)
10c8ab: 72 33 jb 10c8e0 <check_and_merge+0x50>
a = b;
b = t;
}
a->size += b->size;
10c8ad: 8b 7b 1c mov 0x1c(%ebx),%edi
10c8b0: 01 79 1c add %edi,0x1c(%ecx)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10c8b3: 8b 4b 04 mov 0x4(%ebx),%ecx
next->previous = previous;
10c8b6: 89 4e 04 mov %ecx,0x4(%esi)
previous->next = next;
10c8b9: 89 31 mov %esi,(%ecx)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c8bb: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10c8be: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10c8c0: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10c8c2: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10c8c4: 89 59 04 mov %ebx,0x4(%ecx)
rtems_chain_extract_unprotected(&b->chain_node);
add_to_chain(free_chain, b);
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
10c8c7: 83 c3 08 add $0x8,%ebx
10c8ca: 89 5c 24 04 mov %ebx,0x4(%esp)
10c8ce: 89 14 24 mov %edx,(%esp)
10c8d1: e8 9a 18 00 00 call 10e170 <_RBTree_Extract_unprotected>
}
}
10c8d6: 83 c4 10 add $0x10,%esp
10c8d9: 5b pop %ebx
10c8da: 5e pop %esi
10c8db: 5f pop %edi
10c8dc: c3 ret
10c8dd: 8d 76 00 lea 0x0(%esi),%esi
10c8e0: 8b 31 mov (%ecx),%esi
rtems_rbheap_chunk *a,
rtems_rbheap_chunk *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) {
if (b->begin < a->begin) {
10c8e2: 89 cf mov %ecx,%edi
10c8e4: 89 d9 mov %ebx,%ecx
10c8e6: 89 fb mov %edi,%ebx
10c8e8: eb c3 jmp 10c8ad <check_and_merge+0x1d>
10c8ea: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10c8ec: 8b 7b 04 mov 0x4(%ebx),%edi
10c8ef: 85 ff test %edi,%edi
10c8f1: 75 b2 jne 10c8a5 <check_and_merge+0x15> <== NEVER TAKEN
10c8f3: eb e1 jmp 10c8d6 <check_and_merge+0x46>
0010b600 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10b600: 57 push %edi
10b601: 56 push %esi
10b602: 53 push %ebx
10b603: 83 ec 20 sub $0x20,%esp
10b606: 8b 44 24 30 mov 0x30(%esp),%eax
10b60a: 8b 5c 24 34 mov 0x34(%esp),%ebx
if ( !tp )
10b60e: 85 db test %ebx,%ebx
10b610: 74 14 je 10b626 <clock_gettime+0x26>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b612: 83 f8 01 cmp $0x1,%eax
10b615: 74 55 je 10b66c <clock_gettime+0x6c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10b617: 83 f8 04 cmp $0x4,%eax
10b61a: 74 3c je 10b658 <clock_gettime+0x58> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
10b61c: 83 f8 02 cmp $0x2,%eax
10b61f: 74 37 je 10b658 <clock_gettime+0x58>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
10b621: 83 f8 03 cmp $0x3,%eax
10b624: 74 1a je 10b640 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b626: e8 f9 94 00 00 call 114b24 <__errno>
10b62b: c7 00 16 00 00 00 movl $0x16,(%eax)
10b631: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b636: 83 c4 20 add $0x20,%esp
10b639: 5b pop %ebx
10b63a: 5e pop %esi
10b63b: 5f pop %edi
10b63c: c3 ret
10b63d: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b640: e8 df 94 00 00 call 114b24 <__errno>
10b645: c7 00 58 00 00 00 movl $0x58,(%eax)
10b64b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b650: 83 c4 20 add $0x20,%esp
10b653: 5b pop %ebx
10b654: 5e pop %esi
10b655: 5f pop %edi
10b656: c3 ret
10b657: 90 nop
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
_TOD_Get_uptime_as_timespec( tp );
10b658: 89 1c 24 mov %ebx,(%esp)
10b65b: e8 ec 1e 00 00 call 10d54c <_TOD_Get_uptime_as_timespec>
return 0;
10b660: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b662: 83 c4 20 add $0x20,%esp
10b665: 5b pop %ebx
10b666: 5e pop %esi
10b667: 5f pop %edi
10b668: c3 ret
10b669: 8d 76 00 lea 0x0(%esi),%esi
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b66c: 8d 44 24 18 lea 0x18(%esp),%eax
10b670: 89 04 24 mov %eax,(%esp)
10b673: e8 a8 1e 00 00 call 10d520 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b678: 8b 74 24 18 mov 0x18(%esp),%esi
10b67c: 8b 7c 24 1c mov 0x1c(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b680: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b687: 3b
10b688: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b68f: 00
10b690: 89 34 24 mov %esi,(%esp)
10b693: 89 7c 24 04 mov %edi,0x4(%esp)
10b697: e8 98 65 01 00 call 121c34 <__divdi3>
10b69c: 89 03 mov %eax,(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b69e: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b6a5: 3b
10b6a6: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b6ad: 00
10b6ae: 89 34 24 mov %esi,(%esp)
10b6b1: 89 7c 24 04 mov %edi,0x4(%esp)
10b6b5: e8 ce 66 01 00 call 121d88 <__moddi3>
10b6ba: 89 43 04 mov %eax,0x4(%ebx)
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
10b6bd: 31 c0 xor %eax,%eax
10b6bf: e9 72 ff ff ff jmp 10b636 <clock_gettime+0x36>
0012af18 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
12af18: 56 push %esi
12af19: 53 push %ebx
12af1a: 83 ec 24 sub $0x24,%esp
12af1d: 8b 44 24 30 mov 0x30(%esp),%eax
12af21: 8b 54 24 34 mov 0x34(%esp),%edx
if ( !tp )
12af25: 85 d2 test %edx,%edx
12af27: 74 0f je 12af38 <clock_settime+0x20> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
12af29: 83 f8 01 cmp $0x1,%eax
12af2c: 74 22 je 12af50 <clock_settime+0x38>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
12af2e: 83 f8 02 cmp $0x2,%eax
12af31: 74 6d je 12afa0 <clock_settime+0x88>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
12af33: 83 f8 03 cmp $0x3,%eax
12af36: 74 68 je 12afa0 <clock_settime+0x88>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
12af38: e8 53 12 01 00 call 13c190 <__errno>
12af3d: c7 00 16 00 00 00 movl $0x16,(%eax)
12af43: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
12af48: 83 c4 24 add $0x24,%esp
12af4b: 5b pop %ebx
12af4c: 5e pop %esi
12af4d: c3 ret
12af4e: 66 90 xchg %ax,%ax
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
12af50: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
12af56: 76 e0 jbe 12af38 <clock_settime+0x20>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
12af58: a1 a4 be 17 00 mov 0x17bea4,%eax
12af5d: 40 inc %eax
12af5e: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
12af63: a1 a4 be 17 00 mov 0x17bea4,%eax
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
12af68: 8b 32 mov (%edx),%esi
12af6a: 8b 4a 04 mov 0x4(%edx),%ecx
12af6d: 89 cb mov %ecx,%ebx
12af6f: c1 fb 1f sar $0x1f,%ebx
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
12af72: b8 00 ca 9a 3b mov $0x3b9aca00,%eax
12af77: f7 ee imul %esi
12af79: 01 c1 add %eax,%ecx
12af7b: 11 d3 adc %edx,%ebx
12af7d: 89 4c 24 18 mov %ecx,0x18(%esp)
12af81: 89 5c 24 1c mov %ebx,0x1c(%esp)
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
12af85: 8d 44 24 18 lea 0x18(%esp),%eax
12af89: 89 04 24 mov %eax,(%esp)
12af8c: e8 03 11 00 00 call 12c094 <_TOD_Set_with_timestamp>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
12af91: e8 56 2b fe ff call 10daec <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
12af96: 31 c0 xor %eax,%eax
}
12af98: 83 c4 24 add $0x24,%esp
12af9b: 5b pop %ebx
12af9c: 5e pop %esi
12af9d: c3 ret
12af9e: 66 90 xchg %ax,%ax
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
12afa0: e8 eb 11 01 00 call 13c190 <__errno>
12afa5: c7 00 58 00 00 00 movl $0x58,(%eax)
12afab: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
12afb0: 83 c4 24 add $0x24,%esp
12afb3: 5b pop %ebx
12afb4: 5e pop %esi
12afb5: c3 ret
001206a4 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
1206a4: 55 push %ebp
1206a5: 57 push %edi
1206a6: 56 push %esi
1206a7: 53 push %ebx
1206a8: 83 ec 4c sub $0x4c,%esp
1206ab: 8b 6c 24 64 mov 0x64(%esp),%ebp
1206af: 8b 74 24 68 mov 0x68(%esp),%esi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
1206b3: e8 b8 fd ff ff call 120470 <getpid>
1206b8: 3b 44 24 60 cmp 0x60(%esp),%eax
1206bc: 0f 85 5e 02 00 00 jne 120920 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
1206c2: 85 ed test %ebp,%ebp
1206c4: 0f 84 6b 02 00 00 je 120935 <killinfo+0x291>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
1206ca: 8d 4d ff lea -0x1(%ebp),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
1206cd: 83 f9 1f cmp $0x1f,%ecx
1206d0: 0f 87 5f 02 00 00 ja 120935 <killinfo+0x291>
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 )
1206d6: 8d 44 6d 00 lea 0x0(%ebp,%ebp,2),%eax
1206da: 83 3c 85 48 25 13 00 cmpl $0x1,0x132548(,%eax,4)
1206e1: 01
1206e2: 0f 84 00 02 00 00 je 1208e8 <killinfo+0x244>
/*
* 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 ) )
1206e8: 83 fd 08 cmp $0x8,%ebp
1206eb: 0f 84 cf 00 00 00 je 1207c0 <killinfo+0x11c>
1206f1: 83 fd 04 cmp $0x4,%ebp
1206f4: 0f 84 c6 00 00 00 je 1207c0 <killinfo+0x11c>
1206fa: 83 fd 0b cmp $0xb,%ebp
1206fd: 0f 84 bd 00 00 00 je 1207c0 <killinfo+0x11c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
120703: bb 01 00 00 00 mov $0x1,%ebx
120708: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
12070a: 89 6c 24 34 mov %ebp,0x34(%esp)
siginfo->si_code = SI_USER;
12070e: c7 44 24 38 01 00 00 movl $0x1,0x38(%esp)
120715: 00
if ( !value ) {
120716: 85 f6 test %esi,%esi
120718: 0f 84 d2 01 00 00 je 1208f0 <killinfo+0x24c>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
12071e: 8b 06 mov (%esi),%eax
120720: 89 44 24 3c mov %eax,0x3c(%esp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
120724: a1 44 1f 13 00 mov 0x131f44,%eax
120729: 40 inc %eax
12072a: a3 44 1f 13 00 mov %eax,0x131f44
return _Thread_Dispatch_disable_level;
12072f: a1 44 1f 13 00 mov 0x131f44,%eax
/*
* 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;
120734: a1 cc 24 13 00 mov 0x1324cc,%eax
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
120739: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
12073f: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
120745: f7 d2 not %edx
120747: 85 d3 test %edx,%ebx
120749: 75 31 jne 12077c <killinfo+0xd8>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
12074b: a1 e0 26 13 00 mov 0x1326e0,%eax
/* 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 );
120750: 3d e4 26 13 00 cmp $0x1326e4,%eax
120755: 75 1a jne 120771 <killinfo+0xcd>
120757: e9 80 00 00 00 jmp 1207dc <killinfo+0x138>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
12075c: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
120762: f7 d2 not %edx
120764: 85 d3 test %edx,%ebx
120766: 75 14 jne 12077c <killinfo+0xd8>
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 ) {
120768: 8b 00 mov (%eax),%eax
/* 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 );
12076a: 3d e4 26 13 00 cmp $0x1326e4,%eax
12076f: 74 6b je 1207dc <killinfo+0x138> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120771: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
120777: 85 58 30 test %ebx,0x30(%eax)
12077a: 74 e0 je 12075c <killinfo+0xb8>
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
12077c: 8d 54 24 34 lea 0x34(%esp),%edx
120780: 89 54 24 08 mov %edx,0x8(%esp)
/*
* 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 ) ) {
120784: 89 6c 24 04 mov %ebp,0x4(%esp)
120788: 89 04 24 mov %eax,(%esp)
12078b: e8 e4 01 00 00 call 120974 <_POSIX_signals_Unblock_thread>
120790: 84 c0 test %al,%al
120792: 75 1c jne 1207b0 <killinfo+0x10c>
/*
* 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 );
120794: 89 1c 24 mov %ebx,(%esp)
120797: e8 c8 01 00 00 call 120964 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
12079c: 8d 5c 6d 00 lea 0x0(%ebp,%ebp,2),%ebx
1207a0: c1 e3 02 shl $0x2,%ebx
1207a3: 83 bb 40 25 13 00 02 cmpl $0x2,0x132540(%ebx)
1207aa: 0f 84 fc 00 00 00 je 1208ac <killinfo+0x208>
/*
* 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 ) ) {
_Thread_Enable_dispatch();
1207b0: e8 6f d6 fe ff call 10de24 <_Thread_Enable_dispatch>
return 0;
1207b5: 31 c0 xor %eax,%eax
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
1207b7: 83 c4 4c add $0x4c,%esp
1207ba: 5b pop %ebx
1207bb: 5e pop %esi
1207bc: 5f pop %edi
1207bd: 5d pop %ebp
1207be: c3 ret
1207bf: 90 nop
* 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 ) )
return pthread_kill( pthread_self(), sig );
1207c0: e8 83 03 00 00 call 120b48 <pthread_self>
1207c5: 89 6c 24 04 mov %ebp,0x4(%esp)
1207c9: 89 04 24 mov %eax,(%esp)
1207cc: e8 af 02 00 00 call 120a80 <pthread_kill>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
1207d1: 83 c4 4c add $0x4c,%esp
1207d4: 5b pop %ebx
1207d5: 5e pop %esi
1207d6: 5f pop %edi
1207d7: 5d pop %ebp
1207d8: c3 ret
1207d9: 8d 76 00 lea 0x0(%esi),%esi
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
1207dc: 0f b6 05 4c da 12 00 movzbl 0x12da4c,%eax
1207e3: 40 inc %eax
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
1207e4: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
1207eb: 00
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
1207ec: c7 44 24 20 02 00 00 movl $0x2,0x20(%esp)
1207f3: 00
1207f4: 89 5c 24 1c mov %ebx,0x1c(%esp)
1207f8: 89 6c 24 28 mov %ebp,0x28(%esp)
1207fc: 89 c5 mov %eax,%ebp
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
1207fe: 8b 54 24 20 mov 0x20(%esp),%edx
120802: 8b 04 95 1c 1f 13 00 mov 0x131f1c(,%edx,4),%eax
120809: 85 c0 test %eax,%eax
12080b: 74 70 je 12087d <killinfo+0x1d9> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
12080d: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
120810: 0f b7 58 10 movzwl 0x10(%eax),%ebx
object_table = the_info->local_table;
120814: 8b 70 1c mov 0x1c(%eax),%esi
for ( index = 1 ; index <= maximum ; index++ ) {
120817: 85 db test %ebx,%ebx
120819: 74 62 je 12087d <killinfo+0x1d9>
12081b: b8 01 00 00 00 mov $0x1,%eax
120820: 89 df mov %ebx,%edi
120822: 66 90 xchg %ax,%ax
the_thread = (Thread_Control *) object_table[ index ];
120824: 8b 14 86 mov (%esi,%eax,4),%edx
if ( !the_thread )
120827: 85 d2 test %edx,%edx
120829: 74 4d je 120878 <killinfo+0x1d4>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
12082b: 8b 4a 14 mov 0x14(%edx),%ecx
12082e: 39 e9 cmp %ebp,%ecx
120830: 77 46 ja 120878 <killinfo+0x1d4>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
120832: 8b 9a e8 00 00 00 mov 0xe8(%edx),%ebx
120838: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx
12083e: f7 d3 not %ebx
120840: 85 5c 24 1c test %ebx,0x1c(%esp)
120844: 74 32 je 120878 <killinfo+0x1d4>
*
* 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 ) {
120846: 39 e9 cmp %ebp,%ecx
120848: 72 26 jb 120870 <killinfo+0x1cc>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
12084a: 8b 5c 24 24 mov 0x24(%esp),%ebx
12084e: 85 db test %ebx,%ebx
120850: 74 26 je 120878 <killinfo+0x1d4> <== NEVER TAKEN
120852: 8b 5c 24 24 mov 0x24(%esp),%ebx
120856: 8b 5b 10 mov 0x10(%ebx),%ebx
120859: 89 5c 24 18 mov %ebx,0x18(%esp)
12085d: 85 db test %ebx,%ebx
12085f: 74 17 je 120878 <killinfo+0x1d4> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
120861: 8b 5a 10 mov 0x10(%edx),%ebx
120864: 89 5c 24 2c mov %ebx,0x2c(%esp)
120868: 85 db test %ebx,%ebx
12086a: 0f 85 90 00 00 00 jne 120900 <killinfo+0x25c>
120870: 89 cd mov %ecx,%ebp
120872: 89 54 24 24 mov %edx,0x24(%esp)
120876: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
120878: 40 inc %eax
120879: 39 c7 cmp %eax,%edi
12087b: 73 a7 jae 120824 <killinfo+0x180>
* + 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++) {
12087d: ff 44 24 20 incl 0x20(%esp)
120881: 83 7c 24 20 04 cmpl $0x4,0x20(%esp)
120886: 0f 85 72 ff ff ff jne 1207fe <killinfo+0x15a>
12088c: 8b 5c 24 1c mov 0x1c(%esp),%ebx
120890: 8b 6c 24 28 mov 0x28(%esp),%ebp
}
}
}
}
if ( interested ) {
120894: 8b 44 24 24 mov 0x24(%esp),%eax
120898: 85 c0 test %eax,%eax
12089a: 0f 84 f4 fe ff ff je 120794 <killinfo+0xf0>
1208a0: 8b 44 24 24 mov 0x24(%esp),%eax
1208a4: e9 d3 fe ff ff jmp 12077c <killinfo+0xd8>
1208a9: 8d 76 00 lea 0x0(%esi),%esi
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
1208ac: c7 04 24 c0 26 13 00 movl $0x1326c0,(%esp)
1208b3: e8 40 bb fe ff call 10c3f8 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
1208b8: 85 c0 test %eax,%eax
1208ba: 0f 84 8a 00 00 00 je 12094a <killinfo+0x2a6>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
1208c0: 8d 78 08 lea 0x8(%eax),%edi
1208c3: 8d 74 24 34 lea 0x34(%esp),%esi
1208c7: b9 03 00 00 00 mov $0x3,%ecx
1208cc: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
1208ce: 89 44 24 04 mov %eax,0x4(%esp)
1208d2: 81 c3 60 27 13 00 add $0x132760,%ebx
1208d8: 89 1c 24 mov %ebx,(%esp)
1208db: e8 f4 ba fe ff call 10c3d4 <_Chain_Append>
1208e0: e9 cb fe ff ff jmp 1207b0 <killinfo+0x10c>
1208e5: 8d 76 00 lea 0x0(%esi),%esi
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
1208e8: 31 c0 xor %eax,%eax
1208ea: e9 e2 fe ff ff jmp 1207d1 <killinfo+0x12d>
1208ef: 90 nop
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1208f0: c7 44 24 3c 00 00 00 movl $0x0,0x3c(%esp)
1208f7: 00
1208f8: e9 27 fe ff ff jmp 120724 <killinfo+0x80>
1208fd: 8d 76 00 lea 0x0(%esi),%esi
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
120900: f7 44 24 18 00 00 00 testl $0x10000000,0x18(%esp)
120907: 10
120908: 0f 85 6a ff ff ff jne 120878 <killinfo+0x1d4>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
12090e: 81 e3 00 00 00 10 and $0x10000000,%ebx
120914: 0f 84 5e ff ff ff je 120878 <killinfo+0x1d4>
12091a: e9 51 ff ff ff jmp 120870 <killinfo+0x1cc>
12091f: 90 nop
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
120920: e8 db 32 ff ff call 113c00 <__errno>
120925: c7 00 03 00 00 00 movl $0x3,(%eax)
12092b: b8 ff ff ff ff mov $0xffffffff,%eax
120930: e9 9c fe ff ff jmp 1207d1 <killinfo+0x12d>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
120935: e8 c6 32 ff ff call 113c00 <__errno>
12093a: c7 00 16 00 00 00 movl $0x16,(%eax)
120940: b8 ff ff ff ff mov $0xffffffff,%eax
120945: e9 87 fe ff ff jmp 1207d1 <killinfo+0x12d>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
12094a: e8 d5 d4 fe ff call 10de24 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
12094f: e8 ac 32 ff ff call 113c00 <__errno>
120954: c7 00 0b 00 00 00 movl $0xb,(%eax)
12095a: b8 ff ff ff ff mov $0xffffffff,%eax
12095f: e9 6d fe ff ff jmp 1207d1 <killinfo+0x12d>
00110ffc <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
110ffc: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
111000: 85 c0 test %eax,%eax
111002: 74 06 je 11100a <pthread_attr_setschedpolicy+0xe>
111004: 8b 08 mov (%eax),%ecx
111006: 85 c9 test %ecx,%ecx
111008: 75 06 jne 111010 <pthread_attr_setschedpolicy+0x14>
return EINVAL;
11100a: b8 16 00 00 00 mov $0x16,%eax
11100f: c3 ret
switch ( policy ) {
111010: 8b 54 24 08 mov 0x8(%esp),%edx
111014: 85 d2 test %edx,%edx
111016: 78 1b js 111033 <pthread_attr_setschedpolicy+0x37>
111018: 83 7c 24 08 02 cmpl $0x2,0x8(%esp)
11101d: 7f 0d jg 11102c <pthread_attr_setschedpolicy+0x30>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
11101f: 8b 54 24 08 mov 0x8(%esp),%edx
111023: 89 50 14 mov %edx,0x14(%eax)
return 0;
111026: 31 c0 xor %eax,%eax
111028: c3 ret
111029: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
11102c: 83 7c 24 08 04 cmpl $0x4,0x8(%esp)
111031: 74 ec je 11101f <pthread_attr_setschedpolicy+0x23><== ALWAYS TAKEN
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
111033: b8 86 00 00 00 mov $0x86,%eax
}
}
111038: c3 ret
0010bc6c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10bc6c: 56 push %esi
10bc6d: 53 push %ebx
10bc6e: 83 ec 34 sub $0x34,%esp
10bc71: 8b 5c 24 40 mov 0x40(%esp),%ebx
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10bc75: 85 db test %ebx,%ebx
10bc77: 74 08 je 10bc81 <pthread_barrier_init+0x15>
return EINVAL;
if ( count == 0 )
10bc79: 8b 4c 24 48 mov 0x48(%esp),%ecx
10bc7d: 85 c9 test %ecx,%ecx
10bc7f: 75 0b jne 10bc8c <pthread_barrier_init+0x20>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10bc81: b8 16 00 00 00 mov $0x16,%eax
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bc86: 83 c4 34 add $0x34,%esp
10bc89: 5b pop %ebx
10bc8a: 5e pop %esi
10bc8b: c3 ret
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bc8c: 8b 44 24 44 mov 0x44(%esp),%eax
10bc90: 85 c0 test %eax,%eax
10bc92: 74 7c je 10bd10 <pthread_barrier_init+0xa4>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bc94: 8b 10 mov (%eax),%edx
10bc96: 85 d2 test %edx,%edx
10bc98: 74 e7 je 10bc81 <pthread_barrier_init+0x15>
return EINVAL;
switch ( the_attr->process_shared ) {
10bc9a: 8b 40 04 mov 0x4(%eax),%eax
10bc9d: 85 c0 test %eax,%eax
10bc9f: 75 e0 jne 10bc81 <pthread_barrier_init+0x15><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10bca1: c7 44 24 20 00 00 00 movl $0x0,0x20(%esp)
10bca8: 00
the_attributes.maximum_count = count;
10bca9: 8b 44 24 48 mov 0x48(%esp),%eax
10bcad: 89 44 24 24 mov %eax,0x24(%esp)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bcb1: a1 c4 37 13 00 mov 0x1337c4,%eax
10bcb6: 40 inc %eax
10bcb7: a3 c4 37 13 00 mov %eax,0x1337c4
return _Thread_Dispatch_disable_level;
10bcbc: a1 c4 37 13 00 mov 0x1337c4,%eax
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
10bcc1: c7 04 24 a0 3b 13 00 movl $0x133ba0,(%esp)
10bcc8: e8 eb 20 00 00 call 10ddb8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10bccd: 85 c0 test %eax,%eax
10bccf: 74 52 je 10bd23 <pthread_barrier_init+0xb7>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10bcd1: 8d 54 24 20 lea 0x20(%esp),%edx
10bcd5: 89 54 24 04 mov %edx,0x4(%esp)
10bcd9: 8d 50 10 lea 0x10(%eax),%edx
10bcdc: 89 14 24 mov %edx,(%esp)
10bcdf: 89 44 24 1c mov %eax,0x1c(%esp)
10bce3: e8 cc 17 00 00 call 10d4b4 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10bce8: 8b 44 24 1c mov 0x1c(%esp),%eax
10bcec: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10bcef: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bcf2: 8b 0d bc 3b 13 00 mov 0x133bbc,%ecx
10bcf8: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bcfb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
10bd02: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bd04: e8 ab 31 00 00 call 10eeb4 <_Thread_Enable_dispatch>
return 0;
10bd09: 31 c0 xor %eax,%eax
10bd0b: e9 76 ff ff ff jmp 10bc86 <pthread_barrier_init+0x1a>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10bd10: 8d 74 24 28 lea 0x28(%esp),%esi
10bd14: 89 34 24 mov %esi,(%esp)
10bd17: e8 84 fe ff ff call 10bba0 <pthread_barrierattr_init>
the_attr = &my_attr;
10bd1c: 89 f0 mov %esi,%eax
10bd1e: e9 71 ff ff ff jmp 10bc94 <pthread_barrier_init+0x28>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10bd23: e8 8c 31 00 00 call 10eeb4 <_Thread_Enable_dispatch>
return EAGAIN;
10bd28: b8 0b 00 00 00 mov $0xb,%eax
10bd2d: e9 54 ff ff ff jmp 10bc86 <pthread_barrier_init+0x1a>
0010b4fc <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b4fc: 56 push %esi
10b4fd: 53 push %ebx
10b4fe: 83 ec 14 sub $0x14,%esp
10b501: 8b 5c 24 20 mov 0x20(%esp),%ebx
10b505: 8b 74 24 24 mov 0x24(%esp),%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 )
10b509: 85 db test %ebx,%ebx
10b50b: 74 4f je 10b55c <pthread_cleanup_push+0x60>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10b50d: a1 c4 30 13 00 mov 0x1330c4,%eax
10b512: 40 inc %eax
10b513: a3 c4 30 13 00 mov %eax,0x1330c4
return _Thread_Dispatch_disable_level;
10b518: a1 c4 30 13 00 mov 0x1330c4,%eax
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b51d: c7 04 24 10 00 00 00 movl $0x10,(%esp)
10b524: e8 cf 41 00 00 call 10f6f8 <_Workspace_Allocate>
if ( handler ) {
10b529: 85 c0 test %eax,%eax
10b52b: 74 24 je 10b551 <pthread_cleanup_push+0x55><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b52d: 8b 15 4c 36 13 00 mov 0x13364c,%edx
handler_stack = &thread_support->Cancellation_Handlers;
10b533: 8b 92 e8 00 00 00 mov 0xe8(%edx),%edx
10b539: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10b53f: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b542: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b545: 89 44 24 04 mov %eax,0x4(%esp)
10b549: 89 14 24 mov %edx,(%esp)
10b54c: e8 cb 18 00 00 call 10ce1c <_Chain_Append>
}
_Thread_Enable_dispatch();
}
10b551: 83 c4 14 add $0x14,%esp
10b554: 5b pop %ebx
10b555: 5e pop %esi
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b556: e9 91 32 00 00 jmp 10e7ec <_Thread_Enable_dispatch>
10b55b: 90 nop
}
10b55c: 83 c4 14 add $0x14,%esp
10b55f: 5b pop %ebx
10b560: 5e pop %esi
10b561: c3 ret
0010c604 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c604: 53 push %ebx
10c605: 83 ec 28 sub $0x28,%esp
10c608: 8b 44 24 34 mov 0x34(%esp),%eax
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c60c: 85 c0 test %eax,%eax
10c60e: 0f 84 98 00 00 00 je 10c6ac <pthread_cond_init+0xa8>
10c614: 89 c3 mov %eax,%ebx
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c616: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c61a: 74 06 je 10c622 <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c61c: 8b 03 mov (%ebx),%eax
10c61e: 85 c0 test %eax,%eax
10c620: 75 0a jne 10c62c <pthread_cond_init+0x28>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
10c622: b8 16 00 00 00 mov $0x16,%eax
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c627: 83 c4 28 add $0x28,%esp
10c62a: 5b pop %ebx
10c62b: c3 ret
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c62c: a1 04 4e 13 00 mov 0x134e04,%eax
10c631: 40 inc %eax
10c632: a3 04 4e 13 00 mov %eax,0x134e04
return _Thread_Dispatch_disable_level;
10c637: a1 04 4e 13 00 mov 0x134e04,%eax
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10c63c: c7 04 24 80 52 13 00 movl $0x135280,(%esp)
10c643: e8 d0 27 00 00 call 10ee18 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c648: 85 c0 test %eax,%eax
10c64a: 74 6c je 10c6b8 <pthread_cond_init+0xb4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c64c: 8b 53 04 mov 0x4(%ebx),%edx
10c64f: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c652: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
_Thread_queue_Initialize(
10c659: c7 44 24 0c 74 00 00 movl $0x74,0xc(%esp)
10c660: 00
10c661: c7 44 24 08 00 08 00 movl $0x10000800,0x8(%esp)
10c668: 10
10c669: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c670: 00
10c671: 8d 50 18 lea 0x18(%eax),%edx
10c674: 89 14 24 mov %edx,(%esp)
10c677: 89 44 24 1c mov %eax,0x1c(%esp)
10c67b: e8 10 40 00 00 call 110690 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c680: 8b 44 24 1c mov 0x1c(%esp),%eax
10c684: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c687: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c68a: 8b 0d 9c 52 13 00 mov 0x13529c,%ecx
10c690: 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;
10c693: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c69a: 8b 44 24 30 mov 0x30(%esp),%eax
10c69e: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c6a0: e8 6f 38 00 00 call 10ff14 <_Thread_Enable_dispatch>
return 0;
10c6a5: 31 c0 xor %eax,%eax
10c6a7: e9 7b ff ff ff jmp 10c627 <pthread_cond_init+0x23>
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
10c6ac: bb 08 54 12 00 mov $0x125408,%ebx
10c6b1: e9 60 ff ff ff jmp 10c616 <pthread_cond_init+0x12>
10c6b6: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c6b8: e8 57 38 00 00 call 10ff14 <_Thread_Enable_dispatch>
return ENOMEM;
10c6bd: b8 0c 00 00 00 mov $0xc,%eax
10c6c2: e9 60 ff ff ff jmp 10c627 <pthread_cond_init+0x23>
0010c484 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c484: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || attr->is_initialized == false )
10c488: 85 c0 test %eax,%eax
10c48a: 74 06 je 10c492 <pthread_condattr_destroy+0xe>
10c48c: 8b 10 mov (%eax),%edx
10c48e: 85 d2 test %edx,%edx
10c490: 75 06 jne 10c498 <pthread_condattr_destroy+0x14><== ALWAYS TAKEN
return EINVAL;
10c492: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10c497: c3 ret
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
10c498: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10c49e: 31 c0 xor %eax,%eax
10c4a0: c3 ret
0010b978 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10b978: 55 push %ebp
10b979: 57 push %edi
10b97a: 56 push %esi
10b97b: 53 push %ebx
10b97c: 83 ec 7c sub $0x7c,%esp
10b97f: 8b 9c 24 94 00 00 00 mov 0x94(%esp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10b986: 8b b4 24 98 00 00 00 mov 0x98(%esp),%esi
10b98d: 85 f6 test %esi,%esi
10b98f: 74 5f je 10b9f0 <pthread_create+0x78>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b991: 85 db test %ebx,%ebx
10b993: 74 6b je 10ba00 <pthread_create+0x88>
if ( !the_attr->is_initialized )
10b995: 8b 0b mov (%ebx),%ecx
10b997: 85 c9 test %ecx,%ecx
10b999: 75 11 jne 10b9ac <pthread_create+0x34>
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
10b99b: bd 16 00 00 00 mov $0x16,%ebp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b9a0: 89 e8 mov %ebp,%eax
10b9a2: 83 c4 7c add $0x7c,%esp
10b9a5: 5b pop %ebx
10b9a6: 5e pop %esi
10b9a7: 5f pop %edi
10b9a8: 5d pop %ebp
10b9a9: c3 ret
10b9aa: 66 90 xchg %ax,%ax
* 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) )
10b9ac: 8b 53 04 mov 0x4(%ebx),%edx
10b9af: 85 d2 test %edx,%edx
10b9b1: 74 0a je 10b9bd <pthread_create+0x45>
10b9b3: a1 d0 ed 12 00 mov 0x12edd0,%eax
10b9b8: 39 43 08 cmp %eax,0x8(%ebx)
10b9bb: 72 de jb 10b99b <pthread_create+0x23>
* 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 ) {
10b9bd: 8b 43 10 mov 0x10(%ebx),%eax
10b9c0: 83 f8 01 cmp $0x1,%eax
10b9c3: 74 43 je 10ba08 <pthread_create+0x90>
10b9c5: 83 f8 02 cmp $0x2,%eax
10b9c8: 75 d1 jne 10b99b <pthread_create+0x23>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10b9ca: 8b 53 14 mov 0x14(%ebx),%edx
10b9cd: 89 54 24 34 mov %edx,0x34(%esp)
schedparam = the_attr->schedparam;
10b9d1: 8d 54 24 54 lea 0x54(%esp),%edx
10b9d5: 8d 73 18 lea 0x18(%ebx),%esi
10b9d8: b9 07 00 00 00 mov $0x7,%ecx
10b9dd: 89 d7 mov %edx,%edi
10b9df: 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 )
10b9e1: 8b 43 0c mov 0xc(%ebx),%eax
10b9e4: 85 c0 test %eax,%eax
10b9e6: 74 4c je 10ba34 <pthread_create+0xbc>
return ENOTSUP;
10b9e8: bd 86 00 00 00 mov $0x86,%ebp
10b9ed: eb b1 jmp 10b9a0 <pthread_create+0x28>
10b9ef: 90 nop
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
10b9f0: bd 0e 00 00 00 mov $0xe,%ebp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b9f5: 89 e8 mov %ebp,%eax
10b9f7: 83 c4 7c add $0x7c,%esp
10b9fa: 5b pop %ebx
10b9fb: 5e pop %esi
10b9fc: 5f pop %edi
10b9fd: 5d pop %ebp
10b9fe: c3 ret
10b9ff: 90 nop
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10ba00: bb 60 3c 12 00 mov $0x123c60,%ebx
10ba05: eb 8e jmp 10b995 <pthread_create+0x1d>
10ba07: 90 nop
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10ba08: a1 2c 38 13 00 mov 0x13382c,%eax
10ba0d: 8b b0 e8 00 00 00 mov 0xe8(%eax),%esi
schedpolicy = api->schedpolicy;
10ba13: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
10ba19: 89 54 24 34 mov %edx,0x34(%esp)
schedparam = api->schedparam;
10ba1d: 8d 54 24 54 lea 0x54(%esp),%edx
10ba21: 81 c6 88 00 00 00 add $0x88,%esi
10ba27: b9 07 00 00 00 mov $0x7,%ecx
10ba2c: 89 d7 mov %edx,%edi
10ba2e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
10ba30: eb af jmp 10b9e1 <pthread_create+0x69>
10ba32: 66 90 xchg %ax,%ax
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10ba34: 8b 44 24 54 mov 0x54(%esp),%eax
10ba38: 89 04 24 mov %eax,(%esp)
10ba3b: 89 54 24 30 mov %edx,0x30(%esp)
10ba3f: e8 74 60 00 00 call 111ab8 <_POSIX_Priority_Is_valid>
10ba44: 84 c0 test %al,%al
10ba46: 8b 54 24 30 mov 0x30(%esp),%edx
10ba4a: 0f 84 4b ff ff ff je 10b99b <pthread_create+0x23> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10ba50: 8b 74 24 54 mov 0x54(%esp),%esi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10ba54: 0f b6 3d cc ed 12 00 movzbl 0x12edcc,%edi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10ba5b: 8d 44 24 50 lea 0x50(%esp),%eax
10ba5f: 89 44 24 0c mov %eax,0xc(%esp)
10ba63: 8d 44 24 4c lea 0x4c(%esp),%eax
10ba67: 89 44 24 08 mov %eax,0x8(%esp)
10ba6b: 89 54 24 04 mov %edx,0x4(%esp)
10ba6f: 8b 4c 24 34 mov 0x34(%esp),%ecx
10ba73: 89 0c 24 mov %ecx,(%esp)
10ba76: e8 59 60 00 00 call 111ad4 <_POSIX_Thread_Translate_sched_param>
10ba7b: 89 c5 mov %eax,%ebp
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10ba7d: 85 c0 test %eax,%eax
10ba7f: 0f 85 1b ff ff ff jne 10b9a0 <pthread_create+0x28>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10ba85: a1 30 33 13 00 mov 0x133330,%eax
10ba8a: 89 04 24 mov %eax,(%esp)
10ba8d: e8 a2 18 00 00 call 10d334 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10ba92: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10ba99: e8 1e 22 00 00 call 10dcbc <_Objects_Allocate>
10ba9e: 89 44 24 3c mov %eax,0x3c(%esp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10baa2: 85 c0 test %eax,%eax
10baa4: 8b 54 24 30 mov 0x30(%esp),%edx
10baa8: 0f 84 37 01 00 00 je 10bbe5 <pthread_create+0x26d>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10baae: 8b 4b 08 mov 0x8(%ebx),%ecx
10bab1: c7 44 24 28 00 00 00 movl $0x0,0x28(%esp)
10bab8: 00
10bab9: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
10bac0: 00
10bac1: 8b 44 24 50 mov 0x50(%esp),%eax
10bac5: 89 44 24 20 mov %eax,0x20(%esp)
10bac9: 8b 44 24 4c mov 0x4c(%esp),%eax
10bacd: 89 44 24 1c mov %eax,0x1c(%esp)
10bad1: c7 44 24 18 01 00 00 movl $0x1,0x18(%esp)
10bad8: 00
10bad9: 81 e7 ff 00 00 00 and $0xff,%edi
10badf: 29 f7 sub %esi,%edi
10bae1: 89 7c 24 14 mov %edi,0x14(%esp)
10bae5: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp)
10baec: 00
10baed: a1 d0 ed 12 00 mov 0x12edd0,%eax
10baf2: d1 e0 shl %eax
10baf4: 39 c8 cmp %ecx,%eax
10baf6: 73 02 jae 10bafa <pthread_create+0x182>
10baf8: 89 c8 mov %ecx,%eax
10bafa: 89 44 24 0c mov %eax,0xc(%esp)
10bafe: 8b 43 04 mov 0x4(%ebx),%eax
10bb01: 89 44 24 08 mov %eax,0x8(%esp)
10bb05: 8b 44 24 3c mov 0x3c(%esp),%eax
10bb09: 89 44 24 04 mov %eax,0x4(%esp)
10bb0d: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10bb14: 89 54 24 30 mov %edx,0x30(%esp)
10bb18: e8 3b 33 00 00 call 10ee58 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10bb1d: 84 c0 test %al,%al
10bb1f: 8b 54 24 30 mov 0x30(%esp),%edx
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10bb23: 8b 44 24 3c mov 0x3c(%esp),%eax
10bb27: 75 27 jne 10bb50 <pthread_create+0x1d8>
10bb29: 89 44 24 04 mov %eax,0x4(%esp)
10bb2d: c7 04 24 00 35 13 00 movl $0x133500,(%esp)
10bb34: e8 ff 24 00 00 call 10e038 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10bb39: a1 30 33 13 00 mov 0x133330,%eax
10bb3e: 89 04 24 mov %eax,(%esp)
10bb41: e8 66 18 00 00 call 10d3ac <_API_Mutex_Unlock>
return EAGAIN;
10bb46: bd 0b 00 00 00 mov $0xb,%ebp
10bb4b: e9 50 fe ff ff jmp 10b9a0 <pthread_create+0x28>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10bb50: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10bb56: 89 44 24 38 mov %eax,0x38(%esp)
api->Attributes = *the_attr;
10bb5a: b9 10 00 00 00 mov $0x10,%ecx
10bb5f: 89 c7 mov %eax,%edi
10bb61: 89 de mov %ebx,%esi
10bb63: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10bb65: 8b 43 3c mov 0x3c(%ebx),%eax
10bb68: 8b 4c 24 38 mov 0x38(%esp),%ecx
10bb6c: 89 41 40 mov %eax,0x40(%ecx)
api->schedpolicy = schedpolicy;
10bb6f: 8b 44 24 34 mov 0x34(%esp),%eax
10bb73: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = schedparam;
10bb79: 89 cf mov %ecx,%edi
10bb7b: 81 c7 88 00 00 00 add $0x88,%edi
10bb81: b9 07 00 00 00 mov $0x7,%ecx
10bb86: 89 d6 mov %edx,%esi
10bb88: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10bb8a: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10bb91: 00
10bb92: 8b 84 24 9c 00 00 00 mov 0x9c(%esp),%eax
10bb99: 89 44 24 0c mov %eax,0xc(%esp)
10bb9d: 8b 94 24 98 00 00 00 mov 0x98(%esp),%edx
10bba4: 89 54 24 08 mov %edx,0x8(%esp)
10bba8: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10bbaf: 00
10bbb0: 8b 44 24 3c mov 0x3c(%esp),%eax
10bbb4: 89 04 24 mov %eax,(%esp)
10bbb7: e8 58 3b 00 00 call 10f714 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10bbbc: 83 7c 24 34 04 cmpl $0x4,0x34(%esp)
10bbc1: 74 38 je 10bbfb <pthread_create+0x283>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10bbc3: 8b 44 24 3c mov 0x3c(%esp),%eax
10bbc7: 8b 50 08 mov 0x8(%eax),%edx
10bbca: 8b 84 24 90 00 00 00 mov 0x90(%esp),%eax
10bbd1: 89 10 mov %edx,(%eax)
_RTEMS_Unlock_allocator();
10bbd3: a1 30 33 13 00 mov 0x133330,%eax
10bbd8: 89 04 24 mov %eax,(%esp)
10bbdb: e8 cc 17 00 00 call 10d3ac <_API_Mutex_Unlock>
10bbe0: e9 bb fd ff ff jmp 10b9a0 <pthread_create+0x28>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bbe5: a1 30 33 13 00 mov 0x133330,%eax
10bbea: 89 04 24 mov %eax,(%esp)
10bbed: e8 ba 17 00 00 call 10d3ac <_API_Mutex_Unlock>
return EAGAIN;
10bbf2: 66 bd 0b 00 mov $0xb,%bp
10bbf6: e9 a5 fd ff ff jmp 10b9a0 <pthread_create+0x28>
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
10bbfb: 8b 44 24 38 mov 0x38(%esp),%eax
10bbff: 05 90 00 00 00 add $0x90,%eax
10bc04: 89 04 24 mov %eax,(%esp)
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10bc07: e8 b0 3b 00 00 call 10f7bc <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10bc0c: 8b 54 24 38 mov 0x38(%esp),%edx
10bc10: 89 82 b4 00 00 00 mov %eax,0xb4(%edx)
10bc16: 89 d0 mov %edx,%eax
10bc18: 05 a8 00 00 00 add $0xa8,%eax
10bc1d: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10bc21: c7 04 24 48 33 13 00 movl $0x133348,(%esp)
10bc28: e8 6f 3e 00 00 call 10fa9c <_Watchdog_Insert>
10bc2d: eb 94 jmp 10bbc3 <pthread_create+0x24b>
001136b4 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
1136b4: 83 ec 1c sub $0x1c,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
1136b7: 8b 44 24 20 mov 0x20(%esp),%eax
1136bb: 89 44 24 04 mov %eax,0x4(%esp)
1136bf: a1 cc 24 13 00 mov 0x1324cc,%eax
1136c4: 89 04 24 mov %eax,(%esp)
1136c7: e8 00 ff ff ff call 1135cc <_POSIX_Thread_Exit>
}
1136cc: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
1136cf: c3 ret <== NOT EXECUTED
00120a80 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
120a80: 57 push %edi
120a81: 56 push %esi
120a82: 53 push %ebx
120a83: 83 ec 20 sub $0x20,%esp
120a86: 8b 5c 24 34 mov 0x34(%esp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
120a8a: 85 db test %ebx,%ebx
120a8c: 0f 84 8e 00 00 00 je 120b20 <pthread_kill+0xa0>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
120a92: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
120a95: 83 ff 1f cmp $0x1f,%edi
120a98: 0f 87 82 00 00 00 ja 120b20 <pthread_kill+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
120a9e: 8d 44 24 1c lea 0x1c(%esp),%eax
120aa2: 89 44 24 04 mov %eax,0x4(%esp)
120aa6: 8b 44 24 30 mov 0x30(%esp),%eax
120aaa: 89 04 24 mov %eax,(%esp)
120aad: e8 92 d3 fe ff call 10de44 <_Thread_Get>
120ab2: 89 c6 mov %eax,%esi
switch ( location ) {
120ab4: 8b 54 24 1c mov 0x1c(%esp),%edx
120ab8: 85 d2 test %edx,%edx
120aba: 75 78 jne 120b34 <pthread_kill+0xb4> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
120abc: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
120ac2: 8d 04 5b lea (%ebx,%ebx,2),%eax
120ac5: 83 3c 85 48 25 13 00 cmpl $0x1,0x132548(,%eax,4)
120acc: 01
120acd: 74 34 je 120b03 <pthread_kill+0x83>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
120acf: b8 01 00 00 00 mov $0x1,%eax
120ad4: 89 f9 mov %edi,%ecx
120ad6: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
120ad8: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
120ade: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
120ae5: 00
120ae6: 89 5c 24 04 mov %ebx,0x4(%esp)
120aea: 89 34 24 mov %esi,(%esp)
120aed: e8 82 fe ff ff call 120974 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
120af2: a1 c8 24 13 00 mov 0x1324c8,%eax
120af7: 85 c0 test %eax,%eax
120af9: 74 08 je 120b03 <pthread_kill+0x83>
120afb: 3b 35 cc 24 13 00 cmp 0x1324cc,%esi
120b01: 74 11 je 120b14 <pthread_kill+0x94>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
120b03: e8 1c d3 fe ff call 10de24 <_Thread_Enable_dispatch>
return 0;
120b08: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
120b0a: 83 c4 20 add $0x20,%esp
120b0d: 5b pop %ebx
120b0e: 5e pop %esi
120b0f: 5f pop %edi
120b10: c3 ret
120b11: 8d 76 00 lea 0x0(%esi),%esi
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
120b14: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
120b1b: eb e6 jmp 120b03 <pthread_kill+0x83>
120b1d: 8d 76 00 lea 0x0(%esi),%esi
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
120b20: e8 db 30 ff ff call 113c00 <__errno>
120b25: c7 00 16 00 00 00 movl $0x16,(%eax)
120b2b: b8 ff ff ff ff mov $0xffffffff,%eax
120b30: eb d8 jmp 120b0a <pthread_kill+0x8a>
120b32: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
120b34: e8 c7 30 ff ff call 113c00 <__errno> <== NOT EXECUTED
120b39: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
120b3f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
120b44: eb c4 jmp 120b0a <pthread_kill+0x8a> <== NOT EXECUTED
0010dba4 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10dba4: 53 push %ebx
10dba5: 83 ec 28 sub $0x28,%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 );
10dba8: 8d 44 24 1c lea 0x1c(%esp),%eax
10dbac: 89 44 24 04 mov %eax,0x4(%esp)
10dbb0: 8b 44 24 34 mov 0x34(%esp),%eax
10dbb4: 89 04 24 mov %eax,(%esp)
10dbb7: e8 fc 00 00 00 call 10dcb8 <_POSIX_Absolute_timeout_to_ticks>
10dbbc: 89 c3 mov %eax,%ebx
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10dbbe: 83 f8 03 cmp $0x3,%eax
10dbc1: 74 29 je 10dbec <pthread_mutex_timedlock+0x48>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10dbc3: 8b 44 24 1c mov 0x1c(%esp),%eax
10dbc7: 89 44 24 08 mov %eax,0x8(%esp)
10dbcb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10dbd2: 00
10dbd3: 8b 44 24 30 mov 0x30(%esp),%eax
10dbd7: 89 04 24 mov %eax,(%esp)
10dbda: e8 c1 fe ff ff call 10daa0 <_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) ) {
10dbdf: 83 f8 10 cmp $0x10,%eax
10dbe2: 74 2c je 10dc10 <pthread_mutex_timedlock+0x6c>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10dbe4: 83 c4 28 add $0x28,%esp
10dbe7: 5b pop %ebx
10dbe8: c3 ret
10dbe9: 8d 76 00 lea 0x0(%esi),%esi
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10dbec: 8b 44 24 1c mov 0x1c(%esp),%eax
10dbf0: 89 44 24 08 mov %eax,0x8(%esp)
10dbf4: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10dbfb: 00
10dbfc: 8b 44 24 30 mov 0x30(%esp),%eax
10dc00: 89 04 24 mov %eax,(%esp)
10dc03: e8 98 fe ff ff call 10daa0 <_POSIX_Mutex_Lock_support>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10dc08: 83 c4 28 add $0x28,%esp
10dc0b: 5b pop %ebx
10dc0c: c3 ret
10dc0d: 8d 76 00 lea 0x0(%esi),%esi
* 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) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10dc10: 85 db test %ebx,%ebx
10dc12: 75 08 jne 10dc1c <pthread_mutex_timedlock+0x78><== ALWAYS TAKEN
return EINVAL;
10dc14: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10dc19: eb c9 jmp 10dbe4 <pthread_mutex_timedlock+0x40><== NOT EXECUTED
10dc1b: 90 nop <== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10dc1c: 4b dec %ebx
10dc1d: 83 fb 01 cmp $0x1,%ebx
10dc20: 77 c2 ja 10dbe4 <pthread_mutex_timedlock+0x40><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10dc22: b8 74 00 00 00 mov $0x74,%eax
10dc27: eb bb jmp 10dbe4 <pthread_mutex_timedlock+0x40>
0010b350 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
10b350: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr )
10b354: 85 c0 test %eax,%eax
10b356: 74 06 je 10b35e <pthread_mutexattr_gettype+0xe>
return EINVAL;
if ( !attr->is_initialized )
10b358: 8b 08 mov (%eax),%ecx
10b35a: 85 c9 test %ecx,%ecx
10b35c: 75 06 jne 10b364 <pthread_mutexattr_gettype+0x14>
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
return EINVAL;
10b35e: b8 16 00 00 00 mov $0x16,%eax
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
}
10b363: c3 ret
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
10b364: 8b 54 24 08 mov 0x8(%esp),%edx
10b368: 85 d2 test %edx,%edx
10b36a: 74 f2 je 10b35e <pthread_mutexattr_gettype+0xe><== NEVER TAKEN
return EINVAL;
*type = attr->type;
10b36c: 8b 40 10 mov 0x10(%eax),%eax
10b36f: 8b 54 24 08 mov 0x8(%esp),%edx
10b373: 89 02 mov %eax,(%edx)
return 0;
10b375: 31 c0 xor %eax,%eax
10b377: c3 ret
0010d760 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d760: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
10d764: 85 c0 test %eax,%eax
10d766: 74 06 je 10d76e <pthread_mutexattr_setpshared+0xe>
10d768: 8b 10 mov (%eax),%edx
10d76a: 85 d2 test %edx,%edx
10d76c: 75 06 jne 10d774 <pthread_mutexattr_setpshared+0x14>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d76e: b8 16 00 00 00 mov $0x16,%eax
}
}
10d773: c3 ret
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
10d774: 83 7c 24 08 01 cmpl $0x1,0x8(%esp)
10d779: 77 f3 ja 10d76e <pthread_mutexattr_setpshared+0xe><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d77b: 8b 54 24 08 mov 0x8(%esp),%edx
10d77f: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d782: 31 c0 xor %eax,%eax
10d784: c3 ret
0010b3a0 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b3a0: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr || !attr->is_initialized )
10b3a4: 85 c0 test %eax,%eax
10b3a6: 74 06 je 10b3ae <pthread_mutexattr_settype+0xe>
10b3a8: 8b 10 mov (%eax),%edx
10b3aa: 85 d2 test %edx,%edx
10b3ac: 75 06 jne 10b3b4 <pthread_mutexattr_settype+0x14><== ALWAYS TAKEN
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
10b3ae: b8 16 00 00 00 mov $0x16,%eax
}
}
10b3b3: c3 ret
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( type ) {
10b3b4: 83 7c 24 08 03 cmpl $0x3,0x8(%esp)
10b3b9: 77 f3 ja 10b3ae <pthread_mutexattr_settype+0xe>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b3bb: 8b 54 24 08 mov 0x8(%esp),%edx
10b3bf: 89 50 10 mov %edx,0x10(%eax)
return 0;
10b3c2: 31 c0 xor %eax,%eax
10b3c4: c3 ret
0010c0e8 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10c0e8: 56 push %esi
10c0e9: 53 push %ebx
10c0ea: 83 ec 24 sub $0x24,%esp
10c0ed: 8b 5c 24 30 mov 0x30(%esp),%ebx
if ( !once_control || !init_routine )
10c0f1: 85 db test %ebx,%ebx
10c0f3: 74 5b je 10c150 <pthread_once+0x68>
10c0f5: 8b 4c 24 34 mov 0x34(%esp),%ecx
10c0f9: 85 c9 test %ecx,%ecx
10c0fb: 74 53 je 10c150 <pthread_once+0x68>
return EINVAL;
if ( !once_control->init_executed ) {
10c0fd: 8b 53 04 mov 0x4(%ebx),%edx
10c100: 85 d2 test %edx,%edx
10c102: 74 08 je 10c10c <pthread_once+0x24>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10c104: 31 c0 xor %eax,%eax
}
10c106: 83 c4 24 add $0x24,%esp
10c109: 5b pop %ebx
10c10a: 5e pop %esi
10c10b: c3 ret
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10c10c: 8d 74 24 1c lea 0x1c(%esp),%esi
10c110: 89 74 24 08 mov %esi,0x8(%esp)
10c114: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
10c11b: 00
10c11c: c7 04 24 00 01 00 00 movl $0x100,(%esp)
10c123: e8 bc 0b 00 00 call 10cce4 <rtems_task_mode>
if ( !once_control->init_executed ) {
10c128: 8b 43 04 mov 0x4(%ebx),%eax
10c12b: 85 c0 test %eax,%eax
10c12d: 74 2d je 10c15c <pthread_once+0x74> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10c12f: 89 74 24 08 mov %esi,0x8(%esp)
10c133: c7 44 24 04 00 01 00 movl $0x100,0x4(%esp)
10c13a: 00
10c13b: 8b 44 24 1c mov 0x1c(%esp),%eax
10c13f: 89 04 24 mov %eax,(%esp)
10c142: e8 9d 0b 00 00 call 10cce4 <rtems_task_mode>
}
return 0;
10c147: 31 c0 xor %eax,%eax
}
10c149: 83 c4 24 add $0x24,%esp
10c14c: 5b pop %ebx
10c14d: 5e pop %esi
10c14e: c3 ret
10c14f: 90 nop
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10c150: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10c155: 83 c4 24 add $0x24,%esp
10c158: 5b pop %ebx
10c159: 5e pop %esi
10c15a: c3 ret
10c15b: 90 nop
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
10c15c: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10c162: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10c169: 8b 44 24 34 mov 0x34(%esp),%eax
10c16d: ff d0 call *%eax
10c16f: eb be jmp 10c12f <pthread_once+0x47>
0010bf04 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10bf04: 56 push %esi
10bf05: 53 push %ebx
10bf06: 83 ec 34 sub $0x34,%esp
10bf09: 8b 5c 24 40 mov 0x40(%esp),%ebx
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10bf0d: 85 db test %ebx,%ebx
10bf0f: 74 0e je 10bf1f <pthread_rwlock_init+0x1b>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bf11: 8b 44 24 44 mov 0x44(%esp),%eax
10bf15: 85 c0 test %eax,%eax
10bf17: 74 7f je 10bf98 <pthread_rwlock_init+0x94>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bf19: 8b 10 mov (%eax),%edx
10bf1b: 85 d2 test %edx,%edx
10bf1d: 75 0d jne 10bf2c <pthread_rwlock_init+0x28><== ALWAYS TAKEN
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10bf1f: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bf24: 83 c4 34 add $0x34,%esp
10bf27: 5b pop %ebx
10bf28: 5e pop %esi
10bf29: c3 ret
10bf2a: 66 90 xchg %ax,%ax
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
switch ( the_attr->process_shared ) {
10bf2c: 8b 40 04 mov 0x4(%eax),%eax
10bf2f: 85 c0 test %eax,%eax
10bf31: 75 ec jne 10bf1f <pthread_rwlock_init+0x1b><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10bf33: c7 44 24 24 00 00 00 movl $0x0,0x24(%esp)
10bf3a: 00
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bf3b: a1 64 60 13 00 mov 0x136064,%eax
10bf40: 40 inc %eax
10bf41: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10bf46: a1 64 60 13 00 mov 0x136064,%eax
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
10bf4b: c7 04 24 c0 62 13 00 movl $0x1362c0,(%esp)
10bf52: e8 85 29 00 00 call 10e8dc <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10bf57: 85 c0 test %eax,%eax
10bf59: 74 51 je 10bfac <pthread_rwlock_init+0xa8>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10bf5b: 8d 54 24 24 lea 0x24(%esp),%edx
10bf5f: 89 54 24 04 mov %edx,0x4(%esp)
10bf63: 8d 50 10 lea 0x10(%eax),%edx
10bf66: 89 14 24 mov %edx,(%esp)
10bf69: 89 44 24 1c mov %eax,0x1c(%esp)
10bf6d: e8 be 23 00 00 call 10e330 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10bf72: 8b 44 24 1c mov 0x1c(%esp),%eax
10bf76: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10bf79: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bf7c: 8b 0d dc 62 13 00 mov 0x1362dc,%ecx
10bf82: 89 04 b1 mov %eax,(%ecx,%esi,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bf85: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10bf8c: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bf8e: e8 25 3b 00 00 call 10fab8 <_Thread_Enable_dispatch>
return 0;
10bf93: 31 c0 xor %eax,%eax
10bf95: eb 8d jmp 10bf24 <pthread_rwlock_init+0x20>
10bf97: 90 nop
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10bf98: 8d 74 24 28 lea 0x28(%esp),%esi
10bf9c: 89 34 24 mov %esi,(%esp)
10bf9f: e8 04 07 00 00 call 10c6a8 <pthread_rwlockattr_init>
the_attr = &default_attr;
10bfa4: 89 f0 mov %esi,%eax
10bfa6: e9 6e ff ff ff jmp 10bf19 <pthread_rwlock_init+0x15>
10bfab: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10bfac: e8 07 3b 00 00 call 10fab8 <_Thread_Enable_dispatch>
return EAGAIN;
10bfb1: b8 0b 00 00 00 mov $0xb,%eax
10bfb6: e9 69 ff ff ff jmp 10bf24 <pthread_rwlock_init+0x20>
0010ca24 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ca24: 56 push %esi
10ca25: 53 push %ebx
10ca26: 83 ec 44 sub $0x44,%esp
10ca29: 8b 5c 24 50 mov 0x50(%esp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ca2d: 85 db test %ebx,%ebx
10ca2f: 0f 84 8f 00 00 00 je 10cac4 <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 );
10ca35: 8d 44 24 3c lea 0x3c(%esp),%eax
10ca39: 89 44 24 04 mov %eax,0x4(%esp)
10ca3d: 8b 44 24 54 mov 0x54(%esp),%eax
10ca41: 89 04 24 mov %eax,(%esp)
10ca44: e8 c7 62 00 00 call 112d10 <_POSIX_Absolute_timeout_to_ticks>
10ca49: 89 c6 mov %eax,%esi
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10ca4b: 8d 54 24 38 lea 0x38(%esp),%edx
10ca4f: 89 54 24 08 mov %edx,0x8(%esp)
10ca53: 8b 13 mov (%ebx),%edx
10ca55: 89 54 24 04 mov %edx,0x4(%esp)
10ca59: c7 04 24 c0 48 13 00 movl $0x1348c0,(%esp)
10ca60: e8 ab 2a 00 00 call 10f510 <_Objects_Get>
switch ( location ) {
10ca65: 8b 54 24 38 mov 0x38(%esp),%edx
10ca69: 85 d2 test %edx,%edx
10ca6b: 75 57 jne 10cac4 <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 );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ca6d: 83 fe 03 cmp $0x3,%esi
10ca70: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ca73: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10ca7a: 00
10ca7b: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10ca7f: 89 4c 24 0c mov %ecx,0xc(%esp)
10ca83: 0f b6 ca movzbl %dl,%ecx
10ca86: 89 4c 24 08 mov %ecx,0x8(%esp)
10ca8a: 8b 0b mov (%ebx),%ecx
10ca8c: 89 4c 24 04 mov %ecx,0x4(%esp)
10ca90: 83 c0 10 add $0x10,%eax
10ca93: 89 04 24 mov %eax,(%esp)
10ca96: 88 54 24 2c mov %dl,0x2c(%esp)
10ca9a: e8 e9 1d 00 00 call 10e888 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ca9f: e8 b0 36 00 00 call 110154 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10caa4: 8a 54 24 2c mov 0x2c(%esp),%dl
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10caa8: a1 2c 4c 13 00 mov 0x134c2c,%eax
10caad: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
10cab0: 84 d2 test %dl,%dl
10cab2: 75 05 jne 10cab9 <pthread_rwlock_timedrdlock+0x95>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10cab4: 83 f8 02 cmp $0x2,%eax
10cab7: 74 17 je 10cad0 <pthread_rwlock_timedrdlock+0xac>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cab9: 89 04 24 mov %eax,(%esp)
10cabc: e8 e3 00 00 00 call 10cba4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cac1: eb 06 jmp 10cac9 <pthread_rwlock_timedrdlock+0xa5>
10cac3: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10cac4: b8 16 00 00 00 mov $0x16,%eax
}
10cac9: 83 c4 44 add $0x44,%esp
10cacc: 5b pop %ebx
10cacd: 5e pop %esi
10cace: c3 ret
10cacf: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10cad0: 85 f6 test %esi,%esi
10cad2: 74 f0 je 10cac4 <pthread_rwlock_timedrdlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10cad4: 4e dec %esi
10cad5: 83 fe 01 cmp $0x1,%esi
10cad8: 77 df ja 10cab9 <pthread_rwlock_timedrdlock+0x95><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10cada: b8 74 00 00 00 mov $0x74,%eax
10cadf: eb e8 jmp 10cac9 <pthread_rwlock_timedrdlock+0xa5>
0010cae4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10cae4: 56 push %esi
10cae5: 53 push %ebx
10cae6: 83 ec 44 sub $0x44,%esp
10cae9: 8b 5c 24 50 mov 0x50(%esp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10caed: 85 db test %ebx,%ebx
10caef: 0f 84 8f 00 00 00 je 10cb84 <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 );
10caf5: 8d 44 24 3c lea 0x3c(%esp),%eax
10caf9: 89 44 24 04 mov %eax,0x4(%esp)
10cafd: 8b 44 24 54 mov 0x54(%esp),%eax
10cb01: 89 04 24 mov %eax,(%esp)
10cb04: e8 07 62 00 00 call 112d10 <_POSIX_Absolute_timeout_to_ticks>
10cb09: 89 c6 mov %eax,%esi
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10cb0b: 8d 54 24 38 lea 0x38(%esp),%edx
10cb0f: 89 54 24 08 mov %edx,0x8(%esp)
10cb13: 8b 13 mov (%ebx),%edx
10cb15: 89 54 24 04 mov %edx,0x4(%esp)
10cb19: c7 04 24 c0 48 13 00 movl $0x1348c0,(%esp)
10cb20: e8 eb 29 00 00 call 10f510 <_Objects_Get>
switch ( location ) {
10cb25: 8b 54 24 38 mov 0x38(%esp),%edx
10cb29: 85 d2 test %edx,%edx
10cb2b: 75 57 jne 10cb84 <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 );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10cb2d: 83 fe 03 cmp $0x3,%esi
10cb30: 0f 94 c2 sete %dl
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10cb33: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10cb3a: 00
10cb3b: 8b 4c 24 3c mov 0x3c(%esp),%ecx
10cb3f: 89 4c 24 0c mov %ecx,0xc(%esp)
10cb43: 0f b6 ca movzbl %dl,%ecx
10cb46: 89 4c 24 08 mov %ecx,0x8(%esp)
10cb4a: 8b 0b mov (%ebx),%ecx
10cb4c: 89 4c 24 04 mov %ecx,0x4(%esp)
10cb50: 83 c0 10 add $0x10,%eax
10cb53: 89 04 24 mov %eax,(%esp)
10cb56: 88 54 24 2c mov %dl,0x2c(%esp)
10cb5a: e8 f1 1d 00 00 call 10e950 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10cb5f: e8 f0 35 00 00 call 110154 <_Thread_Enable_dispatch>
if ( !do_wait &&
10cb64: 8a 54 24 2c mov 0x2c(%esp),%dl
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10cb68: a1 2c 4c 13 00 mov 0x134c2c,%eax
10cb6d: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10cb70: 84 d2 test %dl,%dl
10cb72: 75 05 jne 10cb79 <pthread_rwlock_timedwrlock+0x95>
10cb74: 83 f8 02 cmp $0x2,%eax
10cb77: 74 17 je 10cb90 <pthread_rwlock_timedwrlock+0xac>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cb79: 89 04 24 mov %eax,(%esp)
10cb7c: e8 23 00 00 00 call 10cba4 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cb81: eb 06 jmp 10cb89 <pthread_rwlock_timedwrlock+0xa5>
10cb83: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10cb84: b8 16 00 00 00 mov $0x16,%eax
}
10cb89: 83 c4 44 add $0x44,%esp
10cb8c: 5b pop %ebx
10cb8d: 5e pop %esi
10cb8e: c3 ret
10cb8f: 90 nop
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10cb90: 85 f6 test %esi,%esi
10cb92: 74 f0 je 10cb84 <pthread_rwlock_timedwrlock+0xa0><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10cb94: 4e dec %esi
10cb95: 83 fe 01 cmp $0x1,%esi
10cb98: 77 df ja 10cb79 <pthread_rwlock_timedwrlock+0x95><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10cb9a: b8 74 00 00 00 mov $0x74,%eax
10cb9f: eb e8 jmp 10cb89 <pthread_rwlock_timedwrlock+0xa5>
0010d3e0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10d3e0: 8b 44 24 04 mov 0x4(%esp),%eax
if ( !attr )
10d3e4: 85 c0 test %eax,%eax
10d3e6: 74 06 je 10d3ee <pthread_rwlockattr_setpshared+0xe>
return EINVAL;
if ( !attr->is_initialized )
10d3e8: 8b 10 mov (%eax),%edx
10d3ea: 85 d2 test %edx,%edx
10d3ec: 75 06 jne 10d3f4 <pthread_rwlockattr_setpshared+0x14>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d3ee: b8 16 00 00 00 mov $0x16,%eax
}
}
10d3f3: c3 ret
return EINVAL;
if ( !attr->is_initialized )
return EINVAL;
switch ( pshared ) {
10d3f4: 83 7c 24 08 01 cmpl $0x1,0x8(%esp)
10d3f9: 77 f3 ja 10d3ee <pthread_rwlockattr_setpshared+0xe><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d3fb: 8b 54 24 08 mov 0x8(%esp),%edx
10d3ff: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d402: 31 c0 xor %eax,%eax
10d404: c3 ret
0010e59c <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10e59c: 55 push %ebp
10e59d: 57 push %edi
10e59e: 56 push %esi
10e59f: 53 push %ebx
10e5a0: 83 ec 3c sub $0x3c,%esp
10e5a3: 8b 74 24 58 mov 0x58(%esp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e5a7: 85 f6 test %esi,%esi
10e5a9: 0f 84 d5 00 00 00 je 10e684 <pthread_setschedparam+0xe8>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10e5af: 8d 44 24 28 lea 0x28(%esp),%eax
10e5b3: 89 44 24 0c mov %eax,0xc(%esp)
10e5b7: 8d 44 24 24 lea 0x24(%esp),%eax
10e5bb: 89 44 24 08 mov %eax,0x8(%esp)
10e5bf: 89 74 24 04 mov %esi,0x4(%esp)
10e5c3: 8b 44 24 54 mov 0x54(%esp),%eax
10e5c7: 89 04 24 mov %eax,(%esp)
10e5ca: e8 d9 59 00 00 call 113fa8 <_POSIX_Thread_Translate_sched_param>
10e5cf: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10e5d1: 85 c0 test %eax,%eax
10e5d3: 74 0b je 10e5e0 <pthread_setschedparam+0x44>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e5d5: 89 d8 mov %ebx,%eax
10e5d7: 83 c4 3c add $0x3c,%esp
10e5da: 5b pop %ebx
10e5db: 5e pop %esi
10e5dc: 5f pop %edi
10e5dd: 5d pop %ebp
10e5de: c3 ret
10e5df: 90 nop
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10e5e0: 8d 44 24 2c lea 0x2c(%esp),%eax
10e5e4: 89 44 24 04 mov %eax,0x4(%esp)
10e5e8: 8b 44 24 50 mov 0x50(%esp),%eax
10e5ec: 89 04 24 mov %eax,(%esp)
10e5ef: e8 20 2c 00 00 call 111214 <_Thread_Get>
10e5f4: 89 c5 mov %eax,%ebp
switch ( location ) {
10e5f6: 8b 54 24 2c mov 0x2c(%esp),%edx
10e5fa: 85 d2 test %edx,%edx
10e5fc: 0f 85 92 00 00 00 jne 10e694 <pthread_setschedparam+0xf8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e602: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
if ( api->schedpolicy == SCHED_SPORADIC )
10e608: 83 ba 84 00 00 00 04 cmpl $0x4,0x84(%edx)
10e60f: 0f 84 bd 00 00 00 je 10e6d2 <pthread_setschedparam+0x136>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10e615: 8b 44 24 54 mov 0x54(%esp),%eax
10e619: 89 82 84 00 00 00 mov %eax,0x84(%edx)
api->schedparam = *param;
10e61f: 8d ba 88 00 00 00 lea 0x88(%edx),%edi
10e625: b9 07 00 00 00 mov $0x7,%ecx
10e62a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10e62c: 8b 44 24 24 mov 0x24(%esp),%eax
10e630: 89 45 78 mov %eax,0x78(%ebp)
the_thread->budget_callout = budget_callout;
10e633: 8b 44 24 28 mov 0x28(%esp),%eax
10e637: 89 45 7c mov %eax,0x7c(%ebp)
switch ( api->schedpolicy ) {
10e63a: 8b 44 24 54 mov 0x54(%esp),%eax
10e63e: 85 c0 test %eax,%eax
10e640: 78 38 js 10e67a <pthread_setschedparam+0xde><== NEVER TAKEN
10e642: 83 7c 24 54 02 cmpl $0x2,0x54(%esp)
10e647: 7e 5b jle 10e6a4 <pthread_setschedparam+0x108>
10e649: 83 7c 24 54 04 cmpl $0x4,0x54(%esp)
10e64e: 75 2a jne 10e67a <pthread_setschedparam+0xde><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10e650: 8b 82 88 00 00 00 mov 0x88(%edx),%eax
10e656: 89 82 a4 00 00 00 mov %eax,0xa4(%edx)
_Watchdog_Remove( &api->Sporadic_timer );
10e65c: 81 c2 a8 00 00 00 add $0xa8,%edx
10e662: 89 14 24 mov %edx,(%esp)
10e665: e8 36 3a 00 00 call 1120a0 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10e66a: 89 6c 24 04 mov %ebp,0x4(%esp)
10e66e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10e675: e8 ea fd ff ff call 10e464 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
10e67a: e8 75 2b 00 00 call 1111f4 <_Thread_Enable_dispatch>
10e67f: e9 51 ff ff ff jmp 10e5d5 <pthread_setschedparam+0x39>
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10e684: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e689: 89 d8 mov %ebx,%eax
10e68b: 83 c4 3c add $0x3c,%esp
10e68e: 5b pop %ebx
10e68f: 5e pop %esi
10e690: 5f pop %edi
10e691: 5d pop %ebp
10e692: c3 ret
10e693: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10e694: bb 03 00 00 00 mov $0x3,%ebx
}
10e699: 89 d8 mov %ebx,%eax
10e69b: 83 c4 3c add $0x3c,%esp
10e69e: 5b pop %ebx
10e69f: 5e pop %esi
10e6a0: 5f pop %edi
10e6a1: 5d pop %ebp
10e6a2: c3 ret
10e6a3: 90 nop
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e6a4: a1 f8 7a 13 00 mov 0x137af8,%eax
10e6a9: 89 45 74 mov %eax,0x74(%ebp)
10e6ac: 0f b6 05 0c 36 13 00 movzbl 0x13360c,%eax
10e6b3: 2b 82 88 00 00 00 sub 0x88(%edx),%eax
the_thread->real_priority =
10e6b9: 89 45 18 mov %eax,0x18(%ebp)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10e6bc: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10e6c3: 00
10e6c4: 89 44 24 04 mov %eax,0x4(%esp)
10e6c8: 89 2c 24 mov %ebp,(%esp)
10e6cb: e8 b8 26 00 00 call 110d88 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10e6d0: eb a8 jmp 10e67a <pthread_setschedparam+0xde>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10e6d2: 8d 82 a8 00 00 00 lea 0xa8(%edx),%eax
10e6d8: 89 04 24 mov %eax,(%esp)
10e6db: 89 54 24 1c mov %edx,0x1c(%esp)
10e6df: e8 bc 39 00 00 call 1120a0 <_Watchdog_Remove>
10e6e4: 8b 54 24 1c mov 0x1c(%esp),%edx
10e6e8: e9 28 ff ff ff jmp 10e615 <pthread_setschedparam+0x79>
00111da4 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
111da4: 56 push %esi
111da5: 53 push %ebx
111da6: 51 push %ecx
111da7: 8b 54 24 10 mov 0x10(%esp),%edx
111dab: 8b 5c 24 14 mov 0x14(%esp),%ebx
111daf: 8b 4c 24 18 mov 0x18(%esp),%ecx
POSIX_API_Control *api;
if ( !set && !oset )
111db3: 85 db test %ebx,%ebx
111db5: 0f 84 81 00 00 00 je 111e3c <pthread_sigmask+0x98>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111dbb: a1 2c 48 13 00 mov 0x13482c,%eax
111dc0: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
if ( oset )
111dc6: 85 c9 test %ecx,%ecx
111dc8: 74 08 je 111dd2 <pthread_sigmask+0x2e>
*oset = api->signals_blocked;
111dca: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi
111dd0: 89 31 mov %esi,(%ecx)
if ( !set )
return 0;
switch ( how ) {
111dd2: 83 fa 01 cmp $0x1,%edx
111dd5: 74 59 je 111e30 <pthread_sigmask+0x8c>
111dd7: 83 fa 02 cmp $0x2,%edx
111dda: 74 34 je 111e10 <pthread_sigmask+0x6c>
111ddc: 85 d2 test %edx,%edx
111dde: 75 3c jne 111e1c <pthread_sigmask+0x78>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
111de0: 8b 13 mov (%ebx),%edx
111de2: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
111de8: 8b 15 a8 4a 13 00 mov 0x134aa8,%edx
111dee: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
111df4: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111dfa: f7 d0 not %eax
111dfc: 85 c2 test %eax,%edx
111dfe: 75 08 jne 111e08 <pthread_sigmask+0x64>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
111e00: 31 c0 xor %eax,%eax
}
111e02: 5a pop %edx
111e03: 5b pop %ebx
111e04: 5e pop %esi
111e05: c3 ret
111e06: 66 90 xchg %ax,%ax
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
111e08: e8 b3 cc ff ff call 10eac0 <_Thread_Dispatch>
111e0d: eb f1 jmp 111e00 <pthread_sigmask+0x5c>
111e0f: 90 nop
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
111e10: 8b 13 mov (%ebx),%edx
111e12: f7 d2 not %edx
111e14: 21 90 d0 00 00 00 and %edx,0xd0(%eax)
break;
111e1a: eb cc jmp 111de8 <pthread_sigmask+0x44>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
111e1c: e8 03 2d 00 00 call 114b24 <__errno>
111e21: c7 00 16 00 00 00 movl $0x16,(%eax)
111e27: b8 ff ff ff ff mov $0xffffffff,%eax
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
111e2c: 5a pop %edx
111e2d: 5b pop %ebx
111e2e: 5e pop %esi
111e2f: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
111e30: 8b 13 mov (%ebx),%edx
111e32: 09 90 d0 00 00 00 or %edx,0xd0(%eax)
break;
111e38: eb ae jmp 111de8 <pthread_sigmask+0x44>
111e3a: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
111e3c: 85 c9 test %ecx,%ecx
111e3e: 74 dc je 111e1c <pthread_sigmask+0x78> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111e40: a1 2c 48 13 00 mov 0x13482c,%eax
if ( oset )
*oset = api->signals_blocked;
111e45: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
111e4b: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111e51: 89 01 mov %eax,(%ecx)
111e53: eb ab jmp 111e00 <pthread_sigmask+0x5c>
0010bda0 <pthread_testcancel>:
* 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() )
10bda0: 8b 0d 48 36 13 00 mov 0x133648,%ecx
10bda6: 85 c9 test %ecx,%ecx
10bda8: 75 52 jne 10bdfc <pthread_testcancel+0x5c><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bdaa: a1 4c 36 13 00 mov 0x13364c,%eax
10bdaf: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10bdb5: 8b 15 c4 30 13 00 mov 0x1330c4,%edx
10bdbb: 42 inc %edx
10bdbc: 89 15 c4 30 13 00 mov %edx,0x1330c4
return _Thread_Dispatch_disable_level;
10bdc2: 8b 15 c4 30 13 00 mov 0x1330c4,%edx
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10bdc8: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx
10bdce: 85 d2 test %edx,%edx
10bdd0: 75 2e jne 10be00 <pthread_testcancel+0x60><== NEVER TAKEN
10bdd2: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10bdd8: 85 c0 test %eax,%eax
10bdda: 74 24 je 10be00 <pthread_testcancel+0x60>
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10bddc: 83 ec 1c sub $0x1c,%esp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bddf: e8 08 2a 00 00 call 10e7ec <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10bde4: c7 44 24 04 ff ff ff movl $0xffffffff,0x4(%esp)
10bdeb: ff
10bdec: a1 4c 36 13 00 mov 0x13364c,%eax
10bdf1: 89 04 24 mov %eax,(%esp)
10bdf4: e8 a3 58 00 00 call 11169c <_POSIX_Thread_Exit>
}
10bdf9: 83 c4 1c add $0x1c,%esp <== NOT EXECUTED
10bdfc: c3 ret <== NOT EXECUTED
10bdfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10be00: e9 e7 29 00 00 jmp 10e7ec <_Thread_Enable_dispatch>
0010c11c <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10c11c: 55 push %ebp
10c11d: 57 push %edi
10c11e: 56 push %esi
10c11f: 53 push %ebx
10c120: 83 ec 4c sub $0x4c,%esp
10c123: 8b 5c 24 60 mov 0x60(%esp),%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);
10c127: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10c12e: e8 6d 0a 00 00 call 10cba0 <pthread_mutex_lock>
10c133: 89 c6 mov %eax,%esi
if (result != 0) {
10c135: 85 c0 test %eax,%eax
10c137: 0f 85 bf 00 00 00 jne 10c1fc <rtems_aio_enqueue+0xe0><== NEVER TAKEN
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);
10c13d: e8 a2 13 00 00 call 10d4e4 <pthread_self>
10c142: 8d 54 24 24 lea 0x24(%esp),%edx
10c146: 89 54 24 08 mov %edx,0x8(%esp)
10c14a: 8d 54 24 20 lea 0x20(%esp),%edx
10c14e: 89 54 24 04 mov %edx,0x4(%esp)
10c152: 89 04 24 mov %eax,(%esp)
10c155: e8 5e 0f 00 00 call 10d0b8 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10c15a: e8 85 13 00 00 call 10d4e4 <pthread_self>
10c15f: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10c162: 8b 53 14 mov 0x14(%ebx),%edx
10c165: 8b 44 24 24 mov 0x24(%esp),%eax
10c169: 2b 42 14 sub 0x14(%edx),%eax
10c16c: 89 43 0c mov %eax,0xc(%ebx)
req->policy = policy;
10c16f: 8b 44 24 20 mov 0x20(%esp),%eax
10c173: 89 43 08 mov %eax,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10c176: c7 42 30 77 00 00 00 movl $0x77,0x30(%edx)
req->aiocbp->return_value = 0;
10c17d: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ((aio_request_queue.idle_threads == 0) &&
10c184: 8b 0d e8 4d 13 00 mov 0x134de8,%ecx
10c18a: 85 c9 test %ecx,%ecx
10c18c: 75 09 jne 10c197 <rtems_aio_enqueue+0x7b><== NEVER TAKEN
10c18e: 83 3d e4 4d 13 00 04 cmpl $0x4,0x134de4
10c195: 7e 79 jle 10c210 <rtems_aio_enqueue+0xf4>
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,
10c197: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c19e: 00
10c19f: 8b 02 mov (%edx),%eax
10c1a1: 89 44 24 04 mov %eax,0x4(%esp)
10c1a5: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10c1ac: e8 13 fe ff ff call 10bfc4 <rtems_aio_search_fd>
10c1b1: 89 c7 mov %eax,%edi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10c1b3: 85 c0 test %eax,%eax
10c1b5: 0f 84 e9 00 00 00 je 10c2a4 <rtems_aio_enqueue+0x188>
{
pthread_mutex_lock (&r_chain->mutex);
10c1bb: 8d 6f 1c lea 0x1c(%edi),%ebp
10c1be: 89 2c 24 mov %ebp,(%esp)
10c1c1: e8 da 09 00 00 call 10cba0 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10c1c6: 8d 47 08 lea 0x8(%edi),%eax
10c1c9: 89 da mov %ebx,%edx
10c1cb: e8 84 fc ff ff call 10be54 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10c1d0: 83 c7 20 add $0x20,%edi
10c1d3: 89 3c 24 mov %edi,(%esp)
10c1d6: e8 49 05 00 00 call 10c724 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10c1db: 89 2c 24 mov %ebp,(%esp)
10c1de: e8 61 0a 00 00 call 10cc44 <pthread_mutex_unlock>
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10c1e3: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10c1ea: e8 55 0a 00 00 call 10cc44 <pthread_mutex_unlock>
return 0;
}
10c1ef: 89 f0 mov %esi,%eax
10c1f1: 83 c4 4c add $0x4c,%esp
10c1f4: 5b pop %ebx
10c1f5: 5e pop %esi
10c1f6: 5f pop %edi
10c1f7: 5d pop %ebp
10c1f8: c3 ret
10c1f9: 8d 76 00 lea 0x0(%esi),%esi
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
10c1fc: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
10c1ff: e8 6c bb ff ff call 107d70 <free> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
10c204: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c206: 83 c4 4c add $0x4c,%esp <== NOT EXECUTED
10c209: 5b pop %ebx <== NOT EXECUTED
10c20a: 5e pop %esi <== NOT EXECUTED
10c20b: 5f pop %edi <== NOT EXECUTED
10c20c: 5d pop %ebp <== NOT EXECUTED
10c20d: c3 ret <== NOT EXECUTED
10c20e: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
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);
10c210: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10c217: 00
10c218: 8b 02 mov (%edx),%eax
10c21a: 89 44 24 04 mov %eax,0x4(%esp)
10c21e: c7 04 24 c8 4d 13 00 movl $0x134dc8,(%esp)
10c225: e8 9a fd ff ff call 10bfc4 <rtems_aio_search_fd>
10c22a: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c22c: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c230: 75 89 jne 10c1bb <rtems_aio_enqueue+0x9f>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10c232: 89 5c 24 04 mov %ebx,0x4(%esp)
10c236: 8d 40 08 lea 0x8(%eax),%eax
10c239: 89 04 24 mov %eax,(%esp)
10c23c: e8 6f 24 00 00 call 10e6b0 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c241: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c248: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c24f: 00
10c250: 8d 47 1c lea 0x1c(%edi),%eax
10c253: 89 04 24 mov %eax,(%esp)
10c256: e8 09 08 00 00 call 10ca64 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c25b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c262: 00
10c263: 8d 47 20 lea 0x20(%edi),%eax
10c266: 89 04 24 mov %eax,(%esp)
10c269: e8 f2 03 00 00 call 10c660 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10c26e: 89 7c 24 0c mov %edi,0xc(%esp)
10c272: c7 44 24 08 a8 bb 10 movl $0x10bba8,0x8(%esp)
10c279: 00
10c27a: c7 44 24 04 88 4d 13 movl $0x134d88,0x4(%esp)
10c281: 00
10c282: 8d 44 24 1c lea 0x1c(%esp),%eax
10c286: 89 04 24 mov %eax,(%esp)
10c289: e8 72 0b 00 00 call 10ce00 <pthread_create>
10c28e: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10c290: 85 c0 test %eax,%eax
10c292: 0f 85 9a 00 00 00 jne 10c332 <rtems_aio_enqueue+0x216><== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
10c298: ff 05 e4 4d 13 00 incl 0x134de4
10c29e: e9 40 ff ff ff jmp 10c1e3 <rtems_aio_enqueue+0xc7>
10c2a3: 90 nop
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c2a4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
10c2ab: 00
10c2ac: 8b 43 14 mov 0x14(%ebx),%eax
10c2af: 8b 00 mov (%eax),%eax
10c2b1: 89 44 24 04 mov %eax,0x4(%esp)
10c2b5: c7 04 24 d4 4d 13 00 movl $0x134dd4,(%esp)
10c2bc: e8 03 fd ff ff call 10bfc4 <rtems_aio_search_fd>
10c2c1: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c2c3: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c2c7: 74 2b je 10c2f4 <rtems_aio_enqueue+0x1d8>
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10c2c9: 8d 40 08 lea 0x8(%eax),%eax
10c2cc: 89 da mov %ebx,%edx
10c2ce: e8 81 fb ff ff call 10be54 <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
10c2d3: 8b 15 e8 4d 13 00 mov 0x134de8,%edx
10c2d9: 85 d2 test %edx,%edx
10c2db: 0f 8e 02 ff ff ff jle 10c1e3 <rtems_aio_enqueue+0xc7><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10c2e1: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp) <== NOT EXECUTED
10c2e8: e8 37 04 00 00 call 10c724 <pthread_cond_signal> <== NOT EXECUTED
10c2ed: e9 f1 fe ff ff jmp 10c1e3 <rtems_aio_enqueue+0xc7><== NOT EXECUTED
10c2f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
10c2f4: 89 5c 24 04 mov %ebx,0x4(%esp)
10c2f8: 8d 40 08 lea 0x8(%eax),%eax
10c2fb: 89 04 24 mov %eax,(%esp)
10c2fe: e8 ad 23 00 00 call 10e6b0 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* 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;
10c303: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c30a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c311: 00
10c312: 8d 47 1c lea 0x1c(%edi),%eax
10c315: 89 04 24 mov %eax,(%esp)
10c318: e8 47 07 00 00 call 10ca64 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c31d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c324: 00
10c325: 83 c7 20 add $0x20,%edi
10c328: 89 3c 24 mov %edi,(%esp)
10c32b: e8 30 03 00 00 call 10c660 <pthread_cond_init>
10c330: eb a1 jmp 10c2d3 <rtems_aio_enqueue+0x1b7>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10c332: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp) <== NOT EXECUTED
10c339: e8 06 09 00 00 call 10cc44 <pthread_mutex_unlock> <== NOT EXECUTED
10c33e: 89 de mov %ebx,%esi <== NOT EXECUTED
10c340: e9 aa fe ff ff jmp 10c1ef <rtems_aio_enqueue+0xd3><== NOT EXECUTED
0010bba8 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10bba8: 55 push %ebp
10bba9: 57 push %edi
10bbaa: 56 push %esi
10bbab: 53 push %ebx
10bbac: 83 ec 6c sub $0x6c,%esp
rtems_aio_request_chain *r_chain = arg;
10bbaf: 8b b4 24 80 00 00 00 mov 0x80(%esp),%esi
10bbb6: 8d 7e 1c lea 0x1c(%esi),%edi
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);
10bbb9: 8d 6c 24 44 lea 0x44(%esp),%ebp
10bbbd: 8d 76 00 lea 0x0(%esi),%esi
/* 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);
10bbc0: 89 3c 24 mov %edi,(%esp)
10bbc3: e8 d8 0f 00 00 call 10cba0 <pthread_mutex_lock>
if (result != 0)
10bbc8: 85 c0 test %eax,%eax
10bbca: 0f 85 a0 00 00 00 jne 10bc70 <rtems_aio_handle+0xc8> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10bbd0: 8b 5e 08 mov 0x8(%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 );
10bbd3: 8d 46 0c lea 0xc(%esi),%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)) {
10bbd6: 39 c3 cmp %eax,%ebx
10bbd8: 0f 84 16 01 00 00 je 10bcf4 <rtems_aio_handle+0x14c>
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);
10bbde: e8 01 19 00 00 call 10d4e4 <pthread_self>
10bbe3: 89 6c 24 08 mov %ebp,0x8(%esp)
10bbe7: 8d 54 24 38 lea 0x38(%esp),%edx
10bbeb: 89 54 24 04 mov %edx,0x4(%esp)
10bbef: 89 04 24 mov %eax,(%esp)
10bbf2: e8 c1 14 00 00 call 10d0b8 <pthread_getschedparam>
param.sched_priority = req->priority;
10bbf7: 8b 43 0c mov 0xc(%ebx),%eax
10bbfa: 89 44 24 44 mov %eax,0x44(%esp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10bbfe: 8b 53 08 mov 0x8(%ebx),%edx
10bc01: 89 54 24 2c mov %edx,0x2c(%esp)
10bc05: e8 da 18 00 00 call 10d4e4 <pthread_self>
10bc0a: 89 6c 24 08 mov %ebp,0x8(%esp)
10bc0e: 8b 54 24 2c mov 0x2c(%esp),%edx
10bc12: 89 54 24 04 mov %edx,0x4(%esp)
10bc16: 89 04 24 mov %eax,(%esp)
10bc19: e8 d2 18 00 00 call 10d4f0 <pthread_setschedparam>
10bc1e: 89 1c 24 mov %ebx,(%esp)
10bc21: e8 56 2a 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10bc26: 89 3c 24 mov %edi,(%esp)
10bc29: e8 16 10 00 00 call 10cc44 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10bc2e: 8b 4b 14 mov 0x14(%ebx),%ecx
10bc31: 8b 41 2c mov 0x2c(%ecx),%eax
10bc34: 83 f8 02 cmp $0x2,%eax
10bc37: 0f 84 8f 00 00 00 je 10bccc <rtems_aio_handle+0x124>
10bc3d: 83 f8 03 cmp $0x3,%eax
10bc40: 74 7e je 10bcc0 <rtems_aio_handle+0x118><== NEVER TAKEN
10bc42: 48 dec %eax
10bc43: 74 37 je 10bc7c <rtems_aio_handle+0xd4> <== ALWAYS TAKEN
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
10bc45: c7 41 34 ff ff ff ff movl $0xffffffff,0x34(%ecx) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10bc4c: 89 4c 24 2c mov %ecx,0x2c(%esp) <== NOT EXECUTED
10bc50: e8 63 a2 00 00 call 115eb8 <__errno> <== NOT EXECUTED
10bc55: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10bc57: 8b 4c 24 2c mov 0x2c(%esp),%ecx <== NOT EXECUTED
10bc5b: 89 41 30 mov %eax,0x30(%ecx) <== NOT EXECUTED
/* 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);
10bc5e: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED
10bc61: e8 3a 0f 00 00 call 10cba0 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
10bc66: 85 c0 test %eax,%eax <== NOT EXECUTED
10bc68: 0f 84 62 ff ff ff je 10bbd0 <rtems_aio_handle+0x28> <== NOT EXECUTED
10bc6e: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10bc70: 31 c0 xor %eax,%eax
10bc72: 83 c4 6c add $0x6c,%esp
10bc75: 5b pop %ebx
10bc76: 5e pop %esi
10bc77: 5f pop %edi
10bc78: 5d pop %ebp
10bc79: c3 ret
10bc7a: 66 90 xchg %ax,%ax
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10bc7c: 8b 41 04 mov 0x4(%ecx),%eax
10bc7f: 8b 51 08 mov 0x8(%ecx),%edx
10bc82: 89 44 24 0c mov %eax,0xc(%esp)
10bc86: 89 54 24 10 mov %edx,0x10(%esp)
10bc8a: 8b 41 10 mov 0x10(%ecx),%eax
10bc8d: 89 44 24 08 mov %eax,0x8(%esp)
10bc91: 8b 41 0c mov 0xc(%ecx),%eax
10bc94: 89 44 24 04 mov %eax,0x4(%esp)
10bc98: 8b 01 mov (%ecx),%eax
10bc9a: 89 04 24 mov %eax,(%esp)
10bc9d: e8 da ab 00 00 call 11687c <pread>
break;
default:
result = -1;
}
if (result == -1) {
10bca2: 83 f8 ff cmp $0xffffffff,%eax
10bca5: 0f 84 87 01 00 00 je 10be32 <rtems_aio_handle+0x28a><== NEVER TAKEN
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
10bcab: 8b 53 14 mov 0x14(%ebx),%edx
10bcae: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10bcb1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10bcb8: e9 03 ff ff ff jmp 10bbc0 <rtems_aio_handle+0x18>
10bcbd: 8d 76 00 lea 0x0(%esi),%esi
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10bcc0: 8b 01 mov (%ecx),%eax <== NOT EXECUTED
10bcc2: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10bcc5: e8 7a 66 00 00 call 112344 <fsync> <== NOT EXECUTED
break;
10bcca: eb d6 jmp 10bca2 <rtems_aio_handle+0xfa> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10bccc: 8b 41 04 mov 0x4(%ecx),%eax
10bccf: 8b 51 08 mov 0x8(%ecx),%edx
10bcd2: 89 44 24 0c mov %eax,0xc(%esp)
10bcd6: 89 54 24 10 mov %edx,0x10(%esp)
10bcda: 8b 41 10 mov 0x10(%ecx),%eax
10bcdd: 89 44 24 08 mov %eax,0x8(%esp)
10bce1: 8b 41 0c mov 0xc(%ecx),%eax
10bce4: 89 44 24 04 mov %eax,0x4(%esp)
10bce8: 8b 01 mov (%ecx),%eax
10bcea: 89 04 24 mov %eax,(%esp)
10bced: e8 8a ac 00 00 call 11697c <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10bcf2: eb ae jmp 10bca2 <rtems_aio_handle+0xfa>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10bcf4: 89 3c 24 mov %edi,(%esp)
10bcf7: e8 48 0f 00 00 call 10cc44 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10bcfc: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bd03: e8 98 0e 00 00 call 10cba0 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10bd08: 3b 5e 08 cmp 0x8(%esi),%ebx
10bd0b: 74 13 je 10bd20 <rtems_aio_handle+0x178><== ALWAYS TAKEN
}
}
/* 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);
10bd0d: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bd14: e8 2b 0f 00 00 call 10cc44 <pthread_mutex_unlock>
10bd19: e9 a2 fe ff ff jmp 10bbc0 <rtems_aio_handle+0x18>
10bd1e: 66 90 xchg %ax,%ax
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
10bd20: 8d 44 24 3c lea 0x3c(%esp),%eax
10bd24: 89 44 24 04 mov %eax,0x4(%esp)
10bd28: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10bd2f: e8 88 07 00 00 call 10c4bc <clock_gettime>
timeout.tv_sec += 3;
10bd34: 83 44 24 3c 03 addl $0x3,0x3c(%esp)
timeout.tv_nsec = 0;
10bd39: c7 44 24 40 00 00 00 movl $0x0,0x40(%esp)
10bd40: 00
result = pthread_cond_timedwait (&r_chain->cond,
10bd41: 8d 5e 20 lea 0x20(%esi),%ebx
&aio_request_queue.mutex,
&timeout);
10bd44: 8d 44 24 3c lea 0x3c(%esp),%eax
10bd48: 89 44 24 08 mov %eax,0x8(%esp)
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
10bd4c: c7 44 24 04 80 4d 13 movl $0x134d80,0x4(%esp)
10bd53: 00
10bd54: 89 1c 24 mov %ebx,(%esp)
10bd57: e8 50 0a 00 00 call 10c7ac <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) {
10bd5c: 83 f8 74 cmp $0x74,%eax
10bd5f: 75 ac jne 10bd0d <rtems_aio_handle+0x165><== NEVER TAKEN
10bd61: 89 34 24 mov %esi,(%esp)
10bd64: e8 13 29 00 00 call 10e67c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10bd69: 89 3c 24 mov %edi,(%esp)
10bd6c: e8 87 0b 00 00 call 10c8f8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10bd71: 89 1c 24 mov %ebx,(%esp)
10bd74: e8 07 08 00 00 call 10c580 <pthread_cond_destroy>
free (r_chain);
10bd79: 89 34 24 mov %esi,(%esp)
10bd7c: e8 ef bf ff ff call 107d70 <free>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10bd81: 8b 35 d4 4d 13 00 mov 0x134dd4,%esi
/* 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)) {
10bd87: 81 fe d8 4d 13 00 cmp $0x134dd8,%esi
10bd8d: 74 4a je 10bdd9 <rtems_aio_handle+0x231>
}
}
/* 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;
10bd8f: ff 0d e8 4d 13 00 decl 0x134de8
++aio_request_queue.active_threads;
10bd95: ff 05 e4 4d 13 00 incl 0x134de4
10bd9b: 89 34 24 mov %esi,(%esp)
10bd9e: e8 d9 28 00 00 call 10e67c <_Chain_Extract>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10bda3: a1 c8 4d 13 00 mov 0x134dc8,%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 &&
10bda8: 8b 56 14 mov 0x14(%esi),%edx
10bdab: 3b 50 14 cmp 0x14(%eax),%edx
10bdae: 7f 0b jg 10bdbb <rtems_aio_handle+0x213><== ALWAYS TAKEN
10bdb0: eb 10 jmp 10bdc2 <rtems_aio_handle+0x21a><== NOT EXECUTED
10bdb2: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10bdb4: 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 &&
10bdb6: 39 50 14 cmp %edx,0x14(%eax)
10bdb9: 7d 07 jge 10bdc2 <rtems_aio_handle+0x21a>
10bdbb: 3d cc 4d 13 00 cmp $0x134dcc,%eax
10bdc0: 75 f2 jne 10bdb4 <rtems_aio_handle+0x20c><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10bdc2: 89 74 24 04 mov %esi,0x4(%esp)
10bdc6: 8b 40 04 mov 0x4(%eax),%eax
10bdc9: 89 04 24 mov %eax,(%esp)
10bdcc: e8 df 28 00 00 call 10e6b0 <_Chain_Insert>
10bdd1: 8d 7e 1c lea 0x1c(%esi),%edi
10bdd4: e9 34 ff ff ff jmp 10bd0d <rtems_aio_handle+0x165>
/* 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)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10bdd9: ff 05 e8 4d 13 00 incl 0x134de8
--aio_request_queue.active_threads;
10bddf: ff 0d e4 4d 13 00 decl 0x134de4
clock_gettime (CLOCK_REALTIME, &timeout);
10bde5: 8d 44 24 3c lea 0x3c(%esp),%eax
10bde9: 89 44 24 04 mov %eax,0x4(%esp)
10bded: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10bdf4: e8 c3 06 00 00 call 10c4bc <clock_gettime>
timeout.tv_sec += 3;
10bdf9: 83 44 24 3c 03 addl $0x3,0x3c(%esp)
timeout.tv_nsec = 0;
10bdfe: c7 44 24 40 00 00 00 movl $0x0,0x40(%esp)
10be05: 00
result = pthread_cond_timedwait (&aio_request_queue.new_req,
&aio_request_queue.mutex,
&timeout);
10be06: 8d 44 24 3c lea 0x3c(%esp),%eax
10be0a: 89 44 24 08 mov %eax,0x8(%esp)
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10be0e: c7 44 24 04 80 4d 13 movl $0x134d80,0x4(%esp)
10be15: 00
10be16: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp)
10be1d: e8 8a 09 00 00 call 10c7ac <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) {
10be22: 83 f8 74 cmp $0x74,%eax
10be25: 74 13 je 10be3a <rtems_aio_handle+0x292><== ALWAYS TAKEN
10be27: 8b 35 d4 4d 13 00 mov 0x134dd4,%esi <== NOT EXECUTED
10be2d: e9 5d ff ff ff jmp 10bd8f <rtems_aio_handle+0x1e7><== NOT EXECUTED
10be32: 8b 4b 14 mov 0x14(%ebx),%ecx <== NOT EXECUTED
10be35: e9 0b fe ff ff jmp 10bc45 <rtems_aio_handle+0x9d> <== NOT EXECUTED
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10be3a: ff 0d e8 4d 13 00 decl 0x134de8
pthread_mutex_unlock (&aio_request_queue.mutex);
10be40: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10be47: e8 f8 0d 00 00 call 10cc44 <pthread_mutex_unlock>
10be4c: e9 1f fe ff ff jmp 10bc70 <rtems_aio_handle+0xc8>
0010bea8 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10bea8: 53 push %ebx
10bea9: 83 ec 18 sub $0x18,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10beac: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp)
10beb3: e8 f8 0e 00 00 call 10cdb0 <pthread_attr_init>
10beb8: 89 c3 mov %eax,%ebx
if (result != 0)
10beba: 85 c0 test %eax,%eax
10bebc: 74 0a je 10bec8 <rtems_aio_init+0x20> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
10bebe: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10bec0: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10bec3: 5b pop %ebx <== NOT EXECUTED
10bec4: c3 ret <== NOT EXECUTED
10bec5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
10bec8: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10becf: 00
10bed0: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp)
10bed7: e8 fc 0e 00 00 call 10cdd8 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10bedc: 85 c0 test %eax,%eax
10bede: 0f 85 98 00 00 00 jne 10bf7c <rtems_aio_init+0xd4> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10bee4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10beeb: 00
10beec: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp)
10bef3: e8 6c 0b 00 00 call 10ca64 <pthread_mutex_init>
if (result != 0)
10bef8: 85 c0 test %eax,%eax
10befa: 0f 85 b0 00 00 00 jne 10bfb0 <rtems_aio_init+0x108> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10bf00: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10bf07: 00
10bf08: c7 04 24 84 4d 13 00 movl $0x134d84,(%esp)
10bf0f: e8 4c 07 00 00 call 10c660 <pthread_cond_init>
10bf14: 89 c3 mov %eax,%ebx
if (result != 0) {
10bf16: 85 c0 test %eax,%eax
10bf18: 75 76 jne 10bf90 <rtems_aio_init+0xe8> <== NEVER TAKEN
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bf1a: c7 05 c8 4d 13 00 cc movl $0x134dcc,0x134dc8
10bf21: 4d 13 00
head->previous = NULL;
10bf24: c7 05 cc 4d 13 00 00 movl $0x0,0x134dcc
10bf2b: 00 00 00
tail->previous = head;
10bf2e: c7 05 d0 4d 13 00 c8 movl $0x134dc8,0x134dd0
10bf35: 4d 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10bf38: c7 05 d4 4d 13 00 d8 movl $0x134dd8,0x134dd4
10bf3f: 4d 13 00
head->previous = NULL;
10bf42: c7 05 d8 4d 13 00 00 movl $0x0,0x134dd8
10bf49: 00 00 00
tail->previous = head;
10bf4c: c7 05 dc 4d 13 00 d4 movl $0x134dd4,0x134ddc
10bf53: 4d 13 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;
10bf56: c7 05 e4 4d 13 00 00 movl $0x0,0x134de4
10bf5d: 00 00 00
aio_request_queue.idle_threads = 0;
10bf60: c7 05 e8 4d 13 00 00 movl $0x0,0x134de8
10bf67: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10bf6a: c7 05 e0 4d 13 00 0b movl $0xb00b,0x134de0
10bf71: b0 00 00
return result;
}
10bf74: 89 d8 mov %ebx,%eax
10bf76: 83 c4 18 add $0x18,%esp
10bf79: 5b pop %ebx
10bf7a: c3 ret
10bf7b: 90 nop
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10bf7c: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bf83: e8 08 0e 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bf88: e9 57 ff ff ff jmp 10bee4 <rtems_aio_init+0x3c> <== NOT EXECUTED
10bf8d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
if (result != 0) {
pthread_mutex_destroy (&aio_request_queue.mutex);
10bf90: c7 04 24 80 4d 13 00 movl $0x134d80,(%esp) <== NOT EXECUTED
10bf97: e8 5c 09 00 00 call 10c8f8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10bf9c: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bfa3: e8 e8 0d 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bfa8: e9 6d ff ff ff jmp 10bf1a <rtems_aio_init+0x72> <== NOT EXECUTED
10bfad: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10bfb0: c7 04 24 88 4d 13 00 movl $0x134d88,(%esp) <== NOT EXECUTED
10bfb7: e8 d4 0d 00 00 call 10cd90 <pthread_attr_destroy> <== NOT EXECUTED
10bfbc: e9 3f ff ff ff jmp 10bf00 <rtems_aio_init+0x58> <== NOT EXECUTED
0010be54 <rtems_aio_insert_prio>:
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10be54: 56 push %esi
10be55: 53 push %ebx
10be56: 83 ec 14 sub $0x14,%esp
10be59: 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 );
10be5b: 8d 70 04 lea 0x4(%eax),%esi
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10be5e: 39 f1 cmp %esi,%ecx
10be60: 74 35 je 10be97 <rtems_aio_insert_prio+0x43><== NEVER TAKEN
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 &&
10be62: 8b 42 14 mov 0x14(%edx),%eax
10be65: 8b 58 14 mov 0x14(%eax),%ebx
if (rtems_chain_is_empty (chain)) {
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;
10be68: 8b 41 14 mov 0x14(%ecx),%eax
while (req->aiocbp->aio_reqprio > prio &&
10be6b: 39 58 14 cmp %ebx,0x14(%eax)
10be6e: 7c 08 jl 10be78 <rtems_aio_insert_prio+0x24><== NEVER TAKEN
10be70: eb 10 jmp 10be82 <rtems_aio_insert_prio+0x2e>
10be72: 66 90 xchg %ax,%ax
10be74: 39 ce cmp %ecx,%esi <== NOT EXECUTED
10be76: 74 0a je 10be82 <rtems_aio_insert_prio+0x2e><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10be78: 8b 09 mov (%ecx),%ecx <== 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;
10be7a: 8b 41 14 mov 0x14(%ecx),%eax <== 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 &&
10be7d: 39 58 14 cmp %ebx,0x14(%eax) <== NOT EXECUTED
10be80: 7c f2 jl 10be74 <rtems_aio_insert_prio+0x20><== NOT EXECUTED
10be82: 89 54 24 04 mov %edx,0x4(%esp)
10be86: 8b 41 04 mov 0x4(%ecx),%eax
10be89: 89 04 24 mov %eax,(%esp)
10be8c: e8 1f 28 00 00 call 10e6b0 <_Chain_Insert>
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10be91: 83 c4 14 add $0x14,%esp
10be94: 5b pop %ebx
10be95: 5e pop %esi
10be96: c3 ret
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10be97: 89 54 24 04 mov %edx,0x4(%esp) <== NOT EXECUTED
10be9b: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10be9e: e8 0d 28 00 00 call 10e6b0 <_Chain_Insert> <== NOT EXECUTED
10bea3: eb ec jmp 10be91 <rtems_aio_insert_prio+0x3d><== NOT EXECUTED
0010c078 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
10c078: 57 push %edi
10c079: 56 push %esi
10c07a: 53 push %ebx
10c07b: 83 ec 10 sub $0x10,%esp
10c07e: 8b 7c 24 20 mov 0x20(%esp),%edi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10c082: 8b 5f 08 mov 0x8(%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
const Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Immutable_tail( the_chain ));
10c085: 83 c7 0c add $0xc,%edi
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c088: 39 fb cmp %edi,%ebx
10c08a: 74 29 je 10c0b5 <rtems_aio_remove_fd+0x3d><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c08c: 89 1c 24 mov %ebx,(%esp)
10c08f: e8 e8 25 00 00 call 10e67c <_Chain_Extract>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c094: 8b 33 mov (%ebx),%esi
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
10c096: 8b 43 14 mov 0x14(%ebx),%eax
10c099: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
req->aiocbp->return_value = -1;
10c0a0: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (req);
10c0a7: 89 1c 24 mov %ebx,(%esp)
10c0aa: e8 c1 bc ff ff call 107d70 <free>
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
10c0af: 89 f3 mov %esi,%ebx
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c0b1: 39 fe cmp %edi,%esi
10c0b3: 75 d7 jne 10c08c <rtems_aio_remove_fd+0x14>
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
10c0b5: 83 c4 10 add $0x10,%esp
10c0b8: 5b pop %ebx
10c0b9: 5e pop %esi
10c0ba: 5f pop %edi
10c0bb: c3 ret
0010c0bc <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)
{
10c0bc: 53 push %ebx
10c0bd: 83 ec 18 sub $0x18,%esp
10c0c0: 8b 44 24 20 mov 0x20(%esp),%eax
10c0c4: 8b 54 24 24 mov 0x24(%esp),%edx
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
10c0c8: 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 );
10c0ca: 83 c0 04 add $0x4,%eax
if (rtems_chain_is_empty (chain))
10c0cd: 39 c3 cmp %eax,%ebx
10c0cf: 75 09 jne 10c0da <rtems_aio_remove_req+0x1e>
10c0d1: eb 3f jmp 10c112 <rtems_aio_remove_req+0x56>
10c0d3: 90 nop
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c0d4: 8b 1b mov (%ebx),%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) {
10c0d6: 39 d8 cmp %ebx,%eax <== NOT EXECUTED
10c0d8: 74 2e je 10c108 <rtems_aio_remove_req+0x4c><== NOT EXECUTED
10c0da: 39 53 14 cmp %edx,0x14(%ebx)
10c0dd: 75 f5 jne 10c0d4 <rtems_aio_remove_req+0x18><== NEVER TAKEN
10c0df: 89 1c 24 mov %ebx,(%esp)
10c0e2: e8 95 25 00 00 call 10e67c <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10c0e7: 8b 43 14 mov 0x14(%ebx),%eax
10c0ea: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10c0f1: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10c0f8: 89 1c 24 mov %ebx,(%esp)
10c0fb: e8 70 bc ff ff call 107d70 <free>
}
return AIO_CANCELED;
10c100: 31 c0 xor %eax,%eax
}
10c102: 83 c4 18 add $0x18,%esp
10c105: 5b pop %ebx
10c106: c3 ret
10c107: 90 nop
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10c108: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c10d: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10c110: 5b pop %ebx <== NOT EXECUTED
10c111: c3 ret <== NOT EXECUTED
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10c112: b8 02 00 00 00 mov $0x2,%eax
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c117: 83 c4 18 add $0x18,%esp
10c11a: 5b pop %ebx
10c11b: c3 ret
0010c56c <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c56c: 55 push %ebp
10c56d: 57 push %edi
10c56e: 56 push %esi
10c56f: 53 push %ebx
10c570: 83 ec 2c sub $0x2c,%esp
10c573: 8b 5c 24 40 mov 0x40(%esp),%ebx
10c577: 8b 6c 24 44 mov 0x44(%esp),%ebp
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c57b: 8d 74 24 1c lea 0x1c(%esp),%esi
10c57f: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c580: 89 1c 24 mov %ebx,(%esp)
10c583: e8 a8 05 00 00 call 10cb30 <_Chain_Get>
10c588: 89 c7 mov %eax,%edi
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c58a: 85 c0 test %eax,%eax
10c58c: 75 2e jne 10c5bc <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c58e: 89 74 24 0c mov %esi,0xc(%esp)
10c592: 8b 44 24 48 mov 0x48(%esp),%eax
10c596: 89 44 24 08 mov %eax,0x8(%esp)
10c59a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10c5a1: 00
10c5a2: 89 2c 24 mov %ebp,(%esp)
10c5a5: e8 7e f3 ff ff call 10b928 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c5aa: 85 c0 test %eax,%eax
10c5ac: 74 d2 je 10c580 <rtems_chain_get_with_wait+0x14><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c5ae: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5b2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5b4: 83 c4 2c add $0x2c,%esp
10c5b7: 5b pop %ebx
10c5b8: 5e pop %esi
10c5b9: 5f pop %edi
10c5ba: 5d pop %ebp
10c5bb: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c5bc: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c5be: 8b 4c 24 4c mov 0x4c(%esp),%ecx
10c5c2: 89 39 mov %edi,(%ecx)
return sc;
}
10c5c4: 83 c4 2c add $0x2c,%esp
10c5c7: 5b pop %ebx
10c5c8: 5e pop %esi
10c5c9: 5f pop %edi
10c5ca: 5d pop %ebp
10c5cb: c3 ret
0010d570 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
10d570: 57 push %edi
10d571: 56 push %esi
10d572: 53 push %ebx
10d573: 8b 5c 24 10 mov 0x10(%esp),%ebx
10d577: 8b 74 24 14 mov 0x14(%esp),%esi
10d57b: 8b 44 24 18 mov 0x18(%esp),%eax
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10d57f: 8b 15 00 77 13 00 mov 0x137700,%edx
if ( rtems_interrupt_is_in_progress() )
10d585: 8b 0d 68 72 13 00 mov 0x137268,%ecx
10d58b: 85 c9 test %ecx,%ecx
10d58d: 74 09 je 10d598 <rtems_io_register_driver+0x28>
return RTEMS_CALLED_FROM_ISR;
10d58f: b8 12 00 00 00 mov $0x12,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d594: 5b pop %ebx
10d595: 5e pop %esi
10d596: 5f pop %edi
10d597: c3 ret
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10d598: 85 c0 test %eax,%eax
10d59a: 74 24 je 10d5c0 <rtems_io_register_driver+0x50>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10d59c: 89 10 mov %edx,(%eax)
if ( driver_table == NULL )
10d59e: 85 f6 test %esi,%esi
10d5a0: 74 1e je 10d5c0 <rtems_io_register_driver+0x50>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5a2: 8b 3e mov (%esi),%edi
10d5a4: 85 ff test %edi,%edi
10d5a6: 74 10 je 10d5b8 <rtems_io_register_driver+0x48>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d5a8: 39 da cmp %ebx,%edx
10d5aa: 77 20 ja 10d5cc <rtems_io_register_driver+0x5c>
return RTEMS_INVALID_NUMBER;
10d5ac: b8 0a 00 00 00 mov $0xa,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5b1: 5b pop %ebx
10d5b2: 5e pop %esi
10d5b3: 5f pop %edi
10d5b4: c3 ret
10d5b5: 8d 76 00 lea 0x0(%esi),%esi
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5b8: 8b 4e 04 mov 0x4(%esi),%ecx
10d5bb: 85 c9 test %ecx,%ecx
10d5bd: 75 e9 jne 10d5a8 <rtems_io_register_driver+0x38>
10d5bf: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10d5c0: b8 09 00 00 00 mov $0x9,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d5c5: 5b pop %ebx
10d5c6: 5e pop %esi
10d5c7: 5f pop %edi
10d5c8: c3 ret
10d5c9: 8d 76 00 lea 0x0(%esi),%esi
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10d5cc: 8b 15 e4 6c 13 00 mov 0x136ce4,%edx
10d5d2: 42 inc %edx
10d5d3: 89 15 e4 6c 13 00 mov %edx,0x136ce4
return _Thread_Dispatch_disable_level;
10d5d9: 8b 15 e4 6c 13 00 mov 0x136ce4,%edx
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10d5df: 85 db test %ebx,%ebx
10d5e1: 74 1e je 10d601 <rtems_io_register_driver+0x91>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d5e3: 8d 14 5b lea (%ebx,%ebx,2),%edx
10d5e6: 8b 3d 04 77 13 00 mov 0x137704,%edi
10d5ec: 8d 14 d7 lea (%edi,%edx,8),%edx
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d5ef: 8b 0a mov (%edx),%ecx
10d5f1: 85 c9 test %ecx,%ecx
10d5f3: 74 7d je 10d672 <rtems_io_register_driver+0x102>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
10d5f5: e8 02 1d 00 00 call 10f2fc <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10d5fa: b8 0c 00 00 00 mov $0xc,%eax
10d5ff: eb 93 jmp 10d594 <rtems_io_register_driver+0x24>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10d601: 8b 0d 00 77 13 00 mov 0x137700,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10d607: 85 c9 test %ecx,%ecx
10d609: 74 76 je 10d681 <rtems_io_register_driver+0x111><== NEVER TAKEN
10d60b: 8b 3d 04 77 13 00 mov 0x137704,%edi
10d611: 89 fa mov %edi,%edx
10d613: eb 0b jmp 10d620 <rtems_io_register_driver+0xb0>
10d615: 8d 76 00 lea 0x0(%esi),%esi
10d618: 43 inc %ebx
10d619: 83 c2 18 add $0x18,%edx
10d61c: 39 cb cmp %ecx,%ebx
10d61e: 74 41 je 10d661 <rtems_io_register_driver+0xf1>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d620: 83 3a 00 cmpl $0x0,(%edx)
10d623: 75 f3 jne 10d618 <rtems_io_register_driver+0xa8>
10d625: 83 7a 04 00 cmpl $0x0,0x4(%edx)
10d629: 75 ed jne 10d618 <rtems_io_register_driver+0xa8>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d62b: 89 18 mov %ebx,(%eax)
if ( m != n )
10d62d: 39 d9 cmp %ebx,%ecx
10d62f: 74 32 je 10d663 <rtems_io_register_driver+0xf3><== NEVER TAKEN
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10d631: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d634: 8d 04 c7 lea (%edi,%eax,8),%eax
10d637: b9 06 00 00 00 mov $0x6,%ecx
10d63c: 89 c7 mov %eax,%edi
10d63e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10d640: e8 b7 1c 00 00 call 10f2fc <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10d645: c7 44 24 18 00 00 00 movl $0x0,0x18(%esp)
10d64c: 00
10d64d: c7 44 24 14 00 00 00 movl $0x0,0x14(%esp)
10d654: 00
10d655: 89 5c 24 10 mov %ebx,0x10(%esp)
}
10d659: 5b pop %ebx
10d65a: 5e pop %esi
10d65b: 5f pop %edi
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d65c: e9 2f 7e 00 00 jmp 115490 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d661: 89 18 mov %ebx,(%eax)
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d663: e8 94 1c 00 00 call 10f2fc <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10d668: b8 05 00 00 00 mov $0x5,%eax
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
10d66d: e9 22 ff ff ff jmp 10d594 <rtems_io_register_driver+0x24>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d672: 8b 52 04 mov 0x4(%edx),%edx
10d675: 85 d2 test %edx,%edx
10d677: 0f 85 78 ff ff ff jne 10d5f5 <rtems_io_register_driver+0x85>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d67d: 89 18 mov %ebx,(%eax)
10d67f: eb b0 jmp 10d631 <rtems_io_register_driver+0xc1>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d681: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED
10d687: eb da jmp 10d663 <rtems_io_register_driver+0xf3><== NOT EXECUTED
0010e23c <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)
{
10e23c: 55 push %ebp
10e23d: 57 push %edi
10e23e: 56 push %esi
10e23f: 53 push %ebx
10e240: 83 ec 1c sub $0x1c,%esp
10e243: 8b 74 24 30 mov 0x30(%esp),%esi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e247: bf 01 00 00 00 mov $0x1,%edi
10e24c: 85 f6 test %esi,%esi
10e24e: 74 3a je 10e28a <rtems_iterate_over_all_threads+0x4e><== NEVER TAKEN
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10e250: 8b 04 bd 9c 3a 13 00 mov 0x133a9c(,%edi,4),%eax
10e257: 8b 68 04 mov 0x4(%eax),%ebp
if ( !information )
10e25a: 85 ed test %ebp,%ebp
10e25c: 74 26 je 10e284 <rtems_iterate_over_all_threads+0x48>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e25e: 66 83 7d 10 00 cmpw $0x0,0x10(%ebp)
10e263: 74 1f je 10e284 <rtems_iterate_over_all_threads+0x48>
10e265: bb 01 00 00 00 mov $0x1,%ebx
10e26a: 66 90 xchg %ax,%ax
the_thread = (Thread_Control *)information->local_table[ i ];
10e26c: 8b 45 1c mov 0x1c(%ebp),%eax
10e26f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e272: 85 c0 test %eax,%eax
10e274: 74 05 je 10e27b <rtems_iterate_over_all_threads+0x3f><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e276: 89 04 24 mov %eax,(%esp)
10e279: ff d6 call *%esi
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e27b: 43 inc %ebx
10e27c: 0f b7 45 10 movzwl 0x10(%ebp),%eax
10e280: 39 d8 cmp %ebx,%eax
10e282: 73 e8 jae 10e26c <rtems_iterate_over_all_threads+0x30>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e284: 47 inc %edi
10e285: 83 ff 04 cmp $0x4,%edi
10e288: 75 c6 jne 10e250 <rtems_iterate_over_all_threads+0x14>
(*routine)(the_thread);
}
}
}
10e28a: 83 c4 1c add $0x1c,%esp
10e28d: 5b pop %ebx
10e28e: 5e pop %esi
10e28f: 5f pop %edi
10e290: 5d pop %ebp
10e291: c3 ret
0010d3fc <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
10d3fc: 57 push %edi
10d3fd: 56 push %esi
10d3fe: 53 push %ebx
10d3ff: 83 ec 10 sub $0x10,%esp
10d402: 8b 7c 24 28 mov 0x28(%esp),%edi
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d406: 85 ff test %edi,%edi
10d408: 74 62 je 10d46c <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d40a: 0f b7 44 24 24 movzwl 0x24(%esp),%eax
10d40f: 89 44 24 04 mov %eax,0x4(%esp)
10d413: 8b 44 24 20 mov 0x20(%esp),%eax
10d417: 89 04 24 mov %eax,(%esp)
10d41a: e8 8d 1b 00 00 call 10efac <_Objects_Get_information>
if ( !obj_info )
10d41f: 85 c0 test %eax,%eax
10d421: 74 55 je 10d478 <rtems_object_get_class_information+0x7c>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10d423: 8b 50 08 mov 0x8(%eax),%edx
10d426: 89 17 mov %edx,(%edi)
info->maximum_id = obj_info->maximum_id;
10d428: 8b 50 0c mov 0xc(%eax),%edx
10d42b: 89 57 04 mov %edx,0x4(%edi)
info->auto_extend = obj_info->auto_extend;
10d42e: 8a 50 12 mov 0x12(%eax),%dl
10d431: 88 57 0c mov %dl,0xc(%edi)
info->maximum = obj_info->maximum;
10d434: 0f b7 58 10 movzwl 0x10(%eax),%ebx
10d438: 89 5f 08 mov %ebx,0x8(%edi)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d43b: 85 db test %ebx,%ebx
10d43d: 74 45 je 10d484 <rtems_object_get_class_information+0x88><== NEVER TAKEN
10d43f: 8b 70 1c mov 0x1c(%eax),%esi
10d442: b9 01 00 00 00 mov $0x1,%ecx
10d447: b8 01 00 00 00 mov $0x1,%eax
10d44c: 31 d2 xor %edx,%edx
10d44e: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10d450: 83 3c 8e 01 cmpl $0x1,(%esi,%ecx,4)
10d454: 83 d2 00 adc $0x0,%edx
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d457: 40 inc %eax
10d458: 89 c1 mov %eax,%ecx
10d45a: 39 c3 cmp %eax,%ebx
10d45c: 73 f2 jae 10d450 <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d45e: 89 57 10 mov %edx,0x10(%edi)
return RTEMS_SUCCESSFUL;
10d461: 31 c0 xor %eax,%eax
}
10d463: 83 c4 10 add $0x10,%esp
10d466: 5b pop %ebx
10d467: 5e pop %esi
10d468: 5f pop %edi
10d469: c3 ret
10d46a: 66 90 xchg %ax,%ax
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10d46c: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d471: 83 c4 10 add $0x10,%esp
10d474: 5b pop %ebx
10d475: 5e pop %esi
10d476: 5f pop %edi
10d477: c3 ret
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10d478: b8 0a 00 00 00 mov $0xa,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d47d: 83 c4 10 add $0x10,%esp
10d480: 5b pop %ebx
10d481: 5e pop %esi
10d482: 5f pop %edi
10d483: c3 ret
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d484: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d486: eb d6 jmp 10d45e <rtems_object_get_class_information+0x62><== NOT EXECUTED
0010cd08 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
10cd08: 56 push %esi
10cd09: 53 push %ebx
10cd0a: 83 ec 14 sub $0x14,%esp
10cd0d: 8b 74 24 20 mov 0x20(%esp),%esi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
10cd11: 85 f6 test %esi,%esi
10cd13: 75 0b jne 10cd20 <rtems_partition_create+0x18>
return RTEMS_INVALID_NAME;
10cd15: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd1a: 83 c4 14 add $0x14,%esp
10cd1d: 5b pop %ebx
10cd1e: 5e pop %esi
10cd1f: c3 ret
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
10cd20: 8b 5c 24 24 mov 0x24(%esp),%ebx
10cd24: 85 db test %ebx,%ebx
10cd26: 74 1c je 10cd44 <rtems_partition_create+0x3c>
return RTEMS_INVALID_ADDRESS;
if ( !id )
10cd28: 8b 4c 24 34 mov 0x34(%esp),%ecx
10cd2c: 85 c9 test %ecx,%ecx
10cd2e: 74 14 je 10cd44 <rtems_partition_create+0x3c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10cd30: 8b 54 24 28 mov 0x28(%esp),%edx
10cd34: 85 d2 test %edx,%edx
10cd36: 75 18 jne 10cd50 <rtems_partition_create+0x48>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
10cd38: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd3d: 83 c4 14 add $0x14,%esp
10cd40: 5b pop %ebx
10cd41: 5e pop %esi
10cd42: c3 ret
10cd43: 90 nop
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
10cd44: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cd49: 83 c4 14 add $0x14,%esp
10cd4c: 5b pop %ebx
10cd4d: 5e pop %esi
10cd4e: c3 ret
10cd4f: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
10cd50: 8b 44 24 2c mov 0x2c(%esp),%eax
10cd54: 85 c0 test %eax,%eax
10cd56: 74 e0 je 10cd38 <rtems_partition_create+0x30>
10cd58: 8b 44 24 2c mov 0x2c(%esp),%eax
10cd5c: 39 44 24 28 cmp %eax,0x28(%esp)
10cd60: 72 d6 jb 10cd38 <rtems_partition_create+0x30>
10cd62: a8 03 test $0x3,%al
10cd64: 75 d2 jne 10cd38 <rtems_partition_create+0x30>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
10cd66: f6 44 24 24 03 testb $0x3,0x24(%esp)
10cd6b: 75 d7 jne 10cd44 <rtems_partition_create+0x3c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10cd6d: a1 64 60 13 00 mov 0x136064,%eax
10cd72: 40 inc %eax
10cd73: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10cd78: a1 64 60 13 00 mov 0x136064,%eax
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
10cd7d: c7 04 24 e0 5e 13 00 movl $0x135ee0,(%esp)
10cd84: e8 53 1b 00 00 call 10e8dc <_Objects_Allocate>
10cd89: 89 c3 mov %eax,%ebx
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
10cd8b: 85 c0 test %eax,%eax
10cd8d: 74 6c je 10cdfb <rtems_partition_create+0xf3>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
10cd8f: 8b 54 24 24 mov 0x24(%esp),%edx
10cd93: 89 50 10 mov %edx,0x10(%eax)
the_partition->length = length;
10cd96: 8b 44 24 28 mov 0x28(%esp),%eax
10cd9a: 89 43 14 mov %eax,0x14(%ebx)
the_partition->buffer_size = buffer_size;
10cd9d: 8b 54 24 2c mov 0x2c(%esp),%edx
10cda1: 89 53 18 mov %edx,0x18(%ebx)
the_partition->attribute_set = attribute_set;
10cda4: 8b 44 24 30 mov 0x30(%esp),%eax
10cda8: 89 43 1c mov %eax,0x1c(%ebx)
the_partition->number_of_used_blocks = 0;
10cdab: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
_Chain_Initialize( &the_partition->Memory, starting_address,
10cdb2: 89 54 24 0c mov %edx,0xc(%esp)
10cdb6: 8b 44 24 28 mov 0x28(%esp),%eax
10cdba: 31 d2 xor %edx,%edx
10cdbc: f7 74 24 2c divl 0x2c(%esp)
10cdc0: 89 44 24 08 mov %eax,0x8(%esp)
10cdc4: 8b 44 24 24 mov 0x24(%esp),%eax
10cdc8: 89 44 24 04 mov %eax,0x4(%esp)
10cdcc: 8d 43 24 lea 0x24(%ebx),%eax
10cdcf: 89 04 24 mov %eax,(%esp)
10cdd2: e8 c9 11 00 00 call 10dfa0 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10cdd7: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10cdda: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10cddd: 8b 15 fc 5e 13 00 mov 0x135efc,%edx
10cde3: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10cde6: 89 73 0c mov %esi,0xc(%ebx)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
10cde9: 8b 54 24 34 mov 0x34(%esp),%edx
10cded: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10cdef: e8 c4 2c 00 00 call 10fab8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10cdf4: 31 c0 xor %eax,%eax
10cdf6: e9 1f ff ff ff jmp 10cd1a <rtems_partition_create+0x12>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
10cdfb: e8 b8 2c 00 00 call 10fab8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10ce00: b8 05 00 00 00 mov $0x5,%eax
10ce05: e9 10 ff ff ff jmp 10cd1a <rtems_partition_create+0x12>
00119624 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
119624: 53 push %ebx
119625: 83 ec 28 sub $0x28,%esp
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
119628: 8d 44 24 1c lea 0x1c(%esp),%eax
11962c: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
119630: 8b 44 24 30 mov 0x30(%esp),%eax
119634: 89 44 24 04 mov %eax,0x4(%esp)
119638: c7 04 24 40 e9 14 00 movl $0x14e940,(%esp)
11963f: e8 9c 4e 00 00 call 11e4e0 <_Objects_Get>
switch ( location ) {
119644: 8b 54 24 1c mov 0x1c(%esp),%edx
119648: 85 d2 test %edx,%edx
11964a: 75 48 jne 119694 <rtems_partition_return_buffer+0x70>
11964c: 89 c3 mov %eax,%ebx
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
11964e: 8b 40 10 mov 0x10(%eax),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
119651: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
119654: 39 44 24 34 cmp %eax,0x34(%esp)
119658: 72 46 jb 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
11965a: 01 c2 add %eax,%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
11965c: 39 54 24 34 cmp %edx,0x34(%esp)
119660: 77 3e ja 1196a0 <rtems_partition_return_buffer+0x7c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
119662: 8b 54 24 34 mov 0x34(%esp),%edx
119666: 29 c2 sub %eax,%edx
119668: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
11966a: 31 d2 xor %edx,%edx
11966c: f7 73 18 divl 0x18(%ebx)
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
11966f: 85 d2 test %edx,%edx
119671: 75 2d jne 1196a0 <rtems_partition_return_buffer+0x7c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
119673: 8b 44 24 34 mov 0x34(%esp),%eax
119677: 89 44 24 04 mov %eax,0x4(%esp)
11967b: 8d 43 24 lea 0x24(%ebx),%eax
11967e: 89 04 24 mov %eax,(%esp)
119681: e8 7e 32 00 00 call 11c904 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
119686: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
119689: e8 16 5b 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11968e: 31 c0 xor %eax,%eax
119690: eb 07 jmp 119699 <rtems_partition_return_buffer+0x75>
119692: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
119694: b8 04 00 00 00 mov $0x4,%eax
}
119699: 83 c4 28 add $0x28,%esp
11969c: 5b pop %ebx
11969d: c3 ret
11969e: 66 90 xchg %ax,%ax
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1196a0: e8 ff 5a 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
1196a5: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1196aa: 83 c4 28 add $0x28,%esp
1196ad: 5b pop %ebx
1196ae: c3 ret
00138494 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
138494: 57 push %edi
138495: 56 push %esi
138496: 53 push %ebx
138497: 83 ec 30 sub $0x30,%esp
13849a: 8b 5c 24 40 mov 0x40(%esp),%ebx
Objects_Locations location;
rtems_status_code return_value;
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
13849e: 8d 44 24 2c lea 0x2c(%esp),%eax
1384a2: 89 44 24 08 mov %eax,0x8(%esp)
1384a6: 89 5c 24 04 mov %ebx,0x4(%esp)
1384aa: c7 04 24 60 ca 17 00 movl $0x17ca60,(%esp)
1384b1: e8 f2 49 fd ff call 10cea8 <_Objects_Get>
switch ( location ) {
1384b6: 8b 54 24 2c mov 0x2c(%esp),%edx
1384ba: 85 d2 test %edx,%edx
1384bc: 75 1e jne 1384dc <rtems_rate_monotonic_period+0x48>
1384be: 89 c6 mov %eax,%esi
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
1384c0: a1 2c c4 17 00 mov 0x17c42c,%eax
1384c5: 39 46 40 cmp %eax,0x40(%esi)
1384c8: 74 1e je 1384e8 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
1384ca: e8 1d 56 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
1384cf: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1384d4: 83 c4 30 add $0x30,%esp
1384d7: 5b pop %ebx
1384d8: 5e pop %esi
1384d9: 5f pop %edi
1384da: c3 ret
1384db: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1384dc: b8 04 00 00 00 mov $0x4,%eax
}
1384e1: 83 c4 30 add $0x30,%esp
1384e4: 5b pop %ebx
1384e5: 5e pop %esi
1384e6: 5f pop %edi
1384e7: c3 ret
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
1384e8: 8b 44 24 44 mov 0x44(%esp),%eax
1384ec: 85 c0 test %eax,%eax
1384ee: 74 68 je 138558 <rtems_rate_monotonic_period+0xc4>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
1384f0: 9c pushf
1384f1: fa cli
1384f2: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
1384f3: 8b 46 38 mov 0x38(%esi),%eax
1384f6: 85 c0 test %eax,%eax
1384f8: 0f 84 82 00 00 00 je 138580 <rtems_rate_monotonic_period+0xec>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
1384fe: 83 f8 02 cmp $0x2,%eax
138501: 0f 84 cf 00 00 00 je 1385d6 <rtems_rate_monotonic_period+0x142>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
138507: 83 f8 04 cmp $0x4,%eax
13850a: 75 d0 jne 1384dc <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
13850c: 89 f0 mov %esi,%eax
13850e: e8 2d fe ff ff call 138340 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
138513: 57 push %edi
138514: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
138515: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
the_period->next_length = length;
13851c: 8b 44 24 44 mov 0x44(%esp),%eax
138520: 89 46 3c mov %eax,0x3c(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
138523: 89 46 1c mov %eax,0x1c(%esi)
_Watchdog_Insert_ticks( &the_period->Timer, length );
138526: 8d 46 10 lea 0x10(%esi),%eax
138529: 89 44 24 04 mov %eax,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
13852d: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
138534: e8 d3 61 fd ff call 10e70c <_Watchdog_Insert>
138539: 8b 46 3c mov 0x3c(%esi),%eax
13853c: 89 44 24 04 mov %eax,0x4(%esp)
138540: 8b 46 40 mov 0x40(%esi),%eax
138543: 89 04 24 mov %eax,(%esp)
138546: ff 15 b4 42 17 00 call *0x1742b4
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
13854c: e8 9b 55 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
138551: b8 06 00 00 00 mov $0x6,%eax
138556: eb 89 jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
138558: 8b 46 38 mov 0x38(%esi),%eax
13855b: 83 f8 04 cmp $0x4,%eax
13855e: 77 1c ja 13857c <rtems_rate_monotonic_period+0xe8><== NEVER TAKEN
138560: 8b 04 85 14 f9 15 00 mov 0x15f914(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
138567: 89 44 24 1c mov %eax,0x1c(%esp)
13856b: e8 7c 55 fd ff call 10daec <_Thread_Enable_dispatch>
138570: 8b 44 24 1c mov 0x1c(%esp),%eax
138574: e9 68 ff ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
138579: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
13857c: 31 c0 xor %eax,%eax <== NOT EXECUTED
13857e: eb e7 jmp 138567 <rtems_rate_monotonic_period+0xd3><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
138580: 57 push %edi
138581: 9d popf
the_period->next_length = length;
138582: 8b 44 24 44 mov 0x44(%esp),%eax
138586: 89 46 3c mov %eax,0x3c(%esi)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
138589: 89 34 24 mov %esi,(%esp)
13858c: e8 8f fe ff ff call 138420 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
138591: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
138598: c7 46 18 00 00 00 00 movl $0x0,0x18(%esi)
the_watchdog->routine = routine;
13859f: c7 46 2c 40 86 13 00 movl $0x138640,0x2c(%esi)
the_watchdog->id = id;
1385a6: 89 5e 30 mov %ebx,0x30(%esi)
the_watchdog->user_data = user_data;
1385a9: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1385b0: 8b 44 24 44 mov 0x44(%esp),%eax
1385b4: 89 46 1c mov %eax,0x1c(%esi)
_Rate_monotonic_Timeout,
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
1385b7: 83 c6 10 add $0x10,%esi
1385ba: 89 74 24 04 mov %esi,0x4(%esp)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
1385be: c7 04 24 48 bf 17 00 movl $0x17bf48,(%esp)
1385c5: e8 42 61 fd ff call 10e70c <_Watchdog_Insert>
_Thread_Enable_dispatch();
1385ca: e8 1d 55 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1385cf: 31 c0 xor %eax,%eax
1385d1: e9 0b ff ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
1385d6: 89 f0 mov %esi,%eax
1385d8: e8 63 fd ff ff call 138340 <_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;
1385dd: c7 46 38 01 00 00 00 movl $0x1,0x38(%esi)
the_period->next_length = length;
1385e4: 8b 44 24 44 mov 0x44(%esp),%eax
1385e8: 89 46 3c mov %eax,0x3c(%esi)
_ISR_Enable( level );
1385eb: 57 push %edi
1385ec: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
1385ed: a1 2c c4 17 00 mov 0x17c42c,%eax
1385f2: 8b 56 08 mov 0x8(%esi),%edx
1385f5: 89 50 20 mov %edx,0x20(%eax)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
1385f8: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
1385ff: 00
138600: 89 04 24 mov %eax,(%esp)
138603: e8 30 5d fd ff call 10e338 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
138608: 9c pushf
138609: fa cli
13860a: 5a pop %edx
local_state = the_period->state;
13860b: 8b 46 38 mov 0x38(%esi),%eax
the_period->state = RATE_MONOTONIC_ACTIVE;
13860e: c7 46 38 02 00 00 00 movl $0x2,0x38(%esi)
_ISR_Enable( level );
138615: 52 push %edx
138616: 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 )
138617: 83 f8 03 cmp $0x3,%eax
13861a: 74 0c je 138628 <rtems_rate_monotonic_period+0x194>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
13861c: e8 cb 54 fd ff call 10daec <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
138621: 31 c0 xor %eax,%eax
138623: e9 b9 fe ff ff jmp 1384e1 <rtems_rate_monotonic_period+0x4d>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
138628: c7 44 24 04 00 40 00 movl $0x4000,0x4(%esp)
13862f: 00
138630: a1 2c c4 17 00 mov 0x17c42c,%eax
138635: 89 04 24 mov %eax,(%esp)
138638: e8 0b 51 fd ff call 10d748 <_Thread_Clear_state>
13863d: eb dd jmp 13861c <rtems_rate_monotonic_period+0x188>
0012b7ac <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
12b7ac: 55 push %ebp
12b7ad: 57 push %edi
12b7ae: 56 push %esi
12b7af: 53 push %ebx
12b7b0: 81 ec 9c 00 00 00 sub $0x9c,%esp
12b7b6: 8b b4 24 b0 00 00 00 mov 0xb0(%esp),%esi
12b7bd: 8b 9c 24 b4 00 00 00 mov 0xb4(%esp),%ebx
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
12b7c4: 85 db test %ebx,%ebx
12b7c6: 0f 84 ec 00 00 00 je 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
12b7cc: c7 44 24 04 c8 c9 15 movl $0x15c9c8,0x4(%esp)
12b7d3: 00
12b7d4: 89 34 24 mov %esi,(%esp)
12b7d7: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
12b7d9: c7 44 24 04 00 ca 15 movl $0x15ca00,0x4(%esp)
12b7e0: 00
12b7e1: 89 34 24 mov %esi,(%esp)
12b7e4: ff d3 call *%ebx
(*print)( context, "--- Wall times are in seconds ---\n" );
12b7e6: c7 44 24 04 24 ca 15 movl $0x15ca24,0x4(%esp)
12b7ed: 00
12b7ee: 89 34 24 mov %esi,(%esp)
12b7f1: ff d3 call *%ebx
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
12b7f3: c7 44 24 04 48 ca 15 movl $0x15ca48,0x4(%esp)
12b7fa: 00
12b7fb: 89 34 24 mov %esi,(%esp)
12b7fe: ff d3 call *%ebx
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
12b800: c7 44 24 04 94 ca 15 movl $0x15ca94,0x4(%esp)
12b807: 00
12b808: 89 34 24 mov %esi,(%esp)
12b80b: ff d3 call *%ebx
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12b80d: 8b 2d 68 ca 17 00 mov 0x17ca68,%ebp
12b813: 8d 7c 24 58 lea 0x58(%esp),%edi
12b817: 3b 2d 6c ca 17 00 cmp 0x17ca6c,%ebp
12b81d: 76 12 jbe 12b831 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
12b81f: e9 94 00 00 00 jmp 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12b824: 45 inc %ebp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12b825: 39 2d 6c ca 17 00 cmp %ebp,0x17ca6c
12b82b: 0f 82 87 00 00 00 jb 12b8b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x10c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
12b831: 89 7c 24 04 mov %edi,0x4(%esp)
12b835: 89 2c 24 mov %ebp,(%esp)
12b838: e8 1b c7 00 00 call 137f58 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
12b83d: 85 c0 test %eax,%eax
12b83f: 75 e3 jne 12b824 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
12b841: 8d 44 24 40 lea 0x40(%esp),%eax
12b845: 89 44 24 04 mov %eax,0x4(%esp)
12b849: 89 2c 24 mov %ebp,(%esp)
12b84c: e8 13 c9 00 00 call 138164 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
12b851: 8d 54 24 33 lea 0x33(%esp),%edx
12b855: 89 54 24 08 mov %edx,0x8(%esp)
12b859: c7 44 24 04 05 00 00 movl $0x5,0x4(%esp)
12b860: 00
12b861: 8b 44 24 40 mov 0x40(%esp),%eax
12b865: 89 04 24 mov %eax,(%esp)
12b868: e8 27 7b fe ff call 113394 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12b86d: 8b 44 24 5c mov 0x5c(%esp),%eax
12b871: 89 44 24 14 mov %eax,0x14(%esp)
12b875: 8b 44 24 58 mov 0x58(%esp),%eax
12b879: 89 44 24 10 mov %eax,0x10(%esp)
"0x%08" PRIx32 " %4s %5" PRId32 " %6" PRId32 " ",
id, name,
12b87d: 8d 44 24 33 lea 0x33(%esp),%eax
12b881: 89 44 24 0c mov %eax,0xc(%esp)
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
12b885: 89 6c 24 08 mov %ebp,0x8(%esp)
12b889: c7 44 24 04 e6 c9 15 movl $0x15c9e6,0x4(%esp)
12b890: 00
12b891: 89 34 24 mov %esi,(%esp)
12b894: ff d3 call *%ebx
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
12b896: 8b 44 24 58 mov 0x58(%esp),%eax
12b89a: 85 c0 test %eax,%eax
12b89c: 75 26 jne 12b8c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x118>
(*print)( context, "\n" );
12b89e: c7 44 24 04 b5 67 15 movl $0x1567b5,0x4(%esp)
12b8a5: 00
12b8a6: 89 34 24 mov %esi,(%esp)
12b8a9: ff d3 call *%ebx
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12b8ab: 45 inc %ebp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12b8ac: 39 2d 6c ca 17 00 cmp %ebp,0x17ca6c
12b8b2: 0f 83 79 ff ff ff jae 12b831 <rtems_rate_monotonic_report_statistics_with_plugin+0x85><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
12b8b8: 81 c4 9c 00 00 00 add $0x9c,%esp
12b8be: 5b pop %ebx
12b8bf: 5e pop %esi
12b8c0: 5f pop %edi
12b8c1: 5d pop %ebp
12b8c2: c3 ret
12b8c3: 90 nop
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
12b8c4: 8d 4c 24 38 lea 0x38(%esp),%ecx
12b8c8: 89 4c 24 08 mov %ecx,0x8(%esp)
12b8cc: 89 44 24 04 mov %eax,0x4(%esp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
12b8d0: 8d 44 24 70 lea 0x70(%esp),%eax
12b8d4: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
12b8d7: 89 4c 24 2c mov %ecx,0x2c(%esp)
12b8db: e8 80 0b 00 00 call 12c460 <_Timespec_Divide_by_integer>
(*print)( context,
12b8e0: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b8e5: f7 6c 24 3c imull 0x3c(%esp)
12b8e9: c1 fa 06 sar $0x6,%edx
12b8ec: 89 54 24 28 mov %edx,0x28(%esp)
12b8f0: 8b 44 24 3c mov 0x3c(%esp),%eax
12b8f4: 99 cltd
12b8f5: 29 54 24 28 sub %edx,0x28(%esp)
12b8f9: 8b 54 24 28 mov 0x28(%esp),%edx
12b8fd: 89 54 24 1c mov %edx,0x1c(%esp)
12b901: 8b 44 24 38 mov 0x38(%esp),%eax
12b905: 89 44 24 18 mov %eax,0x18(%esp)
12b909: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b90e: f7 6c 24 6c imull 0x6c(%esp)
12b912: c1 fa 06 sar $0x6,%edx
12b915: 89 54 24 28 mov %edx,0x28(%esp)
12b919: 8b 44 24 6c mov 0x6c(%esp),%eax
12b91d: 99 cltd
12b91e: 29 54 24 28 sub %edx,0x28(%esp)
12b922: 8b 54 24 28 mov 0x28(%esp),%edx
12b926: 89 54 24 14 mov %edx,0x14(%esp)
12b92a: 8b 44 24 68 mov 0x68(%esp),%eax
12b92e: 89 44 24 10 mov %eax,0x10(%esp)
12b932: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b937: f7 6c 24 64 imull 0x64(%esp)
12b93b: 89 44 24 20 mov %eax,0x20(%esp)
12b93f: 89 54 24 24 mov %edx,0x24(%esp)
12b943: c1 fa 06 sar $0x6,%edx
12b946: 89 54 24 28 mov %edx,0x28(%esp)
12b94a: 8b 44 24 64 mov 0x64(%esp),%eax
12b94e: 99 cltd
12b94f: 29 54 24 28 sub %edx,0x28(%esp)
12b953: 8b 54 24 28 mov 0x28(%esp),%edx
12b957: 89 54 24 0c mov %edx,0xc(%esp)
12b95b: 8b 44 24 60 mov 0x60(%esp),%eax
12b95f: 89 44 24 08 mov %eax,0x8(%esp)
12b963: c7 44 24 04 e0 ca 15 movl $0x15cae0,0x4(%esp)
12b96a: 00
12b96b: 89 34 24 mov %esi,(%esp)
12b96e: ff d3 call *%ebx
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
12b970: 8b 4c 24 2c mov 0x2c(%esp),%ecx
12b974: 89 4c 24 08 mov %ecx,0x8(%esp)
12b978: 8b 44 24 58 mov 0x58(%esp),%eax
12b97c: 89 44 24 04 mov %eax,0x4(%esp)
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
12b980: 8d 84 24 88 00 00 00 lea 0x88(%esp),%eax
12b987: 89 04 24 mov %eax,(%esp)
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
12b98a: e8 d1 0a 00 00 call 12c460 <_Timespec_Divide_by_integer>
(*print)( context,
12b98f: 8b 4c 24 3c mov 0x3c(%esp),%ecx
12b993: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b998: f7 e9 imul %ecx
12b99a: 89 54 24 24 mov %edx,0x24(%esp)
12b99e: 8b 44 24 24 mov 0x24(%esp),%eax
12b9a2: c1 f8 06 sar $0x6,%eax
12b9a5: c1 f9 1f sar $0x1f,%ecx
12b9a8: 29 c8 sub %ecx,%eax
12b9aa: 89 44 24 1c mov %eax,0x1c(%esp)
12b9ae: 8b 44 24 38 mov 0x38(%esp),%eax
12b9b2: 89 44 24 18 mov %eax,0x18(%esp)
12b9b6: 8b 8c 24 84 00 00 00 mov 0x84(%esp),%ecx
12b9bd: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b9c2: f7 e9 imul %ecx
12b9c4: 89 54 24 24 mov %edx,0x24(%esp)
12b9c8: 8b 44 24 24 mov 0x24(%esp),%eax
12b9cc: c1 f8 06 sar $0x6,%eax
12b9cf: c1 f9 1f sar $0x1f,%ecx
12b9d2: 29 c8 sub %ecx,%eax
12b9d4: 89 44 24 14 mov %eax,0x14(%esp)
12b9d8: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
12b9df: 89 44 24 10 mov %eax,0x10(%esp)
12b9e3: 8b 4c 24 7c mov 0x7c(%esp),%ecx
12b9e7: b8 d3 4d 62 10 mov $0x10624dd3,%eax
12b9ec: f7 e9 imul %ecx
12b9ee: 89 44 24 20 mov %eax,0x20(%esp)
12b9f2: 89 54 24 24 mov %edx,0x24(%esp)
12b9f6: 8b 44 24 24 mov 0x24(%esp),%eax
12b9fa: c1 f8 06 sar $0x6,%eax
12b9fd: c1 f9 1f sar $0x1f,%ecx
12ba00: 29 c8 sub %ecx,%eax
12ba02: 89 44 24 0c mov %eax,0xc(%esp)
12ba06: 8b 44 24 78 mov 0x78(%esp),%eax
12ba0a: 89 44 24 08 mov %eax,0x8(%esp)
12ba0e: c7 44 24 04 00 cb 15 movl $0x15cb00,0x4(%esp)
12ba15: 00
12ba16: 89 34 24 mov %esi,(%esp)
12ba19: ff d3 call *%ebx
12ba1b: e9 04 fe ff ff jmp 12b824 <rtems_rate_monotonic_report_statistics_with_plugin+0x78>
0012ba3c <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
12ba3c: 53 push %ebx
12ba3d: 83 ec 18 sub $0x18,%esp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
12ba40: a1 a4 be 17 00 mov 0x17bea4,%eax
12ba45: 40 inc %eax
12ba46: a3 a4 be 17 00 mov %eax,0x17bea4
return _Thread_Dispatch_disable_level;
12ba4b: a1 a4 be 17 00 mov 0x17bea4,%eax
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12ba50: 8b 1d 68 ca 17 00 mov 0x17ca68,%ebx
12ba56: 3b 1d 6c ca 17 00 cmp 0x17ca6c,%ebx
12ba5c: 77 13 ja 12ba71 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
12ba5e: 66 90 xchg %ax,%ax
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
12ba60: 89 1c 24 mov %ebx,(%esp)
12ba63: e8 14 00 00 00 call 12ba7c <rtems_rate_monotonic_reset_statistics>
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
12ba68: 43 inc %ebx
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
12ba69: 39 1d 6c ca 17 00 cmp %ebx,0x17ca6c
12ba6f: 73 ef jae 12ba60 <rtems_rate_monotonic_reset_all_statistics+0x24>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
12ba71: 83 c4 18 add $0x18,%esp
12ba74: 5b pop %ebx
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
12ba75: e9 72 20 fe ff jmp 10daec <_Thread_Enable_dispatch>
0010ca2c <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
10ca2c: 55 push %ebp
10ca2d: 57 push %edi
10ca2e: 56 push %esi
10ca2f: 53 push %ebx
10ca30: 83 ec 2c sub $0x2c,%esp
10ca33: 8b 6c 24 40 mov 0x40(%esp),%ebp
10ca37: 8b 4c 24 44 mov 0x44(%esp),%ecx
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
10ca3b: 8b 75 30 mov 0x30(%ebp),%esi
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10ca3e: 89 c8 mov %ecx,%eax
10ca40: 31 d2 xor %edx,%edx
10ca42: f7 f6 div %esi
if (excess > 0) {
10ca44: 85 d2 test %edx,%edx
10ca46: 75 54 jne 10ca9c <rtems_rbheap_allocate+0x70><== NEVER TAKEN
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10ca48: 89 ce mov %ecx,%esi
10ca4a: 85 c9 test %ecx,%ecx
10ca4c: 74 1a je 10ca68 <rtems_rbheap_allocate+0x3c>
10ca4e: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
10ca50: 8b 7d 00 mov 0x0(%ebp),%edi
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
10ca53: 8d 45 04 lea 0x4(%ebp),%eax
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10ca56: 39 c7 cmp %eax,%edi
10ca58: 74 0e je 10ca68 <rtems_rbheap_allocate+0x3c>
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
10ca5a: 8b 5f 1c mov 0x1c(%edi),%ebx
10ca5d: 39 f3 cmp %esi,%ebx
10ca5f: 73 13 jae 10ca74 <rtems_rbheap_allocate+0x48>
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10ca61: 8b 3f mov (%edi),%edi
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
10ca63: 39 f8 cmp %edi,%eax
10ca65: 75 f3 jne 10ca5a <rtems_rbheap_allocate+0x2e><== NEVER TAKEN
10ca67: 90 nop
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10ca68: 31 c0 xor %eax,%eax
}
}
}
return ptr;
}
10ca6a: 83 c4 2c add $0x2c,%esp
10ca6d: 5b pop %ebx
10ca6e: 5e pop %esi
10ca6f: 5f pop %edi
10ca70: 5d pop %ebp
10ca71: c3 ret
10ca72: 66 90 xchg %ax,%ax
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
10ca74: 39 de cmp %ebx,%esi
10ca76: 72 34 jb 10caac <rtems_rbheap_allocate+0x80>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10ca78: 8b 17 mov (%edi),%edx
previous = the_node->previous;
10ca7a: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
10ca7d: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
10ca80: 89 10 mov %edx,(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
10ca82: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
10ca89: c7 07 00 00 00 00 movl $0x0,(%edi)
ptr = (void *) new_chunk->begin;
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
10ca8f: 8b 47 18 mov 0x18(%edi),%eax
}
}
}
return ptr;
}
10ca92: 83 c4 2c add $0x2c,%esp
10ca95: 5b pop %ebx
10ca96: 5e pop %esi
10ca97: 5f pop %edi
10ca98: 5d pop %ebp
10ca99: c3 ret
10ca9a: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10ca9c: 01 ce add %ecx,%esi <== NOT EXECUTED
10ca9e: 29 d6 sub %edx,%esi <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
10caa0: 85 c9 test %ecx,%ecx <== NOT EXECUTED
10caa2: 74 c4 je 10ca68 <rtems_rbheap_allocate+0x3c><== NOT EXECUTED
10caa4: 39 f1 cmp %esi,%ecx <== NOT EXECUTED
10caa6: 76 a8 jbe 10ca50 <rtems_rbheap_allocate+0x24><== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
10caa8: 31 c0 xor %eax,%eax <== NOT EXECUTED
10caaa: eb be jmp 10ca6a <rtems_rbheap_allocate+0x3e><== NOT EXECUTED
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
10caac: 89 e8 mov %ebp,%eax
10caae: e8 91 fd ff ff call 10c844 <get_chunk>
10cab3: 89 c2 mov %eax,%edx
if (new_chunk != NULL) {
10cab5: 85 c0 test %eax,%eax
10cab7: 74 af je 10ca68 <rtems_rbheap_allocate+0x3c><== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
10cab9: 29 f3 sub %esi,%ebx
free_chunk->size = new_free_size;
10cabb: 89 5f 1c mov %ebx,0x1c(%edi)
new_chunk->begin = free_chunk->begin + new_free_size;
10cabe: 03 5f 18 add 0x18(%edi),%ebx
10cac1: 89 58 18 mov %ebx,0x18(%eax)
new_chunk->size = aligned_size;
10cac4: 89 70 1c mov %esi,0x1c(%eax)
10cac7: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10cace: c7 00 00 00 00 00 movl $0x0,(%eax)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10cad4: 8d 40 08 lea 0x8(%eax),%eax
10cad7: 89 44 24 04 mov %eax,0x4(%esp)
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10cadb: 83 c5 18 add $0x18,%ebp
10cade: 89 2c 24 mov %ebp,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10cae1: 89 54 24 1c mov %edx,0x1c(%esp)
10cae5: e8 ee 17 00 00 call 10e2d8 <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
10caea: 8b 54 24 1c mov 0x1c(%esp),%edx
10caee: 8b 42 18 mov 0x18(%edx),%eax
}
}
}
return ptr;
}
10caf1: 83 c4 2c add $0x2c,%esp
10caf4: 5b pop %ebx
10caf5: 5e pop %esi
10caf6: 5f pop %edi
10caf7: 5d pop %ebp
10caf8: c3 ret
0010cc0c <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
10cc0c: 53 push %ebx <== NOT EXECUTED
10cc0d: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED
10cc10: 8b 5c 24 20 mov 0x20(%esp),%ebx <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
10cc14: c7 04 24 20 00 00 00 movl $0x20,(%esp) <== NOT EXECUTED
10cc1b: e8 e0 b6 ff ff call 108300 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
10cc20: 85 c0 test %eax,%eax <== NOT EXECUTED
10cc22: 74 11 je 10cc35 <rtems_rbheap_extend_descriptors_with_malloc+0x29><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
10cc24: 8d 53 0c lea 0xc(%ebx),%edx <== NOT EXECUTED
10cc27: 89 50 04 mov %edx,0x4(%eax) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
10cc2a: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED
after_node->next = the_node;
10cc2d: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
the_node->next = before_node;
10cc30: 89 10 mov %edx,(%eax) <== NOT EXECUTED
before_node->previous = the_node;
10cc32: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
10cc35: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10cc38: 5b pop %ebx <== NOT EXECUTED
10cc39: c3 ret <== NOT EXECUTED
0010cafc <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
10cafc: 55 push %ebp
10cafd: 57 push %edi
10cafe: 56 push %esi
10caff: 53 push %ebx
10cb00: 83 ec 4c sub $0x4c,%esp
10cb03: 8b 54 24 64 mov 0x64(%esp),%edx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
10cb07: 85 d2 test %edx,%edx
10cb09: 0f 84 dd 00 00 00 je 10cbec <rtems_rbheap_free+0xf0>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10cb0f: 8b 5c 24 60 mov 0x60(%esp),%ebx
10cb13: 83 c3 18 add $0x18,%ebx
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
10cb16: 8d 7c 24 20 lea 0x20(%esp),%edi
10cb1a: b9 20 00 00 00 mov $0x20,%ecx
10cb1f: 31 c0 xor %eax,%eax
10cb21: f3 aa rep stos %al,%es:(%edi)
10cb23: 89 54 24 38 mov %edx,0x38(%esp)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
10cb27: 8b 44 24 60 mov 0x60(%esp),%eax
10cb2b: 8b 68 1c mov 0x1c(%eax),%ebp
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cb2e: 85 ed test %ebp,%ebp
10cb30: 0f 84 c2 00 00 00 je 10cbf8 <rtems_rbheap_free+0xfc><== NEVER TAKEN
10cb36: 31 f6 xor %esi,%esi
10cb38: 8d 7c 24 28 lea 0x28(%esp),%edi
compare_result = the_rbtree->compare_function(the_node, iter_node);
10cb3c: 89 6c 24 04 mov %ebp,0x4(%esp)
return rtems_rbheap_chunk_of_node(
10cb40: 89 3c 24 mov %edi,(%esp)
10cb43: ff 53 10 call *0x10(%ebx)
if ( _RBTree_Is_equal( compare_result ) ) {
10cb46: 85 c0 test %eax,%eax
10cb48: 75 08 jne 10cb52 <rtems_rbheap_free+0x56>
found = iter_node;
if ( the_rbtree->is_unique )
10cb4a: 89 ee mov %ebp,%esi
10cb4c: 80 7b 14 00 cmpb $0x0,0x14(%ebx)
10cb50: 75 10 jne 10cb62 <rtems_rbheap_free+0x66><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
10cb52: 85 c0 test %eax,%eax
10cb54: 0f 9f c0 setg %al
10cb57: 0f b6 c0 movzbl %al,%eax
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
10cb5a: 8b 6c 85 04 mov 0x4(%ebp,%eax,4),%ebp
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
10cb5e: 85 ed test %ebp,%ebp
10cb60: 75 da jne 10cb3c <rtems_rbheap_free+0x40>
10cb62: 8d 7e f8 lea -0x8(%esi),%edi
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
10cb65: 83 ff f8 cmp $0xfffffff8,%edi
10cb68: 0f 84 8a 00 00 00 je 10cbf8 <rtems_rbheap_free+0xfc>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
10cb6e: 8b 46 f8 mov -0x8(%esi),%eax
10cb71: 85 c0 test %eax,%eax
10cb73: 74 0d je 10cb82 <rtems_rbheap_free+0x86>
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
10cb75: b8 0e 00 00 00 mov $0xe,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cb7a: 83 c4 4c add $0x4c,%esp
10cb7d: 5b pop %ebx
10cb7e: 5e pop %esi
10cb7f: 5f pop %edi
10cb80: 5d pop %ebp
10cb81: c3 ret
10cb82: 8b 6f 04 mov 0x4(%edi),%ebp
10cb85: 85 ed test %ebp,%ebp
10cb87: 75 ec jne 10cb75 <rtems_rbheap_free+0x79><== NEVER TAKEN
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10cb89: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10cb90: 00
10cb91: 89 34 24 mov %esi,(%esp)
10cb94: e8 df 19 00 00 call 10e578 <_RBTree_Next_unprotected>
10cb99: 89 44 24 1c mov %eax,0x1c(%esp)
10cb9d: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10cba4: 00
10cba5: 89 34 24 mov %esi,(%esp)
10cba8: e8 cb 19 00 00 call 10e578 <_RBTree_Next_unprotected>
10cbad: 83 e8 08 sub $0x8,%eax
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
10cbb0: 89 04 24 mov %eax,(%esp)
10cbb3: 89 f9 mov %edi,%ecx
10cbb5: 89 da mov %ebx,%edx
10cbb7: 8b 44 24 60 mov 0x60(%esp),%eax
10cbbb: e8 d0 fc ff ff call 10c890 <check_and_merge>
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10cbc0: 8b 44 24 60 mov 0x60(%esp),%eax
10cbc4: 89 47 04 mov %eax,0x4(%edi)
before_node = after_node->next;
10cbc7: 89 c2 mov %eax,%edx
10cbc9: 8b 00 mov (%eax),%eax
after_node->next = the_node;
10cbcb: 89 3a mov %edi,(%edx)
the_node->next = before_node;
10cbcd: 89 07 mov %eax,(%edi)
before_node->previous = the_node;
10cbcf: 89 78 04 mov %edi,0x4(%eax)
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
10cbd2: 8b 44 24 1c mov 0x1c(%esp),%eax
10cbd6: 83 e8 08 sub $0x8,%eax
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
10cbd9: 89 04 24 mov %eax,(%esp)
10cbdc: 89 f9 mov %edi,%ecx
10cbde: 89 da mov %ebx,%edx
10cbe0: 8b 44 24 60 mov 0x60(%esp),%eax
10cbe4: e8 a7 fc ff ff call 10c890 <check_and_merge>
10cbe9: 8d 76 00 lea 0x0(%esi),%esi
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10cbec: 31 c0 xor %eax,%eax
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
10cbee: 83 c4 4c add $0x4c,%esp
10cbf1: 5b pop %ebx
10cbf2: 5e pop %esi
10cbf3: 5f pop %edi
10cbf4: 5d pop %ebp
10cbf5: c3 ret
10cbf6: 66 90 xchg %ax,%ax
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
10cbf8: b8 04 00 00 00 mov $0x4,%eax
}
}
return sc;
}
10cbfd: 83 c4 4c add $0x4c,%esp
10cc00: 5b pop %ebx
10cc01: 5e pop %esi
10cc02: 5f pop %edi
10cc03: 5d pop %ebp
10cc04: c3 ret
0010c8f8 <rtems_rbheap_initialize>:
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
10c8f8: 57 push %edi
10c8f9: 56 push %esi
10c8fa: 53 push %ebx
10c8fb: 83 ec 10 sub $0x10,%esp
10c8fe: 8b 4c 24 2c mov 0x2c(%esp),%ecx
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
10c902: 85 c9 test %ecx,%ecx
10c904: 75 0e jne 10c914 <rtems_rbheap_initialize+0x1c>
}
} else {
sc = RTEMS_INVALID_ADDRESS;
}
} else {
sc = RTEMS_INVALID_NUMBER;
10c906: b8 0a 00 00 00 mov $0xa,%eax
}
return sc;
}
10c90b: 83 c4 10 add $0x10,%esp
10c90e: 5b pop %ebx
10c90f: 5e pop %esi
10c910: 5f pop %edi
10c911: c3 ret
10c912: 66 90 xchg %ax,%ax
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
10c914: 8b 5c 24 24 mov 0x24(%esp),%ebx
10c918: 03 5c 24 28 add 0x28(%esp),%ebx
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c91c: 8b 44 24 24 mov 0x24(%esp),%eax
10c920: 31 d2 xor %edx,%edx
10c922: f7 f1 div %ecx
if (excess > 0) {
10c924: 85 d2 test %edx,%edx
10c926: 0f 85 c4 00 00 00 jne 10c9f0 <rtems_rbheap_initialize+0xf8>
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10c92c: 89 d8 mov %ebx,%eax
10c92e: 31 d2 xor %edx,%edx
10c930: f7 f1 div %ecx
return value - excess;
10c932: 89 df mov %ebx,%edi
10c934: 29 d7 sub %edx,%edi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c936: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c93a: 0f 83 b6 00 00 00 jae 10c9f6 <rtems_rbheap_initialize+0xfe>
10c940: 8b 74 24 24 mov 0x24(%esp),%esi
10c944: 39 f7 cmp %esi,%edi
10c946: 0f 86 aa 00 00 00 jbe 10c9f6 <rtems_rbheap_initialize+0xfe>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c94c: 8b 44 24 20 mov 0x20(%esp),%eax
10c950: 83 c0 04 add $0x4,%eax
10c953: 8b 54 24 20 mov 0x20(%esp),%edx
10c957: 89 02 mov %eax,(%edx)
head->next = tail;
head->previous = NULL;
10c959: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10c960: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c963: 89 d0 mov %edx,%eax
10c965: 83 c0 0c add $0xc,%eax
10c968: 83 c2 10 add $0x10,%edx
10c96b: 8b 5c 24 20 mov 0x20(%esp),%ebx
10c96f: 89 53 0c mov %edx,0xc(%ebx)
head->next = tail;
head->previous = NULL;
10c972: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10c979: 89 43 14 mov %eax,0x14(%ebx)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
10c97c: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
the_rbtree->root = NULL;
10c983: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_rbtree->first[0] = NULL;
10c98a: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
the_rbtree->first[1] = NULL;
10c991: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
the_rbtree->compare_function = compare_function;
10c998: c7 43 28 34 c8 10 00 movl $0x10c834,0x28(%ebx)
the_rbtree->is_unique = is_unique;
10c99f: c6 43 2c 01 movb $0x1,0x2c(%ebx)
rtems_rbheap_chunk *first = NULL;
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
10c9a3: 89 4b 30 mov %ecx,0x30(%ebx)
control->handler_arg = handler_arg;
10c9a6: 8b 44 24 34 mov 0x34(%esp),%eax
10c9aa: 89 43 38 mov %eax,0x38(%ebx)
control->extend_descriptors = extend_descriptors;
10c9ad: 8b 44 24 30 mov 0x30(%esp),%eax
10c9b1: 89 43 34 mov %eax,0x34(%ebx)
first = get_chunk(control);
10c9b4: 89 d8 mov %ebx,%eax
10c9b6: e8 89 fe ff ff call 10c844 <get_chunk>
if (first != NULL) {
10c9bb: 85 c0 test %eax,%eax
10c9bd: 74 62 je 10ca21 <rtems_rbheap_initialize+0x129>
first->begin = aligned_begin;
10c9bf: 89 70 18 mov %esi,0x18(%eax)
first->size = aligned_end - aligned_begin;
10c9c2: 29 f7 sub %esi,%edi
10c9c4: 89 78 1c mov %edi,0x1c(%eax)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10c9c7: 89 58 04 mov %ebx,0x4(%eax)
before_node = after_node->next;
10c9ca: 8b 13 mov (%ebx),%edx
after_node->next = the_node;
10c9cc: 89 03 mov %eax,(%ebx)
the_node->next = before_node;
10c9ce: 89 10 mov %edx,(%eax)
before_node->previous = the_node;
10c9d0: 89 42 04 mov %eax,0x4(%edx)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c9d3: 83 c0 08 add $0x8,%eax
10c9d6: 89 44 24 04 mov %eax,0x4(%esp)
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
10c9da: 89 d8 mov %ebx,%eax
10c9dc: 83 c0 18 add $0x18,%eax
10c9df: 89 04 24 mov %eax,(%esp)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
10c9e2: e8 f1 18 00 00 call 10e2d8 <_RBTree_Insert_unprotected>
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
10c9e7: 31 c0 xor %eax,%eax
10c9e9: e9 1d ff ff ff jmp 10c90b <rtems_rbheap_initialize+0x13>
10c9ee: 66 90 xchg %ax,%ax
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10c9f0: 39 5c 24 24 cmp %ebx,0x24(%esp)
10c9f4: 72 0e jb 10ca04 <rtems_rbheap_initialize+0x10c>
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
10c9f6: b8 09 00 00 00 mov $0x9,%eax
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
10c9fb: 83 c4 10 add $0x10,%esp
10c9fe: 5b pop %ebx
10c9ff: 5e pop %esi
10ca00: 5f pop %edi
10ca01: c3 ret
10ca02: 66 90 xchg %ax,%ax
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
10ca04: 8b 74 24 24 mov 0x24(%esp),%esi
10ca08: 01 ce add %ecx,%esi
10ca0a: 29 d6 sub %edx,%esi
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
10ca0c: 39 74 24 24 cmp %esi,0x24(%esp)
10ca10: 77 e4 ja 10c9f6 <rtems_rbheap_initialize+0xfe><== NEVER TAKEN
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
10ca12: 89 d8 mov %ebx,%eax
10ca14: 31 d2 xor %edx,%edx
10ca16: f7 f1 div %ecx
return value - excess;
10ca18: 89 df mov %ebx,%edi
10ca1a: 29 d7 sub %edx,%edi
10ca1c: e9 23 ff ff ff jmp 10c944 <rtems_rbheap_initialize+0x4c>
first->begin = aligned_begin;
first->size = aligned_end - aligned_begin;
add_to_chain(free_chain, first);
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
10ca21: b8 1a 00 00 00 mov $0x1a,%eax
10ca26: e9 e0 fe ff ff jmp 10c90b <rtems_rbheap_initialize+0x13>
0011ac6c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
11ac6c: 53 push %ebx
11ac6d: 83 ec 28 sub $0x28,%esp
11ac70: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11ac74: 85 db test %ebx,%ebx
11ac76: 75 0c jne 11ac84 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
11ac78: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11ac7d: 83 c4 28 add $0x28,%esp
11ac80: 5b pop %ebx
11ac81: c3 ret
11ac82: 66 90 xchg %ax,%ax
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
11ac84: 8d 44 24 1c lea 0x1c(%esp),%eax
11ac88: 89 44 24 04 mov %eax,0x4(%esp)
11ac8c: 8b 44 24 30 mov 0x30(%esp),%eax
11ac90: 89 04 24 mov %eax,(%esp)
11ac93: e8 2c 45 00 00 call 11f1c4 <_Thread_Get>
switch ( location ) {
11ac98: 8b 54 24 1c mov 0x1c(%esp),%edx
11ac9c: 85 d2 test %edx,%edx
11ac9e: 75 38 jne 11acd8 <rtems_signal_send+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
11aca0: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
11aca6: 8b 4a 0c mov 0xc(%edx),%ecx
11aca9: 85 c9 test %ecx,%ecx
11acab: 74 35 je 11ace2 <rtems_signal_send+0x76>
if ( asr->is_enabled ) {
11acad: 80 7a 08 00 cmpb $0x0,0x8(%edx)
11acb1: 74 3d je 11acf0 <rtems_signal_send+0x84>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acb3: 9c pushf
11acb4: fa cli
11acb5: 59 pop %ecx
*signal_set |= signals;
11acb6: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
11acb9: 51 push %ecx
11acba: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
11acbb: 8b 15 48 f0 14 00 mov 0x14f048,%edx
11acc1: 85 d2 test %edx,%edx
11acc3: 74 08 je 11accd <rtems_signal_send+0x61>
11acc5: 3b 05 4c f0 14 00 cmp 0x14f04c,%eax
11accb: 74 2d je 11acfa <rtems_signal_send+0x8e><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
11accd: e8 d2 44 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11acd2: 31 c0 xor %eax,%eax
11acd4: eb a7 jmp 11ac7d <rtems_signal_send+0x11>
11acd6: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11acd8: b8 04 00 00 00 mov $0x4,%eax
}
11acdd: 83 c4 28 add $0x28,%esp
11ace0: 5b pop %ebx
11ace1: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
11ace2: e8 bd 44 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
11ace7: b8 0b 00 00 00 mov $0xb,%eax
11acec: eb 8f jmp 11ac7d <rtems_signal_send+0x11>
11acee: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
11acf0: 9c pushf
11acf1: fa cli
11acf2: 58 pop %eax
*signal_set |= signals;
11acf3: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
11acf6: 50 push %eax
11acf7: 9d popf
11acf8: eb d3 jmp 11accd <rtems_signal_send+0x61>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
11acfa: c6 05 58 f0 14 00 01 movb $0x1,0x14f058
11ad01: eb ca jmp 11accd <rtems_signal_send+0x61>
001136e4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
1136e4: 55 push %ebp
1136e5: 57 push %edi
1136e6: 56 push %esi
1136e7: 53 push %ebx
1136e8: 83 ec 0c sub $0xc,%esp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
1136eb: 8b 4c 24 28 mov 0x28(%esp),%ecx
1136ef: 85 c9 test %ecx,%ecx
1136f1: 0f 84 25 01 00 00 je 11381c <rtems_task_mode+0x138>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
1136f7: 8b 35 cc 24 13 00 mov 0x1324cc,%esi
api = executing->API_Extensions[ THREAD_API_RTEMS ];
1136fd: 8b 9e e4 00 00 00 mov 0xe4(%esi),%ebx
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
113703: 80 7e 70 01 cmpb $0x1,0x70(%esi)
113707: 19 ff sbb %edi,%edi
113709: 81 e7 00 01 00 00 and $0x100,%edi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
11370f: 8b 56 78 mov 0x78(%esi),%edx
113712: 85 d2 test %edx,%edx
113714: 0f 85 f6 00 00 00 jne 113810 <rtems_task_mode+0x12c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
11371a: 80 7b 08 01 cmpb $0x1,0x8(%ebx)
11371e: 19 ed sbb %ebp,%ebp
113720: 81 e5 00 04 00 00 and $0x400,%ebp
old_mode |= _ISR_Get_level();
113726: e8 c1 b9 ff ff call 10f0ec <_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;
11372b: 09 e8 or %ebp,%eax
old_mode |= _ISR_Get_level();
11372d: 09 f8 or %edi,%eax
11372f: 8b 54 24 28 mov 0x28(%esp),%edx
113733: 89 02 mov %eax,(%edx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
113735: f7 44 24 24 00 01 00 testl $0x100,0x24(%esp)
11373c: 00
11373d: 74 10 je 11374f <rtems_task_mode+0x6b>
11373f: 8b 44 24 20 mov 0x20(%esp),%eax
113743: c1 e8 08 shr $0x8,%eax
113746: 83 f0 01 xor $0x1,%eax
113749: 83 e0 01 and $0x1,%eax
11374c: 88 46 70 mov %al,0x70(%esi)
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
11374f: f7 44 24 24 00 02 00 testl $0x200,0x24(%esp)
113756: 00
113757: 74 1d je 113776 <rtems_task_mode+0x92>
if ( _Modes_Is_timeslice(mode_set) ) {
113759: f7 44 24 20 00 02 00 testl $0x200,0x20(%esp)
113760: 00
113761: 0f 84 c5 00 00 00 je 11382c <rtems_task_mode+0x148>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
113767: c7 46 78 01 00 00 00 movl $0x1,0x78(%esi)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
11376e: a1 18 1f 13 00 mov 0x131f18,%eax
113773: 89 46 74 mov %eax,0x74(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
113776: f6 44 24 24 01 testb $0x1,0x24(%esp)
11377b: 74 0c je 113789 <rtems_task_mode+0xa5>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
11377d: f6 44 24 20 01 testb $0x1,0x20(%esp)
113782: 0f 84 bc 00 00 00 je 113844 <rtems_task_mode+0x160>
113788: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
113789: f7 44 24 24 00 04 00 testl $0x400,0x24(%esp)
113790: 00
113791: 74 41 je 1137d4 <rtems_task_mode+0xf0>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
113793: 8b 44 24 20 mov 0x20(%esp),%eax
113797: c1 e8 0a shr $0xa,%eax
11379a: 83 f0 01 xor $0x1,%eax
11379d: 83 e0 01 and $0x1,%eax
if ( is_asr_enabled != asr->is_enabled ) {
1137a0: 38 43 08 cmp %al,0x8(%ebx)
1137a3: 74 2f je 1137d4 <rtems_task_mode+0xf0>
asr->is_enabled = is_asr_enabled;
1137a5: 88 43 08 mov %al,0x8(%ebx)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
1137a8: 9c pushf
1137a9: fa cli
1137aa: 58 pop %eax
_signals = information->signals_pending;
1137ab: 8b 4b 18 mov 0x18(%ebx),%ecx
information->signals_pending = information->signals_posted;
1137ae: 8b 53 14 mov 0x14(%ebx),%edx
1137b1: 89 53 18 mov %edx,0x18(%ebx)
information->signals_posted = _signals;
1137b4: 89 4b 14 mov %ecx,0x14(%ebx)
_ISR_Enable( _level );
1137b7: 50 push %eax
1137b8: 9d popf
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
1137b9: 8b 43 14 mov 0x14(%ebx),%eax
1137bc: 85 c0 test %eax,%eax
1137be: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1137c1: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1137c8: 74 15 je 1137df <rtems_task_mode+0xfb> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
1137ca: 31 c0 xor %eax,%eax
}
1137cc: 83 c4 0c add $0xc,%esp
1137cf: 5b pop %ebx
1137d0: 5e pop %esi
1137d1: 5f pop %edi
1137d2: 5d pop %ebp
1137d3: c3 ret
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
1137d4: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
1137d6: 83 3d a0 20 13 00 03 cmpl $0x3,0x1320a0
1137dd: 75 eb jne 1137ca <rtems_task_mode+0xe6>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
1137df: 8b 15 cc 24 13 00 mov 0x1324cc,%edx
if ( are_signals_pending ||
1137e5: 84 c0 test %al,%al
1137e7: 75 0e jne 1137f7 <rtems_task_mode+0x113>
1137e9: 3b 15 d0 24 13 00 cmp 0x1324d0,%edx
1137ef: 74 d9 je 1137ca <rtems_task_mode+0xe6>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
1137f1: 80 7a 70 00 cmpb $0x0,0x70(%edx)
1137f5: 74 d3 je 1137ca <rtems_task_mode+0xe6> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
1137f7: c6 05 d8 24 13 00 01 movb $0x1,0x1324d8
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
1137fe: e8 bd a4 ff ff call 10dcc0 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
113803: 31 c0 xor %eax,%eax
}
113805: 83 c4 0c add $0xc,%esp
113808: 5b pop %ebx
113809: 5e pop %esi
11380a: 5f pop %edi
11380b: 5d pop %ebp
11380c: c3 ret
11380d: 8d 76 00 lea 0x0(%esi),%esi
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
113810: 81 cf 00 02 00 00 or $0x200,%edi
113816: e9 ff fe ff ff jmp 11371a <rtems_task_mode+0x36>
11381b: 90 nop
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
11381c: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
113821: 83 c4 0c add $0xc,%esp
113824: 5b pop %ebx
113825: 5e pop %esi
113826: 5f pop %edi
113827: 5d pop %ebp
113828: c3 ret
113829: 8d 76 00 lea 0x0(%esi),%esi
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
11382c: c7 46 78 00 00 00 00 movl $0x0,0x78(%esi)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
113833: f6 44 24 24 01 testb $0x1,0x24(%esp)
113838: 0f 84 4b ff ff ff je 113789 <rtems_task_mode+0xa5>
11383e: e9 3a ff ff ff jmp 11377d <rtems_task_mode+0x99>
113843: 90 nop
113844: fb sti
113845: e9 3f ff ff ff jmp 113789 <rtems_task_mode+0xa5>
0010f99c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f99c: 53 push %ebx
10f99d: 83 ec 28 sub $0x28,%esp
10f9a0: 8b 5c 24 34 mov 0x34(%esp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f9a4: 85 db test %ebx,%ebx
10f9a6: 74 0b je 10f9b3 <rtems_task_set_priority+0x17>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10f9a8: 0f b6 05 ac 26 13 00 movzbl 0x1326ac,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10f9af: 39 c3 cmp %eax,%ebx
10f9b1: 77 79 ja 10fa2c <rtems_task_set_priority+0x90>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10f9b3: 8b 44 24 38 mov 0x38(%esp),%eax
10f9b7: 85 c0 test %eax,%eax
10f9b9: 74 59 je 10fa14 <rtems_task_set_priority+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10f9bb: 8d 44 24 1c lea 0x1c(%esp),%eax
10f9bf: 89 44 24 04 mov %eax,0x4(%esp)
10f9c3: 8b 44 24 30 mov 0x30(%esp),%eax
10f9c7: 89 04 24 mov %eax,(%esp)
10f9ca: e8 6d 21 00 00 call 111b3c <_Thread_Get>
switch ( location ) {
10f9cf: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10f9d3: 85 c9 test %ecx,%ecx
10f9d5: 75 49 jne 10fa20 <rtems_task_set_priority+0x84>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10f9d7: 8b 50 14 mov 0x14(%eax),%edx
10f9da: 8b 4c 24 38 mov 0x38(%esp),%ecx
10f9de: 89 11 mov %edx,(%ecx)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10f9e0: 85 db test %ebx,%ebx
10f9e2: 74 23 je 10fa07 <rtems_task_set_priority+0x6b>
the_thread->real_priority = new_priority;
10f9e4: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10f9e7: 8b 50 1c mov 0x1c(%eax),%edx
10f9ea: 85 d2 test %edx,%edx
10f9ec: 74 05 je 10f9f3 <rtems_task_set_priority+0x57>
10f9ee: 3b 58 14 cmp 0x14(%eax),%ebx
10f9f1: 73 14 jae 10fa07 <rtems_task_set_priority+0x6b><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10f9f3: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10f9fa: 00
10f9fb: 89 5c 24 04 mov %ebx,0x4(%esp)
10f9ff: 89 04 24 mov %eax,(%esp)
10fa02: e8 a9 1c 00 00 call 1116b0 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
10fa07: e8 10 21 00 00 call 111b1c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10fa0c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa0e: 83 c4 28 add $0x28,%esp
10fa11: 5b pop %ebx
10fa12: c3 ret
10fa13: 90 nop
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
10fa14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa19: 83 c4 28 add $0x28,%esp
10fa1c: 5b pop %ebx
10fa1d: c3 ret
10fa1e: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10fa20: b8 04 00 00 00 mov $0x4,%eax
}
10fa25: 83 c4 28 add $0x28,%esp
10fa28: 5b pop %ebx
10fa29: c3 ret
10fa2a: 66 90 xchg %ax,%ax
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
10fa2c: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa31: 83 c4 28 add $0x28,%esp
10fa34: 5b pop %ebx
10fa35: c3 ret
00107c60 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
107c60: 53 push %ebx
107c61: 83 ec 28 sub $0x28,%esp
107c64: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
107c68: 85 db test %ebx,%ebx
107c6a: 74 58 je 107cc4 <rtems_task_variable_delete+0x64>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
107c6c: 8d 44 24 1c lea 0x1c(%esp),%eax
107c70: 89 44 24 04 mov %eax,0x4(%esp)
107c74: 8b 44 24 30 mov 0x30(%esp),%eax
107c78: 89 04 24 mov %eax,(%esp)
107c7b: e8 cc 1c 00 00 call 10994c <_Thread_Get>
switch (location) {
107c80: 8b 54 24 1c mov 0x1c(%esp),%edx
107c84: 85 d2 test %edx,%edx
107c86: 75 30 jne 107cb8 <rtems_task_variable_delete+0x58>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
107c88: 8b 88 f0 00 00 00 mov 0xf0(%eax),%ecx
while (tvp) {
107c8e: 85 c9 test %ecx,%ecx
107c90: 74 17 je 107ca9 <rtems_task_variable_delete+0x49>
if (tvp->ptr == ptr) {
107c92: 39 59 04 cmp %ebx,0x4(%ecx)
107c95: 75 0c jne 107ca3 <rtems_task_variable_delete+0x43>
107c97: eb 50 jmp 107ce9 <rtems_task_variable_delete+0x89>
107c99: 8d 76 00 lea 0x0(%esi),%esi
107c9c: 39 5a 04 cmp %ebx,0x4(%edx)
107c9f: 74 2f je 107cd0 <rtems_task_variable_delete+0x70>
107ca1: 89 d1 mov %edx,%ecx
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
107ca3: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
107ca5: 85 d2 test %edx,%edx
107ca7: 75 f3 jne 107c9c <rtems_task_variable_delete+0x3c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107ca9: e8 7e 1c 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107cae: b8 09 00 00 00 mov $0x9,%eax
107cb3: eb 08 jmp 107cbd <rtems_task_variable_delete+0x5d>
107cb5: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107cb8: b8 04 00 00 00 mov $0x4,%eax
}
107cbd: 83 c4 28 add $0x28,%esp
107cc0: 5b pop %ebx
107cc1: c3 ret
107cc2: 66 90 xchg %ax,%ax
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107cc4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107cc9: 83 c4 28 add $0x28,%esp
107ccc: 5b pop %ebx
107ccd: c3 ret
107cce: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
107cd0: 8b 1a mov (%edx),%ebx
107cd2: 89 19 mov %ebx,(%ecx)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
107cd4: 89 54 24 04 mov %edx,0x4(%esp)
107cd8: 89 04 24 mov %eax,(%esp)
107cdb: e8 98 00 00 00 call 107d78 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
107ce0: e8 47 1c 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107ce5: 31 c0 xor %eax,%eax
107ce7: eb d4 jmp 107cbd <rtems_task_variable_delete+0x5d>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
107ce9: 8b 11 mov (%ecx),%edx
107ceb: 89 90 f0 00 00 00 mov %edx,0xf0(%eax)
107cf1: 89 ca mov %ecx,%edx
107cf3: eb df jmp 107cd4 <rtems_task_variable_delete+0x74>
00107cf8 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
107cf8: 53 push %ebx
107cf9: 83 ec 28 sub $0x28,%esp
107cfc: 8b 5c 24 34 mov 0x34(%esp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
107d00: 85 db test %ebx,%ebx
107d02: 74 50 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
107d04: 8b 4c 24 38 mov 0x38(%esp),%ecx
107d08: 85 c9 test %ecx,%ecx
107d0a: 74 48 je 107d54 <rtems_task_variable_get+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
107d0c: 8d 44 24 1c lea 0x1c(%esp),%eax
107d10: 89 44 24 04 mov %eax,0x4(%esp)
107d14: 8b 44 24 30 mov 0x30(%esp),%eax
107d18: 89 04 24 mov %eax,(%esp)
107d1b: e8 2c 1c 00 00 call 10994c <_Thread_Get>
switch (location) {
107d20: 8b 54 24 1c mov 0x1c(%esp),%edx
107d24: 85 d2 test %edx,%edx
107d26: 75 38 jne 107d60 <rtems_task_variable_get+0x68>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
107d28: 8b 80 f0 00 00 00 mov 0xf0(%eax),%eax
while (tvp) {
107d2e: 85 c0 test %eax,%eax
107d30: 75 08 jne 107d3a <rtems_task_variable_get+0x42>
107d32: eb 38 jmp 107d6c <rtems_task_variable_get+0x74>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
107d34: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
107d36: 85 c0 test %eax,%eax
107d38: 74 32 je 107d6c <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
107d3a: 39 58 04 cmp %ebx,0x4(%eax)
107d3d: 75 f5 jne 107d34 <rtems_task_variable_get+0x3c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
107d3f: 8b 40 0c mov 0xc(%eax),%eax
107d42: 8b 54 24 38 mov 0x38(%esp),%edx
107d46: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
107d48: e8 df 1b 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
107d4d: 31 c0 xor %eax,%eax
107d4f: eb 08 jmp 107d59 <rtems_task_variable_get+0x61>
107d51: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
107d54: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
107d59: 83 c4 28 add $0x28,%esp
107d5c: 5b pop %ebx
107d5d: c3 ret
107d5e: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
107d60: b8 04 00 00 00 mov $0x4,%eax
}
107d65: 83 c4 28 add $0x28,%esp
107d68: 5b pop %ebx
107d69: c3 ret
107d6a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
107d6c: e8 bb 1b 00 00 call 10992c <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
107d71: b8 09 00 00 00 mov $0x9,%eax
107d76: eb e1 jmp 107d59 <rtems_task_variable_get+0x61>
0011b6b8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
11b6b8: 83 ec 2c sub $0x2c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
11b6bb: 8d 44 24 1c lea 0x1c(%esp),%eax
11b6bf: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
11b6c3: 8b 44 24 30 mov 0x30(%esp),%eax
11b6c7: 89 44 24 04 mov %eax,0x4(%esp)
11b6cb: c7 04 24 e0 f4 14 00 movl $0x14f4e0,(%esp)
11b6d2: e8 09 2e 00 00 call 11e4e0 <_Objects_Get>
switch ( location ) {
11b6d7: 8b 54 24 1c mov 0x1c(%esp),%edx
11b6db: 85 d2 test %edx,%edx
11b6dd: 75 1d jne 11b6fc <rtems_timer_cancel+0x44>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
11b6df: 83 78 38 04 cmpl $0x4,0x38(%eax)
11b6e3: 74 0b je 11b6f0 <rtems_timer_cancel+0x38><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11b6e5: 83 c0 10 add $0x10,%eax
11b6e8: 89 04 24 mov %eax,(%esp)
11b6eb: e8 b0 49 00 00 call 1200a0 <_Watchdog_Remove>
_Thread_Enable_dispatch();
11b6f0: e8 af 3a 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11b6f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11b6f7: 83 c4 2c add $0x2c,%esp
11b6fa: c3 ret
11b6fb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11b6fc: b8 04 00 00 00 mov $0x4,%eax
}
11b701: 83 c4 2c add $0x2c,%esp
11b704: c3 ret
0011bc38 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
11bc38: 57 push %edi
11bc39: 56 push %esi
11bc3a: 53 push %ebx
11bc3b: 83 ec 20 sub $0x20,%esp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
11bc3e: 8b 1d 20 f5 14 00 mov 0x14f520,%ebx
if ( !timer_server )
11bc44: 85 db test %ebx,%ebx
11bc46: 74 3c je 11bc84 <rtems_timer_server_fire_when+0x4c>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
11bc48: 80 3d 94 ea 14 00 00 cmpb $0x0,0x14ea94
11bc4f: 75 0f jne 11bc60 <rtems_timer_server_fire_when+0x28><== ALWAYS TAKEN
return RTEMS_NOT_DEFINED;
11bc51: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc56: 83 c4 20 add $0x20,%esp
11bc59: 5b pop %ebx
11bc5a: 5e pop %esi
11bc5b: 5f pop %edi
11bc5c: c3 ret
11bc5d: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
11bc60: 8b 54 24 38 mov 0x38(%esp),%edx
11bc64: 85 d2 test %edx,%edx
11bc66: 74 28 je 11bc90 <rtems_timer_server_fire_when+0x58>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11bc68: 8b 44 24 34 mov 0x34(%esp),%eax
11bc6c: 89 04 24 mov %eax,(%esp)
11bc6f: e8 98 cc ff ff call 11890c <_TOD_Validate>
11bc74: 84 c0 test %al,%al
11bc76: 75 24 jne 11bc9c <rtems_timer_server_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
11bc78: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc7d: 83 c4 20 add $0x20,%esp
11bc80: 5b pop %ebx
11bc81: 5e pop %esi
11bc82: 5f pop %edi
11bc83: c3 ret
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
11bc84: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc89: 83 c4 20 add $0x20,%esp
11bc8c: 5b pop %ebx
11bc8d: 5e pop %esi
11bc8e: 5f pop %edi
11bc8f: c3 ret
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
11bc90: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11bc95: 83 c4 20 add $0x20,%esp
11bc98: 5b pop %ebx
11bc99: 5e pop %esi
11bc9a: 5f pop %edi
11bc9b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
11bc9c: 8b 54 24 34 mov 0x34(%esp),%edx
11bca0: 89 14 24 mov %edx,(%esp)
11bca3: e8 d4 cb ff ff call 11887c <_TOD_To_seconds>
11bca8: 89 c6 mov %eax,%esi
11bcaa: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bcb1: 3b
11bcb2: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bcb9: 00
11bcba: a1 80 ea 14 00 mov 0x14ea80,%eax
11bcbf: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11bcc5: 89 04 24 mov %eax,(%esp)
11bcc8: 89 54 24 04 mov %edx,0x4(%esp)
11bccc: e8 73 52 01 00 call 130f44 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
11bcd1: 39 c6 cmp %eax,%esi
11bcd3: 76 a3 jbe 11bc78 <rtems_timer_server_fire_when+0x40>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
11bcd5: 8d 44 24 1c lea 0x1c(%esp),%eax
11bcd9: 89 44 24 08 mov %eax,0x8(%esp)
11bcdd: 8b 54 24 30 mov 0x30(%esp),%edx
11bce1: 89 54 24 04 mov %edx,0x4(%esp)
11bce5: c7 04 24 e0 f4 14 00 movl $0x14f4e0,(%esp)
11bcec: e8 ef 27 00 00 call 11e4e0 <_Objects_Get>
11bcf1: 89 c7 mov %eax,%edi
switch ( location ) {
11bcf3: 8b 44 24 1c mov 0x1c(%esp),%eax
11bcf7: 85 c0 test %eax,%eax
11bcf9: 75 70 jne 11bd6b <rtems_timer_server_fire_when+0x133>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11bcfb: 8d 47 10 lea 0x10(%edi),%eax
11bcfe: 89 04 24 mov %eax,(%esp)
11bd01: e8 9a 43 00 00 call 1200a0 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
11bd06: c7 47 38 03 00 00 00 movl $0x3,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11bd0d: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
11bd14: 8b 44 24 38 mov 0x38(%esp),%eax
11bd18: 89 47 2c mov %eax,0x2c(%edi)
the_watchdog->id = id;
11bd1b: 8b 54 24 30 mov 0x30(%esp),%edx
11bd1f: 89 57 30 mov %edx,0x30(%edi)
the_watchdog->user_data = user_data;
11bd22: 8b 44 24 3c mov 0x3c(%esp),%eax
11bd26: 89 47 34 mov %eax,0x34(%edi)
11bd29: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
11bd30: 3b
11bd31: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
11bd38: 00
11bd39: a1 80 ea 14 00 mov 0x14ea80,%eax
11bd3e: 8b 15 84 ea 14 00 mov 0x14ea84,%edx
11bd44: 89 04 24 mov %eax,(%esp)
11bd47: 89 54 24 04 mov %edx,0x4(%esp)
11bd4b: e8 f4 51 01 00 call 130f44 <__divdi3>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
11bd50: 29 c6 sub %eax,%esi
11bd52: 89 77 1c mov %esi,0x1c(%edi)
(*timer_server->schedule_operation)( timer_server, the_timer );
11bd55: 89 7c 24 04 mov %edi,0x4(%esp)
11bd59: 89 1c 24 mov %ebx,(%esp)
11bd5c: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
11bd5f: e8 40 34 00 00 call 11f1a4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11bd64: 31 c0 xor %eax,%eax
11bd66: e9 eb fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11bd6b: b8 04 00 00 00 mov $0x4,%eax
11bd70: e9 e1 fe ff ff jmp 11bc56 <rtems_timer_server_fire_when+0x1e>
0010c180 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10c180: 83 ec 0c sub $0xc,%esp
10c183: 8b 44 24 10 mov 0x10(%esp),%eax
switch ( policy ) {
10c187: 85 c0 test %eax,%eax
10c189: 78 16 js 10c1a1 <sched_get_priority_max+0x21>
10c18b: 83 f8 02 cmp $0x2,%eax
10c18e: 7f 0c jg 10c19c <sched_get_priority_max+0x1c>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10c190: 0f b6 05 cc ed 12 00 movzbl 0x12edcc,%eax
10c197: 48 dec %eax
}
10c198: 83 c4 0c add $0xc,%esp
10c19b: c3 ret
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
10c19c: 83 f8 04 cmp $0x4,%eax
10c19f: 74 ef je 10c190 <sched_get_priority_max+0x10><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c1a1: e8 52 86 00 00 call 1147f8 <__errno>
10c1a6: c7 00 16 00 00 00 movl $0x16,(%eax)
10c1ac: b8 ff ff ff ff mov $0xffffffff,%eax
10c1b1: eb e5 jmp 10c198 <sched_get_priority_max+0x18>
0010c1b4 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10c1b4: 83 ec 0c sub $0xc,%esp
10c1b7: 8b 44 24 10 mov 0x10(%esp),%eax
switch ( policy ) {
10c1bb: 85 c0 test %eax,%eax
10c1bd: 78 16 js 10c1d5 <sched_get_priority_min+0x21>
10c1bf: 83 f8 02 cmp $0x2,%eax
10c1c2: 7f 0c jg 10c1d0 <sched_get_priority_min+0x1c><== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10c1c4: b8 01 00 00 00 mov $0x1,%eax
}
10c1c9: 83 c4 0c add $0xc,%esp
10c1cc: c3 ret
10c1cd: 8d 76 00 lea 0x0(%esi),%esi
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10c1d0: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10c1d3: 74 ef je 10c1c4 <sched_get_priority_min+0x10><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c1d5: e8 1e 86 00 00 call 1147f8 <__errno>
10c1da: c7 00 16 00 00 00 movl $0x16,(%eax)
10c1e0: b8 ff ff ff ff mov $0xffffffff,%eax
10c1e5: eb e2 jmp 10c1c9 <sched_get_priority_min+0x15>
0010c1e8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10c1e8: 56 push %esi
10c1e9: 53 push %ebx
10c1ea: 83 ec 14 sub $0x14,%esp
10c1ed: 8b 74 24 20 mov 0x20(%esp),%esi
10c1f1: 8b 5c 24 24 mov 0x24(%esp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c1f5: 85 f6 test %esi,%esi
10c1f7: 75 1f jne 10c218 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10c1f9: 85 db test %ebx,%ebx
10c1fb: 74 36 je 10c233 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10c1fd: 89 5c 24 04 mov %ebx,0x4(%esp)
10c201: a1 78 32 13 00 mov 0x133278,%eax
10c206: 89 04 24 mov %eax,(%esp)
10c209: e8 66 35 00 00 call 10f774 <_Timespec_From_ticks>
return 0;
10c20e: 31 c0 xor %eax,%eax
}
10c210: 83 c4 14 add $0x14,%esp
10c213: 5b pop %ebx
10c214: 5e pop %esi
10c215: c3 ret
10c216: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c218: e8 6f bd ff ff call 107f8c <getpid>
10c21d: 39 f0 cmp %esi,%eax
10c21f: 74 d8 je 10c1f9 <sched_rr_get_interval+0x11>
rtems_set_errno_and_return_minus_one( ESRCH );
10c221: e8 d2 85 00 00 call 1147f8 <__errno>
10c226: c7 00 03 00 00 00 movl $0x3,(%eax)
10c22c: b8 ff ff ff ff mov $0xffffffff,%eax
10c231: eb dd jmp 10c210 <sched_rr_get_interval+0x28>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c233: e8 c0 85 00 00 call 1147f8 <__errno>
10c238: c7 00 16 00 00 00 movl $0x16,(%eax)
10c23e: b8 ff ff ff ff mov $0xffffffff,%eax
10c243: eb cb jmp 10c210 <sched_rr_get_interval+0x28>
0010c6c8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10c6c8: 55 push %ebp
10c6c9: 57 push %edi
10c6ca: 56 push %esi
10c6cb: 53 push %ebx
10c6cc: 83 ec 3c sub $0x3c,%esp
10c6cf: 8b 74 24 50 mov 0x50(%esp),%esi
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c6d3: a1 64 60 13 00 mov 0x136064,%eax
10c6d8: 40 inc %eax
10c6d9: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10c6de: a1 64 60 13 00 mov 0x136064,%eax
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10c6e3: 8b 7c 24 54 mov 0x54(%esp),%edi
10c6e7: 81 e7 00 02 00 00 and $0x200,%edi
10c6ed: 0f 85 9d 00 00 00 jne 10c790 <sem_open+0xc8>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
10c6f3: 31 ed xor %ebp,%ebp
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id, &name_len );
10c6f5: 8d 44 24 2c lea 0x2c(%esp),%eax
10c6f9: 89 44 24 0c mov %eax,0xc(%esp)
10c6fd: 8d 44 24 20 lea 0x20(%esp),%eax
10c701: 89 44 24 08 mov %eax,0x8(%esp)
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
10c705: 89 74 24 04 mov %esi,0x4(%esp)
10c709: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
10c710: e8 3b f9 ff ff call 10c050 <_POSIX_Name_to_id>
10c715: 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 ) {
10c717: 85 c0 test %eax,%eax
10c719: 74 25 je 10c740 <sem_open+0x78>
/*
* 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) ) ) {
10c71b: 83 f8 02 cmp $0x2,%eax
10c71e: 75 04 jne 10c724 <sem_open+0x5c>
10c720: 85 ff test %edi,%edi
10c722: 75 78 jne 10c79c <sem_open+0xd4>
_Thread_Enable_dispatch();
10c724: e8 8f 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10c729: e8 e2 92 00 00 call 115a10 <__errno>
10c72e: 89 18 mov %ebx,(%eax)
10c730: b8 ff ff ff ff mov $0xffffffff,%eax
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
#endif
}
10c735: 83 c4 3c add $0x3c,%esp
10c738: 5b pop %ebx
10c739: 5e pop %esi
10c73a: 5f pop %edi
10c73b: 5d pop %ebp
10c73c: c3 ret
10c73d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10c740: 8b 44 24 54 mov 0x54(%esp),%eax
10c744: 25 00 0a 00 00 and $0xa00,%eax
10c749: 3d 00 0a 00 00 cmp $0xa00,%eax
10c74e: 0f 84 80 00 00 00 je 10c7d4 <sem_open+0x10c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
10c754: 8d 44 24 28 lea 0x28(%esp),%eax
10c758: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10c75c: 8b 44 24 20 mov 0x20(%esp),%eax
10c760: 89 44 24 04 mov %eax,0x4(%esp)
10c764: c7 04 24 80 63 13 00 movl $0x136380,(%esp)
10c76b: e8 24 26 00 00 call 10ed94 <_Objects_Get>
10c770: 89 44 24 24 mov %eax,0x24(%esp)
the_semaphore->open_count += 1;
10c774: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10c777: e8 3c 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10c77c: e8 37 33 00 00 call 10fab8 <_Thread_Enable_dispatch>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
10c781: 8b 44 24 24 mov 0x24(%esp),%eax
10c785: 83 c0 08 add $0x8,%eax
#endif
}
10c788: 83 c4 3c add $0x3c,%esp
10c78b: 5b pop %ebx
10c78c: 5e pop %esi
10c78d: 5f pop %edi
10c78e: 5d pop %ebp
10c78f: c3 ret
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
10c790: 8b 6c 24 5c mov 0x5c(%esp),%ebp
10c794: e9 5c ff ff ff jmp 10c6f5 <sem_open+0x2d>
10c799: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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(
10c79c: 8d 44 24 24 lea 0x24(%esp),%eax
10c7a0: 89 44 24 10 mov %eax,0x10(%esp)
10c7a4: 89 6c 24 0c mov %ebp,0xc(%esp)
10c7a8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10c7af: 00
10c7b0: 8b 44 24 2c mov 0x2c(%esp),%eax
10c7b4: 89 44 24 04 mov %eax,0x4(%esp)
10c7b8: 89 34 24 mov %esi,(%esp)
10c7bb: e8 88 63 00 00 call 112b48 <_POSIX_Semaphore_Create_support>
10c7c0: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10c7c2: e8 f1 32 00 00 call 10fab8 <_Thread_Enable_dispatch>
if ( status == -1 )
10c7c7: 43 inc %ebx
10c7c8: 75 b7 jne 10c781 <sem_open+0xb9> <== ALWAYS TAKEN
return SEM_FAILED;
10c7ca: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10c7cf: eb b7 jmp 10c788 <sem_open+0xc0> <== NOT EXECUTED
10c7d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10c7d4: e8 df 32 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10c7d9: e8 32 92 00 00 call 115a10 <__errno>
10c7de: c7 00 11 00 00 00 movl $0x11,(%eax)
10c7e4: b8 ff ff ff ff mov $0xffffffff,%eax
10c7e9: eb 9d jmp 10c788 <sem_open+0xc0>
0010f424 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10f424: 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 );
10f427: 8d 44 24 1c lea 0x1c(%esp),%eax
10f42b: 89 44 24 04 mov %eax,0x4(%esp)
10f42f: 8b 44 24 34 mov 0x34(%esp),%eax
10f433: 89 04 24 mov %eax,(%esp)
10f436: e8 d5 53 00 00 call 114810 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10f43b: 83 f8 03 cmp $0x3,%eax
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f43e: 8b 44 24 1c mov 0x1c(%esp),%eax
10f442: 89 44 24 08 mov %eax,0x8(%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 );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10f446: 74 18 je 10f460 <sem_timedwait+0x3c> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f448: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) <== NOT EXECUTED
10f44f: 00
10f450: 8b 44 24 30 mov 0x30(%esp),%eax <== NOT EXECUTED
10f454: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED
10f457: e8 cc 5f 00 00 call 115428 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10f45c: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED
10f45f: c3 ret <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10f460: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
10f467: 00
10f468: 8b 44 24 30 mov 0x30(%esp),%eax
10f46c: 89 04 24 mov %eax,(%esp)
10f46f: e8 b4 5f 00 00 call 115428 <_POSIX_Semaphore_Wait_support>
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10f474: 83 c4 2c add $0x2c,%esp
10f477: c3 ret
0010bf94 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10bf94: 55 push %ebp
10bf95: 57 push %edi
10bf96: 56 push %esi
10bf97: 53 push %ebx
10bf98: 83 ec 1c sub $0x1c,%esp
10bf9b: 8b 5c 24 30 mov 0x30(%esp),%ebx
10bf9f: 8b 44 24 38 mov 0x38(%esp),%eax
ISR_Level level;
if ( oact )
10bfa3: 85 c0 test %eax,%eax
10bfa5: 74 13 je 10bfba <sigaction+0x26>
*oact = _POSIX_signals_Vectors[ sig ];
10bfa7: 8d 14 5b lea (%ebx,%ebx,2),%edx
10bfaa: 8d 34 95 a0 48 13 00 lea 0x1348a0(,%edx,4),%esi
10bfb1: b9 03 00 00 00 mov $0x3,%ecx
10bfb6: 89 c7 mov %eax,%edi
10bfb8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10bfba: 85 db test %ebx,%ebx
10bfbc: 74 72 je 10c030 <sigaction+0x9c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10bfbe: 8d 43 ff lea -0x1(%ebx),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10bfc1: 83 f8 1f cmp $0x1f,%eax
10bfc4: 77 6a ja 10c030 <sigaction+0x9c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10bfc6: 83 fb 09 cmp $0x9,%ebx
10bfc9: 74 65 je 10c030 <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10bfcb: 8b 54 24 34 mov 0x34(%esp),%edx
10bfcf: 85 d2 test %edx,%edx
10bfd1: 74 59 je 10c02c <sigaction+0x98> <== 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 );
10bfd3: 9c pushf
10bfd4: fa cli
10bfd5: 5d pop %ebp
if ( act->sa_handler == SIG_DFL ) {
10bfd6: 8b 44 24 34 mov 0x34(%esp),%eax
10bfda: 8b 40 08 mov 0x8(%eax),%eax
10bfdd: 85 c0 test %eax,%eax
10bfdf: 74 2b je 10c00c <sigaction+0x78>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10bfe1: 89 1c 24 mov %ebx,(%esp)
10bfe4: e8 9b 57 00 00 call 111784 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10bfe9: 8d 04 5b lea (%ebx,%ebx,2),%eax
10bfec: 8d 04 85 a0 48 13 00 lea 0x1348a0(,%eax,4),%eax
10bff3: b9 03 00 00 00 mov $0x3,%ecx
10bff8: 89 c7 mov %eax,%edi
10bffa: 8b 74 24 34 mov 0x34(%esp),%esi
10bffe: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_ISR_Enable( level );
10c000: 55 push %ebp
10c001: 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;
10c002: 31 c0 xor %eax,%eax
}
10c004: 83 c4 1c add $0x1c,%esp
10c007: 5b pop %ebx
10c008: 5e pop %esi
10c009: 5f pop %edi
10c00a: 5d pop %ebp
10c00b: c3 ret
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
10c00c: 8d 34 5b lea (%ebx,%ebx,2),%esi
10c00f: c1 e6 02 shl $0x2,%esi
10c012: 8d 86 a0 48 13 00 lea 0x1348a0(%esi),%eax
10c018: 81 c6 40 4d 12 00 add $0x124d40,%esi
10c01e: b9 03 00 00 00 mov $0x3,%ecx
10c023: 89 c7 mov %eax,%edi
10c025: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c027: eb d7 jmp 10c000 <sigaction+0x6c>
10c029: 8d 76 00 lea 0x0(%esi),%esi
* 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;
10c02c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10c02e: eb d4 jmp 10c004 <sigaction+0x70> <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10c030: e8 ef 8a 00 00 call 114b24 <__errno>
10c035: c7 00 16 00 00 00 movl $0x16,(%eax)
10c03b: b8 ff ff ff ff mov $0xffffffff,%eax
10c040: eb c2 jmp 10c004 <sigaction+0x70>
0010c49c <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c49c: 55 push %ebp
10c49d: 57 push %edi
10c49e: 56 push %esi
10c49f: 53 push %ebx
10c4a0: 83 ec 4c sub $0x4c,%esp
10c4a3: 8b 74 24 60 mov 0x60(%esp),%esi
10c4a7: 8b 5c 24 64 mov 0x64(%esp),%ebx
10c4ab: 8b 7c 24 68 mov 0x68(%esp),%edi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c4af: 85 f6 test %esi,%esi
10c4b1: 0f 84 b1 01 00 00 je 10c668 <sigtimedwait+0x1cc>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c4b7: 85 ff test %edi,%edi
10c4b9: 0f 84 4d 01 00 00 je 10c60c <sigtimedwait+0x170>
if ( !_Timespec_Is_valid( timeout ) )
10c4bf: 89 3c 24 mov %edi,(%esp)
10c4c2: e8 c5 36 00 00 call 10fb8c <_Timespec_Is_valid>
10c4c7: 84 c0 test %al,%al
10c4c9: 0f 84 99 01 00 00 je 10c668 <sigtimedwait+0x1cc>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c4cf: 89 3c 24 mov %edi,(%esp)
10c4d2: e8 d9 36 00 00 call 10fbb0 <_Timespec_To_ticks>
if ( !interval )
10c4d7: 85 c0 test %eax,%eax
10c4d9: 0f 84 89 01 00 00 je 10c668 <sigtimedwait+0x1cc> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c4df: 85 db test %ebx,%ebx
10c4e1: 0f 84 2f 01 00 00 je 10c616 <sigtimedwait+0x17a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c4e7: 8b 15 6c 4d 13 00 mov 0x134d6c,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c4ed: 8b ba e8 00 00 00 mov 0xe8(%edx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c4f3: 9c pushf
10c4f4: fa cli
10c4f5: 8f 44 24 2c popl 0x2c(%esp)
if ( *set & api->signals_pending ) {
10c4f9: 8b 0e mov (%esi),%ecx
10c4fb: 8b af d4 00 00 00 mov 0xd4(%edi),%ebp
10c501: 85 e9 test %ebp,%ecx
10c503: 0f 85 17 01 00 00 jne 10c620 <sigtimedwait+0x184>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c509: 8b 2d e8 4f 13 00 mov 0x134fe8,%ebp
10c50f: 85 e9 test %ebp,%ecx
10c511: 0f 85 ad 00 00 00 jne 10c5c4 <sigtimedwait+0x128>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c517: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c51d: 8b 0d e4 47 13 00 mov 0x1347e4,%ecx
10c523: 41 inc %ecx
10c524: 89 0d e4 47 13 00 mov %ecx,0x1347e4
return _Thread_Dispatch_disable_level;
10c52a: 8b 0d e4 47 13 00 mov 0x1347e4,%ecx
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c530: c7 42 44 80 4f 13 00 movl $0x134f80,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10c537: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10c53e: 8b 0e mov (%esi),%ecx
10c540: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10c543: 89 5a 28 mov %ebx,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;
10c546: c7 05 b0 4f 13 00 01 movl $0x1,0x134fb0
10c54d: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c550: ff 74 24 2c pushl 0x2c(%esp)
10c554: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c555: c7 44 24 08 cc f9 10 movl $0x10f9cc,0x8(%esp)
10c55c: 00
10c55d: 89 44 24 04 mov %eax,0x4(%esp)
10c561: c7 04 24 80 4f 13 00 movl $0x134f80,(%esp)
10c568: e8 37 31 00 00 call 10f6a4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c56d: e8 5e 2c 00 00 call 10f1d0 <_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 );
10c572: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c579: 00
10c57a: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10c581: 00
10c582: 89 5c 24 08 mov %ebx,0x8(%esp)
10c586: 8b 03 mov (%ebx),%eax
10c588: 89 44 24 04 mov %eax,0x4(%esp)
10c58c: 89 3c 24 mov %edi,(%esp)
10c58f: e8 60 5a 00 00 call 111ff4 <_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)
10c594: a1 6c 4d 13 00 mov 0x134d6c,%eax
10c599: 83 78 34 04 cmpl $0x4,0x34(%eax)
10c59d: 0f 85 dd 00 00 00 jne 10c680 <sigtimedwait+0x1e4>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10c5a3: 8b 2b mov (%ebx),%ebp
10c5a5: 8d 4d ff lea -0x1(%ebp),%ecx
10c5a8: b8 01 00 00 00 mov $0x1,%eax
10c5ad: d3 e0 shl %cl,%eax
10c5af: 85 06 test %eax,(%esi)
10c5b1: 0f 84 c9 00 00 00 je 10c680 <sigtimedwait+0x1e4> <== NEVER TAKEN
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c5b7: 89 e8 mov %ebp,%eax
10c5b9: 83 c4 4c add $0x4c,%esp
10c5bc: 5b pop %ebx
10c5bd: 5e pop %esi
10c5be: 5f pop %edi
10c5bf: 5d pop %ebp
10c5c0: c3 ret
10c5c1: 8d 76 00 lea 0x0(%esi),%esi
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10c5c4: 89 e8 mov %ebp,%eax
10c5c6: e8 91 fe ff ff call 10c45c <_POSIX_signals_Get_lowest>
10c5cb: 89 c5 mov %eax,%ebp
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c5cd: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c5d4: 00
10c5d5: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
10c5dc: 00
10c5dd: 89 5c 24 08 mov %ebx,0x8(%esp)
10c5e1: 89 44 24 04 mov %eax,0x4(%esp)
10c5e5: 89 3c 24 mov %edi,(%esp)
10c5e8: e8 07 5a 00 00 call 111ff4 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c5ed: ff 74 24 2c pushl 0x2c(%esp)
10c5f1: 9d popf
the_info->si_signo = signo;
10c5f2: 89 2b mov %ebp,(%ebx)
the_info->si_code = SI_USER;
10c5f4: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c5fb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c602: 89 e8 mov %ebp,%eax
10c604: 83 c4 4c add $0x4c,%esp
10c607: 5b pop %ebx
10c608: 5e pop %esi
10c609: 5f pop %edi
10c60a: 5d pop %ebp
10c60b: c3 ret
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10c60c: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c60e: 85 db test %ebx,%ebx
10c610: 0f 85 d1 fe ff ff jne 10c4e7 <sigtimedwait+0x4b>
10c616: 8d 5c 24 34 lea 0x34(%esp),%ebx
10c61a: e9 c8 fe ff ff jmp 10c4e7 <sigtimedwait+0x4b>
10c61f: 90 nop
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10c620: 89 e8 mov %ebp,%eax
10c622: e8 35 fe ff ff call 10c45c <_POSIX_signals_Get_lowest>
10c627: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10c629: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp)
10c630: 00
10c631: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10c638: 00
10c639: 89 5c 24 08 mov %ebx,0x8(%esp)
10c63d: 89 44 24 04 mov %eax,0x4(%esp)
10c641: 89 3c 24 mov %edi,(%esp)
10c644: e8 ab 59 00 00 call 111ff4 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c649: ff 74 24 2c pushl 0x2c(%esp)
10c64d: 9d popf
the_info->si_code = SI_USER;
10c64e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c655: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10c65c: 8b 2b mov (%ebx),%ebp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c65e: 89 e8 mov %ebp,%eax
10c660: 83 c4 4c add $0x4c,%esp
10c663: 5b pop %ebx
10c664: 5e pop %esi
10c665: 5f pop %edi
10c666: 5d pop %ebp
10c667: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c668: e8 f3 8b 00 00 call 115260 <__errno>
10c66d: c7 00 16 00 00 00 movl $0x16,(%eax)
10c673: bd ff ff ff ff mov $0xffffffff,%ebp
10c678: e9 3a ff ff ff jmp 10c5b7 <sigtimedwait+0x11b>
10c67d: 8d 76 00 lea 0x0(%esi),%esi
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
10c680: e8 db 8b 00 00 call 115260 <__errno>
10c685: 8b 15 6c 4d 13 00 mov 0x134d6c,%edx
10c68b: 8b 52 34 mov 0x34(%edx),%edx
10c68e: 89 10 mov %edx,(%eax)
return -1;
10c690: bd ff ff ff ff mov $0xffffffff,%ebp
10c695: e9 1d ff ff ff jmp 10c5b7 <sigtimedwait+0x11b>
0010e548 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10e548: 53 push %ebx
10e549: 83 ec 18 sub $0x18,%esp
10e54c: 8b 5c 24 24 mov 0x24(%esp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10e550: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10e557: 00
10e558: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10e55f: 00
10e560: 8b 44 24 20 mov 0x20(%esp),%eax
10e564: 89 04 24 mov %eax,(%esp)
10e567: e8 b8 fd ff ff call 10e324 <sigtimedwait>
if ( status != -1 ) {
10e56c: 83 f8 ff cmp $0xffffffff,%eax
10e56f: 74 0f je 10e580 <sigwait+0x38>
if ( sig )
10e571: 85 db test %ebx,%ebx
10e573: 74 17 je 10e58c <sigwait+0x44> <== NEVER TAKEN
*sig = status;
10e575: 89 03 mov %eax,(%ebx)
return 0;
10e577: 31 c0 xor %eax,%eax
}
return errno;
}
10e579: 83 c4 18 add $0x18,%esp
10e57c: 5b pop %ebx
10e57d: c3 ret
10e57e: 66 90 xchg %ax,%ax
if ( sig )
*sig = status;
return 0;
}
return errno;
10e580: e8 9b 88 00 00 call 116e20 <__errno>
10e585: 8b 00 mov (%eax),%eax
}
10e587: 83 c4 18 add $0x18,%esp
10e58a: 5b pop %ebx
10e58b: c3 ret
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10e58c: 31 c0 xor %eax,%eax
}
return errno;
}
10e58e: 83 c4 18 add $0x18,%esp <== NOT EXECUTED
10e591: 5b pop %ebx <== NOT EXECUTED
10e592: c3 ret <== NOT EXECUTED
0010b2d0 <sysconf>:
*/
long sysconf(
int name
)
{
10b2d0: 83 ec 0c sub $0xc,%esp
10b2d3: 8b 4c 24 10 mov 0x10(%esp),%ecx
if ( name == _SC_CLK_TCK )
10b2d7: 83 f9 02 cmp $0x2,%ecx
10b2da: 74 38 je 10b314 <sysconf+0x44>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10b2dc: 83 f9 04 cmp $0x4,%ecx
10b2df: 74 47 je 10b328 <sysconf+0x58>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b2e1: 83 f9 33 cmp $0x33,%ecx
10b2e4: 74 22 je 10b308 <sysconf+0x38>
return 1024;
if ( name == _SC_PAGESIZE )
10b2e6: 83 f9 08 cmp $0x8,%ecx
10b2e9: 74 49 je 10b334 <sysconf+0x64>
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
10b2eb: b8 20 00 00 00 mov $0x20,%eax
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
10b2f0: 83 f9 4f cmp $0x4f,%ecx
10b2f3: 74 18 je 10b30d <sysconf+0x3d> <== NEVER TAKEN
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b2f5: e8 5a 8c 00 00 call 113f54 <__errno>
10b2fa: c7 00 16 00 00 00 movl $0x16,(%eax)
10b300: b8 ff ff ff ff mov $0xffffffff,%eax
10b305: eb 06 jmp 10b30d <sysconf+0x3d>
10b307: 90 nop
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
10b308: b8 00 04 00 00 mov $0x400,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b30d: 83 c4 0c add $0xc,%esp
10b310: c3 ret
10b311: 8d 76 00 lea 0x0(%esi),%esi
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
10b314: b8 40 42 0f 00 mov $0xf4240,%eax
10b319: 31 d2 xor %edx,%edx
10b31b: f7 35 f0 dd 12 00 divl 0x12ddf0
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b321: 83 c4 0c add $0xc,%esp
10b324: c3 ret
10b325: 8d 76 00 lea 0x0(%esi),%esi
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
10b328: a1 60 df 12 00 mov 0x12df60,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b32d: 83 c4 0c add $0xc,%esp
10b330: c3 ret
10b331: 8d 76 00 lea 0x0(%esi),%esi
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
10b334: b8 00 10 00 00 mov $0x1000,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b339: 83 c4 0c add $0xc,%esp
10b33c: c3 ret
0010c7ec <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10c7ec: 56 push %esi
10c7ed: 53 push %ebx
10c7ee: 83 ec 14 sub $0x14,%esp
10c7f1: 8b 5c 24 24 mov 0x24(%esp),%ebx
10c7f5: 8b 74 24 28 mov 0x28(%esp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10c7f9: 83 7c 24 20 01 cmpl $0x1,0x20(%esp)
10c7fe: 0f 85 dc 00 00 00 jne 10c8e0 <timer_create+0xf4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10c804: 85 f6 test %esi,%esi
10c806: 0f 84 d4 00 00 00 je 10c8e0 <timer_create+0xf4>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10c80c: 85 db test %ebx,%ebx
10c80e: 74 21 je 10c831 <timer_create+0x45>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10c810: 8b 03 mov (%ebx),%eax
10c812: 48 dec %eax
10c813: 83 f8 01 cmp $0x1,%eax
10c816: 0f 87 c4 00 00 00 ja 10c8e0 <timer_create+0xf4> <== 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 )
10c81c: 8b 43 04 mov 0x4(%ebx),%eax
10c81f: 85 c0 test %eax,%eax
10c821: 0f 84 b9 00 00 00 je 10c8e0 <timer_create+0xf4> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10c827: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10c828: 83 f8 1f cmp $0x1f,%eax
10c82b: 0f 87 af 00 00 00 ja 10c8e0 <timer_create+0xf4> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
10c831: a1 64 60 13 00 mov 0x136064,%eax
10c836: 40 inc %eax
10c837: a3 64 60 13 00 mov %eax,0x136064
return _Thread_Dispatch_disable_level;
10c83c: a1 64 60 13 00 mov 0x136064,%eax
* 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 );
10c841: c7 04 24 c0 63 13 00 movl $0x1363c0,(%esp)
10c848: e8 8f 20 00 00 call 10e8dc <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10c84d: 85 c0 test %eax,%eax
10c84f: 0f 84 a1 00 00 00 je 10c8f6 <timer_create+0x10a>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
10c855: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10c859: 8b 15 2c 66 13 00 mov 0x13662c,%edx
10c85f: 8b 52 08 mov 0x8(%edx),%edx
10c862: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10c865: 85 db test %ebx,%ebx
10c867: 74 11 je 10c87a <timer_create+0x8e>
ptimer->inf.sigev_notify = evp->sigev_notify;
10c869: 8b 13 mov (%ebx),%edx
10c86b: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10c86e: 8b 53 04 mov 0x4(%ebx),%edx
10c871: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10c874: 8b 53 08 mov 0x8(%ebx),%edx
10c877: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10c87a: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10c881: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10c888: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10c88f: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10c896: 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;
10c89d: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c8a4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c8ab: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c8b2: 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 ),
10c8b9: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c8bc: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c8bf: 8b 0d dc 63 13 00 mov 0x1363dc,%ecx
10c8c5: 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;
10c8c8: 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;
10c8cf: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c8d1: e8 e2 31 00 00 call 10fab8 <_Thread_Enable_dispatch>
return 0;
10c8d6: 31 c0 xor %eax,%eax
}
10c8d8: 83 c4 14 add $0x14,%esp
10c8db: 5b pop %ebx
10c8dc: 5e pop %esi
10c8dd: c3 ret
10c8de: 66 90 xchg %ax,%ax
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
10c8e0: e8 2b 91 00 00 call 115a10 <__errno>
10c8e5: c7 00 16 00 00 00 movl $0x16,(%eax)
10c8eb: b8 ff ff ff ff mov $0xffffffff,%eax
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c8f0: 83 c4 14 add $0x14,%esp
10c8f3: 5b pop %ebx
10c8f4: 5e pop %esi
10c8f5: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10c8f6: e8 bd 31 00 00 call 10fab8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10c8fb: e8 10 91 00 00 call 115a10 <__errno>
10c900: c7 00 0b 00 00 00 movl $0xb,(%eax)
10c906: b8 ff ff ff ff mov $0xffffffff,%eax
10c90b: eb cb jmp 10c8d8 <timer_create+0xec>
0010b4e4 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b4e4: 55 push %ebp
10b4e5: 57 push %edi
10b4e6: 56 push %esi
10b4e7: 53 push %ebx
10b4e8: 83 ec 6c sub $0x6c,%esp
10b4eb: 8b 9c 24 84 00 00 00 mov 0x84(%esp),%ebx
10b4f2: 8b ac 24 88 00 00 00 mov 0x88(%esp),%ebp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b4f9: 85 ed test %ebp,%ebp
10b4fb: 0f 84 ef 01 00 00 je 10b6f0 <timer_settime+0x20c> <== 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) ) ) {
10b501: 8d 45 08 lea 0x8(%ebp),%eax
10b504: 89 04 24 mov %eax,(%esp)
10b507: e8 c4 38 00 00 call 10edd0 <_Timespec_Is_valid>
10b50c: 84 c0 test %al,%al
10b50e: 0f 84 dc 01 00 00 je 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
10b514: 89 2c 24 mov %ebp,(%esp)
10b517: e8 b4 38 00 00 call 10edd0 <_Timespec_Is_valid>
10b51c: 84 c0 test %al,%al
10b51e: 0f 84 cc 01 00 00 je 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10b524: 83 fb 04 cmp $0x4,%ebx
10b527: 0f 84 2f 01 00 00 je 10b65c <timer_settime+0x178>
10b52d: 85 db test %ebx,%ebx
10b52f: 0f 85 bb 01 00 00 jne 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b535: 8d 44 24 50 lea 0x50(%esp),%eax
10b539: 89 44 24 2c mov %eax,0x2c(%esp)
10b53d: b9 04 00 00 00 mov $0x4,%ecx
10b542: 89 c7 mov %eax,%edi
10b544: 89 ee mov %ebp,%esi
10b546: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* 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 );
10b548: 8d 44 24 3c lea 0x3c(%esp),%eax
10b54c: 89 44 24 08 mov %eax,0x8(%esp)
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10b550: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax
10b557: 89 44 24 04 mov %eax,0x4(%esp)
10b55b: c7 04 24 e0 2f 13 00 movl $0x132fe0,(%esp)
10b562: e8 69 22 00 00 call 10d7d0 <_Objects_Get>
10b567: 89 c3 mov %eax,%ebx
switch ( location ) {
10b569: 8b 44 24 3c mov 0x3c(%esp),%eax
10b56d: 85 c0 test %eax,%eax
10b56f: 0f 85 7b 01 00 00 jne 10b6f0 <timer_settime+0x20c> <== NEVER TAKEN
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 ) {
10b575: 8b 7c 24 58 mov 0x58(%esp),%edi
10b579: 85 ff test %edi,%edi
10b57b: 75 0c jne 10b589 <timer_settime+0xa5>
10b57d: 8b 74 24 5c mov 0x5c(%esp),%esi
10b581: 85 f6 test %esi,%esi
10b583: 0f 84 7f 01 00 00 je 10b708 <timer_settime+0x224>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b589: 89 2c 24 mov %ebp,(%esp)
10b58c: e8 c3 38 00 00 call 10ee54 <_Timespec_To_ticks>
10b591: 89 43 64 mov %eax,0x64(%ebx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b594: 8d 44 24 58 lea 0x58(%esp),%eax
10b598: 89 04 24 mov %eax,(%esp)
10b59b: e8 b4 38 00 00 call 10ee54 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b5a0: 89 5c 24 10 mov %ebx,0x10(%esp)
10b5a4: c7 44 24 0c 54 b7 10 movl $0x10b754,0xc(%esp)
10b5ab: 00
10b5ac: 8b 53 08 mov 0x8(%ebx),%edx
10b5af: 89 54 24 08 mov %edx,0x8(%esp)
10b5b3: 89 44 24 04 mov %eax,0x4(%esp)
10b5b7: 8d 43 10 lea 0x10(%ebx),%eax
10b5ba: 89 04 24 mov %eax,(%esp)
10b5bd: e8 fe 5e 00 00 call 1114c0 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b5c2: 84 c0 test %al,%al
10b5c4: 0f 84 81 00 00 00 je 10b64b <timer_settime+0x167>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
10b5ca: 8d 43 54 lea 0x54(%ebx),%eax
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b5cd: 8b 94 24 8c 00 00 00 mov 0x8c(%esp),%edx
10b5d4: 85 d2 test %edx,%edx
10b5d6: 74 10 je 10b5e8 <timer_settime+0x104>
*ovalue = ptimer->timer_data;
10b5d8: b9 04 00 00 00 mov $0x4,%ecx
10b5dd: 8b bc 24 8c 00 00 00 mov 0x8c(%esp),%edi
10b5e4: 89 c6 mov %eax,%esi
10b5e6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b5e8: b9 04 00 00 00 mov $0x4,%ecx
10b5ed: 89 c7 mov %eax,%edi
10b5ef: 8b 74 24 2c mov 0x2c(%esp),%esi
10b5f3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b5f5: c6 43 3c 03 movb $0x3,0x3c(%ebx)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b5f9: 8d 44 24 40 lea 0x40(%esp),%eax
10b5fd: 89 04 24 mov %eax,(%esp)
10b600: e8 5b 18 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b605: 8b 74 24 40 mov 0x40(%esp),%esi
10b609: 8b 7c 24 44 mov 0x44(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b60d: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b614: 3b
10b615: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b61c: 00
10b61d: 89 34 24 mov %esi,(%esp)
10b620: 89 7c 24 04 mov %edi,0x4(%esp)
10b624: e8 9b 53 01 00 call 1209c4 <__divdi3>
10b629: 89 43 6c mov %eax,0x6c(%ebx)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b62c: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b633: 3b
10b634: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b63b: 00
10b63c: 89 34 24 mov %esi,(%esp)
10b63f: 89 7c 24 04 mov %edi,0x4(%esp)
10b643: e8 d0 54 01 00 call 120b18 <__moddi3>
10b648: 89 43 70 mov %eax,0x70(%ebx)
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
10b64b: e8 c4 2d 00 00 call 10e414 <_Thread_Enable_dispatch>
return 0;
10b650: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b652: 83 c4 6c add $0x6c,%esp
10b655: 5b pop %ebx
10b656: 5e pop %esi
10b657: 5f pop %edi
10b658: 5d pop %ebp
10b659: c3 ret
10b65a: 66 90 xchg %ax,%ax
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b65c: 8d 44 24 50 lea 0x50(%esp),%eax
10b660: 89 44 24 2c mov %eax,0x2c(%esp)
10b664: 89 c7 mov %eax,%edi
10b666: 89 ee mov %ebp,%esi
10b668: 89 d9 mov %ebx,%ecx
10b66a: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
10b66c: 8d 44 24 40 lea 0x40(%esp),%eax
10b670: 89 04 24 mov %eax,(%esp)
10b673: e8 e8 17 00 00 call 10ce60 <_TOD_Get_as_timestamp>
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
10b678: 8b 74 24 40 mov 0x40(%esp),%esi
10b67c: 8b 7c 24 44 mov 0x44(%esp),%edi
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
10b680: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b687: 3b
10b688: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b68f: 00
10b690: 89 34 24 mov %esi,(%esp)
10b693: 89 7c 24 04 mov %edi,0x4(%esp)
10b697: e8 28 53 01 00 call 1209c4 <__divdi3>
10b69c: 89 44 24 48 mov %eax,0x48(%esp)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
10b6a0: c7 44 24 08 00 ca 9a movl $0x3b9aca00,0x8(%esp)
10b6a7: 3b
10b6a8: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
10b6af: 00
10b6b0: 89 34 24 mov %esi,(%esp)
10b6b3: 89 7c 24 04 mov %edi,0x4(%esp)
10b6b7: e8 5c 54 01 00 call 120b18 <__moddi3>
10b6bc: 89 44 24 4c mov %eax,0x4c(%esp)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10b6c0: 8d 74 24 48 lea 0x48(%esp),%esi
10b6c4: 89 74 24 04 mov %esi,0x4(%esp)
10b6c8: 8d 5c 24 58 lea 0x58(%esp),%ebx
10b6cc: 89 1c 24 mov %ebx,(%esp)
10b6cf: e8 20 37 00 00 call 10edf4 <_Timespec_Less_than>
10b6d4: 84 c0 test %al,%al
10b6d6: 75 18 jne 10b6f0 <timer_settime+0x20c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10b6d8: 89 5c 24 08 mov %ebx,0x8(%esp)
10b6dc: 89 5c 24 04 mov %ebx,0x4(%esp)
10b6e0: 89 34 24 mov %esi,(%esp)
10b6e3: e8 30 37 00 00 call 10ee18 <_Timespec_Subtract>
10b6e8: e9 5b fe ff ff jmp 10b548 <timer_settime+0x64>
10b6ed: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b6f0: e8 b7 8d 00 00 call 1144ac <__errno>
10b6f5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b6fb: b8 ff ff ff ff mov $0xffffffff,%eax
10b700: e9 4d ff ff ff jmp 10b652 <timer_settime+0x16e>
10b705: 8d 76 00 lea 0x0(%esi),%esi
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 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
10b708: 8d 43 10 lea 0x10(%ebx),%eax
10b70b: 89 04 24 mov %eax,(%esp)
10b70e: e8 01 3b 00 00 call 10f214 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
10b713: 8d 43 54 lea 0x54(%ebx),%eax
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
10b716: 8b 8c 24 8c 00 00 00 mov 0x8c(%esp),%ecx
10b71d: 85 c9 test %ecx,%ecx
10b71f: 74 10 je 10b731 <timer_settime+0x24d>
*ovalue = ptimer->timer_data;
10b721: b9 04 00 00 00 mov $0x4,%ecx
10b726: 8b bc 24 8c 00 00 00 mov 0x8c(%esp),%edi
10b72d: 89 c6 mov %eax,%esi
10b72f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10b731: b9 04 00 00 00 mov $0x4,%ecx
10b736: 89 c7 mov %eax,%edi
10b738: 8b 74 24 2c mov 0x2c(%esp),%esi
10b73c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b73e: c6 43 3c 04 movb $0x4,0x3c(%ebx)
/* Returns with success */
_Thread_Enable_dispatch();
10b742: e8 cd 2c 00 00 call 10e414 <_Thread_Enable_dispatch>
return 0;
10b747: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b749: 83 c4 6c add $0x6c,%esp
10b74c: 5b pop %ebx
10b74d: 5e pop %esi
10b74e: 5f pop %edi
10b74f: 5d pop %ebp
10b750: c3 ret
0010b5f4 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b5f4: 56 push %esi
10b5f5: 53 push %ebx
10b5f6: 83 ec 34 sub $0x34,%esp
10b5f9: 8b 5c 24 40 mov 0x40(%esp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b5fd: a1 bc 45 13 00 mov 0x1345bc,%eax
10b602: 85 c0 test %eax,%eax
10b604: 0f 84 8a 00 00 00 je 10b694 <ualarm+0xa0>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b60a: c7 04 24 a0 45 13 00 movl $0x1345a0,(%esp)
10b611: e8 16 3a 00 00 call 10f02c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b616: 83 e8 02 sub $0x2,%eax
10b619: 83 f8 01 cmp $0x1,%eax
10b61c: 0f 86 a2 00 00 00 jbe 10b6c4 <ualarm+0xd0> <== ALWAYS TAKEN
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b622: 31 f6 xor %esi,%esi
/*
* 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 ) {
10b624: 85 db test %ebx,%ebx
10b626: 74 64 je 10b68c <ualarm+0x98>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10b628: ba 83 de 1b 43 mov $0x431bde83,%edx
10b62d: 89 d8 mov %ebx,%eax
10b62f: f7 e2 mul %edx
10b631: c1 ea 12 shr $0x12,%edx
10b634: 89 54 24 28 mov %edx,0x28(%esp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10b638: 8d 04 92 lea (%edx,%edx,4),%eax
10b63b: 8d 04 80 lea (%eax,%eax,4),%eax
10b63e: 8d 04 80 lea (%eax,%eax,4),%eax
10b641: 8d 04 80 lea (%eax,%eax,4),%eax
10b644: 8d 04 80 lea (%eax,%eax,4),%eax
10b647: 8d 04 80 lea (%eax,%eax,4),%eax
10b64a: c1 e0 06 shl $0x6,%eax
10b64d: 29 c3 sub %eax,%ebx
10b64f: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b652: 8d 04 80 lea (%eax,%eax,4),%eax
10b655: 8d 04 80 lea (%eax,%eax,4),%eax
10b658: c1 e0 03 shl $0x3,%eax
10b65b: 89 44 24 2c mov %eax,0x2c(%esp)
ticks = _Timespec_To_ticks( &tp );
10b65f: 8d 5c 24 28 lea 0x28(%esp),%ebx
10b663: 89 1c 24 mov %ebx,(%esp)
10b666: e8 91 35 00 00 call 10ebfc <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10b66b: 89 1c 24 mov %ebx,(%esp)
10b66e: e8 89 35 00 00 call 10ebfc <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b673: a3 ac 45 13 00 mov %eax,0x1345ac
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b678: c7 44 24 04 a0 45 13 movl $0x1345a0,0x4(%esp)
10b67f: 00
10b680: c7 04 24 a8 3c 13 00 movl $0x133ca8,(%esp)
10b687: e8 84 38 00 00 call 10ef10 <_Watchdog_Insert>
}
return remaining;
}
10b68c: 89 f0 mov %esi,%eax
10b68e: 83 c4 34 add $0x34,%esp
10b691: 5b pop %ebx
10b692: 5e pop %esi
10b693: c3 ret
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b694: c7 05 a8 45 13 00 00 movl $0x0,0x1345a8
10b69b: 00 00 00
the_watchdog->routine = routine;
10b69e: c7 05 bc 45 13 00 b8 movl $0x10b5b8,0x1345bc
10b6a5: b5 10 00
the_watchdog->id = id;
10b6a8: c7 05 c0 45 13 00 00 movl $0x0,0x1345c0
10b6af: 00 00 00
the_watchdog->user_data = user_data;
10b6b2: c7 05 c4 45 13 00 00 movl $0x0,0x1345c4
10b6b9: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b6bc: 31 f6 xor %esi,%esi
10b6be: e9 61 ff ff ff jmp 10b624 <ualarm+0x30>
10b6c3: 90 nop
* 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);
10b6c4: a1 b4 45 13 00 mov 0x1345b4,%eax
10b6c9: 03 05 ac 45 13 00 add 0x1345ac,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b6cf: 8d 54 24 28 lea 0x28(%esp),%edx
10b6d3: 89 54 24 04 mov %edx,0x4(%esp)
* 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);
10b6d7: 2b 05 b8 45 13 00 sub 0x1345b8,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b6dd: 89 04 24 mov %eax,(%esp)
10b6e0: e8 cf 34 00 00 call 10ebb4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10b6e5: 8b 44 24 28 mov 0x28(%esp),%eax
10b6e9: 8d 04 80 lea (%eax,%eax,4),%eax
10b6ec: 8d 04 80 lea (%eax,%eax,4),%eax
10b6ef: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f2: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f5: 8d 04 80 lea (%eax,%eax,4),%eax
10b6f8: 8d 34 80 lea (%eax,%eax,4),%esi
10b6fb: c1 e6 06 shl $0x6,%esi
remaining += tp.tv_nsec / 1000;
10b6fe: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10b703: 8b 44 24 2c mov 0x2c(%esp),%eax
10b707: f7 e9 imul %ecx
10b709: 89 44 24 18 mov %eax,0x18(%esp)
10b70d: 89 54 24 1c mov %edx,0x1c(%esp)
10b711: 8b 4c 24 1c mov 0x1c(%esp),%ecx
10b715: c1 f9 06 sar $0x6,%ecx
10b718: 8b 44 24 2c mov 0x2c(%esp),%eax
10b71c: 99 cltd
10b71d: 29 d1 sub %edx,%ecx
10b71f: 01 ce add %ecx,%esi
10b721: e9 fe fe ff ff jmp 10b624 <ualarm+0x30>