RTEMS 4.10Annotated Report
Tue Feb 8 22:19:02 2011
0010c474 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10c474: 55 push %ebp
10c475: 89 e5 mov %esp,%ebp
10c477: 53 push %ebx
10c478: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c47b: 8b 1d 18 97 12 00 mov 0x129718,%ebx
10c481: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx
10c487: 74 10 je 10c499 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10c489: 8d 76 00 lea 0x0(%esi),%esi
* 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)();
10c48c: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c48f: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c491: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx
10c497: 75 f3 jne 10c48c <_API_extensions_Run_postdriver+0x18>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10c499: 58 pop %eax
10c49a: 5b pop %ebx
10c49b: c9 leave
10c49c: c3 ret
0010c4a0 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10c4a0: 55 push %ebp
10c4a1: 89 e5 mov %esp,%ebp
10c4a3: 53 push %ebx
10c4a4: 83 ec 04 sub $0x4,%esp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c4a7: 8b 1d 18 97 12 00 mov 0x129718,%ebx
10c4ad: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx
10c4b3: 74 1c je 10c4d1 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10c4b5: 8d 76 00 lea 0x0(%esi),%esi
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
10c4b8: 83 ec 0c sub $0xc,%esp
10c4bb: ff 35 78 95 12 00 pushl 0x129578
10c4c1: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10c4c4: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
10c4c6: 83 c4 10 add $0x10,%esp
10c4c9: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx
10c4cf: 75 e7 jne 10c4b8 <_API_extensions_Run_postswitch+0x18>
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10c4d1: 8b 5d fc mov -0x4(%ebp),%ebx
10c4d4: c9 leave
10c4d5: c3 ret
0010e760 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e760: 55 push %ebp
10e761: 89 e5 mov %esp,%ebp
10e763: 57 push %edi
10e764: 56 push %esi
10e765: 53 push %ebx
10e766: 83 ec 1c sub $0x1c,%esp
10e769: 8b 5d 08 mov 0x8(%ebp),%ebx
10e76c: 8b 7d 0c mov 0xc(%ebp),%edi
10e76f: 8b 4d 14 mov 0x14(%ebp),%ecx
10e772: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e775: 8b 35 b8 c1 12 00 mov 0x12c1b8,%esi
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10e77b: 9c pushf
10e77c: fa cli
10e77d: 8f 45 e4 popl -0x1c(%ebp)
switch ( the_rwlock->current_state ) {
10e780: 8b 43 44 mov 0x44(%ebx),%eax
10e783: 85 c0 test %eax,%eax
10e785: 75 1d jne 10e7a4 <_CORE_RWLock_Obtain_for_reading+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e787: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10e78e: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e791: ff 75 e4 pushl -0x1c(%ebp)
10e794: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e795: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e79c: 8d 65 f4 lea -0xc(%ebp),%esp
10e79f: 5b pop %ebx
10e7a0: 5e pop %esi
10e7a1: 5f pop %edi
10e7a2: c9 leave
10e7a3: c3 ret
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
10e7a4: 48 dec %eax
10e7a5: 74 51 je 10e7f8 <_CORE_RWLock_Obtain_for_reading+0x98>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e7a7: 84 d2 test %dl,%dl
10e7a9: 75 15 jne 10e7c0 <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Enable( level );
10e7ab: ff 75 e4 pushl -0x1c(%ebp)
10e7ae: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e7af: c7 46 34 02 00 00 00 movl $0x2,0x34(%esi)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e7b6: 8d 65 f4 lea -0xc(%ebp),%esp
10e7b9: 5b pop %ebx
10e7ba: 5e pop %esi
10e7bb: 5f pop %edi
10e7bc: c9 leave
10e7bd: c3 ret
10e7be: 66 90 xchg %ax,%ax
10e7c0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
10e7c7: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10e7ca: 89 7e 20 mov %edi,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10e7cd: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e7d4: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10e7db: ff 75 e4 pushl -0x1c(%ebp)
10e7de: 9d popf
_Thread_queue_Enqueue_with_handler(
10e7df: c7 45 10 64 e9 10 00 movl $0x10e964,0x10(%ebp)
10e7e6: 89 4d 0c mov %ecx,0xc(%ebp)
10e7e9: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e7ec: 8d 65 f4 lea -0xc(%ebp),%esp
10e7ef: 5b pop %ebx
10e7f0: 5e pop %esi
10e7f1: 5f pop %edi
10e7f2: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10e7f3: e9 74 19 00 00 jmp 11016c <_Thread_queue_Enqueue_with_handler>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
10e7f8: 83 ec 0c sub $0xc,%esp
10e7fb: 53 push %ebx
10e7fc: 88 55 e0 mov %dl,-0x20(%ebp)
10e7ff: 89 4d dc mov %ecx,-0x24(%ebp)
10e802: e8 85 1c 00 00 call 11048c <_Thread_queue_First>
if ( !waiter ) {
10e807: 83 c4 10 add $0x10,%esp
10e80a: 85 c0 test %eax,%eax
10e80c: 8a 55 e0 mov -0x20(%ebp),%dl
10e80f: 8b 4d dc mov -0x24(%ebp),%ecx
10e812: 75 93 jne 10e7a7 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
10e814: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e817: ff 75 e4 pushl -0x1c(%ebp)
10e81a: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e81b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10e822: e9 75 ff ff ff jmp 10e79c <_CORE_RWLock_Obtain_for_reading+0x3c>
0010e828 <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e828: 55 push %ebp
10e829: 89 e5 mov %esp,%ebp
10e82b: 57 push %edi
10e82c: 56 push %esi
10e82d: 53 push %ebx
10e82e: 83 ec 0c sub $0xc,%esp
10e831: 8b 45 08 mov 0x8(%ebp),%eax
10e834: 8b 7d 0c mov 0xc(%ebp),%edi
10e837: 8b 75 14 mov 0x14(%ebp),%esi
10e83a: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e83d: 8b 15 b8 c1 12 00 mov 0x12c1b8,%edx
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
10e843: 9c pushf
10e844: fa cli
10e845: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10e846: 83 78 44 00 cmpl $0x0,0x44(%eax)
10e84a: 75 18 jne 10e864 <_CORE_RWLock_Obtain_for_writing+0x3c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e84c: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10e853: 51 push %ecx
10e854: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e855: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e85c: 83 c4 0c add $0xc,%esp
10e85f: 5b pop %ebx
10e860: 5e pop %esi
10e861: 5f pop %edi
10e862: c9 leave
10e863: c3 ret
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e864: 84 db test %bl,%bl
10e866: 75 14 jne 10e87c <_CORE_RWLock_Obtain_for_writing+0x54>
_ISR_Enable( level );
10e868: 51 push %ecx
10e869: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e86a: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e871: 83 c4 0c add $0xc,%esp
10e874: 5b pop %ebx
10e875: 5e pop %esi
10e876: 5f pop %edi
10e877: c9 leave
10e878: c3 ret
10e879: 8d 76 00 lea 0x0(%esi),%esi
10e87c: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
10e883: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10e886: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10e889: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e890: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10e897: 51 push %ecx
10e898: 9d popf
_Thread_queue_Enqueue_with_handler(
10e899: c7 45 10 64 e9 10 00 movl $0x10e964,0x10(%ebp)
10e8a0: 89 75 0c mov %esi,0xc(%ebp)
10e8a3: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e8a6: 83 c4 0c add $0xc,%esp
10e8a9: 5b pop %ebx
10e8aa: 5e pop %esi
10e8ab: 5f pop %edi
10e8ac: c9 leave
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
10e8ad: e9 ba 18 00 00 jmp 11016c <_Thread_queue_Enqueue_with_handler>
0010e8b4 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e8b4: 55 push %ebp
10e8b5: 89 e5 mov %esp,%ebp
10e8b7: 53 push %ebx
10e8b8: 83 ec 04 sub $0x4,%esp
10e8bb: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e8be: 8b 0d b8 c1 12 00 mov 0x12c1b8,%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 );
10e8c4: 9c pushf
10e8c5: fa cli
10e8c6: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e8c7: 8b 43 44 mov 0x44(%ebx),%eax
10e8ca: 85 c0 test %eax,%eax
10e8cc: 74 7a je 10e948 <_CORE_RWLock_Release+0x94>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
10e8ce: 48 dec %eax
10e8cf: 74 63 je 10e934 <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e8d1: 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;
10e8d8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e8df: 52 push %edx
10e8e0: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e8e1: 83 ec 0c sub $0xc,%esp
10e8e4: 53 push %ebx
10e8e5: e8 66 17 00 00 call 110050 <_Thread_queue_Dequeue>
if ( next ) {
10e8ea: 83 c4 10 add $0x10,%esp
10e8ed: 85 c0 test %eax,%eax
10e8ef: 74 39 je 10e92a <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10e8f1: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e8f5: 74 61 je 10e958 <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10e8f7: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e8fa: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10e901: eb 17 jmp 10e91a <_CORE_RWLock_Release+0x66>
10e903: 90 nop
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
10e904: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e908: 74 20 je 10e92a <_CORE_RWLock_Release+0x76><== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
10e90a: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10e90d: 83 ec 08 sub $0x8,%esp
10e910: 50 push %eax
10e911: 53 push %ebx
10e912: e8 5d 1a 00 00 call 110374 <_Thread_queue_Extract>
}
10e917: 83 c4 10 add $0x10,%esp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
10e91a: 83 ec 0c sub $0xc,%esp
10e91d: 53 push %ebx
10e91e: e8 69 1b 00 00 call 11048c <_Thread_queue_First>
if ( !next ||
10e923: 83 c4 10 add $0x10,%esp
10e926: 85 c0 test %eax,%eax
10e928: 75 da jne 10e904 <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e92a: 31 c0 xor %eax,%eax
10e92c: 8b 5d fc mov -0x4(%ebp),%ebx
10e92f: c9 leave
10e930: c3 ret
10e931: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Enable( level );
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;
10e934: 8b 43 48 mov 0x48(%ebx),%eax
10e937: 48 dec %eax
10e938: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10e93b: 85 c0 test %eax,%eax
10e93d: 74 92 je 10e8d1 <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10e93f: 52 push %edx
10e940: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e941: 31 c0 xor %eax,%eax
10e943: 8b 5d fc mov -0x4(%ebp),%ebx
10e946: c9 leave
10e947: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10e948: 52 push %edx
10e949: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e94a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e951: 31 c0 xor %eax,%eax
10e953: 8b 5d fc mov -0x4(%ebp),%ebx
10e956: c9 leave
10e957: 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;
10e958: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10e95f: eb c9 jmp 10e92a <_CORE_RWLock_Release+0x76>
0010e964 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10e964: 55 push %ebp
10e965: 89 e5 mov %esp,%ebp
10e967: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e96a: 8d 45 f4 lea -0xc(%ebp),%eax
10e96d: 50 push %eax
10e96e: ff 75 08 pushl 0x8(%ebp)
10e971: e8 e2 12 00 00 call 10fc58 <_Thread_Get>
switch ( location ) {
10e976: 83 c4 10 add $0x10,%esp
10e979: 8b 55 f4 mov -0xc(%ebp),%edx
10e97c: 85 d2 test %edx,%edx
10e97e: 75 17 jne 10e997 <_CORE_RWLock_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e980: 83 ec 0c sub $0xc,%esp
10e983: 50 push %eax
10e984: e8 d3 1b 00 00 call 11055c <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e989: a1 f8 c0 12 00 mov 0x12c0f8,%eax
10e98e: 48 dec %eax
10e98f: a3 f8 c0 12 00 mov %eax,0x12c0f8
10e994: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e997: c9 leave
10e998: c3 ret
0011a1bc <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
11a1bc: 55 push %ebp
11a1bd: 89 e5 mov %esp,%ebp
11a1bf: 57 push %edi
11a1c0: 56 push %esi
11a1c1: 53 push %ebx
11a1c2: 83 ec 1c sub $0x1c,%esp
11a1c5: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11a1c8: 8b 45 10 mov 0x10(%ebp),%eax
11a1cb: 39 43 4c cmp %eax,0x4c(%ebx)
11a1ce: 72 60 jb 11a230 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
11a1d0: 8b 43 48 mov 0x48(%ebx),%eax
11a1d3: 85 c0 test %eax,%eax
11a1d5: 75 45 jne 11a21c <_CORE_message_queue_Broadcast+0x60>
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
11a1d7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
11a1de: eb 18 jmp 11a1f8 <_CORE_message_queue_Broadcast+0x3c>
waitp = &the_thread->Wait;
number_broadcasted += 1;
11a1e0: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11a1e3: 8b 42 2c mov 0x2c(%edx),%eax
11a1e6: 89 c7 mov %eax,%edi
11a1e8: 8b 75 0c mov 0xc(%ebp),%esi
11a1eb: 8b 4d 10 mov 0x10(%ebp),%ecx
11a1ee: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
11a1f0: 8b 42 28 mov 0x28(%edx),%eax
11a1f3: 8b 55 10 mov 0x10(%ebp),%edx
11a1f6: 89 10 mov %edx,(%eax)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
11a1f8: 83 ec 0c sub $0xc,%esp
11a1fb: 53 push %ebx
11a1fc: e8 03 25 00 00 call 11c704 <_Thread_queue_Dequeue>
11a201: 89 c2 mov %eax,%edx
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
11a203: 83 c4 10 add $0x10,%esp
11a206: 85 c0 test %eax,%eax
11a208: 75 d6 jne 11a1e0 <_CORE_message_queue_Broadcast+0x24>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11a20a: 8b 55 e4 mov -0x1c(%ebp),%edx
11a20d: 8b 45 1c mov 0x1c(%ebp),%eax
11a210: 89 10 mov %edx,(%eax)
11a212: 31 c0 xor %eax,%eax
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a214: 8d 65 f4 lea -0xc(%ebp),%esp
11a217: 5b pop %ebx
11a218: 5e pop %esi
11a219: 5f pop %edi
11a21a: c9 leave
11a21b: c3 ret
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
11a21c: 8b 55 1c mov 0x1c(%ebp),%edx
11a21f: c7 02 00 00 00 00 movl $0x0,(%edx)
11a225: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a227: 8d 65 f4 lea -0xc(%ebp),%esp
11a22a: 5b pop %ebx
11a22b: 5e pop %esi
11a22c: 5f pop %edi
11a22d: c9 leave
11a22e: c3 ret
11a22f: 90 nop
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11a230: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11a235: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11a238: 5b pop %ebx <== NOT EXECUTED
11a239: 5e pop %esi <== NOT EXECUTED
11a23a: 5f pop %edi <== NOT EXECUTED
11a23b: c9 leave <== NOT EXECUTED
11a23c: c3 ret <== NOT EXECUTED
00115314 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
115314: 55 push %ebp
115315: 89 e5 mov %esp,%ebp
115317: 57 push %edi
115318: 56 push %esi
115319: 53 push %ebx
11531a: 83 ec 0c sub $0xc,%esp
11531d: 8b 5d 08 mov 0x8(%ebp),%ebx
115320: 8b 75 10 mov 0x10(%ebp),%esi
115323: 8b 45 14 mov 0x14(%ebp),%eax
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
115326: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
115329: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
115330: 89 43 4c mov %eax,0x4c(%ebx)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
115333: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
11533a: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
115341: a8 03 test $0x3,%al
115343: 75 1b jne 115360 <_CORE_message_queue_Initialize+0x4c>
115345: 89 c2 mov %eax,%edx
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
115347: 8d 7a 14 lea 0x14(%edx),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
11534a: 89 f8 mov %edi,%eax
11534c: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
11534f: 39 d0 cmp %edx,%eax
115351: 73 25 jae 115378 <_CORE_message_queue_Initialize+0x64><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
115353: 31 c0 xor %eax,%eax
}
115355: 8d 65 f4 lea -0xc(%ebp),%esp
115358: 5b pop %ebx
115359: 5e pop %esi
11535a: 5f pop %edi
11535b: c9 leave
11535c: c3 ret
11535d: 8d 76 00 lea 0x0(%esi),%esi
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
115360: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
115363: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
115366: 39 d0 cmp %edx,%eax
115368: 77 e9 ja 115353 <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
11536a: 8d 7a 14 lea 0x14(%edx),%edi
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
11536d: 89 f8 mov %edi,%eax
11536f: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
115372: 39 d0 cmp %edx,%eax
115374: 72 dd jb 115353 <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN
115376: 66 90 xchg %ax,%ax
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
115378: 83 ec 0c sub $0xc,%esp
11537b: 50 push %eax
11537c: e8 27 2a 00 00 call 117da8 <_Workspace_Allocate>
115381: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
115384: 83 c4 10 add $0x10,%esp
115387: 85 c0 test %eax,%eax
115389: 74 c8 je 115353 <_CORE_message_queue_Initialize+0x3f>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
11538b: 57 push %edi
11538c: 56 push %esi
11538d: 50 push %eax
11538e: 8d 43 68 lea 0x68(%ebx),%eax
115391: 50 push %eax
115392: e8 71 5b 00 00 call 11af08 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
115397: 8d 43 54 lea 0x54(%ebx),%eax
11539a: 89 43 50 mov %eax,0x50(%ebx)
the_chain->permanent_null = NULL;
11539d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
the_chain->last = _Chain_Head(the_chain);
1153a4: 8d 43 50 lea 0x50(%ebx),%eax
1153a7: 89 43 58 mov %eax,0x58(%ebx)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
1153aa: 6a 06 push $0x6
1153ac: 68 80 00 00 00 push $0x80
1153b1: 8b 45 0c mov 0xc(%ebp),%eax
1153b4: 83 38 01 cmpl $0x1,(%eax)
1153b7: 0f 94 c0 sete %al
1153ba: 0f b6 c0 movzbl %al,%eax
1153bd: 50 push %eax
1153be: 53 push %ebx
1153bf: e8 cc 1f 00 00 call 117390 <_Thread_queue_Initialize>
1153c4: b0 01 mov $0x1,%al
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
1153c6: 83 c4 20 add $0x20,%esp
}
1153c9: 8d 65 f4 lea -0xc(%ebp),%esp
1153cc: 5b pop %ebx
1153cd: 5e pop %esi
1153ce: 5f pop %edi
1153cf: c9 leave
1153d0: c3 ret
0011208c <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
11208c: 55 push %ebp
11208d: 89 e5 mov %esp,%ebp
11208f: 56 push %esi
112090: 53 push %ebx
112091: 8b 45 08 mov 0x8(%ebp),%eax
112094: 8b 55 0c mov 0xc(%ebp),%edx
112097: 8b 4d 10 mov 0x10(%ebp),%ecx
11209a: 89 4a 08 mov %ecx,0x8(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
11209d: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx
1120a3: 74 53 je 1120f8 <_CORE_message_queue_Insert_message+0x6c>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
1120a5: 81 f9 00 00 00 80 cmp $0x80000000,%ecx
1120ab: 74 6f je 11211c <_CORE_message_queue_Insert_message+0x90>
Chain_Control *the_header;
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
1120ad: 8b 58 50 mov 0x50(%eax),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1120b0: 8d 70 54 lea 0x54(%eax),%esi
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1120b3: 39 f3 cmp %esi,%ebx
1120b5: 74 05 je 1120bc <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
1120b7: 3b 4b 08 cmp 0x8(%ebx),%ecx
1120ba: 7d 2c jge 1120e8 <_CORE_message_queue_Insert_message+0x5c>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
1120bc: 9c pushf
1120bd: fa cli
1120be: 5e pop %esi
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1120bf: ff 40 48 incl 0x48(%eax)
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
1120c2: 8b 4b 04 mov 0x4(%ebx),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
1120c5: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
1120c8: 8b 19 mov (%ecx),%ebx
after_node->next = the_node;
1120ca: 89 11 mov %edx,(%ecx)
the_node->next = before_node;
1120cc: 89 1a mov %ebx,(%edx)
before_node->previous = the_node;
1120ce: 89 53 04 mov %edx,0x4(%ebx)
_ISR_Enable( level );
1120d1: 56 push %esi
1120d2: 9d popf
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
1120d3: 8b 50 60 mov 0x60(%eax),%edx
1120d6: 85 d2 test %edx,%edx
1120d8: 74 3d je 112117 <_CORE_message_queue_Insert_message+0x8b>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
1120da: 8b 40 64 mov 0x64(%eax),%eax
1120dd: 89 45 08 mov %eax,0x8(%ebp)
#endif
}
1120e0: 5b pop %ebx
1120e1: 5e pop %esi
1120e2: c9 leave
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
1120e3: ff e2 jmp *%edx
1120e5: 8d 76 00 lea 0x0(%esi),%esi
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
the_node = the_node->next;
1120e8: 8b 1b mov (%ebx),%ebx
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1120ea: 39 f3 cmp %esi,%ebx
1120ec: 74 ce je 1120bc <_CORE_message_queue_Insert_message+0x30>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
1120ee: 3b 4b 08 cmp 0x8(%ebx),%ecx
1120f1: 7c c9 jl 1120bc <_CORE_message_queue_Insert_message+0x30>
1120f3: eb f3 jmp 1120e8 <_CORE_message_queue_Insert_message+0x5c>
1120f5: 8d 76 00 lea 0x0(%esi),%esi
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
1120f8: 9c pushf
1120f9: fa cli
1120fa: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1120fb: ff 40 48 incl 0x48(%eax)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
1120fe: 8d 48 54 lea 0x54(%eax),%ecx
112101: 89 0a mov %ecx,(%edx)
old_last_node = the_chain->last;
112103: 8b 48 58 mov 0x58(%eax),%ecx
the_chain->last = the_node;
112106: 89 50 58 mov %edx,0x58(%eax)
old_last_node->next = the_node;
112109: 89 11 mov %edx,(%ecx)
the_node->previous = old_last_node;
11210b: 89 4a 04 mov %ecx,0x4(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
11210e: 53 push %ebx
11210f: 9d popf
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
112110: 8b 50 60 mov 0x60(%eax),%edx
112113: 85 d2 test %edx,%edx
112115: 75 c3 jne 1120da <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
112117: 5b pop %ebx
112118: 5e pop %esi
112119: c9 leave
11211a: c3 ret
11211b: 90 nop
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
11211c: 9c pushf
11211d: fa cli
11211e: 5b pop %ebx
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
11211f: ff 40 48 incl 0x48(%eax)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
112122: 8d 48 50 lea 0x50(%eax),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
112125: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
112128: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
11212b: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
11212e: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
112130: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
112133: 53 push %ebx
112134: 9d popf
112135: eb 9c jmp 1120d3 <_CORE_message_queue_Insert_message+0x47>
001153d4 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
1153d4: 55 push %ebp
1153d5: 89 e5 mov %esp,%ebp
1153d7: 57 push %edi
1153d8: 56 push %esi
1153d9: 53 push %ebx
1153da: 83 ec 2c sub $0x2c,%esp
1153dd: 8b 55 08 mov 0x8(%ebp),%edx
1153e0: 8b 45 0c mov 0xc(%ebp),%eax
1153e3: 89 45 dc mov %eax,-0x24(%ebp)
1153e6: 8b 4d 10 mov 0x10(%ebp),%ecx
1153e9: 89 4d e0 mov %ecx,-0x20(%ebp)
1153ec: 8b 45 14 mov 0x14(%ebp),%eax
1153ef: 8b 5d 1c mov 0x1c(%ebp),%ebx
1153f2: 89 5d d8 mov %ebx,-0x28(%ebp)
1153f5: 0f b6 7d 18 movzbl 0x18(%ebp),%edi
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
1153f9: 8b 0d d8 2d 13 00 mov 0x132dd8,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
1153ff: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
115406: 9c pushf
115407: fa cli
115408: 8f 45 e4 popl -0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11540b: 8b 5a 50 mov 0x50(%edx),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11540e: 8d 72 54 lea 0x54(%edx),%esi
115411: 39 f3 cmp %esi,%ebx
115413: 74 7b je 115490 <_CORE_message_queue_Seize+0xbc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
115415: 8b 0b mov (%ebx),%ecx
the_chain->first = new_first;
115417: 89 4a 50 mov %ecx,0x50(%edx)
new_first->previous = _Chain_Head(the_chain);
11541a: 8d 72 50 lea 0x50(%edx),%esi
11541d: 89 71 04 mov %esi,0x4(%ecx)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
115420: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
115423: ff 75 e4 pushl -0x1c(%ebp)
115426: 9d popf
*size_p = the_message->Contents.size;
115427: 8b 4b 0c mov 0xc(%ebx),%ecx
11542a: 89 08 mov %ecx,(%eax)
_Thread_Executing->Wait.count =
11542c: 8b 73 08 mov 0x8(%ebx),%esi
11542f: 8b 0d d8 2d 13 00 mov 0x132dd8,%ecx
115435: 89 71 24 mov %esi,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
115438: 8d 4b 10 lea 0x10(%ebx),%ecx
11543b: 89 4d e4 mov %ecx,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11543e: 8b 08 mov (%eax),%ecx
115440: 8b 7d e0 mov -0x20(%ebp),%edi
115443: 8b 75 e4 mov -0x1c(%ebp),%esi
115446: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
115448: 83 ec 0c sub $0xc,%esp
11544b: 52 push %edx
11544c: 89 55 d4 mov %edx,-0x2c(%ebp)
11544f: e8 c0 1b 00 00 call 117014 <_Thread_queue_Dequeue>
if ( !the_thread ) {
115454: 83 c4 10 add $0x10,%esp
115457: 85 c0 test %eax,%eax
115459: 8b 55 d4 mov -0x2c(%ebp),%edx
11545c: 0f 84 86 00 00 00 je 1154e8 <_CORE_message_queue_Seize+0x114>
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
115462: 8b 48 24 mov 0x24(%eax),%ecx
115465: 89 4b 08 mov %ecx,0x8(%ebx)
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
115468: 8b 48 30 mov 0x30(%eax),%ecx
11546b: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11546e: 8b 70 2c mov 0x2c(%eax),%esi
115471: 8b 7d e4 mov -0x1c(%ebp),%edi
115474: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
115476: 8b 43 08 mov 0x8(%ebx),%eax
115479: 89 45 10 mov %eax,0x10(%ebp)
11547c: 89 5d 0c mov %ebx,0xc(%ebp)
11547f: 89 55 08 mov %edx,0x8(%ebp)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
115482: 8d 65 f4 lea -0xc(%ebp),%esp
115485: 5b pop %ebx
115486: 5e pop %esi
115487: 5f pop %edi
115488: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
115489: e9 a2 5b 00 00 jmp 11b030 <_CORE_message_queue_Insert_message>
11548e: 66 90 xchg %ax,%ax
return;
}
#endif
}
if ( !wait ) {
115490: 89 fb mov %edi,%ebx
115492: 84 db test %bl,%bl
115494: 75 16 jne 1154ac <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
115496: ff 75 e4 pushl -0x1c(%ebp)
115499: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
11549a: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
1154a1: 8d 65 f4 lea -0xc(%ebp),%esp
1154a4: 5b pop %ebx
1154a5: 5e pop %esi
1154a6: 5f pop %edi
1154a7: c9 leave
1154a8: c3 ret
1154a9: 8d 76 00 lea 0x0(%esi),%esi
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;
1154ac: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
1154b3: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
1154b6: 8b 5d dc mov -0x24(%ebp),%ebx
1154b9: 89 59 20 mov %ebx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
1154bc: 8b 5d e0 mov -0x20(%ebp),%ebx
1154bf: 89 59 2c mov %ebx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
1154c2: 89 41 28 mov %eax,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
1154c5: ff 75 e4 pushl -0x1c(%ebp)
1154c8: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
1154c9: c7 45 10 40 74 11 00 movl $0x117440,0x10(%ebp)
1154d0: 8b 45 d8 mov -0x28(%ebp),%eax
1154d3: 89 45 0c mov %eax,0xc(%ebp)
1154d6: 89 55 08 mov %edx,0x8(%ebp)
}
1154d9: 8d 65 f4 lea -0xc(%ebp),%esp
1154dc: 5b pop %ebx
1154dd: 5e pop %esi
1154de: 5f pop %edi
1154df: c9 leave
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
1154e0: e9 4b 1c 00 00 jmp 117130 <_Thread_queue_Enqueue_with_handler>
1154e5: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
1154e8: 89 5d 0c mov %ebx,0xc(%ebp)
1154eb: 83 c2 68 add $0x68,%edx
1154ee: 89 55 08 mov %edx,0x8(%ebp)
}
1154f1: 8d 65 f4 lea -0xc(%ebp),%esp
1154f4: 5b pop %ebx
1154f5: 5e pop %esi
1154f6: 5f pop %edi
1154f7: c9 leave
1154f8: e9 97 fd ff ff jmp 115294 <_Chain_Append>
0010c620 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10c620: 55 push %ebp
10c621: 89 e5 mov %esp,%ebp
10c623: 57 push %edi
10c624: 56 push %esi
10c625: 53 push %ebx
10c626: 83 ec 1c sub $0x1c,%esp
10c629: 8b 5d 08 mov 0x8(%ebp),%ebx
10c62c: 8b 75 0c mov 0xc(%ebp),%esi
10c62f: 8a 4d 20 mov 0x20(%ebp),%cl
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c632: 8b 45 10 mov 0x10(%ebp),%eax
10c635: 39 43 4c cmp %eax,0x4c(%ebx)
10c638: 72 2e jb 10c668 <_CORE_message_queue_Submit+0x48>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c63a: 8b 43 48 mov 0x48(%ebx),%eax
10c63d: 85 c0 test %eax,%eax
10c63f: 74 37 je 10c678 <_CORE_message_queue_Submit+0x58>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
the_message_queue->maximum_pending_messages ) {
10c641: 39 43 44 cmp %eax,0x44(%ebx)
10c644: 0f 87 b6 00 00 00 ja 10c700 <_CORE_message_queue_Submit+0xe0>
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10c64a: 84 c9 test %cl,%cl
10c64c: 0f 84 ea 00 00 00 je 10c73c <_CORE_message_queue_Submit+0x11c>
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
10c652: a1 54 95 12 00 mov 0x129554,%eax
10c657: 85 c0 test %eax,%eax
10c659: 74 5d je 10c6b8 <_CORE_message_queue_Submit+0x98>
10c65b: b8 03 00 00 00 mov $0x3,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c660: 8d 65 f4 lea -0xc(%ebp),%esp
10c663: 5b pop %ebx
10c664: 5e pop %esi
10c665: 5f pop %edi
10c666: c9 leave
10c667: c3 ret
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
10c668: b8 01 00 00 00 mov $0x1,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c66d: 8d 65 f4 lea -0xc(%ebp),%esp
10c670: 5b pop %ebx
10c671: 5e pop %esi
10c672: 5f pop %edi
10c673: c9 leave
10c674: c3 ret
10c675: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10c678: 83 ec 0c sub $0xc,%esp
10c67b: 53 push %ebx
10c67c: 88 4d e4 mov %cl,-0x1c(%ebp)
10c67f: e8 04 1a 00 00 call 10e088 <_Thread_queue_Dequeue>
10c684: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c686: 83 c4 10 add $0x10,%esp
10c689: 85 c0 test %eax,%eax
10c68b: 8a 4d e4 mov -0x1c(%ebp),%cl
10c68e: 0f 84 b8 00 00 00 je 10c74c <_CORE_message_queue_Submit+0x12c>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c694: 8b 40 2c mov 0x2c(%eax),%eax
10c697: 89 c7 mov %eax,%edi
10c699: 8b 4d 10 mov 0x10(%ebp),%ecx
10c69c: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
10c69e: 8b 42 28 mov 0x28(%edx),%eax
10c6a1: 8b 4d 10 mov 0x10(%ebp),%ecx
10c6a4: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c6a6: 8b 45 1c mov 0x1c(%ebp),%eax
10c6a9: 89 42 24 mov %eax,0x24(%edx)
10c6ac: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c6ae: 8d 65 f4 lea -0xc(%ebp),%esp
10c6b1: 5b pop %ebx
10c6b2: 5e pop %esi
10c6b3: 5f pop %edi
10c6b4: c9 leave
10c6b5: c3 ret
10c6b6: 66 90 xchg %ax,%ax
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
10c6b8: a1 78 95 12 00 mov 0x129578,%eax
ISR_Level level;
_ISR_Disable( level );
10c6bd: 9c pushf
10c6be: fa cli
10c6bf: 59 pop %ecx
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;
10c6c0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
10c6c7: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10c6ca: 8b 55 14 mov 0x14(%ebp),%edx
10c6cd: 89 50 20 mov %edx,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10c6d0: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10c6d3: 8b 55 10 mov 0x10(%ebp),%edx
10c6d6: 89 50 30 mov %edx,0x30(%eax)
executing->Wait.count = submit_type;
10c6d9: 8b 55 1c mov 0x1c(%ebp),%edx
10c6dc: 89 50 24 mov %edx,0x24(%eax)
_ISR_Enable( level );
10c6df: 51 push %ecx
10c6e0: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10c6e1: 50 push %eax
10c6e2: 68 b4 e4 10 00 push $0x10e4b4
10c6e7: ff 75 24 pushl 0x24(%ebp)
10c6ea: 53 push %ebx
10c6eb: e8 b4 1a 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler>
10c6f0: b8 07 00 00 00 mov $0x7,%eax
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10c6f5: 83 c4 10 add $0x10,%esp
#endif
}
10c6f8: 8d 65 f4 lea -0xc(%ebp),%esp
10c6fb: 5b pop %ebx
10c6fc: 5e pop %esi
10c6fd: 5f pop %edi
10c6fe: c9 leave
10c6ff: c3 ret
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
10c700: 83 ec 0c sub $0xc,%esp
10c703: 8d 43 68 lea 0x68(%ebx),%eax
10c706: 50 push %eax
10c707: e8 f0 fe ff ff call 10c5fc <_Chain_Get>
10c70c: 89 c2 mov %eax,%edx
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c70e: 8d 40 10 lea 0x10(%eax),%eax
10c711: 89 c7 mov %eax,%edi
10c713: 8b 4d 10 mov 0x10(%ebp),%ecx
10c716: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
10c718: 8b 4d 10 mov 0x10(%ebp),%ecx
10c71b: 89 4a 0c mov %ecx,0xc(%edx)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
10c71e: 8b 45 1c mov 0x1c(%ebp),%eax
10c721: 89 42 08 mov %eax,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c724: 83 c4 0c add $0xc,%esp
10c727: 50 push %eax
10c728: 52 push %edx
10c729: 53 push %ebx
10c72a: e8 5d 59 00 00 call 11208c <_CORE_message_queue_Insert_message>
10c72f: 31 c0 xor %eax,%eax
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c731: 83 c4 10 add $0x10,%esp
10c734: e9 34 ff ff ff jmp 10c66d <_CORE_message_queue_Submit+0x4d>
10c739: 8d 76 00 lea 0x0(%esi),%esi
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
10c73c: b8 02 00 00 00 mov $0x2,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c741: 8d 65 f4 lea -0xc(%ebp),%esp
10c744: 5b pop %ebx
10c745: 5e pop %esi
10c746: 5f pop %edi
10c747: c9 leave
10c748: c3 ret
10c749: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
10c74c: 8b 43 48 mov 0x48(%ebx),%eax
10c74f: e9 ed fe ff ff jmp 10c641 <_CORE_message_queue_Submit+0x21>
0010c760 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c760: 55 push %ebp
10c761: 89 e5 mov %esp,%ebp
10c763: 57 push %edi
10c764: 56 push %esi
10c765: 53 push %ebx
10c766: 83 ec 0c sub $0xc,%esp
10c769: 8b 45 08 mov 0x8(%ebp),%eax
10c76c: 8b 5d 0c mov 0xc(%ebp),%ebx
10c76f: 8b 55 10 mov 0x10(%ebp),%edx
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
10c772: 8d 78 40 lea 0x40(%eax),%edi
10c775: b9 04 00 00 00 mov $0x4,%ecx
10c77a: 89 de mov %ebx,%esi
10c77c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c77e: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c781: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c788: 85 d2 test %edx,%edx
10c78a: 75 30 jne 10c7bc <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c78c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c793: 8b 15 78 95 12 00 mov 0x129578,%edx
10c799: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c79c: 8b 4a 08 mov 0x8(%edx),%ecx
10c79f: 89 48 60 mov %ecx,0x60(%eax)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10c7a2: 8b 48 48 mov 0x48(%eax),%ecx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c7a5: 83 f9 02 cmp $0x2,%ecx
10c7a8: 74 05 je 10c7af <_CORE_mutex_Initialize+0x4f>
10c7aa: 83 f9 03 cmp $0x3,%ecx
10c7ad: 75 22 jne 10c7d1 <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
10c7af: 8b 4a 14 mov 0x14(%edx),%ecx
10c7b2: 3b 48 4c cmp 0x4c(%eax),%ecx
10c7b5: 72 41 jb 10c7f8 <_CORE_mutex_Initialize+0x98>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
10c7b7: ff 42 1c incl 0x1c(%edx)
10c7ba: eb 15 jmp 10c7d1 <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c7bc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c7c3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c7ca: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c7d1: 6a 05 push $0x5
10c7d3: 68 00 04 00 00 push $0x400
10c7d8: 31 d2 xor %edx,%edx
10c7da: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c7de: 0f 95 c2 setne %dl
10c7e1: 52 push %edx
10c7e2: 50 push %eax
10c7e3: e8 1c 1c 00 00 call 10e404 <_Thread_queue_Initialize>
10c7e8: 31 c0 xor %eax,%eax
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c7ea: 83 c4 10 add $0x10,%esp
}
10c7ed: 8d 65 f4 lea -0xc(%ebp),%esp
10c7f0: 5b pop %ebx
10c7f1: 5e pop %esi
10c7f2: 5f pop %edi
10c7f3: c9 leave
10c7f4: c3 ret
10c7f5: 8d 76 00 lea 0x0(%esi),%esi
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
10c7f8: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c7fd: 8d 65 f4 lea -0xc(%ebp),%esp
10c800: 5b pop %ebx
10c801: 5e pop %esi
10c802: 5f pop %edi
10c803: c9 leave
10c804: c3 ret
0010c858 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c858: 55 push %ebp
10c859: 89 e5 mov %esp,%ebp
10c85b: 53 push %ebx
10c85c: 83 ec 14 sub $0x14,%esp
10c85f: 8b 5d 08 mov 0x8(%ebp),%ebx
10c862: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c865: a1 b8 94 12 00 mov 0x1294b8,%eax
10c86a: 85 c0 test %eax,%eax
10c86c: 74 04 je 10c872 <_CORE_mutex_Seize+0x1a>
10c86e: 84 d2 test %dl,%dl
10c870: 75 36 jne 10c8a8 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c872: 83 ec 08 sub $0x8,%esp
10c875: 8d 45 18 lea 0x18(%ebp),%eax
10c878: 50 push %eax
10c879: 53 push %ebx
10c87a: 88 55 f4 mov %dl,-0xc(%ebp)
10c87d: e8 b6 58 00 00 call 112138 <_CORE_mutex_Seize_interrupt_trylock>
10c882: 83 c4 10 add $0x10,%esp
10c885: 85 c0 test %eax,%eax
10c887: 8a 55 f4 mov -0xc(%ebp),%dl
10c88a: 74 14 je 10c8a0 <_CORE_mutex_Seize+0x48>
10c88c: 84 d2 test %dl,%dl
10c88e: 75 30 jne 10c8c0 <_CORE_mutex_Seize+0x68>
10c890: ff 75 18 pushl 0x18(%ebp)
10c893: 9d popf
10c894: a1 78 95 12 00 mov 0x129578,%eax
10c899: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c8a0: 8b 5d fc mov -0x4(%ebp),%ebx
10c8a3: c9 leave
10c8a4: c3 ret
10c8a5: 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 );
10c8a8: 83 3d 80 96 12 00 01 cmpl $0x1,0x129680
10c8af: 76 c1 jbe 10c872 <_CORE_mutex_Seize+0x1a>
10c8b1: 53 push %ebx
10c8b2: 6a 13 push $0x13
10c8b4: 6a 00 push $0x0
10c8b6: 6a 00 push $0x0
10c8b8: e8 f3 05 00 00 call 10ceb0 <_Internal_error_Occurred>
10c8bd: 8d 76 00 lea 0x0(%esi),%esi
10c8c0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10c8c7: a1 78 95 12 00 mov 0x129578,%eax
10c8cc: 89 58 44 mov %ebx,0x44(%eax)
10c8cf: 8b 55 0c mov 0xc(%ebp),%edx
10c8d2: 89 50 20 mov %edx,0x20(%eax)
10c8d5: a1 b8 94 12 00 mov 0x1294b8,%eax
10c8da: 40 inc %eax
10c8db: a3 b8 94 12 00 mov %eax,0x1294b8
10c8e0: ff 75 18 pushl 0x18(%ebp)
10c8e3: 9d popf
10c8e4: 83 ec 08 sub $0x8,%esp
10c8e7: ff 75 14 pushl 0x14(%ebp)
10c8ea: 53 push %ebx
10c8eb: e8 18 ff ff ff call 10c808 <_CORE_mutex_Seize_interrupt_blocking>
10c8f0: 83 c4 10 add $0x10,%esp
}
10c8f3: 8b 5d fc mov -0x4(%ebp),%ebx
10c8f6: c9 leave
10c8f7: c3 ret
00112138 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
112138: 55 push %ebp
112139: 89 e5 mov %esp,%ebp
11213b: 56 push %esi
11213c: 53 push %ebx
11213d: 8b 45 08 mov 0x8(%ebp),%eax
112140: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
112143: 8b 15 78 95 12 00 mov 0x129578,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
112149: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
112150: 8b 58 50 mov 0x50(%eax),%ebx
112153: 85 db test %ebx,%ebx
112155: 74 31 je 112188 <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
112157: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
11215e: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
112161: 8b 5a 08 mov 0x8(%edx),%ebx
112164: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
112167: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
11216e: 8b 58 48 mov 0x48(%eax),%ebx
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
112171: 83 fb 02 cmp $0x2,%ebx
112174: 74 26 je 11219c <_CORE_mutex_Seize_interrupt_trylock+0x64>
112176: 83 fb 03 cmp $0x3,%ebx
112179: 74 3d je 1121b8 <_CORE_mutex_Seize_interrupt_trylock+0x80>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
11217b: ff 31 pushl (%ecx)
11217d: 9d popf
11217e: 31 c0 xor %eax,%eax
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
112180: 8d 65 f8 lea -0x8(%ebp),%esp
112183: 5b pop %ebx
112184: 5e pop %esi
112185: c9 leave
112186: c3 ret
112187: 90 nop
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
112188: 3b 50 5c cmp 0x5c(%eax),%edx
11218b: 74 17 je 1121a4 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
11218d: b8 01 00 00 00 mov $0x1,%eax
112192: 8d 65 f8 lea -0x8(%ebp),%esp
112195: 5b pop %ebx
112196: 5e pop %esi
112197: c9 leave
112198: c3 ret
112199: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
11219c: ff 42 1c incl 0x1c(%edx)
11219f: eb da jmp 11217b <_CORE_mutex_Seize_interrupt_trylock+0x43>
1121a1: 8d 76 00 lea 0x0(%esi),%esi
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
1121a4: 8b 58 40 mov 0x40(%eax),%ebx
1121a7: 85 db test %ebx,%ebx
1121a9: 75 45 jne 1121f0 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
1121ab: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
1121ae: ff 31 pushl (%ecx)
1121b0: 9d popf
1121b1: 31 c0 xor %eax,%eax
1121b3: eb dd jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
1121b5: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
1121b8: 8b 5a 1c mov 0x1c(%edx),%ebx
1121bb: 8d 73 01 lea 0x1(%ebx),%esi
1121be: 89 72 1c mov %esi,0x1c(%edx)
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
1121c1: 8b 72 14 mov 0x14(%edx),%esi
if ( current == ceiling ) {
1121c4: 39 70 4c cmp %esi,0x4c(%eax)
1121c7: 74 6b je 112234 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
1121c9: 72 39 jb 112204 <_CORE_mutex_Seize_interrupt_trylock+0xcc>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
1121cb: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
1121d2: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
1121d9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
1121e0: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
1121e3: ff 31 pushl (%ecx)
1121e5: 9d popf
1121e6: 31 c0 xor %eax,%eax
1121e8: 8d 65 f8 lea -0x8(%ebp),%esp
1121eb: 5b pop %ebx
1121ec: 5e pop %esi
1121ed: c9 leave
1121ee: c3 ret
1121ef: 90 nop
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
1121f0: 4b dec %ebx
1121f1: 75 9a jne 11218d <_CORE_mutex_Seize_interrupt_trylock+0x55>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
1121f3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_ISR_Enable( *level_p );
1121fa: ff 31 pushl (%ecx)
1121fc: 9d popf
1121fd: 31 c0 xor %eax,%eax
1121ff: eb 91 jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
112201: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
112204: 8b 15 b8 94 12 00 mov 0x1294b8,%edx
11220a: 42 inc %edx
11220b: 89 15 b8 94 12 00 mov %edx,0x1294b8
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
112211: ff 31 pushl (%ecx)
112213: 9d popf
_Thread_Change_priority(
112214: 52 push %edx
112215: 6a 00 push $0x0
112217: ff 70 4c pushl 0x4c(%eax)
11221a: ff 70 5c pushl 0x5c(%eax)
11221d: e8 62 b5 ff ff call 10d784 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
112222: e8 45 ba ff ff call 10dc6c <_Thread_Enable_dispatch>
112227: 31 c0 xor %eax,%eax
112229: 83 c4 10 add $0x10,%esp
11222c: e9 61 ff ff ff jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
112231: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
112234: ff 31 pushl (%ecx)
112236: 9d popf
112237: 31 c0 xor %eax,%eax
112239: e9 54 ff ff ff jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c8f8 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c8f8: 55 push %ebp
10c8f9: 89 e5 mov %esp,%ebp
10c8fb: 53 push %ebx
10c8fc: 83 ec 04 sub $0x4,%esp
10c8ff: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
10c902: 8b 43 5c mov 0x5c(%ebx),%eax
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
10c905: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c909: 74 15 je 10c920 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c90b: 3b 05 78 95 12 00 cmp 0x129578,%eax
10c911: 74 0d je 10c920 <_CORE_mutex_Surrender+0x28>
10c913: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c918: 8b 5d fc mov -0x4(%ebp),%ebx
10c91b: c9 leave
10c91c: c3 ret
10c91d: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c920: 8b 53 54 mov 0x54(%ebx),%edx
10c923: 85 d2 test %edx,%edx
10c925: 74 65 je 10c98c <_CORE_mutex_Surrender+0x94>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c927: 4a dec %edx
10c928: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c92b: 85 d2 test %edx,%edx
10c92d: 75 5d jne 10c98c <_CORE_mutex_Surrender+0x94>
10c92f: 8b 53 48 mov 0x48(%ebx),%edx
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c932: 83 fa 02 cmp $0x2,%edx
10c935: 0f 84 99 00 00 00 je 10c9d4 <_CORE_mutex_Surrender+0xdc>
10c93b: 83 fa 03 cmp $0x3,%edx
10c93e: 0f 84 90 00 00 00 je 10c9d4 <_CORE_mutex_Surrender+0xdc>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
10c944: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c94b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
10c952: 83 fa 02 cmp $0x2,%edx
10c955: 74 5d je 10c9b4 <_CORE_mutex_Surrender+0xbc>
10c957: 83 fa 03 cmp $0x3,%edx
10c95a: 74 58 je 10c9b4 <_CORE_mutex_Surrender+0xbc>
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
10c95c: 83 ec 0c sub $0xc,%esp
10c95f: 53 push %ebx
10c960: e8 23 17 00 00 call 10e088 <_Thread_queue_Dequeue>
10c965: 83 c4 10 add $0x10,%esp
10c968: 85 c0 test %eax,%eax
10c96a: 74 7c je 10c9e8 <_CORE_mutex_Surrender+0xf0>
} else
#endif
{
the_mutex->holder = the_thread;
10c96c: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c96f: 8b 50 08 mov 0x8(%eax),%edx
10c972: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c975: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c97c: 8b 53 48 mov 0x48(%ebx),%edx
10c97f: 83 fa 02 cmp $0x2,%edx
10c982: 74 58 je 10c9dc <_CORE_mutex_Surrender+0xe4>
10c984: 83 fa 03 cmp $0x3,%edx
10c987: 74 0b je 10c994 <_CORE_mutex_Surrender+0x9c>
10c989: 8d 76 00 lea 0x0(%esi),%esi
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c98c: 31 c0 xor %eax,%eax
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c98e: 8b 5d fc mov -0x4(%ebp),%ebx
10c991: c9 leave
10c992: c3 ret
10c993: 90 nop
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10c994: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c997: 8b 53 4c mov 0x4c(%ebx),%edx
the_thread->current_priority){
10c99a: 3b 50 14 cmp 0x14(%eax),%edx
10c99d: 73 ed jae 10c98c <_CORE_mutex_Surrender+0x94>
_Thread_Change_priority(
10c99f: 51 push %ecx
10c9a0: 6a 00 push $0x0
10c9a2: 52 push %edx
10c9a3: 50 push %eax
10c9a4: e8 db 0d 00 00 call 10d784 <_Thread_Change_priority>
10c9a9: 31 c0 xor %eax,%eax
10c9ab: 83 c4 10 add $0x10,%esp
10c9ae: e9 65 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20>
10c9b3: 90 nop
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,true);
#endif
if ( holder->resource_count == 0 &&
10c9b4: 8b 50 1c mov 0x1c(%eax),%edx
10c9b7: 85 d2 test %edx,%edx
10c9b9: 75 a1 jne 10c95c <_CORE_mutex_Surrender+0x64>
holder->real_priority != holder->current_priority ) {
10c9bb: 8b 50 18 mov 0x18(%eax),%edx
10c9be: 3b 50 14 cmp 0x14(%eax),%edx
10c9c1: 74 99 je 10c95c <_CORE_mutex_Surrender+0x64>
_Thread_Change_priority( holder, holder->real_priority, true );
10c9c3: 51 push %ecx
10c9c4: 6a 01 push $0x1
10c9c6: 52 push %edx
10c9c7: 50 push %eax
10c9c8: e8 b7 0d 00 00 call 10d784 <_Thread_Change_priority>
10c9cd: 83 c4 10 add $0x10,%esp
10c9d0: eb 8a jmp 10c95c <_CORE_mutex_Surrender+0x64>
10c9d2: 66 90 xchg %ax,%ax
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
10c9d4: ff 48 1c decl 0x1c(%eax)
10c9d7: e9 68 ff ff ff jmp 10c944 <_CORE_mutex_Surrender+0x4c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
10c9dc: ff 40 1c incl 0x1c(%eax)
10c9df: 31 c0 xor %eax,%eax
break;
10c9e1: e9 32 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20>
10c9e6: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c9e8: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
10c9ef: 31 c0 xor %eax,%eax
10c9f1: e9 22 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20>
0011601c <_CORE_semaphore_Seize>:
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
11601c: 55 push %ebp
11601d: 89 e5 mov %esp,%ebp
11601f: 57 push %edi
116020: 56 push %esi
116021: 53 push %ebx
116022: 83 ec 1c sub $0x1c,%esp
116025: 8b 45 08 mov 0x8(%ebp),%eax
116028: 8b 7d 0c mov 0xc(%ebp),%edi
11602b: 8b 75 14 mov 0x14(%ebp),%esi
11602e: 8a 5d 10 mov 0x10(%ebp),%bl
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
116031: 8b 15 f8 f0 12 00 mov 0x12f0f8,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
116037: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
11603e: 9c pushf
11603f: fa cli
116040: 8f 45 e4 popl -0x1c(%ebp)
if ( the_semaphore->count != 0 ) {
116043: 8b 48 48 mov 0x48(%eax),%ecx
116046: 85 c9 test %ecx,%ecx
116048: 75 46 jne 116090 <_CORE_semaphore_Seize+0x74>
/*
* If the semaphore was not available and the caller was not willing
* to block, then return immediately with a status indicating that
* the semaphore was not available and the caller never blocked.
*/
if ( !wait ) {
11604a: 84 db test %bl,%bl
11604c: 75 16 jne 116064 <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
11604e: ff 75 e4 pushl -0x1c(%ebp)
116051: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
116052: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
116059: 83 c4 1c add $0x1c,%esp
11605c: 5b pop %ebx
11605d: 5e pop %esi
11605e: 5f pop %edi
11605f: c9 leave
116060: c3 ret
116061: 8d 76 00 lea 0x0(%esi),%esi
116064: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax)
/*
* If the semaphore is not available and the caller is willing to
* block, then we now block the caller with optional timeout.
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
11606b: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
11606e: 89 7a 20 mov %edi,0x20(%edx)
_ISR_Enable( level );
116071: ff 75 e4 pushl -0x1c(%ebp)
116074: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
116075: c7 45 10 bc 1c 11 00 movl $0x111cbc,0x10(%ebp)
11607c: 89 75 0c mov %esi,0xc(%ebp)
11607f: 89 45 08 mov %eax,0x8(%ebp)
}
116082: 83 c4 1c add $0x1c,%esp
116085: 5b pop %ebx
116086: 5e pop %esi
116087: 5f pop %edi
116088: c9 leave
*/
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
116089: e9 1e b9 ff ff jmp 1119ac <_Thread_queue_Enqueue_with_handler>
11608e: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
116090: 49 dec %ecx
116091: 89 48 48 mov %ecx,0x48(%eax)
_ISR_Enable( level );
116094: ff 75 e4 pushl -0x1c(%ebp)
116097: 9d popf
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
}
116098: 83 c4 1c add $0x1c,%esp
11609b: 5b pop %ebx
11609c: 5e pop %esi
11609d: 5f pop %edi
11609e: c9 leave
11609f: c3 ret
0010ca44 <_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
)
{
10ca44: 55 push %ebp
10ca45: 89 e5 mov %esp,%ebp
10ca47: 53 push %ebx
10ca48: 83 ec 10 sub $0x10,%esp
10ca4b: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
10ca4e: 53 push %ebx
10ca4f: e8 34 16 00 00 call 10e088 <_Thread_queue_Dequeue>
10ca54: 83 c4 10 add $0x10,%esp
10ca57: 85 c0 test %eax,%eax
10ca59: 74 09 je 10ca64 <_CORE_semaphore_Surrender+0x20>
10ca5b: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx
10ca60: c9 leave
10ca61: c3 ret
10ca62: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10ca64: 9c pushf
10ca65: fa cli
10ca66: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10ca67: 8b 43 48 mov 0x48(%ebx),%eax
10ca6a: 3b 43 40 cmp 0x40(%ebx),%eax
10ca6d: 72 0d jb 10ca7c <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
10ca6f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
10ca74: 52 push %edx
10ca75: 9d popf
}
return status;
}
10ca76: 8b 5d fc mov -0x4(%ebp),%ebx
10ca79: c9 leave
10ca7a: c3 ret
10ca7b: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10ca7c: 40 inc %eax
10ca7d: 89 43 48 mov %eax,0x48(%ebx)
10ca80: 31 c0 xor %eax,%eax
10ca82: eb f0 jmp 10ca74 <_CORE_semaphore_Surrender+0x30>
0010d444 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
10d444: 55 push %ebp
10d445: 89 e5 mov %esp,%ebp
10d447: 56 push %esi
10d448: 53 push %ebx
10d449: 8b 5d 08 mov 0x8(%ebp),%ebx
10d44c: 8a 4d 0c mov 0xc(%ebp),%cl
ISR_Level level;
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
10d44f: 9c pushf
10d450: fa cli
10d451: 58 pop %eax
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
10d452: 8b 53 04 mov 0x4(%ebx),%edx
10d455: 4a dec %edx
10d456: 74 60 je 10d4b8 <_CORE_spinlock_Wait+0x74>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
10d458: 8b 53 08 mov 0x8(%ebx),%edx
10d45b: 42 inc %edx
10d45c: 89 53 08 mov %edx,0x8(%ebx)
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10d45f: 8b 53 04 mov 0x4(%ebx),%edx
10d462: 85 d2 test %edx,%edx
10d464: 74 22 je 10d488 <_CORE_spinlock_Wait+0x44>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
10d466: 84 c9 test %cl,%cl
10d468: 74 39 je 10d4a3 <_CORE_spinlock_Wait+0x5f>
10d46a: 66 90 xchg %ax,%ax
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
10d46c: 50 push %eax
10d46d: 9d popf
/* An ISR could occur here */
_Thread_Enable_dispatch();
10d46e: e8 45 12 00 00 call 10e6b8 <_Thread_Enable_dispatch>
10d473: a1 d8 a5 12 00 mov 0x12a5d8,%eax
10d478: 40 inc %eax
10d479: a3 d8 a5 12 00 mov %eax,0x12a5d8
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
10d47e: 9c pushf
10d47f: fa cli
10d480: 58 pop %eax
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
10d481: 8b 53 04 mov 0x4(%ebx),%edx
10d484: 85 d2 test %edx,%edx
10d486: 75 e4 jne 10d46c <_CORE_spinlock_Wait+0x28>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
10d488: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_spinlock->holder = _Thread_Executing->Object.id;
10d48f: 8b 15 98 a6 12 00 mov 0x12a698,%edx
10d495: 8b 52 08 mov 0x8(%edx),%edx
10d498: 89 53 0c mov %edx,0xc(%ebx)
_ISR_Enable( level );
10d49b: 50 push %eax
10d49c: 9d popf
10d49d: 31 c0 xor %eax,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10d49f: 5b pop %ebx
10d4a0: 5e pop %esi
10d4a1: c9 leave
10d4a2: c3 ret
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
10d4a3: 8b 53 08 mov 0x8(%ebx),%edx
10d4a6: 4a dec %edx
10d4a7: 89 53 08 mov %edx,0x8(%ebx)
_ISR_Enable( level );
10d4aa: 50 push %eax
10d4ab: 9d popf
10d4ac: b8 05 00 00 00 mov $0x5,%eax
_Thread_Disable_dispatch();
_ISR_Disable( level );
}
}
10d4b1: 5b pop %ebx
10d4b2: 5e pop %esi
10d4b3: c9 leave
10d4b4: c3 ret
10d4b5: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
10d4b8: 8b 73 0c mov 0xc(%ebx),%esi
10d4bb: 8b 15 98 a6 12 00 mov 0x12a698,%edx
10d4c1: 3b 72 08 cmp 0x8(%edx),%esi
10d4c4: 75 92 jne 10d458 <_CORE_spinlock_Wait+0x14>
_ISR_Enable( level );
10d4c6: 50 push %eax
10d4c7: 9d popf
10d4c8: b8 01 00 00 00 mov $0x1,%eax
return CORE_SPINLOCK_HOLDER_RELOCKING;
10d4cd: eb d0 jmp 10d49f <_CORE_spinlock_Wait+0x5b>
00111f64 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
111f64: 55 push %ebp
111f65: 89 e5 mov %esp,%ebp
111f67: 57 push %edi
111f68: 56 push %esi
111f69: 53 push %ebx
111f6a: 8b 7d 08 mov 0x8(%ebp),%edi
111f6d: 8b 4d 10 mov 0x10(%ebp),%ecx
111f70: 8b 75 14 mov 0x14(%ebp),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
111f73: 89 fa mov %edi,%edx
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
111f75: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
next = starting_address;
while ( count-- ) {
111f7c: 85 c9 test %ecx,%ecx
111f7e: 74 17 je 111f97 <_Chain_Initialize+0x33><== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
111f80: 8b 45 0c mov 0xc(%ebp),%eax
111f83: eb 05 jmp 111f8a <_Chain_Initialize+0x26>
111f85: 8d 76 00 lea 0x0(%esi),%esi
while ( count-- ) {
111f88: 89 d8 mov %ebx,%eax
current->next = next;
111f8a: 89 02 mov %eax,(%edx)
next->previous = current;
111f8c: 89 50 04 mov %edx,0x4(%eax)
111f8f: 8d 1c 30 lea (%eax,%esi,1),%ebx
current = next;
next = (Chain_Node *)
111f92: 89 c2 mov %eax,%edx
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
111f94: 49 dec %ecx
111f95: 75 f1 jne 111f88 <_Chain_Initialize+0x24>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
111f97: 8d 47 04 lea 0x4(%edi),%eax
111f9a: 89 02 mov %eax,(%edx)
the_chain->last = current;
111f9c: 89 57 08 mov %edx,0x8(%edi)
}
111f9f: 5b pop %ebx
111fa0: 5e pop %esi
111fa1: 5f pop %edi
111fa2: c9 leave
111fa3: c3 ret
0010b66c <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b66c: 55 push %ebp
10b66d: 89 e5 mov %esp,%ebp
10b66f: 57 push %edi
10b670: 56 push %esi
10b671: 53 push %ebx
10b672: 83 ec 2c sub $0x2c,%esp
10b675: 8b 45 08 mov 0x8(%ebp),%eax
10b678: 8b 4d 0c mov 0xc(%ebp),%ecx
10b67b: 8b 55 10 mov 0x10(%ebp),%edx
10b67e: 89 55 dc mov %edx,-0x24(%ebp)
10b681: 8b 7d 14 mov 0x14(%ebp),%edi
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
10b684: 8b 1d 78 95 12 00 mov 0x129578,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b68a: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b691: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi
_ISR_Disable( level );
10b697: 9c pushf
10b698: fa cli
10b699: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b69c: 8b 16 mov (%esi),%edx
10b69e: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b6a1: 21 c2 and %eax,%edx
10b6a3: 89 55 e4 mov %edx,-0x1c(%ebp)
10b6a6: 74 0d je 10b6b5 <_Event_Seize+0x49>
10b6a8: 39 d0 cmp %edx,%eax
10b6aa: 0f 84 84 00 00 00 je 10b734 <_Event_Seize+0xc8>
10b6b0: f6 c1 02 test $0x2,%cl
10b6b3: 75 7f jne 10b734 <_Event_Seize+0xc8> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b6b5: f6 c1 01 test $0x1,%cl
10b6b8: 75 62 jne 10b71c <_Event_Seize+0xb0>
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
10b6ba: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b6bd: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b6c0: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b6c3: c7 05 c0 9e 12 00 01 movl $0x1,0x129ec0
10b6ca: 00 00 00
_ISR_Enable( level );
10b6cd: ff 75 e0 pushl -0x20(%ebp)
10b6d0: 9d popf
if ( ticks ) {
10b6d1: 8b 45 dc mov -0x24(%ebp),%eax
10b6d4: 85 c0 test %eax,%eax
10b6d6: 0f 85 80 00 00 00 jne 10b75c <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b6dc: 83 ec 08 sub $0x8,%esp
10b6df: 68 00 01 00 00 push $0x100
10b6e4: 53 push %ebx
10b6e5: e8 6e 2e 00 00 call 10e558 <_Thread_Set_state>
_ISR_Disable( level );
10b6ea: 9c pushf
10b6eb: fa cli
10b6ec: 5a pop %edx
sync_state = _Event_Sync_state;
10b6ed: a1 c0 9e 12 00 mov 0x129ec0,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b6f2: c7 05 c0 9e 12 00 00 movl $0x0,0x129ec0
10b6f9: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b6fc: 83 c4 10 add $0x10,%esp
10b6ff: 83 f8 01 cmp $0x1,%eax
10b702: 74 4c je 10b750 <_Event_Seize+0xe4>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
10b704: 89 55 10 mov %edx,0x10(%ebp)
10b707: 89 5d 0c mov %ebx,0xc(%ebp)
10b70a: 89 45 08 mov %eax,0x8(%ebp)
}
10b70d: 8d 65 f4 lea -0xc(%ebp),%esp
10b710: 5b pop %ebx
10b711: 5e pop %esi
10b712: 5f pop %edi
10b713: c9 leave
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
10b714: e9 1f 20 00 00 jmp 10d738 <_Thread_blocking_operation_Cancel>
10b719: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b71c: ff 75 e0 pushl -0x20(%ebp)
10b71f: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b720: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b727: 8b 55 e4 mov -0x1c(%ebp),%edx
10b72a: 89 17 mov %edx,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b72c: 8d 65 f4 lea -0xc(%ebp),%esp
10b72f: 5b pop %ebx
10b730: 5e pop %esi
10b731: 5f pop %edi
10b732: c9 leave
10b733: c3 ret
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
10b734: 8b 45 e4 mov -0x1c(%ebp),%eax
10b737: f7 d0 not %eax
10b739: 23 45 d4 and -0x2c(%ebp),%eax
10b73c: 89 06 mov %eax,(%esi)
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
10b73e: ff 75 e0 pushl -0x20(%ebp)
10b741: 9d popf
*event_out = seized_events;
10b742: 8b 45 e4 mov -0x1c(%ebp),%eax
10b745: 89 07 mov %eax,(%edi)
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b747: 8d 65 f4 lea -0xc(%ebp),%esp
10b74a: 5b pop %ebx
10b74b: 5e pop %esi
10b74c: 5f pop %edi
10b74d: c9 leave
10b74e: c3 ret
10b74f: 90 nop
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
10b750: 52 push %edx
10b751: 9d popf
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
}
10b752: 8d 65 f4 lea -0xc(%ebp),%esp
10b755: 5b pop %ebx
10b756: 5e pop %esi
10b757: 5f pop %edi
10b758: c9 leave
10b759: c3 ret
10b75a: 66 90 xchg %ax,%ax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b75c: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b75f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b766: c7 43 64 10 b9 10 00 movl $0x10b910,0x64(%ebx)
the_watchdog->id = id;
10b76d: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b770: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b777: 8b 45 dc mov -0x24(%ebp),%eax
10b77a: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b77d: 83 ec 08 sub $0x8,%esp
10b780: 8d 43 48 lea 0x48(%ebx),%eax
10b783: 50 push %eax
10b784: 68 98 95 12 00 push $0x129598
10b789: e8 52 34 00 00 call 10ebe0 <_Watchdog_Insert>
10b78e: 83 c4 10 add $0x10,%esp
10b791: e9 46 ff ff ff jmp 10b6dc <_Event_Seize+0x70>
0010b7ec <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b7ec: 55 push %ebp
10b7ed: 89 e5 mov %esp,%ebp
10b7ef: 57 push %edi
10b7f0: 56 push %esi
10b7f1: 53 push %ebx
10b7f2: 83 ec 1c sub $0x1c,%esp
10b7f5: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b7f8: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b7fe: 8b 73 30 mov 0x30(%ebx),%esi
_ISR_Disable( level );
10b801: 9c pushf
10b802: fa cli
10b803: 8f 45 e4 popl -0x1c(%ebp)
pending_events = api->pending_events;
10b806: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b808: 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 ) ) {
10b80b: 89 c7 mov %eax,%edi
10b80d: 21 d7 and %edx,%edi
10b80f: 89 7d e0 mov %edi,-0x20(%ebp)
10b812: 74 74 je 10b888 <_Event_Surrender+0x9c>
/*
* 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() &&
10b814: 8b 3d 54 95 12 00 mov 0x129554,%edi
10b81a: 85 ff test %edi,%edi
10b81c: 74 0c je 10b82a <_Event_Surrender+0x3e>
10b81e: 3b 1d 78 95 12 00 cmp 0x129578,%ebx
10b824: 0f 84 96 00 00 00 je 10b8c0 <_Event_Surrender+0xd4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b82a: f6 43 11 01 testb $0x1,0x11(%ebx)
10b82e: 74 4c je 10b87c <_Event_Surrender+0x90>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b830: 3b 45 e0 cmp -0x20(%ebp),%eax
10b833: 74 05 je 10b83a <_Event_Surrender+0x4e>
10b835: 83 e6 02 and $0x2,%esi
10b838: 74 42 je 10b87c <_Event_Surrender+0x90> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
10b83a: 8b 45 e0 mov -0x20(%ebp),%eax
10b83d: f7 d0 not %eax
10b83f: 21 d0 and %edx,%eax
10b841: 89 01 mov %eax,(%ecx)
the_thread->Wait.count = 0;
10b843: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b84a: 8b 43 28 mov 0x28(%ebx),%eax
10b84d: 8b 7d e0 mov -0x20(%ebp),%edi
10b850: 89 38 mov %edi,(%eax)
_ISR_Flash( level );
10b852: ff 75 e4 pushl -0x1c(%ebp)
10b855: 9d popf
10b856: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b857: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b85b: 74 37 je 10b894 <_Event_Surrender+0xa8>
_ISR_Enable( level );
10b85d: ff 75 e4 pushl -0x1c(%ebp)
10b860: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b861: 83 ec 08 sub $0x8,%esp
10b864: 68 f8 ff 03 10 push $0x1003fff8
10b869: 53 push %ebx
10b86a: e8 55 20 00 00 call 10d8c4 <_Thread_Clear_state>
10b86f: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b872: 8d 65 f4 lea -0xc(%ebp),%esp
10b875: 5b pop %ebx
10b876: 5e pop %esi
10b877: 5f pop %edi
10b878: c9 leave
10b879: c3 ret
10b87a: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b87c: ff 75 e4 pushl -0x1c(%ebp)
10b87f: 9d popf
}
10b880: 8d 65 f4 lea -0xc(%ebp),%esp
10b883: 5b pop %ebx
10b884: 5e pop %esi
10b885: 5f pop %edi
10b886: c9 leave
10b887: c3 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
10b888: ff 75 e4 pushl -0x1c(%ebp)
10b88b: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
10b88c: 8d 65 f4 lea -0xc(%ebp),%esp
10b88f: 5b pop %ebx
10b890: 5e pop %esi
10b891: 5f pop %edi
10b892: c9 leave
10b893: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b894: 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 );
10b89b: ff 75 e4 pushl -0x1c(%ebp)
10b89e: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b89f: 83 ec 0c sub $0xc,%esp
10b8a2: 8d 43 48 lea 0x48(%ebx),%eax
10b8a5: 50 push %eax
10b8a6: e8 6d 34 00 00 call 10ed18 <_Watchdog_Remove>
10b8ab: 58 pop %eax
10b8ac: 5a pop %edx
10b8ad: 68 f8 ff 03 10 push $0x1003fff8
10b8b2: 53 push %ebx
10b8b3: e8 0c 20 00 00 call 10d8c4 <_Thread_Clear_state>
10b8b8: 83 c4 10 add $0x10,%esp
10b8bb: eb c3 jmp 10b880 <_Event_Surrender+0x94>
10b8bd: 8d 76 00 lea 0x0(%esi),%esi
* 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) ||
10b8c0: 8b 3d c0 9e 12 00 mov 0x129ec0,%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() &&
10b8c6: 83 ff 02 cmp $0x2,%edi
10b8c9: 74 0d je 10b8d8 <_Event_Surrender+0xec> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b8cb: 8b 3d c0 9e 12 00 mov 0x129ec0,%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() &&
10b8d1: 4f dec %edi
10b8d2: 0f 85 52 ff ff ff jne 10b82a <_Event_Surrender+0x3e>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b8d8: 3b 45 e0 cmp -0x20(%ebp),%eax
10b8db: 74 05 je 10b8e2 <_Event_Surrender+0xf6>
10b8dd: 83 e6 02 and $0x2,%esi
10b8e0: 74 22 je 10b904 <_Event_Surrender+0x118><== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
10b8e2: 8b 45 e0 mov -0x20(%ebp),%eax
10b8e5: f7 d0 not %eax
10b8e7: 21 d0 and %edx,%eax
10b8e9: 89 01 mov %eax,(%ecx)
the_thread->Wait.count = 0;
10b8eb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b8f2: 8b 43 28 mov 0x28(%ebx),%eax
10b8f5: 8b 55 e0 mov -0x20(%ebp),%edx
10b8f8: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b8fa: c7 05 c0 9e 12 00 03 movl $0x3,0x129ec0
10b901: 00 00 00
}
_ISR_Enable( level );
10b904: ff 75 e4 pushl -0x1c(%ebp)
10b907: 9d popf
return;
10b908: e9 73 ff ff ff jmp 10b880 <_Event_Surrender+0x94>
0010b910 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b910: 55 push %ebp
10b911: 89 e5 mov %esp,%ebp
10b913: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b916: 8d 45 f4 lea -0xc(%ebp),%eax
10b919: 50 push %eax
10b91a: ff 75 08 pushl 0x8(%ebp)
10b91d: e8 6e 23 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10b922: 83 c4 10 add $0x10,%esp
10b925: 8b 55 f4 mov -0xc(%ebp),%edx
10b928: 85 d2 test %edx,%edx
10b92a: 75 37 jne 10b963 <_Event_Timeout+0x53> <== 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 );
10b92c: 9c pushf
10b92d: fa cli
10b92e: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b92f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b936: 3b 05 78 95 12 00 cmp 0x129578,%eax
10b93c: 74 2a je 10b968 <_Event_Timeout+0x58>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
10b93e: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b945: 52 push %edx
10b946: 9d popf
10b947: 83 ec 08 sub $0x8,%esp
10b94a: 68 f8 ff 03 10 push $0x1003fff8
10b94f: 50 push %eax
10b950: e8 6f 1f 00 00 call 10d8c4 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b955: a1 b8 94 12 00 mov 0x1294b8,%eax
10b95a: 48 dec %eax
10b95b: a3 b8 94 12 00 mov %eax,0x1294b8
10b960: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b963: c9 leave
10b964: c3 ret
10b965: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b968: 8b 0d c0 9e 12 00 mov 0x129ec0,%ecx
10b96e: 49 dec %ecx
10b96f: 75 cd jne 10b93e <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b971: c7 05 c0 9e 12 00 02 movl $0x2,0x129ec0
10b978: 00 00 00
10b97b: eb c1 jmp 10b93e <_Event_Timeout+0x2e>
00112298 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
112298: 55 push %ebp
112299: 89 e5 mov %esp,%ebp
11229b: 57 push %edi
11229c: 56 push %esi
11229d: 53 push %ebx
11229e: 83 ec 2c sub $0x2c,%esp
1122a1: 8b 7d 0c mov 0xc(%ebp),%edi
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
1122a4: 8b 45 08 mov 0x8(%ebp),%eax
1122a7: 8b 48 08 mov 0x8(%eax),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
1122aa: 8b 50 10 mov 0x10(%eax),%edx
1122ad: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
1122b0: 89 f8 mov %edi,%eax
1122b2: 83 c0 04 add $0x4,%eax
1122b5: 89 45 e0 mov %eax,-0x20(%ebp)
1122b8: 0f 82 5a 01 00 00 jb 112418 <_Heap_Allocate_aligned_with_boundary+0x180>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
1122be: 8b 75 14 mov 0x14(%ebp),%esi
1122c1: 85 f6 test %esi,%esi
1122c3: 0f 85 48 01 00 00 jne 112411 <_Heap_Allocate_aligned_with_boundary+0x179>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
1122c9: 39 4d 08 cmp %ecx,0x8(%ebp)
1122cc: 0f 84 50 01 00 00 je 112422 <_Heap_Allocate_aligned_with_boundary+0x18a>
1122d2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
1122d9: 8b 55 d4 mov -0x2c(%ebp),%edx
1122dc: 83 c2 07 add $0x7,%edx
1122df: 89 55 c8 mov %edx,-0x38(%ebp)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
1122e2: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp)
1122e9: 29 7d d8 sub %edi,-0x28(%ebp)
1122ec: eb 19 jmp 112307 <_Heap_Allocate_aligned_with_boundary+0x6f>
1122ee: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
1122f0: 8d 59 08 lea 0x8(%ecx),%ebx
boundary
);
}
}
if ( alloc_begin != 0 ) {
1122f3: 85 db test %ebx,%ebx
1122f5: 0f 85 e9 00 00 00 jne 1123e4 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN
break;
}
block = block->next;
1122fb: 8b 49 08 mov 0x8(%ecx),%ecx
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
1122fe: 39 4d 08 cmp %ecx,0x8(%ebp)
112301: 0f 84 25 01 00 00 je 11242c <_Heap_Allocate_aligned_with_boundary+0x194>
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
112307: ff 45 e4 incl -0x1c(%ebp)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
11230a: 8b 59 04 mov 0x4(%ecx),%ebx
11230d: 39 5d e0 cmp %ebx,-0x20(%ebp)
112310: 73 e9 jae 1122fb <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
112312: 8b 55 10 mov 0x10(%ebp),%edx
112315: 85 d2 test %edx,%edx
112317: 74 d7 je 1122f0 <_Heap_Allocate_aligned_with_boundary+0x58>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
112319: 8b 45 08 mov 0x8(%ebp),%eax
11231c: 8b 40 14 mov 0x14(%eax),%eax
11231f: 89 45 d0 mov %eax,-0x30(%ebp)
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
112322: 83 e3 fe and $0xfffffffe,%ebx
112325: 8d 1c 19 lea (%ecx,%ebx,1),%ebx
112328: 8d 51 08 lea 0x8(%ecx),%edx
11232b: 89 55 cc mov %edx,-0x34(%ebp)
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;
11232e: 8b 75 c8 mov -0x38(%ebp),%esi
112331: 29 c6 sub %eax,%esi
112333: 01 de add %ebx,%esi
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
112335: 03 5d d8 add -0x28(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
112338: 89 d8 mov %ebx,%eax
11233a: 31 d2 xor %edx,%edx
11233c: f7 75 10 divl 0x10(%ebp)
11233f: 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 ) {
112341: 39 de cmp %ebx,%esi
112343: 73 0b jae 112350 <_Heap_Allocate_aligned_with_boundary+0xb8>
112345: 89 f0 mov %esi,%eax
112347: 31 d2 xor %edx,%edx
112349: f7 75 10 divl 0x10(%ebp)
11234c: 89 f3 mov %esi,%ebx
11234e: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
112350: 8b 45 14 mov 0x14(%ebp),%eax
112353: 85 c0 test %eax,%eax
112355: 74 59 je 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118>
/* 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;
112357: 8d 34 3b lea (%ebx,%edi,1),%esi
11235a: 89 f0 mov %esi,%eax
11235c: 31 d2 xor %edx,%edx
11235e: f7 75 14 divl 0x14(%ebp)
112361: 89 f0 mov %esi,%eax
112363: 29 d0 sub %edx,%eax
112365: 89 c2 mov %eax,%edx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
112367: 39 c3 cmp %eax,%ebx
112369: 73 45 jae 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118>
11236b: 39 c6 cmp %eax,%esi
11236d: 76 41 jbe 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
11236f: 8b 45 cc mov -0x34(%ebp),%eax
112372: 01 f8 add %edi,%eax
112374: 89 45 dc mov %eax,-0x24(%ebp)
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
112377: 39 d0 cmp %edx,%eax
112379: 77 80 ja 1122fb <_Heap_Allocate_aligned_with_boundary+0x63>
11237b: 89 ce mov %ecx,%esi
11237d: eb 0e jmp 11238d <_Heap_Allocate_aligned_with_boundary+0xf5>
11237f: 90 nop
/* 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 ) {
112380: 39 c1 cmp %eax,%ecx
112382: 76 2a jbe 1123ae <_Heap_Allocate_aligned_with_boundary+0x116>
if ( boundary_line < boundary_floor ) {
112384: 39 55 dc cmp %edx,-0x24(%ebp)
112387: 0f 87 a3 00 00 00 ja 112430 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
11238d: 89 d3 mov %edx,%ebx
11238f: 29 fb sub %edi,%ebx
112391: 89 d8 mov %ebx,%eax
112393: 31 d2 xor %edx,%edx
112395: f7 75 10 divl 0x10(%ebp)
112398: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
11239a: 8d 0c 3b lea (%ebx,%edi,1),%ecx
11239d: 89 c8 mov %ecx,%eax
11239f: 31 d2 xor %edx,%edx
1123a1: f7 75 14 divl 0x14(%ebp)
1123a4: 89 c8 mov %ecx,%eax
1123a6: 29 d0 sub %edx,%eax
1123a8: 89 c2 mov %eax,%edx
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
1123aa: 39 c3 cmp %eax,%ebx
1123ac: 72 d2 jb 112380 <_Heap_Allocate_aligned_with_boundary+0xe8>
1123ae: 89 f1 mov %esi,%ecx
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 ) {
1123b0: 39 5d cc cmp %ebx,-0x34(%ebp)
1123b3: 0f 87 42 ff ff ff ja 1122fb <_Heap_Allocate_aligned_with_boundary+0x63>
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;
1123b9: be f8 ff ff ff mov $0xfffffff8,%esi
1123be: 29 ce sub %ecx,%esi
1123c0: 01 de add %ebx,%esi
1123c2: 89 d8 mov %ebx,%eax
1123c4: 31 d2 xor %edx,%edx
1123c6: f7 75 d4 divl -0x2c(%ebp)
1123c9: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
1123cb: 39 75 d0 cmp %esi,-0x30(%ebp)
1123ce: 0f 86 1f ff ff ff jbe 1122f3 <_Heap_Allocate_aligned_with_boundary+0x5b>
1123d4: 85 f6 test %esi,%esi
1123d6: 0f 85 1f ff ff ff jne 1122fb <_Heap_Allocate_aligned_with_boundary+0x63>
boundary
);
}
}
if ( alloc_begin != 0 ) {
1123dc: 85 db test %ebx,%ebx
1123de: 0f 84 17 ff ff ff je 1122fb <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
1123e4: 8b 55 e4 mov -0x1c(%ebp),%edx
1123e7: 8b 45 08 mov 0x8(%ebp),%eax
1123ea: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
1123ed: 57 push %edi
1123ee: 53 push %ebx
1123ef: 51 push %ecx
1123f0: 50 push %eax
1123f1: e8 ca a9 ff ff call 10cdc0 <_Heap_Block_allocate>
1123f6: 89 d8 mov %ebx,%eax
1123f8: 83 c4 10 add $0x10,%esp
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
1123fb: 8b 4d e4 mov -0x1c(%ebp),%ecx
1123fe: 8b 55 08 mov 0x8(%ebp),%edx
112401: 39 4a 44 cmp %ecx,0x44(%edx)
112404: 73 14 jae 11241a <_Heap_Allocate_aligned_with_boundary+0x182>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
112406: 89 4a 44 mov %ecx,0x44(%edx)
}
return (void *) alloc_begin;
}
112409: 8d 65 f4 lea -0xc(%ebp),%esp
11240c: 5b pop %ebx
11240d: 5e pop %esi
11240e: 5f pop %edi
11240f: c9 leave
112410: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
112411: 3b 7d 14 cmp 0x14(%ebp),%edi
112414: 76 21 jbe 112437 <_Heap_Allocate_aligned_with_boundary+0x19f>
112416: 66 90 xchg %ax,%ax
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
112418: 31 c0 xor %eax,%eax
}
return (void *) alloc_begin;
}
11241a: 8d 65 f4 lea -0xc(%ebp),%esp
11241d: 5b pop %ebx
11241e: 5e pop %esi
11241f: 5f pop %edi
112420: c9 leave
112421: c3 ret
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
112422: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
112429: 8d 76 00 lea 0x0(%esi),%esi
11242c: 31 c0 xor %eax,%eax
11242e: eb cb jmp 1123fb <_Heap_Allocate_aligned_with_boundary+0x163>
112430: 89 f1 mov %esi,%ecx <== NOT EXECUTED
112432: e9 c4 fe ff ff jmp 1122fb <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
112437: 8b 5d 10 mov 0x10(%ebp),%ebx
11243a: 85 db test %ebx,%ebx
11243c: 0f 85 87 fe ff ff jne 1122c9 <_Heap_Allocate_aligned_with_boundary+0x31>
112442: 89 55 10 mov %edx,0x10(%ebp)
112445: e9 7f fe ff ff jmp 1122c9 <_Heap_Allocate_aligned_with_boundary+0x31>
0010cdc0 <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
10cdc0: 55 push %ebp
10cdc1: 89 e5 mov %esp,%ebp
10cdc3: 57 push %edi
10cdc4: 56 push %esi
10cdc5: 53 push %ebx
10cdc6: 83 ec 10 sub $0x10,%esp
10cdc9: 8b 75 08 mov 0x8(%ebp),%esi
10cdcc: 8b 5d 0c mov 0xc(%ebp),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10cdcf: 89 5d ec mov %ebx,-0x14(%ebp)
10cdd2: 8b 7d 10 mov 0x10(%ebp),%edi
10cdd5: 83 ef 08 sub $0x8,%edi
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
10cdd8: 89 f8 mov %edi,%eax
10cdda: 29 d8 sub %ebx,%eax
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
10cddc: 8b 53 04 mov 0x4(%ebx),%edx
10cddf: 83 e2 fe and $0xfffffffe,%edx
10cde2: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1)
10cde7: 0f 85 8b 00 00 00 jne 10ce78 <_Heap_Block_allocate+0xb8>
free_list_anchor = block->prev;
10cded: 8b 4b 0c mov 0xc(%ebx),%ecx
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
10cdf0: 8b 53 08 mov 0x8(%ebx),%edx
Heap_Block *prev = block->prev;
prev->next = next;
10cdf3: 89 51 08 mov %edx,0x8(%ecx)
next->prev = prev;
10cdf6: 89 4a 0c mov %ecx,0xc(%edx)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
10cdf9: ff 4e 38 decl 0x38(%esi)
++stats->used_blocks;
10cdfc: ff 46 40 incl 0x40(%esi)
stats->free_size -= _Heap_Block_size( block );
10cdff: 8b 53 04 mov 0x4(%ebx),%edx
10ce02: 83 e2 fe and $0xfffffffe,%edx
10ce05: 29 56 30 sub %edx,0x30(%esi)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
10ce08: 8b 56 10 mov 0x10(%esi),%edx
10ce0b: 89 55 e4 mov %edx,-0x1c(%ebp)
10ce0e: 39 d0 cmp %edx,%eax
10ce10: 72 72 jb 10ce84 <_Heap_Block_allocate+0xc4>
- 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;
10ce12: 8b 43 04 mov 0x4(%ebx),%eax
10ce15: 89 45 f0 mov %eax,-0x10(%ebp)
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 )
10ce18: 8b 45 10 mov 0x10(%ebp),%eax
10ce1b: 31 d2 xor %edx,%edx
10ce1d: f7 75 e4 divl -0x1c(%ebp)
10ce20: 29 d7 sub %edx,%edi
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
10ce22: 89 f8 mov %edi,%eax
10ce24: 29 d8 sub %ebx,%eax
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
10ce26: 01 46 30 add %eax,0x30(%esi)
if ( _Heap_Is_prev_used( block ) ) {
10ce29: f6 43 04 01 testb $0x1,0x4(%ebx)
10ce2d: 75 69 jne 10ce98 <_Heap_Block_allocate+0xd8>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
10ce2f: 2b 1b sub (%ebx),%ebx
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
10ce31: 8b 53 04 mov 0x4(%ebx),%edx
10ce34: 83 e2 fe and $0xfffffffe,%edx
10ce37: 01 d0 add %edx,%eax
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
10ce39: 89 c2 mov %eax,%edx
10ce3b: 83 ca 01 or $0x1,%edx
10ce3e: 89 53 04 mov %edx,0x4(%ebx)
new_block->prev_size = block_size;
10ce41: 89 07 mov %eax,(%edi)
new_block->size_and_flag = new_block_size;
10ce43: 8b 45 f0 mov -0x10(%ebp),%eax
10ce46: 83 e0 fe and $0xfffffffe,%eax
10ce49: 03 45 ec add -0x14(%ebp),%eax
10ce4c: 29 f8 sub %edi,%eax
10ce4e: 89 47 04 mov %eax,0x4(%edi)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
10ce51: ff 75 14 pushl 0x14(%ebp)
10ce54: 51 push %ecx
10ce55: 57 push %edi
10ce56: 56 push %esi
10ce57: e8 80 fe ff ff call 10ccdc <_Heap_Block_split>
10ce5c: 89 fb mov %edi,%ebx
10ce5e: 83 c4 10 add $0x10,%esp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
10ce61: 8b 46 30 mov 0x30(%esi),%eax
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
10ce64: 39 46 34 cmp %eax,0x34(%esi)
10ce67: 76 03 jbe 10ce6c <_Heap_Block_allocate+0xac>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
10ce69: 89 46 34 mov %eax,0x34(%esi)
}
return block;
}
10ce6c: 89 d8 mov %ebx,%eax
10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp
10ce71: 5b pop %ebx
10ce72: 5e pop %esi
10ce73: 5f pop %edi
10ce74: c9 leave
10ce75: c3 ret
10ce76: 66 90 xchg %ax,%ax
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
10ce78: 89 f1 mov %esi,%ecx
}
if ( alloc_area_offset < heap->page_size ) {
10ce7a: 8b 56 10 mov 0x10(%esi),%edx
10ce7d: 89 55 e4 mov %edx,-0x1c(%ebp)
10ce80: 39 d0 cmp %edx,%eax
10ce82: 73 8e jae 10ce12 <_Heap_Block_allocate+0x52><== NEVER TAKEN
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
10ce84: 03 45 14 add 0x14(%ebp),%eax
10ce87: 50 push %eax
10ce88: 51 push %ecx
10ce89: 53 push %ebx
10ce8a: 56 push %esi
10ce8b: e8 4c fe ff ff call 10ccdc <_Heap_Block_split>
10ce90: 83 c4 10 add $0x10,%esp
10ce93: eb cc jmp 10ce61 <_Heap_Block_allocate+0xa1>
10ce95: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10ce98: 8b 51 08 mov 0x8(%ecx),%edx
new_block->next = next;
10ce9b: 89 53 08 mov %edx,0x8(%ebx)
new_block->prev = block_before;
10ce9e: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
10cea1: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
10cea4: 89 5a 0c mov %ebx,0xc(%edx)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
10cea7: ff 46 38 incl 0x38(%esi)
10ceaa: 89 d9 mov %ebx,%ecx
10ceac: eb 8b jmp 10ce39 <_Heap_Block_allocate+0x79>
0010ccdc <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
10ccdc: 55 push %ebp
10ccdd: 89 e5 mov %esp,%ebp
10ccdf: 57 push %edi
10cce0: 56 push %esi
10cce1: 53 push %ebx
10cce2: 83 ec 14 sub $0x14,%esp
10cce5: 8b 4d 08 mov 0x8(%ebp),%ecx
10cce8: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
10cceb: 8b 79 10 mov 0x10(%ecx),%edi
uintptr_t const min_block_size = heap->min_block_size;
10ccee: 8b 41 14 mov 0x14(%ecx),%eax
10ccf1: 89 45 e8 mov %eax,-0x18(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10ccf4: 8b 43 04 mov 0x4(%ebx),%eax
10ccf7: 89 45 e4 mov %eax,-0x1c(%ebp)
10ccfa: 89 c6 mov %eax,%esi
10ccfc: 83 e6 fe and $0xfffffffe,%esi
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
10ccff: 8b 55 e8 mov -0x18(%ebp),%edx
10cd02: 83 ea 08 sub $0x8,%edx
10cd05: 8b 45 14 mov 0x14(%ebp),%eax
10cd08: 39 d0 cmp %edx,%eax
10cd0a: 73 02 jae 10cd0e <_Heap_Block_split+0x32>
10cd0c: 89 d0 mov %edx,%eax
10cd0e: 83 c0 08 add $0x8,%eax
10cd11: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10cd14: 31 d2 xor %edx,%edx
10cd16: f7 f7 div %edi
if ( remainder != 0 ) {
10cd18: 85 d2 test %edx,%edx
10cd1a: 75 70 jne 10cd8c <_Heap_Block_split+0xb0>
10cd1c: 8b 7d f0 mov -0x10(%ebp),%edi
10cd1f: 89 7d ec mov %edi,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10cd22: 8d 04 33 lea (%ebx,%esi,1),%eax
10cd25: 89 45 e0 mov %eax,-0x20(%ebp)
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET );
_HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET );
if ( free_size >= free_size_limit ) {
10cd28: 8d 56 04 lea 0x4(%esi),%edx
10cd2b: 2b 55 f0 sub -0x10(%ebp),%edx
10cd2e: 8b 7d e8 mov -0x18(%ebp),%edi
10cd31: 83 c7 04 add $0x4,%edi
10cd34: 39 fa cmp %edi,%edx
10cd36: 72 60 jb 10cd98 <_Heap_Block_split+0xbc>
10cd38: 8b 55 ec mov -0x14(%ebp),%edx
10cd3b: 01 da add %ebx,%edx
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
10cd3d: 2b 75 ec sub -0x14(%ebp),%esi
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
10cd40: 8b 7d e4 mov -0x1c(%ebp),%edi
10cd43: 83 e7 01 and $0x1,%edi
10cd46: 0b 7d ec or -0x14(%ebp),%edi
10cd49: 89 7b 04 mov %edi,0x4(%ebx)
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
10cd4c: 01 71 30 add %esi,0x30(%ecx)
- 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;
10cd4f: 8b 58 04 mov 0x4(%eax),%ebx
10cd52: 83 e3 fe and $0xfffffffe,%ebx
if ( _Heap_Is_used( next_block ) ) {
10cd55: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1)
10cd5a: 75 4c jne 10cda8 <_Heap_Block_split+0xcc>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
10cd5c: 8b 48 08 mov 0x8(%eax),%ecx
Heap_Block *prev = old_block->prev;
10cd5f: 8b 40 0c mov 0xc(%eax),%eax
new_block->next = next;
10cd62: 89 4a 08 mov %ecx,0x8(%edx)
new_block->prev = prev;
10cd65: 89 42 0c mov %eax,0xc(%edx)
next->prev = new_block;
10cd68: 89 51 0c mov %edx,0xc(%ecx)
prev->next = new_block;
10cd6b: 89 50 08 mov %edx,0x8(%eax)
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
10cd6e: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10cd70: 8d 04 16 lea (%esi,%edx,1),%eax
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
10cd73: 89 f1 mov %esi,%ecx
10cd75: 83 c9 01 or $0x1,%ecx
10cd78: 89 4a 04 mov %ecx,0x4(%edx)
next_block->prev_size = free_block_size;
10cd7b: 89 30 mov %esi,(%eax)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
10cd7d: 83 60 04 fe andl $0xfffffffe,0x4(%eax)
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
}
}
10cd81: 83 c4 14 add $0x14,%esp
10cd84: 5b pop %ebx
10cd85: 5e pop %esi
10cd86: 5f pop %edi
10cd87: c9 leave
10cd88: c3 ret
10cd89: 8d 76 00 lea 0x0(%esi),%esi
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
10cd8c: 03 7d f0 add -0x10(%ebp),%edi
10cd8f: 29 d7 sub %edx,%edi
10cd91: 89 7d ec mov %edi,-0x14(%ebp)
10cd94: eb 8c jmp 10cd22 <_Heap_Block_split+0x46>
10cd96: 66 90 xchg %ax,%ax
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
10cd98: 8b 45 e0 mov -0x20(%ebp),%eax
10cd9b: 83 48 04 01 orl $0x1,0x4(%eax)
}
}
10cd9f: 83 c4 14 add $0x14,%esp
10cda2: 5b pop %ebx
10cda3: 5e pop %esi
10cda4: 5f pop %edi
10cda5: c9 leave
10cda6: c3 ret
10cda7: 90 nop
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
10cda8: 8b 7d 10 mov 0x10(%ebp),%edi
10cdab: 8b 5f 08 mov 0x8(%edi),%ebx
new_block->next = next;
10cdae: 89 5a 08 mov %ebx,0x8(%edx)
new_block->prev = block_before;
10cdb1: 89 7a 0c mov %edi,0xc(%edx)
block_before->next = new_block;
10cdb4: 89 57 08 mov %edx,0x8(%edi)
next->prev = new_block;
10cdb7: 89 53 0c mov %edx,0xc(%ebx)
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
10cdba: ff 41 38 incl 0x38(%ecx)
10cdbd: eb b4 jmp 10cd73 <_Heap_Block_split+0x97>
00115c00 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
115c00: 55 push %ebp
115c01: 89 e5 mov %esp,%ebp
115c03: 56 push %esi
115c04: 53 push %ebx
115c05: 8b 4d 08 mov 0x8(%ebp),%ecx
115c08: 8b 45 0c mov 0xc(%ebp),%eax
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
115c0b: 8b 51 1c mov 0x1c(%ecx),%edx
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
115c0e: 8b 59 24 mov 0x24(%ecx),%ebx
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
115c11: 3b 41 18 cmp 0x18(%ecx),%eax
115c14: 73 3a jae 115c50 <_Heap_Extend+0x50>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
115c16: 39 d0 cmp %edx,%eax
115c18: 74 0e je 115c28 <_Heap_Extend+0x28>
115c1a: b8 02 00 00 00 mov $0x2,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c1f: 8d 65 f8 lea -0x8(%ebp),%esp
115c22: 5b pop %ebx
115c23: 5e pop %esi
115c24: c9 leave
115c25: c3 ret
115c26: 66 90 xchg %ax,%ax
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
115c28: 03 45 10 add 0x10(%ebp),%eax
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
115c2b: 89 41 1c mov %eax,0x1c(%ecx)
extend_size = new_heap_area_end
115c2e: 29 d8 sub %ebx,%eax
115c30: 8d 70 f8 lea -0x8(%eax),%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
115c33: 89 f0 mov %esi,%eax
115c35: 31 d2 xor %edx,%edx
115c37: f7 71 10 divl 0x10(%ecx)
115c3a: 29 d6 sub %edx,%esi
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
115c3c: 8b 45 14 mov 0x14(%ebp),%eax
115c3f: 89 30 mov %esi,(%eax)
if( extend_size >= heap->min_block_size ) {
115c41: 39 71 14 cmp %esi,0x14(%ecx)
115c44: 76 1a jbe 115c60 <_Heap_Extend+0x60> <== ALWAYS TAKEN
115c46: 31 c0 xor %eax,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c48: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
115c4b: 5b pop %ebx <== NOT EXECUTED
115c4c: 5e pop %esi <== NOT EXECUTED
115c4d: c9 leave <== NOT EXECUTED
115c4e: c3 ret <== NOT EXECUTED
115c4f: 90 nop <== NOT EXECUTED
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
115c50: 39 d0 cmp %edx,%eax
115c52: 73 c2 jae 115c16 <_Heap_Extend+0x16>
115c54: b8 01 00 00 00 mov $0x1,%eax
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c59: 8d 65 f8 lea -0x8(%ebp),%esp
115c5c: 5b pop %ebx
115c5d: 5e pop %esi
115c5e: c9 leave
115c5f: c3 ret
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
115c60: 8d 14 1e lea (%esi,%ebx,1),%edx
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
115c63: 8b 43 04 mov 0x4(%ebx),%eax
115c66: 83 e0 01 and $0x1,%eax
115c69: 09 f0 or %esi,%eax
115c6b: 89 43 04 mov %eax,0x4(%ebx)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
115c6e: 8b 41 20 mov 0x20(%ecx),%eax
115c71: 29 d0 sub %edx,%eax
115c73: 83 c8 01 or $0x1,%eax
115c76: 89 42 04 mov %eax,0x4(%edx)
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
115c79: 89 51 24 mov %edx,0x24(%ecx)
/* Statistics */
stats->size += extend_size;
115c7c: 01 71 2c add %esi,0x2c(%ecx)
++stats->used_blocks;
115c7f: ff 41 40 incl 0x40(%ecx)
--stats->frees; /* Do not count subsequent call as actual free() */
115c82: ff 49 50 decl 0x50(%ecx)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
115c85: 83 ec 08 sub $0x8,%esp
115c88: 83 c3 08 add $0x8,%ebx
115c8b: 53 push %ebx
115c8c: 51 push %ecx
115c8d: e8 12 9f ff ff call 10fba4 <_Heap_Free>
115c92: 31 c0 xor %eax,%eax
115c94: 83 c4 10 add $0x10,%esp
}
return HEAP_EXTEND_SUCCESSFUL;
}
115c97: 8d 65 f8 lea -0x8(%ebp),%esp
115c9a: 5b pop %ebx
115c9b: 5e pop %esi
115c9c: c9 leave
115c9d: c3 ret
0011244c <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
11244c: 55 push %ebp
11244d: 89 e5 mov %esp,%ebp
11244f: 57 push %edi
112450: 56 push %esi
112451: 53 push %ebx
112452: 83 ec 18 sub $0x18,%esp
112455: 8b 5d 08 mov 0x8(%ebp),%ebx
112458: 8b 45 0c mov 0xc(%ebp),%eax
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
11245b: 8d 48 f8 lea -0x8(%eax),%ecx
11245e: 31 d2 xor %edx,%edx
112460: f7 73 10 divl 0x10(%ebx)
112463: 29 d1 sub %edx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
112465: 8b 43 20 mov 0x20(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
112468: 39 c1 cmp %eax,%ecx
11246a: 72 07 jb 112473 <_Heap_Free+0x27>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11246c: 8b 73 24 mov 0x24(%ebx),%esi
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
11246f: 39 f1 cmp %esi,%ecx
112471: 76 0d jbe 112480 <_Heap_Free+0x34>
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
112473: 31 c0 xor %eax,%eax
}
112475: 83 c4 18 add $0x18,%esp
112478: 5b pop %ebx
112479: 5e pop %esi
11247a: 5f pop %edi
11247b: c9 leave
11247c: c3 ret
11247d: 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;
112480: 8b 51 04 mov 0x4(%ecx),%edx
112483: 89 55 f0 mov %edx,-0x10(%ebp)
112486: 83 e2 fe and $0xfffffffe,%edx
112489: 89 55 ec mov %edx,-0x14(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
11248c: 01 ca add %ecx,%edx
11248e: 89 55 dc mov %edx,-0x24(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
112491: 39 d0 cmp %edx,%eax
112493: 77 de ja 112473 <_Heap_Free+0x27> <== NEVER TAKEN
112495: 39 d6 cmp %edx,%esi
112497: 72 da jb 112473 <_Heap_Free+0x27> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
112499: 8b 7a 04 mov 0x4(%edx),%edi
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
11249c: f7 c7 01 00 00 00 test $0x1,%edi
1124a2: 74 cf je 112473 <_Heap_Free+0x27> <== 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;
1124a4: 83 e7 fe and $0xfffffffe,%edi
1124a7: 89 7d e8 mov %edi,-0x18(%ebp)
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
1124aa: 39 d6 cmp %edx,%esi
1124ac: 0f 84 e2 00 00 00 je 112594 <_Heap_Free+0x148>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
1124b2: 8b 55 dc mov -0x24(%ebp),%edx
1124b5: 8b 7d e8 mov -0x18(%ebp),%edi
1124b8: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi
1124bc: 89 7d e0 mov %edi,-0x20(%ebp)
1124bf: 8a 55 e0 mov -0x20(%ebp),%dl
1124c2: 83 e2 01 and $0x1,%edx
1124c5: 88 55 e7 mov %dl,-0x19(%ebp)
1124c8: 80 75 e7 01 xorb $0x1,-0x19(%ebp)
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 ) ) {
1124cc: f6 45 f0 01 testb $0x1,-0x10(%ebp)
1124d0: 75 46 jne 112518 <_Heap_Free+0xcc>
uintptr_t const prev_size = block->prev_size;
1124d2: 8b 39 mov (%ecx),%edi
1124d4: 89 7d f0 mov %edi,-0x10(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
1124d7: 29 f9 sub %edi,%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
1124d9: 39 c8 cmp %ecx,%eax
1124db: 77 96 ja 112473 <_Heap_Free+0x27> <== NEVER TAKEN
1124dd: 39 ce cmp %ecx,%esi
1124df: 72 92 jb 112473 <_Heap_Free+0x27> <== 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) ) {
1124e1: f6 41 04 01 testb $0x1,0x4(%ecx)
1124e5: 74 8c je 112473 <_Heap_Free+0x27> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
1124e7: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
1124eb: 0f 84 af 00 00 00 je 1125a0 <_Heap_Free+0x154>
uintptr_t const size = block_size + prev_size + next_block_size;
1124f1: 8b 45 ec mov -0x14(%ebp),%eax
1124f4: 03 45 e8 add -0x18(%ebp),%eax
1124f7: 01 f8 add %edi,%eax
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
1124f9: 8b 55 dc mov -0x24(%ebp),%edx
1124fc: 8b 72 08 mov 0x8(%edx),%esi
Heap_Block *prev = block->prev;
1124ff: 8b 52 0c mov 0xc(%edx),%edx
prev->next = next;
112502: 89 72 08 mov %esi,0x8(%edx)
next->prev = prev;
112505: 89 56 0c mov %edx,0xc(%esi)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
112508: ff 4b 38 decl 0x38(%ebx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
11250b: 89 c2 mov %eax,%edx
11250d: 83 ca 01 or $0x1,%edx
112510: 89 51 04 mov %edx,0x4(%ecx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
112513: 89 04 01 mov %eax,(%ecx,%eax,1)
112516: eb 2c jmp 112544 <_Heap_Free+0xf8>
uintptr_t const size = block_size + prev_size;
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 */
112518: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
11251c: 74 3e je 11255c <_Heap_Free+0x110>
uintptr_t const size = block_size + next_block_size;
11251e: 8b 7d e8 mov -0x18(%ebp),%edi
112521: 03 7d ec add -0x14(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
112524: 8b 75 dc mov -0x24(%ebp),%esi
112527: 8b 46 08 mov 0x8(%esi),%eax
Heap_Block *prev = old_block->prev;
11252a: 8b 56 0c mov 0xc(%esi),%edx
new_block->next = next;
11252d: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = prev;
112530: 89 51 0c mov %edx,0xc(%ecx)
next->prev = new_block;
112533: 89 48 0c mov %ecx,0xc(%eax)
prev->next = new_block;
112536: 89 4a 08 mov %ecx,0x8(%edx)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
112539: 89 f8 mov %edi,%eax
11253b: 83 c8 01 or $0x1,%eax
11253e: 89 41 04 mov %eax,0x4(%ecx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
112541: 89 3c 39 mov %edi,(%ecx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
112544: ff 4b 40 decl 0x40(%ebx)
++stats->frees;
112547: ff 43 50 incl 0x50(%ebx)
stats->free_size += block_size;
11254a: 8b 55 ec mov -0x14(%ebp),%edx
11254d: 01 53 30 add %edx,0x30(%ebx)
112550: b0 01 mov $0x1,%al
return( true );
}
112552: 83 c4 18 add $0x18,%esp
112555: 5b pop %ebx
112556: 5e pop %esi
112557: 5f pop %edi
112558: c9 leave
112559: c3 ret
11255a: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
11255c: 8b 43 08 mov 0x8(%ebx),%eax
new_block->next = next;
11255f: 89 41 08 mov %eax,0x8(%ecx)
new_block->prev = block_before;
112562: 89 59 0c mov %ebx,0xc(%ecx)
block_before->next = new_block;
112565: 89 4b 08 mov %ecx,0x8(%ebx)
next->prev = new_block;
112568: 89 48 0c mov %ecx,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;
11256b: 8b 45 ec mov -0x14(%ebp),%eax
11256e: 83 c8 01 or $0x1,%eax
112571: 89 41 04 mov %eax,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
112574: 8b 7d dc mov -0x24(%ebp),%edi
112577: 83 67 04 fe andl $0xfffffffe,0x4(%edi)
next_block->prev_size = block_size;
11257b: 8b 45 ec mov -0x14(%ebp),%eax
11257e: 89 07 mov %eax,(%edi)
/* Statistics */
++stats->free_blocks;
112580: 8b 43 38 mov 0x38(%ebx),%eax
112583: 40 inc %eax
112584: 89 43 38 mov %eax,0x38(%ebx)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
112587: 3b 43 3c cmp 0x3c(%ebx),%eax
11258a: 76 b8 jbe 112544 <_Heap_Free+0xf8>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
11258c: 89 43 3c mov %eax,0x3c(%ebx)
11258f: eb b3 jmp 112544 <_Heap_Free+0xf8>
112591: 8d 76 00 lea 0x0(%esi),%esi
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
112594: c6 45 e7 00 movb $0x0,-0x19(%ebp)
112598: e9 2f ff ff ff jmp 1124cc <_Heap_Free+0x80>
11259d: 8d 76 00 lea 0x0(%esi),%esi
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
1125a0: 8b 45 ec mov -0x14(%ebp),%eax
1125a3: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1125a6: 89 c6 mov %eax,%esi
1125a8: 83 ce 01 or $0x1,%esi
1125ab: 89 71 04 mov %esi,0x4(%ecx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
1125ae: 8b 55 dc mov -0x24(%ebp),%edx
1125b1: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
1125b5: 89 02 mov %eax,(%edx)
1125b7: eb 8b jmp 112544 <_Heap_Free+0xf8>
00115ca0 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
115ca0: 55 push %ebp
115ca1: 89 e5 mov %esp,%ebp
115ca3: 57 push %edi
115ca4: 56 push %esi
115ca5: 53 push %ebx
115ca6: 8b 7d 08 mov 0x8(%ebp),%edi
115ca9: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
115cac: c7 06 00 00 00 00 movl $0x0,(%esi)
info->largest = 0;
115cb2: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
info->total = 0;
115cb9: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
115cc0: 8b 57 08 mov 0x8(%edi),%edx
for(the_block = _Heap_Free_list_first(the_heap);
115cc3: 39 d7 cmp %edx,%edi
115cc5: 74 2a je 115cf1 <_Heap_Get_free_information+0x51><== NEVER TAKEN
115cc7: bb 01 00 00 00 mov $0x1,%ebx
115ccc: 31 c9 xor %ecx,%ecx
115cce: eb 02 jmp 115cd2 <_Heap_Get_free_information+0x32>
115cd0: 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;
115cd2: 8b 42 04 mov 0x4(%edx),%eax
115cd5: 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;
115cd8: 01 c1 add %eax,%ecx
if ( info->largest < the_size )
115cda: 39 46 04 cmp %eax,0x4(%esi)
115cdd: 73 03 jae 115ce2 <_Heap_Get_free_information+0x42>
info->largest = the_size;
115cdf: 89 46 04 mov %eax,0x4(%esi)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
115ce2: 8b 52 08 mov 0x8(%edx),%edx
115ce5: 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);
115ce8: 39 d7 cmp %edx,%edi
115cea: 75 e4 jne 115cd0 <_Heap_Get_free_information+0x30>
115cec: 89 1e mov %ebx,(%esi)
115cee: 89 4e 08 mov %ecx,0x8(%esi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115cf1: 5b pop %ebx
115cf2: 5e pop %esi
115cf3: 5f pop %edi
115cf4: c9 leave
115cf5: c3 ret
00115cf8 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
115cf8: 55 push %ebp
115cf9: 89 e5 mov %esp,%ebp
115cfb: 57 push %edi
115cfc: 56 push %esi
115cfd: 53 push %ebx
115cfe: 83 ec 04 sub $0x4,%esp
115d01: 8b 45 08 mov 0x8(%ebp),%eax
115d04: 8b 75 0c mov 0xc(%ebp),%esi
Heap_Block *the_block = the_heap->first_block;
115d07: 8b 58 20 mov 0x20(%eax),%ebx
Heap_Block *const end = the_heap->last_block;
115d0a: 8b 78 24 mov 0x24(%eax),%edi
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
115d0d: c7 06 00 00 00 00 movl $0x0,(%esi)
the_info->Free.total = 0;
115d13: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi)
the_info->Free.largest = 0;
115d1a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
the_info->Used.number = 0;
115d21: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
the_info->Used.total = 0;
115d28: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi)
the_info->Used.largest = 0;
115d2f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi)
while ( the_block != end ) {
115d36: 39 fb cmp %edi,%ebx
115d38: 74 45 je 115d7f <_Heap_Get_information+0x87><== NEVER TAKEN
115d3a: 8b 4b 04 mov 0x4(%ebx),%ecx
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
115d3d: 8d 46 0c lea 0xc(%esi),%eax
115d40: 89 45 f0 mov %eax,-0x10(%ebp)
115d43: eb 16 jmp 115d5b <_Heap_Get_information+0x63>
115d45: 8d 76 00 lea 0x0(%esi),%esi
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
115d48: 89 f0 mov %esi,%eax
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
115d4a: ff 00 incl (%eax)
info->total += the_size;
115d4c: 01 50 08 add %edx,0x8(%eax)
if ( info->largest < the_size )
115d4f: 39 50 04 cmp %edx,0x4(%eax)
115d52: 73 03 jae 115d57 <_Heap_Get_information+0x5f>
info->largest = the_size;
115d54: 89 50 04 mov %edx,0x4(%eax)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
115d57: 39 df cmp %ebx,%edi
115d59: 74 15 je 115d70 <_Heap_Get_information+0x78>
115d5b: 89 ca mov %ecx,%edx
115d5d: 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);
115d60: 01 d3 add %edx,%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;
115d62: 8b 4b 04 mov 0x4(%ebx),%ecx
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
115d65: f6 c1 01 test $0x1,%cl
115d68: 74 de je 115d48 <_Heap_Get_information+0x50>
115d6a: 8b 45 f0 mov -0x10(%ebp),%eax
115d6d: eb db jmp 115d4a <_Heap_Get_information+0x52>
115d6f: 90 nop
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
115d70: 8b 46 14 mov 0x14(%esi),%eax
115d73: 83 c0 08 add $0x8,%eax
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
115d76: 89 46 14 mov %eax,0x14(%esi)
}
115d79: 58 pop %eax
115d7a: 5b pop %ebx
115d7b: 5e pop %esi
115d7c: 5f pop %edi
115d7d: c9 leave
115d7e: c3 ret
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
115d7f: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED
115d84: eb f0 jmp 115d76 <_Heap_Get_information+0x7e><== NOT EXECUTED
00120b64 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
120b64: 55 push %ebp
120b65: 89 e5 mov %esp,%ebp
120b67: 57 push %edi
120b68: 56 push %esi
120b69: 53 push %ebx
120b6a: 83 ec 2c sub $0x2c,%esp
120b6d: 8b 5d 08 mov 0x8(%ebp),%ebx
120b70: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
120b73: 8d 4e f8 lea -0x8(%esi),%ecx
120b76: 89 f0 mov %esi,%eax
120b78: 31 d2 xor %edx,%edx
120b7a: f7 73 10 divl 0x10(%ebx)
120b7d: 29 d1 sub %edx,%ecx
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
120b7f: 8b 45 14 mov 0x14(%ebp),%eax
120b82: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
120b88: 8b 55 18 mov 0x18(%ebp),%edx
120b8b: c7 02 00 00 00 00 movl $0x0,(%edx)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
120b91: 39 4b 20 cmp %ecx,0x20(%ebx)
120b94: 76 0e jbe 120ba4 <_Heap_Resize_block+0x40>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
/* Statistics */
++stats->resizes;
120b96: b8 02 00 00 00 mov $0x2,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120b9b: 8d 65 f4 lea -0xc(%ebp),%esp
120b9e: 5b pop %ebx
120b9f: 5e pop %esi
120ba0: 5f pop %edi
120ba1: c9 leave
120ba2: c3 ret
120ba3: 90 nop
120ba4: 39 4b 24 cmp %ecx,0x24(%ebx)
120ba7: 72 ed jb 120b96 <_Heap_Resize_block+0x32>
- 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;
120ba9: 8b 41 04 mov 0x4(%ecx),%eax
120bac: 83 e0 fe and $0xfffffffe,%eax
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
120baf: 8d 3c 01 lea (%ecx,%eax,1),%edi
120bb2: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
120bb5: 89 fa mov %edi,%edx
120bb7: 29 f2 sub %esi,%edx
120bb9: 83 c2 04 add $0x4,%edx
120bbc: 89 55 dc mov %edx,-0x24(%ebp)
120bbf: 8b 57 04 mov 0x4(%edi),%edx
120bc2: 83 e2 fe and $0xfffffffe,%edx
120bc5: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
120bc8: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx
120bcc: 83 e2 01 and $0x1,%edx
120bcf: 89 55 e0 mov %edx,-0x20(%ebp)
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
120bd2: 8b 55 dc mov -0x24(%ebp),%edx
120bd5: 8b 7d 14 mov 0x14(%ebp),%edi
120bd8: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
120bda: 8a 55 e0 mov -0x20(%ebp),%dl
120bdd: 80 f2 01 xor $0x1,%dl
120be0: 88 55 e0 mov %dl,-0x20(%ebp)
120be3: 75 17 jne 120bfc <_Heap_Resize_block+0x98>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
120be5: 8b 55 dc mov -0x24(%ebp),%edx
120be8: 39 55 10 cmp %edx,0x10(%ebp)
120beb: 76 20 jbe 120c0d <_Heap_Resize_block+0xa9>
120bed: b8 01 00 00 00 mov $0x1,%eax
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120bf2: 8d 65 f4 lea -0xc(%ebp),%esp
120bf5: 5b pop %ebx
120bf6: 5e pop %esi
120bf7: 5f pop %edi
120bf8: c9 leave
120bf9: c3 ret
120bfa: 66 90 xchg %ax,%ax
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
120bfc: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
120bff: 8b 7d d0 mov -0x30(%ebp),%edi
120c02: 01 7d dc add %edi,-0x24(%ebp)
}
if ( new_alloc_size > alloc_size ) {
120c05: 8b 55 dc mov -0x24(%ebp),%edx
120c08: 39 55 10 cmp %edx,0x10(%ebp)
120c0b: 77 e0 ja 120bed <_Heap_Resize_block+0x89>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
120c0d: 80 7d e0 00 cmpb $0x0,-0x20(%ebp)
120c11: 74 31 je 120c44 <_Heap_Resize_block+0xe0>
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
120c13: 8b 79 04 mov 0x4(%ecx),%edi
120c16: 83 e7 01 and $0x1,%edi
120c19: 09 c7 or %eax,%edi
120c1b: 89 79 04 mov %edi,0x4(%ecx)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
120c1e: 8b 7d d4 mov -0x2c(%ebp),%edi
120c21: 8b 7f 08 mov 0x8(%edi),%edi
120c24: 89 7d e4 mov %edi,-0x1c(%ebp)
Heap_Block *prev = block->prev;
120c27: 8b 55 d4 mov -0x2c(%ebp),%edx
120c2a: 8b 7a 0c mov 0xc(%edx),%edi
prev->next = next;
120c2d: 8b 55 e4 mov -0x1c(%ebp),%edx
120c30: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
120c33: 89 7a 0c mov %edi,0xc(%edx)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
120c36: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1)
/* Statistics */
--stats->free_blocks;
120c3b: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
120c3e: 8b 7d d0 mov -0x30(%ebp),%edi
120c41: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
120c44: ff 75 10 pushl 0x10(%ebp)
120c47: 56 push %esi
120c48: 51 push %ecx
120c49: 53 push %ebx
120c4a: e8 71 c1 fe ff call 10cdc0 <_Heap_Block_allocate>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET;
120c4f: 8b 50 04 mov 0x4(%eax),%edx
120c52: 83 e2 fe and $0xfffffffe,%edx
120c55: 29 f0 sub %esi,%eax
120c57: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
120c5b: 8b 55 18 mov 0x18(%ebp),%edx
120c5e: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
120c60: ff 43 54 incl 0x54(%ebx)
120c63: 31 c0 xor %eax,%eax
120c65: 83 c4 10 add $0x10,%esp
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
120c68: 8d 65 f4 lea -0xc(%ebp),%esp
120c6b: 5b pop %ebx
120c6c: 5e pop %esi
120c6d: 5f pop %edi
120c6e: c9 leave
120c6f: c3 ret
00120c70 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
120c70: 55 push %ebp
120c71: 89 e5 mov %esp,%ebp
120c73: 56 push %esi
120c74: 53 push %ebx
120c75: 8b 5d 08 mov 0x8(%ebp),%ebx
120c78: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
120c7b: 8d 4e f8 lea -0x8(%esi),%ecx
120c7e: 89 f0 mov %esi,%eax
120c80: 31 d2 xor %edx,%edx
120c82: f7 73 10 divl 0x10(%ebx)
120c85: 29 d1 sub %edx,%ecx
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
120c87: 8b 43 20 mov 0x20(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
120c8a: 39 c1 cmp %eax,%ecx
120c8c: 72 07 jb 120c95 <_Heap_Size_of_alloc_area+0x25>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
120c8e: 8b 53 24 mov 0x24(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
120c91: 39 d1 cmp %edx,%ecx
120c93: 76 07 jbe 120c9c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
120c95: 31 c0 xor %eax,%eax
}
120c97: 5b pop %ebx
120c98: 5e pop %esi
120c99: c9 leave
120c9a: c3 ret
120c9b: 90 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
120c9c: 8b 59 04 mov 0x4(%ecx),%ebx
120c9f: 83 e3 fe and $0xfffffffe,%ebx
120ca2: 01 d9 add %ebx,%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
120ca4: 39 c8 cmp %ecx,%eax
120ca6: 77 ed ja 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
120ca8: 39 ca cmp %ecx,%edx
120caa: 72 e9 jb 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
120cac: f6 41 04 01 testb $0x1,0x4(%ecx)
120cb0: 74 e3 je 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
120cb2: 29 f1 sub %esi,%ecx
120cb4: 8d 51 04 lea 0x4(%ecx),%edx
120cb7: 8b 45 10 mov 0x10(%ebp),%eax
120cba: 89 10 mov %edx,(%eax)
120cbc: b0 01 mov $0x1,%al
return true;
}
120cbe: 5b pop %ebx
120cbf: 5e pop %esi
120cc0: c9 leave
120cc1: c3 ret
0010d928 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
10d928: 55 push %ebp
10d929: 89 e5 mov %esp,%ebp
10d92b: 57 push %edi
10d92c: 56 push %esi
10d92d: 53 push %ebx
10d92e: 83 ec 3c sub $0x3c,%esp
10d931: 8b 5d 08 mov 0x8(%ebp),%ebx
uintptr_t const page_size = heap->page_size;
10d934: 8b 43 10 mov 0x10(%ebx),%eax
10d937: 89 45 e0 mov %eax,-0x20(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
10d93a: 8b 53 14 mov 0x14(%ebx),%edx
10d93d: 89 55 dc mov %edx,-0x24(%ebp)
Heap_Block *const last_block = heap->last_block;
10d940: 8b 43 24 mov 0x24(%ebx),%eax
10d943: 89 45 d8 mov %eax,-0x28(%ebp)
Heap_Block *block = heap->first_block;
10d946: 8b 73 20 mov 0x20(%ebx),%esi
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d949: 80 7d 10 00 cmpb $0x0,0x10(%ebp)
10d94d: 75 1d jne 10d96c <_Heap_Walk+0x44>
10d94f: c7 45 e4 20 d9 10 00 movl $0x10d920,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d956: 83 3d 20 bc 12 00 03 cmpl $0x3,0x12bc20
10d95d: 74 1d je 10d97c <_Heap_Walk+0x54>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10d95f: b0 01 mov $0x1,%al
block = next_block;
}
return true;
}
10d961: 8d 65 f4 lea -0xc(%ebp),%esp
10d964: 5b pop %ebx
10d965: 5e pop %esi
10d966: 5f pop %edi
10d967: c9 leave
10d968: c3 ret
10d969: 8d 76 00 lea 0x0(%esi),%esi
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
10d96c: c7 45 e4 f0 dc 10 00 movl $0x10dcf0,-0x1c(%ebp)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
10d973: 83 3d 20 bc 12 00 03 cmpl $0x3,0x12bc20
10d97a: 75 e3 jne 10d95f <_Heap_Walk+0x37> <== NEVER TAKEN
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)(
10d97c: 52 push %edx
10d97d: ff 73 0c pushl 0xc(%ebx)
10d980: ff 73 08 pushl 0x8(%ebx)
10d983: ff 75 d8 pushl -0x28(%ebp)
10d986: 56 push %esi
10d987: ff 73 1c pushl 0x1c(%ebx)
10d98a: ff 73 18 pushl 0x18(%ebx)
10d98d: ff 75 dc pushl -0x24(%ebp)
10d990: ff 75 e0 pushl -0x20(%ebp)
10d993: 68 10 3b 12 00 push $0x123b10
10d998: 6a 00 push $0x0
10d99a: ff 75 0c pushl 0xc(%ebp)
10d99d: ff 55 e4 call *-0x1c(%ebp)
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
10d9a0: 83 c4 30 add $0x30,%esp
10d9a3: 8b 45 e0 mov -0x20(%ebp),%eax
10d9a6: 85 c0 test %eax,%eax
10d9a8: 0f 84 b2 00 00 00 je 10da60 <_Heap_Walk+0x138>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
10d9ae: f6 45 e0 03 testb $0x3,-0x20(%ebp)
10d9b2: 0f 85 b0 00 00 00 jne 10da68 <_Heap_Walk+0x140>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
10d9b8: 8b 45 dc mov -0x24(%ebp),%eax
10d9bb: 31 d2 xor %edx,%edx
10d9bd: f7 75 e0 divl -0x20(%ebp)
10d9c0: 85 d2 test %edx,%edx
10d9c2: 0f 85 ac 00 00 00 jne 10da74 <_Heap_Walk+0x14c>
);
return false;
}
if (
10d9c8: 8d 46 08 lea 0x8(%esi),%eax
10d9cb: 31 d2 xor %edx,%edx
10d9cd: f7 75 e0 divl -0x20(%ebp)
10d9d0: 85 d2 test %edx,%edx
10d9d2: 0f 85 a8 00 00 00 jne 10da80 <_Heap_Walk+0x158>
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;
10d9d8: 8b 56 04 mov 0x4(%esi),%edx
10d9db: 89 55 cc mov %edx,-0x34(%ebp)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
10d9de: 83 e2 01 and $0x1,%edx
10d9e1: 0f 84 a1 00 00 00 je 10da88 <_Heap_Walk+0x160>
);
return false;
}
if ( first_block->prev_size != page_size ) {
10d9e7: 8b 06 mov (%esi),%eax
10d9e9: 39 45 e0 cmp %eax,-0x20(%ebp)
10d9ec: 75 4e jne 10da3c <_Heap_Walk+0x114>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
10d9ee: 8b 55 d8 mov -0x28(%ebp),%edx
10d9f1: 8b 42 04 mov 0x4(%edx),%eax
10d9f4: 83 e0 fe and $0xfffffffe,%eax
10d9f7: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1)
10d9fc: 0f 84 bd 02 00 00 je 10dcbf <_Heap_Walk+0x397>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
10da02: 8b 43 10 mov 0x10(%ebx),%eax
10da05: 89 45 d4 mov %eax,-0x2c(%ebp)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10da08: 8b 4b 08 mov 0x8(%ebx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10da0b: 39 cb cmp %ecx,%ebx
10da0d: 0f 84 09 01 00 00 je 10db1c <_Heap_Walk+0x1f4>
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;
10da13: 8b 7b 20 mov 0x20(%ebx),%edi
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
10da16: 39 cf cmp %ecx,%edi
10da18: 76 76 jbe 10da90 <_Heap_Walk+0x168> <== ALWAYS TAKEN
10da1a: 66 90 xchg %ax,%ax
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10da1c: 51 push %ecx
10da1d: 68 58 3c 12 00 push $0x123c58
10da22: 66 90 xchg %ax,%ax
return false;
}
if ( !prev_used ) {
(*printer)(
10da24: 6a 01 push $0x1
10da26: ff 75 0c pushl 0xc(%ebp)
10da29: ff 55 e4 call *-0x1c(%ebp)
10da2c: 31 c0 xor %eax,%eax
10da2e: 83 c4 10 add $0x10,%esp
block = next_block;
}
return true;
}
10da31: 8d 65 f4 lea -0xc(%ebp),%esp
10da34: 5b pop %ebx
10da35: 5e pop %esi
10da36: 5f pop %edi
10da37: c9 leave
10da38: c3 ret
10da39: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
10da3c: 83 ec 0c sub $0xc,%esp
10da3f: ff 75 e0 pushl -0x20(%ebp)
10da42: 50 push %eax
10da43: 68 2c 3c 12 00 push $0x123c2c
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
10da48: 6a 01 push $0x1
10da4a: ff 75 0c pushl 0xc(%ebp)
10da4d: ff 55 e4 call *-0x1c(%ebp)
10da50: 31 c0 xor %eax,%eax
10da52: 83 c4 20 add $0x20,%esp
block = next_block;
}
return true;
}
10da55: 8d 65 f4 lea -0xc(%ebp),%esp
10da58: 5b pop %ebx
10da59: 5e pop %esi
10da5a: 5f pop %edi
10da5b: c9 leave
10da5c: c3 ret
10da5d: 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" );
10da60: 57 push %edi
10da61: 68 87 3e 12 00 push $0x123e87
10da66: eb bc jmp 10da24 <_Heap_Walk+0xfc>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
10da68: ff 75 e0 pushl -0x20(%ebp)
10da6b: 68 9a 3e 12 00 push $0x123e9a
10da70: eb b2 jmp 10da24 <_Heap_Walk+0xfc>
10da72: 66 90 xchg %ax,%ax
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10da74: ff 75 dc pushl -0x24(%ebp)
10da77: 68 a4 3b 12 00 push $0x123ba4
10da7c: eb a6 jmp 10da24 <_Heap_Walk+0xfc>
10da7e: 66 90 xchg %ax,%ax
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10da80: 56 push %esi
10da81: 68 c8 3b 12 00 push $0x123bc8
10da86: eb 9c jmp 10da24 <_Heap_Walk+0xfc>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10da88: 56 push %esi
10da89: 68 fc 3b 12 00 push $0x123bfc
10da8e: eb 94 jmp 10da24 <_Heap_Walk+0xfc>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
10da90: 8b 53 24 mov 0x24(%ebx),%edx
10da93: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10da96: 39 d1 cmp %edx,%ecx
10da98: 77 82 ja 10da1c <_Heap_Walk+0xf4> <== NEVER TAKEN
);
return false;
}
if (
10da9a: 8d 41 08 lea 0x8(%ecx),%eax
10da9d: 31 d2 xor %edx,%edx
10da9f: f7 75 d4 divl -0x2c(%ebp)
10daa2: 85 d2 test %edx,%edx
10daa4: 0f 85 20 02 00 00 jne 10dcca <_Heap_Walk+0x3a2> <== NEVER TAKEN
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10daaa: 8b 41 04 mov 0x4(%ecx),%eax
10daad: 83 e0 fe and $0xfffffffe,%eax
10dab0: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10dab5: 0f 85 29 02 00 00 jne 10dce4 <_Heap_Walk+0x3bc> <== NEVER TAKEN
);
return false;
}
if ( free_block->prev != prev_block ) {
10dabb: 8b 41 0c mov 0xc(%ecx),%eax
10dabe: 39 d8 cmp %ebx,%eax
10dac0: 0f 85 0f 02 00 00 jne 10dcd5 <_Heap_Walk+0x3ad> <== NEVER TAKEN
10dac6: 89 75 c8 mov %esi,-0x38(%ebp)
10dac9: 89 c6 mov %eax,%esi
10dacb: 89 5d c4 mov %ebx,-0x3c(%ebp)
10dace: eb 3d jmp 10db0d <_Heap_Walk+0x1e5>
10dad0: 39 cf cmp %ecx,%edi
10dad2: 0f 87 44 ff ff ff ja 10da1c <_Heap_Walk+0xf4>
10dad8: 3b 4d d0 cmp -0x30(%ebp),%ecx
10dadb: 0f 87 3b ff ff ff ja 10da1c <_Heap_Walk+0xf4> <== NEVER TAKEN
);
return false;
}
if (
10dae1: 8d 41 08 lea 0x8(%ecx),%eax
10dae4: 31 d2 xor %edx,%edx
10dae6: f7 75 d4 divl -0x2c(%ebp)
10dae9: 85 d2 test %edx,%edx
10daeb: 0f 85 d9 01 00 00 jne 10dcca <_Heap_Walk+0x3a2>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10daf1: 8b 41 04 mov 0x4(%ecx),%eax
10daf4: 83 e0 fe and $0xfffffffe,%eax
10daf7: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10dafc: 0f 85 e2 01 00 00 jne 10dce4 <_Heap_Walk+0x3bc>
);
return false;
}
if ( free_block->prev != prev_block ) {
10db02: 8b 41 0c mov 0xc(%ecx),%eax
10db05: 39 d8 cmp %ebx,%eax
10db07: 0f 85 c8 01 00 00 jne 10dcd5 <_Heap_Walk+0x3ad>
(*printer)(
10db0d: 89 cb mov %ecx,%ebx
return false;
}
prev_block = free_block;
free_block = free_block->next;
10db0f: 8b 49 08 mov 0x8(%ecx),%ecx
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
10db12: 39 ce cmp %ecx,%esi
10db14: 75 ba jne 10dad0 <_Heap_Walk+0x1a8>
10db16: 8b 75 c8 mov -0x38(%ebp),%esi
10db19: 8b 5d c4 mov -0x3c(%ebp),%ebx
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10db1c: 39 75 d8 cmp %esi,-0x28(%ebp)
10db1f: 0f 84 3a fe ff ff je 10d95f <_Heap_Walk+0x37> <== NEVER TAKEN
10db25: 8b 45 cc mov -0x34(%ebp),%eax
- 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;
10db28: 89 c1 mov %eax,%ecx
10db2a: 83 e1 fe and $0xfffffffe,%ecx
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10db2d: 8d 3c 31 lea (%ecx,%esi,1),%edi
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
10db30: a8 01 test $0x1,%al
10db32: 74 30 je 10db64 <_Heap_Walk+0x23c>
(*printer)(
10db34: 83 ec 0c sub $0xc,%esp
10db37: 51 push %ecx
10db38: 56 push %esi
10db39: 68 e9 3e 12 00 push $0x123ee9
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10db3e: 6a 00 push $0x0
10db40: ff 75 0c pushl 0xc(%ebp)
10db43: 89 4d c0 mov %ecx,-0x40(%ebp)
10db46: ff 55 e4 call *-0x1c(%ebp)
10db49: 83 c4 20 add $0x20,%esp
10db4c: 8b 4d c0 mov -0x40(%ebp),%ecx
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
10db4f: 39 7b 20 cmp %edi,0x20(%ebx)
10db52: 76 20 jbe 10db74 <_Heap_Walk+0x24c> <== ALWAYS TAKEN
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
10db54: 83 ec 0c sub $0xc,%esp
10db57: 57 push %edi
10db58: 56 push %esi
10db59: 68 04 3d 12 00 push $0x123d04
10db5e: e9 e5 fe ff ff jmp 10da48 <_Heap_Walk+0x120>
10db63: 90 nop
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10db64: 83 ec 08 sub $0x8,%esp
10db67: ff 36 pushl (%esi)
10db69: 51 push %ecx
10db6a: 56 push %esi
10db6b: 68 dc 3c 12 00 push $0x123cdc
10db70: eb cc jmp 10db3e <_Heap_Walk+0x216>
10db72: 66 90 xchg %ax,%ax
10db74: 39 7b 24 cmp %edi,0x24(%ebx)
10db77: 72 db jb 10db54 <_Heap_Walk+0x22c>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
10db79: 89 c8 mov %ecx,%eax
10db7b: 31 d2 xor %edx,%edx
10db7d: f7 75 e0 divl -0x20(%ebp)
10db80: 85 d2 test %edx,%edx
10db82: 0f 85 02 01 00 00 jne 10dc8a <_Heap_Walk+0x362>
);
return false;
}
if ( block_size < min_block_size ) {
10db88: 39 4d dc cmp %ecx,-0x24(%ebp)
10db8b: 0f 87 0b 01 00 00 ja 10dc9c <_Heap_Walk+0x374>
);
return false;
}
if ( next_block_begin <= block_begin ) {
10db91: 39 fe cmp %edi,%esi
10db93: 0f 83 17 01 00 00 jae 10dcb0 <_Heap_Walk+0x388>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10db99: f6 47 04 01 testb $0x1,0x4(%edi)
10db9d: 0f 85 91 00 00 00 jne 10dc34 <_Heap_Walk+0x30c>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10dba3: 8b 4b 08 mov 0x8(%ebx),%ecx
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;
10dba6: 8b 46 04 mov 0x4(%esi),%eax
10dba9: 89 45 cc mov %eax,-0x34(%ebp)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
10dbac: 83 e0 fe and $0xfffffffe,%eax
10dbaf: 89 45 d4 mov %eax,-0x2c(%ebp)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
10dbb2: 01 f0 add %esi,%eax
10dbb4: 89 45 d0 mov %eax,-0x30(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10dbb7: 8b 56 08 mov 0x8(%esi),%edx
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
10dbba: 39 53 0c cmp %edx,0xc(%ebx)
10dbbd: 0f 84 99 00 00 00 je 10dc5c <_Heap_Walk+0x334>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10dbc3: 39 da cmp %ebx,%edx
10dbc5: 0f 84 a9 00 00 00 je 10dc74 <_Heap_Walk+0x34c>
10dbcb: c7 45 c8 55 3a 12 00 movl $0x123a55,-0x38(%ebp)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
10dbd2: 8b 46 0c mov 0xc(%esi),%eax
10dbd5: 39 c1 cmp %eax,%ecx
10dbd7: 74 7b je 10dc54 <_Heap_Walk+0x32c>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
10dbd9: 39 d8 cmp %ebx,%eax
10dbdb: 0f 84 9f 00 00 00 je 10dc80 <_Heap_Walk+0x358>
10dbe1: b9 55 3a 12 00 mov $0x123a55,%ecx
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)(
10dbe6: ff 75 c8 pushl -0x38(%ebp)
10dbe9: 52 push %edx
10dbea: 51 push %ecx
10dbeb: 50 push %eax
10dbec: 56 push %esi
10dbed: 68 c4 3d 12 00 push $0x123dc4
10dbf2: 6a 00 push $0x0
10dbf4: ff 75 0c pushl 0xc(%ebp)
10dbf7: ff 55 e4 call *-0x1c(%ebp)
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
10dbfa: 8b 55 d0 mov -0x30(%ebp),%edx
10dbfd: 8b 02 mov (%edx),%eax
10dbff: 83 c4 20 add $0x20,%esp
10dc02: 39 45 d4 cmp %eax,-0x2c(%ebp)
10dc05: 74 11 je 10dc18 <_Heap_Walk+0x2f0>
(*printer)(
10dc07: 51 push %ecx
10dc08: 52 push %edx
10dc09: 50 push %eax
10dc0a: ff 75 d4 pushl -0x2c(%ebp)
10dc0d: 56 push %esi
10dc0e: 68 f0 3d 12 00 push $0x123df0
10dc13: e9 30 fe ff ff jmp 10da48 <_Heap_Walk+0x120>
);
return false;
}
if ( !prev_used ) {
10dc18: f6 45 cc 01 testb $0x1,-0x34(%ebp)
10dc1c: 74 4a je 10dc68 <_Heap_Walk+0x340>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
10dc1e: 8b 43 08 mov 0x8(%ebx),%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 ) {
10dc21: 39 d8 cmp %ebx,%eax
10dc23: 75 0a jne 10dc2f <_Heap_Walk+0x307> <== ALWAYS TAKEN
10dc25: eb 21 jmp 10dc48 <_Heap_Walk+0x320> <== NOT EXECUTED
10dc27: 90 nop <== NOT EXECUTED
if ( free_block == block ) {
return true;
}
free_block = free_block->next;
10dc28: 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 ) {
10dc2b: 39 d8 cmp %ebx,%eax
10dc2d: 74 19 je 10dc48 <_Heap_Walk+0x320>
if ( free_block == block ) {
10dc2f: 39 f0 cmp %esi,%eax
10dc31: 75 f5 jne 10dc28 <_Heap_Walk+0x300>
10dc33: 90 nop
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
10dc34: 39 7d d8 cmp %edi,-0x28(%ebp)
10dc37: 0f 84 22 fd ff ff je 10d95f <_Heap_Walk+0x37>
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 ) {
10dc3d: 8b 47 04 mov 0x4(%edi),%eax
10dc40: 89 fe mov %edi,%esi
10dc42: e9 e1 fe ff ff jmp 10db28 <_Heap_Walk+0x200>
10dc47: 90 nop
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10dc48: 56 push %esi
10dc49: 68 5c 3e 12 00 push $0x123e5c
10dc4e: e9 d1 fd ff ff jmp 10da24 <_Heap_Walk+0xfc>
10dc53: 90 nop
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)(
10dc54: b9 14 3f 12 00 mov $0x123f14,%ecx
10dc59: eb 8b jmp 10dbe6 <_Heap_Walk+0x2be>
10dc5b: 90 nop
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
10dc5c: c7 45 c8 00 3f 12 00 movl $0x123f00,-0x38(%ebp)
10dc63: e9 6a ff ff ff jmp 10dbd2 <_Heap_Walk+0x2aa>
return false;
}
if ( !prev_used ) {
(*printer)(
10dc68: 56 push %esi
10dc69: 68 2c 3e 12 00 push $0x123e2c
10dc6e: e9 b1 fd ff ff jmp 10da24 <_Heap_Walk+0xfc>
10dc73: 90 nop
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
10dc74: c7 45 c8 0a 3f 12 00 movl $0x123f0a,-0x38(%ebp)
10dc7b: e9 52 ff ff ff jmp 10dbd2 <_Heap_Walk+0x2aa>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
10dc80: b9 1f 3f 12 00 mov $0x123f1f,%ecx
10dc85: e9 5c ff ff ff jmp 10dbe6 <_Heap_Walk+0x2be>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
10dc8a: 83 ec 0c sub $0xc,%esp
10dc8d: 51 push %ecx
10dc8e: 56 push %esi
10dc8f: 68 34 3d 12 00 push $0x123d34
10dc94: e9 af fd ff ff jmp 10da48 <_Heap_Walk+0x120>
10dc99: 8d 76 00 lea 0x0(%esi),%esi
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
10dc9c: 83 ec 08 sub $0x8,%esp
10dc9f: ff 75 dc pushl -0x24(%ebp)
10dca2: 51 push %ecx
10dca3: 56 push %esi
10dca4: 68 64 3d 12 00 push $0x123d64
10dca9: e9 9a fd ff ff jmp 10da48 <_Heap_Walk+0x120>
10dcae: 66 90 xchg %ax,%ax
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
10dcb0: 83 ec 0c sub $0xc,%esp
10dcb3: 57 push %edi
10dcb4: 56 push %esi
10dcb5: 68 90 3d 12 00 push $0x123d90
10dcba: e9 89 fd ff ff jmp 10da48 <_Heap_Walk+0x120>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10dcbf: 53 push %ebx
10dcc0: 68 b8 3e 12 00 push $0x123eb8
10dcc5: e9 5a fd ff ff jmp 10da24 <_Heap_Walk+0xfc>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10dcca: 51 push %ecx
10dccb: 68 78 3c 12 00 push $0x123c78
10dcd0: e9 4f fd ff ff jmp 10da24 <_Heap_Walk+0xfc>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
10dcd5: 83 ec 0c sub $0xc,%esp
10dcd8: 50 push %eax
10dcd9: 51 push %ecx
10dcda: 68 a8 3c 12 00 push $0x123ca8
10dcdf: e9 64 fd ff ff jmp 10da48 <_Heap_Walk+0x120>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
10dce4: 51 push %ecx
10dce5: 68 cd 3e 12 00 push $0x123ecd
10dcea: e9 35 fd ff ff jmp 10da24 <_Heap_Walk+0xfc>
0010c2f8 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10c2f8: 55 push %ebp
10c2f9: 89 e5 mov %esp,%ebp
10c2fb: 53 push %ebx
10c2fc: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c2ff: 8b 15 60 9f 12 00 mov 0x129f60,%edx
10c305: 85 d2 test %edx,%edx
10c307: 74 1a je 10c323 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10c309: 31 db xor %ebx,%ebx
10c30b: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10c30c: 50 push %eax
10c30d: 6a 00 push $0x0
10c30f: 6a 00 push $0x0
10c311: 53 push %ebx
10c312: e8 05 5c 00 00 call 111f1c <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10c317: 43 inc %ebx
10c318: 83 c4 10 add $0x10,%esp
10c31b: 39 1d 60 9f 12 00 cmp %ebx,0x129f60
10c321: 77 e9 ja 10c30c <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10c323: 8b 5d fc mov -0x4(%ebp),%ebx
10c326: c9 leave
10c327: c3 ret
0010c328 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10c328: 55 push %ebp
10c329: 89 e5 mov %esp,%ebp
10c32b: 57 push %edi
10c32c: 56 push %esi
10c32d: 53 push %ebx
10c32e: 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;
10c331: 8b 1d 14 53 12 00 mov 0x125314,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10c337: a1 10 53 12 00 mov 0x125310,%eax
10c33c: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10c33f: 8b 35 0c 53 12 00 mov 0x12530c,%esi
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
10c345: 39 f0 cmp %esi,%eax
10c347: 72 17 jb 10c360 <_IO_Manager_initialization+0x38>
* 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;
10c349: 89 1d 64 9f 12 00 mov %ebx,0x129f64
_IO_Number_of_drivers = number_of_drivers;
10c34f: 8b 45 e4 mov -0x1c(%ebp),%eax
10c352: a3 60 9f 12 00 mov %eax,0x129f60
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10c357: 8d 65 f4 lea -0xc(%ebp),%esp
10c35a: 5b pop %ebx
10c35b: 5e pop %esi
10c35c: 5f pop %edi
10c35d: c9 leave
10c35e: c3 ret
10c35f: 90 nop
/*
* 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 *)
10c360: 8d 0c 76 lea (%esi,%esi,2),%ecx
10c363: c1 e1 03 shl $0x3,%ecx
10c366: 83 ec 0c sub $0xc,%esp
10c369: 51 push %ecx
10c36a: 89 4d dc mov %ecx,-0x24(%ebp)
10c36d: e8 7e 2a 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error>
10c372: 89 c2 mov %eax,%edx
10c374: a3 64 9f 12 00 mov %eax,0x129f64
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10c379: 89 35 60 9f 12 00 mov %esi,0x129f60
memset(
10c37f: 31 c0 xor %eax,%eax
10c381: 8b 4d dc mov -0x24(%ebp),%ecx
10c384: 89 d7 mov %edx,%edi
10c386: 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++ )
10c388: 83 c4 10 add $0x10,%esp
10c38b: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c38e: 85 c9 test %ecx,%ecx
10c390: 74 c5 je 10c357 <_IO_Manager_initialization+0x2f><== NEVER TAKEN
10c392: a1 64 9f 12 00 mov 0x129f64,%eax
10c397: 89 45 e0 mov %eax,-0x20(%ebp)
10c39a: 31 c0 xor %eax,%eax
10c39c: 31 d2 xor %edx,%edx
10c39e: 66 90 xchg %ax,%ax
_IO_Driver_address_table[index] = driver_table[index];
10c3a0: 8b 7d e0 mov -0x20(%ebp),%edi
10c3a3: 01 c7 add %eax,%edi
10c3a5: 8d 34 03 lea (%ebx,%eax,1),%esi
10c3a8: b9 06 00 00 00 mov $0x6,%ecx
10c3ad: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
10c3af: 42 inc %edx
10c3b0: 83 c0 18 add $0x18,%eax
10c3b3: 39 55 e4 cmp %edx,-0x1c(%ebp)
10c3b6: 77 e8 ja 10c3a0 <_IO_Manager_initialization+0x78>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
10c3b8: 8d 65 f4 lea -0xc(%ebp),%esp
10c3bb: 5b pop %ebx
10c3bc: 5e pop %esi
10c3bd: 5f pop %edi
10c3be: c9 leave
10c3bf: c3 ret
0010cef0 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
10cef0: 55 push %ebp
10cef1: 89 e5 mov %esp,%ebp
10cef3: 83 ec 08 sub $0x8,%esp
_ISR_Signals_to_thread_executing = false;
10cef6: c6 05 28 96 12 00 00 movb $0x0,0x129628
_ISR_Nest_level = 0;
10cefd: c7 05 54 95 12 00 00 movl $0x0,0x129554
10cf04: 00 00 00
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
10cf07: a1 fc 52 12 00 mov 0x1252fc,%eax
10cf0c: 3b 05 d0 52 12 00 cmp 0x1252d0,%eax
10cf12: 72 25 jb 10cf39 <_ISR_Handler_initialization+0x49><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
10cf14: 83 ec 0c sub $0xc,%esp
10cf17: 50 push %eax
10cf18: e8 d3 1e 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error>
10cf1d: a3 c8 94 12 00 mov %eax,0x1294c8
/* Interrupt stack might have to be aligned and/or setup
* in a specific way.
*/
#if defined(_CPU_Interrupt_stack_setup)
_CPU_Interrupt_stack_setup(_CPU_Interrupt_stack_low, _CPU_Interrupt_stack_high);
10cf22: 8b 15 fc 52 12 00 mov 0x1252fc,%edx
10cf28: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax
10cf2c: 83 e0 f0 and $0xfffffff0,%eax
10cf2f: a3 88 94 12 00 mov %eax,0x129488
10cf34: 83 c4 10 add $0x10,%esp
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
10cf37: c9 leave
10cf38: c3 ret
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
_Internal_error_Occurred(
10cf39: 50 push %eax
10cf3a: 6a 05 push $0x5
10cf3c: 6a 01 push $0x1
10cf3e: 6a 00 push $0x0
10cf40: e8 6b ff ff ff call 10ceb0 <_Internal_error_Occurred>
0010ceb0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ceb0: 55 push %ebp
10ceb1: 89 e5 mov %esp,%ebp
10ceb3: 53 push %ebx
10ceb4: 83 ec 08 sub $0x8,%esp
10ceb7: 8b 45 08 mov 0x8(%ebp),%eax
10ceba: 8b 55 0c mov 0xc(%ebp),%edx
10cebd: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10cec0: a3 60 95 12 00 mov %eax,0x129560
_Internal_errors_What_happened.is_internal = is_internal;
10cec5: 88 15 64 95 12 00 mov %dl,0x129564
_Internal_errors_What_happened.the_error = the_error;
10cecb: 89 1d 68 95 12 00 mov %ebx,0x129568
_User_extensions_Fatal( the_source, is_internal, the_error );
10ced1: 53 push %ebx
10ced2: 0f b6 d2 movzbl %dl,%edx
10ced5: 52 push %edx
10ced6: 50 push %eax
10ced7: e8 ac 1b 00 00 call 10ea88 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10cedc: c7 05 80 96 12 00 05 movl $0x5,0x129680 <== NOT EXECUTED
10cee3: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10cee6: fa cli <== NOT EXECUTED
10cee7: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10cee9: f4 hlt <== NOT EXECUTED
10ceea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10ceed: eb fe jmp 10ceed <_Internal_error_Occurred+0x3d><== NOT EXECUTED
001125bc <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
1125bc: 55 push %ebp
1125bd: 89 e5 mov %esp,%ebp
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
1125bf: 8b 45 08 mov 0x8(%ebp),%eax
1125c2: 48 dec %eax
1125c3: 83 f8 03 cmp $0x3,%eax
1125c6: 77 0c ja 1125d4 <_Objects_API_maximum_class+0x18>
1125c8: 8b 04 85 5c 32 12 00 mov 0x12325c(,%eax,4),%eax
1125cf: c9 leave
1125d0: c3 ret
1125d1: 8d 76 00 lea 0x0(%esi),%esi
1125d4: 31 c0 xor %eax,%eax
1125d6: c9 leave
1125d7: c3 ret
0010cf48 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10cf48: 55 push %ebp
10cf49: 89 e5 mov %esp,%ebp
10cf4b: 56 push %esi
10cf4c: 53 push %ebx
10cf4d: 8b 5d 08 mov 0x8(%ebp),%ebx
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
10cf50: 8b 43 18 mov 0x18(%ebx),%eax
10cf53: 85 c0 test %eax,%eax
10cf55: 75 0d jne 10cf64 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
10cf57: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
10cf59: 89 c8 mov %ecx,%eax
10cf5b: 8d 65 f8 lea -0x8(%ebp),%esp
10cf5e: 5b pop %ebx
10cf5f: 5e pop %esi
10cf60: c9 leave
10cf61: c3 ret
10cf62: 66 90 xchg %ax,%ax
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10cf64: 8d 73 20 lea 0x20(%ebx),%esi
10cf67: 83 ec 0c sub $0xc,%esp
10cf6a: 56 push %esi
10cf6b: e8 8c f6 ff ff call 10c5fc <_Chain_Get>
10cf70: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10cf72: 83 c4 10 add $0x10,%esp
10cf75: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10cf79: 74 de je 10cf59 <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10cf7b: 85 c0 test %eax,%eax
10cf7d: 74 29 je 10cfa8 <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10cf7f: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10cf83: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10cf87: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
10cf89: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cf8d: 31 d2 xor %edx,%edx
10cf8f: f7 f6 div %esi
10cf91: c1 e0 02 shl $0x2,%eax
10cf94: 03 43 30 add 0x30(%ebx),%eax
10cf97: ff 08 decl (%eax)
information->inactive--;
10cf99: 66 ff 4b 2c decw 0x2c(%ebx)
}
}
return the_object;
}
10cf9d: 89 c8 mov %ecx,%eax
10cf9f: 8d 65 f8 lea -0x8(%ebp),%esp
10cfa2: 5b pop %ebx
10cfa3: 5e pop %esi
10cfa4: c9 leave
10cfa5: c3 ret
10cfa6: 66 90 xchg %ax,%ax
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10cfa8: 83 ec 0c sub $0xc,%esp
10cfab: 53 push %ebx
10cfac: e8 3b 00 00 00 call 10cfec <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10cfb1: 89 34 24 mov %esi,(%esp)
10cfb4: e8 43 f6 ff ff call 10c5fc <_Chain_Get>
10cfb9: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10cfbb: 83 c4 10 add $0x10,%esp
10cfbe: 85 c0 test %eax,%eax
10cfc0: 74 97 je 10cf59 <_Objects_Allocate+0x11>
10cfc2: eb bb jmp 10cf7f <_Objects_Allocate+0x37>
0010cfec <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10cfec: 55 push %ebp
10cfed: 89 e5 mov %esp,%ebp
10cfef: 57 push %edi
10cff0: 56 push %esi
10cff1: 53 push %ebx
10cff2: 83 ec 4c sub $0x4c,%esp
10cff5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
10cff8: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10cffc: 89 45 d0 mov %eax,-0x30(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10cfff: 8b 4b 34 mov 0x34(%ebx),%ecx
10d002: 85 c9 test %ecx,%ecx
10d004: 0f 84 72 02 00 00 je 10d27c <_Objects_Extend_information+0x290>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10d00a: 8b 7b 10 mov 0x10(%ebx),%edi
10d00d: 66 89 7d d4 mov %di,-0x2c(%ebp)
10d011: 8b 7b 14 mov 0x14(%ebx),%edi
10d014: 31 d2 xor %edx,%edx
10d016: 8b 45 d4 mov -0x2c(%ebp),%eax
10d019: 66 f7 f7 div %di
10d01c: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10d01f: 85 f6 test %esi,%esi
10d021: 0f 84 6c 02 00 00 je 10d293 <_Objects_Extend_information+0x2a7><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL )
10d027: 8b 01 mov (%ecx),%eax
10d029: 85 c0 test %eax,%eax
10d02b: 0f 84 72 02 00 00 je 10d2a3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN
10d031: 0f b7 ff movzwl %di,%edi
10d034: 8b 55 d0 mov -0x30(%ebp),%edx
10d037: 89 55 cc mov %edx,-0x34(%ebp)
10d03a: 31 d2 xor %edx,%edx
10d03c: 8b 45 cc mov -0x34(%ebp),%eax
10d03f: eb 09 jmp 10d04a <_Objects_Extend_information+0x5e>
10d041: 8d 76 00 lea 0x0(%esi),%esi
10d044: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10d048: 74 07 je 10d051 <_Objects_Extend_information+0x65>
break;
else
index_base += information->allocation_size;
10d04a: 01 f8 add %edi,%eax
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10d04c: 42 inc %edx
10d04d: 39 d6 cmp %edx,%esi
10d04f: 77 f3 ja 10d044 <_Objects_Extend_information+0x58>
10d051: 89 45 cc mov %eax,-0x34(%ebp)
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10d054: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10d058: 01 f8 add %edi,%eax
10d05a: 89 45 d4 mov %eax,-0x2c(%ebp)
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
10d05d: 3d ff ff 00 00 cmp $0xffff,%eax
10d062: 0f 87 b1 01 00 00 ja 10d219 <_Objects_Extend_information+0x22d><== NEVER TAKEN
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
10d068: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10d06c: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10d070: 0f 85 ae 01 00 00 jne 10d224 <_Objects_Extend_information+0x238>
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
10d076: 83 ec 0c sub $0xc,%esp
10d079: 57 push %edi
10d07a: 89 55 b4 mov %edx,-0x4c(%ebp)
10d07d: e8 6e 1d 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error>
10d082: 89 45 c4 mov %eax,-0x3c(%ebp)
10d085: 83 c4 10 add $0x10,%esp
10d088: 8b 55 b4 mov -0x4c(%ebp),%edx
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
10d08b: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d08f: 39 45 cc cmp %eax,-0x34(%ebp)
10d092: 0f 82 fe 00 00 00 jb 10d196 <_Objects_Extend_information+0x1aa>
*/
/*
* Up the block count and maximum
*/
block_count++;
10d098: 8d 7e 01 lea 0x1(%esi),%edi
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
10d09b: 83 ec 0c sub $0xc,%esp
10d09e: 8d 04 7f lea (%edi,%edi,2),%eax
10d0a1: 03 45 d4 add -0x2c(%ebp),%eax
10d0a4: 03 45 d0 add -0x30(%ebp),%eax
10d0a7: c1 e0 02 shl $0x2,%eax
10d0aa: 50 push %eax
10d0ab: 89 55 b4 mov %edx,-0x4c(%ebp)
10d0ae: e8 69 1d 00 00 call 10ee1c <_Workspace_Allocate>
10d0b3: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !object_blocks ) {
10d0b6: 83 c4 10 add $0x10,%esp
10d0b9: 85 c0 test %eax,%eax
10d0bb: 8b 55 b4 mov -0x4c(%ebp),%edx
10d0be: 0f 84 ef 01 00 00 je 10d2b3 <_Objects_Extend_information+0x2c7>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
10d0c4: 8b 45 c8 mov -0x38(%ebp),%eax
10d0c7: 8d 04 b8 lea (%eax,%edi,4),%eax
10d0ca: 89 45 b8 mov %eax,-0x48(%ebp)
10d0cd: 8b 4d c8 mov -0x38(%ebp),%ecx
10d0d0: 8d 3c f9 lea (%ecx,%edi,8),%edi
10d0d3: 89 7d bc mov %edi,-0x44(%ebp)
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
10d0d6: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d0da: 39 45 d0 cmp %eax,-0x30(%ebp)
10d0dd: 0f 82 60 01 00 00 jb 10d243 <_Objects_Extend_information+0x257>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10d0e3: 8b 45 d0 mov -0x30(%ebp),%eax
10d0e6: 85 c0 test %eax,%eax
10d0e8: 74 16 je 10d100 <_Objects_Extend_information+0x114><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10d0ea: 31 c0 xor %eax,%eax
10d0ec: 8b 4d bc mov -0x44(%ebp),%ecx
10d0ef: 8b 7d d0 mov -0x30(%ebp),%edi
10d0f2: 66 90 xchg %ax,%ax
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
10d0f4: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10d0fb: 40 inc %eax
10d0fc: 39 c7 cmp %eax,%edi
10d0fe: 77 f4 ja 10d0f4 <_Objects_Extend_information+0x108><== NEVER TAKEN
10d100: c1 e6 02 shl $0x2,%esi
10d103: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10d106: 8b 45 c8 mov -0x38(%ebp),%eax
10d109: 8b 7d c0 mov -0x40(%ebp),%edi
10d10c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
inactive_per_block[block_count] = 0;
10d113: 8b 4d b8 mov -0x48(%ebp),%ecx
10d116: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10d11d: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10d121: 03 75 cc add -0x34(%ebp),%esi
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10d124: 39 75 cc cmp %esi,-0x34(%ebp)
10d127: 73 19 jae 10d142 <_Objects_Extend_information+0x156><== NEVER TAKEN
10d129: 8b 7d cc mov -0x34(%ebp),%edi
10d12c: 8b 45 bc mov -0x44(%ebp),%eax
10d12f: 8d 0c b8 lea (%eax,%edi,4),%ecx
10d132: 89 f8 mov %edi,%eax
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10d134: c7 01 00 00 00 00 movl $0x0,(%ecx)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
10d13a: 40 inc %eax
10d13b: 83 c1 04 add $0x4,%ecx
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
10d13e: 39 c6 cmp %eax,%esi
10d140: 77 f2 ja 10d134 <_Objects_Extend_information+0x148>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10d142: 9c pushf
10d143: fa cli
10d144: 5f pop %edi
old_tables = information->object_blocks;
10d145: 8b 4b 34 mov 0x34(%ebx),%ecx
information->object_blocks = object_blocks;
10d148: 8b 45 c8 mov -0x38(%ebp),%eax
10d14b: 89 43 34 mov %eax,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10d14e: 8b 45 b8 mov -0x48(%ebp),%eax
10d151: 89 43 30 mov %eax,0x30(%ebx)
information->local_table = local_table;
10d154: 8b 45 bc mov -0x44(%ebp),%eax
10d157: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10d15a: 8b 45 d4 mov -0x2c(%ebp),%eax
10d15d: 66 89 43 10 mov %ax,0x10(%ebx)
information->maximum_id = _Objects_Build_id(
10d161: 8b 33 mov (%ebx),%esi
10d163: c1 e6 18 shl $0x18,%esi
10d166: 81 ce 00 00 01 00 or $0x10000,%esi
10d16c: 0f b7 43 04 movzwl 0x4(%ebx),%eax
10d170: c1 e0 1b shl $0x1b,%eax
10d173: 09 c6 or %eax,%esi
10d175: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax
10d179: 09 c6 or %eax,%esi
10d17b: 89 73 0c mov %esi,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10d17e: 57 push %edi
10d17f: 9d popf
if ( old_tables )
10d180: 85 c9 test %ecx,%ecx
10d182: 74 12 je 10d196 <_Objects_Extend_information+0x1aa>
_Workspace_Free( old_tables );
10d184: 83 ec 0c sub $0xc,%esp
10d187: 51 push %ecx
10d188: 89 55 b4 mov %edx,-0x4c(%ebp)
10d18b: e8 a8 1c 00 00 call 10ee38 <_Workspace_Free>
10d190: 83 c4 10 add $0x10,%esp
10d193: 8b 55 b4 mov -0x4c(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10d196: c1 e2 02 shl $0x2,%edx
10d199: 89 55 d0 mov %edx,-0x30(%ebp)
10d19c: 8b 43 34 mov 0x34(%ebx),%eax
10d19f: 8b 4d c4 mov -0x3c(%ebp),%ecx
10d1a2: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10d1a5: ff 73 18 pushl 0x18(%ebx)
10d1a8: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10d1ac: 52 push %edx
10d1ad: 8b 7d d0 mov -0x30(%ebp),%edi
10d1b0: ff 34 38 pushl (%eax,%edi,1)
10d1b3: 8d 7d dc lea -0x24(%ebp),%edi
10d1b6: 57 push %edi
10d1b7: e8 a8 4d 00 00 call 111f64 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10d1bc: 8d 43 20 lea 0x20(%ebx),%eax
10d1bf: 89 45 d4 mov %eax,-0x2c(%ebp)
10d1c2: 8b 75 cc mov -0x34(%ebp),%esi
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10d1c5: 83 c4 10 add $0x10,%esp
10d1c8: eb 2b jmp 10d1f5 <_Objects_Extend_information+0x209>
10d1ca: 66 90 xchg %ax,%ax
the_object->id = _Objects_Build_id(
10d1cc: 8b 13 mov (%ebx),%edx
10d1ce: c1 e2 18 shl $0x18,%edx
10d1d1: 81 ca 00 00 01 00 or $0x10000,%edx
10d1d7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
10d1db: c1 e1 1b shl $0x1b,%ecx
10d1de: 09 ca or %ecx,%edx
10d1e0: 09 f2 or %esi,%edx
10d1e2: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10d1e5: 83 ec 08 sub $0x8,%esp
10d1e8: 50 push %eax
10d1e9: ff 75 d4 pushl -0x2c(%ebp)
10d1ec: e8 cf f3 ff ff call 10c5c0 <_Chain_Append>
index++;
10d1f1: 46 inc %esi
10d1f2: 83 c4 10 add $0x10,%esp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
10d1f5: 83 ec 0c sub $0xc,%esp
10d1f8: 57 push %edi
10d1f9: e8 fe f3 ff ff call 10c5fc <_Chain_Get>
10d1fe: 83 c4 10 add $0x10,%esp
10d201: 85 c0 test %eax,%eax
10d203: 75 c7 jne 10d1cc <_Objects_Extend_information+0x1e0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10d205: 8b 43 30 mov 0x30(%ebx),%eax
10d208: 0f b7 53 14 movzwl 0x14(%ebx),%edx
10d20c: 8b 4d d0 mov -0x30(%ebp),%ecx
10d20f: 89 14 08 mov %edx,(%eax,%ecx,1)
information->inactive =
10d212: 8b 43 14 mov 0x14(%ebx),%eax
10d215: 66 01 43 2c add %ax,0x2c(%ebx)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
10d219: 8d 65 f4 lea -0xc(%ebp),%esp
10d21c: 5b pop %ebx
10d21d: 5e pop %esi
10d21e: 5f pop %edi
10d21f: c9 leave
10d220: c3 ret
10d221: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
new_object_block = _Workspace_Allocate( block_size );
10d224: 83 ec 0c sub $0xc,%esp
10d227: 57 push %edi
10d228: 89 55 b4 mov %edx,-0x4c(%ebp)
10d22b: e8 ec 1b 00 00 call 10ee1c <_Workspace_Allocate>
10d230: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !new_object_block )
10d233: 83 c4 10 add $0x10,%esp
10d236: 85 c0 test %eax,%eax
10d238: 8b 55 b4 mov -0x4c(%ebp),%edx
10d23b: 0f 85 4a fe ff ff jne 10d08b <_Objects_Extend_information+0x9f>
10d241: eb d6 jmp 10d219 <_Objects_Extend_information+0x22d>
/*
* 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,
10d243: c1 e6 02 shl $0x2,%esi
10d246: 89 75 c0 mov %esi,-0x40(%ebp)
10d249: 8b 73 34 mov 0x34(%ebx),%esi
10d24c: 8b 7d c8 mov -0x38(%ebp),%edi
10d24f: 8b 4d c0 mov -0x40(%ebp),%ecx
10d252: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10d254: 8b 73 30 mov 0x30(%ebx),%esi
10d257: 8b 7d b8 mov -0x48(%ebp),%edi
10d25a: 8b 4d c0 mov -0x40(%ebp),%ecx
10d25d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
10d25f: 0f b7 43 10 movzwl 0x10(%ebx),%eax
10d263: 03 45 d0 add -0x30(%ebp),%eax
10d266: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx
10d26d: 8b 73 1c mov 0x1c(%ebx),%esi
10d270: 8b 7d bc mov -0x44(%ebp),%edi
10d273: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10d275: e9 8c fe ff ff jmp 10d106 <_Objects_Extend_information+0x11a>
10d27a: 66 90 xchg %ax,%ax
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10d27c: 8b 53 10 mov 0x10(%ebx),%edx
10d27f: 66 89 55 d4 mov %dx,-0x2c(%ebp)
10d283: 0f b7 7b 14 movzwl 0x14(%ebx),%edi
10d287: 89 45 cc mov %eax,-0x34(%ebp)
10d28a: 31 d2 xor %edx,%edx
10d28c: 31 f6 xor %esi,%esi
10d28e: e9 c1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10d293: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
10d296: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED
10d299: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
10d29c: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d29e: e9 b1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED
if ( information->object_blocks[ block ] == NULL )
10d2a3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED
10d2a6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED
10d2a9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED
10d2ac: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d2ae: e9 a1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== 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 );
10d2b3: 83 ec 0c sub $0xc,%esp
10d2b6: ff 75 c4 pushl -0x3c(%ebp)
10d2b9: e8 7a 1b 00 00 call 10ee38 <_Workspace_Free>
return;
10d2be: 83 c4 10 add $0x10,%esp
10d2c1: e9 53 ff ff ff jmp 10d219 <_Objects_Extend_information+0x22d>
0010d358 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
10d358: 55 push %ebp
10d359: 89 e5 mov %esp,%ebp
10d35b: 56 push %esi
10d35c: 53 push %ebx
10d35d: 8b 75 08 mov 0x8(%ebp),%esi
10d360: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10d363: 85 db test %ebx,%ebx
10d365: 75 09 jne 10d370 <_Objects_Get_information+0x18>
* 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 )
10d367: 31 c0 xor %eax,%eax
return NULL;
#endif
return info;
}
10d369: 8d 65 f8 lea -0x8(%ebp),%esp
10d36c: 5b pop %ebx
10d36d: 5e pop %esi
10d36e: c9 leave
10d36f: c3 ret
/*
* 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 );
10d370: 83 ec 0c sub $0xc,%esp
10d373: 56 push %esi
10d374: e8 43 52 00 00 call 1125bc <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10d379: 83 c4 10 add $0x10,%esp
10d37c: 85 c0 test %eax,%eax
10d37e: 74 e7 je 10d367 <_Objects_Get_information+0xf>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10d380: 39 c3 cmp %eax,%ebx
10d382: 77 e3 ja 10d367 <_Objects_Get_information+0xf>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10d384: 8b 04 b5 8c 94 12 00 mov 0x12948c(,%esi,4),%eax
10d38b: 85 c0 test %eax,%eax
10d38d: 74 d8 je 10d367 <_Objects_Get_information+0xf><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10d38f: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !info )
10d392: 85 c0 test %eax,%eax
10d394: 74 d3 je 10d369 <_Objects_Get_information+0x11><== 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 )
10d396: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10d39b: 75 cc jne 10d369 <_Objects_Get_information+0x11>
10d39d: eb c8 jmp 10d367 <_Objects_Get_information+0xf>
0010d3a0 <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10d3a0: 55 push %ebp
10d3a1: 89 e5 mov %esp,%ebp
10d3a3: 56 push %esi
10d3a4: 53 push %ebx
10d3a5: 8b 55 08 mov 0x8(%ebp),%edx
10d3a8: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10d3ab: b8 01 00 00 00 mov $0x1,%eax
10d3b0: 2b 42 08 sub 0x8(%edx),%eax
10d3b3: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10d3b6: 9c pushf
10d3b7: fa cli
10d3b8: 5e pop %esi
if ( information->maximum >= index ) {
10d3b9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10d3bd: 39 c8 cmp %ecx,%eax
10d3bf: 77 1b ja 10d3dc <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10d3c1: 8b 52 1c mov 0x1c(%edx),%edx
10d3c4: 8b 04 82 mov (%edx,%eax,4),%eax
10d3c7: 85 c0 test %eax,%eax
10d3c9: 74 21 je 10d3ec <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10d3cb: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10d3d1: 8b 55 14 mov 0x14(%ebp),%edx
10d3d4: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10d3d6: 5b pop %ebx
10d3d7: 5e pop %esi
10d3d8: c9 leave
10d3d9: c3 ret
10d3da: 66 90 xchg %ax,%ax
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10d3dc: 56 push %esi
10d3dd: 9d popf
*location = OBJECTS_ERROR;
10d3de: c7 03 01 00 00 00 movl $0x1,(%ebx)
10d3e4: 31 c0 xor %eax,%eax
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10d3e6: 5b pop %ebx
10d3e7: 5e pop %esi
10d3e8: c9 leave
10d3e9: c3 ret
10d3ea: 66 90 xchg %ax,%ax
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10d3ec: 56 push %esi
10d3ed: 9d popf
*location = OBJECTS_ERROR;
10d3ee: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10d3f4: eb e0 jmp 10d3d6 <_Objects_Get_isr_disable+0x36>
0010ea48 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
10ea48: 55 push %ebp
10ea49: 89 e5 mov %esp,%ebp
10ea4b: 57 push %edi
10ea4c: 56 push %esi
10ea4d: 53 push %ebx
10ea4e: 83 ec 2c sub $0x2c,%esp
10ea51: 8b 55 08 mov 0x8(%ebp),%edx
10ea54: 8b 75 0c mov 0xc(%ebp),%esi
10ea57: 8b 5d 10 mov 0x10(%ebp),%ebx
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
10ea5a: 85 f6 test %esi,%esi
10ea5c: 75 0e jne 10ea6c <_Objects_Get_name_as_string+0x24>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
10ea5e: 31 db xor %ebx,%ebx
}
return NULL; /* unreachable path */
}
10ea60: 89 d8 mov %ebx,%eax
10ea62: 8d 65 f4 lea -0xc(%ebp),%esp
10ea65: 5b pop %ebx
10ea66: 5e pop %esi
10ea67: 5f pop %edi
10ea68: c9 leave
10ea69: c3 ret
10ea6a: 66 90 xchg %ax,%ax
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
10ea6c: 85 db test %ebx,%ebx
10ea6e: 74 f0 je 10ea60 <_Objects_Get_name_as_string+0x18>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ea70: 85 d2 test %edx,%edx
10ea72: 75 08 jne 10ea7c <_Objects_Get_name_as_string+0x34>
10ea74: a1 78 cd 12 00 mov 0x12cd78,%eax
10ea79: 8b 50 08 mov 0x8(%eax),%edx
information = _Objects_Get_information_id( tmpId );
10ea7c: 83 ec 0c sub $0xc,%esp
10ea7f: 52 push %edx
10ea80: 89 55 cc mov %edx,-0x34(%ebp)
10ea83: e8 00 ff ff ff call 10e988 <_Objects_Get_information_id>
10ea88: 89 c7 mov %eax,%edi
if ( !information )
10ea8a: 83 c4 10 add $0x10,%esp
10ea8d: 85 c0 test %eax,%eax
10ea8f: 8b 55 cc mov -0x34(%ebp),%edx
10ea92: 74 ca je 10ea5e <_Objects_Get_name_as_string+0x16>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
10ea94: 51 push %ecx
10ea95: 8d 45 e4 lea -0x1c(%ebp),%eax
10ea98: 50 push %eax
10ea99: 52 push %edx
10ea9a: 57 push %edi
10ea9b: e8 8c 00 00 00 call 10eb2c <_Objects_Get>
switch ( location ) {
10eaa0: 83 c4 10 add $0x10,%esp
10eaa3: 8b 55 e4 mov -0x1c(%ebp),%edx
10eaa6: 85 d2 test %edx,%edx
10eaa8: 75 b4 jne 10ea5e <_Objects_Get_name_as_string+0x16>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10eaaa: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10eaae: 74 4e je 10eafe <_Objects_Get_name_as_string+0xb6>
s = the_object->name.name_p;
10eab0: 8b 78 0c mov 0xc(%eax),%edi
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
10eab3: 85 ff test %edi,%edi
10eab5: 74 6e je 10eb25 <_Objects_Get_name_as_string+0xdd>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10eab7: 4e dec %esi
10eab8: 89 75 d4 mov %esi,-0x2c(%ebp)
10eabb: 74 68 je 10eb25 <_Objects_Get_name_as_string+0xdd><== NEVER TAKEN
10eabd: 8a 07 mov (%edi),%al
10eabf: 84 c0 test %al,%al
10eac1: 74 62 je 10eb25 <_Objects_Get_name_as_string+0xdd>
10eac3: 89 d9 mov %ebx,%ecx
10eac5: 31 d2 xor %edx,%edx
10eac7: 89 5d d0 mov %ebx,-0x30(%ebp)
10eaca: eb 07 jmp 10ead3 <_Objects_Get_name_as_string+0x8b>
10eacc: 8a 04 17 mov (%edi,%edx,1),%al
10eacf: 84 c0 test %al,%al
10ead1: 74 1b je 10eaee <_Objects_Get_name_as_string+0xa6>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10ead3: 0f b6 d8 movzbl %al,%ebx
10ead6: 8b 35 f8 a5 12 00 mov 0x12a5f8,%esi
10eadc: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1)
10eae1: 75 02 jne 10eae5 <_Objects_Get_name_as_string+0x9d>
10eae3: b0 2a mov $0x2a,%al
10eae5: 88 01 mov %al,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10eae7: 42 inc %edx
10eae8: 41 inc %ecx
10eae9: 3b 55 d4 cmp -0x2c(%ebp),%edx
10eaec: 72 de jb 10eacc <_Objects_Get_name_as_string+0x84>
10eaee: 8b 5d d0 mov -0x30(%ebp),%ebx
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
10eaf1: c6 01 00 movb $0x0,(%ecx)
_Thread_Enable_dispatch();
10eaf4: e8 a7 08 00 00 call 10f3a0 <_Thread_Enable_dispatch>
return name;
10eaf9: e9 62 ff ff ff jmp 10ea60 <_Objects_Get_name_as_string+0x18>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
10eafe: 8b 40 0c mov 0xc(%eax),%eax
lname[ 0 ] = (u32_name >> 24) & 0xff;
10eb01: 89 c2 mov %eax,%edx
10eb03: c1 ea 18 shr $0x18,%edx
10eb06: 88 55 df mov %dl,-0x21(%ebp)
lname[ 1 ] = (u32_name >> 16) & 0xff;
10eb09: 89 c2 mov %eax,%edx
10eb0b: c1 ea 10 shr $0x10,%edx
10eb0e: 88 55 e0 mov %dl,-0x20(%ebp)
lname[ 2 ] = (u32_name >> 8) & 0xff;
10eb11: 89 c2 mov %eax,%edx
10eb13: c1 ea 08 shr $0x8,%edx
10eb16: 88 55 e1 mov %dl,-0x1f(%ebp)
lname[ 3 ] = (u32_name >> 0) & 0xff;
10eb19: 88 45 e2 mov %al,-0x1e(%ebp)
lname[ 4 ] = '\0';
10eb1c: c6 45 e3 00 movb $0x0,-0x1d(%ebp)
10eb20: 8d 7d df lea -0x21(%ebp),%edi
10eb23: eb 92 jmp 10eab7 <_Objects_Get_name_as_string+0x6f>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10eb25: 89 d9 mov %ebx,%ecx
10eb27: eb c8 jmp 10eaf1 <_Objects_Get_name_as_string+0xa9>
0010d544 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
10d544: 55 push %ebp
10d545: 89 e5 mov %esp,%ebp
10d547: 57 push %edi
10d548: 56 push %esi
10d549: 53 push %ebx
10d54a: 83 ec 0c sub $0xc,%esp
10d54d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d550: 8b 75 0c mov 0xc(%ebp),%esi
10d553: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
10d556: 85 db test %ebx,%ebx
10d558: 75 0a jne 10d564 <_Objects_Get_next+0x20>
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
10d55a: 31 c0 xor %eax,%eax
}
10d55c: 8d 65 f4 lea -0xc(%ebp),%esp
10d55f: 5b pop %ebx
10d560: 5e pop %esi
10d561: 5f pop %edi
10d562: c9 leave
10d563: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
10d564: 85 ff test %edi,%edi
10d566: 74 f2 je 10d55a <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
10d568: 8b 45 14 mov 0x14(%ebp),%eax
10d56b: 85 c0 test %eax,%eax
10d56d: 74 eb je 10d55a <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
10d56f: 66 85 f6 test %si,%si
10d572: 75 04 jne 10d578 <_Objects_Get_next+0x34>
next_id = information->minimum_id;
10d574: 8b 73 08 mov 0x8(%ebx),%esi
10d577: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
10d578: 66 39 73 10 cmp %si,0x10(%ebx)
10d57c: 72 22 jb 10d5a0 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
10d57e: 51 push %ecx
10d57f: 57 push %edi
10d580: 56 push %esi
10d581: 53 push %ebx
10d582: e8 2d 00 00 00 call 10d5b4 <_Objects_Get>
next_id++;
10d587: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
10d588: 83 c4 10 add $0x10,%esp
10d58b: 8b 17 mov (%edi),%edx
10d58d: 85 d2 test %edx,%edx
10d58f: 75 e7 jne 10d578 <_Objects_Get_next+0x34>
*next_id_p = next_id;
10d591: 8b 55 14 mov 0x14(%ebp),%edx
10d594: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10d596: 8d 65 f4 lea -0xc(%ebp),%esp
10d599: 5b pop %ebx
10d59a: 5e pop %esi
10d59b: 5f pop %edi
10d59c: c9 leave
10d59d: c3 ret
10d59e: 66 90 xchg %ax,%ax
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
10d5a0: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
10d5a6: 8b 45 14 mov 0x14(%ebp),%eax
10d5a9: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
10d5af: 31 c0 xor %eax,%eax
return 0;
10d5b1: eb a9 jmp 10d55c <_Objects_Get_next+0x18>
0011b99c <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b99c: 55 push %ebp
11b99d: 89 e5 mov %esp,%ebp
11b99f: 53 push %ebx
11b9a0: 8b 55 08 mov 0x8(%ebp),%edx
11b9a3: 8b 5d 10 mov 0x10(%ebp),%ebx
/*
* 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;
11b9a6: b8 01 00 00 00 mov $0x1,%eax
11b9ab: 2b 42 08 sub 0x8(%edx),%eax
11b9ae: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b9b1: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11b9b5: 39 c8 cmp %ecx,%eax
11b9b7: 77 13 ja 11b9cc <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b9b9: 8b 52 1c mov 0x1c(%edx),%edx
11b9bc: 8b 04 82 mov (%edx,%eax,4),%eax
11b9bf: 85 c0 test %eax,%eax
11b9c1: 74 09 je 11b9cc <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b9c3: c7 03 00 00 00 00 movl $0x0,(%ebx)
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
11b9c9: 5b pop %ebx
11b9ca: c9 leave
11b9cb: c3 ret
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
11b9cc: c7 03 01 00 00 00 movl $0x1,(%ebx)
11b9d2: 31 c0 xor %eax,%eax
return NULL;
}
11b9d4: 5b pop %ebx
11b9d5: c9 leave
11b9d6: c3 ret
0010e68c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e68c: 55 push %ebp
10e68d: 89 e5 mov %esp,%ebp
10e68f: 83 ec 18 sub $0x18,%esp
10e692: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e695: 85 d2 test %edx,%edx
10e697: 75 08 jne 10e6a1 <_Objects_Id_to_name+0x15>
10e699: a1 98 bc 12 00 mov 0x12bc98,%eax
10e69e: 8b 50 08 mov 0x8(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10e6a1: 89 d0 mov %edx,%eax
10e6a3: c1 e8 18 shr $0x18,%eax
10e6a6: 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 )
10e6a9: 8d 48 ff lea -0x1(%eax),%ecx
10e6ac: 83 f9 03 cmp $0x3,%ecx
10e6af: 77 1d ja 10e6ce <_Objects_Id_to_name+0x42>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
10e6b1: 8b 04 85 ac bb 12 00 mov 0x12bbac(,%eax,4),%eax
10e6b8: 85 c0 test %eax,%eax
10e6ba: 74 12 je 10e6ce <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e6bc: 89 d1 mov %edx,%ecx
10e6be: c1 e9 1b shr $0x1b,%ecx
10e6c1: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
10e6c4: 85 c0 test %eax,%eax
10e6c6: 74 06 je 10e6ce <_Objects_Id_to_name+0x42><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10e6c8: 80 78 38 00 cmpb $0x0,0x38(%eax)
10e6cc: 74 0a je 10e6d8 <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e6ce: b8 03 00 00 00 mov $0x3,%eax
}
10e6d3: c9 leave
10e6d4: c3 ret
10e6d5: 8d 76 00 lea 0x0(%esi),%esi
#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 );
10e6d8: 51 push %ecx
10e6d9: 8d 4d f4 lea -0xc(%ebp),%ecx
10e6dc: 51 push %ecx
10e6dd: 52 push %edx
10e6de: 50 push %eax
10e6df: e8 40 ff ff ff call 10e624 <_Objects_Get>
if ( !the_object )
10e6e4: 83 c4 10 add $0x10,%esp
10e6e7: 85 c0 test %eax,%eax
10e6e9: 74 e3 je 10e6ce <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e6eb: 8b 50 0c mov 0xc(%eax),%edx
10e6ee: 8b 45 0c mov 0xc(%ebp),%eax
10e6f1: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e6f3: e8 10 08 00 00 call 10ef08 <_Thread_Enable_dispatch>
10e6f8: 31 c0 xor %eax,%eax
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
10e6fa: c9 leave
10e6fb: c3 ret
0010d460 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
10d460: 55 push %ebp
10d461: 89 e5 mov %esp,%ebp
10d463: 57 push %edi
10d464: 56 push %esi
10d465: 53 push %ebx
10d466: 83 ec 0c sub $0xc,%esp
10d469: 8b 45 08 mov 0x8(%ebp),%eax
10d46c: 8b 55 0c mov 0xc(%ebp),%edx
10d46f: 8b 5d 10 mov 0x10(%ebp),%ebx
10d472: 8b 75 20 mov 0x20(%ebp),%esi
10d475: 0f b7 7d 18 movzwl 0x18(%ebp),%edi
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
10d479: 89 10 mov %edx,(%eax)
information->the_class = the_class;
10d47b: 66 89 58 04 mov %bx,0x4(%eax)
information->size = size;
10d47f: 89 78 18 mov %edi,0x18(%eax)
information->local_table = 0;
10d482: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
information->inactive_per_block = 0;
10d489: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
information->object_blocks = 0;
10d490: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
information->inactive = 0;
10d497: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax)
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
information->is_string = is_string;
10d49d: 8b 7d 1c mov 0x1c(%ebp),%edi
10d4a0: 89 f9 mov %edi,%ecx
10d4a2: 88 48 38 mov %cl,0x38(%eax)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
10d4a5: 66 c7 40 10 00 00 movw $0x0,0x10(%eax)
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
10d4ab: 8b 3c 95 8c 94 12 00 mov 0x12948c(,%edx,4),%edi
10d4b2: 89 04 9f mov %eax,(%edi,%ebx,4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
10d4b5: 8b 7d 14 mov 0x14(%ebp),%edi
10d4b8: c1 ef 1f shr $0x1f,%edi
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
10d4bb: 89 f9 mov %edi,%ecx
10d4bd: 88 48 12 mov %cl,0x12(%eax)
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
10d4c0: 8b 4d 14 mov 0x14(%ebp),%ecx
10d4c3: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
10d4c9: 85 ff test %edi,%edi
10d4cb: 74 04 je 10d4d1 <_Objects_Initialize_information+0x71>
10d4cd: 85 c9 test %ecx,%ecx
10d4cf: 74 6a je 10d53b <_Objects_Initialize_information+0xdb>
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
10d4d1: 66 89 48 14 mov %cx,0x14(%eax)
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
10d4d5: c7 40 1c 04 91 12 00 movl $0x129104,0x1c(%eax)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
10d4dc: c1 e2 18 shl $0x18,%edx
10d4df: 81 ca 00 00 01 00 or $0x10000,%edx
10d4e5: c1 e3 1b shl $0x1b,%ebx
10d4e8: 09 da or %ebx,%edx
10d4ea: 31 db xor %ebx,%ebx
10d4ec: 85 c9 test %ecx,%ecx
10d4ee: 0f 95 c3 setne %bl
10d4f1: 09 da or %ebx,%edx
10d4f3: 89 50 08 mov %edx,0x8(%eax)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
10d4f6: f7 c6 03 00 00 00 test $0x3,%esi
10d4fc: 75 26 jne 10d524 <_Objects_Initialize_information+0xc4>
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
10d4fe: 66 89 70 3a mov %si,0x3a(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10d502: 8d 50 24 lea 0x24(%eax),%edx
10d505: 89 50 20 mov %edx,0x20(%eax)
the_chain->permanent_null = NULL;
10d508: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
the_chain->last = _Chain_Head(the_chain);
10d50f: 8d 50 20 lea 0x20(%eax),%edx
10d512: 89 50 28 mov %edx,0x28(%eax)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
10d515: 85 c9 test %ecx,%ecx
10d517: 75 13 jne 10d52c <_Objects_Initialize_information+0xcc>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10d519: 8d 65 f4 lea -0xc(%ebp),%esp
10d51c: 5b pop %ebx
10d51d: 5e pop %esi
10d51e: 5f pop %edi
10d51f: c9 leave
10d520: c3 ret
10d521: 8d 76 00 lea 0x0(%esi),%esi
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
10d524: 83 c6 04 add $0x4,%esi
10d527: 83 e6 fc and $0xfffffffc,%esi
10d52a: eb d2 jmp 10d4fe <_Objects_Initialize_information+0x9e>
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10d52c: 89 45 08 mov %eax,0x8(%ebp)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
10d52f: 8d 65 f4 lea -0xc(%ebp),%esp
10d532: 5b pop %ebx
10d533: 5e pop %esi
10d534: 5f pop %edi
10d535: c9 leave
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
10d536: e9 b1 fa ff ff jmp 10cfec <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
10d53b: 50 push %eax
10d53c: 6a 14 push $0x14
10d53e: 6a 01 push $0x1
10d540: 6a 00 push $0x0
10d542: e8 69 f9 ff ff call 10ceb0 <_Internal_error_Occurred>
00118898 <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
118898: 55 push %ebp
118899: 89 e5 mov %esp,%ebp
11889b: 57 push %edi
11889c: 56 push %esi
11889d: 53 push %ebx
11889e: 83 ec 1c sub $0x1c,%esp
1188a1: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
1188a4: 8b 5d 10 mov 0x10(%ebp),%ebx
1188a7: 85 db test %ebx,%ebx
1188a9: 74 75 je 118920 <_Objects_Name_to_id_string+0x88>
return OBJECTS_INVALID_ADDRESS;
if ( !name )
1188ab: 8b 4d 0c mov 0xc(%ebp),%ecx
1188ae: 85 c9 test %ecx,%ecx
1188b0: 74 4b je 1188fd <_Objects_Name_to_id_string+0x65>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
1188b2: 8b 47 10 mov 0x10(%edi),%eax
1188b5: 66 85 c0 test %ax,%ax
1188b8: 74 43 je 1188fd <_Objects_Name_to_id_string+0x65>
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
1188ba: 0f b7 c0 movzwl %ax,%eax
1188bd: 89 45 e4 mov %eax,-0x1c(%ebp)
1188c0: 8b 47 1c mov 0x1c(%edi),%eax
1188c3: bb 01 00 00 00 mov $0x1,%ebx
1188c8: 89 7d e0 mov %edi,-0x20(%ebp)
1188cb: 89 c7 mov %eax,%edi
1188cd: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
1188d0: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
1188d3: 85 f6 test %esi,%esi
1188d5: 74 20 je 1188f7 <_Objects_Name_to_id_string+0x5f>
continue;
if ( !the_object->name.name_p )
1188d7: 8b 46 0c mov 0xc(%esi),%eax
1188da: 85 c0 test %eax,%eax
1188dc: 74 19 je 1188f7 <_Objects_Name_to_id_string+0x5f>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
1188de: 52 push %edx
1188df: 8b 4d e0 mov -0x20(%ebp),%ecx
1188e2: 0f b7 51 3a movzwl 0x3a(%ecx),%edx
1188e6: 52 push %edx
1188e7: 50 push %eax
1188e8: ff 75 0c pushl 0xc(%ebp)
1188eb: e8 fc 3c 00 00 call 11c5ec <strncmp>
1188f0: 83 c4 10 add $0x10,%esp
1188f3: 85 c0 test %eax,%eax
1188f5: 74 15 je 11890c <_Objects_Name_to_id_string+0x74>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
1188f7: 43 inc %ebx
1188f8: 3b 5d e4 cmp -0x1c(%ebp),%ebx
1188fb: 76 d3 jbe 1188d0 <_Objects_Name_to_id_string+0x38>
1188fd: b8 01 00 00 00 mov $0x1,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118902: 8d 65 f4 lea -0xc(%ebp),%esp
118905: 5b pop %ebx
118906: 5e pop %esi
118907: 5f pop %edi
118908: c9 leave
118909: c3 ret
11890a: 66 90 xchg %ax,%ax
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
11890c: 8b 46 08 mov 0x8(%esi),%eax
11890f: 8b 55 10 mov 0x10(%ebp),%edx
118912: 89 02 mov %eax,(%edx)
118914: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118916: 8d 65 f4 lea -0xc(%ebp),%esp
118919: 5b pop %ebx
11891a: 5e pop %esi
11891b: 5f pop %edi
11891c: c9 leave
11891d: c3 ret
11891e: 66 90 xchg %ax,%ax
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == true */
if ( !id )
118920: b8 02 00 00 00 mov $0x2,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
118925: 8d 65 f4 lea -0xc(%ebp),%esp
118928: 5b pop %ebx
118929: 5e pop %esi
11892a: 5f pop %edi
11892b: c9 leave
11892c: c3 ret
0010d57c <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10d57c: 55 push %ebp
10d57d: 89 e5 mov %esp,%ebp
10d57f: 57 push %edi
10d580: 56 push %esi
10d581: 53 push %ebx
10d582: 8b 45 08 mov 0x8(%ebp),%eax
10d585: 8b 4d 0c mov 0xc(%ebp),%ecx
10d588: 8b 55 10 mov 0x10(%ebp),%edx
10d58b: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d58e: 85 ff test %edi,%edi
10d590: 74 56 je 10d5e8 <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10d592: 85 c9 test %ecx,%ecx
10d594: 74 08 je 10d59e <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d596: 8b 70 10 mov 0x10(%eax),%esi
10d599: 66 85 f6 test %si,%si
10d59c: 75 0a jne 10d5a8 <_Objects_Name_to_id_u32+0x2c>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d59e: b8 01 00 00 00 mov $0x1,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5a3: 5b pop %ebx
10d5a4: 5e pop %esi
10d5a5: 5f pop %edi
10d5a6: c9 leave
10d5a7: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d5a8: 85 d2 test %edx,%edx
10d5aa: 75 20 jne 10d5cc <_Objects_Name_to_id_u32+0x50>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d5ac: 0f b7 f6 movzwl %si,%esi
10d5af: 8b 58 1c mov 0x1c(%eax),%ebx
10d5b2: b8 01 00 00 00 mov $0x1,%eax
10d5b7: 90 nop
the_object = information->local_table[ index ];
10d5b8: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10d5bb: 85 d2 test %edx,%edx
10d5bd: 74 05 je 10d5c4 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10d5bf: 39 4a 0c cmp %ecx,0xc(%edx)
10d5c2: 74 18 je 10d5dc <_Objects_Name_to_id_u32+0x60>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
10d5c4: 40 inc %eax
10d5c5: 39 c6 cmp %eax,%esi
10d5c7: 73 ef jae 10d5b8 <_Objects_Name_to_id_u32+0x3c>
10d5c9: eb d3 jmp 10d59e <_Objects_Name_to_id_u32+0x22>
10d5cb: 90 nop
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d5cc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10d5d2: 74 d8 je 10d5ac <_Objects_Name_to_id_u32+0x30>
10d5d4: 4a dec %edx
10d5d5: 75 c7 jne 10d59e <_Objects_Name_to_id_u32+0x22>
10d5d7: eb d3 jmp 10d5ac <_Objects_Name_to_id_u32+0x30>
10d5d9: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10d5dc: 8b 42 08 mov 0x8(%edx),%eax
10d5df: 89 07 mov %eax,(%edi)
10d5e1: 31 c0 xor %eax,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5e3: 5b pop %ebx
10d5e4: 5e pop %esi
10d5e5: 5f pop %edi
10d5e6: c9 leave
10d5e7: c3 ret
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d5e8: b8 02 00 00 00 mov $0x2,%eax
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
10d5ed: 5b pop %ebx
10d5ee: 5e pop %esi
10d5ef: 5f pop %edi
10d5f0: c9 leave
10d5f1: c3 ret
0010dc4c <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10dc4c: 55 push %ebp
10dc4d: 89 e5 mov %esp,%ebp
10dc4f: 57 push %edi
10dc50: 56 push %esi
10dc51: 53 push %ebx
10dc52: 83 ec 14 sub $0x14,%esp
10dc55: 8b 7d 08 mov 0x8(%ebp),%edi
10dc58: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10dc5b: 0f b7 47 3a movzwl 0x3a(%edi),%eax
10dc5f: 50 push %eax
10dc60: 53 push %ebx
10dc61: e8 92 8f 00 00 call 116bf8 <strnlen>
10dc66: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10dc68: 83 c4 10 add $0x10,%esp
10dc6b: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10dc6f: 75 53 jne 10dcc4 <_Objects_Set_name+0x78>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10dc71: 0f be 13 movsbl (%ebx),%edx
10dc74: c1 e2 18 shl $0x18,%edx
10dc77: 83 f8 01 cmp $0x1,%eax
10dc7a: 76 34 jbe 10dcb0 <_Objects_Set_name+0x64>
10dc7c: 0f be 43 01 movsbl 0x1(%ebx),%eax
10dc80: c1 e0 10 shl $0x10,%eax
10dc83: 09 d0 or %edx,%eax
10dc85: 83 fe 02 cmp $0x2,%esi
10dc88: 74 2d je 10dcb7 <_Objects_Set_name+0x6b>
10dc8a: 0f be 53 02 movsbl 0x2(%ebx),%edx
10dc8e: c1 e2 08 shl $0x8,%edx
10dc91: 09 c2 or %eax,%edx
10dc93: 83 fe 03 cmp $0x3,%esi
10dc96: 74 24 je 10dcbc <_Objects_Set_name+0x70>
10dc98: 0f be 43 03 movsbl 0x3(%ebx),%eax
10dc9c: 09 c2 or %eax,%edx
10dc9e: 8b 45 0c mov 0xc(%ebp),%eax
10dca1: 89 50 0c mov %edx,0xc(%eax)
10dca4: b0 01 mov $0x1,%al
);
}
return true;
}
10dca6: 8d 65 f4 lea -0xc(%ebp),%esp
10dca9: 5b pop %ebx
10dcaa: 5e pop %esi
10dcab: 5f pop %edi
10dcac: c9 leave
10dcad: c3 ret
10dcae: 66 90 xchg %ax,%ax
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10dcb0: 89 d0 mov %edx,%eax
10dcb2: 0d 00 00 20 00 or $0x200000,%eax
10dcb7: 89 c2 mov %eax,%edx
10dcb9: 80 ce 20 or $0x20,%dh
10dcbc: b8 20 00 00 00 mov $0x20,%eax
10dcc1: eb d9 jmp 10dc9c <_Objects_Set_name+0x50>
10dcc3: 90 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
10dcc4: 83 ec 0c sub $0xc,%esp
10dcc7: 8d 40 01 lea 0x1(%eax),%eax
10dcca: 50 push %eax
10dccb: e8 78 18 00 00 call 10f548 <_Workspace_Allocate>
10dcd0: 89 c7 mov %eax,%edi
if ( !d )
10dcd2: 83 c4 10 add $0x10,%esp
10dcd5: 85 c0 test %eax,%eax
10dcd7: 74 43 je 10dd1c <_Objects_Set_name+0xd0><== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
10dcd9: 8b 55 0c mov 0xc(%ebp),%edx
10dcdc: 8b 42 0c mov 0xc(%edx),%eax
10dcdf: 85 c0 test %eax,%eax
10dce1: 74 16 je 10dcf9 <_Objects_Set_name+0xad>
_Workspace_Free( (void *)the_object->name.name_p );
10dce3: 83 ec 0c sub $0xc,%esp
10dce6: 50 push %eax
10dce7: e8 78 18 00 00 call 10f564 <_Workspace_Free>
the_object->name.name_p = NULL;
10dcec: 8b 45 0c mov 0xc(%ebp),%eax
10dcef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
10dcf6: 83 c4 10 add $0x10,%esp
}
strncpy( d, name, length );
10dcf9: 50 push %eax
10dcfa: 56 push %esi
10dcfb: 53 push %ebx
10dcfc: 57 push %edi
10dcfd: e8 7a 8e 00 00 call 116b7c <strncpy>
d[length] = '\0';
10dd02: c6 04 37 00 movb $0x0,(%edi,%esi,1)
the_object->name.name_p = d;
10dd06: 8b 55 0c mov 0xc(%ebp),%edx
10dd09: 89 7a 0c mov %edi,0xc(%edx)
10dd0c: b0 01 mov $0x1,%al
10dd0e: 83 c4 10 add $0x10,%esp
);
}
return true;
}
10dd11: 8d 65 f4 lea -0xc(%ebp),%esp
10dd14: 5b pop %ebx
10dd15: 5e pop %esi
10dd16: 5f pop %edi
10dd17: c9 leave
10dd18: c3 ret
10dd19: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
10dd1c: 31 c0 xor %eax,%eax
10dd1e: eb 86 jmp 10dca6 <_Objects_Set_name+0x5a><== NOT EXECUTED
0010d5f4 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d5f4: 55 push %ebp
10d5f5: 89 e5 mov %esp,%ebp
10d5f7: 57 push %edi
10d5f8: 56 push %esi
10d5f9: 53 push %ebx
10d5fa: 83 ec 1c sub $0x1c,%esp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
10d5fd: 8b 45 08 mov 0x8(%ebp),%eax
10d600: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10d604: 0f b7 48 14 movzwl 0x14(%eax),%ecx
10d608: 0f b7 40 10 movzwl 0x10(%eax),%eax
10d60c: 29 d8 sub %ebx,%eax
10d60e: 31 d2 xor %edx,%edx
10d610: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d612: 85 c0 test %eax,%eax
10d614: 74 21 je 10d637 <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d616: 8b 55 08 mov 0x8(%ebp),%edx
10d619: 8b 7a 30 mov 0x30(%edx),%edi
10d61c: 3b 0f cmp (%edi),%ecx
10d61e: 74 1f je 10d63f <_Objects_Shrink_information+0x4b><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
10d620: 31 d2 xor %edx,%edx
10d622: eb 0e jmp 10d632 <_Objects_Shrink_information+0x3e>
}
index_base += information->allocation_size;
10d624: 01 cb add %ecx,%ebx
10d626: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi
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 ] ==
10d62d: 3b 0c 97 cmp (%edi,%edx,4),%ecx
10d630: 74 12 je 10d644 <_Objects_Shrink_information+0x50>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d632: 42 inc %edx
10d633: 39 d0 cmp %edx,%eax
10d635: 77 ed ja 10d624 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10d637: 8d 65 f4 lea -0xc(%ebp),%esp
10d63a: 5b pop %ebx
10d63b: 5e pop %esi
10d63c: 5f pop %edi
10d63d: c9 leave
10d63e: 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 ] ==
10d63f: 31 f6 xor %esi,%esi
10d641: 8d 76 00 lea 0x0(%esi),%esi
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
10d644: 8b 55 08 mov 0x8(%ebp),%edx
10d647: 8b 42 20 mov 0x20(%edx),%eax
10d64a: 89 75 e4 mov %esi,-0x1c(%ebp)
10d64d: eb 07 jmp 10d656 <_Objects_Shrink_information+0x62>
10d64f: 90 nop
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d650: 85 ff test %edi,%edi
10d652: 74 2c je 10d680 <_Objects_Shrink_information+0x8c>
10d654: 89 f8 mov %edi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
10d656: 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;
10d65a: 8b 38 mov (%eax),%edi
if ((index >= index_base) &&
10d65c: 39 da cmp %ebx,%edx
10d65e: 72 f0 jb 10d650 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10d660: 8b 75 08 mov 0x8(%ebp),%esi
10d663: 0f b7 4e 14 movzwl 0x14(%esi),%ecx
10d667: 8d 0c 0b lea (%ebx,%ecx,1),%ecx
10d66a: 39 ca cmp %ecx,%edx
10d66c: 73 e2 jae 10d650 <_Objects_Shrink_information+0x5c>
_Chain_Extract( &extract_me->Node );
10d66e: 83 ec 0c sub $0xc,%esp
10d671: 50 push %eax
10d672: e8 6d ef ff ff call 10c5e4 <_Chain_Extract>
10d677: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10d67a: 85 ff test %edi,%edi
10d67c: 75 d6 jne 10d654 <_Objects_Shrink_information+0x60>
10d67e: 66 90 xchg %ax,%ax
10d680: 8b 75 e4 mov -0x1c(%ebp),%esi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d683: 83 ec 0c sub $0xc,%esp
10d686: 8b 55 08 mov 0x8(%ebp),%edx
10d689: 8b 42 34 mov 0x34(%edx),%eax
10d68c: ff 34 30 pushl (%eax,%esi,1)
10d68f: e8 a4 17 00 00 call 10ee38 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d694: 8b 55 08 mov 0x8(%ebp),%edx
10d697: 8b 42 34 mov 0x34(%edx),%eax
10d69a: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive_per_block[ block ] = 0;
10d6a1: 8b 42 30 mov 0x30(%edx),%eax
10d6a4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1)
information->inactive -= information->allocation_size;
10d6ab: 8b 42 14 mov 0x14(%edx),%eax
10d6ae: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d6b2: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d6b5: 8d 65 f4 lea -0xc(%ebp),%esp
10d6b8: 5b pop %ebx
10d6b9: 5e pop %esi
10d6ba: 5f pop %edi
10d6bb: c9 leave
10d6bc: c3 ret
0010dae8 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10dae8: 55 push %ebp
10dae9: 89 e5 mov %esp,%ebp
10daeb: 57 push %edi
10daec: 56 push %esi
10daed: 53 push %ebx
10daee: 83 ec 38 sub $0x38,%esp
10daf1: 8b 5d 08 mov 0x8(%ebp),%ebx
10daf4: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10daf7: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10dafd: 53 push %ebx
10dafe: e8 85 3c 00 00 call 111788 <_Timespec_Is_valid>
10db03: 83 c4 10 add $0x10,%esp
10db06: 84 c0 test %al,%al
10db08: 75 0a jne 10db14 <_POSIX_Absolute_timeout_to_ticks+0x2c>
10db0a: 31 c0 xor %eax,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db0c: 8d 65 f4 lea -0xc(%ebp),%esp
10db0f: 5b pop %ebx
10db10: 5e pop %esi
10db11: 5f pop %edi
10db12: c9 leave
10db13: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10db14: 83 ec 0c sub $0xc,%esp
10db17: 8d 7d e0 lea -0x20(%ebp),%edi
10db1a: 57 push %edi
10db1b: e8 70 1d 00 00 call 10f890 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10db20: 5a pop %edx
10db21: 59 pop %ecx
10db22: 57 push %edi
10db23: 53 push %ebx
10db24: e8 87 3c 00 00 call 1117b0 <_Timespec_Less_than>
10db29: 83 c4 10 add $0x10,%esp
10db2c: 84 c0 test %al,%al
10db2e: 74 10 je 10db40 <_POSIX_Absolute_timeout_to_ticks+0x58>
10db30: b8 01 00 00 00 mov $0x1,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db35: 8d 65 f4 lea -0xc(%ebp),%esp
10db38: 5b pop %ebx
10db39: 5e pop %esi
10db3a: 5f pop %edi
10db3b: c9 leave
10db3c: c3 ret
10db3d: 8d 76 00 lea 0x0(%esi),%esi
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10db40: 50 push %eax
10db41: 8d 45 d8 lea -0x28(%ebp),%eax
10db44: 50 push %eax
10db45: 53 push %ebx
10db46: 57 push %edi
10db47: 89 45 d4 mov %eax,-0x2c(%ebp)
10db4a: e8 85 3c 00 00 call 1117d4 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10db4f: 8b 45 d4 mov -0x2c(%ebp),%eax
10db52: 89 04 24 mov %eax,(%esp)
10db55: e8 b6 3c 00 00 call 111810 <_Timespec_To_ticks>
10db5a: 89 06 mov %eax,(%esi)
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
10db5c: 83 c4 10 add $0x10,%esp
10db5f: 83 f8 01 cmp $0x1,%eax
10db62: 19 c0 sbb %eax,%eax
10db64: 83 c0 03 add $0x3,%eax
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
10db67: 8d 65 f4 lea -0xc(%ebp),%esp
10db6a: 5b pop %ebx
10db6b: 5e pop %esi
10db6c: 5f pop %edi
10db6d: c9 leave
10db6e: c3 ret
0010c6c8 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10c6c8: 55 push %ebp
10c6c9: 89 e5 mov %esp,%ebp
10c6cb: 56 push %esi
10c6cc: 53 push %ebx
10c6cd: 8b 5d 08 mov 0x8(%ebp),%ebx
10c6d0: 8b 75 0c mov 0xc(%ebp),%esi
int status;
if ( !cond ) {
10c6d3: 85 db test %ebx,%ebx
10c6d5: 74 39 je 10c710 <_POSIX_Condition_variables_Get+0x48>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
10c6d7: 8b 03 mov (%ebx),%eax
10c6d9: 83 f8 ff cmp $0xffffffff,%eax
10c6dc: 74 1a je 10c6f8 <_POSIX_Condition_variables_Get+0x30>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
10c6de: 52 push %edx
10c6df: 56 push %esi
10c6e0: 50 push %eax
10c6e1: 68 40 c1 12 00 push $0x12c140
10c6e6: e8 2d 2b 00 00 call 10f218 <_Objects_Get>
10c6eb: 83 c4 10 add $0x10,%esp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
10c6ee: 8d 65 f8 lea -0x8(%ebp),%esp
10c6f1: 5b pop %ebx
10c6f2: 5e pop %esi
10c6f3: c9 leave
10c6f4: c3 ret
10c6f5: 8d 76 00 lea 0x0(%esi),%esi
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
10c6f8: 83 ec 08 sub $0x8,%esp
10c6fb: 6a 00 push $0x0
10c6fd: 53 push %ebx
10c6fe: e8 19 00 00 00 call 10c71c <pthread_cond_init>
if ( status ) {
10c703: 83 c4 10 add $0x10,%esp
10c706: 85 c0 test %eax,%eax
10c708: 75 06 jne 10c710 <_POSIX_Condition_variables_Get+0x48>
10c70a: 8b 03 mov (%ebx),%eax
10c70c: eb d0 jmp 10c6de <_POSIX_Condition_variables_Get+0x16>
10c70e: 66 90 xchg %ax,%ax
*location = OBJECTS_ERROR;
10c710: c7 06 01 00 00 00 movl $0x1,(%esi)
10c716: 31 c0 xor %eax,%eax
return (POSIX_Condition_variables_Control *) 0;
10c718: eb d4 jmp 10c6ee <_POSIX_Condition_variables_Get+0x26>
0010c7e4 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10c7e4: 55 push %ebp
10c7e5: 89 e5 mov %esp,%ebp
10c7e7: 57 push %edi
10c7e8: 56 push %esi
10c7e9: 53 push %ebx
10c7ea: 83 ec 24 sub $0x24,%esp
10c7ed: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
Thread_Control *the_thread;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c7f0: 8d 45 e4 lea -0x1c(%ebp),%eax
10c7f3: 50 push %eax
10c7f4: ff 75 08 pushl 0x8(%ebp)
10c7f7: e8 cc fe ff ff call 10c6c8 <_POSIX_Condition_variables_Get>
10c7fc: 89 c7 mov %eax,%edi
switch ( location ) {
10c7fe: 83 c4 10 add $0x10,%esp
10c801: 8b 45 e4 mov -0x1c(%ebp),%eax
10c804: 85 c0 test %eax,%eax
10c806: 74 10 je 10c818 <_POSIX_Condition_variables_Signal_support+0x34>
10c808: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c80d: 8d 65 f4 lea -0xc(%ebp),%esp
10c810: 5b pop %ebx
10c811: 5e pop %esi
10c812: 5f pop %edi
10c813: c9 leave
10c814: c3 ret
10c815: 8d 76 00 lea 0x0(%esi),%esi
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c818: 8d 77 18 lea 0x18(%edi),%esi
10c81b: eb 0b jmp 10c828 <_POSIX_Condition_variables_Signal_support+0x44>
10c81d: 8d 76 00 lea 0x0(%esi),%esi
if ( !the_thread )
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
} while ( is_broadcast && the_thread );
10c820: 84 db test %bl,%bl
10c822: 74 20 je 10c844 <_POSIX_Condition_variables_Signal_support+0x60>
10c824: 85 c0 test %eax,%eax
10c826: 74 1c je 10c844 <_POSIX_Condition_variables_Signal_support+0x60>
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
10c828: 83 ec 0c sub $0xc,%esp
10c82b: 56 push %esi
10c82c: e8 77 36 00 00 call 10fea8 <_Thread_queue_Dequeue>
if ( !the_thread )
10c831: 83 c4 10 add $0x10,%esp
10c834: 85 c0 test %eax,%eax
10c836: 75 e8 jne 10c820 <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c838: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
} while ( is_broadcast && the_thread );
10c83f: 84 db test %bl,%bl
10c841: 75 e1 jne 10c824 <_POSIX_Condition_variables_Signal_support+0x40>
10c843: 90 nop
_Thread_Enable_dispatch();
10c844: e8 43 32 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c849: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c84b: 8d 65 f4 lea -0xc(%ebp),%esp
10c84e: 5b pop %ebx
10c84f: 5e pop %esi
10c850: 5f pop %edi
10c851: c9 leave
10c852: c3 ret
0010c8ac <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10c8ac: 55 push %ebp
10c8ad: 89 e5 mov %esp,%ebp
10c8af: 57 push %edi
10c8b0: 56 push %esi
10c8b1: 53 push %ebx
10c8b2: 83 ec 34 sub $0x34,%esp
10c8b5: 8b 7d 08 mov 0x8(%ebp),%edi
10c8b8: 8b 5d 0c mov 0xc(%ebp),%ebx
10c8bb: 8a 45 14 mov 0x14(%ebp),%al
10c8be: 88 45 d7 mov %al,-0x29(%ebp)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
10c8c1: 8d 75 e4 lea -0x1c(%ebp),%esi
10c8c4: 56 push %esi
10c8c5: 53 push %ebx
10c8c6: e8 b1 01 00 00 call 10ca7c <_POSIX_Mutex_Get>
10c8cb: 83 c4 10 add $0x10,%esp
10c8ce: 85 c0 test %eax,%eax
10c8d0: 74 21 je 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c8d2: a1 58 bc 12 00 mov 0x12bc58,%eax
10c8d7: 48 dec %eax
10c8d8: a3 58 bc 12 00 mov %eax,0x12bc58
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c8dd: 83 ec 08 sub $0x8,%esp
10c8e0: 56 push %esi
10c8e1: 57 push %edi
10c8e2: e8 e1 fd ff ff call 10c6c8 <_POSIX_Condition_variables_Get>
10c8e7: 89 c6 mov %eax,%esi
switch ( location ) {
10c8e9: 83 c4 10 add $0x10,%esp
10c8ec: 8b 55 e4 mov -0x1c(%ebp),%edx
10c8ef: 85 d2 test %edx,%edx
10c8f1: 74 11 je 10c904 <_POSIX_Condition_variables_Wait_support+0x58>
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
if ( mutex_status )
10c8f3: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c8f8: 89 f0 mov %esi,%eax
10c8fa: 8d 65 f4 lea -0xc(%ebp),%esp
10c8fd: 5b pop %ebx
10c8fe: 5e pop %esi
10c8ff: 5f pop %edi
10c900: c9 leave
10c901: c3 ret
10c902: 66 90 xchg %ax,%ax
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10c904: 8b 40 14 mov 0x14(%eax),%eax
10c907: 85 c0 test %eax,%eax
10c909: 74 19 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78>
10c90b: 3b 03 cmp (%ebx),%eax
10c90d: 74 15 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
10c90f: e8 78 31 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c914: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c919: 89 f0 mov %esi,%eax
10c91b: 8d 65 f4 lea -0xc(%ebp),%esp
10c91e: 5b pop %ebx
10c91f: 5e pop %esi
10c920: 5f pop %edi
10c921: c9 leave
10c922: c3 ret
10c923: 90 nop
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10c924: 83 ec 0c sub $0xc,%esp
10c927: 53 push %ebx
10c928: e8 73 03 00 00 call 10cca0 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10c92d: 83 c4 10 add $0x10,%esp
10c930: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10c934: 74 26 je 10c95c <_POSIX_Condition_variables_Wait_support+0xb0>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
10c936: e8 51 31 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c93b: be 74 00 00 00 mov $0x74,%esi
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10c940: 83 ec 0c sub $0xc,%esp
10c943: 53 push %ebx
10c944: e8 cf 02 00 00 call 10cc18 <pthread_mutex_lock>
if ( mutex_status )
10c949: 83 c4 10 add $0x10,%esp
10c94c: 85 c0 test %eax,%eax
10c94e: 75 a3 jne 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c950: 89 f0 mov %esi,%eax
10c952: 8d 65 f4 lea -0xc(%ebp),%esp
10c955: 5b pop %ebx
10c956: 5e pop %esi
10c957: 5f pop %edi
10c958: c9 leave
10c959: c3 ret
10c95a: 66 90 xchg %ax,%ax
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
10c95c: 8b 03 mov (%ebx),%eax
10c95e: 89 46 14 mov %eax,0x14(%esi)
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;
10c961: c7 46 48 01 00 00 00 movl $0x1,0x48(%esi)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
10c968: a1 18 bd 12 00 mov 0x12bd18,%eax
10c96d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10c974: 83 c6 18 add $0x18,%esi
10c977: 89 70 44 mov %esi,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10c97a: 8b 17 mov (%edi),%edx
10c97c: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10c97f: 50 push %eax
10c980: 68 28 03 11 00 push $0x110328
10c985: ff 75 10 pushl 0x10(%ebp)
10c988: 56 push %esi
10c989: e8 36 36 00 00 call 10ffc4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c98e: e8 f9 30 00 00 call 10fa8c <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
10c993: a1 18 bd 12 00 mov 0x12bd18,%eax
10c998: 8b 70 34 mov 0x34(%eax),%esi
if ( status && status != ETIMEDOUT )
10c99b: 83 c4 10 add $0x10,%esp
10c99e: 85 f6 test %esi,%esi
10c9a0: 74 9e je 10c940 <_POSIX_Condition_variables_Wait_support+0x94>
10c9a2: 83 fe 74 cmp $0x74,%esi
10c9a5: 0f 85 4d ff ff ff jne 10c8f8 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN
10c9ab: eb 93 jmp 10c940 <_POSIX_Condition_variables_Wait_support+0x94>
001143c8 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
1143c8: 55 push %ebp
1143c9: 89 e5 mov %esp,%ebp
1143cb: 57 push %edi
1143cc: 56 push %esi
1143cd: 53 push %ebx
1143ce: 83 ec 1c sub $0x1c,%esp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
1143d1: 8b 45 08 mov 0x8(%ebp),%eax
1143d4: 8b 50 08 mov 0x8(%eax),%edx
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
1143d7: 89 d0 mov %edx,%eax
1143d9: c1 e8 18 shr $0x18,%eax
1143dc: 83 e0 07 and $0x7,%eax
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 ];
1143df: 0f b7 d2 movzwl %dx,%edx
1143e2: c1 e2 02 shl $0x2,%edx
1143e5: 89 55 e4 mov %edx,-0x1c(%ebp)
1143e8: 83 c0 04 add $0x4,%eax
1143eb: 89 45 e0 mov %eax,-0x20(%ebp)
*
* 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;
1143ee: 8b 1d 70 99 12 00 mov 0x129970,%ebx
done = true;
for ( index = 1 ; index <= max ; ++index ) {
1143f4: 66 85 db test %bx,%bx
1143f7: 75 0b jne 114404 <_POSIX_Keys_Run_destructors+0x3c>
done = false;
}
}
}
}
}
1143f9: 8d 65 f4 lea -0xc(%ebp),%esp
1143fc: 5b pop %ebx
1143fd: 5e pop %esi
1143fe: 5f pop %edi
1143ff: c9 leave
114400: c3 ret
114401: 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 ) {
114404: be 01 00 00 00 mov $0x1,%esi
114409: b2 01 mov $0x1,%dl
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
11440b: 0f b7 ce movzwl %si,%ecx
11440e: a1 7c 99 12 00 mov 0x12997c,%eax
114413: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( key != NULL && key->destructor != NULL ) {
114416: 85 c0 test %eax,%eax
114418: 74 29 je 114443 <_POSIX_Keys_Run_destructors+0x7b>
11441a: 8b 48 10 mov 0x10(%eax),%ecx
11441d: 85 c9 test %ecx,%ecx
11441f: 74 22 je 114443 <_POSIX_Keys_Run_destructors+0x7b>
void *value = key->Values [ thread_api ][ thread_index ];
114421: 8b 7d e4 mov -0x1c(%ebp),%edi
114424: 8b 4d e0 mov -0x20(%ebp),%ecx
114427: 03 7c 88 04 add 0x4(%eax,%ecx,4),%edi
11442b: 8b 0f mov (%edi),%ecx
if ( value != NULL ) {
11442d: 85 c9 test %ecx,%ecx
11442f: 74 12 je 114443 <_POSIX_Keys_Run_destructors+0x7b>
key->Values [ thread_api ][ thread_index ] = NULL;
114431: c7 07 00 00 00 00 movl $0x0,(%edi)
(*key->destructor)( value );
114437: 83 ec 0c sub $0xc,%esp
11443a: 51 push %ecx
11443b: ff 50 10 call *0x10(%eax)
11443e: 31 d2 xor %edx,%edx
114440: 83 c4 10 add $0x10,%esp
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
114443: 46 inc %esi
114444: 66 39 f3 cmp %si,%bx
114447: 73 c2 jae 11440b <_POSIX_Keys_Run_destructors+0x43>
* 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 ) {
114449: 84 d2 test %dl,%dl
11444b: 74 a1 je 1143ee <_POSIX_Keys_Run_destructors+0x26>
11444d: eb aa jmp 1143f9 <_POSIX_Keys_Run_destructors+0x31>
0011726c <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
11726c: 55 push %ebp
11726d: 89 e5 mov %esp,%ebp
11726f: 57 push %edi
117270: 56 push %esi
117271: 53 push %ebx
117272: 83 ec 34 sub $0x34,%esp
117275: 8b 75 10 mov 0x10(%ebp),%esi
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
117278: 68 ff 00 00 00 push $0xff
11727d: ff 75 08 pushl 0x8(%ebp)
117280: e8 5f 54 00 00 call 11c6e4 <strnlen>
117285: 89 c3 mov %eax,%ebx
117287: a1 58 21 13 00 mov 0x132158,%eax
11728c: 40 inc %eax
11728d: a3 58 21 13 00 mov %eax,0x132158
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
117292: 83 c4 10 add $0x10,%esp
117295: 85 f6 test %esi,%esi
117297: 0f 84 c3 00 00 00 je 117360 <_POSIX_Message_queue_Create_support+0xf4>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
11729d: 8b 4e 04 mov 0x4(%esi),%ecx
1172a0: 85 c9 test %ecx,%ecx
1172a2: 0f 8e fc 00 00 00 jle 1173a4 <_POSIX_Message_queue_Create_support+0x138>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
1172a8: 8b 56 08 mov 0x8(%esi),%edx
1172ab: 85 d2 test %edx,%edx
1172ad: 0f 8e f1 00 00 00 jle 1173a4 <_POSIX_Message_queue_Create_support+0x138>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
1172b3: 8d 7d d8 lea -0x28(%ebp),%edi
1172b6: b9 04 00 00 00 mov $0x4,%ecx
1172bb: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
1172bd: 8b 45 dc mov -0x24(%ebp),%eax
1172c0: 89 45 d4 mov %eax,-0x2c(%ebp)
1172c3: 8b 45 e0 mov -0x20(%ebp),%eax
1172c6: 89 45 d0 mov %eax,-0x30(%ebp)
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
1172c9: 83 ec 0c sub $0xc,%esp
1172cc: 68 20 25 13 00 push $0x132520
1172d1: e8 5a ba ff ff call 112d30 <_Objects_Allocate>
1172d6: 89 c6 mov %eax,%esi
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
1172d8: 83 c4 10 add $0x10,%esp
1172db: 85 c0 test %eax,%eax
1172dd: 0f 84 03 01 00 00 je 1173e6 <_POSIX_Message_queue_Create_support+0x17a>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
1172e3: 8b 45 0c mov 0xc(%ebp),%eax
1172e6: 89 46 10 mov %eax,0x10(%esi)
the_mq->named = true;
1172e9: c6 46 14 01 movb $0x1,0x14(%esi)
the_mq->open_count = 1;
1172ed: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi)
the_mq->linked = true;
1172f4: c6 46 15 01 movb $0x1,0x15(%esi)
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
1172f8: 43 inc %ebx
1172f9: 83 ec 0c sub $0xc,%esp
1172fc: 53 push %ebx
1172fd: e8 2e da ff ff call 114d30 <_Workspace_Allocate>
117302: 89 c7 mov %eax,%edi
if (!name) {
117304: 83 c4 10 add $0x10,%esp
117307: 85 c0 test %eax,%eax
117309: 0f 84 ac 00 00 00 je 1173bb <_POSIX_Message_queue_Create_support+0x14f>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strncpy( name, name_arg, n+1 );
11730f: 50 push %eax
117310: 53 push %ebx
117311: ff 75 08 pushl 0x8(%ebp)
117314: 57 push %edi
117315: e8 4e 53 00 00 call 11c668 <strncpy>
*
* Joel: Cite POSIX or OpenGroup on above statement so we can determine
* if it is a real requirement.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
11731a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi)
if ( !_CORE_message_queue_Initialize(
117321: ff 75 d0 pushl -0x30(%ebp)
117324: ff 75 d4 pushl -0x2c(%ebp)
117327: 8d 46 5c lea 0x5c(%esi),%eax
11732a: 50 push %eax
11732b: 8d 46 1c lea 0x1c(%esi),%eax
11732e: 50 push %eax
11732f: e8 60 0f 00 00 call 118294 <_CORE_message_queue_Initialize>
117334: 83 c4 20 add $0x20,%esp
117337: 84 c0 test %al,%al
117339: 74 39 je 117374 <_POSIX_Message_queue_Create_support+0x108>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11733b: 0f b7 56 08 movzwl 0x8(%esi),%edx
11733f: a1 3c 25 13 00 mov 0x13253c,%eax
117344: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
117347: 89 7e 0c mov %edi,0xc(%esi)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
11734a: 8b 45 14 mov 0x14(%ebp),%eax
11734d: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
11734f: e8 50 c7 ff ff call 113aa4 <_Thread_Enable_dispatch>
117354: 31 c0 xor %eax,%eax
return 0;
}
117356: 8d 65 f4 lea -0xc(%ebp),%esp
117359: 5b pop %ebx
11735a: 5e pop %esi
11735b: 5f pop %edi
11735c: c9 leave
11735d: c3 ret
11735e: 66 90 xchg %ax,%ax
* There is no real basis for the default values. They will work
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
117360: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp)
117367: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp)
11736e: e9 56 ff ff ff jmp 1172c9 <_POSIX_Message_queue_Create_support+0x5d>
117373: 90 nop
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
117374: 83 ec 08 sub $0x8,%esp
117377: 56 push %esi
117378: 68 20 25 13 00 push $0x132520
11737d: e8 2e bd ff ff call 1130b0 <_Objects_Free>
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
117382: 89 3c 24 mov %edi,(%esp)
117385: e8 c2 d9 ff ff call 114d4c <_Workspace_Free>
_Thread_Enable_dispatch();
11738a: e8 15 c7 ff ff call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11738f: e8 2c 3d 00 00 call 11b0c0 <__errno>
117394: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11739a: b8 ff ff ff ff mov $0xffffffff,%eax
11739f: 83 c4 10 add $0x10,%esp
1173a2: eb b2 jmp 117356 <_POSIX_Message_queue_Create_support+0xea>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
1173a4: e8 fb c6 ff ff call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
1173a9: e8 12 3d 00 00 call 11b0c0 <__errno>
1173ae: c7 00 16 00 00 00 movl $0x16,(%eax)
1173b4: b8 ff ff ff ff mov $0xffffffff,%eax
1173b9: eb 9b jmp 117356 <_POSIX_Message_queue_Create_support+0xea>
1173bb: 83 ec 08 sub $0x8,%esp
1173be: 56 push %esi
1173bf: 68 20 25 13 00 push $0x132520
1173c4: e8 e7 bc ff ff call 1130b0 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
1173c9: e8 d6 c6 ff ff call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
1173ce: e8 ed 3c 00 00 call 11b0c0 <__errno>
1173d3: c7 00 0c 00 00 00 movl $0xc,(%eax)
1173d9: b8 ff ff ff ff mov $0xffffffff,%eax
1173de: 83 c4 10 add $0x10,%esp
1173e1: e9 70 ff ff ff jmp 117356 <_POSIX_Message_queue_Create_support+0xea>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
1173e6: e8 b9 c6 ff ff call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
1173eb: e8 d0 3c 00 00 call 11b0c0 <__errno>
1173f0: c7 00 17 00 00 00 movl $0x17,(%eax)
1173f6: b8 ff ff ff ff mov $0xffffffff,%eax
1173fb: e9 56 ff ff ff jmp 117356 <_POSIX_Message_queue_Create_support+0xea>
00117400 <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
117400: 55 push %ebp
117401: 89 e5 mov %esp,%ebp
117403: 53 push %ebx
117404: 83 ec 14 sub $0x14,%esp
117407: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
11740a: 85 db test %ebx,%ebx
11740c: 74 05 je 117413 <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
11740e: 80 3b 00 cmpb $0x0,(%ebx)
117411: 75 0d jne 117420 <_POSIX_Message_queue_Name_to_id+0x20>
name,
&the_id
);
*id = the_id;
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
117413: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
117418: 8b 5d fc mov -0x4(%ebp),%ebx
11741b: c9 leave
11741c: c3 ret
11741d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
117420: 83 ec 08 sub $0x8,%esp
117423: 68 ff 00 00 00 push $0xff
117428: 53 push %ebx
117429: e8 b6 52 00 00 call 11c6e4 <strnlen>
11742e: 83 c4 10 add $0x10,%esp
117431: 3d fe 00 00 00 cmp $0xfe,%eax
117436: 76 0c jbe 117444 <_POSIX_Message_queue_Name_to_id+0x44>
117438: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
11743d: 8b 5d fc mov -0x4(%ebp),%ebx
117440: c9 leave
117441: c3 ret
117442: 66 90 xchg %ax,%ax
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
117444: 50 push %eax
117445: 8d 45 f4 lea -0xc(%ebp),%eax
117448: 50 push %eax
117449: 53 push %ebx
11744a: 68 20 25 13 00 push $0x132520
11744f: e8 44 14 00 00 call 118898 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
117454: 8b 4d f4 mov -0xc(%ebp),%ecx
117457: 8b 55 0c mov 0xc(%ebp),%edx
11745a: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
11745c: 83 c4 10 add $0x10,%esp
11745f: 83 f8 01 cmp $0x1,%eax
117462: 19 c0 sbb %eax,%eax
117464: f7 d0 not %eax
117466: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
117469: 8b 5d fc mov -0x4(%ebp),%ebx
11746c: c9 leave
11746d: c3 ret
001102d0 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
1102d0: 55 push %ebp
1102d1: 89 e5 mov %esp,%ebp
1102d3: 56 push %esi
1102d4: 53 push %ebx
1102d5: 83 ec 24 sub $0x24,%esp
1102d8: 8b 5d 08 mov 0x8(%ebp),%ebx
1102db: 8b 75 14 mov 0x14(%ebp),%esi
1102de: 8a 45 18 mov 0x18(%ebp),%al
1102e1: 88 45 e7 mov %al,-0x19(%ebp)
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(
1102e4: 8d 45 f4 lea -0xc(%ebp),%eax
1102e7: 50 push %eax
1102e8: 53 push %ebx
1102e9: 68 c0 26 13 00 push $0x1326c0
1102ee: e8 ed 2e 00 00 call 1131e0 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
1102f3: 83 c4 10 add $0x10,%esp
1102f6: 8b 55 f4 mov -0xc(%ebp),%edx
1102f9: 85 d2 test %edx,%edx
1102fb: 74 17 je 110314 <_POSIX_Message_queue_Receive_support+0x44>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
1102fd: e8 be ad 00 00 call 11b0c0 <__errno>
110302: c7 00 09 00 00 00 movl $0x9,(%eax)
110308: b8 ff ff ff ff mov $0xffffffff,%eax
}
11030d: 8d 65 f8 lea -0x8(%ebp),%esp
110310: 5b pop %ebx
110311: 5e pop %esi
110312: c9 leave
110313: c3 ret
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
110314: 8b 48 14 mov 0x14(%eax),%ecx
110317: 89 ca mov %ecx,%edx
110319: 83 e2 03 and $0x3,%edx
11031c: 4a dec %edx
11031d: 0f 84 af 00 00 00 je 1103d2 <_POSIX_Message_queue_Receive_support+0x102>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110323: 8b 50 10 mov 0x10(%eax),%edx
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
110326: 8b 45 10 mov 0x10(%ebp),%eax
110329: 39 42 68 cmp %eax,0x68(%edx)
11032c: 77 62 ja 110390 <_POSIX_Message_queue_Receive_support+0xc0>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
11032e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
110332: 75 48 jne 11037c <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN
110334: 31 c0 xor %eax,%eax
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
110336: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
11033d: 83 ec 08 sub $0x8,%esp
110340: ff 75 1c pushl 0x1c(%ebp)
110343: 50 push %eax
110344: 8d 45 f0 lea -0x10(%ebp),%eax
110347: 50 push %eax
110348: ff 75 0c pushl 0xc(%ebp)
11034b: 53 push %ebx
11034c: 83 c2 1c add $0x1c,%edx
11034f: 52 push %edx
110350: e8 63 1f 00 00 call 1122b8 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
110355: 83 c4 20 add $0x20,%esp
110358: e8 47 37 00 00 call 113aa4 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
11035d: a1 18 22 13 00 mov 0x132218,%eax
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
110362: 8b 50 24 mov 0x24(%eax),%edx
110365: 89 16 mov %edx,(%esi)
110367: 85 d2 test %edx,%edx
110369: 78 21 js 11038c <_POSIX_Message_queue_Receive_support+0xbc>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
11036b: 8b 40 34 mov 0x34(%eax),%eax
11036e: 85 c0 test %eax,%eax
110370: 75 3a jne 1103ac <_POSIX_Message_queue_Receive_support+0xdc>
return length_out;
110372: 8b 45 f0 mov -0x10(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
110375: 8d 65 f8 lea -0x8(%ebp),%esp
110378: 5b pop %ebx
110379: 5e pop %esi
11037a: c9 leave
11037b: c3 ret
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
11037c: 89 c8 mov %ecx,%eax
11037e: c1 e8 0e shr $0xe,%eax
110381: 83 f0 01 xor $0x1,%eax
110384: 83 e0 01 and $0x1,%eax
110387: eb ad jmp 110336 <_POSIX_Message_queue_Receive_support+0x66>
110389: 8d 76 00 lea 0x0(%esi),%esi
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
11038c: f7 1e negl (%esi)
11038e: eb db jmp 11036b <_POSIX_Message_queue_Receive_support+0x9b>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
110390: e8 0f 37 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
110395: e8 26 ad 00 00 call 11b0c0 <__errno>
11039a: c7 00 7a 00 00 00 movl $0x7a,(%eax)
1103a0: b8 ff ff ff ff mov $0xffffffff,%eax
1103a5: e9 63 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
1103aa: 66 90 xchg %ax,%ax
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
1103ac: e8 0f ad 00 00 call 11b0c0 <__errno>
1103b1: 89 c3 mov %eax,%ebx
1103b3: 83 ec 0c sub $0xc,%esp
1103b6: a1 18 22 13 00 mov 0x132218,%eax
1103bb: ff 70 34 pushl 0x34(%eax)
1103be: e8 39 02 00 00 call 1105fc <_POSIX_Message_queue_Translate_core_message_queue_return_code>
1103c3: 89 03 mov %eax,(%ebx)
1103c5: b8 ff ff ff ff mov $0xffffffff,%eax
1103ca: 83 c4 10 add $0x10,%esp
1103cd: e9 3b ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
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();
1103d2: e8 cd 36 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
1103d7: e8 e4 ac 00 00 call 11b0c0 <__errno>
1103dc: c7 00 09 00 00 00 movl $0x9,(%eax)
1103e2: b8 ff ff ff ff mov $0xffffffff,%eax
1103e7: e9 21 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d>
0011040c <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
11040c: 55 push %ebp
11040d: 89 e5 mov %esp,%ebp
11040f: 57 push %edi
110410: 56 push %esi
110411: 53 push %ebx
110412: 83 ec 2c sub $0x2c,%esp
110415: 8b 75 08 mov 0x8(%ebp),%esi
110418: 8b 5d 14 mov 0x14(%ebp),%ebx
11041b: 8a 55 18 mov 0x18(%ebp),%dl
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
11041e: 83 fb 20 cmp $0x20,%ebx
110421: 0f 87 9d 00 00 00 ja 1104c4 <_POSIX_Message_queue_Send_support+0xb8>
110427: 51 push %ecx
110428: 8d 45 e4 lea -0x1c(%ebp),%eax
11042b: 50 push %eax
11042c: 56 push %esi
11042d: 68 c0 26 13 00 push $0x1326c0
110432: 88 55 d4 mov %dl,-0x2c(%ebp)
110435: e8 a6 2d 00 00 call 1131e0 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
11043a: 83 c4 10 add $0x10,%esp
11043d: 8b 55 e4 mov -0x1c(%ebp),%edx
110440: 85 d2 test %edx,%edx
110442: 8a 55 d4 mov -0x2c(%ebp),%dl
110445: 75 69 jne 1104b0 <_POSIX_Message_queue_Send_support+0xa4>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
110447: 8b 48 14 mov 0x14(%eax),%ecx
11044a: f6 c1 03 test $0x3,%cl
11044d: 0f 84 85 00 00 00 je 1104d8 <_POSIX_Message_queue_Send_support+0xcc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
110453: 8b 78 10 mov 0x10(%eax),%edi
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110456: 84 d2 test %dl,%dl
110458: 75 3a jne 110494 <_POSIX_Message_queue_Send_support+0x88>
11045a: 31 c0 xor %eax,%eax
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
11045c: ff 75 1c pushl 0x1c(%ebp)
11045f: 50 push %eax
110460: f7 db neg %ebx
110462: 53 push %ebx
110463: 6a 00 push $0x0
110465: 56 push %esi
110466: ff 75 10 pushl 0x10(%ebp)
110469: ff 75 0c pushl 0xc(%ebp)
11046c: 8d 47 1c lea 0x1c(%edi),%eax
11046f: 50 push %eax
110470: e8 6f 1f 00 00 call 1123e4 <_CORE_message_queue_Submit>
110475: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
110477: 83 c4 20 add $0x20,%esp
11047a: e8 25 36 00 00 call 113aa4 <_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 )
11047f: 83 fb 07 cmp $0x7,%ebx
110482: 74 20 je 1104a4 <_POSIX_Message_queue_Send_support+0x98>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
110484: 85 db test %ebx,%ebx
110486: 75 68 jne 1104f0 <_POSIX_Message_queue_Send_support+0xe4>
110488: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
11048a: 8d 65 f4 lea -0xc(%ebp),%esp
11048d: 5b pop %ebx
11048e: 5e pop %esi
11048f: 5f pop %edi
110490: c9 leave
110491: c3 ret
110492: 66 90 xchg %ax,%ax
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
110494: 89 c8 mov %ecx,%eax
110496: c1 e8 0e shr $0xe,%eax
110499: 83 f0 01 xor $0x1,%eax
11049c: 83 e0 01 and $0x1,%eax
11049f: eb bb jmp 11045c <_POSIX_Message_queue_Send_support+0x50>
1104a1: 8d 76 00 lea 0x0(%esi),%esi
* 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;
1104a4: a1 18 22 13 00 mov 0x132218,%eax
1104a9: 8b 58 34 mov 0x34(%eax),%ebx
1104ac: eb d6 jmp 110484 <_POSIX_Message_queue_Send_support+0x78>
1104ae: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
1104b0: e8 0b ac 00 00 call 11b0c0 <__errno>
1104b5: c7 00 09 00 00 00 movl $0x9,(%eax)
1104bb: b8 ff ff ff ff mov $0xffffffff,%eax
1104c0: eb c8 jmp 11048a <_POSIX_Message_queue_Send_support+0x7e>
1104c2: 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 );
1104c4: e8 f7 ab 00 00 call 11b0c0 <__errno>
1104c9: c7 00 16 00 00 00 movl $0x16,(%eax)
1104cf: b8 ff ff ff ff mov $0xffffffff,%eax
1104d4: eb b4 jmp 11048a <_POSIX_Message_queue_Send_support+0x7e>
1104d6: 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();
1104d8: e8 c7 35 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
1104dd: e8 de ab 00 00 call 11b0c0 <__errno>
1104e2: c7 00 09 00 00 00 movl $0x9,(%eax)
1104e8: b8 ff ff ff ff mov $0xffffffff,%eax
1104ed: eb 9b jmp 11048a <_POSIX_Message_queue_Send_support+0x7e>
1104ef: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
1104f0: e8 cb ab 00 00 call 11b0c0 <__errno>
1104f5: 89 c6 mov %eax,%esi
1104f7: 83 ec 0c sub $0xc,%esp
1104fa: 53 push %ebx
1104fb: e8 fc 00 00 00 call 1105fc <_POSIX_Message_queue_Translate_core_message_queue_return_code>
110500: 89 06 mov %eax,(%esi)
110502: b8 ff ff ff ff mov $0xffffffff,%eax
110507: 83 c4 10 add $0x10,%esp
11050a: e9 7b ff ff ff jmp 11048a <_POSIX_Message_queue_Send_support+0x7e>
0010d738 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10d738: 55 push %ebp
10d739: 89 e5 mov %esp,%ebp
10d73b: 56 push %esi
10d73c: 53 push %ebx
10d73d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d740: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d743: 85 db test %ebx,%ebx
10d745: 74 39 je 10d780 <_POSIX_Mutex_Get+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d747: 8b 03 mov (%ebx),%eax
10d749: 83 f8 ff cmp $0xffffffff,%eax
10d74c: 74 1a je 10d768 <_POSIX_Mutex_Get+0x30>
return (POSIX_Mutex_Control *)
10d74e: 52 push %edx
10d74f: 56 push %esi
10d750: 50 push %eax
10d751: 68 80 d8 12 00 push $0x12d880
10d756: e8 15 2b 00 00 call 110270 <_Objects_Get>
10d75b: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
10d75e: 8d 65 f8 lea -0x8(%ebp),%esp
10d761: 5b pop %ebx
10d762: 5e pop %esi
10d763: c9 leave
10d764: c3 ret
10d765: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d768: 83 ec 08 sub $0x8,%esp
10d76b: 6a 00 push $0x0
10d76d: 53 push %ebx
10d76e: e8 65 00 00 00 call 10d7d8 <pthread_mutex_init>
10d773: 83 c4 10 add $0x10,%esp
10d776: 85 c0 test %eax,%eax
10d778: 75 06 jne 10d780 <_POSIX_Mutex_Get+0x48>
10d77a: 8b 03 mov (%ebx),%eax
10d77c: eb d0 jmp 10d74e <_POSIX_Mutex_Get+0x16>
10d77e: 66 90 xchg %ax,%ax
10d780: c7 06 01 00 00 00 movl $0x1,(%esi)
10d786: 31 c0 xor %eax,%eax
10d788: eb d4 jmp 10d75e <_POSIX_Mutex_Get+0x26>
0010d6e4 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10d6e4: 55 push %ebp
10d6e5: 89 e5 mov %esp,%ebp
10d6e7: 56 push %esi
10d6e8: 53 push %ebx
10d6e9: 8b 5d 08 mov 0x8(%ebp),%ebx
10d6ec: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d6ef: 85 db test %ebx,%ebx
10d6f1: 74 39 je 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d6f3: 8b 03 mov (%ebx),%eax
10d6f5: 83 f8 ff cmp $0xffffffff,%eax
10d6f8: 74 1a je 10d714 <_POSIX_Mutex_Get_interrupt_disable+0x30>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
10d6fa: ff 75 10 pushl 0x10(%ebp)
10d6fd: 56 push %esi
10d6fe: 50 push %eax
10d6ff: 68 80 d8 12 00 push $0x12d880
10d704: e8 0f 2b 00 00 call 110218 <_Objects_Get_isr_disable>
10d709: 83 c4 10 add $0x10,%esp
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
10d70c: 8d 65 f8 lea -0x8(%ebp),%esp
10d70f: 5b pop %ebx
10d710: 5e pop %esi
10d711: c9 leave
10d712: c3 ret
10d713: 90 nop
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d714: 83 ec 08 sub $0x8,%esp
10d717: 6a 00 push $0x0
10d719: 53 push %ebx
10d71a: e8 b9 00 00 00 call 10d7d8 <pthread_mutex_init>
10d71f: 83 c4 10 add $0x10,%esp
10d722: 85 c0 test %eax,%eax
10d724: 75 06 jne 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48>
10d726: 8b 03 mov (%ebx),%eax
10d728: eb d0 jmp 10d6fa <_POSIX_Mutex_Get_interrupt_disable+0x16>
10d72a: 66 90 xchg %ax,%ax
10d72c: c7 06 01 00 00 00 movl $0x1,(%esi)
10d732: 31 c0 xor %eax,%eax
10d734: eb d6 jmp 10d70c <_POSIX_Mutex_Get_interrupt_disable+0x28>
0010d934 <_POSIX_Mutex_Lock_support>:
int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex,
bool blocking,
Watchdog_Interval timeout
)
{
10d934: 55 push %ebp
10d935: 89 e5 mov %esp,%ebp
10d937: 53 push %ebx
10d938: 83 ec 18 sub $0x18,%esp
10d93b: 8a 5d 0c mov 0xc(%ebp),%bl
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
10d93e: 8d 45 f0 lea -0x10(%ebp),%eax
10d941: 50 push %eax
10d942: 8d 45 f4 lea -0xc(%ebp),%eax
10d945: 50 push %eax
10d946: ff 75 08 pushl 0x8(%ebp)
10d949: e8 96 fd ff ff call 10d6e4 <_POSIX_Mutex_Get_interrupt_disable>
switch ( location ) {
10d94e: 83 c4 10 add $0x10,%esp
10d951: 8b 55 f4 mov -0xc(%ebp),%edx
10d954: 85 d2 test %edx,%edx
10d956: 75 34 jne 10d98c <_POSIX_Mutex_Lock_support+0x58>
case OBJECTS_LOCAL:
_CORE_mutex_Seize(
10d958: 83 ec 0c sub $0xc,%esp
10d95b: ff 75 f0 pushl -0x10(%ebp)
10d95e: ff 75 10 pushl 0x10(%ebp)
10d961: 0f b6 db movzbl %bl,%ebx
10d964: 53 push %ebx
10d965: ff 70 08 pushl 0x8(%eax)
10d968: 83 c0 14 add $0x14,%eax
10d96b: 50 push %eax
10d96c: e8 f3 1c 00 00 call 10f664 <_CORE_mutex_Seize>
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d971: 83 c4 14 add $0x14,%esp
10d974: a1 38 d5 12 00 mov 0x12d538,%eax
10d979: ff 70 34 pushl 0x34(%eax)
10d97c: e8 f3 00 00 00 call 10da74 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d981: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d984: 8b 5d fc mov -0x4(%ebp),%ebx
10d987: c9 leave
10d988: c3 ret
10d989: 8d 76 00 lea 0x0(%esi),%esi
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
ISR_Level level;
the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level );
switch ( location ) {
10d98c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d991: 8b 5d fc mov -0x4(%ebp),%ebx
10d994: c9 leave
10d995: c3 ret
00115428 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
115428: 55 push %ebp
115429: 89 e5 mov %esp,%ebp
11542b: 56 push %esi
11542c: 53 push %ebx
11542d: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
115430: 8b 55 0c mov 0xc(%ebp),%edx
115433: 85 d2 test %edx,%edx
115435: 0f 85 b9 00 00 00 jne 1154f4 <_POSIX_Semaphore_Create_support+0xcc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
11543b: 85 db test %ebx,%ebx
11543d: 74 1c je 11545b <_POSIX_Semaphore_Create_support+0x33>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
11543f: 83 ec 08 sub $0x8,%esp
115442: 68 ff 00 00 00 push $0xff
115447: 53 push %ebx
115448: e8 77 4c 00 00 call 11a0c4 <strnlen>
11544d: 83 c4 10 add $0x10,%esp
115450: 3d fe 00 00 00 cmp $0xfe,%eax
115455: 0f 87 ad 00 00 00 ja 115508 <_POSIX_Semaphore_Create_support+0xe0>
11545b: a1 38 f0 12 00 mov 0x12f038,%eax
115460: 40 inc %eax
115461: a3 38 f0 12 00 mov %eax,0x12f038
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
115466: 83 ec 0c sub $0xc,%esp
115469: 68 80 f3 12 00 push $0x12f380
11546e: e8 8d b2 ff ff call 110700 <_Objects_Allocate>
115473: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
115475: 83 c4 10 add $0x10,%esp
115478: 85 c0 test %eax,%eax
11547a: 0f 84 9a 00 00 00 je 11551a <_POSIX_Semaphore_Create_support+0xf2>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
115480: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
115487: 85 db test %ebx,%ebx
115489: 74 55 je 1154e0 <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true;
11548b: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
11548f: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = true;
115496: c6 40 15 01 movb $0x1,0x15(%eax)
* 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;
11549a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
1154a1: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
1154a8: 50 push %eax
1154a9: ff 75 10 pushl 0x10(%ebp)
1154ac: 8d 46 5c lea 0x5c(%esi),%eax
1154af: 50 push %eax
1154b0: 8d 46 1c lea 0x1c(%esi),%eax
1154b3: 50 push %eax
1154b4: e8 03 ad ff ff call 1101bc <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1154b9: 0f b7 56 08 movzwl 0x8(%esi),%edx
1154bd: a1 9c f3 12 00 mov 0x12f39c,%eax
1154c2: 89 34 90 mov %esi,(%eax,%edx,4)
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
1154c5: 89 5e 0c mov %ebx,0xc(%esi)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
1154c8: 8b 45 14 mov 0x14(%ebp),%eax
1154cb: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
1154cd: e8 a2 bf ff ff call 111474 <_Thread_Enable_dispatch>
1154d2: 31 c0 xor %eax,%eax
return 0;
1154d4: 83 c4 10 add $0x10,%esp
}
1154d7: 8d 65 f8 lea -0x8(%ebp),%esp
1154da: 5b pop %ebx
1154db: 5e pop %esi
1154dc: c9 leave
1154dd: c3 ret
1154de: 66 90 xchg %ax,%ax
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
1154e0: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
1154e4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
1154eb: c6 40 15 00 movb $0x0,0x15(%eax)
1154ef: eb a9 jmp 11549a <_POSIX_Semaphore_Create_support+0x72>
1154f1: 8d 76 00 lea 0x0(%esi),%esi
CORE_semaphore_Attributes *the_sem_attr;
char *name_p = (char *)name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
1154f4: e8 5b 3c 00 00 call 119154 <__errno>
1154f9: c7 00 58 00 00 00 movl $0x58,(%eax)
1154ff: b8 ff ff ff ff mov $0xffffffff,%eax
115504: eb d1 jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf>
115506: 66 90 xchg %ax,%ax
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
115508: e8 47 3c 00 00 call 119154 <__errno>
11550d: c7 00 5b 00 00 00 movl $0x5b,(%eax)
115513: b8 ff ff ff ff mov $0xffffffff,%eax
115518: eb bd jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
11551a: e8 55 bf ff ff call 111474 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11551f: e8 30 3c 00 00 call 119154 <__errno>
115524: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11552a: b8 ff ff ff ff mov $0xffffffff,%eax
11552f: eb a6 jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf>
00115584 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
115584: 55 push %ebp
115585: 89 e5 mov %esp,%ebp
115587: 83 ec 18 sub $0x18,%esp
11558a: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
11558d: 85 c0 test %eax,%eax
11558f: 74 05 je 115596 <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
115591: 80 38 00 cmpb $0x0,(%eax)
115594: 75 0a jne 1155a0 <_POSIX_Semaphore_Name_to_id+0x1c>
name,
&the_id
);
*id = the_id;
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
115596: b8 16 00 00 00 mov $0x16,%eax
return 0;
return ENOENT;
}
11559b: c9 leave
11559c: c3 ret
11559d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
1155a0: 52 push %edx
1155a1: 8d 55 f4 lea -0xc(%ebp),%edx
1155a4: 52 push %edx
1155a5: 50 push %eax
1155a6: 68 80 f3 12 00 push $0x12f380
1155ab: e8 18 0f 00 00 call 1164c8 <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
1155b0: 8b 4d f4 mov -0xc(%ebp),%ecx
1155b3: 8b 55 0c mov 0xc(%ebp),%edx
1155b6: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1155b8: 83 c4 10 add $0x10,%esp
1155bb: 83 f8 01 cmp $0x1,%eax
1155be: 19 c0 sbb %eax,%eax
1155c0: f7 d0 not %eax
1155c2: 83 e0 02 and $0x2,%eax
return 0;
return ENOENT;
}
1155c5: c9 leave
1155c6: c3 ret
001155f0 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
1155f0: 55 push %ebp
1155f1: 89 e5 mov %esp,%ebp
1155f3: 53 push %ebx
1155f4: 83 ec 18 sub $0x18,%esp
1155f7: 8a 5d 0c mov 0xc(%ebp),%bl
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
1155fa: 8d 45 f4 lea -0xc(%ebp),%eax
1155fd: 50 push %eax
1155fe: 8b 45 08 mov 0x8(%ebp),%eax
115601: ff 30 pushl (%eax)
115603: 68 80 f3 12 00 push $0x12f380
115608: e8 a3 b5 ff ff call 110bb0 <_Objects_Get>
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
11560d: 83 c4 10 add $0x10,%esp
115610: 8b 55 f4 mov -0xc(%ebp),%edx
115613: 85 d2 test %edx,%edx
115615: 74 15 je 11562c <_POSIX_Semaphore_Wait_support+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
115617: e8 38 3b 00 00 call 119154 <__errno>
11561c: c7 00 16 00 00 00 movl $0x16,(%eax)
115622: b8 ff ff ff ff mov $0xffffffff,%eax
}
115627: 8b 5d fc mov -0x4(%ebp),%ebx
11562a: c9 leave
11562b: c3 ret
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
11562c: ff 75 10 pushl 0x10(%ebp)
11562f: 0f b6 db movzbl %bl,%ebx
115632: 53 push %ebx
115633: ff 70 08 pushl 0x8(%eax)
115636: 83 c0 1c add $0x1c,%eax
115639: 50 push %eax
11563a: e8 dd 09 00 00 call 11601c <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
11563f: e8 30 be ff ff call 111474 <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
115644: 83 c4 10 add $0x10,%esp
115647: a1 f8 f0 12 00 mov 0x12f0f8,%eax
11564c: 8b 40 34 mov 0x34(%eax),%eax
11564f: 85 c0 test %eax,%eax
115651: 75 09 jne 11565c <_POSIX_Semaphore_Wait_support+0x6c>
115653: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
115655: 8b 5d fc mov -0x4(%ebp),%ebx
115658: c9 leave
115659: c3 ret
11565a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
11565c: e8 f3 3a 00 00 call 119154 <__errno>
115661: 89 c3 mov %eax,%ebx
115663: 83 ec 0c sub $0xc,%esp
115666: a1 f8 f0 12 00 mov 0x12f0f8,%eax
11566b: ff 70 34 pushl 0x34(%eax)
11566e: e8 7d 35 00 00 call 118bf0 <_POSIX_Semaphore_Translate_core_semaphore_return_code>
115673: 89 03 mov %eax,(%ebx)
115675: b8 ff ff ff ff mov $0xffffffff,%eax
11567a: 83 c4 10 add $0x10,%esp
11567d: eb a8 jmp 115627 <_POSIX_Semaphore_Wait_support+0x37>
00111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
111648: 55 push %ebp
111649: 89 e5 mov %esp,%ebp
11164b: 83 ec 08 sub $0x8,%esp
11164e: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
111651: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
111657: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx
11165d: 85 c9 test %ecx,%ecx
11165f: 75 09 jne 11166a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
111661: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax)
111668: 74 06 je 111670 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
11166a: c9 leave
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
11166b: e9 48 ca ff ff jmp 10e0b8 <_Thread_Enable_dispatch>
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
111670: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
111676: 85 c0 test %eax,%eax
111678: 74 f0 je 11166a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
11167a: a1 b8 a7 12 00 mov 0x12a7b8,%eax
11167f: 48 dec %eax
111680: a3 b8 a7 12 00 mov %eax,0x12a7b8
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
111685: 83 ec 08 sub $0x8,%esp
111688: 6a ff push $0xffffffff
11168a: 52 push %edx
11168b: e8 44 06 00 00 call 111cd4 <_POSIX_Thread_Exit>
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
111690: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
111693: c9 leave
111694: c3 ret
00112710 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
112710: 55 push %ebp
112711: 89 e5 mov %esp,%ebp
112713: 57 push %edi
112714: 56 push %esi
112715: 53 push %ebx
112716: 83 ec 18 sub $0x18,%esp
112719: 8b 5d 08 mov 0x8(%ebp),%ebx
11271c: 8b 75 0c mov 0xc(%ebp),%esi
11271f: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
112722: ff 36 pushl (%esi)
112724: e8 cb ff ff ff call 1126f4 <_POSIX_Priority_Is_valid>
112729: 83 c4 10 add $0x10,%esp
11272c: 84 c0 test %al,%al
11272e: 74 2a je 11275a <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
112730: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
112736: 8b 45 14 mov 0x14(%ebp),%eax
112739: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
11273f: 85 db test %ebx,%ebx
112741: 74 25 je 112768 <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
112743: 83 fb 01 cmp $0x1,%ebx
112746: 0f 84 90 00 00 00 je 1127dc <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
11274c: 83 fb 02 cmp $0x2,%ebx
11274f: 0f 84 97 00 00 00 je 1127ec <_POSIX_Thread_Translate_sched_param+0xdc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
112755: 83 fb 04 cmp $0x4,%ebx
112758: 74 1e je 112778 <_POSIX_Thread_Translate_sched_param+0x68>
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
11275a: b8 16 00 00 00 mov $0x16,%eax
}
return EINVAL;
}
11275f: 8d 65 f4 lea -0xc(%ebp),%esp
112762: 5b pop %ebx
112763: 5e pop %esi
112764: 5f pop %edi
112765: c9 leave
112766: c3 ret
112767: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
112768: c7 07 01 00 00 00 movl $0x1,(%edi)
11276e: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
112770: 8d 65 f4 lea -0xc(%ebp),%esp
112773: 5b pop %ebx
112774: 5e pop %esi
112775: 5f pop %edi
112776: c9 leave
112777: c3 ret
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
112778: 8b 5e 08 mov 0x8(%esi),%ebx
11277b: 85 db test %ebx,%ebx
11277d: 75 07 jne 112786 <_POSIX_Thread_Translate_sched_param+0x76>
(param->sched_ss_repl_period.tv_nsec == 0) )
11277f: 8b 4e 0c mov 0xc(%esi),%ecx
112782: 85 c9 test %ecx,%ecx
112784: 74 d4 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
112786: 8b 56 10 mov 0x10(%esi),%edx
112789: 85 d2 test %edx,%edx
11278b: 75 07 jne 112794 <_POSIX_Thread_Translate_sched_param+0x84>
(param->sched_ss_init_budget.tv_nsec == 0) )
11278d: 8b 46 14 mov 0x14(%esi),%eax
112790: 85 c0 test %eax,%eax
112792: 74 c6 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
112794: 83 ec 0c sub $0xc,%esp
112797: 8d 46 08 lea 0x8(%esi),%eax
11279a: 50 push %eax
11279b: e8 1c d2 ff ff call 10f9bc <_Timespec_To_ticks>
1127a0: 89 c3 mov %eax,%ebx
1127a2: 8d 46 10 lea 0x10(%esi),%eax
1127a5: 89 04 24 mov %eax,(%esp)
1127a8: e8 0f d2 ff ff call 10f9bc <_Timespec_To_ticks>
1127ad: 83 c4 10 add $0x10,%esp
1127b0: 39 c3 cmp %eax,%ebx
1127b2: 72 a6 jb 11275a <_POSIX_Thread_Translate_sched_param+0x4a>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
1127b4: 83 ec 0c sub $0xc,%esp
1127b7: ff 76 04 pushl 0x4(%esi)
1127ba: e8 35 ff ff ff call 1126f4 <_POSIX_Priority_Is_valid>
1127bf: 83 c4 10 add $0x10,%esp
1127c2: 84 c0 test %al,%al
1127c4: 74 94 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
1127c6: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
1127cc: 8b 45 14 mov 0x14(%ebp),%eax
1127cf: c7 00 c0 c2 10 00 movl $0x10c2c0,(%eax)
1127d5: 31 c0 xor %eax,%eax
return 0;
1127d7: eb 86 jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f>
1127d9: 8d 76 00 lea 0x0(%esi),%esi
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
1127dc: c7 07 00 00 00 00 movl $0x0,(%edi)
1127e2: 31 c0 xor %eax,%eax
return 0;
1127e4: e9 76 ff ff ff jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f>
1127e9: 8d 76 00 lea 0x0(%esi),%esi
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
1127ec: c7 07 02 00 00 00 movl $0x2,(%edi)
1127f2: 31 c0 xor %eax,%eax
return 0;
1127f4: e9 66 ff ff ff jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f>
00111628 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *created
)
{
111628: 55 push %ebp
111629: 89 e5 mov %esp,%ebp
11162b: 57 push %edi
11162c: 56 push %esi
11162d: 53 push %ebx
11162e: 83 ec 28 sub $0x28,%esp
111631: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
111634: 68 ec 00 00 00 push $0xec
111639: 89 55 e4 mov %edx,-0x1c(%ebp)
11163c: e8 db d7 ff ff call 10ee1c <_Workspace_Allocate>
111641: 89 c3 mov %eax,%ebx
if ( !api )
111643: 83 c4 10 add $0x10,%esp
111646: 85 c0 test %eax,%eax
111648: 8b 55 e4 mov -0x1c(%ebp),%edx
11164b: 0f 84 2f 01 00 00 je 111780 <_POSIX_Threads_Create_extension+0x158>
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
111651: 89 82 f8 00 00 00 mov %eax,0xf8(%edx)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
111657: b9 3c 00 00 00 mov $0x3c,%ecx
11165c: 31 c0 xor %eax,%eax
11165e: 89 df mov %ebx,%edi
111660: f3 aa rep stos %al,%es:(%edi)
111662: c7 03 01 00 00 00 movl $0x1,(%ebx)
111668: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
11166f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx)
111676: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx)
11167d: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx)
111684: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
11168b: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
111692: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx)
111699: 00 00 00
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
11169c: be 38 32 12 00 mov $0x123238,%esi
1116a1: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi
1116a7: b1 07 mov $0x7,%cl
1116a9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->schedparam.sched_priority =
1116ab: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax
1116b2: 2b 42 14 sub 0x14(%edx),%eax
1116b5: 89 83 84 00 00 00 mov %eax,0x84(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
1116bb: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
1116c2: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
1116c5: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
1116cc: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
1116cf: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
1116d6: 00 00 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1116d9: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax
1116df: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
the_chain->permanent_null = NULL;
1116e5: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
1116ec: 00 00 00
the_chain->last = _Chain_Head(the_chain);
1116ef: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
1116f5: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
*
* The check for class == 1 is debug. Should never really happen.
*/
/* XXX use signal constants */
api->signals_pending = 0;
1116fb: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
111702: 00 00 00
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
111705: 0f b6 42 0b movzbl 0xb(%edx),%eax
111709: 83 e0 07 and $0x7,%eax
11170c: 83 f8 03 cmp $0x3,%eax
11170f: 74 53 je 111764 <_POSIX_Threads_Create_extension+0x13c>
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
111711: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx)
111718: ff ff ff
}
_Thread_queue_Initialize(
11171b: 6a 00 push $0x0
11171d: 68 00 10 00 00 push $0x1000
111722: 6a 00 push $0x0
111724: 8d 43 40 lea 0x40(%ebx),%eax
111727: 50 push %eax
111728: 89 55 e4 mov %edx,-0x1c(%ebp)
11172b: e8 d4 cc ff ff call 10e404 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
111730: 8b 55 e4 mov -0x1c(%ebp),%edx
111733: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
111736: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx)
11173d: 00 00 00
the_watchdog->routine = routine;
111740: c7 83 c0 00 00 00 d0 movl $0x1117d0,0xc0(%ebx)
111747: 17 11 00
the_watchdog->id = id;
11174a: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
the_watchdog->user_data = user_data;
111750: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx)
111756: b0 01 mov $0x1,%al
_POSIX_Threads_Sporadic_budget_TSR,
created->Object.id,
created
);
return true;
111758: 83 c4 10 add $0x10,%esp
}
11175b: 8d 65 f4 lea -0xc(%ebp),%esp
11175e: 5b pop %ebx
11175f: 5e pop %esi
111760: 5f pop %edi
111761: c9 leave
111762: c3 ret
111763: 90 nop
#if defined(RTEMS_DEBUG)
&& _Objects_Get_class( created->Object.id ) == 1
#endif
) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
111764: a1 78 95 12 00 mov 0x129578,%eax
111769: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
11176f: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
111775: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
11177b: eb 9e jmp 11171b <_POSIX_Threads_Create_extension+0xf3>
11177d: 8d 76 00 lea 0x0(%esi),%esi
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
111780: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
111782: 8d 65 f4 lea -0xc(%ebp),%esp
111785: 5b pop %ebx
111786: 5e pop %esi
111787: 5f pop %edi
111788: c9 leave
111789: c3 ret
001115a0 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
1115a0: 55 push %ebp
1115a1: 89 e5 mov %esp,%ebp
1115a3: 57 push %edi
1115a4: 56 push %esi
1115a5: 53 push %ebx
1115a6: 83 ec 28 sub $0x28,%esp
1115a9: 8b 7d 0c mov 0xc(%ebp),%edi
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
1115ac: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax
1115b2: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
1115b5: 57 push %edi
1115b6: e8 a9 2d 00 00 call 114364 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
1115bb: 89 3c 24 mov %edi,(%esp)
1115be: e8 05 2e 00 00 call 1143c8 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
1115c3: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
1115c6: 8b 5d e4 mov -0x1c(%ebp),%ebx
1115c9: 83 c3 40 add $0x40,%ebx
1115cc: 83 c4 10 add $0x10,%esp
1115cf: eb 08 jmp 1115d9 <_POSIX_Threads_Delete_extension+0x39>
1115d1: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
1115d4: 8b 40 28 mov 0x28(%eax),%eax
1115d7: 89 30 mov %esi,(%eax)
/*
* 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 )) )
1115d9: 83 ec 0c sub $0xc,%esp
1115dc: 53 push %ebx
1115dd: e8 a6 ca ff ff call 10e088 <_Thread_queue_Dequeue>
1115e2: 83 c4 10 add $0x10,%esp
1115e5: 85 c0 test %eax,%eax
1115e7: 75 eb jne 1115d4 <_POSIX_Threads_Delete_extension+0x34>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
1115e9: 8b 45 e4 mov -0x1c(%ebp),%eax
1115ec: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
1115f3: 74 1f je 111614 <_POSIX_Threads_Delete_extension+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
1115f5: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi)
1115fc: 00 00 00
(void) _Workspace_Free( api );
1115ff: 8b 45 e4 mov -0x1c(%ebp),%eax
111602: 89 45 08 mov %eax,0x8(%ebp)
}
111605: 8d 65 f4 lea -0xc(%ebp),%esp
111608: 5b pop %ebx
111609: 5e pop %esi
11160a: 5f pop %edi
11160b: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
(void) _Workspace_Free( api );
11160c: e9 27 d8 ff ff jmp 10ee38 <_Workspace_Free>
111611: 8d 76 00 lea 0x0(%esi),%esi
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 );
111614: 83 ec 0c sub $0xc,%esp
111617: 05 a4 00 00 00 add $0xa4,%eax
11161c: 50 push %eax
11161d: e8 f6 d6 ff ff call 10ed18 <_Watchdog_Remove>
111622: 83 c4 10 add $0x10,%esp
111625: eb ce jmp 1115f5 <_POSIX_Threads_Delete_extension+0x55>
00111520 <_POSIX_Threads_Initialize_user_threads>:
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
111520: 55 push %ebp
111521: 89 e5 mov %esp,%ebp
111523: 83 ec 08 sub $0x8,%esp
if ( _POSIX_Threads_Initialize_user_threads_p )
111526: a1 58 77 12 00 mov 0x127758,%eax
11152b: 85 c0 test %eax,%eax
11152d: 74 05 je 111534 <_POSIX_Threads_Initialize_user_threads+0x14>
(*_POSIX_Threads_Initialize_user_threads_p)();
}
11152f: c9 leave
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
111530: ff e0 jmp *%eax
111532: 66 90 xchg %ax,%ax
}
111534: c9 leave
111535: c3 ret
0010bfe0 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10bfe0: 55 push %ebp
10bfe1: 89 e5 mov %esp,%ebp
10bfe3: 57 push %edi
10bfe4: 56 push %esi
10bfe5: 53 push %ebx
10bfe6: 83 ec 5c sub $0x5c,%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;
10bfe9: 8b 3d b4 64 12 00 mov 0x1264b4,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10bfef: a1 b0 64 12 00 mov 0x1264b0,%eax
10bff4: 89 45 a4 mov %eax,-0x5c(%ebp)
if ( !user_threads || maximum == 0 )
10bff7: 85 ff test %edi,%edi
10bff9: 74 44 je 10c03f <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10bffb: 85 c0 test %eax,%eax
10bffd: 74 40 je 10c03f <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10bfff: 31 db xor %ebx,%ebx
10c001: 8d 75 a8 lea -0x58(%ebp),%esi
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
10c004: 83 ec 0c sub $0xc,%esp
10c007: 56 push %esi
10c008: e8 ef 67 00 00 call 1127fc <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10c00d: 5a pop %edx
10c00e: 59 pop %ecx
10c00f: 6a 02 push $0x2
10c011: 56 push %esi
10c012: e8 0d 68 00 00 call 112824 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10c017: 59 pop %ecx
10c018: 58 pop %eax
10c019: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10c01d: 56 push %esi
10c01e: e8 35 68 00 00 call 112858 <pthread_attr_setstacksize>
status = pthread_create(
10c023: 6a 00 push $0x0
10c025: ff 34 df pushl (%edi,%ebx,8)
10c028: 56 push %esi
10c029: 8d 45 e4 lea -0x1c(%ebp),%eax
10c02c: 50 push %eax
10c02d: e8 9a fc ff ff call 10bccc <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10c032: 83 c4 20 add $0x20,%esp
10c035: 85 c0 test %eax,%eax
10c037: 75 0e jne 10c047 <_POSIX_Threads_Initialize_user_threads_body+0x67>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c039: 43 inc %ebx
10c03a: 39 5d a4 cmp %ebx,-0x5c(%ebp)
10c03d: 77 c5 ja 10c004 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10c03f: 8d 65 f4 lea -0xc(%ebp),%esp
10c042: 5b pop %ebx
10c043: 5e pop %esi
10c044: 5f pop %edi
10c045: c9 leave
10c046: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10c047: 52 push %edx
10c048: 50 push %eax
10c049: 6a 01 push $0x1
10c04b: 6a 02 push $0x2
10c04d: e8 5a 1e 00 00 call 10deac <_Internal_error_Occurred>
001117d0 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
1117d0: 55 push %ebp
1117d1: 89 e5 mov %esp,%ebp
1117d3: 56 push %esi
1117d4: 53 push %ebx
1117d5: 8b 75 0c mov 0xc(%ebp),%esi
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1117d8: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
1117de: 83 ec 0c sub $0xc,%esp
1117e1: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
1117e7: 50 push %eax
1117e8: e8 4f 12 00 00 call 112a3c <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
1117ed: 89 46 78 mov %eax,0x78(%esi)
1117f0: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax
1117f7: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
1117fd: 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 ) {
111800: 83 c4 10 add $0x10,%esp
111803: 8b 4e 1c mov 0x1c(%esi),%ecx
111806: 85 c9 test %ecx,%ecx
111808: 75 05 jne 11180f <_POSIX_Threads_Sporadic_budget_TSR+0x3f><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
11180a: 39 46 14 cmp %eax,0x14(%esi)
11180d: 77 35 ja 111844 <_POSIX_Threads_Sporadic_budget_TSR+0x74>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
11180f: 83 ec 0c sub $0xc,%esp
111812: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax
111818: 50 push %eax
111819: e8 1e 12 00 00 call 112a3c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
11181e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
111824: 83 c4 10 add $0x10,%esp
111827: 81 c3 a4 00 00 00 add $0xa4,%ebx
11182d: 89 5d 0c mov %ebx,0xc(%ebp)
111830: c7 45 08 98 95 12 00 movl $0x129598,0x8(%ebp)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
111837: 8d 65 f8 lea -0x8(%ebp),%esp
11183a: 5b pop %ebx
11183b: 5e pop %esi
11183c: c9 leave
11183d: e9 9e d3 ff ff jmp 10ebe0 <_Watchdog_Insert>
111842: 66 90 xchg %ax,%ax
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 );
111844: 52 push %edx
111845: 6a 01 push $0x1
111847: 50 push %eax
111848: 56 push %esi
111849: e8 36 bf ff ff call 10d784 <_Thread_Change_priority>
11184e: 83 c4 10 add $0x10,%esp
111851: eb bc jmp 11180f <_POSIX_Threads_Sporadic_budget_TSR+0x3f>
0011178c <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
11178c: 55 push %ebp
11178d: 89 e5 mov %esp,%ebp
11178f: 83 ec 08 sub $0x8,%esp
111792: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111795: 8b 88 f8 00 00 00 mov 0xf8(%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 */
11179b: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
1117a2: 0f b6 15 d4 52 12 00 movzbl 0x1252d4,%edx
1117a9: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
1117af: 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 ) {
1117b2: 8b 48 1c mov 0x1c(%eax),%ecx
1117b5: 85 c9 test %ecx,%ecx
1117b7: 75 05 jne 1117be <_POSIX_Threads_Sporadic_budget_callout+0x32><== 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 ) {
1117b9: 39 50 14 cmp %edx,0x14(%eax)
1117bc: 72 02 jb 1117c0 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
1117be: c9 leave <== NOT EXECUTED
1117bf: 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 );
1117c0: 51 push %ecx
1117c1: 6a 01 push $0x1
1117c3: 52 push %edx
1117c4: 50 push %eax
1117c5: e8 ba bf ff ff call 10d784 <_Thread_Change_priority>
1117ca: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
1117cd: c9 leave
1117ce: c3 ret
00114364 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
114364: 55 push %ebp
114365: 89 e5 mov %esp,%ebp
114367: 57 push %edi
114368: 56 push %esi
114369: 53 push %ebx
11436a: 83 ec 0c sub $0xc,%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 ];
11436d: 8b 45 08 mov 0x8(%ebp),%eax
114370: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
114376: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi)
11437d: 00 00 00
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114380: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
114386: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
11438c: 74 30 je 1143be <_POSIX_Threads_cancel_run+0x5a>
11438e: 66 90 xchg %ax,%ax
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
114390: 9c pushf
114391: fa cli
114392: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
114393: 8b 7b 04 mov 0x4(%ebx),%edi
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
114396: 8b 17 mov (%edi),%edx
previous = the_node->previous;
114398: 8b 47 04 mov 0x4(%edi),%eax
next->previous = previous;
11439b: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
11439e: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
1143a0: 51 push %ecx
1143a1: 9d popf
(*handler->routine)( handler->arg );
1143a2: 83 ec 0c sub $0xc,%esp
1143a5: ff 77 0c pushl 0xc(%edi)
1143a8: ff 57 08 call *0x8(%edi)
_Workspace_Free( handler );
1143ab: 89 3c 24 mov %edi,(%esp)
1143ae: e8 85 aa ff ff call 10ee38 <_Workspace_Free>
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
1143b3: 83 c4 10 add $0x10,%esp
1143b6: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi)
1143bc: 75 d2 jne 114390 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
1143be: 8d 65 f4 lea -0xc(%ebp),%esp
1143c1: 5b pop %ebx
1143c2: 5e pop %esi
1143c3: 5f pop %edi
1143c4: c9 leave
1143c5: c3 ret
001124f0 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
1124f0: 55 push %ebp
1124f1: 89 e5 mov %esp,%ebp
1124f3: 56 push %esi
1124f4: 53 push %ebx
1124f5: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
1124f8: 83 ec 0c sub $0xc,%esp
1124fb: 53 push %ebx
1124fc: e8 db d2 ff ff call 10f7dc <_Watchdog_Remove>
_ISR_Disable( level );
112501: 9c pushf
112502: fa cli
112503: 5e pop %esi
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( timer->state != WATCHDOG_INACTIVE ) {
112504: 83 c4 10 add $0x10,%esp
112507: 8b 43 08 mov 0x8(%ebx),%eax
11250a: 85 c0 test %eax,%eax
11250c: 74 0e je 11251c <_POSIX_Timer_Insert_helper+0x2c>
_ISR_Enable( level );
11250e: 56 push %esi
11250f: 9d popf
112510: 31 c0 xor %eax,%eax
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
112512: 8d 65 f8 lea -0x8(%ebp),%esp
112515: 5b pop %ebx
112516: 5e pop %esi
112517: c9 leave
112518: c3 ret
112519: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11251c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_watchdog->routine = routine;
112523: 8b 45 14 mov 0x14(%ebp),%eax
112526: 89 43 1c mov %eax,0x1c(%ebx)
the_watchdog->id = id;
112529: 8b 45 10 mov 0x10(%ebp),%eax
11252c: 89 43 20 mov %eax,0x20(%ebx)
the_watchdog->user_data = user_data;
11252f: 8b 45 18 mov 0x18(%ebp),%eax
112532: 89 43 24 mov %eax,0x24(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
112535: 8b 45 0c mov 0xc(%ebp),%eax
112538: 89 43 0c mov %eax,0xc(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
11253b: 83 ec 08 sub $0x8,%esp
11253e: 53 push %ebx
11253f: 68 98 b3 12 00 push $0x12b398
112544: e8 5b d1 ff ff call 10f6a4 <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
112549: 56 push %esi
11254a: 9d popf
11254b: b0 01 mov $0x1,%al
return true;
11254d: 83 c4 10 add $0x10,%esp
}
112550: 8d 65 f8 lea -0x8(%ebp),%esp
112553: 5b pop %ebx
112554: 5e pop %esi
112555: c9 leave
112556: c3 ret
0010bdec <_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)
{
10bdec: 55 push %ebp
10bded: 89 e5 mov %esp,%ebp
10bdef: 53 push %ebx
10bdf0: 83 ec 04 sub $0x4,%esp
10bdf3: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10bdf6: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10bdf9: 8b 53 54 mov 0x54(%ebx),%edx
10bdfc: 85 d2 test %edx,%edx
10bdfe: 75 28 jne 10be28 <_POSIX_Timer_TSR+0x3c>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
10be00: 8b 43 58 mov 0x58(%ebx),%eax
10be03: 85 c0 test %eax,%eax
10be05: 75 21 jne 10be28 <_POSIX_Timer_TSR+0x3c> <== 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;
10be07: c6 43 3c 04 movb $0x4,0x3c(%ebx)
/*
* 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 ) ) {
10be0b: 83 ec 08 sub $0x8,%esp
10be0e: ff 73 44 pushl 0x44(%ebx)
10be11: ff 73 38 pushl 0x38(%ebx)
10be14: e8 5f 62 00 00 call 112078 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10be19: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10be20: 83 c4 10 add $0x10,%esp
}
10be23: 8b 5d fc mov -0x4(%ebp),%ebx
10be26: c9 leave
10be27: c3 ret
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(
10be28: 83 ec 0c sub $0xc,%esp
10be2b: 53 push %ebx
10be2c: 68 ec bd 10 00 push $0x10bdec
10be31: ff 73 08 pushl 0x8(%ebx)
10be34: ff 73 64 pushl 0x64(%ebx)
10be37: 8d 43 10 lea 0x10(%ebx),%eax
10be3a: 50 push %eax
10be3b: e8 b0 66 00 00 call 1124f0 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10be40: 83 c4 20 add $0x20,%esp
10be43: 84 c0 test %al,%al
10be45: 74 dc je 10be23 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10be47: 83 ec 0c sub $0xc,%esp
10be4a: 8d 43 6c lea 0x6c(%ebx),%eax
10be4d: 50 push %eax
10be4e: e8 7d 16 00 00 call 10d4d0 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10be53: c6 43 3c 03 movb $0x3,0x3c(%ebx)
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10be57: 83 c4 10 add $0x10,%esp
10be5a: eb af jmp 10be0b <_POSIX_Timer_TSR+0x1f>
001146e0 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
1146e0: 55 push %ebp
1146e1: 89 e5 mov %esp,%ebp
1146e3: 57 push %edi
1146e4: 56 push %esi
1146e5: 53 push %ebx
1146e6: 83 ec 48 sub $0x48,%esp
1146e9: 8b 75 08 mov 0x8(%ebp),%esi
1146ec: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
1146ef: 6a 01 push $0x1
1146f1: 0f b6 45 10 movzbl 0x10(%ebp),%eax
1146f5: 50 push %eax
1146f6: 8d 7d dc lea -0x24(%ebp),%edi
1146f9: 57 push %edi
1146fa: 53 push %ebx
1146fb: 56 push %esi
1146fc: e8 6b 00 00 00 call 11476c <_POSIX_signals_Clear_signals>
114701: 83 c4 20 add $0x20,%esp
114704: 84 c0 test %al,%al
114706: 74 58 je 114760 <_POSIX_signals_Check_signal+0x80>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
114708: 8d 04 5b lea (%ebx,%ebx,2),%eax
11470b: c1 e0 02 shl $0x2,%eax
11470e: 8b 90 a8 9a 12 00 mov 0x129aa8(%eax),%edx
114714: 89 55 c4 mov %edx,-0x3c(%ebp)
114717: 4a dec %edx
114718: 74 46 je 114760 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
11471a: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
114720: 8b 90 a4 9a 12 00 mov 0x129aa4(%eax),%edx
114726: 09 ca or %ecx,%edx
114728: 89 96 cc 00 00 00 mov %edx,0xcc(%esi)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
11472e: 83 b8 a0 9a 12 00 02 cmpl $0x2,0x129aa0(%eax)
114735: 74 21 je 114758 <_POSIX_signals_Check_signal+0x78>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
114737: 83 ec 0c sub $0xc,%esp
11473a: 53 push %ebx
11473b: 89 4d d4 mov %ecx,-0x2c(%ebp)
11473e: ff 55 c4 call *-0x3c(%ebp)
114741: 83 c4 10 add $0x10,%esp
114744: 8b 4d d4 mov -0x2c(%ebp),%ecx
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
114747: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi)
11474d: b0 01 mov $0x1,%al
return true;
}
11474f: 8d 65 f4 lea -0xc(%ebp),%esp
114752: 5b pop %ebx
114753: 5e pop %esi
114754: 5f pop %edi
114755: c9 leave
114756: c3 ret
114757: 90 nop
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
114758: 50 push %eax
114759: 6a 00 push $0x0
11475b: 57 push %edi
11475c: eb dc jmp 11473a <_POSIX_signals_Check_signal+0x5a>
11475e: 66 90 xchg %ax,%ax
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
114760: 31 c0 xor %eax,%eax
}
114762: 8d 65 f4 lea -0xc(%ebp),%esp
114765: 5b pop %ebx
114766: 5e pop %esi
114767: 5f pop %edi
114768: c9 leave
114769: c3 ret
00114fac <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
114fac: 55 push %ebp
114fad: 89 e5 mov %esp,%ebp
114faf: 53 push %ebx
114fb0: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
114fb3: 9c pushf
114fb4: fa cli
114fb5: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
114fb6: 8d 04 49 lea (%ecx,%ecx,2),%eax
114fb9: c1 e0 02 shl $0x2,%eax
114fbc: 83 b8 a0 9a 12 00 02 cmpl $0x2,0x129aa0(%eax)
114fc3: 74 23 je 114fe8 <_POSIX_signals_Clear_process_signals+0x3c>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
114fc5: 49 dec %ecx
114fc6: b8 fe ff ff ff mov $0xfffffffe,%eax
114fcb: d3 c0 rol %cl,%eax
114fcd: 23 05 a8 9c 12 00 and 0x129ca8,%eax
114fd3: a3 a8 9c 12 00 mov %eax,0x129ca8
if ( !_POSIX_signals_Pending )
114fd8: 85 c0 test %eax,%eax
114fda: 75 06 jne 114fe2 <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
114fdc: ff 0d 5c 95 12 00 decl 0x12955c
}
_ISR_Enable( level );
114fe2: 52 push %edx
114fe3: 9d popf
}
114fe4: 5b pop %ebx
114fe5: c9 leave
114fe6: c3 ret
114fe7: 90 nop
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114fe8: 8d 98 c4 9c 12 00 lea 0x129cc4(%eax),%ebx
114fee: 39 98 c0 9c 12 00 cmp %ebx,0x129cc0(%eax)
114ff4: 75 ec jne 114fe2 <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN
114ff6: eb cd jmp 114fc5 <_POSIX_signals_Clear_process_signals+0x19>
0011476c <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
11476c: 55 push %ebp
11476d: 89 e5 mov %esp,%ebp
11476f: 57 push %edi
114770: 56 push %esi
114771: 53 push %ebx
114772: 83 ec 1c sub $0x1c,%esp
114775: 8b 5d 0c mov 0xc(%ebp),%ebx
114778: 0f b6 7d 14 movzbl 0x14(%ebp),%edi
11477c: 8d 4b ff lea -0x1(%ebx),%ecx
11477f: b8 01 00 00 00 mov $0x1,%eax
114784: d3 e0 shl %cl,%eax
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
114786: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
11478a: 75 3c jne 1147c8 <_POSIX_signals_Clear_signals+0x5c>
11478c: b9 ff ff ff ff mov $0xffffffff,%ecx
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
114791: 9c pushf
114792: fa cli
114793: 8f 45 e4 popl -0x1c(%ebp)
if ( is_global ) {
114796: 89 fa mov %edi,%edx
114798: 84 d2 test %dl,%dl
11479a: 74 3c je 1147d8 <_POSIX_signals_Clear_signals+0x6c>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
11479c: 23 05 a8 9c 12 00 and 0x129ca8,%eax
1147a2: 85 c8 test %ecx,%eax
1147a4: 74 5e je 114804 <_POSIX_signals_Clear_signals+0x98>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
1147a6: 8d 14 1b lea (%ebx,%ebx,1),%edx
1147a9: 8d 04 1a lea (%edx,%ebx,1),%eax
1147ac: 83 3c 85 a0 9a 12 00 cmpl $0x2,0x129aa0(,%eax,4)
1147b3: 02
1147b4: 74 52 je 114808 <_POSIX_signals_Clear_signals+0x9c>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
1147b6: 83 ec 0c sub $0xc,%esp
1147b9: 53 push %ebx
1147ba: e8 ed 07 00 00 call 114fac <_POSIX_signals_Clear_process_signals>
1147bf: b0 01 mov $0x1,%al
1147c1: 83 c4 10 add $0x10,%esp
1147c4: eb 2f jmp 1147f5 <_POSIX_signals_Clear_signals+0x89>
1147c6: 66 90 xchg %ax,%ax
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
1147c8: 8b 55 08 mov 0x8(%ebp),%edx
1147cb: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx
1147d1: f7 d1 not %ecx
1147d3: eb bc jmp 114791 <_POSIX_signals_Clear_signals+0x25>
1147d5: 8d 76 00 lea 0x0(%esi),%esi
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
1147d8: 8b 55 08 mov 0x8(%ebp),%edx
1147db: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx
1147e1: 89 c6 mov %eax,%esi
1147e3: 21 de and %ebx,%esi
1147e5: 85 ce test %ecx,%esi
1147e7: 74 1b je 114804 <_POSIX_signals_Clear_signals+0x98>
api->signals_pending &= ~mask;
1147e9: f7 d0 not %eax
1147eb: 21 d8 and %ebx,%eax
1147ed: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
1147f3: b0 01 mov $0x1,%al
do_callout = true;
}
}
_ISR_Enable( level );
1147f5: ff 75 e4 pushl -0x1c(%ebp)
1147f8: 9d popf
return do_callout;
}
1147f9: 8d 65 f4 lea -0xc(%ebp),%esp
1147fc: 5b pop %ebx
1147fd: 5e pop %esi
1147fe: 5f pop %edi
1147ff: c9 leave
114800: c3 ret
114801: 8d 76 00 lea 0x0(%esi),%esi
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
114804: 31 c0 xor %eax,%eax
114806: eb ed jmp 1147f5 <_POSIX_signals_Clear_signals+0x89>
_ISR_Disable( level );
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
114808: 89 c2 mov %eax,%edx
11480a: c1 e2 02 shl $0x2,%edx
11480d: 8d 8a c0 9c 12 00 lea 0x129cc0(%edx),%ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
114813: 8b 82 c0 9c 12 00 mov 0x129cc0(%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
114819: 8d 71 04 lea 0x4(%ecx),%esi
11481c: 39 f0 cmp %esi,%eax
11481e: 74 48 je 114868 <_POSIX_signals_Clear_signals+0xfc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
114820: 8b 30 mov (%eax),%esi
the_chain->first = new_first;
114822: 89 b2 c0 9c 12 00 mov %esi,0x129cc0(%edx)
new_first->previous = _Chain_Head(the_chain);
114828: 89 4e 04 mov %ecx,0x4(%esi)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
11482b: 83 ec 0c sub $0xc,%esp
11482e: 53 push %ebx
11482f: 89 45 e0 mov %eax,-0x20(%ebp)
114832: e8 75 07 00 00 call 114fac <_POSIX_signals_Clear_process_signals>
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
*info = psiginfo->Info;
114837: 8b 45 e0 mov -0x20(%ebp),%eax
11483a: 8d 70 08 lea 0x8(%eax),%esi
11483d: b9 03 00 00 00 mov $0x3,%ecx
114842: 8b 7d 10 mov 0x10(%ebp),%edi
114845: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
114847: c7 00 24 9c 12 00 movl $0x129c24,(%eax)
old_last_node = the_chain->last;
11484d: 8b 15 28 9c 12 00 mov 0x129c28,%edx
the_chain->last = the_node;
114853: a3 28 9c 12 00 mov %eax,0x129c28
old_last_node->next = the_node;
114858: 89 02 mov %eax,(%edx)
the_node->previous = old_last_node;
11485a: 89 50 04 mov %edx,0x4(%eax)
11485d: 83 c4 10 add $0x10,%esp
114860: e9 51 ff ff ff jmp 1147b6 <_POSIX_signals_Clear_signals+0x4a>
114865: 8d 76 00 lea 0x0(%esi),%esi
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
114868: 83 ec 0c sub $0xc,%esp
11486b: 53 push %ebx
11486c: e8 3b 07 00 00 call 114fac <_POSIX_signals_Clear_process_signals>
114871: 83 c4 10 add $0x10,%esp
114874: e9 3d ff ff ff jmp 1147b6 <_POSIX_signals_Clear_signals+0x4a>
0010c6c8 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
10c6c8: 55 push %ebp
10c6c9: 89 e5 mov %esp,%ebp
10c6cb: 56 push %esi
10c6cc: 53 push %ebx
10c6cd: 8b 55 08 mov 0x8(%ebp),%edx
10c6d0: b8 1b 00 00 00 mov $0x1b,%eax
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c6d5: bb 01 00 00 00 mov $0x1,%ebx
10c6da: 8d 48 ff lea -0x1(%eax),%ecx
10c6dd: 89 de mov %ebx,%esi
10c6df: d3 e6 shl %cl,%esi
10c6e1: 85 d6 test %edx,%esi
10c6e3: 75 20 jne 10c705 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c6e5: 40 inc %eax
10c6e6: 83 f8 20 cmp $0x20,%eax
10c6e9: 75 ef jne 10c6da <_POSIX_signals_Get_highest+0x12>
10c6eb: b0 01 mov $0x1,%al
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c6ed: bb 01 00 00 00 mov $0x1,%ebx
10c6f2: eb 06 jmp 10c6fa <_POSIX_signals_Get_highest+0x32>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c6f4: 40 inc %eax
10c6f5: 83 f8 1b cmp $0x1b,%eax
10c6f8: 74 0b je 10c705 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN
if ( set & signo_to_mask( signo ) ) {
10c6fa: 8d 48 ff lea -0x1(%eax),%ecx
10c6fd: 89 de mov %ebx,%esi
10c6ff: d3 e6 shl %cl,%esi
10c701: 85 d6 test %edx,%esi
10c703: 74 ef je 10c6f4 <_POSIX_signals_Get_highest+0x2c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c705: 5b pop %ebx
10c706: 5e pop %esi
10c707: c9 leave
10c708: c3 ret
00111464 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
111464: 55 push %ebp
111465: 89 e5 mov %esp,%ebp
111467: 56 push %esi
111468: 53 push %ebx
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111469: 8b 45 08 mov 0x8(%ebp),%eax
11146c: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
111472: 85 f6 test %esi,%esi
111474: 74 69 je 1114df <_POSIX_signals_Post_switch_extension+0x7b><== NEVER TAKEN
111476: 66 90 xchg %ax,%ax
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
111478: 9c pushf
111479: fa cli
11147a: 59 pop %ecx
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
11147b: 8b 15 a8 9c 12 00 mov 0x129ca8,%edx
111481: 0b 96 d0 00 00 00 or 0xd0(%esi),%edx
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
111487: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
11148d: f7 d0 not %eax
11148f: 85 c2 test %eax,%edx
111491: 74 4a je 1114dd <_POSIX_signals_Post_switch_extension+0x79>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
111493: 51 push %ecx
111494: 9d popf
111495: bb 1b 00 00 00 mov $0x1b,%ebx
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
11149a: 52 push %edx
11149b: 6a 00 push $0x0
11149d: 53 push %ebx
11149e: 56 push %esi
11149f: e8 3c 32 00 00 call 1146e0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
1114a4: 83 c4 0c add $0xc,%esp
1114a7: 6a 01 push $0x1
1114a9: 53 push %ebx
1114aa: 56 push %esi
1114ab: e8 30 32 00 00 call 1146e0 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
1114b0: 43 inc %ebx
1114b1: 83 c4 10 add $0x10,%esp
1114b4: 83 fb 20 cmp $0x20,%ebx
1114b7: 75 e1 jne 11149a <_POSIX_signals_Post_switch_extension+0x36>
1114b9: b3 01 mov $0x1,%bl
1114bb: 90 nop
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
1114bc: 50 push %eax
1114bd: 6a 00 push $0x0
1114bf: 53 push %ebx
1114c0: 56 push %esi
1114c1: e8 1a 32 00 00 call 1146e0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
1114c6: 83 c4 0c add $0xc,%esp
1114c9: 6a 01 push $0x1
1114cb: 53 push %ebx
1114cc: 56 push %esi
1114cd: e8 0e 32 00 00 call 1146e0 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
1114d2: 43 inc %ebx
1114d3: 83 c4 10 add $0x10,%esp
1114d6: 83 fb 1b cmp $0x1b,%ebx
1114d9: 75 e1 jne 1114bc <_POSIX_signals_Post_switch_extension+0x58>
1114db: eb 9b jmp 111478 <_POSIX_signals_Post_switch_extension+0x14>
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
1114dd: 51 push %ecx
1114de: 9d popf
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
}
1114df: 8d 65 f8 lea -0x8(%ebp),%esp
1114e2: 5b pop %ebx
1114e3: 5e pop %esi
1114e4: c9 leave
1114e5: c3 ret
001148a0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
1148a0: 55 push %ebp
1148a1: 89 e5 mov %esp,%ebp
1148a3: 57 push %edi
1148a4: 56 push %esi
1148a5: 53 push %ebx
1148a6: 83 ec 0c sub $0xc,%esp
1148a9: 8b 5d 08 mov 0x8(%ebp),%ebx
1148ac: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1148af: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi
1148b5: 8d 4a ff lea -0x1(%edx),%ecx
1148b8: b8 01 00 00 00 mov $0x1,%eax
1148bd: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
1148bf: 8b 4b 10 mov 0x10(%ebx),%ecx
1148c2: 89 cf mov %ecx,%edi
1148c4: 81 e7 00 80 00 10 and $0x10008000,%edi
1148ca: 81 ff 00 80 00 10 cmp $0x10008000,%edi
1148d0: 74 6e je 114940 <_POSIX_signals_Unblock_thread+0xa0>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
1148d2: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx
1148d8: f7 d2 not %edx
1148da: 85 d0 test %edx,%eax
1148dc: 74 56 je 114934 <_POSIX_signals_Unblock_thread+0x94>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
1148de: c6 43 74 01 movb $0x1,0x74(%ebx)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
1148e2: f7 c1 00 00 00 10 test $0x10000000,%ecx
1148e8: 74 32 je 11491c <_POSIX_signals_Unblock_thread+0x7c>
the_thread->Wait.return_code = EINTR;
1148ea: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
1148f1: 83 e1 08 and $0x8,%ecx
1148f4: 74 3e je 114934 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
1148f6: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1148fa: 0f 84 a8 00 00 00 je 1149a8 <_POSIX_signals_Unblock_thread+0x108><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
114900: 83 ec 08 sub $0x8,%esp
114903: 68 f8 ff 03 10 push $0x1003fff8
114908: 53 push %ebx
114909: e8 b6 8f ff ff call 10d8c4 <_Thread_Clear_state>
11490e: 31 c0 xor %eax,%eax
114910: 83 c4 10 add $0x10,%esp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
114913: 8d 65 f4 lea -0xc(%ebp),%esp
114916: 5b pop %ebx
114917: 5e pop %esi
114918: 5f pop %edi
114919: c9 leave
11491a: c3 ret
11491b: 90 nop
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
11491c: 85 c9 test %ecx,%ecx
11491e: 75 14 jne 114934 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
114920: a1 54 95 12 00 mov 0x129554,%eax
114925: 85 c0 test %eax,%eax
114927: 74 0b je 114934 <_POSIX_signals_Unblock_thread+0x94>
114929: 3b 1d 78 95 12 00 cmp 0x129578,%ebx
11492f: 74 6b je 11499c <_POSIX_signals_Unblock_thread+0xfc><== ALWAYS TAKEN
114931: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Signals_to_thread_executing = true;
114934: 31 c0 xor %eax,%eax
}
}
return false;
}
114936: 8d 65 f4 lea -0xc(%ebp),%esp
114939: 5b pop %ebx
11493a: 5e pop %esi
11493b: 5f pop %edi
11493c: c9 leave
11493d: c3 ret
11493e: 66 90 xchg %ax,%ax
* 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) ) {
114940: 85 43 30 test %eax,0x30(%ebx)
114943: 74 33 je 114978 <_POSIX_signals_Unblock_thread+0xd8>
the_thread->Wait.return_code = EINTR;
114945: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
11494c: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
11494f: 8b 4d 10 mov 0x10(%ebp),%ecx
114952: 85 c9 test %ecx,%ecx
114954: 74 32 je 114988 <_POSIX_signals_Unblock_thread+0xe8>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
114956: b9 03 00 00 00 mov $0x3,%ecx
11495b: 89 c7 mov %eax,%edi
11495d: 8b 75 10 mov 0x10(%ebp),%esi
114960: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
114962: 83 ec 0c sub $0xc,%esp
114965: 53 push %ebx
114966: e8 41 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy>
11496b: b0 01 mov $0x1,%al
return true;
11496d: 83 c4 10 add $0x10,%esp
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
114970: 8d 65 f4 lea -0xc(%ebp),%esp
114973: 5b pop %ebx
114974: 5e pop %esi
114975: 5f pop %edi
114976: c9 leave
114977: c3 ret
* 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) ) {
114978: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx
11497e: f7 d1 not %ecx
114980: 85 c8 test %ecx,%eax
114982: 75 c1 jne 114945 <_POSIX_signals_Unblock_thread+0xa5>
114984: eb ae jmp 114934 <_POSIX_signals_Unblock_thread+0x94>
114986: 66 90 xchg %ax,%ax
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
114988: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
11498a: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
114991: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
114998: eb c8 jmp 114962 <_POSIX_signals_Unblock_thread+0xc2>
11499a: 66 90 xchg %ax,%ax
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
11499c: c6 05 28 96 12 00 01 movb $0x1,0x129628
1149a3: 31 c0 xor %eax,%eax
1149a5: eb 8f jmp 114936 <_POSIX_signals_Unblock_thread+0x96>
1149a7: 90 nop
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
1149a8: 83 ec 0c sub $0xc,%esp
1149ab: 8d 43 48 lea 0x48(%ebx),%eax
1149ae: 50 push %eax
1149af: e8 64 a3 ff ff call 10ed18 <_Watchdog_Remove>
1149b4: 83 c4 10 add $0x10,%esp
1149b7: e9 44 ff ff ff jmp 114900 <_POSIX_signals_Unblock_thread+0x60>
00110e84 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
110e84: 55 push %ebp
110e85: 89 e5 mov %esp,%ebp
110e87: 56 push %esi
110e88: 53 push %ebx
110e89: 8b 5d 08 mov 0x8(%ebp),%ebx
110e8c: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
110e8f: 85 db test %ebx,%ebx
110e91: 74 35 je 110ec8 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
110e93: 85 f6 test %esi,%esi
110e95: 74 31 je 110ec8 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
110e97: 83 ec 0c sub $0xc,%esp
110e9a: ff 35 50 00 13 00 pushl 0x130050
110ea0: e8 9b e4 ff ff call 10f340 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
110ea5: 5a pop %edx
110ea6: 59 pop %ecx
110ea7: 56 push %esi
110ea8: 53 push %ebx
110ea9: e8 4a 4e 00 00 call 115cf8 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
110eae: 58 pop %eax
110eaf: ff 35 50 00 13 00 pushl 0x130050
110eb5: e8 ce e4 ff ff call 10f388 <_API_Mutex_Unlock>
110eba: b0 01 mov $0x1,%al
return true;
110ebc: 83 c4 10 add $0x10,%esp
}
110ebf: 8d 65 f8 lea -0x8(%ebp),%esp
110ec2: 5b pop %ebx
110ec3: 5e pop %esi
110ec4: c9 leave
110ec5: c3 ret
110ec6: 66 90 xchg %ax,%ax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
110ec8: 31 c0 xor %eax,%eax
}
110eca: 8d 65 f8 lea -0x8(%ebp),%esp
110ecd: 5b pop %ebx
110ece: 5e pop %esi
110ecf: c9 leave
110ed0: c3 ret
00110f28 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110f28: 55 push %ebp
110f29: 89 e5 mov %esp,%ebp
110f2b: 56 push %esi
110f2c: 53 push %ebx
110f2d: 83 ec 10 sub $0x10,%esp
110f30: 8b 5d 08 mov 0x8(%ebp),%ebx
110f33: 8b 75 0c mov 0xc(%ebp),%esi
110f36: 8a 45 10 mov 0x10(%ebp),%al
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
110f39: 8b 15 98 ff 12 00 mov 0x12ff98,%edx
110f3f: 85 d2 test %edx,%edx
110f41: 74 19 je 110f5c <_Protected_heap_Walk+0x34>
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110f43: 0f b6 c0 movzbl %al,%eax
110f46: 89 45 10 mov %eax,0x10(%ebp)
110f49: 89 75 0c mov %esi,0xc(%ebp)
110f4c: 89 5d 08 mov %ebx,0x8(%ebp)
}
return status;
}
110f4f: 8d 65 f8 lea -0x8(%ebp),%esp
110f52: 5b pop %ebx
110f53: 5e pop %esi
110f54: c9 leave
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
110f55: e9 f2 f1 ff ff jmp 11014c <_Heap_Walk>
110f5a: 66 90 xchg %ax,%ax
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
110f5c: 83 ec 0c sub $0xc,%esp
110f5f: ff 35 50 00 13 00 pushl 0x130050
110f65: 88 45 f4 mov %al,-0xc(%ebp)
110f68: e8 d3 e3 ff ff call 10f340 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110f6d: 83 c4 0c add $0xc,%esp
110f70: 8a 45 f4 mov -0xc(%ebp),%al
110f73: 0f b6 c0 movzbl %al,%eax
110f76: 50 push %eax
110f77: 56 push %esi
110f78: 53 push %ebx
110f79: e8 ce f1 ff ff call 11014c <_Heap_Walk>
_RTEMS_Unlock_allocator();
110f7e: 5a pop %edx
110f7f: ff 35 50 00 13 00 pushl 0x130050
110f85: 88 45 f4 mov %al,-0xc(%ebp)
110f88: e8 fb e3 ff ff call 10f388 <_API_Mutex_Unlock>
110f8d: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110f90: 8a 45 f4 mov -0xc(%ebp),%al
110f93: 8d 65 f8 lea -0x8(%ebp),%esp
110f96: 5b pop %ebx
110f97: 5e pop %esi
110f98: c9 leave
110f99: c3 ret
00111ca4 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
111ca4: 55 push %ebp
111ca5: 89 e5 mov %esp,%ebp
111ca7: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
111caa: a1 20 53 12 00 mov 0x125320,%eax
111caf: 85 c0 test %eax,%eax
111cb1: 74 05 je 111cb8 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
111cb3: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
111cb4: ff e0 jmp *%eax
111cb6: 66 90 xchg %ax,%ax
}
111cb8: c9 leave
111cb9: c3 ret
0010c074 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10c074: 55 push %ebp
10c075: 89 e5 mov %esp,%ebp
10c077: 57 push %edi
10c078: 56 push %esi
10c079: 53 push %ebx
10c07a: 83 ec 1c sub $0x1c,%esp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
10c07d: 8b 1d cc 52 12 00 mov 0x1252cc,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10c083: 8b 3d c8 52 12 00 mov 0x1252c8,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10c089: 85 db test %ebx,%ebx
10c08b: 74 46 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c08d: 85 ff test %edi,%edi
10c08f: 74 42 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10c091: 31 f6 xor %esi,%esi
10c093: 90 nop
return_value = rtems_task_create(
10c094: 83 ec 08 sub $0x8,%esp
10c097: 8d 45 e4 lea -0x1c(%ebp),%eax
10c09a: 50 push %eax
10c09b: ff 73 0c pushl 0xc(%ebx)
10c09e: ff 73 14 pushl 0x14(%ebx)
10c0a1: ff 73 04 pushl 0x4(%ebx)
10c0a4: ff 73 08 pushl 0x8(%ebx)
10c0a7: ff 33 pushl (%ebx)
10c0a9: e8 96 fd ff ff call 10be44 <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 ) )
10c0ae: 83 c4 20 add $0x20,%esp
10c0b1: 85 c0 test %eax,%eax
10c0b3: 75 26 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10c0b5: 51 push %ecx
10c0b6: ff 73 18 pushl 0x18(%ebx)
10c0b9: ff 73 10 pushl 0x10(%ebx)
10c0bc: ff 75 e4 pushl -0x1c(%ebp)
10c0bf: e8 24 00 00 00 call 10c0e8 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10c0c4: 83 c4 10 add $0x10,%esp
10c0c7: 85 c0 test %eax,%eax
10c0c9: 75 10 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10c0cb: 46 inc %esi
10c0cc: 83 c3 1c add $0x1c,%ebx
10c0cf: 39 f7 cmp %esi,%edi
10c0d1: 77 c1 ja 10c094 <_RTEMS_tasks_Initialize_user_tasks_body+0x20><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
10c0d3: 8d 65 f4 lea -0xc(%ebp),%esp
10c0d6: 5b pop %ebx
10c0d7: 5e pop %esi
10c0d8: 5f pop %edi
10c0d9: c9 leave
10c0da: 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 );
10c0db: 52 push %edx
10c0dc: 50 push %eax
10c0dd: 6a 01 push $0x1
10c0df: 6a 01 push $0x1
10c0e1: e8 ca 0d 00 00 call 10ceb0 <_Internal_error_Occurred>
00111d00 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
111d00: 55 push %ebp
111d01: 89 e5 mov %esp,%ebp
111d03: 57 push %edi
111d04: 56 push %esi
111d05: 53 push %ebx
111d06: 83 ec 1c sub $0x1c,%esp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
111d09: 8b 45 08 mov 0x8(%ebp),%eax
111d0c: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx
if ( !api )
111d12: 85 db test %ebx,%ebx
111d14: 74 45 je 111d5b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
111d16: 9c pushf
111d17: fa cli
111d18: 58 pop %eax
signal_set = asr->signals_posted;
111d19: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
111d1c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
111d23: 50 push %eax
111d24: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
111d25: 85 f6 test %esi,%esi
111d27: 74 32 je 111d5b <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
111d29: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
111d2c: 50 push %eax
111d2d: 8d 7d e4 lea -0x1c(%ebp),%edi
111d30: 57 push %edi
111d31: 68 ff ff 00 00 push $0xffff
111d36: ff 73 10 pushl 0x10(%ebx)
111d39: e8 e6 2d 00 00 call 114b24 <rtems_task_mode>
(*asr->handler)( signal_set );
111d3e: 89 34 24 mov %esi,(%esp)
111d41: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
111d44: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
111d47: 83 c4 0c add $0xc,%esp
111d4a: 57 push %edi
111d4b: 68 ff ff 00 00 push $0xffff
111d50: ff 75 e4 pushl -0x1c(%ebp)
111d53: e8 cc 2d 00 00 call 114b24 <rtems_task_mode>
111d58: 83 c4 10 add $0x10,%esp
}
111d5b: 8d 65 f4 lea -0xc(%ebp),%esp
111d5e: 5b pop %ebx
111d5f: 5e pop %esi
111d60: 5f pop %edi
111d61: c9 leave
111d62: c3 ret
00111c5c <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
111c5c: 55 push %ebp
111c5d: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
111c5f: 8b 45 08 mov 0x8(%ebp),%eax
111c62: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
111c68: 85 c0 test %eax,%eax
111c6a: 74 13 je 111c7f <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
111c6c: 8b 50 04 mov 0x4(%eax),%edx
111c6f: 8b 0a mov (%edx),%ecx
111c71: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
111c74: 8b 48 08 mov 0x8(%eax),%ecx
111c77: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111c79: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
111c7b: 85 c0 test %eax,%eax
111c7d: 75 ed jne 111c6c <_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;
111c7f: 8b 45 0c mov 0xc(%ebp),%eax
111c82: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
111c88: 85 c0 test %eax,%eax
111c8a: 74 13 je 111c9f <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
111c8c: 8b 50 04 mov 0x4(%eax),%edx
111c8f: 8b 0a mov (%edx),%ecx
111c91: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
111c94: 8b 48 0c mov 0xc(%eax),%ecx
111c97: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
111c99: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
111c9b: 85 c0 test %eax,%eax
111c9d: 75 ed jne 111c8c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
111c9f: c9 leave
111ca0: c3 ret
0010ca48 <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10ca48: 55 push %ebp
10ca49: 89 e5 mov %esp,%ebp
10ca4b: 57 push %edi
10ca4c: 56 push %esi
10ca4d: 53 push %ebx
10ca4e: 83 ec 28 sub $0x28,%esp
10ca51: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
10ca54: 8b 73 40 mov 0x40(%ebx),%esi
* If using nanosecond statistics, we need to obtain the uptime.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
_TOD_Get_uptime( &uptime );
10ca57: 8d 7d e0 lea -0x20(%ebp),%edi
10ca5a: 57 push %edi
10ca5b: e8 04 19 00 00 call 10e364 <_TOD_Get_uptime>
/*
* Set the starting point and the CPU time used for the statistics.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
the_period->time_period_initiated = uptime;
10ca60: 8b 45 e0 mov -0x20(%ebp),%eax
10ca63: 8b 55 e4 mov -0x1c(%ebp),%edx
10ca66: 89 43 4c mov %eax,0x4c(%ebx)
10ca69: 89 53 50 mov %edx,0x50(%ebx)
#else
the_period->time_period_initiated = _Watchdog_Ticks_since_boot;
#endif
the_period->cpu_usage_period_initiated = owning_thread->cpu_time_used;
10ca6c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10ca72: 8b 96 88 00 00 00 mov 0x88(%esi),%edx
10ca78: 89 43 44 mov %eax,0x44(%ebx)
10ca7b: 89 53 48 mov %edx,0x48(%ebx)
* routine is invoked from rtems_rate_monotonic_period, the owner will
* be the executing thread. When this routine is invoked from
* _Rate_monotonic_Timeout, it will not.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
10ca7e: 83 c4 10 add $0x10,%esp
10ca81: 3b 35 18 c4 12 00 cmp 0x12c418,%esi
10ca87: 74 0b je 10ca94 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
10ca89: 8d 65 f4 lea -0xc(%ebp),%esp
10ca8c: 5b pop %ebx
10ca8d: 5e pop %esi
10ca8e: 5f pop %edi
10ca8f: c9 leave
10ca90: c3 ret
10ca91: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10ca94: 51 push %ecx
10ca95: 8d 75 d8 lea -0x28(%ebp),%esi
10ca98: 56 push %esi
10ca99: 57 push %edi
10ca9a: 68 20 c4 12 00 push $0x12c420
10ca9f: e8 04 3a 00 00 call 1104a8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
10caa4: 58 pop %eax
10caa5: 5a pop %edx
10caa6: 56 push %esi
10caa7: 83 c3 44 add $0x44,%ebx
10caaa: 53 push %ebx
10caab: e8 f4 38 00 00 call 1103a4 <_Timespec_Add_to>
10cab0: 83 c4 10 add $0x10,%esp
}
#endif
}
10cab3: 8d 65 f4 lea -0xc(%ebp),%esp
10cab6: 5b pop %ebx
10cab7: 5e pop %esi
10cab8: 5f pop %edi
10cab9: c9 leave
10caba: c3 ret
0010d09c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10d09c: 55 push %ebp
10d09d: 89 e5 mov %esp,%ebp
10d09f: 83 ec 2c sub $0x2c,%esp
10d0a2: 8d 45 f4 lea -0xc(%ebp),%eax
10d0a5: 50 push %eax
10d0a6: ff 75 08 pushl 0x8(%ebp)
10d0a9: 68 60 c2 12 00 push $0x12c260
10d0ae: e8 09 1d 00 00 call 10edbc <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10d0b3: 83 c4 10 add $0x10,%esp
10d0b6: 8b 55 f4 mov -0xc(%ebp),%edx
10d0b9: 85 d2 test %edx,%edx
10d0bb: 75 29 jne 10d0e6 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10d0bd: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10d0c0: f6 42 11 40 testb $0x40,0x11(%edx)
10d0c4: 74 08 je 10d0ce <_Rate_monotonic_Timeout+0x32>
the_thread->Wait.id == the_period->Object.id ) {
10d0c6: 8b 4a 20 mov 0x20(%edx),%ecx
10d0c9: 3b 48 08 cmp 0x8(%eax),%ecx
10d0cc: 74 4e je 10d11c <_Rate_monotonic_Timeout+0x80>
_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 ) {
10d0ce: 83 78 38 01 cmpl $0x1,0x38(%eax)
10d0d2: 74 14 je 10d0e8 <_Rate_monotonic_Timeout+0x4c>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
10d0d4: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10d0db: a1 58 c3 12 00 mov 0x12c358,%eax
10d0e0: 48 dec %eax
10d0e1: a3 58 c3 12 00 mov %eax,0x12c358
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10d0e6: c9 leave
10d0e7: c3 ret
_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;
10d0e8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
10d0ef: 83 ec 0c sub $0xc,%esp
10d0f2: 50 push %eax
10d0f3: 89 45 e4 mov %eax,-0x1c(%ebp)
10d0f6: e8 4d f9 ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10d0fb: 8b 45 e4 mov -0x1c(%ebp),%eax
10d0fe: 8b 50 3c mov 0x3c(%eax),%edx
10d101: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10d104: 5a pop %edx
10d105: 59 pop %ecx
10d106: 83 c0 10 add $0x10,%eax
10d109: 50 push %eax
10d10a: 68 38 c4 12 00 push $0x12c438
10d10f: e8 64 36 00 00 call 110778 <_Watchdog_Insert>
10d114: 83 c4 10 add $0x10,%esp
10d117: eb c2 jmp 10d0db <_Rate_monotonic_Timeout+0x3f>
10d119: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10d11c: 83 ec 08 sub $0x8,%esp
10d11f: 68 f8 ff 03 10 push $0x1003fff8
10d124: 52 push %edx
10d125: 89 45 e4 mov %eax,-0x1c(%ebp)
10d128: e8 5b 21 00 00 call 10f288 <_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 );
10d12d: 8b 45 e4 mov -0x1c(%ebp),%eax
10d130: 89 04 24 mov %eax,(%esp)
10d133: eb c1 jmp 10d0f6 <_Rate_monotonic_Timeout+0x5a>
0010cb54 <_Rate_monotonic_Update_statistics>:
}
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
10cb54: 55 push %ebp
10cb55: 89 e5 mov %esp,%ebp
10cb57: 57 push %edi
10cb58: 56 push %esi
10cb59: 53 push %ebx
10cb5a: 83 ec 1c sub $0x1c,%esp
10cb5d: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
10cb60: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
10cb63: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
10cb67: 0f 84 bf 00 00 00 je 10cc2c <_Rate_monotonic_Update_statistics+0xd8>
/*
* Grab status for time statistics.
*/
valid_status =
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10cb6d: 52 push %edx
10cb6e: 8d 7d e0 lea -0x20(%ebp),%edi
10cb71: 57 push %edi
10cb72: 8d 75 d8 lea -0x28(%ebp),%esi
10cb75: 56 push %esi
10cb76: 53 push %ebx
10cb77: e8 40 ff ff ff call 10cabc <_Rate_monotonic_Get_status>
if (!valid_status)
10cb7c: 83 c4 10 add $0x10,%esp
10cb7f: 84 c0 test %al,%al
10cb81: 75 09 jne 10cb8c <_Rate_monotonic_Update_statistics+0x38>
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10cb83: 8d 65 f4 lea -0xc(%ebp),%esp
10cb86: 5b pop %ebx
10cb87: 5e pop %esi
10cb88: 5f pop %edi
10cb89: c9 leave
10cb8a: c3 ret
10cb8b: 90 nop
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
10cb8c: 83 ec 08 sub $0x8,%esp
10cb8f: 57 push %edi
10cb90: 8d 43 6c lea 0x6c(%ebx),%eax
10cb93: 50 push %eax
10cb94: e8 0b 38 00 00 call 1103a4 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
10cb99: 59 pop %ecx
10cb9a: 58 pop %eax
10cb9b: 8d 43 5c lea 0x5c(%ebx),%eax
10cb9e: 50 push %eax
10cb9f: 57 push %edi
10cba0: e8 df 38 00 00 call 110484 <_Timespec_Less_than>
10cba5: 83 c4 10 add $0x10,%esp
10cba8: 84 c0 test %al,%al
10cbaa: 74 0c je 10cbb8 <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
10cbac: 8b 45 e0 mov -0x20(%ebp),%eax
10cbaf: 8b 55 e4 mov -0x1c(%ebp),%edx
10cbb2: 89 43 5c mov %eax,0x5c(%ebx)
10cbb5: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
10cbb8: 83 ec 08 sub $0x8,%esp
10cbbb: 8d 43 64 lea 0x64(%ebx),%eax
10cbbe: 50 push %eax
10cbbf: 57 push %edi
10cbc0: e8 9b 38 00 00 call 110460 <_Timespec_Greater_than>
10cbc5: 83 c4 10 add $0x10,%esp
10cbc8: 84 c0 test %al,%al
10cbca: 74 0c je 10cbd8 <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
10cbcc: 8b 45 e0 mov -0x20(%ebp),%eax
10cbcf: 8b 55 e4 mov -0x1c(%ebp),%edx
10cbd2: 89 43 64 mov %eax,0x64(%ebx)
10cbd5: 89 53 68 mov %edx,0x68(%ebx)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
10cbd8: 83 ec 08 sub $0x8,%esp
10cbdb: 56 push %esi
10cbdc: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10cbe2: 50 push %eax
10cbe3: e8 bc 37 00 00 call 1103a4 <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
10cbe8: 58 pop %eax
10cbe9: 5a pop %edx
10cbea: 8d 43 74 lea 0x74(%ebx),%eax
10cbed: 50 push %eax
10cbee: 56 push %esi
10cbef: e8 90 38 00 00 call 110484 <_Timespec_Less_than>
10cbf4: 83 c4 10 add $0x10,%esp
10cbf7: 84 c0 test %al,%al
10cbf9: 75 39 jne 10cc34 <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
10cbfb: 83 ec 08 sub $0x8,%esp
10cbfe: 8d 43 7c lea 0x7c(%ebx),%eax
10cc01: 50 push %eax
10cc02: 56 push %esi
10cc03: e8 58 38 00 00 call 110460 <_Timespec_Greater_than>
10cc08: 83 c4 10 add $0x10,%esp
10cc0b: 84 c0 test %al,%al
10cc0d: 0f 84 70 ff ff ff je 10cb83 <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
10cc13: 8b 45 d8 mov -0x28(%ebp),%eax
10cc16: 8b 55 dc mov -0x24(%ebp),%edx
10cc19: 89 43 7c mov %eax,0x7c(%ebx)
10cc1c: 89 93 80 00 00 00 mov %edx,0x80(%ebx)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
10cc22: 8d 65 f4 lea -0xc(%ebp),%esp
10cc25: 5b pop %ebx
10cc26: 5e pop %esi
10cc27: 5f pop %edi
10cc28: c9 leave
10cc29: c3 ret
10cc2a: 66 90 xchg %ax,%ax
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
10cc2c: ff 43 58 incl 0x58(%ebx)
10cc2f: e9 39 ff ff ff jmp 10cb6d <_Rate_monotonic_Update_statistics+0x19>
*/
#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 ) )
stats->min_wall_time = since_last_period;
10cc34: 8b 45 d8 mov -0x28(%ebp),%eax
10cc37: 8b 55 dc mov -0x24(%ebp),%edx
10cc3a: 89 43 74 mov %eax,0x74(%ebx)
10cc3d: 89 53 78 mov %edx,0x78(%ebx)
10cc40: eb b9 jmp 10cbfb <_Rate_monotonic_Update_statistics+0xa7>
0010e08c <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10e08c: 55 push %ebp
10e08d: 89 e5 mov %esp,%ebp
10e08f: 53 push %ebx
10e090: 83 ec 04 sub $0x4,%esp
10e093: 8b 5d 08 mov 0x8(%ebp),%ebx
10e096: a1 b8 cc 12 00 mov 0x12ccb8,%eax
10e09b: 40 inc %eax
10e09c: a3 b8 cc 12 00 mov %eax,0x12ccb8
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10e0a1: a1 4c cd 12 00 mov 0x12cd4c,%eax
if ( time->tv_sec < seconds )
10e0a6: 8b 13 mov (%ebx),%edx
10e0a8: 39 d0 cmp %edx,%eax
10e0aa: 7f 34 jg 10e0e0 <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10e0ac: 51 push %ecx
10e0ad: 29 c2 sub %eax,%edx
10e0af: 52 push %edx
10e0b0: 6a 00 push $0x0
10e0b2: 68 8c cd 12 00 push $0x12cd8c
10e0b7: e8 04 25 00 00 call 1105c0 <_Watchdog_Adjust>
10e0bc: 83 c4 10 add $0x10,%esp
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10e0bf: 8b 03 mov (%ebx),%eax
10e0c1: a3 4c cd 12 00 mov %eax,0x12cd4c
10e0c6: 8b 43 04 mov 0x4(%ebx),%eax
10e0c9: a3 50 cd 12 00 mov %eax,0x12cd50
_TOD_Is_set = true;
10e0ce: c6 05 cc cc 12 00 01 movb $0x1,0x12cccc
_TOD_Activate();
_Thread_Enable_dispatch();
}
10e0d5: 8b 5d fc mov -0x4(%ebp),%ebx
10e0d8: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10e0d9: e9 c2 12 00 00 jmp 10f3a0 <_Thread_Enable_dispatch>
10e0de: 66 90 xchg %ax,%ax
10e0e0: 51 push %ecx
10e0e1: 29 d0 sub %edx,%eax
10e0e3: 50 push %eax
10e0e4: 6a 01 push $0x1
10e0e6: 68 8c cd 12 00 push $0x12cd8c
10e0eb: e8 d0 24 00 00 call 1105c0 <_Watchdog_Adjust>
10e0f0: 83 c4 10 add $0x10,%esp
10e0f3: eb ca jmp 10e0bf <_TOD_Set+0x33>
0010c7c4 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c7c4: 55 push %ebp
10c7c5: 89 e5 mov %esp,%ebp
10c7c7: 56 push %esi
10c7c8: 53 push %ebx
10c7c9: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c7cc: 8b 72 08 mov 0x8(%edx),%esi
10c7cf: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c7d0: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c7d2: 89 c3 mov %eax,%ebx
10c7d4: 83 e3 03 and $0x3,%ebx
10c7d7: 74 67 je 10c840 <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c7d9: 8b 4a 04 mov 0x4(%edx),%ecx
10c7dc: 0f b7 8c 09 20 54 12 movzwl 0x125420(%ecx,%ecx,1),%ecx
10c7e3: 00
10c7e4: 8d 34 31 lea (%ecx,%esi,1),%esi
time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) *
10c7e7: 0f b7 8c 1b 54 54 12 movzwl 0x125454(%ebx,%ebx,1),%ecx
10c7ee: 00
10c7ef: 2d c4 07 00 00 sub $0x7c4,%eax
10c7f4: c1 e8 02 shr $0x2,%eax
10c7f7: 8d 1c c0 lea (%eax,%eax,8),%ebx
10c7fa: 8d 1c d8 lea (%eax,%ebx,8),%ebx
10c7fd: 8d 1c 9b lea (%ebx,%ebx,4),%ebx
10c800: 8d 04 98 lea (%eax,%ebx,4),%eax
10c803: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c805: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c807: 8d 04 89 lea (%ecx,%ecx,4),%eax
10c80a: 8d 04 81 lea (%ecx,%eax,4),%eax
10c80d: 8d 04 c1 lea (%ecx,%eax,8),%eax
10c810: c1 e0 02 shl $0x2,%eax
10c813: 29 c8 sub %ecx,%eax
10c815: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c818: 8b 5a 14 mov 0x14(%edx),%ebx
* TOD_SECONDS_PER_MINUTE;
time += the_tod->second;
10c81b: 8b 4a 0c mov 0xc(%edx),%ecx
10c81e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx
10c821: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
10c824: c1 e1 02 shl $0x2,%ecx
10c827: 03 4a 10 add 0x10(%edx),%ecx
10c82a: 8d 14 49 lea (%ecx,%ecx,2),%edx
10c82d: 8d 14 92 lea (%edx,%edx,4),%edx
10c830: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
10c837: 8d 04 02 lea (%edx,%eax,1),%eax
time += TOD_SECONDS_1970_THROUGH_1988;
return( time );
}
10c83a: 5b pop %ebx
10c83b: 5e pop %esi
10c83c: c9 leave
10c83d: c3 ret
10c83e: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10c840: 8b 4a 04 mov 0x4(%edx),%ecx
10c843: 0f b7 8c 09 3a 54 12 movzwl 0x12543a(%ecx,%ecx,1),%ecx
10c84a: 00
10c84b: 8d 34 31 lea (%ecx,%esi,1),%esi
10c84e: eb 97 jmp 10c7e7 <_TOD_To_seconds+0x23>
0010c850 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c850: 55 push %ebp
10c851: 89 e5 mov %esp,%ebp
10c853: 53 push %ebx
10c854: 8b 4d 08 mov 0x8(%ebp),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
10c857: 8b 1d 8c 86 12 00 mov 0x12868c,%ebx
if ((!the_tod) ||
10c85d: 85 c9 test %ecx,%ecx
10c85f: 74 53 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN
10c861: b8 40 42 0f 00 mov $0xf4240,%eax
10c866: 31 d2 xor %edx,%edx
10c868: f7 f3 div %ebx
(the_tod->ticks >= ticks_per_second) ||
10c86a: 3b 41 18 cmp 0x18(%ecx),%eax
10c86d: 76 45 jbe 10c8b4 <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c86f: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c873: 77 3f ja 10c8b4 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c875: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c879: 77 39 ja 10c8b4 <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
10c87b: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c87f: 77 33 ja 10c8b4 <_TOD_Validate+0x64>
(the_tod->month == 0) ||
10c881: 8b 41 04 mov 0x4(%ecx),%eax
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c884: 85 c0 test %eax,%eax
10c886: 74 2c je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN
10c888: 83 f8 0c cmp $0xc,%eax
10c88b: 77 27 ja 10c8b4 <_TOD_Validate+0x64>
(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) ||
10c88d: 8b 11 mov (%ecx),%edx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c88f: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c895: 76 1d jbe 10c8b4 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c897: 8b 49 08 mov 0x8(%ecx),%ecx
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c89a: 85 c9 test %ecx,%ecx
10c89c: 74 16 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c89e: 83 e2 03 and $0x3,%edx
10c8a1: 75 16 jne 10c8b9 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c8a3: 8b 04 85 94 54 12 00 mov 0x125494(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c8aa: 39 c8 cmp %ecx,%eax
10c8ac: 0f 93 c0 setae %al
10c8af: eb 05 jmp 10c8b6 <_TOD_Validate+0x66>
10c8b1: 8d 76 00 lea 0x0(%esi),%esi
10c8b4: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c8b6: 5b pop %ebx
10c8b7: c9 leave
10c8b8: 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 ];
10c8b9: 8b 04 85 60 54 12 00 mov 0x125460(,%eax,4),%eax
10c8c0: eb e8 jmp 10c8aa <_TOD_Validate+0x5a>
0010d784 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d784: 55 push %ebp
10d785: 89 e5 mov %esp,%ebp
10d787: 57 push %edi
10d788: 56 push %esi
10d789: 53 push %ebx
10d78a: 83 ec 28 sub $0x28,%esp
10d78d: 8b 5d 08 mov 0x8(%ebp),%ebx
10d790: 8b 75 0c mov 0xc(%ebp),%esi
10d793: 8a 45 10 mov 0x10(%ebp),%al
10d796: 88 45 e7 mov %al,-0x19(%ebp)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
10d799: 8b 7b 10 mov 0x10(%ebx),%edi
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
10d79c: 53 push %ebx
10d79d: e8 92 0e 00 00 call 10e634 <_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 )
10d7a2: 83 c4 10 add $0x10,%esp
10d7a5: 39 73 14 cmp %esi,0x14(%ebx)
10d7a8: 74 0d je 10d7b7 <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d7aa: 83 ec 08 sub $0x8,%esp
10d7ad: 56 push %esi
10d7ae: 53 push %ebx
10d7af: e8 38 0d 00 00 call 10e4ec <_Thread_Set_priority>
10d7b4: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d7b7: 9c pushf
10d7b8: fa cli
10d7b9: 5a pop %edx
/*
* 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;
10d7ba: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d7bd: 83 f8 04 cmp $0x4,%eax
10d7c0: 74 26 je 10d7e8 <_Thread_Change_priority+0x64>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d7c2: 83 e7 04 and $0x4,%edi
10d7c5: 74 15 je 10d7dc <_Thread_Change_priority+0x58><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d7c7: 52 push %edx
10d7c8: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d7c9: a9 e0 be 03 00 test $0x3bee0,%eax
10d7ce: 0f 85 bc 00 00 00 jne 10d890 <_Thread_Change_priority+0x10c>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10d7d4: 8d 65 f4 lea -0xc(%ebp),%esp
10d7d7: 5b pop %ebx
10d7d8: 5e pop %esi
10d7d9: 5f pop %edi
10d7da: c9 leave
10d7db: c3 ret
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* 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 );
10d7dc: 89 c1 mov %eax,%ecx
10d7de: 83 e1 fb and $0xfffffffb,%ecx
10d7e1: 89 4b 10 mov %ecx,0x10(%ebx)
10d7e4: eb e1 jmp 10d7c7 <_Thread_Change_priority+0x43>
10d7e6: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d7e8: 83 e7 04 and $0x4,%edi
10d7eb: 75 45 jne 10d832 <_Thread_Change_priority+0xae><== 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 );
10d7ed: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d7f4: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax
10d7fa: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx
10d801: 66 09 08 or %cx,(%eax)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d804: 66 a1 6c 95 12 00 mov 0x12956c,%ax
10d80a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax
10d810: 66 a3 6c 95 12 00 mov %ax,0x12956c
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
10d816: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d81a: 0f 84 88 00 00 00 je 10d8a8 <_Thread_Change_priority+0x124>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
10d820: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10d826: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10d829: 8b 08 mov (%eax),%ecx
after_node->next = the_node;
10d82b: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10d82d: 89 0b mov %ecx,(%ebx)
before_node->previous = the_node;
10d82f: 89 59 04 mov %ebx,0x4(%ecx)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
10d832: 52 push %edx
10d833: 9d popf
10d834: fa cli
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d835: 66 8b 1d 6c 95 12 00 mov 0x12956c,%bx
10d83c: 31 c0 xor %eax,%eax
10d83e: 89 c1 mov %eax,%ecx
10d840: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d844: 0f b7 c9 movzwl %cx,%ecx
10d847: 66 8b 9c 09 00 96 12 mov 0x129600(%ecx,%ecx,1),%bx
10d84e: 00
10d84f: 66 0f bc c3 bsf %bx,%ax
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10d853: c1 e1 04 shl $0x4,%ecx
10d856: 0f b7 c0 movzwl %ax,%eax
10d859: 8d 04 01 lea (%ecx,%eax,1),%eax
10d85c: 8d 0c 40 lea (%eax,%eax,2),%ecx
10d85f: a1 80 94 12 00 mov 0x129480,%eax
10d864: 8b 04 88 mov (%eax,%ecx,4),%eax
10d867: a3 48 95 12 00 mov %eax,0x129548
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d86c: 8b 0d 78 95 12 00 mov 0x129578,%ecx
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
10d872: 39 c8 cmp %ecx,%eax
10d874: 74 0d je 10d883 <_Thread_Change_priority+0xff>
_Thread_Executing->is_preemptible )
10d876: 80 79 75 00 cmpb $0x0,0x75(%ecx)
10d87a: 74 07 je 10d883 <_Thread_Change_priority+0xff>
_Context_Switch_necessary = true;
10d87c: c6 05 88 95 12 00 01 movb $0x1,0x129588
_ISR_Enable( level );
10d883: 52 push %edx
10d884: 9d popf
}
10d885: 8d 65 f4 lea -0xc(%ebp),%esp
10d888: 5b pop %ebx
10d889: 5e pop %esi
10d88a: 5f pop %edi
10d88b: c9 leave
10d88c: c3 ret
10d88d: 8d 76 00 lea 0x0(%esi),%esi
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10d890: 89 5d 0c mov %ebx,0xc(%ebp)
10d893: 8b 43 44 mov 0x44(%ebx),%eax
10d896: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10d899: 8d 65 f4 lea -0xc(%ebp),%esp
10d89c: 5b pop %ebx
10d89d: 5e pop %esi
10d89e: 5f pop %edi
10d89f: c9 leave
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
10d8a0: e9 af 0b 00 00 jmp 10e454 <_Thread_queue_Requeue>
10d8a5: 8d 76 00 lea 0x0(%esi),%esi
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
10d8a8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10d8ae: 8d 48 04 lea 0x4(%eax),%ecx
10d8b1: 89 0b mov %ecx,(%ebx)
old_last_node = the_chain->last;
10d8b3: 8b 48 08 mov 0x8(%eax),%ecx
the_chain->last = the_node;
10d8b6: 89 58 08 mov %ebx,0x8(%eax)
old_last_node->next = the_node;
10d8b9: 89 19 mov %ebx,(%ecx)
the_node->previous = old_last_node;
10d8bb: 89 4b 04 mov %ecx,0x4(%ebx)
10d8be: e9 6f ff ff ff jmp 10d832 <_Thread_Change_priority+0xae>
0010d8c4 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d8c4: 55 push %ebp
10d8c5: 89 e5 mov %esp,%ebp
10d8c7: 53 push %ebx
10d8c8: 8b 45 08 mov 0x8(%ebp),%eax
10d8cb: 8b 55 0c mov 0xc(%ebp),%edx
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d8ce: 9c pushf
10d8cf: fa cli
10d8d0: 5b pop %ebx
current_state = the_thread->current_state;
10d8d1: 8b 48 10 mov 0x10(%eax),%ecx
if ( current_state & state ) {
10d8d4: 85 ca test %ecx,%edx
10d8d6: 74 70 je 10d948 <_Thread_Clear_state+0x84>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d8d8: f7 d2 not %edx
10d8da: 21 ca and %ecx,%edx
current_state =
10d8dc: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
10d8df: 85 d2 test %edx,%edx
10d8e1: 75 65 jne 10d948 <_Thread_Clear_state+0x84>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
10d8e3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10d8e9: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx
10d8f0: 66 09 0a or %cx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
10d8f3: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx
10d8fa: 0b 90 94 00 00 00 or 0x94(%eax),%edx
10d900: 66 89 15 6c 95 12 00 mov %dx,0x12956c
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
10d907: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10d90d: 8d 4a 04 lea 0x4(%edx),%ecx
10d910: 89 08 mov %ecx,(%eax)
old_last_node = the_chain->last;
10d912: 8b 4a 08 mov 0x8(%edx),%ecx
the_chain->last = the_node;
10d915: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10d918: 89 01 mov %eax,(%ecx)
the_node->previous = old_last_node;
10d91a: 89 48 04 mov %ecx,0x4(%eax)
_ISR_Flash( level );
10d91d: 53 push %ebx
10d91e: 9d popf
10d91f: fa cli
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
10d920: 8b 50 14 mov 0x14(%eax),%edx
10d923: 8b 0d 48 95 12 00 mov 0x129548,%ecx
10d929: 3b 51 14 cmp 0x14(%ecx),%edx
10d92c: 73 1a jae 10d948 <_Thread_Clear_state+0x84>
_Thread_Heir = the_thread;
10d92e: a3 48 95 12 00 mov %eax,0x129548
if ( _Thread_Executing->is_preemptible ||
10d933: a1 78 95 12 00 mov 0x129578,%eax
10d938: 80 78 75 00 cmpb $0x0,0x75(%eax)
10d93c: 74 12 je 10d950 <_Thread_Clear_state+0x8c>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
10d93e: c6 05 88 95 12 00 01 movb $0x1,0x129588
10d945: 8d 76 00 lea 0x0(%esi),%esi
}
}
}
_ISR_Enable( level );
10d948: 53 push %ebx
10d949: 9d popf
}
10d94a: 5b pop %ebx
10d94b: c9 leave
10d94c: c3 ret
10d94d: 8d 76 00 lea 0x0(%esi),%esi
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
10d950: 85 d2 test %edx,%edx
10d952: 74 ea je 10d93e <_Thread_Clear_state+0x7a><== NEVER TAKEN
10d954: eb f2 jmp 10d948 <_Thread_Clear_state+0x84>
0010d958 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
10d958: 55 push %ebp
10d959: 89 e5 mov %esp,%ebp
10d95b: 56 push %esi
10d95c: 53 push %ebx
10d95d: 8b 75 08 mov 0x8(%ebp),%esi
10d960: 8b 5d 0c mov 0xc(%ebp),%ebx
10d963: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10d967: 8b 46 1c mov 0x1c(%esi),%eax
10d96a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10d971: a1 b8 94 12 00 mov 0x1294b8,%eax
10d976: 48 dec %eax
10d977: a3 b8 94 12 00 mov %eax,0x1294b8
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
10d97c: 83 ec 0c sub $0xc,%esp
10d97f: 53 push %ebx
10d980: e8 9b 11 00 00 call 10eb20 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d985: a1 b8 94 12 00 mov 0x1294b8,%eax
10d98a: 40 inc %eax
10d98b: a3 b8 94 12 00 mov %eax,0x1294b8
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
10d990: 59 pop %ecx
10d991: 58 pop %eax
10d992: 53 push %ebx
10d993: 56 push %esi
10d994: e8 2b f6 ff ff call 10cfc4 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
10d999: 58 pop %eax
10d99a: 5a pop %edx
10d99b: 6a 01 push $0x1
10d99d: 53 push %ebx
10d99e: e8 b5 0b 00 00 call 10e558 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
10d9a3: 89 1c 24 mov %ebx,(%esp)
10d9a6: e8 01 0a 00 00 call 10e3ac <_Thread_queue_Extract_with_proxy>
10d9ab: 83 c4 10 add $0x10,%esp
10d9ae: 84 c0 test %al,%al
10d9b0: 75 06 jne 10d9b8 <_Thread_Close+0x60>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
10d9b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10d9b6: 74 68 je 10da20 <_Thread_Close+0xc8>
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
10d9b8: 3b 1d 40 95 12 00 cmp 0x129540,%ebx
10d9be: 74 74 je 10da34 <_Thread_Close+0xdc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
10d9c0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10d9c7: 00 00 00
if ( the_thread->Start.fp_context )
10d9ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10d9d0: 85 c0 test %eax,%eax
10d9d2: 74 0c je 10d9e0 <_Thread_Close+0x88>
(void) _Workspace_Free( the_thread->Start.fp_context );
10d9d4: 83 ec 0c sub $0xc,%esp
10d9d7: 50 push %eax
10d9d8: e8 5b 14 00 00 call 10ee38 <_Workspace_Free>
10d9dd: 83 c4 10 add $0x10,%esp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
10d9e0: 83 ec 0c sub $0xc,%esp
10d9e3: 53 push %ebx
10d9e4: e8 23 0d 00 00 call 10e70c <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
10d9e9: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx)
10d9f0: 00 00 00
if ( the_thread->extensions )
10d9f3: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax
10d9f9: 83 c4 10 add $0x10,%esp
10d9fc: 85 c0 test %eax,%eax
10d9fe: 74 0c je 10da0c <_Thread_Close+0xb4>
(void) _Workspace_Free( the_thread->extensions );
10da00: 83 ec 0c sub $0xc,%esp
10da03: 50 push %eax
10da04: e8 2f 14 00 00 call 10ee38 <_Workspace_Free>
10da09: 83 c4 10 add $0x10,%esp
the_thread->extensions = NULL;
10da0c: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10da13: 00 00 00
}
10da16: 8d 65 f8 lea -0x8(%ebp),%esp
10da19: 5b pop %ebx
10da1a: 5e pop %esi
10da1b: c9 leave
10da1c: c3 ret
10da1d: 8d 76 00 lea 0x0(%esi),%esi
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
10da20: 83 ec 0c sub $0xc,%esp
10da23: 8d 43 48 lea 0x48(%ebx),%eax
10da26: 50 push %eax
10da27: e8 ec 12 00 00 call 10ed18 <_Watchdog_Remove>
10da2c: 83 c4 10 add $0x10,%esp
10da2f: eb 87 jmp 10d9b8 <_Thread_Close+0x60>
10da31: 8d 76 00 lea 0x0(%esi),%esi
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
10da34: c7 05 40 95 12 00 00 movl $0x0,0x129540
10da3b: 00 00 00
10da3e: eb 80 jmp 10d9c0 <_Thread_Close+0x68>
0010dad4 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10dad4: 55 push %ebp
10dad5: 89 e5 mov %esp,%ebp
10dad7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10dada: 8d 45 f4 lea -0xc(%ebp),%eax
10dadd: 50 push %eax
10dade: ff 75 08 pushl 0x8(%ebp)
10dae1: e8 aa 01 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10dae6: 83 c4 10 add $0x10,%esp
10dae9: 8b 55 f4 mov -0xc(%ebp),%edx
10daec: 85 d2 test %edx,%edx
10daee: 75 1c jne 10db0c <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10daf0: 83 ec 08 sub $0x8,%esp
10daf3: 68 18 00 00 10 push $0x10000018
10daf8: 50 push %eax
10daf9: e8 c6 fd ff ff call 10d8c4 <_Thread_Clear_state>
10dafe: a1 b8 94 12 00 mov 0x1294b8,%eax
10db03: 48 dec %eax
10db04: a3 b8 94 12 00 mov %eax,0x1294b8
10db09: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10db0c: c9 leave
10db0d: c3 ret
0010db10 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10db10: 55 push %ebp
10db11: 89 e5 mov %esp,%ebp
10db13: 57 push %edi
10db14: 56 push %esi
10db15: 53 push %ebx
10db16: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10db19: 8b 1d 78 95 12 00 mov 0x129578,%ebx
_ISR_Disable( level );
10db1f: 9c pushf
10db20: fa cli
10db21: 58 pop %eax
while ( _Context_Switch_necessary == true ) {
10db22: 8a 15 88 95 12 00 mov 0x129588,%dl
10db28: 84 d2 test %dl,%dl
10db2a: 0f 84 10 01 00 00 je 10dc40 <_Thread_Dispatch+0x130>
10db30: 8d 7d d8 lea -0x28(%ebp),%edi
10db33: e9 d1 00 00 00 jmp 10dc09 <_Thread_Dispatch+0xf9>
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
10db38: 50 push %eax
10db39: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10db3a: 83 ec 0c sub $0xc,%esp
10db3d: 8d 45 e0 lea -0x20(%ebp),%eax
10db40: 50 push %eax
10db41: e8 fa 46 00 00 call 112240 <_TOD_Get_uptime>
_Timestamp_Subtract(
10db46: 83 c4 0c add $0xc,%esp
10db49: 57 push %edi
10db4a: 8d 45 e0 lea -0x20(%ebp),%eax
10db4d: 50 push %eax
10db4e: 68 80 95 12 00 push $0x129580
10db53: e8 b8 0d 00 00 call 10e910 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10db58: 5a pop %edx
10db59: 59 pop %ecx
10db5a: 57 push %edi
10db5b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10db61: 50 push %eax
10db62: e8 6d 0d 00 00 call 10e8d4 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10db67: 8b 45 e0 mov -0x20(%ebp),%eax
10db6a: 8b 55 e4 mov -0x1c(%ebp),%edx
10db6d: a3 80 95 12 00 mov %eax,0x129580
10db72: 89 15 84 95 12 00 mov %edx,0x129584
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10db78: a1 44 95 12 00 mov 0x129544,%eax
10db7d: 83 c4 10 add $0x10,%esp
10db80: 85 c0 test %eax,%eax
10db82: 74 10 je 10db94 <_Thread_Dispatch+0x84> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10db84: 8b 10 mov (%eax),%edx
10db86: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10db8c: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx
10db92: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10db94: 83 ec 08 sub $0x8,%esp
10db97: 56 push %esi
10db98: 53 push %ebx
10db99: e8 02 10 00 00 call 10eba0 <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10db9e: 59 pop %ecx
10db9f: 58 pop %eax
10dba0: 81 c6 d4 00 00 00 add $0xd4,%esi
10dba6: 56 push %esi
10dba7: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax
10dbad: 50 push %eax
10dbae: e8 ed 12 00 00 call 10eea0 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10dbb3: 83 c4 10 add $0x10,%esp
10dbb6: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx
10dbbc: 85 d2 test %edx,%edx
10dbbe: 74 36 je 10dbf6 <_Thread_Dispatch+0xe6>
#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 );
10dbc0: a1 40 95 12 00 mov 0x129540,%eax
10dbc5: 39 c3 cmp %eax,%ebx
10dbc7: 74 2d je 10dbf6 <_Thread_Dispatch+0xe6>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10dbc9: 85 c0 test %eax,%eax
10dbcb: 74 11 je 10dbde <_Thread_Dispatch+0xce>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10dbcd: 83 ec 0c sub $0xc,%esp
10dbd0: 05 ec 00 00 00 add $0xec,%eax
10dbd5: 50 push %eax
10dbd6: e8 f9 12 00 00 call 10eed4 <_CPU_Context_save_fp>
10dbdb: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10dbde: 83 ec 0c sub $0xc,%esp
10dbe1: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax
10dbe7: 50 push %eax
10dbe8: e8 f1 12 00 00 call 10eede <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10dbed: 89 1d 40 95 12 00 mov %ebx,0x129540
10dbf3: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10dbf6: 8b 1d 78 95 12 00 mov 0x129578,%ebx
_ISR_Disable( level );
10dbfc: 9c pushf
10dbfd: fa cli
10dbfe: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
10dbff: 8a 15 88 95 12 00 mov 0x129588,%dl
10dc05: 84 d2 test %dl,%dl
10dc07: 74 37 je 10dc40 <_Thread_Dispatch+0x130>
heir = _Thread_Heir;
10dc09: 8b 35 48 95 12 00 mov 0x129548,%esi
_Thread_Dispatch_disable_level = 1;
10dc0f: c7 05 b8 94 12 00 01 movl $0x1,0x1294b8
10dc16: 00 00 00
_Context_Switch_necessary = false;
10dc19: c6 05 88 95 12 00 00 movb $0x0,0x129588
_Thread_Executing = heir;
10dc20: 89 35 78 95 12 00 mov %esi,0x129578
#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 )
10dc26: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10dc2a: 0f 85 08 ff ff ff jne 10db38 <_Thread_Dispatch+0x28>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10dc30: 8b 15 84 94 12 00 mov 0x129484,%edx
10dc36: 89 56 78 mov %edx,0x78(%esi)
10dc39: e9 fa fe ff ff jmp 10db38 <_Thread_Dispatch+0x28>
10dc3e: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
10dc40: c7 05 b8 94 12 00 00 movl $0x0,0x1294b8
10dc47: 00 00 00
_ISR_Enable( level );
10dc4a: 50 push %eax
10dc4b: 9d popf
if ( _Thread_Do_post_task_switch_extension ||
10dc4c: a1 5c 95 12 00 mov 0x12955c,%eax
10dc51: 85 c0 test %eax,%eax
10dc53: 75 06 jne 10dc5b <_Thread_Dispatch+0x14b>
executing->do_post_task_switch_extension ) {
10dc55: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10dc59: 74 09 je 10dc64 <_Thread_Dispatch+0x154>
executing->do_post_task_switch_extension = false;
10dc5b: c6 43 74 00 movb $0x0,0x74(%ebx)
_API_extensions_Run_postswitch();
10dc5f: e8 3c e8 ff ff call 10c4a0 <_API_extensions_Run_postswitch>
}
}
10dc64: 8d 65 f4 lea -0xc(%ebp),%esp
10dc67: 5b pop %ebx
10dc68: 5e pop %esi
10dc69: 5f pop %edi
10dc6a: c9 leave
10dc6b: c3 ret
00114df4 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
114df4: 55 push %ebp
114df5: 89 e5 mov %esp,%ebp
Thread_Control *executing;
executing = _Thread_Executing;
114df7: a1 78 95 12 00 mov 0x129578,%eax
if ( !_States_Is_ready( executing->current_state ) ||
114dfc: 8b 50 10 mov 0x10(%eax),%edx
114dff: 85 d2 test %edx,%edx
114e01: 75 0e jne 114e11 <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN
114e03: 3b 05 48 95 12 00 cmp 0x129548,%eax
114e09: 74 11 je 114e1c <_Thread_Evaluate_mode+0x28>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
114e0b: 80 78 75 00 cmpb $0x0,0x75(%eax)
114e0f: 74 0b je 114e1c <_Thread_Evaluate_mode+0x28><== NEVER TAKEN
_Context_Switch_necessary = true;
114e11: c6 05 88 95 12 00 01 movb $0x1,0x129588
114e18: b0 01 mov $0x1,%al
return true;
}
return false;
}
114e1a: c9 leave
114e1b: c3 ret
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
114e1c: 31 c0 xor %eax,%eax
}
return false;
}
114e1e: c9 leave
114e1f: c3 ret
0010dc90 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10dc90: 55 push %ebp
10dc91: 89 e5 mov %esp,%ebp
10dc93: 53 push %ebx
10dc94: 83 ec 04 sub $0x4,%esp
10dc97: 8b 45 08 mov 0x8(%ebp),%eax
10dc9a: 8b 4d 0c mov 0xc(%ebp),%ecx
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
10dc9d: 85 c0 test %eax,%eax
10dc9f: 74 4b je 10dcec <_Thread_Get+0x5c>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
10dca1: 89 c2 mov %eax,%edx
10dca3: c1 ea 18 shr $0x18,%edx
10dca6: 83 e2 07 and $0x7,%edx
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
10dca9: 8d 5a ff lea -0x1(%edx),%ebx
10dcac: 83 fb 03 cmp $0x3,%ebx
10dcaf: 77 2b ja 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
10dcb1: 89 c3 mov %eax,%ebx
10dcb3: c1 eb 1b shr $0x1b,%ebx
10dcb6: 4b dec %ebx
10dcb7: 75 23 jne 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10dcb9: 8b 14 95 8c 94 12 00 mov 0x12948c(,%edx,4),%edx
if ( !api_information ) {
10dcc0: 85 d2 test %edx,%edx
10dcc2: 74 18 je 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10dcc4: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10dcc7: 85 d2 test %edx,%edx
10dcc9: 74 11 je 10dcdc <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10dccb: 53 push %ebx
10dccc: 51 push %ecx
10dccd: 50 push %eax
10dcce: 52 push %edx
10dccf: e8 24 f7 ff ff call 10d3f8 <_Objects_Get>
10dcd4: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10dcd7: 8b 5d fc mov -0x4(%ebp),%ebx
10dcda: c9 leave
10dcdb: c3 ret
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10dcdc: c7 01 01 00 00 00 movl $0x1,(%ecx)
10dce2: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10dce4: 8b 5d fc mov -0x4(%ebp),%ebx
10dce7: c9 leave
10dce8: c3 ret
10dce9: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10dcec: a1 b8 94 12 00 mov 0x1294b8,%eax
10dcf1: 40 inc %eax
10dcf2: a3 b8 94 12 00 mov %eax,0x1294b8
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
10dcf7: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10dcfd: a1 78 95 12 00 mov 0x129578,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10dd02: 8b 5d fc mov -0x4(%ebp),%ebx
10dd05: c9 leave
10dd06: c3 ret
00114e20 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
114e20: 55 push %ebp
114e21: 89 e5 mov %esp,%ebp
114e23: 53 push %ebx
114e24: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
114e27: 8b 1d 78 95 12 00 mov 0x129578,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
114e2d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
_ISR_Set_level(level);
114e33: 85 c0 test %eax,%eax
114e35: 74 79 je 114eb0 <_Thread_Handler+0x90>
114e37: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
114e38: a0 14 91 12 00 mov 0x129114,%al
114e3d: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
114e40: c6 05 14 91 12 00 01 movb $0x1,0x129114
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
114e47: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax
114e4d: 85 c0 test %eax,%eax
114e4f: 74 24 je 114e75 <_Thread_Handler+0x55>
#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 );
114e51: a1 40 95 12 00 mov 0x129540,%eax
114e56: 39 c3 cmp %eax,%ebx
114e58: 74 1b je 114e75 <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
114e5a: 85 c0 test %eax,%eax
114e5c: 74 11 je 114e6f <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
114e5e: 83 ec 0c sub $0xc,%esp
114e61: 05 ec 00 00 00 add $0xec,%eax
114e66: 50 push %eax
114e67: e8 68 a0 ff ff call 10eed4 <_CPU_Context_save_fp>
114e6c: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
114e6f: 89 1d 40 95 12 00 mov %ebx,0x129540
/*
* 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 );
114e75: 83 ec 0c sub $0xc,%esp
114e78: 53 push %ebx
114e79: e8 92 9b ff ff call 10ea10 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
114e7e: e8 e9 8d ff ff call 10dc6c <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
114e83: 83 c4 10 add $0x10,%esp
114e86: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
114e8a: 74 28 je 114eb4 <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
114e8c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
114e92: 85 c0 test %eax,%eax
114e94: 74 2d je 114ec3 <_Thread_Handler+0xa3>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
114e96: 48 dec %eax
114e97: 74 43 je 114edc <_Thread_Handler+0xbc> <== 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 );
114e99: 83 ec 0c sub $0xc,%esp
114e9c: 53 push %ebx
114e9d: e8 aa 9b ff ff call 10ea4c <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
114ea2: 83 c4 0c add $0xc,%esp
114ea5: 6a 06 push $0x6
114ea7: 6a 01 push $0x1
114ea9: 6a 00 push $0x0
114eab: e8 00 80 ff ff call 10ceb0 <_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);
114eb0: fb sti
114eb1: eb 85 jmp 114e38 <_Thread_Handler+0x18>
114eb3: 90 nop
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
114eb4: e8 17 c0 00 00 call 120ed0 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
114eb9: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
114ebf: 85 c0 test %eax,%eax
114ec1: 75 d3 jne 114e96 <_Thread_Handler+0x76>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
114ec3: 83 ec 0c sub $0xc,%esp
114ec6: ff b3 a8 00 00 00 pushl 0xa8(%ebx)
114ecc: ff 93 9c 00 00 00 call *0x9c(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
114ed2: 89 43 28 mov %eax,0x28(%ebx)
114ed5: 83 c4 10 add $0x10,%esp
114ed8: eb bf jmp 114e99 <_Thread_Handler+0x79>
114eda: 66 90 xchg %ax,%ax
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
114edc: 83 ec 0c sub $0xc,%esp
114edf: ff b3 a4 00 00 00 pushl 0xa4(%ebx)
114ee5: ff 93 9c 00 00 00 call *0x9c(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
114eeb: 89 43 28 mov %eax,0x28(%ebx)
114eee: 83 c4 10 add $0x10,%esp
114ef1: eb a6 jmp 114e99 <_Thread_Handler+0x79>
0010dd08 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10dd08: 55 push %ebp
10dd09: 89 e5 mov %esp,%ebp
10dd0b: 57 push %edi
10dd0c: 56 push %esi
10dd0d: 53 push %ebx
10dd0e: 83 ec 1c sub $0x1c,%esp
10dd11: 8b 5d 0c mov 0xc(%ebp),%ebx
10dd14: 8b 4d 10 mov 0x10(%ebp),%ecx
10dd17: 8b 7d 14 mov 0x14(%ebp),%edi
10dd1a: 8b 75 1c mov 0x1c(%ebp),%esi
10dd1d: 8a 55 18 mov 0x18(%ebp),%dl
10dd20: 8a 45 20 mov 0x20(%ebp),%al
10dd23: 88 45 df mov %al,-0x21(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10dd26: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
10dd2d: 00 00 00
10dd30: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx)
10dd37: 00 00 00
10dd3a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx)
10dd41: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10dd44: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10dd4b: 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 ) {
10dd4e: 85 c9 test %ecx,%ecx
10dd50: 0f 84 13 02 00 00 je 10df69 <_Thread_Initialize+0x261>
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;
10dd56: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx)
10dd5d: 89 f8 mov %edi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10dd5f: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx)
the_stack->size = size;
10dd65: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10dd6b: 84 d2 test %dl,%dl
10dd6d: 0f 85 89 01 00 00 jne 10defc <_Thread_Initialize+0x1f4>
10dd73: 31 c0 xor %eax,%eax
10dd75: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
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;
10dd7c: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
the_thread->Start.fp_context = fp_area;
10dd82: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10dd88: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10dd8f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10dd96: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10dd9d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10dda4: a1 58 95 12 00 mov 0x129558,%eax
10dda9: 85 c0 test %eax,%eax
10ddab: 0f 85 6b 01 00 00 jne 10df1c <_Thread_Initialize+0x214>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10ddb1: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx)
10ddb8: 00 00 00
10ddbb: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10ddc2: 8a 45 df mov -0x21(%ebp),%al
10ddc5: 88 83 ac 00 00 00 mov %al,0xac(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10ddcb: 8b 45 24 mov 0x24(%ebp),%eax
10ddce: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx)
the_thread->Start.budget_callout = budget_callout;
10ddd4: 8b 45 28 mov 0x28(%ebp),%eax
10ddd7: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
switch ( budget_algorithm ) {
10dddd: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10dde1: 75 08 jne 10ddeb <_Thread_Initialize+0xe3>
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;
10dde3: a1 84 94 12 00 mov 0x129484,%eax
10dde8: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10ddeb: 8b 45 2c mov 0x2c(%ebp),%eax
10ddee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
the_thread->current_state = STATES_DORMANT;
10ddf4: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10ddfb: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10de02: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
10de09: 89 73 18 mov %esi,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10de0c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx)
_Thread_Set_priority( the_thread, priority );
10de12: 83 ec 08 sub $0x8,%esp
10de15: 56 push %esi
10de16: 53 push %ebx
10de17: e8 d0 06 00 00 call 10e4ec <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10de1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10de23: 00 00 00
10de26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10de2d: 00 00 00
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10de30: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10de34: 8b 45 08 mov 0x8(%ebp),%eax
10de37: 8b 40 1c mov 0x1c(%eax),%eax
10de3a: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10de3d: 8b 45 30 mov 0x30(%ebp),%eax
10de40: 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 );
10de43: 89 1c 24 mov %ebx,(%esp)
10de46: e8 8d 0c 00 00 call 10ead8 <_User_extensions_Thread_create>
if ( extension_status )
10de4b: 83 c4 10 add $0x10,%esp
10de4e: 84 c0 test %al,%al
10de50: 0f 85 9a 00 00 00 jne 10def0 <_Thread_Initialize+0x1e8>
return true;
failed:
if ( the_thread->libc_reent )
10de56: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax
10de5c: 85 c0 test %eax,%eax
10de5e: 74 0c je 10de6c <_Thread_Initialize+0x164>
_Workspace_Free( the_thread->libc_reent );
10de60: 83 ec 0c sub $0xc,%esp
10de63: 50 push %eax
10de64: e8 cf 0f 00 00 call 10ee38 <_Workspace_Free>
10de69: 83 c4 10 add $0x10,%esp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10de6c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax
10de72: 85 c0 test %eax,%eax
10de74: 74 0c je 10de82 <_Thread_Initialize+0x17a>
_Workspace_Free( the_thread->API_Extensions[i] );
10de76: 83 ec 0c sub $0xc,%esp
10de79: 50 push %eax
10de7a: e8 b9 0f 00 00 call 10ee38 <_Workspace_Free>
10de7f: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10de82: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax
10de88: 85 c0 test %eax,%eax
10de8a: 74 0c je 10de98 <_Thread_Initialize+0x190>
_Workspace_Free( the_thread->API_Extensions[i] );
10de8c: 83 ec 0c sub $0xc,%esp
10de8f: 50 push %eax
10de90: e8 a3 0f 00 00 call 10ee38 <_Workspace_Free>
10de95: 83 c4 10 add $0x10,%esp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
10de98: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax
10de9e: 85 c0 test %eax,%eax
10dea0: 74 0c je 10deae <_Thread_Initialize+0x1a6><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
10dea2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10dea5: 50 push %eax <== NOT EXECUTED
10dea6: e8 8d 0f 00 00 call 10ee38 <_Workspace_Free> <== NOT EXECUTED
10deab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( extensions_area )
10deae: 8b 55 e4 mov -0x1c(%ebp),%edx
10deb1: 85 d2 test %edx,%edx
10deb3: 74 0e je 10dec3 <_Thread_Initialize+0x1bb>
(void) _Workspace_Free( extensions_area );
10deb5: 83 ec 0c sub $0xc,%esp
10deb8: ff 75 e4 pushl -0x1c(%ebp)
10debb: e8 78 0f 00 00 call 10ee38 <_Workspace_Free>
10dec0: 83 c4 10 add $0x10,%esp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
10dec3: 8b 45 e0 mov -0x20(%ebp),%eax
10dec6: 85 c0 test %eax,%eax
10dec8: 74 0e je 10ded8 <_Thread_Initialize+0x1d0>
(void) _Workspace_Free( fp_area );
10deca: 83 ec 0c sub $0xc,%esp
10decd: ff 75 e0 pushl -0x20(%ebp)
10ded0: e8 63 0f 00 00 call 10ee38 <_Workspace_Free>
10ded5: 83 c4 10 add $0x10,%esp
#endif
_Thread_Stack_Free( the_thread );
10ded8: 83 ec 0c sub $0xc,%esp
10dedb: 53 push %ebx
10dedc: e8 2b 08 00 00 call 10e70c <_Thread_Stack_Free>
10dee1: 31 c0 xor %eax,%eax
return false;
10dee3: 83 c4 10 add $0x10,%esp
}
10dee6: 8d 65 f4 lea -0xc(%ebp),%esp
10dee9: 5b pop %ebx
10deea: 5e pop %esi
10deeb: 5f pop %edi
10deec: c9 leave
10deed: c3 ret
10deee: 66 90 xchg %ax,%ax
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
10def0: b0 01 mov $0x1,%al
_Thread_Stack_Free( the_thread );
return false;
}
10def2: 8d 65 f4 lea -0xc(%ebp),%esp
10def5: 5b pop %ebx
10def6: 5e pop %esi
10def7: 5f pop %edi
10def8: c9 leave
10def9: c3 ret
10defa: 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 );
10defc: 83 ec 0c sub $0xc,%esp
10deff: 6a 6c push $0x6c
10df01: e8 16 0f 00 00 call 10ee1c <_Workspace_Allocate>
10df06: 89 45 e0 mov %eax,-0x20(%ebp)
if ( !fp_area )
10df09: 83 c4 10 add $0x10,%esp
10df0c: 85 c0 test %eax,%eax
10df0e: 0f 84 89 00 00 00 je 10df9d <_Thread_Initialize+0x295>
10df14: 8b 45 e0 mov -0x20(%ebp),%eax
10df17: e9 60 fe ff ff jmp 10dd7c <_Thread_Initialize+0x74>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10df1c: 83 ec 0c sub $0xc,%esp
10df1f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10df26: 50 push %eax
10df27: e8 f0 0e 00 00 call 10ee1c <_Workspace_Allocate>
10df2c: 89 45 e4 mov %eax,-0x1c(%ebp)
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10df2f: 83 c4 10 add $0x10,%esp
10df32: 85 c0 test %eax,%eax
10df34: 0f 84 1c ff ff ff je 10de56 <_Thread_Initialize+0x14e>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10df3a: 89 c1 mov %eax,%ecx
10df3c: 89 83 00 01 00 00 mov %eax,0x100(%ebx)
* 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++ )
10df42: 8b 3d 58 95 12 00 mov 0x129558,%edi
10df48: 31 d2 xor %edx,%edx
10df4a: 31 c0 xor %eax,%eax
10df4c: eb 08 jmp 10df56 <_Thread_Initialize+0x24e>
10df4e: 66 90 xchg %ax,%ax
10df50: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx
the_thread->extensions[i] = NULL;
10df56: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,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++ )
10df5d: 40 inc %eax
10df5e: 89 c2 mov %eax,%edx
10df60: 39 c7 cmp %eax,%edi
10df62: 73 ec jae 10df50 <_Thread_Initialize+0x248>
10df64: e9 59 fe ff ff jmp 10ddc2 <_Thread_Initialize+0xba>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
10df69: 83 ec 08 sub $0x8,%esp
10df6c: 57 push %edi
10df6d: 53 push %ebx
10df6e: 88 55 d8 mov %dl,-0x28(%ebp)
10df71: e8 32 07 00 00 call 10e6a8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10df76: 83 c4 10 add $0x10,%esp
10df79: 85 c0 test %eax,%eax
10df7b: 8a 55 d8 mov -0x28(%ebp),%dl
10df7e: 74 16 je 10df96 <_Thread_Initialize+0x28e>
10df80: 39 c7 cmp %eax,%edi
10df82: 77 12 ja 10df96 <_Thread_Initialize+0x28e><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10df84: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10df8a: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx)
10df91: e9 c9 fd ff ff jmp 10dd5f <_Thread_Initialize+0x57>
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
10df96: 31 c0 xor %eax,%eax
10df98: e9 49 ff ff ff jmp 10dee6 <_Thread_Initialize+0x1de>
* 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 );
if ( !fp_area )
10df9d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10dfa4: e9 ad fe ff ff jmp 10de56 <_Thread_Initialize+0x14e>
00113584 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
113584: 55 push %ebp
113585: 89 e5 mov %esp,%ebp
113587: 53 push %ebx
113588: 83 ec 10 sub $0x10,%esp
11358b: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
11358e: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
113595: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al
11359b: 88 43 75 mov %al,0x75(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
11359e: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
1135a4: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
1135a7: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax
1135ad: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
1135b3: 8b 45 0c mov 0xc(%ebp),%eax
1135b6: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
1135bc: 8b 45 10 mov 0x10(%ebp),%eax
1135bf: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
1135c5: 53 push %ebx
1135c6: e8 09 b9 ff ff call 10eed4 <_Thread_queue_Extract_with_proxy>
1135cb: 83 c4 10 add $0x10,%esp
1135ce: 84 c0 test %al,%al
1135d0: 75 06 jne 1135d8 <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
1135d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1135d6: 74 28 je 113600 <_Thread_Reset+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
1135d8: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax
1135de: 39 43 14 cmp %eax,0x14(%ebx)
1135e1: 74 15 je 1135f8 <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
1135e3: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
1135e6: 89 45 0c mov %eax,0xc(%ebp)
1135e9: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
1135ec: 8b 5d fc mov -0x4(%ebp),%ebx
1135ef: c9 leave
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
1135f0: e9 ab ba ff ff jmp 10f0a0 <_Thread_Set_priority>
1135f5: 8d 76 00 lea 0x0(%esi),%esi
}
}
1135f8: 8b 5d fc mov -0x4(%ebp),%ebx
1135fb: c9 leave
1135fc: c3 ret
1135fd: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
113600: 83 ec 0c sub $0xc,%esp
113603: 8d 43 48 lea 0x48(%ebx),%eax
113606: 50 push %eax
113607: e8 00 c3 ff ff call 10f90c <_Watchdog_Remove>
11360c: 83 c4 10 add $0x10,%esp
11360f: eb c7 jmp 1135d8 <_Thread_Reset+0x54>
001128fc <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
1128fc: 55 push %ebp
1128fd: 89 e5 mov %esp,%ebp
1128ff: 56 push %esi
112900: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
112901: a1 78 95 12 00 mov 0x129578,%eax
ready = executing->ready;
112906: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
11290c: 9c pushf
11290d: fa cli
11290e: 59 pop %ecx
if ( _Chain_Has_only_one_node( ready ) ) {
11290f: 8b 1a mov (%edx),%ebx
112911: 3b 5a 08 cmp 0x8(%edx),%ebx
112914: 74 3e je 112954 <_Thread_Reset_timeslice+0x58>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
112916: 8b 30 mov (%eax),%esi
previous = the_node->previous;
112918: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
11291b: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
11291e: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
112920: 8d 5a 04 lea 0x4(%edx),%ebx
112923: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
112925: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
112928: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
11292b: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
11292d: 89 58 04 mov %ebx,0x4(%eax)
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
112930: 51 push %ecx
112931: 9d popf
112932: fa cli
if ( _Thread_Is_heir( executing ) )
112933: 3b 05 48 95 12 00 cmp 0x129548,%eax
112939: 74 0d je 112948 <_Thread_Reset_timeslice+0x4c>
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
11293b: c6 05 88 95 12 00 01 movb $0x1,0x129588
_ISR_Enable( level );
112942: 51 push %ecx
112943: 9d popf
}
112944: 5b pop %ebx
112945: 5e pop %esi
112946: c9 leave
112947: c3 ret
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
112948: 8b 02 mov (%edx),%eax
11294a: a3 48 95 12 00 mov %eax,0x129548
11294f: eb ea jmp 11293b <_Thread_Reset_timeslice+0x3f>
112951: 8d 76 00 lea 0x0(%esi),%esi
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
112954: 51 push %ecx
112955: 9d popf
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
112956: 5b pop %ebx
112957: 5e pop %esi
112958: c9 leave
112959: c3 ret
00111870 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
111870: 55 push %ebp
111871: 89 e5 mov %esp,%ebp
111873: 53 push %ebx
111874: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
111877: 9c pushf
111878: fa cli
111879: 59 pop %ecx
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
11187a: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
11187d: f6 c2 02 test $0x2,%dl
111880: 74 6e je 1118f0 <_Thread_Resume+0x80> <== NEVER TAKEN
111882: 83 e2 fd and $0xfffffffd,%edx
current_state =
111885: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
111888: 85 d2 test %edx,%edx
11188a: 75 64 jne 1118f0 <_Thread_Resume+0x80>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
11188c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
111892: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx
111899: 66 09 1a or %bx,(%edx)
_Priority_Major_bit_map |= the_priority_map->ready_major;
11189c: 66 8b 15 0c ce 12 00 mov 0x12ce0c,%dx
1118a3: 0b 90 94 00 00 00 or 0x94(%eax),%edx
1118a9: 66 89 15 0c ce 12 00 mov %dx,0x12ce0c
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
1118b0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
1118b6: 8d 5a 04 lea 0x4(%edx),%ebx
1118b9: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
1118bb: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
1118be: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
1118c1: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
1118c3: 89 58 04 mov %ebx,0x4(%eax)
_ISR_Flash( level );
1118c6: 51 push %ecx
1118c7: 9d popf
1118c8: fa cli
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
1118c9: 8b 50 14 mov 0x14(%eax),%edx
1118cc: 8b 1d e8 cd 12 00 mov 0x12cde8,%ebx
1118d2: 3b 53 14 cmp 0x14(%ebx),%edx
1118d5: 73 19 jae 1118f0 <_Thread_Resume+0x80>
_Thread_Heir = the_thread;
1118d7: a3 e8 cd 12 00 mov %eax,0x12cde8
if ( _Thread_Executing->is_preemptible ||
1118dc: a1 18 ce 12 00 mov 0x12ce18,%eax
1118e1: 80 78 75 00 cmpb $0x0,0x75(%eax)
1118e5: 74 11 je 1118f8 <_Thread_Resume+0x88>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
1118e7: c6 05 28 ce 12 00 01 movb $0x1,0x12ce28
1118ee: 66 90 xchg %ax,%ax
}
}
}
_ISR_Enable( level );
1118f0: 51 push %ecx
1118f1: 9d popf
}
1118f2: 5b pop %ebx
1118f3: c9 leave
1118f4: c3 ret
1118f5: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
1118f8: 85 d2 test %edx,%edx
1118fa: 74 eb je 1118e7 <_Thread_Resume+0x77> <== NEVER TAKEN
1118fc: eb f2 jmp 1118f0 <_Thread_Resume+0x80>
0010e558 <_Thread_Set_state>:
void _Thread_Set_state(
Thread_Control *the_thread,
States_Control state
)
{
10e558: 55 push %ebp
10e559: 89 e5 mov %esp,%ebp
10e55b: 56 push %esi
10e55c: 53 push %ebx
10e55d: 8b 45 08 mov 0x8(%ebp),%eax
10e560: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
10e563: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e569: 9c pushf
10e56a: fa cli
10e56b: 59 pop %ecx
if ( !_States_Is_ready( the_thread->current_state ) ) {
10e56c: 8b 58 10 mov 0x10(%eax),%ebx
10e56f: 85 db test %ebx,%ebx
10e571: 75 2d jne 10e5a0 <_Thread_Set_state+0x48>
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = state;
10e573: 89 70 10 mov %esi,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
10e576: 8b 1a mov (%edx),%ebx
10e578: 3b 5a 08 cmp 0x8(%edx),%ebx
10e57b: 74 3b je 10e5b8 <_Thread_Set_state+0x60>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e57d: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
10e57f: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10e582: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
10e585: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
10e587: 51 push %ecx
10e588: 9d popf
10e589: fa cli
if ( _Thread_Is_heir( the_thread ) )
10e58a: 3b 05 48 95 12 00 cmp 0x129548,%eax
10e590: 74 62 je 10e5f4 <_Thread_Set_state+0x9c>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
10e592: 3b 05 78 95 12 00 cmp 0x129578,%eax
10e598: 74 12 je 10e5ac <_Thread_Set_state+0x54>
_Context_Switch_necessary = true;
_ISR_Enable( level );
10e59a: 51 push %ecx
10e59b: 9d popf
}
10e59c: 5b pop %ebx
10e59d: 5e pop %esi
10e59e: c9 leave
10e59f: c3 ret
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
10e5a0: 09 f3 or %esi,%ebx
10e5a2: 89 58 10 mov %ebx,0x10(%eax)
_States_Set( state, the_thread->current_state );
_ISR_Enable( level );
10e5a5: 51 push %ecx
10e5a6: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
10e5a7: 5b pop %ebx
10e5a8: 5e pop %esi
10e5a9: c9 leave
10e5aa: c3 ret
10e5ab: 90 nop
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
10e5ac: c6 05 88 95 12 00 01 movb $0x1,0x129588
10e5b3: eb e5 jmp 10e59a <_Thread_Set_state+0x42>
10e5b5: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e5b8: 8d 5a 04 lea 0x4(%edx),%ebx
10e5bb: 89 1a mov %ebx,(%edx)
the_chain->permanent_null = NULL;
10e5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
10e5c4: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10e5c7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
10e5cd: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx
10e5d4: 66 21 1a and %bx,(%edx)
the_thread->current_state = state;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
10e5d7: 66 83 3a 00 cmpw $0x0,(%edx)
10e5db: 75 aa jne 10e587 <_Thread_Set_state+0x2f>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
10e5dd: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx
10e5e4: 23 90 98 00 00 00 and 0x98(%eax),%edx
10e5ea: 66 89 15 6c 95 12 00 mov %dx,0x12956c
10e5f1: eb 94 jmp 10e587 <_Thread_Set_state+0x2f>
10e5f3: 90 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10e5f4: 66 8b 35 6c 95 12 00 mov 0x12956c,%si
10e5fb: 31 d2 xor %edx,%edx
10e5fd: 89 d3 mov %edx,%ebx
10e5ff: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10e603: 0f b7 db movzwl %bx,%ebx
10e606: 66 8b b4 1b 00 96 12 mov 0x129600(%ebx,%ebx,1),%si
10e60d: 00
10e60e: 66 0f bc d6 bsf %si,%dx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
10e612: c1 e3 04 shl $0x4,%ebx
10e615: 0f b7 d2 movzwl %dx,%edx
10e618: 8d 14 13 lea (%ebx,%edx,1),%edx
10e61b: 8d 1c 52 lea (%edx,%edx,2),%ebx
10e61e: 8b 15 80 94 12 00 mov 0x129480,%edx
10e624: 8b 14 9a mov (%edx,%ebx,4),%edx
10e627: 89 15 48 95 12 00 mov %edx,0x129548
10e62d: e9 60 ff ff ff jmp 10e592 <_Thread_Set_state+0x3a>
0010e6a8 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e6a8: 55 push %ebp
10e6a9: 89 e5 mov %esp,%ebp
10e6ab: 53 push %ebx
10e6ac: 83 ec 04 sub $0x4,%esp
10e6af: a1 d0 52 12 00 mov 0x1252d0,%eax
10e6b4: 8b 5d 0c mov 0xc(%ebp),%ebx
10e6b7: 39 c3 cmp %eax,%ebx
10e6b9: 73 02 jae 10e6bd <_Thread_Stack_Allocate+0x15>
10e6bb: 89 c3 mov %eax,%ebx
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( Configuration.stack_allocate_hook ) {
10e6bd: a1 00 53 12 00 mov 0x125300,%eax
10e6c2: 85 c0 test %eax,%eax
10e6c4: 74 32 je 10e6f8 <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e6c6: 83 ec 0c sub $0xc,%esp
10e6c9: 53 push %ebx
10e6ca: ff d0 call *%eax
10e6cc: 83 c4 10 add $0x10,%esp
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e6cf: 85 c0 test %eax,%eax
10e6d1: 74 11 je 10e6e4 <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e6d3: 8b 55 08 mov 0x8(%ebp),%edx
10e6d6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e6dc: 89 d8 mov %ebx,%eax
10e6de: 8b 5d fc mov -0x4(%ebp),%ebx
10e6e1: c9 leave
10e6e2: c3 ret
10e6e3: 90 nop
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
10e6e4: 31 db xor %ebx,%ebx
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e6e6: 8b 55 08 mov 0x8(%ebp),%edx
10e6e9: 89 82 d0 00 00 00 mov %eax,0xd0(%edx)
return the_stack_size;
}
10e6ef: 89 d8 mov %ebx,%eax
10e6f1: 8b 5d fc mov -0x4(%ebp),%ebx
10e6f4: c9 leave
10e6f5: c3 ret
10e6f6: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e6f8: 83 c3 10 add $0x10,%ebx
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
10e6fb: 83 ec 0c sub $0xc,%esp
10e6fe: 53 push %ebx
10e6ff: e8 18 07 00 00 call 10ee1c <_Workspace_Allocate>
10e704: 83 c4 10 add $0x10,%esp
10e707: eb c6 jmp 10e6cf <_Thread_Stack_Allocate+0x27>
0010e70c <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e70c: 55 push %ebp
10e70d: 89 e5 mov %esp,%ebp
10e70f: 83 ec 08 sub $0x8,%esp
10e712: 8b 45 08 mov 0x8(%ebp),%eax
#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 )
10e715: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax)
10e71c: 74 16 je 10e734 <_Thread_Stack_Free+0x28>
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
10e71e: 8b 15 04 53 12 00 mov 0x125304,%edx
10e724: 85 d2 test %edx,%edx
10e726: 74 10 je 10e738 <_Thread_Stack_Free+0x2c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e728: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e72e: 89 45 08 mov %eax,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e731: c9 leave
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e732: ff e2 jmp *%edx
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e734: c9 leave
10e735: c3 ret
10e736: 66 90 xchg %ax,%ax
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e738: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax
10e73e: 89 45 08 mov %eax,0x8(%ebp)
}
10e741: c9 leave
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e742: e9 f1 06 00 00 jmp 10ee38 <_Workspace_Free>
0011295c <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
11295c: 55 push %ebp
11295d: 89 e5 mov %esp,%ebp
11295f: 56 push %esi
112960: 53 push %ebx
112961: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
112964: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
11296a: 9c pushf
11296b: fa cli
11296c: 59 pop %ecx
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
11296d: 8b 58 10 mov 0x10(%eax),%ebx
112970: 85 db test %ebx,%ebx
112972: 75 34 jne 1129a8 <_Thread_Suspend+0x4c>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
112974: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
if ( _Chain_Has_only_one_node( ready ) ) {
11297b: 8b 1a mov (%edx),%ebx
11297d: 3b 5a 08 cmp 0x8(%edx),%ebx
112980: 74 3e je 1129c0 <_Thread_Suspend+0x64>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
112982: 8b 18 mov (%eax),%ebx
previous = the_node->previous;
112984: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
112987: 89 53 04 mov %edx,0x4(%ebx)
previous->next = next;
11298a: 89 1a mov %ebx,(%edx)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
11298c: 51 push %ecx
11298d: 9d popf
11298e: fa cli
if ( _Thread_Is_heir( the_thread ) )
11298f: 3b 05 48 95 12 00 cmp 0x129548,%eax
112995: 74 65 je 1129fc <_Thread_Suspend+0xa0>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
112997: 3b 05 78 95 12 00 cmp 0x129578,%eax
11299d: 74 15 je 1129b4 <_Thread_Suspend+0x58>
_Context_Switch_necessary = true;
_ISR_Enable( level );
11299f: 51 push %ecx
1129a0: 9d popf
}
1129a1: 5b pop %ebx
1129a2: 5e pop %esi
1129a3: c9 leave
1129a4: c3 ret
1129a5: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
1129a8: 83 cb 02 or $0x2,%ebx
1129ab: 89 58 10 mov %ebx,0x10(%eax)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
1129ae: 51 push %ecx
1129af: 9d popf
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
1129b0: 5b pop %ebx
1129b1: 5e pop %esi
1129b2: c9 leave
1129b3: c3 ret
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
1129b4: c6 05 88 95 12 00 01 movb $0x1,0x129588
1129bb: eb e2 jmp 11299f <_Thread_Suspend+0x43>
1129bd: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1129c0: 8d 5a 04 lea 0x4(%edx),%ebx
1129c3: 89 1a mov %ebx,(%edx)
the_chain->permanent_null = NULL;
1129c5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
the_chain->last = _Chain_Head(the_chain);
1129cc: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
1129cf: 8b 90 90 00 00 00 mov 0x90(%eax),%edx
1129d5: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx
1129dc: 66 21 1a and %bx,(%edx)
the_thread->current_state = STATES_SUSPENDED;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
1129df: 66 83 3a 00 cmpw $0x0,(%edx)
1129e3: 75 a7 jne 11298c <_Thread_Suspend+0x30>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
1129e5: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx
1129ec: 23 90 98 00 00 00 and 0x98(%eax),%edx
1129f2: 66 89 15 6c 95 12 00 mov %dx,0x12956c
1129f9: eb 91 jmp 11298c <_Thread_Suspend+0x30>
1129fb: 90 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
1129fc: 66 8b 35 6c 95 12 00 mov 0x12956c,%si
112a03: 31 d2 xor %edx,%edx
112a05: 89 d3 mov %edx,%ebx
112a07: 66 0f bc de bsf %si,%bx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
112a0b: 0f b7 db movzwl %bx,%ebx
112a0e: 66 8b b4 1b 00 96 12 mov 0x129600(%ebx,%ebx,1),%si
112a15: 00
112a16: 66 0f bc d6 bsf %si,%dx
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
112a1a: c1 e3 04 shl $0x4,%ebx
112a1d: 0f b7 d2 movzwl %dx,%edx
112a20: 8d 14 13 lea (%ebx,%edx,1),%edx
112a23: 8d 1c 52 lea (%edx,%edx,2),%ebx
112a26: 8b 15 80 94 12 00 mov 0x129480,%edx
112a2c: 8b 14 9a mov (%edx,%ebx,4),%edx
112a2f: 89 15 48 95 12 00 mov %edx,0x129548
112a35: e9 5d ff ff ff jmp 112997 <_Thread_Suspend+0x3b>
0010e804 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e804: 55 push %ebp
10e805: 89 e5 mov %esp,%ebp
10e807: 53 push %ebx
10e808: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e80b: 8b 1d 78 95 12 00 mov 0x129578,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e811: 80 7b 75 00 cmpb $0x0,0x75(%ebx)
10e815: 74 19 je 10e830 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e817: 8b 43 10 mov 0x10(%ebx),%eax
10e81a: 85 c0 test %eax,%eax
10e81c: 75 12 jne 10e830 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e81e: 8b 43 7c mov 0x7c(%ebx),%eax
10e821: 83 f8 01 cmp $0x1,%eax
10e824: 72 0a jb 10e830 <_Thread_Tickle_timeslice+0x2c>
10e826: 83 f8 02 cmp $0x2,%eax
10e829: 76 29 jbe 10e854 <_Thread_Tickle_timeslice+0x50>
10e82b: 83 f8 03 cmp $0x3,%eax
10e82e: 74 08 je 10e838 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e830: 8b 5d fc mov -0x4(%ebp),%ebx
10e833: c9 leave
10e834: c3 ret
10e835: 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 )
10e838: 8b 43 78 mov 0x78(%ebx),%eax
10e83b: 48 dec %eax
10e83c: 89 43 78 mov %eax,0x78(%ebx)
10e83f: 85 c0 test %eax,%eax
10e841: 75 ed jne 10e830 <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10e843: 83 ec 0c sub $0xc,%esp
10e846: 53 push %ebx
10e847: ff 93 80 00 00 00 call *0x80(%ebx)
10e84d: 83 c4 10 add $0x10,%esp
10e850: eb de jmp 10e830 <_Thread_Tickle_timeslice+0x2c>
10e852: 66 90 xchg %ax,%ax
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 ) {
10e854: 8b 43 78 mov 0x78(%ebx),%eax
10e857: 48 dec %eax
10e858: 89 43 78 mov %eax,0x78(%ebx)
10e85b: 85 c0 test %eax,%eax
10e85d: 7f d1 jg 10e830 <_Thread_Tickle_timeslice+0x2c>
_Thread_Reset_timeslice();
10e85f: e8 98 40 00 00 call 1128fc <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e864: a1 84 94 12 00 mov 0x129484,%eax
10e869: 89 43 78 mov %eax,0x78(%ebx)
10e86c: eb c2 jmp 10e830 <_Thread_Tickle_timeslice+0x2c>
0010e870 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
10e870: 55 push %ebp
10e871: 89 e5 mov %esp,%ebp
10e873: 56 push %esi
10e874: 53 push %ebx
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10e875: a1 78 95 12 00 mov 0x129578,%eax
ready = executing->ready;
10e87a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
_ISR_Disable( level );
10e880: 9c pushf
10e881: fa cli
10e882: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10e883: 8b 1a mov (%edx),%ebx
10e885: 3b 5a 08 cmp 0x8(%edx),%ebx
10e888: 74 3e je 10e8c8 <_Thread_Yield_processor+0x58>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10e88a: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10e88c: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10e88f: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10e892: 89 33 mov %esi,(%ebx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
10e894: 8d 5a 04 lea 0x4(%edx),%ebx
10e897: 89 18 mov %ebx,(%eax)
old_last_node = the_chain->last;
10e899: 8b 5a 08 mov 0x8(%edx),%ebx
the_chain->last = the_node;
10e89c: 89 42 08 mov %eax,0x8(%edx)
old_last_node->next = the_node;
10e89f: 89 03 mov %eax,(%ebx)
the_node->previous = old_last_node;
10e8a1: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10e8a4: 51 push %ecx
10e8a5: 9d popf
10e8a6: fa cli
if ( _Thread_Is_heir( executing ) )
10e8a7: 3b 05 48 95 12 00 cmp 0x129548,%eax
10e8ad: 74 0d je 10e8bc <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
10e8af: c6 05 88 95 12 00 01 movb $0x1,0x129588
_ISR_Enable( level );
10e8b6: 51 push %ecx
10e8b7: 9d popf
}
10e8b8: 5b pop %ebx
10e8b9: 5e pop %esi
10e8ba: c9 leave
10e8bb: c3 ret
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
10e8bc: 8b 02 mov (%edx),%eax
10e8be: a3 48 95 12 00 mov %eax,0x129548
10e8c3: eb ea jmp 10e8af <_Thread_Yield_processor+0x3f>
10e8c5: 8d 76 00 lea 0x0(%esi),%esi
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10e8c8: 3b 05 48 95 12 00 cmp 0x129548,%eax
10e8ce: 75 df jne 10e8af <_Thread_Yield_processor+0x3f><== NEVER TAKEN
10e8d0: eb e4 jmp 10e8b6 <_Thread_Yield_processor+0x46>
0010e0d4 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10e0d4: 55 push %ebp
10e0d5: 89 e5 mov %esp,%ebp
10e0d7: 57 push %edi
10e0d8: 56 push %esi
10e0d9: 53 push %ebx
10e0da: 83 ec 1c sub $0x1c,%esp
10e0dd: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
10e0e0: 9c pushf
10e0e1: fa cli
10e0e2: 58 pop %eax
10e0e3: 89 f2 mov %esi,%edx
10e0e5: 31 c9 xor %ecx,%ecx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e0e7: 8d 5a 04 lea 0x4(%edx),%ebx
10e0ea: 39 1a cmp %ebx,(%edx)
10e0ec: 75 1a jne 10e108 <_Thread_queue_Dequeue_priority+0x34>
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10e0ee: 41 inc %ecx
10e0ef: 83 c2 0c add $0xc,%edx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10e0f2: 83 f9 04 cmp $0x4,%ecx
10e0f5: 75 f0 jne 10e0e7 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10e0f7: 50 push %eax
10e0f8: 9d popf
10e0f9: 31 db xor %ebx,%ebx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10e0fb: 89 d8 mov %ebx,%eax
10e0fd: 8d 65 f4 lea -0xc(%ebp),%esp
10e100: 5b pop %ebx
10e101: 5e pop %esi
10e102: 5f pop %edi
10e103: c9 leave
10e104: c3 ret
10e105: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *)
10e108: 8d 14 49 lea (%ecx,%ecx,2),%edx
10e10b: 8b 1c 96 mov (%esi,%edx,4),%ebx
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10e10e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
new_first_node = the_thread->Wait.Block2n.first;
10e115: 8b 53 38 mov 0x38(%ebx),%edx
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10e118: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10e11a: 8b 73 04 mov 0x4(%ebx),%esi
10e11d: 8d 7b 3c lea 0x3c(%ebx),%edi
10e120: 39 fa cmp %edi,%edx
10e122: 74 76 je 10e19a <_Thread_queue_Dequeue_priority+0xc6>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = the_thread->Wait.Block2n.last;
10e124: 8b 7b 40 mov 0x40(%ebx),%edi
10e127: 89 7d e4 mov %edi,-0x1c(%ebp)
new_second_node = new_first_node->next;
10e12a: 8b 3a mov (%edx),%edi
previous_node->next = new_first_node;
10e12c: 89 16 mov %edx,(%esi)
next_node->previous = new_first_node;
10e12e: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10e131: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10e133: 89 72 04 mov %esi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10e136: 8b 4b 38 mov 0x38(%ebx),%ecx
10e139: 3b 4b 40 cmp 0x40(%ebx),%ecx
10e13c: 74 14 je 10e152 <_Thread_queue_Dequeue_priority+0x7e>
/* > two threads on 2-n */
new_second_node->previous =
10e13e: 8d 4a 38 lea 0x38(%edx),%ecx
10e141: 89 4f 04 mov %ecx,0x4(%edi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
10e144: 89 7a 38 mov %edi,0x38(%edx)
new_first_thread->Wait.Block2n.last = last_node;
10e147: 8b 4d e4 mov -0x1c(%ebp),%ecx
10e14a: 89 4a 40 mov %ecx,0x40(%edx)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
10e14d: 83 c2 3c add $0x3c,%edx
10e150: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10e152: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10e156: 74 18 je 10e170 <_Thread_queue_Dequeue_priority+0x9c>
_ISR_Enable( level );
10e158: 50 push %eax
10e159: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10e15a: 83 ec 08 sub $0x8,%esp
10e15d: 68 f8 ff 03 10 push $0x1003fff8
10e162: 53 push %ebx
10e163: e8 5c f7 ff ff call 10d8c4 <_Thread_Clear_state>
10e168: 83 c4 10 add $0x10,%esp
10e16b: eb 8e jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27>
10e16d: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10e170: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10e177: 50 push %eax
10e178: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10e179: 83 ec 0c sub $0xc,%esp
10e17c: 8d 43 48 lea 0x48(%ebx),%eax
10e17f: 50 push %eax
10e180: e8 93 0b 00 00 call 10ed18 <_Watchdog_Remove>
10e185: 58 pop %eax
10e186: 5a pop %edx
10e187: 68 f8 ff 03 10 push $0x1003fff8
10e18c: 53 push %ebx
10e18d: e8 32 f7 ff ff call 10d8c4 <_Thread_Clear_state>
10e192: 83 c4 10 add $0x10,%esp
10e195: e9 61 ff ff ff jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27>
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
10e19a: 89 0e mov %ecx,(%esi)
next_node->previous = previous_node;
10e19c: 89 71 04 mov %esi,0x4(%ecx)
10e19f: eb b1 jmp 10e152 <_Thread_queue_Dequeue_priority+0x7e>
001126e0 <_Thread_queue_Enqueue_fifo>:
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
1126e0: 55 push %ebp
1126e1: 89 e5 mov %esp,%ebp
1126e3: 56 push %esi
1126e4: 53 push %ebx
1126e5: 8b 55 08 mov 0x8(%ebp),%edx
1126e8: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_blocking_operation_States sync_state;
ISR_Level level;
_ISR_Disable( level );
1126eb: 9c pushf
1126ec: fa cli
1126ed: 59 pop %ecx
sync_state = the_thread_queue->sync_state;
1126ee: 8b 42 30 mov 0x30(%edx),%eax
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
1126f1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
1126f8: 83 f8 01 cmp $0x1,%eax
1126fb: 74 0b je 112708 <_Thread_queue_Enqueue_fifo+0x28>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
1126fd: 8b 55 10 mov 0x10(%ebp),%edx
112700: 89 0a mov %ecx,(%edx)
return sync_state;
}
112702: 5b pop %ebx
112703: 5e pop %esi
112704: c9 leave
112705: c3 ret
112706: 66 90 xchg %ax,%ax
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
112708: 8d 72 04 lea 0x4(%edx),%esi
11270b: 89 33 mov %esi,(%ebx)
old_last_node = the_chain->last;
11270d: 8b 72 08 mov 0x8(%edx),%esi
the_chain->last = the_node;
112710: 89 5a 08 mov %ebx,0x8(%edx)
old_last_node->next = the_node;
112713: 89 1e mov %ebx,(%esi)
the_node->previous = old_last_node;
112715: 89 73 04 mov %esi,0x4(%ebx)
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
_Chain_Append_unprotected(
&the_thread_queue->Queues.Fifo,
&the_thread->Object.Node
);
the_thread->Wait.queue = the_thread_queue;
112718: 89 53 44 mov %edx,0x44(%ebx)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
_ISR_Enable( level );
11271b: 51 push %ecx
11271c: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return sync_state;
}
11271d: 5b pop %ebx
11271e: 5e pop %esi
11271f: c9 leave
112720: c3 ret
0010e23c <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
10e23c: 55 push %ebp
10e23d: 89 e5 mov %esp,%ebp
10e23f: 57 push %edi
10e240: 56 push %esi
10e241: 53 push %ebx
10e242: 83 ec 08 sub $0x8,%esp
10e245: 8b 7d 0c mov 0xc(%ebp),%edi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e248: 8d 47 3c lea 0x3c(%edi),%eax
10e24b: 89 47 38 mov %eax,0x38(%edi)
the_chain->permanent_null = NULL;
10e24e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi)
the_chain->last = _Chain_Head(the_chain);
10e255: 8d 47 38 lea 0x38(%edi),%eax
10e258: 89 47 40 mov %eax,0x40(%edi)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10e25b: 8b 57 14 mov 0x14(%edi),%edx
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
10e25e: 89 d0 mov %edx,%eax
10e260: c1 e8 06 shr $0x6,%eax
10e263: 8d 04 40 lea (%eax,%eax,2),%eax
10e266: 8b 4d 08 mov 0x8(%ebp),%ecx
10e269: 8d 34 81 lea (%ecx,%eax,4),%esi
block_state = the_thread_queue->state;
10e26c: 8b 59 38 mov 0x38(%ecx),%ebx
if ( _Thread_queue_Is_reverse_search( priority ) )
10e26f: f6 c2 20 test $0x20,%dl
10e272: 75 60 jne 10e2d4 <_Thread_queue_Enqueue_priority+0x98>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10e274: 8d 46 04 lea 0x4(%esi),%eax
10e277: 89 75 f0 mov %esi,-0x10(%ebp)
10e27a: 89 7d ec mov %edi,-0x14(%ebp)
10e27d: 89 c7 mov %eax,%edi
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
10e27f: 9c pushf
10e280: fa cli
10e281: 5e pop %esi
search_thread = (Thread_Control *) header->first;
10e282: 8b 4d f0 mov -0x10(%ebp),%ecx
10e285: 8b 01 mov (%ecx),%eax
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10e287: 39 f8 cmp %edi,%eax
10e289: 75 17 jne 10e2a2 <_Thread_queue_Enqueue_priority+0x66>
10e28b: e9 09 01 00 00 jmp 10e399 <_Thread_queue_Enqueue_priority+0x15d>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10e290: 56 push %esi
10e291: 9d popf
10e292: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10e293: 85 58 10 test %ebx,0x10(%eax)
10e296: 0f 84 a8 00 00 00 je 10e344 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10e29c: 8b 00 mov (%eax),%eax
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10e29e: 39 f8 cmp %edi,%eax
10e2a0: 74 07 je 10e2a9 <_Thread_queue_Enqueue_priority+0x6d>
search_priority = search_thread->current_priority;
10e2a2: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority <= search_priority )
10e2a5: 39 ca cmp %ecx,%edx
10e2a7: 77 e7 ja 10e290 <_Thread_queue_Enqueue_priority+0x54>
10e2a9: 89 4d f0 mov %ecx,-0x10(%ebp)
10e2ac: 8b 7d ec mov -0x14(%ebp),%edi
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10e2af: 89 f3 mov %esi,%ebx
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10e2b1: 8b 4d 08 mov 0x8(%ebp),%ecx
10e2b4: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10e2b8: 0f 84 8e 00 00 00 je 10e34c <_Thread_queue_Enqueue_priority+0x110>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
10e2be: 8b 45 10 mov 0x10(%ebp),%eax
10e2c1: 89 18 mov %ebx,(%eax)
return the_thread_queue->sync_state;
10e2c3: 8b 55 08 mov 0x8(%ebp),%edx
10e2c6: 8b 42 30 mov 0x30(%edx),%eax
}
10e2c9: 83 c4 08 add $0x8,%esp
10e2cc: 5b pop %ebx
10e2cd: 5e pop %esi
10e2ce: 5f pop %edi
10e2cf: c9 leave
10e2d0: c3 ret
10e2d1: 8d 76 00 lea 0x0(%esi),%esi
10e2d4: 89 7d f0 mov %edi,-0x10(%ebp)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
10e2d7: 0f b6 0d d4 52 12 00 movzbl 0x1252d4,%ecx
10e2de: 41 inc %ecx
_ISR_Disable( level );
10e2df: 9c pushf
10e2e0: fa cli
10e2e1: 5f pop %edi
search_thread = (Thread_Control *) header->last;
10e2e2: 8b 46 08 mov 0x8(%esi),%eax
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10e2e5: 39 f0 cmp %esi,%eax
10e2e7: 75 12 jne 10e2fb <_Thread_queue_Enqueue_priority+0xbf>
10e2e9: eb 17 jmp 10e302 <_Thread_queue_Enqueue_priority+0xc6>
10e2eb: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10e2ec: 57 push %edi
10e2ed: 9d popf
10e2ee: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10e2ef: 85 58 10 test %ebx,0x10(%eax)
10e2f2: 74 4c je 10e340 <_Thread_queue_Enqueue_priority+0x104><== NEVER TAKEN
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
10e2f4: 8b 40 04 mov 0x4(%eax),%eax
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10e2f7: 39 f0 cmp %esi,%eax
10e2f9: 74 07 je 10e302 <_Thread_queue_Enqueue_priority+0xc6>
search_priority = search_thread->current_priority;
10e2fb: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10e2fe: 39 ca cmp %ecx,%edx
10e300: 72 ea jb 10e2ec <_Thread_queue_Enqueue_priority+0xb0>
10e302: 89 fe mov %edi,%esi
10e304: 89 4d ec mov %ecx,-0x14(%ebp)
10e307: 8b 7d f0 mov -0x10(%ebp),%edi
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10e30a: 89 f3 mov %esi,%ebx
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10e30c: 8b 4d 08 mov 0x8(%ebp),%ecx
10e30f: 83 79 30 01 cmpl $0x1,0x30(%ecx)
10e313: 75 a9 jne 10e2be <_Thread_queue_Enqueue_priority+0x82>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e315: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10e31c: 3b 55 ec cmp -0x14(%ebp),%edx
10e31f: 74 56 je 10e377 <_Thread_queue_Enqueue_priority+0x13b>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10e321: 8b 10 mov (%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10e323: 89 17 mov %edx,(%edi)
the_node->previous = search_node;
10e325: 89 47 04 mov %eax,0x4(%edi)
search_node->next = the_node;
10e328: 89 38 mov %edi,(%eax)
next_node->previous = the_node;
10e32a: 89 7a 04 mov %edi,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10e32d: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10e330: 56 push %esi
10e331: 9d popf
10e332: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e337: 83 c4 08 add $0x8,%esp
10e33a: 5b pop %ebx
10e33b: 5e pop %esi
10e33c: 5f pop %edi
10e33d: c9 leave
10e33e: c3 ret
10e33f: 90 nop
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e340: 57 push %edi <== NOT EXECUTED
10e341: 9d popf <== NOT EXECUTED
goto restart_reverse_search;
10e342: eb 93 jmp 10e2d7 <_Thread_queue_Enqueue_priority+0x9b><== NOT EXECUTED
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e344: 56 push %esi <== NOT EXECUTED
10e345: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10e346: e9 34 ff ff ff jmp 10e27f <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED
10e34b: 90 nop <== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e34c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx)
if ( priority == search_priority )
10e353: 3b 55 f0 cmp -0x10(%ebp),%edx
10e356: 74 1f je 10e377 <_Thread_queue_Enqueue_priority+0x13b>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10e358: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10e35b: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10e35d: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e360: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e362: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10e365: 89 4f 44 mov %ecx,0x44(%edi)
_ISR_Enable( level );
10e368: 56 push %esi
10e369: 9d popf
10e36a: b8 01 00 00 00 mov $0x1,%eax
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e36f: 83 c4 08 add $0x8,%esp
10e372: 5b pop %ebx
10e373: 5e pop %esi
10e374: 5f pop %edi
10e375: c9 leave
10e376: c3 ret
10e377: 83 c0 3c add $0x3c,%eax
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
10e37a: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10e37d: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10e37f: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e382: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e384: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10e387: 8b 45 08 mov 0x8(%ebp),%eax
10e38a: 89 47 44 mov %eax,0x44(%edi)
_ISR_Enable( level );
10e38d: 53 push %ebx
10e38e: 9d popf
10e38f: b8 01 00 00 00 mov $0x1,%eax
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10e394: e9 30 ff ff ff jmp 10e2c9 <_Thread_queue_Enqueue_priority+0x8d>
10e399: 8b 7d ec mov -0x14(%ebp),%edi
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10e39c: 89 f3 mov %esi,%ebx
10e39e: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp)
10e3a5: e9 07 ff ff ff jmp 10e2b1 <_Thread_queue_Enqueue_priority+0x75>
00112724 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
112724: 55 push %ebp
112725: 89 e5 mov %esp,%ebp
112727: 83 ec 08 sub $0x8,%esp
11272a: 8b 45 08 mov 0x8(%ebp),%eax
11272d: 8b 55 0c mov 0xc(%ebp),%edx
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
112730: 83 78 34 01 cmpl $0x1,0x34(%eax)
112734: 74 0e je 112744 <_Thread_queue_Extract+0x20>
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
112736: 89 55 0c mov %edx,0xc(%ebp)
112739: 89 45 08 mov %eax,0x8(%ebp)
}
11273c: c9 leave
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
11273d: e9 b2 27 00 00 jmp 114ef4 <_Thread_queue_Extract_fifo>
112742: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
112744: 51 push %ecx
112745: 6a 00 push $0x0
112747: 52 push %edx
112748: 50 push %eax
112749: e8 06 00 00 00 call 112754 <_Thread_queue_Extract_priority_helper>
11274e: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
112751: c9 leave
112752: c3 ret
00114ef4 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
114ef4: 55 push %ebp
114ef5: 89 e5 mov %esp,%ebp
114ef7: 53 push %ebx
114ef8: 83 ec 04 sub $0x4,%esp
114efb: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
114efe: 9c pushf
114eff: fa cli
114f00: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
114f01: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
114f08: 74 2e je 114f38 <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
114f0a: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
114f0c: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
114f0f: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
114f12: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
114f14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
114f1b: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
114f1f: 74 1f je 114f40 <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
114f21: 50 push %eax
114f22: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
114f23: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
114f2a: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
114f2d: 8b 5d fc mov -0x4(%ebp),%ebx
114f30: c9 leave
114f31: e9 8e 89 ff ff jmp 10d8c4 <_Thread_Clear_state>
114f36: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
114f38: 50 push %eax
114f39: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
114f3a: 8b 5d fc mov -0x4(%ebp),%ebx
114f3d: c9 leave
114f3e: c3 ret
114f3f: 90 nop
114f40: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
114f47: 50 push %eax
114f48: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
114f49: 83 ec 0c sub $0xc,%esp
114f4c: 8d 43 48 lea 0x48(%ebx),%eax
114f4f: 50 push %eax
114f50: e8 c3 9d ff ff call 10ed18 <_Watchdog_Remove>
114f55: 83 c4 10 add $0x10,%esp
114f58: eb c9 jmp 114f23 <_Thread_queue_Extract_fifo+0x2f>
00112754 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
112754: 55 push %ebp
112755: 89 e5 mov %esp,%ebp
112757: 57 push %edi
112758: 56 push %esi
112759: 53 push %ebx
11275a: 83 ec 1c sub $0x1c,%esp
11275d: 8b 5d 0c mov 0xc(%ebp),%ebx
112760: 8a 45 10 mov 0x10(%ebp),%al
112763: 88 45 e3 mov %al,-0x1d(%ebp)
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
112766: 9c pushf
112767: fa cli
112768: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
11276b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
112772: 74 6c je 1127e0 <_Thread_queue_Extract_priority_helper+0x8c>
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
112774: 8b 13 mov (%ebx),%edx
previous_node = the_node->previous;
112776: 8b 4b 04 mov 0x4(%ebx),%ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
112779: 8b 43 38 mov 0x38(%ebx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11277c: 8d 73 3c lea 0x3c(%ebx),%esi
11277f: 39 f0 cmp %esi,%eax
112781: 74 69 je 1127ec <_Thread_queue_Extract_priority_helper+0x98>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
112783: 8b 7b 40 mov 0x40(%ebx),%edi
new_second_node = new_first_node->next;
112786: 8b 30 mov (%eax),%esi
previous_node->next = new_first_node;
112788: 89 01 mov %eax,(%ecx)
next_node->previous = new_first_node;
11278a: 89 42 04 mov %eax,0x4(%edx)
new_first_node->next = next_node;
11278d: 89 10 mov %edx,(%eax)
new_first_node->previous = previous_node;
11278f: 89 48 04 mov %ecx,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
112792: 8b 53 38 mov 0x38(%ebx),%edx
112795: 3b 53 40 cmp 0x40(%ebx),%edx
112798: 74 11 je 1127ab <_Thread_queue_Extract_priority_helper+0x57>
/* > two threads on 2-n */
new_second_node->previous =
11279a: 8d 50 38 lea 0x38(%eax),%edx
11279d: 89 56 04 mov %edx,0x4(%esi)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
1127a0: 89 70 38 mov %esi,0x38(%eax)
new_first_thread->Wait.Block2n.last = last_node;
1127a3: 89 78 40 mov %edi,0x40(%eax)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
1127a6: 83 c0 3c add $0x3c,%eax
1127a9: 89 07 mov %eax,(%edi)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
1127ab: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
1127af: 75 23 jne 1127d4 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
1127b1: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
1127b5: 74 3d je 1127f4 <_Thread_queue_Extract_priority_helper+0xa0>
_ISR_Enable( level );
1127b7: ff 75 e4 pushl -0x1c(%ebp)
1127ba: 9d popf
1127bb: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
1127c2: 89 5d 08 mov %ebx,0x8(%ebp)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1127c5: 8d 65 f4 lea -0xc(%ebp),%esp
1127c8: 5b pop %ebx
1127c9: 5e pop %esi
1127ca: 5f pop %edi
1127cb: c9 leave
1127cc: e9 f3 b0 ff ff jmp 10d8c4 <_Thread_Clear_state>
1127d1: 8d 76 00 lea 0x0(%esi),%esi
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
1127d4: ff 75 e4 pushl -0x1c(%ebp)
1127d7: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1127d8: 8d 65 f4 lea -0xc(%ebp),%esp
1127db: 5b pop %ebx
1127dc: 5e pop %esi
1127dd: 5f pop %edi
1127de: c9 leave
1127df: c3 ret
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
1127e0: ff 75 e4 pushl -0x1c(%ebp)
1127e3: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1127e4: 8d 65 f4 lea -0xc(%ebp),%esp
1127e7: 5b pop %ebx
1127e8: 5e pop %esi
1127e9: 5f pop %edi
1127ea: c9 leave
1127eb: c3 ret
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
1127ec: 89 11 mov %edx,(%ecx)
next_node->previous = previous_node;
1127ee: 89 4a 04 mov %ecx,0x4(%edx)
1127f1: eb b8 jmp 1127ab <_Thread_queue_Extract_priority_helper+0x57>
1127f3: 90 nop
1127f4: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
1127fb: ff 75 e4 pushl -0x1c(%ebp)
1127fe: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
1127ff: 83 ec 0c sub $0xc,%esp
112802: 8d 43 48 lea 0x48(%ebx),%eax
112805: 50 push %eax
112806: e8 0d c5 ff ff call 10ed18 <_Watchdog_Remove>
11280b: 83 c4 10 add $0x10,%esp
11280e: eb ab jmp 1127bb <_Thread_queue_Extract_priority_helper+0x67>
0010e3ac <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10e3ac: 55 push %ebp
10e3ad: 89 e5 mov %esp,%ebp
10e3af: 83 ec 08 sub $0x8,%esp
10e3b2: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
10e3b5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e3bc: 75 06 jne 10e3c4 <_Thread_queue_Extract_with_proxy+0x18>
10e3be: 31 c0 xor %eax,%eax
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
}
10e3c0: c9 leave
10e3c1: c3 ret
10e3c2: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10e3c4: 83 ec 08 sub $0x8,%esp
10e3c7: 50 push %eax
10e3c8: ff 70 44 pushl 0x44(%eax)
10e3cb: e8 54 43 00 00 call 112724 <_Thread_queue_Extract>
10e3d0: b0 01 mov $0x1,%al
return true;
10e3d2: 83 c4 10 add $0x10,%esp
}
return false;
}
10e3d5: c9 leave
10e3d6: c3 ret
001101f8 <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
1101f8: 55 push %ebp
1101f9: 89 e5 mov %esp,%ebp
1101fb: 83 ec 08 sub $0x8,%esp
1101fe: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
110201: 83 78 34 01 cmpl $0x1,0x34(%eax)
110205: 74 0d je 110214 <_Thread_queue_First+0x1c>
110207: ba ac 46 11 00 mov $0x1146ac,%edx
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11020c: 89 45 08 mov %eax,0x8(%ebp)
}
11020f: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
110210: ff e2 jmp *%edx
110212: 66 90 xchg %ax,%ax
Thread_queue_Control *the_thread_queue
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
110214: ba 20 02 11 00 mov $0x110220,%edx
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
110219: 89 45 08 mov %eax,0x8(%ebp)
}
11021c: c9 leave
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
11021d: ff e2 jmp *%edx
001146ac <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
1146ac: 55 push %ebp
1146ad: 89 e5 mov %esp,%ebp
1146af: 8b 55 08 mov 0x8(%ebp),%edx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1146b2: 8b 02 mov (%edx),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1146b4: 83 c2 04 add $0x4,%edx
1146b7: 39 d0 cmp %edx,%eax
1146b9: 74 05 je 1146c0 <_Thread_queue_First_fifo+0x14>
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
return NULL;
}
1146bb: c9 leave
1146bc: c3 ret
1146bd: 8d 76 00 lea 0x0(%esi),%esi
1146c0: 31 c0 xor %eax,%eax
1146c2: c9 leave
1146c3: c3 ret
0010e3d8 <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10e3d8: 55 push %ebp
10e3d9: 89 e5 mov %esp,%ebp
10e3db: 56 push %esi
10e3dc: 53 push %ebx
10e3dd: 8b 5d 08 mov 0x8(%ebp),%ebx
10e3e0: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e3e3: eb 06 jmp 10e3eb <_Thread_queue_Flush+0x13>
10e3e5: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10e3e8: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e3eb: 83 ec 0c sub $0xc,%esp
10e3ee: 53 push %ebx
10e3ef: e8 94 fc ff ff call 10e088 <_Thread_queue_Dequeue>
10e3f4: 83 c4 10 add $0x10,%esp
10e3f7: 85 c0 test %eax,%eax
10e3f9: 75 ed jne 10e3e8 <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10e3fb: 8d 65 f8 lea -0x8(%ebp),%esp
10e3fe: 5b pop %ebx
10e3ff: 5e pop %esi
10e400: c9 leave
10e401: c3 ret
00112810 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
112810: 55 push %ebp
112811: 89 e5 mov %esp,%ebp
112813: 83 ec 08 sub $0x8,%esp
112816: 8b 45 08 mov 0x8(%ebp),%eax
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
112819: 8b 50 44 mov 0x44(%eax),%edx
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
11281c: 8b 4a 30 mov 0x30(%edx),%ecx
11281f: 85 c9 test %ecx,%ecx
112821: 74 08 je 11282b <_Thread_queue_Process_timeout+0x1b>
112823: 3b 05 78 95 12 00 cmp 0x129578,%eax
112829: 74 19 je 112844 <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
11282b: 8b 52 3c mov 0x3c(%edx),%edx
11282e: 89 50 34 mov %edx,0x34(%eax)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
112831: 83 ec 08 sub $0x8,%esp
112834: 50 push %eax
112835: ff 70 44 pushl 0x44(%eax)
112838: e8 e7 fe ff ff call 112724 <_Thread_queue_Extract>
11283d: 83 c4 10 add $0x10,%esp
}
}
112840: c9 leave
112841: c3 ret
112842: 66 90 xchg %ax,%ax
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
112844: 83 f9 03 cmp $0x3,%ecx
112847: 74 f7 je 112840 <_Thread_queue_Process_timeout+0x30>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
112849: 8b 4a 3c mov 0x3c(%edx),%ecx
11284c: 89 48 34 mov %ecx,0x34(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
11284f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
112856: c9 leave
112857: c3 ret
0010e454 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e454: 55 push %ebp
10e455: 89 e5 mov %esp,%ebp
10e457: 57 push %edi
10e458: 56 push %esi
10e459: 53 push %ebx
10e45a: 83 ec 1c sub $0x1c,%esp
10e45d: 8b 75 08 mov 0x8(%ebp),%esi
10e460: 8b 7d 0c mov 0xc(%ebp),%edi
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
10e463: 85 f6 test %esi,%esi
10e465: 74 06 je 10e46d <_Thread_queue_Requeue+0x19><== 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 ) {
10e467: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10e46b: 74 0b je 10e478 <_Thread_queue_Requeue+0x24><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
10e46d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e470: 5b pop %ebx <== NOT EXECUTED
10e471: 5e pop %esi <== NOT EXECUTED
10e472: 5f pop %edi <== NOT EXECUTED
10e473: c9 leave <== NOT EXECUTED
10e474: c3 ret <== NOT EXECUTED
10e475: 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 );
10e478: 9c pushf
10e479: fa cli
10e47a: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e47b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10e482: 75 0c jne 10e490 <_Thread_queue_Requeue+0x3c><== 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 );
10e484: 53 push %ebx
10e485: 9d popf
}
}
10e486: 8d 65 f4 lea -0xc(%ebp),%esp
10e489: 5b pop %ebx
10e48a: 5e pop %esi
10e48b: 5f pop %edi
10e48c: c9 leave
10e48d: c3 ret
10e48e: 66 90 xchg %ax,%ax
10e490: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi)
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 );
10e497: 50 push %eax
10e498: 6a 01 push $0x1
10e49a: 57 push %edi
10e49b: 56 push %esi
10e49c: e8 b3 42 00 00 call 112754 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e4a1: 83 c4 0c add $0xc,%esp
10e4a4: 8d 45 e4 lea -0x1c(%ebp),%eax
10e4a7: 50 push %eax
10e4a8: 57 push %edi
10e4a9: 56 push %esi
10e4aa: e8 8d fd ff ff call 10e23c <_Thread_queue_Enqueue_priority>
10e4af: 83 c4 10 add $0x10,%esp
10e4b2: eb d0 jmp 10e484 <_Thread_queue_Requeue+0x30>
0010e4b4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e4b4: 55 push %ebp
10e4b5: 89 e5 mov %esp,%ebp
10e4b7: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e4ba: 8d 45 f4 lea -0xc(%ebp),%eax
10e4bd: 50 push %eax
10e4be: ff 75 08 pushl 0x8(%ebp)
10e4c1: e8 ca f7 ff ff call 10dc90 <_Thread_Get>
switch ( location ) {
10e4c6: 83 c4 10 add $0x10,%esp
10e4c9: 8b 55 f4 mov -0xc(%ebp),%edx
10e4cc: 85 d2 test %edx,%edx
10e4ce: 75 17 jne 10e4e7 <_Thread_queue_Timeout+0x33><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
10e4d0: 83 ec 0c sub $0xc,%esp
10e4d3: 50 push %eax
10e4d4: e8 37 43 00 00 call 112810 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e4d9: a1 b8 94 12 00 mov 0x1294b8,%eax
10e4de: 48 dec %eax
10e4df: a3 b8 94 12 00 mov %eax,0x1294b8
10e4e4: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e4e7: c9 leave
10e4e8: c3 ret
0011982c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
11982c: 55 push %ebp
11982d: 89 e5 mov %esp,%ebp
11982f: 57 push %edi
119830: 56 push %esi
119831: 53 push %ebx
119832: 83 ec 4c sub $0x4c,%esp
119835: 8b 5d 08 mov 0x8(%ebp),%ebx
119838: 8d 45 e0 lea -0x20(%ebp),%eax
11983b: 89 45 b4 mov %eax,-0x4c(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
11983e: 89 45 dc mov %eax,-0x24(%ebp)
the_chain->permanent_null = NULL;
119841: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_chain->last = _Chain_Head(the_chain);
119848: 8d 4d dc lea -0x24(%ebp),%ecx
11984b: 89 4d e4 mov %ecx,-0x1c(%ebp)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11984e: 8d 7d d0 lea -0x30(%ebp),%edi
119851: 8d 45 d4 lea -0x2c(%ebp),%eax
119854: 89 45 b0 mov %eax,-0x50(%ebp)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
119857: 89 45 d0 mov %eax,-0x30(%ebp)
the_chain->permanent_null = NULL;
11985a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
the_chain->last = _Chain_Head(the_chain);
119861: 89 7d d8 mov %edi,-0x28(%ebp)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
119864: 8d 73 30 lea 0x30(%ebx),%esi
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
119867: 8d 4b 68 lea 0x68(%ebx),%ecx
11986a: 89 4d c4 mov %ecx,-0x3c(%ebp)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
11986d: 8d 43 08 lea 0x8(%ebx),%eax
119870: 89 45 bc mov %eax,-0x44(%ebp)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
119873: 8d 53 40 lea 0x40(%ebx),%edx
119876: 89 55 c0 mov %edx,-0x40(%ebp)
119879: 8d 76 00 lea 0x0(%esi),%esi
{
/*
* 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;
11987c: 8d 4d dc lea -0x24(%ebp),%ecx
11987f: 89 4b 78 mov %ecx,0x78(%ebx)
119882: 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;
119884: a1 64 42 14 00 mov 0x144264,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
119889: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
11988c: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11988f: 51 push %ecx
119890: 57 push %edi
119891: 29 d0 sub %edx,%eax
119893: 50 push %eax
119894: 56 push %esi
119895: e8 be 3c 00 00 call 11d558 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11989a: a1 8c 41 14 00 mov 0x14418c,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
11989f: 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 ) {
1198a2: 83 c4 10 add $0x10,%esp
1198a5: 39 d0 cmp %edx,%eax
1198a7: 77 63 ja 11990c <_Timer_server_Body+0xe0>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
1198a9: 72 7d jb 119928 <_Timer_server_Body+0xfc>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
1198ab: 89 43 74 mov %eax,0x74(%ebx)
1198ae: 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 );
1198b0: 8b 43 78 mov 0x78(%ebx),%eax
1198b3: 83 ec 0c sub $0xc,%esp
1198b6: 50 push %eax
1198b7: e8 9c 08 00 00 call 11a158 <_Chain_Get>
if ( timer == NULL ) {
1198bc: 83 c4 10 add $0x10,%esp
1198bf: 85 c0 test %eax,%eax
1198c1: 74 35 je 1198f8 <_Timer_server_Body+0xcc><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1198c3: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
1198c6: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
1198c9: 74 19 je 1198e4 <_Timer_server_Body+0xb8><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
1198cb: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
1198ce: 75 e0 jne 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
1198d0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1198d3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
1198d6: 50 push %eax <== NOT EXECUTED
1198d7: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
1198da: e8 11 3d 00 00 call 11d5f0 <_Watchdog_Insert> <== NOT EXECUTED
1198df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1198e2: eb cc jmp 1198b0 <_Timer_server_Body+0x84><== 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 );
1198e4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1198e7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
1198ea: 50 push %eax <== NOT EXECUTED
1198eb: 56 push %esi <== NOT EXECUTED
1198ec: e8 ff 3c 00 00 call 11d5f0 <_Watchdog_Insert> <== NOT EXECUTED
1198f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1198f4: eb ba jmp 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED
1198f6: 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 );
1198f8: 9c pushf
1198f9: fa cli
1198fa: 58 pop %eax
if ( _Chain_Is_empty( insert_chain ) ) {
1198fb: 8b 55 b4 mov -0x4c(%ebp),%edx
1198fe: 3b 55 dc cmp -0x24(%ebp),%edx
119901: 74 41 je 119944 <_Timer_server_Body+0x118><== ALWAYS TAKEN
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
119903: 50 push %eax <== NOT EXECUTED
119904: 9d popf <== NOT EXECUTED
119905: e9 7a ff ff ff jmp 119884 <_Timer_server_Body+0x58><== NOT EXECUTED
11990a: 66 90 xchg %ax,%ax <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
11990c: 51 push %ecx
11990d: 57 push %edi
11990e: 89 c1 mov %eax,%ecx
119910: 29 d1 sub %edx,%ecx
119912: 51 push %ecx
119913: ff 75 c4 pushl -0x3c(%ebp)
119916: 89 45 b8 mov %eax,-0x48(%ebp)
119919: e8 3a 3c 00 00 call 11d558 <_Watchdog_Adjust_to_chain>
11991e: 83 c4 10 add $0x10,%esp
119921: 8b 45 b8 mov -0x48(%ebp),%eax
119924: eb 85 jmp 1198ab <_Timer_server_Body+0x7f>
119926: 66 90 xchg %ax,%ax
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
119928: 51 push %ecx
119929: 29 c2 sub %eax,%edx
11992b: 52 push %edx
11992c: 6a 01 push $0x1
11992e: ff 75 c4 pushl -0x3c(%ebp)
119931: 89 45 b8 mov %eax,-0x48(%ebp)
119934: e8 a7 3b 00 00 call 11d4e0 <_Watchdog_Adjust>
119939: 83 c4 10 add $0x10,%esp
11993c: 8b 45 b8 mov -0x48(%ebp),%eax
11993f: e9 67 ff ff ff jmp 1198ab <_Timer_server_Body+0x7f>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
119944: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
_ISR_Enable( level );
11994b: 50 push %eax
11994c: 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 ) ) {
11994d: 8b 4d b0 mov -0x50(%ebp),%ecx
119950: 3b 4d d0 cmp -0x30(%ebp),%ecx
119953: 75 23 jne 119978 <_Timer_server_Body+0x14c>
119955: eb 33 jmp 11998a <_Timer_server_Body+0x15e>
119957: 90 nop
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
119958: 8b 10 mov (%eax),%edx
the_chain->first = new_first;
11995a: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = _Chain_Head(the_chain);
11995d: 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;
119960: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
119967: 51 push %ecx
119968: 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 );
119969: 83 ec 08 sub $0x8,%esp
11996c: ff 70 24 pushl 0x24(%eax)
11996f: ff 70 20 pushl 0x20(%eax)
119972: ff 50 1c call *0x1c(%eax)
}
119975: 83 c4 10 add $0x10,%esp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
119978: 9c pushf
119979: fa cli
11997a: 59 pop %ecx
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11997b: 8b 45 d0 mov -0x30(%ebp),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
11997e: 39 45 b0 cmp %eax,-0x50(%ebp)
119981: 75 d5 jne 119958 <_Timer_server_Body+0x12c>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
119983: 51 push %ecx
119984: 9d popf
119985: e9 f2 fe ff ff jmp 11987c <_Timer_server_Body+0x50>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
11998a: c6 43 7c 00 movb $0x0,0x7c(%ebx)
11998e: a1 f8 40 14 00 mov 0x1440f8,%eax
119993: 40 inc %eax
119994: a3 f8 40 14 00 mov %eax,0x1440f8
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
119999: 83 ec 08 sub $0x8,%esp
11999c: 6a 08 push $0x8
11999e: ff 33 pushl (%ebx)
1199a0: e8 4b 33 00 00 call 11ccf0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
1199a5: 89 d8 mov %ebx,%eax
1199a7: e8 e0 fd ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
1199ac: 89 d8 mov %ebx,%eax
1199ae: e8 29 fe ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
1199b3: e8 04 29 00 00 call 11c2bc <_Thread_Enable_dispatch>
ts->active = true;
1199b8: 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 );
1199bc: 58 pop %eax
1199bd: ff 75 bc pushl -0x44(%ebp)
1199c0: e8 63 3d 00 00 call 11d728 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1199c5: 59 pop %ecx
1199c6: ff 75 c0 pushl -0x40(%ebp)
1199c9: e8 5a 3d 00 00 call 11d728 <_Watchdog_Remove>
1199ce: 83 c4 10 add $0x10,%esp
1199d1: e9 a6 fe ff ff jmp 11987c <_Timer_server_Body+0x50>
001199d8 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
1199d8: 55 push %ebp
1199d9: 89 e5 mov %esp,%ebp
1199db: 57 push %edi
1199dc: 56 push %esi
1199dd: 53 push %ebx
1199de: 83 ec 2c sub $0x2c,%esp
1199e1: 8b 5d 08 mov 0x8(%ebp),%ebx
1199e4: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
1199e7: 8b 53 78 mov 0x78(%ebx),%edx
1199ea: 85 d2 test %edx,%edx
1199ec: 74 16 je 119a04 <_Timer_server_Schedule_operation_method+0x2c><== 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 );
1199ee: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED
1199f1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
1199f4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
}
1199f7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1199fa: 5b pop %ebx <== NOT EXECUTED
1199fb: 5e pop %esi <== NOT EXECUTED
1199fc: 5f pop %edi <== NOT EXECUTED
1199fd: c9 leave <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
1199fe: e9 19 07 00 00 jmp 11a11c <_Chain_Append> <== NOT EXECUTED
119a03: 90 nop <== NOT EXECUTED
119a04: 8b 15 f8 40 14 00 mov 0x1440f8,%edx
119a0a: 42 inc %edx
119a0b: 89 15 f8 40 14 00 mov %edx,0x1440f8
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
119a11: 8b 50 38 mov 0x38(%eax),%edx
119a14: 83 fa 01 cmp $0x1,%edx
119a17: 74 77 je 119a90 <_Timer_server_Schedule_operation_method+0xb8>
_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 ) {
119a19: 83 fa 03 cmp $0x3,%edx
119a1c: 74 0e je 119a2c <_Timer_server_Schedule_operation_method+0x54>
* 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 );
}
}
119a1e: 8d 65 f4 lea -0xc(%ebp),%esp
119a21: 5b pop %ebx
119a22: 5e pop %esi
119a23: 5f pop %edi
119a24: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
119a25: e9 92 28 00 00 jmp 11c2bc <_Thread_Enable_dispatch>
119a2a: 66 90 xchg %ax,%ax
} 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 );
119a2c: 9c pushf
119a2d: fa cli
119a2e: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
119a31: 8b 0d 8c 41 14 00 mov 0x14418c,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
119a37: 8b 73 74 mov 0x74(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
119a3a: 8b 53 68 mov 0x68(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
119a3d: 8d 7b 6c lea 0x6c(%ebx),%edi
119a40: 39 fa cmp %edi,%edx
119a42: 74 22 je 119a66 <_Timer_server_Schedule_operation_method+0x8e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
119a44: 8b 7a 10 mov 0x10(%edx),%edi
119a47: 89 7d d4 mov %edi,-0x2c(%ebp)
if ( snapshot > last_snapshot ) {
119a4a: 39 f1 cmp %esi,%ecx
119a4c: 0f 86 9e 00 00 00 jbe 119af0 <_Timer_server_Schedule_operation_method+0x118>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
119a52: 89 cf mov %ecx,%edi
119a54: 29 f7 sub %esi,%edi
119a56: 89 fe mov %edi,%esi
if (delta_interval > delta) {
119a58: 39 7d d4 cmp %edi,-0x2c(%ebp)
119a5b: 0f 87 9b 00 00 00 ja 119afc <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN
119a61: 31 ff xor %edi,%edi <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119a63: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119a66: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
119a69: ff 75 e4 pushl -0x1c(%ebp)
119a6c: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
119a6d: 83 ec 08 sub $0x8,%esp
119a70: 83 c0 10 add $0x10,%eax
119a73: 50 push %eax
119a74: 8d 43 68 lea 0x68(%ebx),%eax
119a77: 50 push %eax
119a78: e8 73 3b 00 00 call 11d5f0 <_Watchdog_Insert>
if ( !ts->active ) {
119a7d: 8a 43 7c mov 0x7c(%ebx),%al
119a80: 83 c4 10 add $0x10,%esp
119a83: 84 c0 test %al,%al
119a85: 75 97 jne 119a1e <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119a87: 89 d8 mov %ebx,%eax
119a89: e8 4e fd ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog>
119a8e: eb 8e jmp 119a1e <_Timer_server_Schedule_operation_method+0x46>
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 );
119a90: 9c pushf
119a91: fa cli
119a92: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119a95: 8b 0d 64 42 14 00 mov 0x144264,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
119a9b: 8b 73 3c mov 0x3c(%ebx),%esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
119a9e: 8b 53 30 mov 0x30(%ebx),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
119aa1: 8d 7b 34 lea 0x34(%ebx),%edi
119aa4: 39 fa cmp %edi,%edx
119aa6: 74 12 je 119aba <_Timer_server_Schedule_operation_method+0xe2>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
119aa8: 89 cf mov %ecx,%edi
119aaa: 29 f7 sub %esi,%edi
119aac: 89 fe mov %edi,%esi
delta_interval = first_watchdog->delta_interval;
119aae: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
119ab1: 39 fe cmp %edi,%esi
119ab3: 72 37 jb 119aec <_Timer_server_Schedule_operation_method+0x114>
119ab5: 31 ff xor %edi,%edi
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
119ab7: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
119aba: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
119abd: ff 75 e4 pushl -0x1c(%ebp)
119ac0: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
119ac1: 83 ec 08 sub $0x8,%esp
119ac4: 83 c0 10 add $0x10,%eax
119ac7: 50 push %eax
119ac8: 8d 43 30 lea 0x30(%ebx),%eax
119acb: 50 push %eax
119acc: e8 1f 3b 00 00 call 11d5f0 <_Watchdog_Insert>
if ( !ts->active ) {
119ad1: 8a 43 7c mov 0x7c(%ebx),%al
119ad4: 83 c4 10 add $0x10,%esp
119ad7: 84 c0 test %al,%al
119ad9: 0f 85 3f ff ff ff jne 119a1e <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
119adf: 89 d8 mov %ebx,%eax
119ae1: e8 a6 fc ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog>
119ae6: e9 33 ff ff ff jmp 119a1e <_Timer_server_Schedule_operation_method+0x46>
119aeb: 90 nop
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
119aec: 29 f7 sub %esi,%edi
119aee: eb c7 jmp 119ab7 <_Timer_server_Schedule_operation_method+0xdf>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
119af0: 8b 7d d4 mov -0x2c(%ebp),%edi
119af3: 01 f7 add %esi,%edi
delta_interval += delta;
119af5: 29 cf sub %ecx,%edi
119af7: e9 67 ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
119afc: 8b 7d d4 mov -0x2c(%ebp),%edi
119aff: 29 f7 sub %esi,%edi
119b01: e9 5d ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b>
00121608 <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
121608: 55 push %ebp
121609: 89 e5 mov %esp,%ebp
12160b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
12160e: 85 c0 test %eax,%eax
121610: 74 1a je 12162c <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
121612: 8b 10 mov (%eax),%edx
121614: 85 d2 test %edx,%edx
121616: 78 14 js 12162c <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_nsec < 0 )
121618: 8b 40 04 mov 0x4(%eax),%eax
12161b: 85 c0 test %eax,%eax
12161d: 78 0d js 12162c <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
12161f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
121624: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
121627: c9 leave
121628: c3 ret
121629: 8d 76 00 lea 0x0(%esi),%esi
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
12162c: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
12162e: c9 leave
12162f: c3 ret
00112a3c <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
112a3c: 55 push %ebp
112a3d: 89 e5 mov %esp,%ebp
112a3f: 56 push %esi
112a40: 53 push %ebx
112a41: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
112a44: 8b 33 mov (%ebx),%esi
112a46: 85 f6 test %esi,%esi
112a48: 75 07 jne 112a51 <_Timespec_To_ticks+0x15>
112a4a: 8b 43 04 mov 0x4(%ebx),%eax
112a4d: 85 c0 test %eax,%eax
112a4f: 74 37 je 112a88 <_Timespec_To_ticks+0x4c>
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
112a51: e8 8a 23 00 00 call 114de0 <TOD_TICKS_PER_SECOND_method>
112a56: 89 c1 mov %eax,%ecx
112a58: 0f af ce imul %esi,%ecx
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
112a5b: a1 ec 52 12 00 mov 0x1252ec,%eax
112a60: 8d 04 80 lea (%eax,%eax,4),%eax
112a63: 8d 04 80 lea (%eax,%eax,4),%eax
112a66: 8d 34 80 lea (%eax,%eax,4),%esi
112a69: c1 e6 03 shl $0x3,%esi
112a6c: 8b 43 04 mov 0x4(%ebx),%eax
112a6f: 31 d2 xor %edx,%edx
112a71: f7 f6 div %esi
if (ticks)
112a73: 01 c8 add %ecx,%eax
112a75: 74 05 je 112a7c <_Timespec_To_ticks+0x40>
return ticks;
return 1;
}
112a77: 5b pop %ebx
112a78: 5e pop %esi
112a79: c9 leave
112a7a: c3 ret
112a7b: 90 nop
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
if (ticks)
112a7c: b8 01 00 00 00 mov $0x1,%eax
return ticks;
return 1;
}
112a81: 5b pop %ebx
112a82: 5e pop %esi
112a83: c9 leave
112a84: c3 ret
112a85: 8d 76 00 lea 0x0(%esi),%esi
const struct timespec *time
)
{
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
112a88: 31 c0 xor %eax,%eax
if (ticks)
return ticks;
return 1;
}
112a8a: 5b pop %ebx
112a8b: 5e pop %esi
112a8c: c9 leave
112a8d: c3 ret
0010ea88 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10ea88: 55 push %ebp
10ea89: 89 e5 mov %esp,%ebp
10ea8b: 57 push %edi
10ea8c: 56 push %esi
10ea8d: 53 push %ebx
10ea8e: 83 ec 1c sub $0x1c,%esp
10ea91: 8b 75 08 mov 0x8(%ebp),%esi
10ea94: 8b 7d 10 mov 0x10(%ebp),%edi
10ea97: 8a 45 0c mov 0xc(%ebp),%al
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea9a: 8b 1d 14 97 12 00 mov 0x129714,%ebx
10eaa0: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10eaa6: 74 25 je 10eacd <_User_extensions_Fatal+0x45><== 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 );
10eaa8: 0f b6 c0 movzbl %al,%eax
10eaab: 89 45 e4 mov %eax,-0x1c(%ebp)
10eaae: 66 90 xchg %ax,%ax
!_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 )
10eab0: 8b 43 30 mov 0x30(%ebx),%eax
10eab3: 85 c0 test %eax,%eax
10eab5: 74 0b je 10eac2 <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10eab7: 52 push %edx
10eab8: 57 push %edi
10eab9: ff 75 e4 pushl -0x1c(%ebp)
10eabc: 56 push %esi
10eabd: ff d0 call *%eax
10eabf: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10eac2: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eac5: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10eacb: 75 e3 jne 10eab0 <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10eacd: 8d 65 f4 lea -0xc(%ebp),%esp
10ead0: 5b pop %ebx
10ead1: 5e pop %esi
10ead2: 5f pop %edi
10ead3: c9 leave
10ead4: c3 ret
0010e94c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e94c: 55 push %ebp
10e94d: 89 e5 mov %esp,%ebp
10e94f: 57 push %edi
10e950: 56 push %esi
10e951: 53 push %ebx
10e952: 83 ec 1c sub $0x1c,%esp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
10e955: a1 18 53 12 00 mov 0x125318,%eax
10e95a: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e95d: 8b 35 1c 53 12 00 mov 0x12531c,%esi
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e963: c7 05 0c 97 12 00 10 movl $0x129710,0x12970c
10e96a: 97 12 00
the_chain->permanent_null = NULL;
10e96d: c7 05 10 97 12 00 00 movl $0x0,0x129710
10e974: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e977: c7 05 14 97 12 00 0c movl $0x12970c,0x129714
10e97e: 97 12 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
10e981: c7 05 bc 94 12 00 c0 movl $0x1294c0,0x1294bc
10e988: 94 12 00
the_chain->permanent_null = NULL;
10e98b: c7 05 c0 94 12 00 00 movl $0x0,0x1294c0
10e992: 00 00 00
the_chain->last = _Chain_Head(the_chain);
10e995: c7 05 c4 94 12 00 bc movl $0x1294bc,0x1294c4
10e99c: 94 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e99f: 85 f6 test %esi,%esi
10e9a1: 74 64 je 10ea07 <_User_extensions_Handler_initialization+0xbb>
extension = (User_extensions_Control *)
10e9a3: 89 c2 mov %eax,%edx
10e9a5: 8d 04 40 lea (%eax,%eax,2),%eax
10e9a8: 8d 0c 82 lea (%edx,%eax,4),%ecx
10e9ab: c1 e1 02 shl $0x2,%ecx
10e9ae: 83 ec 0c sub $0xc,%esp
10e9b1: 51 push %ecx
10e9b2: 89 4d d8 mov %ecx,-0x28(%ebp)
10e9b5: e8 36 04 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error>
10e9ba: 89 c3 mov %eax,%ebx
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e9bc: 31 c0 xor %eax,%eax
10e9be: 8b 4d d8 mov -0x28(%ebp),%ecx
10e9c1: 89 df mov %ebx,%edi
10e9c3: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e9c5: 83 c4 10 add $0x10,%esp
10e9c8: 8b 45 dc mov -0x24(%ebp),%eax
10e9cb: 85 c0 test %eax,%eax
10e9cd: 74 38 je 10ea07 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e9cf: 89 75 e4 mov %esi,-0x1c(%ebp)
10e9d2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e9d9: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10e9dc: 8d 7b 14 lea 0x14(%ebx),%edi
10e9df: 8b 75 e4 mov -0x1c(%ebp),%esi
10e9e2: b9 08 00 00 00 mov $0x8,%ecx
10e9e7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e9e9: 83 ec 0c sub $0xc,%esp
10e9ec: 53 push %ebx
10e9ed: e8 9e 40 00 00 call 112a90 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e9f2: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e9f5: ff 45 e0 incl -0x20(%ebp)
10e9f8: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
10e9fc: 83 c4 10 add $0x10,%esp
10e9ff: 8b 45 e0 mov -0x20(%ebp),%eax
10ea02: 39 45 dc cmp %eax,-0x24(%ebp)
10ea05: 77 d5 ja 10e9dc <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10ea07: 8d 65 f4 lea -0xc(%ebp),%esp
10ea0a: 5b pop %ebx
10ea0b: 5e pop %esi
10ea0c: 5f pop %edi
10ea0d: c9 leave
10ea0e: c3 ret
0010ffc0 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10ffc0: 55 push %ebp
10ffc1: 89 e5 mov %esp,%ebp
10ffc3: 53 push %ebx
10ffc4: 83 ec 10 sub $0x10,%esp
10ffc7: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10ffca: 53 push %ebx
10ffcb: e8 80 d9 ff ff call 10d950 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10ffd0: 83 c4 10 add $0x10,%esp
10ffd3: 8b 43 24 mov 0x24(%ebx),%eax
10ffd6: 85 c0 test %eax,%eax
10ffd8: 74 12 je 10ffec <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
10ffda: 83 c3 08 add $0x8,%ebx
10ffdd: 89 5d 08 mov %ebx,0x8(%ebp)
}
10ffe0: 8b 5d fc mov -0x4(%ebp),%ebx
10ffe3: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10ffe4: e9 67 d9 ff ff jmp 10d950 <_Chain_Extract>
10ffe9: 8d 76 00 lea 0x0(%esi),%esi
}
10ffec: 8b 5d fc mov -0x4(%ebp),%ebx
10ffef: c9 leave
10fff0: c3 ret
0010ea10 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10ea10: 55 push %ebp
10ea11: 89 e5 mov %esp,%ebp
10ea13: 56 push %esi
10ea14: 53 push %ebx
10ea15: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10ea18: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx
10ea1e: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10ea24: 74 1c je 10ea42 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10ea26: 66 90 xchg %ax,%ax
!_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 )
10ea28: 8b 43 28 mov 0x28(%ebx),%eax
10ea2b: 85 c0 test %eax,%eax
10ea2d: 74 09 je 10ea38 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10ea2f: 83 ec 0c sub $0xc,%esp
10ea32: 56 push %esi
10ea33: ff d0 call *%eax
10ea35: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10ea38: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10ea3a: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10ea40: 75 e6 jne 10ea28 <_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 );
}
}
10ea42: 8d 65 f8 lea -0x8(%ebp),%esp
10ea45: 5b pop %ebx
10ea46: 5e pop %esi
10ea47: c9 leave
10ea48: c3 ret
0010ead8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10ead8: 55 push %ebp
10ead9: 89 e5 mov %esp,%ebp
10eadb: 56 push %esi
10eadc: 53 push %ebx
10eadd: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10eae0: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx
10eae6: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10eaec: 74 26 je 10eb14 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10eaee: 66 90 xchg %ax,%ax
!_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 ) {
10eaf0: 8b 43 14 mov 0x14(%ebx),%eax
10eaf3: 85 c0 test %eax,%eax
10eaf5: 74 13 je 10eb0a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10eaf7: 83 ec 08 sub $0x8,%esp
10eafa: 56 push %esi
10eafb: ff 35 78 95 12 00 pushl 0x129578
10eb01: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10eb03: 83 c4 10 add $0x10,%esp
10eb06: 84 c0 test %al,%al
10eb08: 74 0c je 10eb16 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10eb0a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
10eb0c: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10eb12: 75 dc jne 10eaf0 <_User_extensions_Thread_create+0x18>
10eb14: b0 01 mov $0x1,%al
return false;
}
}
return true;
}
10eb16: 8d 65 f8 lea -0x8(%ebp),%esp
10eb19: 5b pop %ebx
10eb1a: 5e pop %esi
10eb1b: c9 leave
10eb1c: c3 ret
0010eb20 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10eb20: 55 push %ebp
10eb21: 89 e5 mov %esp,%ebp
10eb23: 56 push %esi
10eb24: 53 push %ebx
10eb25: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eb28: 8b 1d 14 97 12 00 mov 0x129714,%ebx
10eb2e: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10eb34: 74 23 je 10eb59 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10eb36: 66 90 xchg %ax,%ax
!_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 )
10eb38: 8b 43 20 mov 0x20(%ebx),%eax
10eb3b: 85 c0 test %eax,%eax
10eb3d: 74 0f je 10eb4e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10eb3f: 83 ec 08 sub $0x8,%esp
10eb42: 56 push %esi
10eb43: ff 35 78 95 12 00 pushl 0x129578
10eb49: ff d0 call *%eax
10eb4b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10eb4e: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10eb51: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10eb57: 75 df jne 10eb38 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10eb59: 8d 65 f8 lea -0x8(%ebp),%esp
10eb5c: 5b pop %ebx
10eb5d: 5e pop %esi
10eb5e: c9 leave
10eb5f: c3 ret
0010ea4c <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10ea4c: 55 push %ebp
10ea4d: 89 e5 mov %esp,%ebp
10ea4f: 56 push %esi
10ea50: 53 push %ebx
10ea51: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea54: 8b 1d 14 97 12 00 mov 0x129714,%ebx
10ea5a: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10ea60: 74 1d je 10ea7f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10ea62: 66 90 xchg %ax,%ax
!_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 )
10ea64: 8b 43 2c mov 0x2c(%ebx),%eax
10ea67: 85 c0 test %eax,%eax
10ea69: 74 09 je 10ea74 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10ea6b: 83 ec 0c sub $0xc,%esp
10ea6e: 56 push %esi
10ea6f: ff d0 call *%eax
10ea71: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10ea74: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
10ea77: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx
10ea7d: 75 e5 jne 10ea64 <_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 );
}
}
10ea7f: 8d 65 f8 lea -0x8(%ebp),%esp
10ea82: 5b pop %ebx
10ea83: 5e pop %esi
10ea84: c9 leave
10ea85: c3 ret
0010f714 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f714: 55 push %ebp
10f715: 89 e5 mov %esp,%ebp
10f717: 56 push %esi
10f718: 53 push %ebx
10f719: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f71c: 8b 1d 0c b5 12 00 mov 0x12b50c,%ebx
10f722: 81 fb 10 b5 12 00 cmp $0x12b510,%ebx
10f728: 74 22 je 10f74c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f72a: 66 90 xchg %ax,%ax
!_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 )
10f72c: 8b 43 1c mov 0x1c(%ebx),%eax
10f72f: 85 c0 test %eax,%eax
10f731: 74 0f je 10f742 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f733: 83 ec 08 sub $0x8,%esp
10f736: 56 push %esi
10f737: ff 35 78 b3 12 00 pushl 0x12b378
10f73d: ff d0 call *%eax
10f73f: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f742: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10f744: 81 fb 10 b5 12 00 cmp $0x12b510,%ebx
10f74a: 75 e0 jne 10f72c <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f74c: 8d 65 f8 lea -0x8(%ebp),%esp
10f74f: 5b pop %ebx
10f750: 5e pop %esi
10f751: c9 leave
10f752: c3 ret
0010eb60 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10eb60: 55 push %ebp
10eb61: 89 e5 mov %esp,%ebp
10eb63: 56 push %esi
10eb64: 53 push %ebx
10eb65: 8b 75 08 mov 0x8(%ebp),%esi
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10eb68: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx
10eb6e: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10eb74: 74 22 je 10eb98 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10eb76: 66 90 xchg %ax,%ax
!_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 )
10eb78: 8b 43 18 mov 0x18(%ebx),%eax
10eb7b: 85 c0 test %eax,%eax
10eb7d: 74 0f je 10eb8e <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10eb7f: 83 ec 08 sub $0x8,%esp
10eb82: 56 push %esi
10eb83: ff 35 78 95 12 00 pushl 0x129578
10eb89: ff d0 call *%eax
10eb8b: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10eb8e: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
10eb90: 81 fb 10 97 12 00 cmp $0x129710,%ebx
10eb96: 75 e0 jne 10eb78 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10eb98: 8d 65 f8 lea -0x8(%ebp),%esp
10eb9b: 5b pop %ebx
10eb9c: 5e pop %esi
10eb9d: c9 leave
10eb9e: c3 ret
0010eba0 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10eba0: 55 push %ebp
10eba1: 89 e5 mov %esp,%ebp
10eba3: 57 push %edi
10eba4: 56 push %esi
10eba5: 53 push %ebx
10eba6: 83 ec 0c sub $0xc,%esp
10eba9: 8b 7d 08 mov 0x8(%ebp),%edi
10ebac: 8b 75 0c mov 0xc(%ebp),%esi
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10ebaf: 8b 1d bc 94 12 00 mov 0x1294bc,%ebx
10ebb5: 81 fb c0 94 12 00 cmp $0x1294c0,%ebx
10ebbb: 74 18 je 10ebd5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10ebbd: 8d 76 00 lea 0x0(%esi),%esi
!_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 );
10ebc0: 83 ec 08 sub $0x8,%esp
10ebc3: 56 push %esi
10ebc4: 57 push %edi
10ebc5: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10ebc8: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
10ebca: 83 c4 10 add $0x10,%esp
10ebcd: 81 fb c0 94 12 00 cmp $0x1294c0,%ebx
10ebd3: 75 eb jne 10ebc0 <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10ebd5: 8d 65 f4 lea -0xc(%ebp),%esp
10ebd8: 5b pop %ebx
10ebd9: 5e pop %esi
10ebda: 5f pop %edi
10ebdb: c9 leave
10ebdc: c3 ret
001105c0 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
1105c0: 55 push %ebp
1105c1: 89 e5 mov %esp,%ebp
1105c3: 57 push %edi
1105c4: 56 push %esi
1105c5: 53 push %ebx
1105c6: 83 ec 1c sub $0x1c,%esp
1105c9: 8b 75 08 mov 0x8(%ebp),%esi
1105cc: 8b 4d 0c mov 0xc(%ebp),%ecx
1105cf: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1105d2: 9c pushf
1105d3: fa cli
1105d4: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1105d5: 8b 16 mov (%esi),%edx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1105d7: 8d 7e 04 lea 0x4(%esi),%edi
1105da: 89 7d e4 mov %edi,-0x1c(%ebp)
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
1105dd: 39 fa cmp %edi,%edx
1105df: 74 3d je 11061e <_Watchdog_Adjust+0x5e>
switch ( direction ) {
1105e1: 85 c9 test %ecx,%ecx
1105e3: 75 43 jne 110628 <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1105e5: 85 db test %ebx,%ebx
1105e7: 74 35 je 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1105e9: 8b 7a 10 mov 0x10(%edx),%edi
1105ec: 39 fb cmp %edi,%ebx
1105ee: 73 0f jae 1105ff <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
1105f0: eb 3e jmp 110630 <_Watchdog_Adjust+0x70> <== NOT EXECUTED
1105f2: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1105f4: 29 fb sub %edi,%ebx
1105f6: 74 26 je 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1105f8: 8b 7a 10 mov 0x10(%edx),%edi
1105fb: 39 df cmp %ebx,%edi
1105fd: 77 31 ja 110630 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
1105ff: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
110606: 50 push %eax
110607: 9d popf
_Watchdog_Tickle( header );
110608: 83 ec 0c sub $0xc,%esp
11060b: 56 push %esi
11060c: e8 cb 01 00 00 call 1107dc <_Watchdog_Tickle>
_ISR_Disable( level );
110611: 9c pushf
110612: fa cli
110613: 58 pop %eax
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
110614: 8b 16 mov (%esi),%edx
if ( _Chain_Is_empty( header ) )
110616: 83 c4 10 add $0x10,%esp
110619: 39 55 e4 cmp %edx,-0x1c(%ebp)
11061c: 75 d6 jne 1105f4 <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
11061e: 50 push %eax
11061f: 9d popf
}
110620: 8d 65 f4 lea -0xc(%ebp),%esp
110623: 5b pop %ebx
110624: 5e pop %esi
110625: 5f pop %edi
110626: c9 leave
110627: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
110628: 49 dec %ecx
110629: 75 f3 jne 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
11062b: 01 5a 10 add %ebx,0x10(%edx)
break;
11062e: eb ee jmp 11061e <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
110630: 29 df sub %ebx,%edi
110632: 89 7a 10 mov %edi,0x10(%edx)
break;
110635: eb e7 jmp 11061e <_Watchdog_Adjust+0x5e>
0011d558 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
11d558: 55 push %ebp
11d559: 89 e5 mov %esp,%ebp
11d55b: 57 push %edi
11d55c: 56 push %esi
11d55d: 53 push %ebx
11d55e: 83 ec 0c sub $0xc,%esp
11d561: 8b 75 08 mov 0x8(%ebp),%esi
11d564: 8b 55 0c mov 0xc(%ebp),%edx
11d567: 8b 5d 10 mov 0x10(%ebp),%ebx
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
11d56a: 85 d2 test %edx,%edx
11d56c: 74 63 je 11d5d1 <_Watchdog_Adjust_to_chain+0x79>
return;
}
_ISR_Disable( level );
11d56e: 9c pushf
11d56f: fa cli
11d570: 8f 45 ec popl -0x14(%ebp)
11d573: 8b 06 mov (%esi),%eax
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11d575: 8d 4e 04 lea 0x4(%esi),%ecx
11d578: 89 4d f0 mov %ecx,-0x10(%ebp)
11d57b: 8d 7b 04 lea 0x4(%ebx),%edi
11d57e: 89 55 e8 mov %edx,-0x18(%ebp)
11d581: 8d 76 00 lea 0x0(%esi),%esi
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
11d584: 39 45 f0 cmp %eax,-0x10(%ebp)
11d587: 74 44 je 11d5cd <_Watchdog_Adjust_to_chain+0x75>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
11d589: 8b 50 10 mov 0x10(%eax),%edx
11d58c: 3b 55 e8 cmp -0x18(%ebp),%edx
11d58f: 77 57 ja 11d5e8 <_Watchdog_Adjust_to_chain+0x90>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
11d591: 29 55 e8 sub %edx,-0x18(%ebp)
first->delta_interval = 0;
11d594: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
11d59b: 90 nop
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
11d59c: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
11d59e: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
11d5a1: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
11d5a4: 89 0a mov %ecx,(%edx)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
11d5a6: 89 38 mov %edi,(%eax)
old_last_node = the_chain->last;
11d5a8: 8b 53 08 mov 0x8(%ebx),%edx
the_chain->last = the_node;
11d5ab: 89 43 08 mov %eax,0x8(%ebx)
old_last_node->next = the_node;
11d5ae: 89 02 mov %eax,(%edx)
the_node->previous = old_last_node;
11d5b0: 89 50 04 mov %edx,0x4(%eax)
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
11d5b3: ff 75 ec pushl -0x14(%ebp)
11d5b6: 9d popf
11d5b7: fa cli
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
11d5b8: 8b 06 mov (%esi),%eax
if ( _Chain_Is_empty( header ) )
11d5ba: 39 45 f0 cmp %eax,-0x10(%ebp)
11d5bd: 74 1d je 11d5dc <_Watchdog_Adjust_to_chain+0x84>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
11d5bf: 8b 50 10 mov 0x10(%eax),%edx
11d5c2: 85 d2 test %edx,%edx
11d5c4: 74 d6 je 11d59c <_Watchdog_Adjust_to_chain+0x44>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
11d5c6: 8b 4d e8 mov -0x18(%ebp),%ecx
11d5c9: 85 c9 test %ecx,%ecx
11d5cb: 75 b7 jne 11d584 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
11d5cd: ff 75 ec pushl -0x14(%ebp)
11d5d0: 9d popf
}
11d5d1: 83 c4 0c add $0xc,%esp
11d5d4: 5b pop %ebx
11d5d5: 5e pop %esi
11d5d6: 5f pop %edi
11d5d7: c9 leave
11d5d8: c3 ret
11d5d9: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
11d5dc: 8b 45 f0 mov -0x10(%ebp),%eax
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
11d5df: 8b 4d e8 mov -0x18(%ebp),%ecx
11d5e2: 85 c9 test %ecx,%ecx
11d5e4: 75 9e jne 11d584 <_Watchdog_Adjust_to_chain+0x2c>
11d5e6: eb e5 jmp 11d5cd <_Watchdog_Adjust_to_chain+0x75>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
11d5e8: 2b 55 e8 sub -0x18(%ebp),%edx
11d5eb: 89 50 10 mov %edx,0x10(%eax)
break;
11d5ee: eb dd jmp 11d5cd <_Watchdog_Adjust_to_chain+0x75>
0010ebe0 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10ebe0: 55 push %ebp
10ebe1: 89 e5 mov %esp,%ebp
10ebe3: 57 push %edi
10ebe4: 56 push %esi
10ebe5: 53 push %ebx
10ebe6: 83 ec 04 sub $0x4,%esp
10ebe9: 8b 5d 0c mov 0xc(%ebp),%ebx
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
10ebec: 8b 3d 54 95 12 00 mov 0x129554,%edi
_ISR_Disable( level );
10ebf2: 9c pushf
10ebf3: fa cli
10ebf4: 8f 45 f0 popl -0x10(%ebp)
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
10ebf7: 8b 43 08 mov 0x8(%ebx),%eax
10ebfa: 85 c0 test %eax,%eax
10ebfc: 0f 85 9e 00 00 00 jne 10eca0 <_Watchdog_Insert+0xc0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10ec02: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10ec09: a1 20 96 12 00 mov 0x129620,%eax
10ec0e: 40 inc %eax
10ec0f: a3 20 96 12 00 mov %eax,0x129620
restart:
delta_interval = the_watchdog->initial;
10ec14: 8b 43 0c mov 0xc(%ebx),%eax
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
10ec17: 8b 4d 08 mov 0x8(%ebp),%ecx
10ec1a: 8b 11 mov (%ecx),%edx
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10ec1c: 85 c0 test %eax,%eax
10ec1e: 74 5d je 10ec7d <_Watchdog_Insert+0x9d>
10ec20: 8b 32 mov (%edx),%esi
10ec22: 85 f6 test %esi,%esi
10ec24: 74 57 je 10ec7d <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10ec26: 8b 4a 10 mov 0x10(%edx),%ecx
10ec29: 39 c8 cmp %ecx,%eax
10ec2b: 73 22 jae 10ec4f <_Watchdog_Insert+0x6f>
10ec2d: eb 49 jmp 10ec78 <_Watchdog_Insert+0x98>
10ec2f: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10ec30: 8b 35 74 95 12 00 mov 0x129574,%esi
10ec36: 39 f7 cmp %esi,%edi
10ec38: 72 72 jb 10ecac <_Watchdog_Insert+0xcc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10ec3a: 29 c8 sub %ecx,%eax
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
10ec3c: 8b 12 mov (%edx),%edx
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10ec3e: 85 c0 test %eax,%eax
10ec40: 74 3b je 10ec7d <_Watchdog_Insert+0x9d>
10ec42: 8b 0a mov (%edx),%ecx
10ec44: 85 c9 test %ecx,%ecx
10ec46: 74 35 je 10ec7d <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10ec48: 8b 4a 10 mov 0x10(%edx),%ecx
10ec4b: 39 c1 cmp %eax,%ecx
10ec4d: 77 29 ja 10ec78 <_Watchdog_Insert+0x98>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
10ec4f: ff 75 f0 pushl -0x10(%ebp)
10ec52: 9d popf
10ec53: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10ec54: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10ec58: 74 d6 je 10ec30 <_Watchdog_Insert+0x50>
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
10ec5a: 89 3d 74 95 12 00 mov %edi,0x129574
_Watchdog_Sync_count--;
10ec60: a1 20 96 12 00 mov 0x129620,%eax
10ec65: 48 dec %eax
10ec66: a3 20 96 12 00 mov %eax,0x129620
_ISR_Enable( level );
10ec6b: ff 75 f0 pushl -0x10(%ebp)
10ec6e: 9d popf
}
10ec6f: 58 pop %eax
10ec70: 5b pop %ebx
10ec71: 5e pop %esi
10ec72: 5f pop %edi
10ec73: c9 leave
10ec74: c3 ret
10ec75: 8d 76 00 lea 0x0(%esi),%esi
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10ec78: 29 c1 sub %eax,%ecx
10ec7a: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10ec7d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10ec84: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10ec87: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10ec8a: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10ec8d: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10ec8f: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10ec91: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10ec93: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10ec96: a1 24 96 12 00 mov 0x129624,%eax
10ec9b: 89 43 14 mov %eax,0x14(%ebx)
10ec9e: eb ba jmp 10ec5a <_Watchdog_Insert+0x7a>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10eca0: ff 75 f0 pushl -0x10(%ebp)
10eca3: 9d popf
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10eca4: 58 pop %eax
10eca5: 5b pop %ebx
10eca6: 5e pop %esi
10eca7: 5f pop %edi
10eca8: c9 leave
10eca9: c3 ret
10ecaa: 66 90 xchg %ax,%ax
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
10ecac: 89 3d 74 95 12 00 mov %edi,0x129574
goto restart;
10ecb2: e9 5d ff ff ff jmp 10ec14 <_Watchdog_Insert+0x34>
0010ed18 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10ed18: 55 push %ebp
10ed19: 89 e5 mov %esp,%ebp
10ed1b: 56 push %esi
10ed1c: 53 push %ebx
10ed1d: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10ed20: 9c pushf
10ed21: fa cli
10ed22: 59 pop %ecx
previous_state = the_watchdog->state;
10ed23: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10ed26: 83 f8 01 cmp $0x1,%eax
10ed29: 74 4d je 10ed78 <_Watchdog_Remove+0x60>
10ed2b: 73 0f jae 10ed3c <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10ed2d: 8b 1d 24 96 12 00 mov 0x129624,%ebx
10ed33: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10ed36: 51 push %ecx
10ed37: 9d popf
return( previous_state );
}
10ed38: 5b pop %ebx
10ed39: 5e pop %esi
10ed3a: c9 leave
10ed3b: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10ed3c: 83 f8 03 cmp $0x3,%eax
10ed3f: 77 ec ja 10ed2d <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10ed41: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
10ed48: 8b 1a mov (%edx),%ebx
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
10ed4a: 8b 33 mov (%ebx),%esi
10ed4c: 85 f6 test %esi,%esi
10ed4e: 74 06 je 10ed56 <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10ed50: 8b 72 10 mov 0x10(%edx),%esi
10ed53: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10ed56: 8b 35 20 96 12 00 mov 0x129620,%esi
10ed5c: 85 f6 test %esi,%esi
10ed5e: 74 0c je 10ed6c <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10ed60: 8b 35 54 95 12 00 mov 0x129554,%esi
10ed66: 89 35 74 95 12 00 mov %esi,0x129574
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10ed6c: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10ed6f: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10ed72: 89 1e mov %ebx,(%esi)
10ed74: eb b7 jmp 10ed2d <_Watchdog_Remove+0x15>
10ed76: 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;
10ed78: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10ed7f: eb ac jmp 10ed2d <_Watchdog_Remove+0x15>
001101a4 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
1101a4: 55 push %ebp
1101a5: 89 e5 mov %esp,%ebp
1101a7: 57 push %edi
1101a8: 56 push %esi
1101a9: 53 push %ebx
1101aa: 83 ec 2c sub $0x2c,%esp
1101ad: 8b 55 08 mov 0x8(%ebp),%edx
1101b0: 8b 45 0c mov 0xc(%ebp),%eax
printk(
1101b3: 8b 78 24 mov 0x24(%eax),%edi
1101b6: 8b 70 20 mov 0x20(%eax),%esi
1101b9: 8b 58 1c mov 0x1c(%eax),%ebx
1101bc: 8b 48 0c mov 0xc(%eax),%ecx
1101bf: 89 4d d4 mov %ecx,-0x2c(%ebp)
1101c2: 8b 48 10 mov 0x10(%eax),%ecx
1101c5: 89 4d e0 mov %ecx,-0x20(%ebp)
1101c8: 85 d2 test %edx,%edx
1101ca: 74 2c je 1101f8 <_Watchdog_Report+0x54>
1101cc: b9 43 46 12 00 mov $0x124643,%ecx
1101d1: 83 ec 0c sub $0xc,%esp
1101d4: 57 push %edi
1101d5: 56 push %esi
1101d6: 53 push %ebx
1101d7: 50 push %eax
1101d8: ff 75 d4 pushl -0x2c(%ebp)
1101db: ff 75 e0 pushl -0x20(%ebp)
1101de: 51 push %ecx
1101df: 52 push %edx
1101e0: 68 46 50 12 00 push $0x125046
1101e5: e8 ae 9d ff ff call 109f98 <printk>
1101ea: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
1101ed: 8d 65 f4 lea -0xc(%ebp),%esp
1101f0: 5b pop %ebx
1101f1: 5e pop %esi
1101f2: 5f pop %edi
1101f3: c9 leave
1101f4: c3 ret
1101f5: 8d 76 00 lea 0x0(%esi),%esi
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
1101f8: b9 95 4e 12 00 mov $0x124e95,%ecx
1101fd: 89 ca mov %ecx,%edx
1101ff: eb d0 jmp 1101d1 <_Watchdog_Report+0x2d>
00110134 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
110134: 55 push %ebp
110135: 89 e5 mov %esp,%ebp
110137: 57 push %edi
110138: 56 push %esi
110139: 53 push %ebx
11013a: 83 ec 20 sub $0x20,%esp
11013d: 8b 7d 08 mov 0x8(%ebp),%edi
110140: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
110143: 9c pushf
110144: fa cli
110145: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
110148: 56 push %esi
110149: 57 push %edi
11014a: 68 10 50 12 00 push $0x125010
11014f: e8 44 9e ff ff call 109f98 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
110154: 8b 1e mov (%esi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
110156: 83 c6 04 add $0x4,%esi
if ( !_Chain_Is_empty( header ) ) {
110159: 83 c4 10 add $0x10,%esp
11015c: 39 f3 cmp %esi,%ebx
11015e: 74 31 je 110191 <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
110160: 83 ec 08 sub $0x8,%esp
110163: 53 push %ebx
110164: 6a 00 push $0x0
110166: e8 39 00 00 00 call 1101a4 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
11016b: 8b 1b mov (%ebx),%ebx
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
11016d: 83 c4 10 add $0x10,%esp
110170: 39 f3 cmp %esi,%ebx
110172: 75 ec jne 110160 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
110174: 83 ec 08 sub $0x8,%esp
110177: 57 push %edi
110178: 68 27 50 12 00 push $0x125027
11017d: e8 16 9e ff ff call 109f98 <printk>
110182: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
110185: ff 75 e4 pushl -0x1c(%ebp)
110188: 9d popf
}
110189: 8d 65 f4 lea -0xc(%ebp),%esp
11018c: 5b pop %ebx
11018d: 5e pop %esi
11018e: 5f pop %edi
11018f: c9 leave
110190: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
110191: 83 ec 0c sub $0xc,%esp
110194: 68 36 50 12 00 push $0x125036
110199: e8 fa 9d ff ff call 109f98 <printk>
11019e: 83 c4 10 add $0x10,%esp
1101a1: eb e2 jmp 110185 <_Watchdog_Report_chain+0x51>
0010ed84 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
10ed84: 55 push %ebp
10ed85: 89 e5 mov %esp,%ebp
10ed87: 57 push %edi
10ed88: 56 push %esi
10ed89: 53 push %ebx
10ed8a: 83 ec 1c sub $0x1c,%esp
10ed8d: 8b 7d 08 mov 0x8(%ebp),%edi
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
10ed90: 9c pushf
10ed91: fa cli
10ed92: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
10ed93: 8b 1f mov (%edi),%ebx
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10ed95: 8d 47 04 lea 0x4(%edi),%eax
10ed98: 89 45 e4 mov %eax,-0x1c(%ebp)
if ( _Chain_Is_empty( header ) )
10ed9b: 39 c3 cmp %eax,%ebx
10ed9d: 74 11 je 10edb0 <_Watchdog_Tickle+0x2c>
* 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) {
10ed9f: 8b 43 10 mov 0x10(%ebx),%eax
10eda2: 85 c0 test %eax,%eax
10eda4: 74 34 je 10edda <_Watchdog_Tickle+0x56>
the_watchdog->delta_interval--;
10eda6: 48 dec %eax
10eda7: 89 43 10 mov %eax,0x10(%ebx)
if ( the_watchdog->delta_interval != 0 )
10edaa: 85 c0 test %eax,%eax
10edac: 74 2c je 10edda <_Watchdog_Tickle+0x56>
10edae: 66 90 xchg %ax,%ax
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
10edb0: 56 push %esi
10edb1: 9d popf
}
10edb2: 8d 65 f4 lea -0xc(%ebp),%esp
10edb5: 5b pop %ebx
10edb6: 5e pop %esi
10edb7: 5f pop %edi
10edb8: c9 leave
10edb9: c3 ret
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
10edba: 83 ec 08 sub $0x8,%esp
10edbd: ff 73 24 pushl 0x24(%ebx)
10edc0: ff 73 20 pushl 0x20(%ebx)
10edc3: ff 53 1c call *0x1c(%ebx)
10edc6: 83 c4 10 add $0x10,%esp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
10edc9: 9c pushf
10edca: fa cli
10edcb: 5e pop %esi
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
10edcc: 8b 1f mov (%edi),%ebx
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
10edce: 39 5d e4 cmp %ebx,-0x1c(%ebp)
10edd1: 74 dd je 10edb0 <_Watchdog_Tickle+0x2c>
10edd3: 8b 43 10 mov 0x10(%ebx),%eax
10edd6: 85 c0 test %eax,%eax
10edd8: 75 d6 jne 10edb0 <_Watchdog_Tickle+0x2c>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
10edda: 83 ec 0c sub $0xc,%esp
10eddd: 53 push %ebx
10edde: e8 35 ff ff ff call 10ed18 <_Watchdog_Remove>
_ISR_Enable( level );
10ede3: 56 push %esi
10ede4: 9d popf
switch( watchdog_state ) {
10ede5: 83 c4 10 add $0x10,%esp
10ede8: 83 f8 02 cmp $0x2,%eax
10edeb: 75 dc jne 10edc9 <_Watchdog_Tickle+0x45> <== NEVER TAKEN
10eded: eb cb jmp 10edba <_Watchdog_Tickle+0x36>
0010ee50 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10ee50: 55 push %ebp
10ee51: 89 e5 mov %esp,%ebp
10ee53: 57 push %edi
10ee54: 53 push %ebx
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
10ee55: 8b 1d e0 52 12 00 mov 0x1252e0,%ebx
uintptr_t size = Configuration.work_space_size;
10ee5b: 8b 15 e4 52 12 00 mov 0x1252e4,%edx
if ( Configuration.do_zero_of_workspace )
10ee61: 80 3d 08 53 12 00 00 cmpb $0x0,0x125308
10ee68: 75 1e jne 10ee88 <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10ee6a: 6a 04 push $0x4
10ee6c: 52 push %edx
10ee6d: 53 push %ebx
10ee6e: 68 e0 94 12 00 push $0x1294e0
10ee73: e8 14 dd ff ff call 10cb8c <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10ee78: 83 c4 10 add $0x10,%esp
10ee7b: 85 c0 test %eax,%eax
10ee7d: 74 13 je 10ee92 <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10ee7f: 8d 65 f8 lea -0x8(%ebp),%esp
10ee82: 5b pop %ebx
10ee83: 5f pop %edi
10ee84: c9 leave
10ee85: c3 ret
10ee86: 66 90 xchg %ax,%ax
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
10ee88: 31 c0 xor %eax,%eax
10ee8a: 89 df mov %ebx,%edi
10ee8c: 89 d1 mov %edx,%ecx
10ee8e: f3 aa rep stos %al,%es:(%edi)
10ee90: eb d8 jmp 10ee6a <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10ee92: 52 push %edx
10ee93: 6a 03 push $0x3
10ee95: 6a 01 push $0x1
10ee97: 6a 00 push $0x0
10ee99: e8 12 e0 ff ff call 10ceb0 <_Internal_error_Occurred>
0010bab8 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10bab8: 55 push %ebp
10bab9: 89 e5 mov %esp,%ebp
10babb: 57 push %edi
10babc: 56 push %esi
10babd: 53 push %ebx
10babe: 83 ec 1c sub $0x1c,%esp
10bac1: 8b 5d 08 mov 0x8(%ebp),%ebx
10bac4: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10bac7: 85 db test %ebx,%ebx
10bac9: 0f 84 f1 00 00 00 je 10bbc0 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10bacf: 8b 53 04 mov 0x4(%ebx),%edx
10bad2: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10bad8: 0f 87 e2 00 00 00 ja 10bbc0 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10bade: 85 f6 test %esi,%esi
10bae0: 74 10 je 10baf2 <adjtime+0x3a>
olddelta->tv_sec = 0;
10bae2: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10bae8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10baef: 8b 53 04 mov 0x4(%ebx),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10baf2: 8b 03 mov (%ebx),%eax
10baf4: 8d 04 80 lea (%eax,%eax,4),%eax
10baf7: 8d 04 80 lea (%eax,%eax,4),%eax
10bafa: 8d 04 80 lea (%eax,%eax,4),%eax
10bafd: 8d 04 80 lea (%eax,%eax,4),%eax
10bb00: 8d 04 80 lea (%eax,%eax,4),%eax
10bb03: 8d 04 80 lea (%eax,%eax,4),%eax
10bb06: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10bb09: 8d 04 02 lea (%edx,%eax,1),%eax
10bb0c: 3b 05 0c 67 12 00 cmp 0x12670c,%eax
10bb12: 73 0c jae 10bb20 <adjtime+0x68>
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
10bb14: 31 c0 xor %eax,%eax
return 0;
}
10bb16: 8d 65 f4 lea -0xc(%ebp),%esp
10bb19: 5b pop %ebx
10bb1a: 5e pop %esi
10bb1b: 5f pop %edi
10bb1c: c9 leave
10bb1d: c3 ret
10bb1e: 66 90 xchg %ax,%ax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bb20: a1 18 aa 12 00 mov 0x12aa18,%eax
10bb25: 40 inc %eax
10bb26: a3 18 aa 12 00 mov %eax,0x12aa18
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10bb2b: 83 ec 0c sub $0xc,%esp
10bb2e: 8d 7d e0 lea -0x20(%ebp),%edi
10bb31: 57 push %edi
10bb32: e8 89 17 00 00 call 10d2c0 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10bb37: 8b 03 mov (%ebx),%eax
10bb39: 01 45 e0 add %eax,-0x20(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10bb3c: 8b 43 04 mov 0x4(%ebx),%eax
10bb3f: 8d 04 80 lea (%eax,%eax,4),%eax
10bb42: 8d 04 80 lea (%eax,%eax,4),%eax
10bb45: 8d 04 80 lea (%eax,%eax,4),%eax
10bb48: c1 e0 03 shl $0x3,%eax
10bb4b: 03 45 e4 add -0x1c(%ebp),%eax
10bb4e: 89 45 e4 mov %eax,-0x1c(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10bb51: 83 c4 10 add $0x10,%esp
10bb54: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10bb59: 76 18 jbe 10bb73 <adjtime+0xbb>
10bb5b: 8b 55 e0 mov -0x20(%ebp),%edx
10bb5e: 66 90 xchg %ax,%ax
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10bb60: 2d 00 ca 9a 3b sub $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10bb65: 42 inc %edx
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 ) {
10bb66: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10bb6b: 77 f3 ja 10bb60 <adjtime+0xa8> <== NEVER TAKEN
10bb6d: 89 45 e4 mov %eax,-0x1c(%ebp)
10bb70: 89 55 e0 mov %edx,-0x20(%ebp)
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) ) {
10bb73: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10bb78: 77 19 ja 10bb93 <adjtime+0xdb> <== NEVER TAKEN
10bb7a: 8b 55 e0 mov -0x20(%ebp),%edx
10bb7d: 8d 76 00 lea 0x0(%esi),%esi
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10bb80: 05 00 ca 9a 3b add $0x3b9aca00,%eax
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
10bb85: 4a dec %edx
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) ) {
10bb86: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10bb8b: 76 f3 jbe 10bb80 <adjtime+0xc8>
10bb8d: 89 45 e4 mov %eax,-0x1c(%ebp)
10bb90: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10bb93: 83 ec 0c sub $0xc,%esp
10bb96: 57 push %edi
10bb97: e8 b0 17 00 00 call 10d34c <_TOD_Set>
_Thread_Enable_dispatch();
10bb9c: e8 73 29 00 00 call 10e514 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10bba1: 83 c4 10 add $0x10,%esp
10bba4: 85 f6 test %esi,%esi
10bba6: 0f 84 68 ff ff ff je 10bb14 <adjtime+0x5c> <== NEVER TAKEN
*olddelta = *delta;
10bbac: 8b 03 mov (%ebx),%eax
10bbae: 8b 53 04 mov 0x4(%ebx),%edx
10bbb1: 89 06 mov %eax,(%esi)
10bbb3: 89 56 04 mov %edx,0x4(%esi)
10bbb6: 31 c0 xor %eax,%eax
return 0;
}
10bbb8: 8d 65 f4 lea -0xc(%ebp),%esp
10bbbb: 5b pop %ebx
10bbbc: 5e pop %esi
10bbbd: 5f pop %edi
10bbbe: c9 leave
10bbbf: c3 ret
*/
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 );
10bbc0: e8 47 9e 00 00 call 115a0c <__errno>
10bbc5: c7 00 16 00 00 00 movl $0x16,(%eax)
10bbcb: b8 ff ff ff ff mov $0xffffffff,%eax
10bbd0: e9 41 ff ff ff jmp 10bb16 <adjtime+0x5e>
0010ba58 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10ba58: 55 push %ebp
10ba59: 89 e5 mov %esp,%ebp
10ba5b: 83 ec 08 sub $0x8,%esp
10ba5e: 8b 45 08 mov 0x8(%ebp),%eax
10ba61: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10ba64: 85 d2 test %edx,%edx
10ba66: 74 14 je 10ba7c <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10ba68: 83 f8 01 cmp $0x1,%eax
10ba6b: 74 47 je 10bab4 <clock_gettime+0x5c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10ba6d: 83 f8 04 cmp $0x4,%eax
10ba70: 74 32 je 10baa4 <clock_gettime+0x4c> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
10ba72: 83 f8 02 cmp $0x2,%eax
10ba75: 74 2d je 10baa4 <clock_gettime+0x4c>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
10ba77: 83 f8 03 cmp $0x3,%eax
10ba7a: 74 14 je 10ba90 <clock_gettime+0x38>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10ba7c: e8 27 a4 00 00 call 115ea8 <__errno>
10ba81: c7 00 16 00 00 00 movl $0x16,(%eax)
10ba87: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10ba8c: c9 leave
10ba8d: c3 ret
10ba8e: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10ba90: e8 13 a4 00 00 call 115ea8 <__errno>
10ba95: c7 00 58 00 00 00 movl $0x58,(%eax)
10ba9b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10baa0: c9 leave
10baa1: c3 ret
10baa2: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
10baa4: 83 ec 0c sub $0xc,%esp
10baa7: 52 push %edx
10baa8: e8 9f 1e 00 00 call 10d94c <_TOD_Get_uptime_as_timespec>
10baad: 31 c0 xor %eax,%eax
return 0;
10baaf: 83 c4 10 add $0x10,%esp
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10bab2: c9 leave
10bab3: c3 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
10bab4: 83 ec 0c sub $0xc,%esp
10bab7: 52 push %edx
10bab8: e8 37 1e 00 00 call 10d8f4 <_TOD_Get>
10babd: 31 c0 xor %eax,%eax
return 0;
10babf: 83 c4 10 add $0x10,%esp
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10bac2: c9 leave
10bac3: c3 ret
0010bac4 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
10bac4: 55 push %ebp
10bac5: 89 e5 mov %esp,%ebp
10bac7: 83 ec 08 sub $0x8,%esp
10baca: 8b 45 08 mov 0x8(%ebp),%eax
10bacd: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10bad0: 85 d2 test %edx,%edx
10bad2: 74 0f je 10bae3 <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10bad4: 83 f8 01 cmp $0x1,%eax
10bad7: 74 1f je 10baf8 <clock_settime+0x34>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10bad9: 83 f8 02 cmp $0x2,%eax
10badc: 74 42 je 10bb20 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10bade: 83 f8 03 cmp $0x3,%eax
10bae1: 74 3d je 10bb20 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10bae3: e8 c0 a3 00 00 call 115ea8 <__errno>
10bae8: c7 00 16 00 00 00 movl $0x16,(%eax)
10baee: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10baf3: c9 leave
10baf4: c3 ret
10baf5: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10baf8: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
10bafe: 76 e3 jbe 10bae3 <clock_settime+0x1f>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bb00: a1 38 b3 12 00 mov 0x12b338,%eax
10bb05: 40 inc %eax
10bb06: a3 38 b3 12 00 mov %eax,0x12b338
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
10bb0b: 83 ec 0c sub $0xc,%esp
10bb0e: 52 push %edx
10bb0f: e8 90 1e 00 00 call 10d9a4 <_TOD_Set>
_Thread_Enable_dispatch();
10bb14: e8 53 30 00 00 call 10eb6c <_Thread_Enable_dispatch>
10bb19: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
10bb1b: 83 c4 10 add $0x10,%esp
}
10bb1e: c9 leave
10bb1f: c3 ret
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10bb20: e8 83 a3 00 00 call 115ea8 <__errno>
10bb25: c7 00 58 00 00 00 movl $0x58,(%eax)
10bb2b: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10bb30: c9 leave
10bb31: c3 ret
0010b838 <getitimer>:
int getitimer(
int which,
struct itimerval *value
)
{
10b838: 55 push %ebp
10b839: 89 e5 mov %esp,%ebp
10b83b: 83 ec 08 sub $0x8,%esp
if ( !value )
10b83e: 8b 45 0c mov 0xc(%ebp),%eax
10b841: 85 c0 test %eax,%eax
10b843: 74 2f je 10b874 <getitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b845: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b849: 76 15 jbe 10b860 <getitimer+0x28>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b84b: e8 34 9f 00 00 call 115784 <__errno>
10b850: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b856: b8 ff ff ff ff mov $0xffffffff,%eax
10b85b: c9 leave
10b85c: c3 ret
10b85d: 8d 76 00 lea 0x0(%esi),%esi
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b860: e8 1f 9f 00 00 call 115784 <__errno>
10b865: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b86b: b8 ff ff ff ff mov $0xffffffff,%eax
10b870: c9 leave
10b871: c3 ret
10b872: 66 90 xchg %ax,%ax
int which,
struct itimerval *value
)
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
10b874: e8 0b 9f 00 00 call 115784 <__errno>
10b879: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b87f: eb d5 jmp 10b856 <getitimer+0x1e>
00114450 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
114450: 55 push %ebp
114451: 89 e5 mov %esp,%ebp
114453: 57 push %edi
114454: 56 push %esi
114455: 53 push %ebx
114456: 83 ec 3c sub $0x3c,%esp
114459: 8b 75 0c mov 0xc(%ebp),%esi
11445c: 8b 7d 10 mov 0x10(%ebp),%edi
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
11445f: e8 6c c8 ff ff call 110cd0 <getpid>
114464: 3b 45 08 cmp 0x8(%ebp),%eax
114467: 0f 85 2f 02 00 00 jne 11469c <killinfo+0x24c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
11446d: 85 f6 test %esi,%esi
11446f: 0f 84 3c 02 00 00 je 1146b1 <killinfo+0x261>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
114475: 8d 4e ff lea -0x1(%esi),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
114478: 83 f9 1f cmp $0x1f,%ecx
11447b: 0f 87 30 02 00 00 ja 1146b1 <killinfo+0x261>
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 )
114481: 8d 04 76 lea (%esi,%esi,2),%eax
114484: 83 3c 85 a8 9a 12 00 cmpl $0x1,0x129aa8(,%eax,4)
11448b: 01
11448c: 0f 84 cf 00 00 00 je 114561 <killinfo+0x111>
/*
* 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 ) )
114492: 83 fe 08 cmp $0x8,%esi
114495: 0f 84 d1 00 00 00 je 11456c <killinfo+0x11c>
11449b: 83 fe 04 cmp $0x4,%esi
11449e: 0f 84 c8 00 00 00 je 11456c <killinfo+0x11c>
1144a4: 83 fe 0b cmp $0xb,%esi
1144a7: 0f 84 bf 00 00 00 je 11456c <killinfo+0x11c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
1144ad: bb 01 00 00 00 mov $0x1,%ebx
1144b2: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1144b4: 89 75 dc mov %esi,-0x24(%ebp)
siginfo->si_code = SI_USER;
1144b7: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
1144be: 85 ff test %edi,%edi
1144c0: 0f 84 ca 01 00 00 je 114690 <killinfo+0x240>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
1144c6: 8b 07 mov (%edi),%eax
1144c8: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1144cb: a1 b8 94 12 00 mov 0x1294b8,%eax
1144d0: 40 inc %eax
1144d1: a3 b8 94 12 00 mov %eax,0x1294b8
/*
* 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;
1144d6: 8b 0d 78 95 12 00 mov 0x129578,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1144dc: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax
1144e2: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
1144e8: f7 d0 not %eax
1144ea: 85 c3 test %eax,%ebx
1144ec: 75 34 jne 114522 <killinfo+0xd2>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
1144ee: a1 40 9c 12 00 mov 0x129c40,%eax
1144f3: 3d 44 9c 12 00 cmp $0x129c44,%eax
1144f8: 75 1b jne 114515 <killinfo+0xc5>
1144fa: e9 89 00 00 00 jmp 114588 <killinfo+0x138>
1144ff: 90 nop
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
114500: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx
114506: f7 d2 not %edx
114508: 85 d3 test %edx,%ebx
11450a: 75 16 jne 114522 <killinfo+0xd2>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
11450c: 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 = the_chain->first ;
11450e: 3d 44 9c 12 00 cmp $0x129c44,%eax
114513: 74 73 je 114588 <killinfo+0x138> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
114515: 89 c1 mov %eax,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
114517: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
11451d: 85 58 30 test %ebx,0x30(%eax)
114520: 74 de je 114500 <killinfo+0xb0>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
114522: c6 41 74 01 movb $0x1,0x74(%ecx)
/*
* 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 ) ) {
114526: 50 push %eax
114527: 8d 45 dc lea -0x24(%ebp),%eax
11452a: 50 push %eax
11452b: 56 push %esi
11452c: 51 push %ecx
11452d: e8 6e 03 00 00 call 1148a0 <_POSIX_signals_Unblock_thread>
114532: 83 c4 10 add $0x10,%esp
114535: 84 c0 test %al,%al
114537: 0f 85 47 01 00 00 jne 114684 <killinfo+0x234>
/*
* 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 );
11453d: 83 ec 0c sub $0xc,%esp
114540: 53 push %ebx
114541: e8 36 03 00 00 call 11487c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
114546: 8d 1c 76 lea (%esi,%esi,2),%ebx
114549: c1 e3 02 shl $0x2,%ebx
11454c: 83 c4 10 add $0x10,%esp
11454f: 83 bb a0 9a 12 00 02 cmpl $0x2,0x129aa0(%ebx)
114556: 0f 84 ec 00 00 00 je 114648 <killinfo+0x1f8>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
11455c: e8 0b 97 ff ff call 10dc6c <_Thread_Enable_dispatch>
114561: 31 c0 xor %eax,%eax
return 0;
}
114563: 8d 65 f4 lea -0xc(%ebp),%esp
114566: 5b pop %ebx
114567: 5e pop %esi
114568: 5f pop %edi
114569: c9 leave
11456a: c3 ret
11456b: 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 );
11456c: e8 93 05 00 00 call 114b04 <pthread_self>
114571: 83 ec 08 sub $0x8,%esp
114574: 56 push %esi
114575: 50 push %eax
114576: e8 c1 04 00 00 call 114a3c <pthread_kill>
11457b: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
11457e: 8d 65 f4 lea -0xc(%ebp),%esp
114581: 5b pop %ebx
114582: 5e pop %esi
114583: 5f pop %edi
114584: c9 leave
114585: c3 ret
114586: 66 90 xchg %ax,%ax
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
114588: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax
11458f: 40 inc %eax
114590: 89 45 d4 mov %eax,-0x2c(%ebp)
114593: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
11459a: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
1145a1: 89 5d cc mov %ebx,-0x34(%ebp)
1145a4: 89 75 c0 mov %esi,-0x40(%ebp)
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
1145a7: 8b 55 d0 mov -0x30(%ebp),%edx
1145aa: 8b 04 95 8c 94 12 00 mov 0x12948c(,%edx,4),%eax
1145b1: 85 c0 test %eax,%eax
1145b3: 74 6c je 114621 <killinfo+0x1d1>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
1145b5: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
1145b8: 0f b7 70 10 movzwl 0x10(%eax),%esi
object_table = the_info->local_table;
1145bc: 8b 78 1c mov 0x1c(%eax),%edi
for ( index = 1 ; index <= maximum ; index++ ) {
1145bf: 85 f6 test %esi,%esi
1145c1: 74 5e je 114621 <killinfo+0x1d1>
1145c3: b8 01 00 00 00 mov $0x1,%eax
the_thread = (Thread_Control *) object_table[ index ];
1145c8: 8b 14 87 mov (%edi,%eax,4),%edx
if ( !the_thread )
1145cb: 85 d2 test %edx,%edx
1145cd: 74 4d je 11461c <killinfo+0x1cc>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
1145cf: 8b 4a 14 mov 0x14(%edx),%ecx
1145d2: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1145d5: 77 45 ja 11461c <killinfo+0x1cc>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1145d7: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx
1145dd: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx
1145e3: f7 d3 not %ebx
1145e5: 85 5d cc test %ebx,-0x34(%ebp)
1145e8: 74 32 je 11461c <killinfo+0x1cc>
*
* 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 ) {
1145ea: 3b 4d d4 cmp -0x2c(%ebp),%ecx
1145ed: 72 25 jb 114614 <killinfo+0x1c4>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
1145ef: 8b 5d c8 mov -0x38(%ebp),%ebx
1145f2: 8b 5b 10 mov 0x10(%ebx),%ebx
1145f5: 89 5d c4 mov %ebx,-0x3c(%ebp)
1145f8: 85 db test %ebx,%ebx
1145fa: 74 20 je 11461c <killinfo+0x1cc> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
1145fc: 8b 5a 10 mov 0x10(%edx),%ebx
1145ff: 85 db test %ebx,%ebx
114601: 74 11 je 114614 <killinfo+0x1c4>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
114603: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp)
11460a: 75 10 jne 11461c <killinfo+0x1cc>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
11460c: 81 e3 00 00 00 10 and $0x10000000,%ebx
114612: 74 08 je 11461c <killinfo+0x1cc>
114614: 89 4d d4 mov %ecx,-0x2c(%ebp)
114617: 89 55 c8 mov %edx,-0x38(%ebp)
11461a: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
11461c: 40 inc %eax
11461d: 39 c6 cmp %eax,%esi
11461f: 73 a7 jae 1145c8 <killinfo+0x178>
* + 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++) {
114621: ff 45 d0 incl -0x30(%ebp)
114624: 83 7d d0 05 cmpl $0x5,-0x30(%ebp)
114628: 0f 85 79 ff ff ff jne 1145a7 <killinfo+0x157>
11462e: 8b 5d cc mov -0x34(%ebp),%ebx
114631: 8b 75 c0 mov -0x40(%ebp),%esi
}
}
}
}
if ( interested ) {
114634: 8b 55 c8 mov -0x38(%ebp),%edx
114637: 85 d2 test %edx,%edx
114639: 0f 84 fe fe ff ff je 11453d <killinfo+0xed>
11463f: 8b 4d c8 mov -0x38(%ebp),%ecx
114642: e9 db fe ff ff jmp 114522 <killinfo+0xd2>
114647: 90 nop
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
114648: 83 ec 0c sub $0xc,%esp
11464b: 68 20 9c 12 00 push $0x129c20
114650: e8 a7 7f ff ff call 10c5fc <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
114655: 83 c4 10 add $0x10,%esp
114658: 85 c0 test %eax,%eax
11465a: 74 6a je 1146c6 <killinfo+0x276>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
11465c: 8d 78 08 lea 0x8(%eax),%edi
11465f: 8d 75 dc lea -0x24(%ebp),%esi
114662: b9 03 00 00 00 mov $0x3,%ecx
114667: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
114669: 83 ec 08 sub $0x8,%esp
11466c: 50 push %eax
11466d: 81 c3 c0 9c 12 00 add $0x129cc0,%ebx
114673: 53 push %ebx
114674: e8 47 7f ff ff call 10c5c0 <_Chain_Append>
114679: 83 c4 10 add $0x10,%esp
11467c: e9 db fe ff ff jmp 11455c <killinfo+0x10c>
114681: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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();
114684: e8 e3 95 ff ff call 10dc6c <_Thread_Enable_dispatch>
114689: 31 c0 xor %eax,%eax
return 0;
11468b: e9 ee fe ff ff jmp 11457e <killinfo+0x12e>
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
114690: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
114697: e9 2f fe ff ff jmp 1144cb <killinfo+0x7b>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
11469c: e8 c7 09 00 00 call 115068 <__errno>
1146a1: c7 00 03 00 00 00 movl $0x3,(%eax)
1146a7: b8 ff ff ff ff mov $0xffffffff,%eax
1146ac: e9 cd fe ff ff jmp 11457e <killinfo+0x12e>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
1146b1: e8 b2 09 00 00 call 115068 <__errno>
1146b6: c7 00 16 00 00 00 movl $0x16,(%eax)
1146bc: b8 ff ff ff ff mov $0xffffffff,%eax
1146c1: e9 b8 fe ff ff jmp 11457e <killinfo+0x12e>
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();
1146c6: e8 a1 95 ff ff call 10dc6c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
1146cb: e8 98 09 00 00 call 115068 <__errno>
1146d0: c7 00 0b 00 00 00 movl $0xb,(%eax)
1146d6: 83 c8 ff or $0xffffffff,%eax
1146d9: e9 a0 fe ff ff jmp 11457e <killinfo+0x12e>
0010ffa4 <mq_getattr>:
int mq_getattr(
mqd_t mqdes,
struct mq_attr *mqstat
)
{
10ffa4: 55 push %ebp
10ffa5: 89 e5 mov %esp,%ebp
10ffa7: 53 push %ebx
10ffa8: 83 ec 14 sub $0x14,%esp
10ffab: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
10ffae: 85 db test %ebx,%ebx
10ffb0: 74 54 je 110006 <mq_getattr+0x62> <== NEVER TAKEN
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(
10ffb2: 51 push %ecx
10ffb3: 8d 45 f4 lea -0xc(%ebp),%eax
10ffb6: 50 push %eax
10ffb7: ff 75 08 pushl 0x8(%ebp)
10ffba: 68 c0 26 13 00 push $0x1326c0
10ffbf: e8 1c 32 00 00 call 1131e0 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
10ffc4: 83 c4 10 add $0x10,%esp
10ffc7: 8b 55 f4 mov -0xc(%ebp),%edx
10ffca: 85 d2 test %edx,%edx
10ffcc: 75 26 jne 10fff4 <mq_getattr+0x50>
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
10ffce: 8b 50 10 mov 0x10(%eax),%edx
* Return the old values.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
mqstat->mq_flags = the_mq_fd->oflag;
10ffd1: 8b 40 14 mov 0x14(%eax),%eax
10ffd4: 89 03 mov %eax,(%ebx)
mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size;
10ffd6: 8b 42 68 mov 0x68(%edx),%eax
10ffd9: 89 43 08 mov %eax,0x8(%ebx)
mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages;
10ffdc: 8b 42 60 mov 0x60(%edx),%eax
10ffdf: 89 43 04 mov %eax,0x4(%ebx)
mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages;
10ffe2: 8b 42 64 mov 0x64(%edx),%eax
10ffe5: 89 43 0c mov %eax,0xc(%ebx)
_Thread_Enable_dispatch();
10ffe8: e8 b7 3a 00 00 call 113aa4 <_Thread_Enable_dispatch>
10ffed: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10ffef: 8b 5d fc mov -0x4(%ebp),%ebx
10fff2: c9 leave
10fff3: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fff4: e8 c7 b0 00 00 call 11b0c0 <__errno>
10fff9: c7 00 09 00 00 00 movl $0x9,(%eax)
10ffff: b8 ff ff ff ff mov $0xffffffff,%eax
110004: eb e9 jmp 10ffef <mq_getattr+0x4b>
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
rtems_set_errno_and_return_minus_one( EINVAL );
110006: e8 b5 b0 00 00 call 11b0c0 <__errno>
11000b: c7 00 16 00 00 00 movl $0x16,(%eax)
110011: b8 ff ff ff ff mov $0xffffffff,%eax
110016: eb d7 jmp 10ffef <mq_getattr+0x4b>
001100fc <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
1100fc: 55 push %ebp
1100fd: 89 e5 mov %esp,%ebp
1100ff: 57 push %edi
110100: 56 push %esi
110101: 53 push %ebx
110102: 83 ec 2c sub $0x2c,%esp
110105: 8b 75 0c mov 0xc(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
110108: a1 58 21 13 00 mov 0x132158,%eax
11010d: 40 inc %eax
11010e: a3 58 21 13 00 mov %eax,0x132158
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
110113: 89 f0 mov %esi,%eax
110115: 25 00 02 00 00 and $0x200,%eax
11011a: 89 45 d4 mov %eax,-0x2c(%ebp)
11011d: 0f 85 c9 00 00 00 jne 1101ec <mq_open+0xf0>
110123: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
11012a: 83 ec 0c sub $0xc,%esp
11012d: 68 c0 26 13 00 push $0x1326c0
110132: e8 f9 2b 00 00 call 112d30 <_Objects_Allocate>
110137: 89 c3 mov %eax,%ebx
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
110139: 83 c4 10 add $0x10,%esp
11013c: 85 c0 test %eax,%eax
11013e: 0f 84 b4 00 00 00 je 1101f8 <mq_open+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
110144: 89 70 14 mov %esi,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
110147: 83 ec 08 sub $0x8,%esp
11014a: 8d 45 e4 lea -0x1c(%ebp),%eax
11014d: 50 push %eax
11014e: ff 75 08 pushl 0x8(%ebp)
110151: e8 aa 72 00 00 call 117400 <_POSIX_Message_queue_Name_to_id>
110156: 89 c7 mov %eax,%edi
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
110158: 83 c4 10 add $0x10,%esp
11015b: 85 c0 test %eax,%eax
11015d: 75 59 jne 1101b8 <mq_open+0xbc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
11015f: 81 e6 00 0a 00 00 and $0xa00,%esi
110165: 81 fe 00 0a 00 00 cmp $0xa00,%esi
11016b: 0f 84 a7 00 00 00 je 110218 <mq_open+0x11c>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
110171: 50 push %eax
110172: 8d 45 dc lea -0x24(%ebp),%eax
110175: 50 push %eax
110176: ff 75 e4 pushl -0x1c(%ebp)
110179: 68 20 25 13 00 push $0x132520
11017e: e8 5d 30 00 00 call 1131e0 <_Objects_Get>
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
110183: 89 45 e0 mov %eax,-0x20(%ebp)
the_mq->open_count += 1;
110186: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
110189: 89 43 10 mov %eax,0x10(%ebx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11018c: 0f b7 53 08 movzwl 0x8(%ebx),%edx
110190: a1 dc 26 13 00 mov 0x1326dc,%eax
110195: 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;
110198: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
11019f: e8 00 39 00 00 call 113aa4 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
1101a4: e8 fb 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
1101a9: 8b 43 08 mov 0x8(%ebx),%eax
1101ac: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
1101af: 8d 65 f4 lea -0xc(%ebp),%esp
1101b2: 5b pop %ebx
1101b3: 5e pop %esi
1101b4: 5f pop %edi
1101b5: c9 leave
1101b6: c3 ret
1101b7: 90 nop
if ( status ) {
/*
* 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) ) ) {
1101b8: 83 f8 02 cmp $0x2,%eax
1101bb: 0f 84 87 00 00 00 je 110248 <mq_open+0x14c>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
1101c1: 83 ec 08 sub $0x8,%esp
1101c4: 53 push %ebx
1101c5: 68 c0 26 13 00 push $0x1326c0
1101ca: e8 e1 2e 00 00 call 1130b0 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
1101cf: e8 d0 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
1101d4: e8 e7 ae 00 00 call 11b0c0 <__errno>
1101d9: 89 38 mov %edi,(%eax)
1101db: b8 ff ff ff ff mov $0xffffffff,%eax
1101e0: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
1101e3: 8d 65 f4 lea -0xc(%ebp),%esp
1101e6: 5b pop %ebx
1101e7: 5e pop %esi
1101e8: 5f pop %edi
1101e9: c9 leave
1101ea: c3 ret
1101eb: 90 nop
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
1101ec: 8b 45 14 mov 0x14(%ebp),%eax
1101ef: 89 45 d0 mov %eax,-0x30(%ebp)
1101f2: e9 33 ff ff ff jmp 11012a <mq_open+0x2e>
1101f7: 90 nop
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
1101f8: e8 a7 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
1101fd: e8 be ae 00 00 call 11b0c0 <__errno>
110202: c7 00 17 00 00 00 movl $0x17,(%eax)
110208: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
11020d: 8d 65 f4 lea -0xc(%ebp),%esp
110210: 5b pop %ebx
110211: 5e pop %esi
110212: 5f pop %edi
110213: c9 leave
110214: c3 ret
110215: 8d 76 00 lea 0x0(%esi),%esi
110218: 83 ec 08 sub $0x8,%esp
11021b: 53 push %ebx
11021c: 68 c0 26 13 00 push $0x1326c0
110221: e8 8a 2e 00 00 call 1130b0 <_Objects_Free>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
110226: e8 79 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
11022b: e8 90 ae 00 00 call 11b0c0 <__errno>
110230: c7 00 11 00 00 00 movl $0x11,(%eax)
110236: b8 ff ff ff ff mov $0xffffffff,%eax
11023b: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
11023e: 8d 65 f4 lea -0xc(%ebp),%esp
110241: 5b pop %ebx
110242: 5e pop %esi
110243: 5f pop %edi
110244: c9 leave
110245: c3 ret
110246: 66 90 xchg %ax,%ax
if ( status ) {
/*
* 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) ) ) {
110248: 8b 55 d4 mov -0x2c(%ebp),%edx
11024b: 85 d2 test %edx,%edx
11024d: 0f 84 6e ff ff ff je 1101c1 <mq_open+0xc5>
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
110253: 8d 45 e0 lea -0x20(%ebp),%eax
110256: 50 push %eax
110257: ff 75 d0 pushl -0x30(%ebp)
11025a: 6a 01 push $0x1
11025c: ff 75 08 pushl 0x8(%ebp)
11025f: e8 08 70 00 00 call 11726c <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
110264: 83 c4 10 add $0x10,%esp
110267: 40 inc %eax
110268: 74 26 je 110290 <mq_open+0x194>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
11026a: 8b 45 e0 mov -0x20(%ebp),%eax
11026d: 89 43 10 mov %eax,0x10(%ebx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
110270: 0f b7 53 08 movzwl 0x8(%ebx),%edx
110274: a1 dc 26 13 00 mov 0x1326dc,%eax
110279: 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;
11027c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
110283: e8 1c 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
110288: 8b 43 08 mov 0x8(%ebx),%eax
11028b: e9 1f ff ff ff jmp 1101af <mq_open+0xb3>
110290: 83 ec 08 sub $0x8,%esp
110293: 53 push %ebx
110294: 68 c0 26 13 00 push $0x1326c0
110299: e8 12 2e 00 00 call 1130b0 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
11029e: e8 01 38 00 00 call 113aa4 <_Thread_Enable_dispatch>
1102a3: b8 ff ff ff ff mov $0xffffffff,%eax
return (mqd_t) -1;
1102a8: 83 c4 10 add $0x10,%esp
1102ab: e9 ff fe ff ff jmp 1101af <mq_open+0xb3>
0012146c <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
12146c: 55 push %ebp
12146d: 89 e5 mov %esp,%ebp
12146f: 56 push %esi
121470: 53 push %ebx
121471: 8b 5d 08 mov 0x8(%ebp),%ebx
121474: 8b 75 0c mov 0xc(%ebp),%esi
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
121477: 83 ec 0c sub $0xc,%esp
12147a: 53 push %ebx
12147b: e8 88 01 00 00 call 121608 <_Timespec_Is_valid>
121480: 83 c4 10 add $0x10,%esp
121483: 84 c0 test %al,%al
121485: 0f 84 e1 00 00 00 je 12156c <nanosleep+0x100>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
12148b: 8b 13 mov (%ebx),%edx
12148d: 85 d2 test %edx,%edx
12148f: 0f 88 d7 00 00 00 js 12156c <nanosleep+0x100> <== NEVER TAKEN
121495: 8b 43 04 mov 0x4(%ebx),%eax
121498: 85 c0 test %eax,%eax
12149a: 0f 88 cc 00 00 00 js 12156c <nanosleep+0x100> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
1214a0: 83 ec 0c sub $0xc,%esp
1214a3: 53 push %ebx
1214a4: e8 f3 19 ff ff call 112e9c <_Timespec_To_ticks>
1214a9: 89 c3 mov %eax,%ebx
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
1214ab: 83 c4 10 add $0x10,%esp
1214ae: 85 c0 test %eax,%eax
1214b0: 75 36 jne 1214e8 <nanosleep+0x7c>
1214b2: a1 58 94 12 00 mov 0x129458,%eax
1214b7: 40 inc %eax
1214b8: a3 58 94 12 00 mov %eax,0x129458
_Thread_Disable_dispatch();
_Thread_Yield_processor();
1214bd: e8 8e d7 fe ff call 10ec50 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
1214c2: e8 85 cb fe ff call 10e04c <_Thread_Enable_dispatch>
if ( rmtp ) {
1214c7: 85 f6 test %esi,%esi
1214c9: 0f 84 93 00 00 00 je 121562 <nanosleep+0xf6>
rmtp->tv_sec = 0;
1214cf: c7 06 00 00 00 00 movl $0x0,(%esi)
rmtp->tv_nsec = 0;
1214d5: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
1214dc: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
}
1214de: 8d 65 f8 lea -0x8(%ebp),%esp
1214e1: 5b pop %ebx
1214e2: 5e pop %esi
1214e3: c9 leave
1214e4: c3 ret
1214e5: 8d 76 00 lea 0x0(%esi),%esi
1214e8: a1 58 94 12 00 mov 0x129458,%eax
1214ed: 40 inc %eax
1214ee: a3 58 94 12 00 mov %eax,0x129458
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
1214f3: 83 ec 08 sub $0x8,%esp
1214f6: 68 08 00 00 10 push $0x10000008
1214fb: ff 35 18 95 12 00 pushl 0x129518
121501: e8 32 d4 fe ff call 10e938 <_Thread_Set_state>
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
121506: 8b 15 18 95 12 00 mov 0x129518,%edx
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
12150c: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12150f: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
121516: c7 42 64 b4 de 10 00 movl $0x10deb4,0x64(%edx)
the_watchdog->id = id;
12151d: 89 42 68 mov %eax,0x68(%edx)
the_watchdog->user_data = user_data;
121520: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
121527: 89 5a 54 mov %ebx,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12152a: 58 pop %eax
12152b: 59 pop %ecx
12152c: 83 c2 48 add $0x48,%edx
12152f: 52 push %edx
121530: 68 38 95 12 00 push $0x129538
121535: e8 fe da fe ff call 10f038 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
12153a: e8 0d cb fe ff call 10e04c <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
12153f: 83 c4 10 add $0x10,%esp
121542: 85 f6 test %esi,%esi
121544: 74 1c je 121562 <nanosleep+0xf6>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
121546: a1 18 95 12 00 mov 0x129518,%eax
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
12154b: 03 58 5c add 0x5c(%eax),%ebx
12154e: 2b 58 60 sub 0x60(%eax),%ebx
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
121551: 83 ec 08 sub $0x8,%esp
121554: 56 push %esi
121555: 53 push %ebx
121556: e8 65 00 00 00 call 1215c0 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
12155b: 83 c4 10 add $0x10,%esp
12155e: 85 db test %ebx,%ebx
121560: 75 1f jne 121581 <nanosleep+0x115>
rtems_set_errno_and_return_minus_one( EINTR );
121562: 31 c0 xor %eax,%eax
#endif
}
return 0;
}
121564: 8d 65 f8 lea -0x8(%ebp),%esp
121567: 5b pop %ebx
121568: 5e pop %esi
121569: c9 leave
12156a: c3 ret
12156b: 90 nop
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
12156c: e8 77 3f ff ff call 1154e8 <__errno>
121571: c7 00 16 00 00 00 movl $0x16,(%eax)
121577: b8 ff ff ff ff mov $0xffffffff,%eax
12157c: e9 5d ff ff ff jmp 1214de <nanosleep+0x72>
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
121581: e8 62 3f ff ff call 1154e8 <__errno>
121586: c7 00 04 00 00 00 movl $0x4,(%eax)
12158c: b8 ff ff ff ff mov $0xffffffff,%eax
121591: e9 48 ff ff ff jmp 1214de <nanosleep+0x72>
00110398 <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
110398: 55 push %ebp
110399: 89 e5 mov %esp,%ebp
11039b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
11039e: 85 c0 test %eax,%eax
1103a0: 74 12 je 1103b4 <pthread_attr_destroy+0x1c>
1103a2: 8b 10 mov (%eax),%edx
1103a4: 85 d2 test %edx,%edx
1103a6: 74 0c je 1103b4 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
1103a8: c7 00 00 00 00 00 movl $0x0,(%eax)
1103ae: 31 c0 xor %eax,%eax
return 0;
}
1103b0: c9 leave
1103b1: c3 ret
1103b2: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
return 0;
1103b4: b8 16 00 00 00 mov $0x16,%eax
}
1103b9: c9 leave
1103ba: c3 ret
00112824 <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
112824: 55 push %ebp
112825: 89 e5 mov %esp,%ebp
112827: 8b 45 08 mov 0x8(%ebp),%eax
11282a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
11282d: 85 c0 test %eax,%eax
11282f: 74 1f je 112850 <pthread_attr_setinheritsched+0x2c>
112831: 8b 08 mov (%eax),%ecx
112833: 85 c9 test %ecx,%ecx
112835: 74 19 je 112850 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
112837: 8d 4a ff lea -0x1(%edx),%ecx
11283a: 83 f9 01 cmp $0x1,%ecx
11283d: 76 09 jbe 112848 <pthread_attr_setinheritsched+0x24>
11283f: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
112844: c9 leave
112845: c3 ret
112846: 66 90 xchg %ax,%ax
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
112848: 89 50 10 mov %edx,0x10(%eax)
11284b: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
11284d: c9 leave
11284e: c3 ret
11284f: 90 nop
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
112850: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
112855: c9 leave
112856: c3 ret
00110568 <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
110568: 55 push %ebp
110569: 89 e5 mov %esp,%ebp
11056b: 57 push %edi
11056c: 56 push %esi
11056d: 8b 7d 08 mov 0x8(%ebp),%edi
110570: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
110573: 85 ff test %edi,%edi
110575: 74 1d je 110594 <pthread_attr_setschedparam+0x2c>
110577: 8b 07 mov (%edi),%eax
110579: 85 c0 test %eax,%eax
11057b: 74 17 je 110594 <pthread_attr_setschedparam+0x2c>
11057d: 85 f6 test %esi,%esi
11057f: 74 13 je 110594 <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
110581: 83 c7 18 add $0x18,%edi
110584: b9 07 00 00 00 mov $0x7,%ecx
110589: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
11058b: 31 c0 xor %eax,%eax
return 0;
}
11058d: 5e pop %esi
11058e: 5f pop %edi
11058f: c9 leave
110590: c3 ret
110591: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
attr->schedparam = *param;
return 0;
110594: b8 16 00 00 00 mov $0x16,%eax
}
110599: 5e pop %esi
11059a: 5f pop %edi
11059b: c9 leave
11059c: c3 ret
001105a0 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
1105a0: 55 push %ebp
1105a1: 89 e5 mov %esp,%ebp
1105a3: 8b 45 08 mov 0x8(%ebp),%eax
1105a6: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
1105a9: 85 c0 test %eax,%eax
1105ab: 74 23 je 1105d0 <pthread_attr_setschedpolicy+0x30>
1105ad: 8b 08 mov (%eax),%ecx
1105af: 85 c9 test %ecx,%ecx
1105b1: 74 1d je 1105d0 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
1105b3: 85 d2 test %edx,%edx
1105b5: 78 0a js 1105c1 <pthread_attr_setschedpolicy+0x21>
1105b7: 83 fa 02 cmp $0x2,%edx
1105ba: 7e 0c jle 1105c8 <pthread_attr_setschedpolicy+0x28>
1105bc: 83 fa 04 cmp $0x4,%edx
1105bf: 74 07 je 1105c8 <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
1105c1: b8 86 00 00 00 mov $0x86,%eax
return 0;
default:
return ENOTSUP;
}
}
1105c6: c9 leave
1105c7: c3 ret
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
1105c8: 89 50 14 mov %edx,0x14(%eax)
1105cb: 31 c0 xor %eax,%eax
return 0;
default:
return ENOTSUP;
}
}
1105cd: c9 leave
1105ce: c3 ret
1105cf: 90 nop
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
1105d0: b8 16 00 00 00 mov $0x16,%eax
default:
return ENOTSUP;
}
}
1105d5: c9 leave
1105d6: c3 ret
001105d8 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
1105d8: 55 push %ebp
1105d9: 89 e5 mov %esp,%ebp
1105db: 8b 45 08 mov 0x8(%ebp),%eax
1105de: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
1105e1: 85 c0 test %eax,%eax
1105e3: 74 1a je 1105ff <pthread_attr_setscope+0x27>
1105e5: 8b 08 mov (%eax),%ecx
1105e7: 85 c9 test %ecx,%ecx
1105e9: 74 14 je 1105ff <pthread_attr_setscope+0x27>
return EINVAL;
switch ( contentionscope ) {
1105eb: 85 d2 test %edx,%edx
1105ed: 75 0d jne 1105fc <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
1105ef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
1105f6: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
1105f8: c9 leave
1105f9: c3 ret
1105fa: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
1105fc: 4a dec %edx
1105fd: 74 09 je 110608 <pthread_attr_setscope+0x30>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
1105ff: b8 16 00 00 00 mov $0x16,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
110604: c9 leave
110605: c3 ret
110606: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
110608: b8 86 00 00 00 mov $0x86,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
11060d: c9 leave
11060e: c3 ret
00110610 <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
110610: 55 push %ebp
110611: 89 e5 mov %esp,%ebp
110613: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110616: 85 c0 test %eax,%eax
110618: 74 12 je 11062c <pthread_attr_setstackaddr+0x1c>
11061a: 8b 10 mov (%eax),%edx
11061c: 85 d2 test %edx,%edx
11061e: 74 0c je 11062c <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
110620: 8b 55 0c mov 0xc(%ebp),%edx
110623: 89 50 04 mov %edx,0x4(%eax)
110626: 31 c0 xor %eax,%eax
return 0;
}
110628: c9 leave
110629: c3 ret
11062a: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->stackaddr = stackaddr;
return 0;
11062c: b8 16 00 00 00 mov $0x16,%eax
}
110631: c9 leave
110632: c3 ret
00112858 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
112858: 55 push %ebp
112859: 89 e5 mov %esp,%ebp
11285b: 8b 45 08 mov 0x8(%ebp),%eax
11285e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
112861: 85 c0 test %eax,%eax
112863: 74 23 je 112888 <pthread_attr_setstacksize+0x30>
112865: 8b 08 mov (%eax),%ecx
112867: 85 c9 test %ecx,%ecx
112869: 74 1d je 112888 <pthread_attr_setstacksize+0x30>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
11286b: 8b 0d b8 64 12 00 mov 0x1264b8,%ecx
112871: d1 e1 shl %ecx
112873: 39 d1 cmp %edx,%ecx
112875: 77 09 ja 112880 <pthread_attr_setstacksize+0x28>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
112877: 89 50 08 mov %edx,0x8(%eax)
11287a: 31 c0 xor %eax,%eax
return 0;
}
11287c: c9 leave
11287d: c3 ret
11287e: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
112880: 89 48 08 mov %ecx,0x8(%eax)
112883: 31 c0 xor %eax,%eax
else
attr->stacksize = stacksize;
return 0;
}
112885: c9 leave
112886: c3 ret
112887: 90 nop
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
112888: b8 16 00 00 00 mov $0x16,%eax
return 0;
}
11288d: c9 leave
11288e: c3 ret
0010bf5c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10bf5c: 55 push %ebp
10bf5d: 89 e5 mov %esp,%ebp
10bf5f: 57 push %edi
10bf60: 56 push %esi
10bf61: 53 push %ebx
10bf62: 83 ec 2c sub $0x2c,%esp
10bf65: 8b 5d 08 mov 0x8(%ebp),%ebx
10bf68: 8b 7d 0c mov 0xc(%ebp),%edi
10bf6b: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10bf6e: 85 db test %ebx,%ebx
10bf70: 0f 84 82 00 00 00 je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
if ( count == 0 )
10bf76: 85 f6 test %esi,%esi
10bf78: 74 7e je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10bf7a: 85 ff test %edi,%edi
10bf7c: 0f 84 92 00 00 00 je 10c014 <pthread_barrier_init+0xb8><== NEVER TAKEN
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10bf82: 8b 17 mov (%edi),%edx
10bf84: 85 d2 test %edx,%edx
10bf86: 74 70 je 10bff8 <pthread_barrier_init+0x9c>
return EINVAL;
switch ( the_attr->process_shared ) {
10bf88: 8b 47 04 mov 0x4(%edi),%eax
10bf8b: 85 c0 test %eax,%eax
10bf8d: 75 69 jne 10bff8 <pthread_barrier_init+0x9c><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10bf8f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10bf96: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bf99: a1 78 ab 12 00 mov 0x12ab78,%eax
10bf9e: 40 inc %eax
10bf9f: a3 78 ab 12 00 mov %eax,0x12ab78
* 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 *)
10bfa4: 83 ec 0c sub $0xc,%esp
10bfa7: 68 c0 af 12 00 push $0x12afc0
10bfac: e8 b3 20 00 00 call 10e064 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10bfb1: 83 c4 10 add $0x10,%esp
10bfb4: 85 c0 test %eax,%eax
10bfb6: 74 50 je 10c008 <pthread_barrier_init+0xac><== NEVER TAKEN
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10bfb8: 83 ec 08 sub $0x8,%esp
10bfbb: 8d 55 e0 lea -0x20(%ebp),%edx
10bfbe: 52 push %edx
10bfbf: 8d 50 10 lea 0x10(%eax),%edx
10bfc2: 52 push %edx
10bfc3: 89 45 d4 mov %eax,-0x2c(%ebp)
10bfc6: e8 b9 16 00 00 call 10d684 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bfcb: 8b 45 d4 mov -0x2c(%ebp),%eax
10bfce: 8b 50 08 mov 0x8(%eax),%edx
10bfd1: 0f b7 f2 movzwl %dx,%esi
10bfd4: 8b 0d dc af 12 00 mov 0x12afdc,%ecx
10bfda: 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;
10bfdd: 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;
10bfe4: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10bfe6: e8 9d 2d 00 00 call 10ed88 <_Thread_Enable_dispatch>
10bfeb: 31 c0 xor %eax,%eax
return 0;
10bfed: 83 c4 10 add $0x10,%esp
}
10bff0: 8d 65 f4 lea -0xc(%ebp),%esp
10bff3: 5b pop %ebx
10bff4: 5e pop %esi
10bff5: 5f pop %edi
10bff6: c9 leave
10bff7: c3 ret
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
10bff8: b8 16 00 00 00 mov $0x16,%eax
}
10bffd: 8d 65 f4 lea -0xc(%ebp),%esp
10c000: 5b pop %ebx
10c001: 5e pop %esi
10c002: 5f pop %edi
10c003: c9 leave
10c004: c3 ret
10c005: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10c008: e8 7b 2d 00 00 call 10ed88 <_Thread_Enable_dispatch>
10c00d: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10c012: eb e9 jmp 10bffd <pthread_barrier_init+0xa1>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
10c014: 83 ec 0c sub $0xc,%esp
10c017: 8d 7d d8 lea -0x28(%ebp),%edi
10c01a: 57 push %edi
10c01b: e8 80 fe ff ff call 10bea0 <pthread_barrierattr_init>
10c020: 83 c4 10 add $0x10,%esp
10c023: e9 5a ff ff ff jmp 10bf82 <pthread_barrier_init+0x26>
0010c028 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10c028: 55 push %ebp
10c029: 89 e5 mov %esp,%ebp
10c02b: 83 ec 18 sub $0x18,%esp
10c02e: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10c031: 85 c0 test %eax,%eax
10c033: 74 4f je 10c084 <pthread_barrier_wait+0x5c>
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
10c035: 51 push %ecx
10c036: 8d 55 f4 lea -0xc(%ebp),%edx
10c039: 52 push %edx
10c03a: ff 30 pushl (%eax)
10c03c: 68 c0 af 12 00 push $0x12afc0
10c041: e8 ce 24 00 00 call 10e514 <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
10c046: 83 c4 10 add $0x10,%esp
10c049: 8b 55 f4 mov -0xc(%ebp),%edx
10c04c: 85 d2 test %edx,%edx
10c04e: 75 34 jne 10c084 <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10c050: 83 ec 0c sub $0xc,%esp
10c053: 6a 00 push $0x0
10c055: 6a 00 push $0x0
10c057: 6a 01 push $0x1
10c059: ff 70 08 pushl 0x8(%eax)
10c05c: 83 c0 10 add $0x10,%eax
10c05f: 50 push %eax
10c060: e8 53 16 00 00 call 10d6b8 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
10c065: 83 c4 20 add $0x20,%esp
10c068: e8 1b 2d 00 00 call 10ed88 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10c06d: 83 ec 0c sub $0xc,%esp
10c070: a1 38 ac 12 00 mov 0x12ac38,%eax
10c075: ff 70 34 pushl 0x34(%eax)
10c078: e8 5b 65 00 00 call 1125d8 <_POSIX_Barrier_Translate_core_barrier_return_code>
10c07d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c080: c9 leave
10c081: c3 ret
10c082: 66 90 xchg %ax,%ax
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10c084: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c089: c9 leave
10c08a: c3 ret
0010be58 <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10be58: 55 push %ebp
10be59: 89 e5 mov %esp,%ebp
10be5b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10be5e: 85 c0 test %eax,%eax
10be60: 74 12 je 10be74 <pthread_barrierattr_destroy+0x1c>
10be62: 8b 10 mov (%eax),%edx
10be64: 85 d2 test %edx,%edx
10be66: 74 0c je 10be74 <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10be68: c7 00 00 00 00 00 movl $0x0,(%eax)
10be6e: 31 c0 xor %eax,%eax
return 0;
}
10be70: c9 leave
10be71: c3 ret
10be72: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10be74: b8 16 00 00 00 mov $0x16,%eax
}
10be79: c9 leave
10be7a: c3 ret
0010b738 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
10b738: 55 push %ebp
10b739: 89 e5 mov %esp,%ebp
10b73b: 83 ec 18 sub $0x18,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
10b73e: a1 54 a8 12 00 mov 0x12a854,%eax
10b743: 85 c0 test %eax,%eax
10b745: 74 09 je 10b750 <pthread_cancel+0x18>
10b747: b8 47 00 00 00 mov $0x47,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b74c: c9 leave
10b74d: c3 ret
10b74e: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
10b750: 51 push %ecx
10b751: 8d 45 f4 lea -0xc(%ebp),%eax
10b754: 50 push %eax
10b755: ff 75 08 pushl 0x8(%ebp)
10b758: 68 80 aa 12 00 push $0x12aa80
10b75d: e8 e2 20 00 00 call 10d844 <_Objects_Get>
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10b762: 83 c4 10 add $0x10,%esp
10b765: 8b 55 f4 mov -0xc(%ebp),%edx
10b768: 85 d2 test %edx,%edx
10b76a: 75 20 jne 10b78c <pthread_cancel+0x54>
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
10b76c: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
10b772: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx)
10b779: 00 00 00
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
10b77c: 83 ec 0c sub $0xc,%esp
10b77f: 50 push %eax
10b780: e8 c3 5e 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b785: 31 c0 xor %eax,%eax
return 0;
10b787: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b78a: c9 leave
10b78b: c3 ret
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10b78c: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b791: c9 leave
10b792: c3 ret
0010b5b8 <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10b5b8: 55 push %ebp
10b5b9: 89 e5 mov %esp,%ebp
10b5bb: 57 push %edi
10b5bc: 56 push %esi
10b5bd: 53 push %ebx
10b5be: 83 ec 1c sub $0x1c,%esp
10b5c1: 8b 5d 08 mov 0x8(%ebp),%ebx
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b5c4: a1 f8 99 12 00 mov 0x1299f8,%eax
10b5c9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b5cf: 8b 15 38 99 12 00 mov 0x129938,%edx
10b5d5: 42 inc %edx
10b5d6: 89 15 38 99 12 00 mov %edx,0x129938
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
10b5dc: 9c pushf
10b5dd: fa cli
10b5de: 5e pop %esi
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
10b5df: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
10b5e5: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax)
10b5eb: 74 4f je 10b63c <pthread_cleanup_pop+0x84>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10b5ed: 8b 42 04 mov 0x4(%edx),%eax
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10b5f0: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10b5f2: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10b5f5: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10b5f8: 89 0a mov %ecx,(%edx)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10b5fa: 56 push %esi
10b5fb: 9d popf
tmp_handler = *handler;
10b5fc: 8d 7d d8 lea -0x28(%ebp),%edi
10b5ff: b9 04 00 00 00 mov $0x4,%ecx
10b604: 89 c6 mov %eax,%esi
10b606: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10b608: 8b 75 e0 mov -0x20(%ebp),%esi
10b60b: 8b 7d e4 mov -0x1c(%ebp),%edi
_Workspace_Free( handler );
10b60e: 83 ec 0c sub $0xc,%esp
10b611: 50 push %eax
10b612: e8 f5 38 00 00 call 10ef0c <_Workspace_Free>
_Thread_Enable_dispatch();
10b617: e8 24 27 00 00 call 10dd40 <_Thread_Enable_dispatch>
if ( execute )
10b61c: 83 c4 10 add $0x10,%esp
10b61f: 85 db test %ebx,%ebx
10b621: 75 09 jne 10b62c <pthread_cleanup_pop+0x74>
(*tmp_handler.routine)( tmp_handler.arg );
}
10b623: 8d 65 f4 lea -0xc(%ebp),%esp
10b626: 5b pop %ebx
10b627: 5e pop %esi
10b628: 5f pop %edi
10b629: c9 leave
10b62a: c3 ret
10b62b: 90 nop
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b62c: 89 7d 08 mov %edi,0x8(%ebp)
10b62f: 89 f0 mov %esi,%eax
}
10b631: 8d 65 f4 lea -0xc(%ebp),%esp
10b634: 5b pop %ebx
10b635: 5e pop %esi
10b636: 5f pop %edi
10b637: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b638: ff e0 jmp *%eax
10b63a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10b63c: e8 ff 26 00 00 call 10dd40 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10b641: 56 push %esi
10b642: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10b643: 8d 65 f4 lea -0xc(%ebp),%esp
10b646: 5b pop %ebx
10b647: 5e pop %esi
10b648: 5f pop %edi
10b649: c9 leave
10b64a: c3 ret
0010b964 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b964: 55 push %ebp
10b965: 89 e5 mov %esp,%ebp
10b967: 56 push %esi
10b968: 53 push %ebx
10b969: 8b 5d 08 mov 0x8(%ebp),%ebx
10b96c: 8b 75 0c mov 0xc(%ebp),%esi
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
10b96f: 85 db test %ebx,%ebx
10b971: 74 4d je 10b9c0 <pthread_cleanup_push+0x5c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b973: a1 b8 af 12 00 mov 0x12afb8,%eax
10b978: 40 inc %eax
10b979: a3 b8 af 12 00 mov %eax,0x12afb8
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b97e: 83 ec 0c sub $0xc,%esp
10b981: 6a 10 push $0x10
10b983: e8 b0 40 00 00 call 10fa38 <_Workspace_Allocate>
if ( handler ) {
10b988: 83 c4 10 add $0x10,%esp
10b98b: 85 c0 test %eax,%eax
10b98d: 74 25 je 10b9b4 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
10b98f: 8b 15 78 b0 12 00 mov 0x12b078,%edx
10b995: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx
10b99b: 81 c2 e0 00 00 00 add $0xe0,%edx
handler->routine = routine;
10b9a1: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b9a4: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b9a7: 83 ec 08 sub $0x8,%esp
10b9aa: 50 push %eax
10b9ab: 52 push %edx
10b9ac: e8 9b 17 00 00 call 10d14c <_Chain_Append>
10b9b1: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10b9b4: 8d 65 f8 lea -0x8(%ebp),%esp
10b9b7: 5b pop %ebx
10b9b8: 5e pop %esi
10b9b9: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b9ba: e9 39 2e 00 00 jmp 10e7f8 <_Thread_Enable_dispatch>
10b9bf: 90 nop
}
10b9c0: 8d 65 f8 lea -0x8(%ebp),%esp
10b9c3: 5b pop %ebx
10b9c4: 5e pop %esi
10b9c5: c9 leave
10b9c6: c3 ret
0010c650 <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10c650: 55 push %ebp
10c651: 89 e5 mov %esp,%ebp
10c653: 53 push %ebx
10c654: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c657: 8d 45 f4 lea -0xc(%ebp),%eax
10c65a: 50 push %eax
10c65b: ff 75 08 pushl 0x8(%ebp)
10c65e: e8 65 00 00 00 call 10c6c8 <_POSIX_Condition_variables_Get>
10c663: 89 c3 mov %eax,%ebx
switch ( location ) {
10c665: 83 c4 10 add $0x10,%esp
10c668: 8b 4d f4 mov -0xc(%ebp),%ecx
10c66b: 85 c9 test %ecx,%ecx
10c66d: 75 25 jne 10c694 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10c66f: 83 ec 0c sub $0xc,%esp
10c672: 8d 40 18 lea 0x18(%eax),%eax
10c675: 50 push %eax
10c676: e8 7d 3b 00 00 call 1101f8 <_Thread_queue_First>
10c67b: 83 c4 10 add $0x10,%esp
10c67e: 85 c0 test %eax,%eax
10c680: 74 1e je 10c6a0 <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10c682: e8 05 34 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c687: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c68c: 8b 5d fc mov -0x4(%ebp),%ebx
10c68f: c9 leave
10c690: c3 ret
10c691: 8d 76 00 lea 0x0(%esi),%esi
{
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
10c694: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c699: 8b 5d fc mov -0x4(%ebp),%ebx
10c69c: c9 leave
10c69d: c3 ret
10c69e: 66 90 xchg %ax,%ax
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10c6a0: 83 ec 08 sub $0x8,%esp
10c6a3: 53 push %ebx
10c6a4: 68 40 c1 12 00 push $0x12c140
10c6a9: e8 36 27 00 00 call 10ede4 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
10c6ae: 58 pop %eax
10c6af: 5a pop %edx
10c6b0: 53 push %ebx
10c6b1: 68 40 c1 12 00 push $0x12c140
10c6b6: e8 2d 2a 00 00 call 10f0e8 <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10c6bb: e8 cc 33 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c6c0: 31 c0 xor %eax,%eax
return 0;
10c6c2: 83 c4 10 add $0x10,%esp
10c6c5: eb d2 jmp 10c699 <pthread_cond_destroy+0x49>
0010c71c <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c71c: 55 push %ebp
10c71d: 89 e5 mov %esp,%ebp
10c71f: 53 push %ebx
10c720: 83 ec 14 sub $0x14,%esp
10c723: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c726: 85 db test %ebx,%ebx
10c728: 0f 84 86 00 00 00 je 10c7b4 <pthread_cond_init+0x98>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c72e: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c732: 74 06 je 10c73a <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c734: 8b 03 mov (%ebx),%eax
10c736: 85 c0 test %eax,%eax
10c738: 75 0a jne 10c744 <pthread_cond_init+0x28>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
10c73a: b8 16 00 00 00 mov $0x16,%eax
}
10c73f: 8b 5d fc mov -0x4(%ebp),%ebx
10c742: c9 leave
10c743: c3 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c744: a1 58 bc 12 00 mov 0x12bc58,%eax
10c749: 40 inc %eax
10c74a: a3 58 bc 12 00 mov %eax,0x12bc58
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
10c74f: 83 ec 0c sub $0xc,%esp
10c752: 68 40 c1 12 00 push $0x12c140
10c757: e8 0c 26 00 00 call 10ed68 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c75c: 83 c4 10 add $0x10,%esp
10c75f: 85 c0 test %eax,%eax
10c761: 74 5d je 10c7c0 <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c763: 8b 53 04 mov 0x4(%ebx),%edx
10c766: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c769: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
10c770: 6a 74 push $0x74
10c772: 68 00 08 00 00 push $0x800
10c777: 6a 00 push $0x0
10c779: 8d 50 18 lea 0x18(%eax),%edx
10c77c: 52 push %edx
10c77d: 89 45 f4 mov %eax,-0xc(%ebp)
10c780: e8 f3 3a 00 00 call 110278 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c785: 8b 45 f4 mov -0xc(%ebp),%eax
10c788: 8b 50 08 mov 0x8(%eax),%edx
10c78b: 0f b7 da movzwl %dx,%ebx
10c78e: 8b 0d 5c c1 12 00 mov 0x12c15c,%ecx
10c794: 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;
10c797: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c79e: 8b 45 08 mov 0x8(%ebp),%eax
10c7a1: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c7a3: e8 e4 32 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c7a8: 31 c0 xor %eax,%eax
return 0;
10c7aa: 83 c4 10 add $0x10,%esp
}
10c7ad: 8b 5d fc mov -0x4(%ebp),%ebx
10c7b0: c9 leave
10c7b1: c3 ret
10c7b2: 66 90 xchg %ax,%ax
)
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c7b4: bb c8 50 12 00 mov $0x1250c8,%ebx
10c7b9: e9 70 ff ff ff jmp 10c72e <pthread_cond_init+0x12>
10c7be: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c7c0: e8 c7 32 00 00 call 10fa8c <_Thread_Enable_dispatch>
10c7c5: b8 0c 00 00 00 mov $0xc,%eax
return ENOMEM;
10c7ca: e9 70 ff ff ff jmp 10c73f <pthread_cond_init+0x23>
0010c5b4 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c5b4: 55 push %ebp
10c5b5: 89 e5 mov %esp,%ebp
10c5b7: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10c5ba: 85 c0 test %eax,%eax
10c5bc: 74 12 je 10c5d0 <pthread_condattr_destroy+0x1c>
10c5be: 8b 10 mov (%eax),%edx
10c5c0: 85 d2 test %edx,%edx
10c5c2: 74 0c je 10c5d0 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10c5c4: c7 00 00 00 00 00 movl $0x0,(%eax)
10c5ca: 31 c0 xor %eax,%eax
return 0;
}
10c5cc: c9 leave
10c5cd: c3 ret
10c5ce: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10c5d0: b8 16 00 00 00 mov $0x16,%eax
}
10c5d5: c9 leave
10c5d6: c3 ret
0010c5d8 <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10c5d8: 55 push %ebp
10c5d9: 89 e5 mov %esp,%ebp
10c5db: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10c5de: 85 c0 test %eax,%eax
10c5e0: 74 0e je 10c5f0 <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10c5e2: 8b 50 04 mov 0x4(%eax),%edx
10c5e5: 8b 45 0c mov 0xc(%ebp),%eax
10c5e8: 89 10 mov %edx,(%eax)
10c5ea: 31 c0 xor %eax,%eax
return 0;
}
10c5ec: c9 leave
10c5ed: c3 ret
10c5ee: 66 90 xchg %ax,%ax
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
10c5f0: b0 16 mov $0x16,%al
return EINVAL;
*pshared = attr->process_shared;
return 0;
}
10c5f2: c9 leave
10c5f3: c3 ret
0010c618 <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
10c618: 55 push %ebp
10c619: 89 e5 mov %esp,%ebp
10c61b: 8b 45 08 mov 0x8(%ebp),%eax
10c61e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10c621: 85 c0 test %eax,%eax
10c623: 74 05 je 10c62a <pthread_condattr_setpshared+0x12>
return EINVAL;
switch ( pshared ) {
10c625: 83 fa 01 cmp $0x1,%edx
10c628: 76 0a jbe 10c634 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10c62a: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10c62f: c9 leave
10c630: c3 ret
10c631: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10c634: 89 50 04 mov %edx,0x4(%eax)
10c637: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10c639: c9 leave
10c63a: c3 ret
0010bccc <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10bccc: 55 push %ebp
10bccd: 89 e5 mov %esp,%ebp
10bccf: 57 push %edi
10bcd0: 56 push %esi
10bcd1: 53 push %ebx
10bcd2: 83 ec 5c sub $0x5c,%esp
10bcd5: 8b 5d 0c mov 0xc(%ebp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10bcd8: 8b 7d 10 mov 0x10(%ebp),%edi
10bcdb: 85 ff test %edi,%edi
10bcdd: 0f 84 81 01 00 00 je 10be64 <pthread_create+0x198>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10bce3: 85 db test %ebx,%ebx
10bce5: 74 65 je 10bd4c <pthread_create+0x80>
if ( !the_attr->is_initialized )
10bce7: 8b 33 mov (%ebx),%esi
10bce9: 85 f6 test %esi,%esi
10bceb: 74 1f je 10bd0c <pthread_create+0x40>
* 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) )
10bced: 8b 4b 04 mov 0x4(%ebx),%ecx
10bcf0: 85 c9 test %ecx,%ecx
10bcf2: 74 0b je 10bcff <pthread_create+0x33>
10bcf4: 8b 43 08 mov 0x8(%ebx),%eax
10bcf7: 3b 05 b8 64 12 00 cmp 0x1264b8,%eax
10bcfd: 72 0d jb 10bd0c <pthread_create+0x40>
* 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 ) {
10bcff: 8b 43 10 mov 0x10(%ebx),%eax
10bd02: 83 f8 01 cmp $0x1,%eax
10bd05: 74 4d je 10bd54 <pthread_create+0x88>
10bd07: 83 f8 02 cmp $0x2,%eax
10bd0a: 74 10 je 10bd1c <pthread_create+0x50>
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
10bd0c: ba 16 00 00 00 mov $0x16,%edx
}
10bd11: 89 d0 mov %edx,%eax
10bd13: 8d 65 f4 lea -0xc(%ebp),%esp
10bd16: 5b pop %ebx
10bd17: 5e pop %esi
10bd18: 5f pop %edi
10bd19: c9 leave
10bd1a: c3 ret
10bd1b: 90 nop
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10bd1c: 8b 43 14 mov 0x14(%ebx),%eax
10bd1f: 89 45 b0 mov %eax,-0x50(%ebp)
schedparam = the_attr->schedparam;
10bd22: 8d 4d c4 lea -0x3c(%ebp),%ecx
10bd25: 89 4d b4 mov %ecx,-0x4c(%ebp)
10bd28: 8d 73 18 lea 0x18(%ebx),%esi
10bd2b: b9 07 00 00 00 mov $0x7,%ecx
10bd30: 8b 7d b4 mov -0x4c(%ebp),%edi
10bd33: 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 )
10bd35: 8b 53 0c mov 0xc(%ebx),%edx
10bd38: 85 d2 test %edx,%edx
10bd3a: 74 49 je 10bd85 <pthread_create+0xb9> <== ALWAYS TAKEN
10bd3c: ba 86 00 00 00 mov $0x86,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10bd41: 89 d0 mov %edx,%eax
10bd43: 8d 65 f4 lea -0xc(%ebp),%esp
10bd46: 5b pop %ebx
10bd47: 5e pop %esi
10bd48: 5f pop %edi
10bd49: c9 leave
10bd4a: c3 ret
10bd4b: 90 nop
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10bd4c: bb 40 3b 12 00 mov $0x123b40,%ebx
10bd51: eb 94 jmp 10bce7 <pthread_create+0x1b>
10bd53: 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 ];
10bd54: a1 58 a7 12 00 mov 0x12a758,%eax
10bd59: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
schedpolicy = api->schedpolicy;
10bd5f: 8b 86 80 00 00 00 mov 0x80(%esi),%eax
10bd65: 89 45 b0 mov %eax,-0x50(%ebp)
schedparam = api->schedparam;
10bd68: 8d 4d c4 lea -0x3c(%ebp),%ecx
10bd6b: 89 4d b4 mov %ecx,-0x4c(%ebp)
10bd6e: 81 c6 84 00 00 00 add $0x84,%esi
10bd74: b9 07 00 00 00 mov $0x7,%ecx
10bd79: 8b 7d b4 mov -0x4c(%ebp),%edi
10bd7c: 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 )
10bd7e: 8b 53 0c mov 0xc(%ebx),%edx
10bd81: 85 d2 test %edx,%edx
10bd83: 75 b7 jne 10bd3c <pthread_create+0x70>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10bd85: 83 ec 0c sub $0xc,%esp
10bd88: ff 75 c4 pushl -0x3c(%ebp)
10bd8b: e8 64 69 00 00 call 1126f4 <_POSIX_Priority_Is_valid>
10bd90: 83 c4 10 add $0x10,%esp
10bd93: 84 c0 test %al,%al
10bd95: 0f 84 71 ff ff ff je 10bd0c <pthread_create+0x40> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10bd9b: 8b 7d c4 mov -0x3c(%ebp),%edi
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10bd9e: 0f b6 35 bc 64 12 00 movzbl 0x1264bc,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10bda5: 8d 45 e0 lea -0x20(%ebp),%eax
10bda8: 50 push %eax
10bda9: 8d 45 e4 lea -0x1c(%ebp),%eax
10bdac: 50 push %eax
10bdad: ff 75 b4 pushl -0x4c(%ebp)
10bdb0: ff 75 b0 pushl -0x50(%ebp)
10bdb3: e8 58 69 00 00 call 112710 <_POSIX_Thread_Translate_sched_param>
10bdb8: 89 c2 mov %eax,%edx
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10bdba: 83 c4 10 add $0x10,%esp
10bdbd: 85 c0 test %eax,%eax
10bdbf: 0f 85 4c ff ff ff jne 10bd11 <pthread_create+0x45>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10bdc5: 83 ec 0c sub $0xc,%esp
10bdc8: ff 35 50 a7 12 00 pushl 0x12a750
10bdce: 89 45 a4 mov %eax,-0x5c(%ebp)
10bdd1: e8 6e 17 00 00 call 10d544 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10bdd6: c7 04 24 60 a9 12 00 movl $0x12a960,(%esp)
10bddd: e8 62 21 00 00 call 10df44 <_Objects_Allocate>
10bde2: 89 45 ac mov %eax,-0x54(%ebp)
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
10bde5: 83 c4 10 add $0x10,%esp
10bde8: 85 c0 test %eax,%eax
10bdea: 8b 55 a4 mov -0x5c(%ebp),%edx
10bded: 0f 84 06 01 00 00 je 10bef9 <pthread_create+0x22d>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
10bdf3: 8b 4b 08 mov 0x8(%ebx),%ecx
10bdf6: 50 push %eax
10bdf7: 6a 00 push $0x0
10bdf9: 6a 00 push $0x0
10bdfb: ff 75 e0 pushl -0x20(%ebp)
10bdfe: ff 75 e4 pushl -0x1c(%ebp)
10be01: 6a 01 push $0x1
10be03: 81 e6 ff 00 00 00 and $0xff,%esi
10be09: 29 fe sub %edi,%esi
10be0b: 56 push %esi
10be0c: 6a 01 push $0x1
10be0e: a1 b8 64 12 00 mov 0x1264b8,%eax
10be13: d1 e0 shl %eax
10be15: 39 c8 cmp %ecx,%eax
10be17: 73 02 jae 10be1b <pthread_create+0x14f>
10be19: 89 c8 mov %ecx,%eax
10be1b: 50 push %eax
10be1c: ff 73 04 pushl 0x4(%ebx)
10be1f: ff 75 ac pushl -0x54(%ebp)
10be22: 68 60 a9 12 00 push $0x12a960
10be27: 89 55 a4 mov %edx,-0x5c(%ebp)
10be2a: e8 01 2f 00 00 call 10ed30 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10be2f: 83 c4 30 add $0x30,%esp
10be32: 84 c0 test %al,%al
10be34: 8b 55 a4 mov -0x5c(%ebp),%edx
10be37: 75 35 jne 10be6e <pthread_create+0x1a2>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10be39: 83 ec 08 sub $0x8,%esp
10be3c: ff 75 ac pushl -0x54(%ebp)
10be3f: 68 60 a9 12 00 push $0x12a960
10be44: e8 7b 24 00 00 call 10e2c4 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10be49: 59 pop %ecx
10be4a: ff 35 50 a7 12 00 pushl 0x12a750
10be50: e8 37 17 00 00 call 10d58c <_API_Mutex_Unlock>
10be55: ba 0b 00 00 00 mov $0xb,%edx
return EAGAIN;
10be5a: 83 c4 10 add $0x10,%esp
10be5d: e9 af fe ff ff jmp 10bd11 <pthread_create+0x45>
10be62: 66 90 xchg %ax,%ax
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10be64: ba 0e 00 00 00 mov $0xe,%edx
10be69: e9 a3 fe ff ff jmp 10bd11 <pthread_create+0x45>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10be6e: 8b 45 ac mov -0x54(%ebp),%eax
10be71: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10be77: 89 45 a8 mov %eax,-0x58(%ebp)
api->Attributes = *the_attr;
10be7a: b9 0f 00 00 00 mov $0xf,%ecx
10be7f: 89 c7 mov %eax,%edi
10be81: 89 de mov %ebx,%esi
10be83: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10be85: 8b 43 38 mov 0x38(%ebx),%eax
10be88: 8b 4d a8 mov -0x58(%ebp),%ecx
10be8b: 89 41 3c mov %eax,0x3c(%ecx)
api->schedpolicy = schedpolicy;
10be8e: 8b 45 b0 mov -0x50(%ebp),%eax
10be91: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = schedparam;
10be97: 89 cf mov %ecx,%edi
10be99: 81 c7 84 00 00 00 add $0x84,%edi
10be9f: b9 07 00 00 00 mov $0x7,%ecx
10bea4: 8b 75 b4 mov -0x4c(%ebp),%esi
10bea7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
* This insures we evaluate the process-wide signals pending when we
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
10bea9: 8b 4d ac mov -0x54(%ebp),%ecx
10beac: c6 41 74 01 movb $0x1,0x74(%ecx)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10beb0: 83 ec 0c sub $0xc,%esp
10beb3: 6a 00 push $0x0
10beb5: ff 75 14 pushl 0x14(%ebp)
10beb8: ff 75 10 pushl 0x10(%ebp)
10bebb: 6a 01 push $0x1
10bebd: 51 push %ecx
10bebe: 89 55 a4 mov %edx,-0x5c(%ebp)
10bec1: e8 06 39 00 00 call 10f7cc <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10bec6: 83 c4 20 add $0x20,%esp
10bec9: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
10becd: 8b 55 a4 mov -0x5c(%ebp),%edx
10bed0: 74 42 je 10bf14 <pthread_create+0x248>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10bed2: 8b 45 ac mov -0x54(%ebp),%eax
10bed5: 8b 48 08 mov 0x8(%eax),%ecx
10bed8: 8b 45 08 mov 0x8(%ebp),%eax
10bedb: 89 08 mov %ecx,(%eax)
_RTEMS_Unlock_allocator();
10bedd: 83 ec 0c sub $0xc,%esp
10bee0: ff 35 50 a7 12 00 pushl 0x12a750
10bee6: 89 55 a4 mov %edx,-0x5c(%ebp)
10bee9: e8 9e 16 00 00 call 10d58c <_API_Mutex_Unlock>
return 0;
10beee: 83 c4 10 add $0x10,%esp
10bef1: 8b 55 a4 mov -0x5c(%ebp),%edx
10bef4: e9 18 fe ff ff jmp 10bd11 <pthread_create+0x45>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bef9: 83 ec 0c sub $0xc,%esp
10befc: ff 35 50 a7 12 00 pushl 0x12a750
10bf02: e8 85 16 00 00 call 10d58c <_API_Mutex_Unlock>
10bf07: ba 0b 00 00 00 mov $0xb,%edx
return EAGAIN;
10bf0c: 83 c4 10 add $0x10,%esp
10bf0f: e9 fd fd ff ff jmp 10bd11 <pthread_create+0x45>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10bf14: 83 ec 0c sub $0xc,%esp
10bf17: 8b 45 a8 mov -0x58(%ebp),%eax
10bf1a: 05 8c 00 00 00 add $0x8c,%eax
10bf1f: 50 push %eax
10bf20: e8 97 3a 00 00 call 10f9bc <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10bf25: 8b 4d a8 mov -0x58(%ebp),%ecx
10bf28: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10bf2e: 58 pop %eax
10bf2f: 5a pop %edx
10bf30: 89 c8 mov %ecx,%eax
10bf32: 05 a4 00 00 00 add $0xa4,%eax
10bf37: 50 push %eax
10bf38: 68 78 a7 12 00 push $0x12a778
10bf3d: e8 9e 3d 00 00 call 10fce0 <_Watchdog_Insert>
10bf42: 83 c4 10 add $0x10,%esp
10bf45: 8b 55 a4 mov -0x5c(%ebp),%edx
10bf48: eb 88 jmp 10bed2 <pthread_create+0x206>
00114a20 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
114a20: 55 push %ebp
114a21: 89 e5 mov %esp,%ebp
114a23: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
114a26: ff 75 08 pushl 0x8(%ebp)
114a29: ff 35 78 95 12 00 pushl 0x129578
114a2f: e8 88 ff ff ff call 1149bc <_POSIX_Thread_Exit>
114a34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
114a37: c9 leave <== NOT EXECUTED
114a38: c3 ret <== NOT EXECUTED
0010de8c <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10de8c: 55 push %ebp
10de8d: 89 e5 mov %esp,%ebp
10de8f: 57 push %edi
10de90: 56 push %esi
10de91: 53 push %ebx
10de92: 83 ec 1c sub $0x1c,%esp
10de95: 8b 7d 0c mov 0xc(%ebp),%edi
10de98: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10de9b: 85 ff test %edi,%edi
10de9d: 74 69 je 10df08 <pthread_getschedparam+0x7c>
10de9f: 85 db test %ebx,%ebx
10dea1: 74 65 je 10df08 <pthread_getschedparam+0x7c>
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
10dea3: 51 push %ecx
10dea4: 8d 45 e4 lea -0x1c(%ebp),%eax
10dea7: 50 push %eax
10dea8: ff 75 08 pushl 0x8(%ebp)
10deab: 68 40 d7 12 00 push $0x12d740
10deb0: e8 bb 23 00 00 call 110270 <_Objects_Get>
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10deb5: 83 c4 10 add $0x10,%esp
10deb8: 8b 55 e4 mov -0x1c(%ebp),%edx
10debb: 85 d2 test %edx,%edx
10debd: 75 39 jne 10def8 <pthread_getschedparam+0x6c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10debf: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi
if ( policy )
*policy = api->schedpolicy;
10dec5: 8b 96 80 00 00 00 mov 0x80(%esi),%edx
10decb: 89 17 mov %edx,(%edi)
if ( param ) {
*param = api->schedparam;
10decd: 81 c6 84 00 00 00 add $0x84,%esi
10ded3: b9 07 00 00 00 mov $0x7,%ecx
10ded8: 89 df mov %ebx,%edi
10deda: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
param->sched_priority =
10dedc: 0f b6 15 5c 92 12 00 movzbl 0x12925c,%edx
10dee3: 2b 50 14 sub 0x14(%eax),%edx
10dee6: 89 13 mov %edx,(%ebx)
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10dee8: e8 f7 2b 00 00 call 110ae4 <_Thread_Enable_dispatch>
10deed: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10deef: 8d 65 f4 lea -0xc(%ebp),%esp
10def2: 5b pop %ebx
10def3: 5e pop %esi
10def4: 5f pop %edi
10def5: c9 leave
10def6: c3 ret
10def7: 90 nop
if ( !policy || !param )
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10def8: b8 03 00 00 00 mov $0x3,%eax
break;
}
return ESRCH;
}
10defd: 8d 65 f4 lea -0xc(%ebp),%esp
10df00: 5b pop %ebx
10df01: 5e pop %esi
10df02: 5f pop %edi
10df03: c9 leave
10df04: c3 ret
10df05: 8d 76 00 lea 0x0(%esi),%esi
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
10df08: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10df0d: 8d 65 f4 lea -0xc(%ebp),%esp
10df10: 5b pop %ebx
10df11: 5e pop %esi
10df12: 5f pop %edi
10df13: c9 leave
10df14: c3 ret
0010bcc4 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10bcc4: 55 push %ebp
10bcc5: 89 e5 mov %esp,%ebp
10bcc7: 83 ec 2c sub $0x2c,%esp
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get (
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
10bcca: 8d 45 f4 lea -0xc(%ebp),%eax
10bccd: 50 push %eax
10bcce: ff 75 08 pushl 0x8(%ebp)
10bcd1: 68 80 b8 12 00 push $0x12b880
10bcd6: e8 55 25 00 00 call 10e230 <_Objects_Get>
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10bcdb: 83 c4 10 add $0x10,%esp
10bcde: 8b 55 f4 mov -0xc(%ebp),%edx
10bce1: 85 d2 test %edx,%edx
10bce3: 75 2b jne 10bd10 <pthread_getspecific+0x4c>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10bce5: 8b 15 98 b4 12 00 mov 0x12b498,%edx
10bceb: 8b 4a 08 mov 0x8(%edx),%ecx
index = _Objects_Get_index( _Thread_Executing->Object.id );
key_data = (void *) the_key->Values[ api ][ index ];
10bcee: 89 ca mov %ecx,%edx
10bcf0: c1 ea 18 shr $0x18,%edx
10bcf3: 83 e2 07 and $0x7,%edx
10bcf6: 0f b7 c9 movzwl %cx,%ecx
10bcf9: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax
10bcfd: 8b 04 88 mov (%eax,%ecx,4),%eax
_Thread_Enable_dispatch();
10bd00: 89 45 e4 mov %eax,-0x1c(%ebp)
10bd03: e8 9c 2d 00 00 call 10eaa4 <_Thread_Enable_dispatch>
10bd08: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10bd0b: c9 leave
10bd0c: c3 ret
10bd0d: 8d 76 00 lea 0x0(%esi),%esi
uint32_t index;
Objects_Locations location;
void *key_data;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
10bd10: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10bd12: c9 leave
10bd13: c3 ret
00110a94 <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
110a94: 55 push %ebp
110a95: 89 e5 mov %esp,%ebp
110a97: 53 push %ebx
110a98: 83 ec 18 sub $0x18,%esp
110a9b: 8b 5d 0c mov 0xc(%ebp),%ebx
110a9e: 8d 45 f4 lea -0xc(%ebp),%eax
110aa1: 50 push %eax
110aa2: ff 75 08 pushl 0x8(%ebp)
110aa5: 68 80 2c 13 00 push $0x132c80
110aaa: e8 b5 23 00 00 call 112e64 <_Objects_Get>
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
110aaf: 83 c4 10 add $0x10,%esp
110ab2: 8b 55 f4 mov -0xc(%ebp),%edx
110ab5: 85 d2 test %edx,%edx
110ab7: 74 0b je 110ac4 <pthread_join+0x30>
110ab9: b8 03 00 00 00 mov $0x3,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
110abe: 8b 5d fc mov -0x4(%ebp),%ebx
110ac1: c9 leave
110ac2: c3 ret
110ac3: 90 nop
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110ac4: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
110aca: 8b 4a 3c mov 0x3c(%edx),%ecx
110acd: 85 c9 test %ecx,%ecx
110acf: 74 43 je 110b14 <pthread_join+0x80>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
110ad1: 8b 0d 78 2a 13 00 mov 0x132a78,%ecx
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
110ad7: 39 c8 cmp %ecx,%eax
110ad9: 74 49 je 110b24 <pthread_join+0x90>
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
110adb: 8d 45 f0 lea -0x10(%ebp),%eax
110ade: 89 41 28 mov %eax,0x28(%ecx)
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;
110ae1: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx)
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
110ae8: 50 push %eax
110ae9: 68 20 3f 11 00 push $0x113f20
110aee: 6a 00 push $0x0
110af0: 83 c2 40 add $0x40,%edx
110af3: 52 push %edx
110af4: e8 17 31 00 00 call 113c10 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
110af9: e8 da 2b 00 00 call 1136d8 <_Thread_Enable_dispatch>
if ( value_ptr )
110afe: 83 c4 10 add $0x10,%esp
110b01: 85 db test %ebx,%ebx
110b03: 74 05 je 110b0a <pthread_join+0x76>
*value_ptr = return_pointer;
110b05: 8b 45 f0 mov -0x10(%ebp),%eax
110b08: 89 03 mov %eax,(%ebx)
110b0a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
110b0c: 8b 5d fc mov -0x4(%ebp),%ebx
110b0f: c9 leave
110b10: c3 ret
110b11: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
110b14: e8 bf 2b 00 00 call 1136d8 <_Thread_Enable_dispatch>
110b19: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
110b1e: 8b 5d fc mov -0x4(%ebp),%ebx
110b21: c9 leave
110b22: c3 ret
110b23: 90 nop
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
110b24: e8 af 2b 00 00 call 1136d8 <_Thread_Enable_dispatch>
110b29: b8 2d 00 00 00 mov $0x2d,%eax
return EDEADLK;
110b2e: eb 8e jmp 110abe <pthread_join+0x2a>
0010bb48 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10bb48: 55 push %ebp
10bb49: 89 e5 mov %esp,%ebp
10bb4b: 57 push %edi
10bb4c: 56 push %esi
10bb4d: 53 push %ebx
10bb4e: 83 ec 28 sub $0x28,%esp
10bb51: a1 d8 b3 12 00 mov 0x12b3d8,%eax
10bb56: 40 inc %eax
10bb57: a3 d8 b3 12 00 mov %eax,0x12b3d8
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
10bb5c: 68 80 b8 12 00 push $0x12b880
10bb61: e8 1a 22 00 00 call 10dd80 <_Objects_Allocate>
10bb66: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10bb68: 83 c4 10 add $0x10,%esp
10bb6b: 85 c0 test %eax,%eax
10bb6d: 0f 84 81 00 00 00 je 10bbf4 <pthread_key_create+0xac>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10bb73: 8b 45 0c mov 0xc(%ebp),%eax
10bb76: 89 46 10 mov %eax,0x10(%esi)
10bb79: bb 01 00 00 00 mov $0x1,%ebx
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
10bb7e: 8b 04 9d ac b3 12 00 mov 0x12b3ac(,%ebx,4),%eax
10bb85: 85 c0 test %eax,%eax
10bb87: 74 5f je 10bbe8 <pthread_key_create+0xa0>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10bb89: 8b 40 04 mov 0x4(%eax),%eax
10bb8c: 0f b7 40 10 movzwl 0x10(%eax),%eax
10bb90: 8d 0c 85 04 00 00 00 lea 0x4(,%eax,4),%ecx
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
10bb97: 83 ec 0c sub $0xc,%esp
10bb9a: 51 push %ecx
10bb9b: 89 4d e4 mov %ecx,-0x1c(%ebp)
10bb9e: e8 b9 41 00 00 call 10fd5c <_Workspace_Allocate>
if ( !table ) {
10bba3: 83 c4 10 add $0x10,%esp
10bba6: 85 c0 test %eax,%eax
10bba8: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bbab: 74 5b je 10bc08 <pthread_key_create+0xc0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10bbad: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10bbb1: 89 c7 mov %eax,%edi
10bbb3: 31 c0 xor %eax,%eax
10bbb5: f3 aa rep stos %al,%es:(%edi)
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
10bbb7: 43 inc %ebx
* This is a bit more complex than one might initially expect because
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
10bbb8: 83 fb 05 cmp $0x5,%ebx
10bbbb: 75 c1 jne 10bb7e <pthread_key_create+0x36>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bbbd: 8b 46 08 mov 0x8(%esi),%eax
10bbc0: 0f b7 c8 movzwl %ax,%ecx
10bbc3: 8b 15 9c b8 12 00 mov 0x12b89c,%edx
10bbc9: 89 34 8a mov %esi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10bbcc: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10bbd3: 8b 55 08 mov 0x8(%ebp),%edx
10bbd6: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10bbd8: e8 c7 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch>
10bbdd: 31 c0 xor %eax,%eax
return 0;
}
10bbdf: 8d 65 f4 lea -0xc(%ebp),%esp
10bbe2: 5b pop %ebx
10bbe3: 5e pop %esi
10bbe4: 5f pop %edi
10bbe5: c9 leave
10bbe6: c3 ret
10bbe7: 90 nop
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
10bbe8: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4)
10bbef: 00
10bbf0: eb c5 jmp 10bbb7 <pthread_key_create+0x6f>
10bbf2: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10bbf4: e8 ab 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch>
10bbf9: b8 0b 00 00 00 mov $0xb,%eax
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10bbfe: 8d 65 f4 lea -0xc(%ebp),%esp
10bc01: 5b pop %ebx
10bc02: 5e pop %esi
10bc03: 5f pop %edi
10bc04: c9 leave
10bc05: c3 ret
10bc06: 66 90 xchg %ax,%ax
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10bc08: 89 df mov %ebx,%edi
10bc0a: 4f dec %edi
10bc0b: 74 1a je 10bc27 <pthread_key_create+0xdf>
10bc0d: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx
10bc11: 8d 76 00 lea 0x0(%esi),%esi
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
10bc14: 83 ec 0c sub $0xc,%esp
10bc17: ff 33 pushl (%ebx)
10bc19: e8 5a 41 00 00 call 10fd78 <_Workspace_Free>
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
10bc1e: 83 eb 04 sub $0x4,%ebx
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
10bc21: 83 c4 10 add $0x10,%esp
10bc24: 4f dec %edi
10bc25: 75 ed jne 10bc14 <pthread_key_create+0xcc>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10bc27: 83 ec 08 sub $0x8,%esp
10bc2a: 56 push %esi
10bc2b: 68 80 b8 12 00 push $0x12b880
10bc30: e8 cb 24 00 00 call 10e100 <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10bc35: e8 6a 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch>
10bc3a: b8 0c 00 00 00 mov $0xc,%eax
return ENOMEM;
10bc3f: 83 c4 10 add $0x10,%esp
10bc42: eb 9b jmp 10bbdf <pthread_key_create+0x97>
00114a3c <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
114a3c: 55 push %ebp
114a3d: 89 e5 mov %esp,%ebp
114a3f: 57 push %edi
114a40: 56 push %esi
114a41: 53 push %ebx
114a42: 83 ec 1c sub $0x1c,%esp
114a45: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
114a48: 85 db test %ebx,%ebx
114a4a: 0f 84 8c 00 00 00 je 114adc <pthread_kill+0xa0>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
114a50: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
114a53: 83 ff 1f cmp $0x1f,%edi
114a56: 0f 87 80 00 00 00 ja 114adc <pthread_kill+0xa0>
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
114a5c: 51 push %ecx
114a5d: 8d 45 e4 lea -0x1c(%ebp),%eax
114a60: 50 push %eax
114a61: ff 75 08 pushl 0x8(%ebp)
114a64: 68 80 97 12 00 push $0x129780
114a69: e8 8a 89 ff ff call 10d3f8 <_Objects_Get>
114a6e: 89 c6 mov %eax,%esi
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
114a70: 83 c4 10 add $0x10,%esp
114a73: 8b 55 e4 mov -0x1c(%ebp),%edx
114a76: 85 d2 test %edx,%edx
114a78: 75 76 jne 114af0 <pthread_kill+0xb4>
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
114a7a: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
114a80: 8d 04 5b lea (%ebx,%ebx,2),%eax
114a83: 83 3c 85 a8 9a 12 00 cmpl $0x1,0x129aa8(,%eax,4)
114a8a: 01
114a8b: 74 31 je 114abe <pthread_kill+0x82>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
114a8d: b8 01 00 00 00 mov $0x1,%eax
114a92: 89 f9 mov %edi,%ecx
114a94: d3 e0 shl %cl,%eax
114a96: 09 82 d0 00 00 00 or %eax,0xd0(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
114a9c: 50 push %eax
114a9d: 6a 00 push $0x0
114a9f: 53 push %ebx
114aa0: 56 push %esi
114aa1: e8 fa fd ff ff call 1148a0 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
114aa6: c6 46 74 01 movb $0x1,0x74(%esi)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
114aaa: a1 54 95 12 00 mov 0x129554,%eax
114aaf: 83 c4 10 add $0x10,%esp
114ab2: 85 c0 test %eax,%eax
114ab4: 74 08 je 114abe <pthread_kill+0x82>
114ab6: 3b 35 78 95 12 00 cmp 0x129578,%esi
114abc: 74 12 je 114ad0 <pthread_kill+0x94>
_ISR_Signals_to_thread_executing = true;
}
_Thread_Enable_dispatch();
114abe: e8 a9 91 ff ff call 10dc6c <_Thread_Enable_dispatch>
114ac3: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
114ac5: 8d 65 f4 lea -0xc(%ebp),%esp
114ac8: 5b pop %ebx
114ac9: 5e pop %esi
114aca: 5f pop %edi
114acb: c9 leave
114acc: c3 ret
114acd: 8d 76 00 lea 0x0(%esi),%esi
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
114ad0: c6 05 28 96 12 00 01 movb $0x1,0x129628
114ad7: eb e5 jmp 114abe <pthread_kill+0x82>
114ad9: 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 );
114adc: e8 87 05 00 00 call 115068 <__errno>
114ae1: c7 00 16 00 00 00 movl $0x16,(%eax)
114ae7: b8 ff ff ff ff mov $0xffffffff,%eax
114aec: eb d7 jmp 114ac5 <pthread_kill+0x89>
114aee: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
114af0: e8 73 05 00 00 call 115068 <__errno>
114af5: c7 00 03 00 00 00 movl $0x3,(%eax)
114afb: b8 ff ff ff ff mov $0xffffffff,%eax
114b00: eb c3 jmp 114ac5 <pthread_kill+0x89>
0010d78c <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
10d78c: 55 push %ebp
10d78d: 89 e5 mov %esp,%ebp
10d78f: 53 push %ebx
10d790: 83 ec 14 sub $0x14,%esp
10d793: 8b 5d 0c mov 0xc(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
10d796: 85 db test %ebx,%ebx
10d798: 74 19 je 10d7b3 <pthread_mutex_getprioceiling+0x27>
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d79a: 83 ec 08 sub $0x8,%esp
10d79d: 8d 45 f4 lea -0xc(%ebp),%eax
10d7a0: 50 push %eax
10d7a1: ff 75 08 pushl 0x8(%ebp)
10d7a4: e8 8f ff ff ff call 10d738 <_POSIX_Mutex_Get>
switch ( location ) {
10d7a9: 83 c4 10 add $0x10,%esp
10d7ac: 8b 55 f4 mov -0xc(%ebp),%edx
10d7af: 85 d2 test %edx,%edx
10d7b1: 74 0d je 10d7c0 <pthread_mutex_getprioceiling+0x34>
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
return 0;
10d7b3: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d7b8: 8b 5d fc mov -0x4(%ebp),%ebx
10d7bb: c9 leave
10d7bc: c3 ret
10d7bd: 8d 76 00 lea 0x0(%esi),%esi
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
10d7c0: 0f b6 15 5c 92 12 00 movzbl 0x12925c,%edx
10d7c7: 2b 50 60 sub 0x60(%eax),%edx
10d7ca: 89 13 mov %edx,(%ebx)
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
10d7cc: e8 13 33 00 00 call 110ae4 <_Thread_Enable_dispatch>
10d7d1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d7d3: 8b 5d fc mov -0x4(%ebp),%ebx
10d7d6: c9 leave
10d7d7: c3 ret
0010d7d8 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
10d7d8: 55 push %ebp
10d7d9: 89 e5 mov %esp,%ebp
10d7db: 57 push %edi
10d7dc: 56 push %esi
10d7dd: 53 push %ebx
10d7de: 83 ec 1c sub $0x1c,%esp
10d7e1: 8b 75 08 mov 0x8(%ebp),%esi
10d7e4: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d7e7: 85 db test %ebx,%ebx
10d7e9: 0f 84 09 01 00 00 je 10d8f8 <pthread_mutex_init+0x120>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10d7ef: 85 f6 test %esi,%esi
10d7f1: 0f 84 e5 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
}
}
}
#endif
if ( !the_attr->is_initialized )
10d7f7: 8b 13 mov (%ebx),%edx
10d7f9: 85 d2 test %edx,%edx
10d7fb: 0f 84 db 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d801: 8b 43 04 mov 0x4(%ebx),%eax
10d804: 83 f8 01 cmp $0x1,%eax
10d807: 0f 84 f7 00 00 00 je 10d904 <pthread_mutex_init+0x12c>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
10d80d: 85 c0 test %eax,%eax
10d80f: 0f 85 c7 00 00 00 jne 10d8dc <pthread_mutex_init+0x104>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d815: 8b 43 0c mov 0xc(%ebx),%eax
10d818: 83 f8 01 cmp $0x1,%eax
10d81b: 0f 84 e7 00 00 00 je 10d908 <pthread_mutex_init+0x130>
10d821: 83 f8 02 cmp $0x2,%eax
10d824: 0f 84 c2 00 00 00 je 10d8ec <pthread_mutex_init+0x114>
10d82a: 85 c0 test %eax,%eax
10d82c: 0f 85 aa 00 00 00 jne 10d8dc <pthread_mutex_init+0x104>
10d832: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
/*
* Validate the priority ceiling field -- should always be valid.
*/
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
10d839: 83 ec 0c sub $0xc,%esp
10d83c: ff 73 08 pushl 0x8(%ebx)
10d83f: e8 2c 03 00 00 call 10db70 <_POSIX_Priority_Is_valid>
10d844: 83 c4 10 add $0x10,%esp
10d847: 84 c0 test %al,%al
10d849: 0f 84 8d 00 00 00 je 10d8dc <pthread_mutex_init+0x104>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
10d84f: 83 7b 10 03 cmpl $0x3,0x10(%ebx)
10d853: 0f 87 83 00 00 00 ja 10d8dc <pthread_mutex_init+0x104>
10d859: a1 78 d4 12 00 mov 0x12d478,%eax
10d85e: 40 inc %eax
10d85f: a3 78 d4 12 00 mov %eax,0x12d478
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
10d864: 83 ec 0c sub $0xc,%esp
10d867: 68 80 d8 12 00 push $0x12d880
10d86c: e8 4f 25 00 00 call 10fdc0 <_Objects_Allocate>
10d871: 89 c7 mov %eax,%edi
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10d873: 83 c4 10 add $0x10,%esp
10d876: 85 c0 test %eax,%eax
10d878: 0f 84 96 00 00 00 je 10d914 <pthread_mutex_init+0x13c>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10d87e: 8b 43 04 mov 0x4(%ebx),%eax
10d881: 89 47 10 mov %eax,0x10(%edi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10d884: 31 c0 xor %eax,%eax
10d886: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10d88a: 0f 94 c0 sete %al
10d88d: 89 47 54 mov %eax,0x54(%edi)
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = true;
10d890: c6 47 58 01 movb $0x1,0x58(%edi)
the_mutex_attr->priority_ceiling =
10d894: 0f b6 05 5c 92 12 00 movzbl 0x12925c,%eax
10d89b: 2b 43 08 sub 0x8(%ebx),%eax
10d89e: 89 47 60 mov %eax,0x60(%edi)
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
10d8a1: 8b 45 e4 mov -0x1c(%ebp),%eax
10d8a4: 89 47 5c mov %eax,0x5c(%edi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10d8a7: 50 push %eax
10d8a8: 6a 01 push $0x1
10d8aa: 8d 47 54 lea 0x54(%edi),%eax
10d8ad: 50 push %eax
10d8ae: 8d 47 14 lea 0x14(%edi),%eax
10d8b1: 50 push %eax
10d8b2: e8 b5 1c 00 00 call 10f56c <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d8b7: 8b 47 08 mov 0x8(%edi),%eax
10d8ba: 0f b7 c8 movzwl %ax,%ecx
10d8bd: 8b 15 9c d8 12 00 mov 0x12d89c,%edx
10d8c3: 89 3c 8a mov %edi,(%edx,%ecx,4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
10d8c6: c7 47 0c 00 00 00 00 movl $0x0,0xc(%edi)
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
10d8cd: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10d8cf: e8 10 32 00 00 call 110ae4 <_Thread_Enable_dispatch>
10d8d4: 31 c0 xor %eax,%eax
return 0;
10d8d6: 83 c4 10 add $0x10,%esp
10d8d9: eb 06 jmp 10d8e1 <pthread_mutex_init+0x109>
10d8db: 90 nop
10d8dc: b8 16 00 00 00 mov $0x16,%eax
}
10d8e1: 8d 65 f4 lea -0xc(%ebp),%esp
10d8e4: 5b pop %ebx
10d8e5: 5e pop %esi
10d8e6: 5f pop %edi
10d8e7: c9 leave
10d8e8: c3 ret
10d8e9: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d8ec: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
break;
10d8f3: e9 41 ff ff ff jmp 10d839 <pthread_mutex_init+0x61>
POSIX_Mutex_Control *the_mutex;
CORE_mutex_Attributes *the_mutex_attr;
const pthread_mutexattr_t *the_attr;
CORE_mutex_Disciplines the_discipline;
if ( attr ) the_attr = attr;
10d8f8: bb 00 d9 12 00 mov $0x12d900,%ebx
10d8fd: e9 ed fe ff ff jmp 10d7ef <pthread_mutex_init+0x17>
10d902: 66 90 xchg %ax,%ax
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d904: b0 58 mov $0x58,%al
10d906: eb d9 jmp 10d8e1 <pthread_mutex_init+0x109>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d908: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
10d90f: e9 25 ff ff ff jmp 10d839 <pthread_mutex_init+0x61>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10d914: e8 cb 31 00 00 call 110ae4 <_Thread_Enable_dispatch>
10d919: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10d91e: eb c1 jmp 10d8e1 <pthread_mutex_init+0x109>
0010da2c <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10da2c: 55 push %ebp
10da2d: 89 e5 mov %esp,%ebp
10da2f: 53 push %ebx
10da30: 83 ec 1c sub $0x1c,%esp
10da33: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* 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 );
10da36: 8d 45 f4 lea -0xc(%ebp),%eax
10da39: 50 push %eax
10da3a: ff 75 0c pushl 0xc(%ebp)
10da3d: e8 a6 00 00 00 call 10dae8 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10da42: 83 c4 10 add $0x10,%esp
10da45: 83 f8 03 cmp $0x3,%eax
10da48: 74 16 je 10da60 <pthread_mutex_timedlock+0x34>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10da4a: 50 push %eax
10da4b: ff 75 f4 pushl -0xc(%ebp)
10da4e: 6a 00 push $0x0
10da50: 53 push %ebx
10da51: e8 de fe ff ff call 10d934 <_POSIX_Mutex_Lock_support>
10da56: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10da59: 8b 5d fc mov -0x4(%ebp),%ebx
10da5c: c9 leave
10da5d: c3 ret
10da5e: 66 90 xchg %ax,%ax
*/
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 );
10da60: 52 push %edx
10da61: ff 75 f4 pushl -0xc(%ebp)
10da64: 6a 01 push $0x1
10da66: 53 push %ebx
10da67: e8 c8 fe ff ff call 10d934 <_POSIX_Mutex_Lock_support>
10da6c: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10da6f: 8b 5d fc mov -0x4(%ebp),%ebx
10da72: c9 leave
10da73: c3 ret
0010d518 <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10d518: 55 push %ebp
10d519: 89 e5 mov %esp,%ebp
10d51b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10d51e: 85 c0 test %eax,%eax
10d520: 74 12 je 10d534 <pthread_mutexattr_destroy+0x1c>
10d522: 8b 10 mov (%eax),%edx
10d524: 85 d2 test %edx,%edx
10d526: 74 0c je 10d534 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10d528: c7 00 00 00 00 00 movl $0x0,(%eax)
10d52e: 31 c0 xor %eax,%eax
return 0;
}
10d530: c9 leave
10d531: c3 ret
10d532: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
attr->is_initialized = false;
return 0;
10d534: b8 16 00 00 00 mov $0x16,%eax
}
10d539: c9 leave
10d53a: c3 ret
0010b7e8 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
10b7e8: 55 push %ebp
10b7e9: 89 e5 mov %esp,%ebp
10b7eb: 8b 45 08 mov 0x8(%ebp),%eax
10b7ee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10b7f1: 85 c0 test %eax,%eax
10b7f3: 74 13 je 10b808 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
10b7f5: 8b 08 mov (%eax),%ecx
10b7f7: 85 c9 test %ecx,%ecx
10b7f9: 74 0d je 10b808 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
10b7fb: 85 d2 test %edx,%edx
10b7fd: 74 09 je 10b808 <pthread_mutexattr_gettype+0x20><== NEVER TAKEN
return EINVAL;
*type = attr->type;
10b7ff: 8b 40 10 mov 0x10(%eax),%eax
10b802: 89 02 mov %eax,(%edx)
10b804: 31 c0 xor %eax,%eax
return 0;
}
10b806: c9 leave
10b807: c3 ret
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
10b808: b8 16 00 00 00 mov $0x16,%eax
}
10b80d: c9 leave
10b80e: c3 ret
0010d5dc <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10d5dc: 55 push %ebp
10d5dd: 89 e5 mov %esp,%ebp
10d5df: 56 push %esi
10d5e0: 53 push %ebx
10d5e1: 8b 5d 08 mov 0x8(%ebp),%ebx
10d5e4: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized )
10d5e7: 85 db test %ebx,%ebx
10d5e9: 74 06 je 10d5f1 <pthread_mutexattr_setprioceiling+0x15>
10d5eb: 8b 03 mov (%ebx),%eax
10d5ed: 85 c0 test %eax,%eax
10d5ef: 75 0f jne 10d600 <pthread_mutexattr_setprioceiling+0x24>
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
attr->prio_ceiling = prioceiling;
return 0;
10d5f1: b8 16 00 00 00 mov $0x16,%eax
}
10d5f6: 8d 65 f8 lea -0x8(%ebp),%esp
10d5f9: 5b pop %ebx
10d5fa: 5e pop %esi
10d5fb: c9 leave
10d5fc: c3 ret
10d5fd: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d600: 83 ec 0c sub $0xc,%esp
10d603: 56 push %esi
10d604: e8 67 05 00 00 call 10db70 <_POSIX_Priority_Is_valid>
10d609: 83 c4 10 add $0x10,%esp
10d60c: 84 c0 test %al,%al
10d60e: 74 e1 je 10d5f1 <pthread_mutexattr_setprioceiling+0x15>
return EINVAL;
attr->prio_ceiling = prioceiling;
10d610: 89 73 08 mov %esi,0x8(%ebx)
10d613: 31 c0 xor %eax,%eax
return 0;
}
10d615: 8d 65 f8 lea -0x8(%ebp),%esp
10d618: 5b pop %ebx
10d619: 5e pop %esi
10d61a: c9 leave
10d61b: c3 ret
0010d644 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d644: 55 push %ebp
10d645: 89 e5 mov %esp,%ebp
10d647: 8b 45 08 mov 0x8(%ebp),%eax
10d64a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d64d: 85 c0 test %eax,%eax
10d64f: 74 0b je 10d65c <pthread_mutexattr_setpshared+0x18>
10d651: 8b 08 mov (%eax),%ecx
10d653: 85 c9 test %ecx,%ecx
10d655: 74 05 je 10d65c <pthread_mutexattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d657: 83 fa 01 cmp $0x1,%edx
10d65a: 76 08 jbe 10d664 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10d65c: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10d661: c9 leave
10d662: c3 ret
10d663: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d664: 89 50 04 mov %edx,0x4(%eax)
10d667: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10d669: c9 leave
10d66a: c3 ret
0010b838 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b838: 55 push %ebp
10b839: 89 e5 mov %esp,%ebp
10b83b: 8b 45 08 mov 0x8(%ebp),%eax
10b83e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10b841: 85 c0 test %eax,%eax
10b843: 74 0b je 10b850 <pthread_mutexattr_settype+0x18>
10b845: 8b 08 mov (%eax),%ecx
10b847: 85 c9 test %ecx,%ecx
10b849: 74 05 je 10b850 <pthread_mutexattr_settype+0x18><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10b84b: 83 fa 03 cmp $0x3,%edx
10b84e: 76 08 jbe 10b858 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
10b850: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10b855: c9 leave
10b856: c3 ret
10b857: 90 nop
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b858: 89 50 10 mov %edx,0x10(%eax)
10b85b: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10b85d: c9 leave
10b85e: c3 ret
0010c388 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10c388: 55 push %ebp
10c389: 89 e5 mov %esp,%ebp
10c38b: 57 push %edi
10c38c: 56 push %esi
10c38d: 53 push %ebx
10c38e: 83 ec 1c sub $0x1c,%esp
10c391: 8b 5d 08 mov 0x8(%ebp),%ebx
10c394: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10c397: 85 db test %ebx,%ebx
10c399: 74 51 je 10c3ec <pthread_once+0x64>
10c39b: 85 f6 test %esi,%esi
10c39d: 74 4d je 10c3ec <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10c39f: 8b 7b 04 mov 0x4(%ebx),%edi
10c3a2: 85 ff test %edi,%edi
10c3a4: 74 0a je 10c3b0 <pthread_once+0x28>
10c3a6: 31 c0 xor %eax,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10c3a8: 8d 65 f4 lea -0xc(%ebp),%esp
10c3ab: 5b pop %ebx
10c3ac: 5e pop %esi
10c3ad: 5f pop %edi
10c3ae: c9 leave
10c3af: 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);
10c3b0: 51 push %ecx
10c3b1: 8d 7d e4 lea -0x1c(%ebp),%edi
10c3b4: 57 push %edi
10c3b5: 68 00 01 00 00 push $0x100
10c3ba: 68 00 01 00 00 push $0x100
10c3bf: e8 e0 0b 00 00 call 10cfa4 <rtems_task_mode>
if ( !once_control->init_executed ) {
10c3c4: 83 c4 10 add $0x10,%esp
10c3c7: 8b 53 04 mov 0x4(%ebx),%edx
10c3ca: 85 d2 test %edx,%edx
10c3cc: 74 2e je 10c3fc <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);
10c3ce: 50 push %eax
10c3cf: 57 push %edi
10c3d0: 68 00 01 00 00 push $0x100
10c3d5: ff 75 e4 pushl -0x1c(%ebp)
10c3d8: e8 c7 0b 00 00 call 10cfa4 <rtems_task_mode>
10c3dd: 31 c0 xor %eax,%eax
10c3df: 83 c4 10 add $0x10,%esp
}
return 0;
}
10c3e2: 8d 65 f4 lea -0xc(%ebp),%esp
10c3e5: 5b pop %ebx
10c3e6: 5e pop %esi
10c3e7: 5f pop %edi
10c3e8: c9 leave
10c3e9: c3 ret
10c3ea: 66 90 xchg %ax,%ax
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10c3ec: b8 16 00 00 00 mov $0x16,%eax
}
return 0;
}
10c3f1: 8d 65 f4 lea -0xc(%ebp),%esp
10c3f4: 5b pop %ebx
10c3f5: 5e pop %esi
10c3f6: 5f pop %edi
10c3f7: c9 leave
10c3f8: c3 ret
10c3f9: 8d 76 00 lea 0x0(%esi),%esi
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;
10c3fc: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10c402: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10c409: ff d6 call *%esi
10c40b: eb c1 jmp 10c3ce <pthread_once+0x46>
0010c824 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10c824: 55 push %ebp
10c825: 89 e5 mov %esp,%ebp
10c827: 53 push %ebx
10c828: 83 ec 14 sub $0x14,%esp
10c82b: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10c82e: 85 c0 test %eax,%eax
10c830: 74 42 je 10c874 <pthread_rwlock_destroy+0x50>
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
10c832: 53 push %ebx
10c833: 8d 55 f4 lea -0xc(%ebp),%edx
10c836: 52 push %edx
10c837: ff 30 pushl (%eax)
10c839: 68 80 c3 12 00 push $0x12c380
10c83e: e8 7d 2b 00 00 call 10f3c0 <_Objects_Get>
10c843: 89 c3 mov %eax,%ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10c845: 83 c4 10 add $0x10,%esp
10c848: 8b 4d f4 mov -0xc(%ebp),%ecx
10c84b: 85 c9 test %ecx,%ecx
10c84d: 75 25 jne 10c874 <pthread_rwlock_destroy+0x50>
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
10c84f: 83 ec 0c sub $0xc,%esp
10c852: 8d 40 10 lea 0x10(%eax),%eax
10c855: 50 push %eax
10c856: e8 31 3c 00 00 call 11048c <_Thread_queue_First>
10c85b: 83 c4 10 add $0x10,%esp
10c85e: 85 c0 test %eax,%eax
10c860: 74 1e je 10c880 <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10c862: e8 cd 33 00 00 call 10fc34 <_Thread_Enable_dispatch>
10c867: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c86c: 8b 5d fc mov -0x4(%ebp),%ebx
10c86f: c9 leave
10c870: c3 ret
10c871: 8d 76 00 lea 0x0(%esi),%esi
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
10c874: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c879: 8b 5d fc mov -0x4(%ebp),%ebx
10c87c: c9 leave
10c87d: c3 ret
10c87e: 66 90 xchg %ax,%ax
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10c880: 83 ec 08 sub $0x8,%esp
10c883: 53 push %ebx
10c884: 68 80 c3 12 00 push $0x12c380
10c889: e8 fe 26 00 00 call 10ef8c <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
10c88e: 58 pop %eax
10c88f: 5a pop %edx
10c890: 53 push %ebx
10c891: 68 80 c3 12 00 push $0x12c380
10c896: e8 f5 29 00 00 call 10f290 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10c89b: e8 94 33 00 00 call 10fc34 <_Thread_Enable_dispatch>
10c8a0: 31 c0 xor %eax,%eax
return 0;
10c8a2: 83 c4 10 add $0x10,%esp
10c8a5: eb d2 jmp 10c879 <pthread_rwlock_destroy+0x55>
0010c8a8 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10c8a8: 55 push %ebp
10c8a9: 89 e5 mov %esp,%ebp
10c8ab: 56 push %esi
10c8ac: 53 push %ebx
10c8ad: 83 ec 20 sub $0x20,%esp
10c8b0: 8b 5d 08 mov 0x8(%ebp),%ebx
10c8b3: 8b 75 0c mov 0xc(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10c8b6: 85 db test %ebx,%ebx
10c8b8: 74 15 je 10c8cf <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10c8ba: 85 f6 test %esi,%esi
10c8bc: 0f 84 86 00 00 00 je 10c948 <pthread_rwlock_init+0xa0>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10c8c2: 8b 16 mov (%esi),%edx
10c8c4: 85 d2 test %edx,%edx
10c8c6: 74 07 je 10c8cf <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10c8c8: 8b 46 04 mov 0x4(%esi),%eax
10c8cb: 85 c0 test %eax,%eax
10c8cd: 74 0d je 10c8dc <pthread_rwlock_init+0x34><== ALWAYS TAKEN
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
10c8cf: b8 16 00 00 00 mov $0x16,%eax
}
10c8d4: 8d 65 f8 lea -0x8(%ebp),%esp
10c8d7: 5b pop %ebx
10c8d8: 5e pop %esi
10c8d9: c9 leave
10c8da: c3 ret
10c8db: 90 nop
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c8dc: a1 f8 c0 12 00 mov 0x12c0f8,%eax
10c8e1: 40 inc %eax
10c8e2: a3 f8 c0 12 00 mov %eax,0x12c0f8
* 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 *)
10c8e7: 83 ec 0c sub $0xc,%esp
10c8ea: 68 80 c3 12 00 push $0x12c380
10c8ef: e8 1c 26 00 00 call 10ef10 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10c8f4: 83 c4 10 add $0x10,%esp
10c8f7: 85 c0 test %eax,%eax
10c8f9: 74 41 je 10c93c <pthread_rwlock_init+0x94>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10c8fb: 83 ec 08 sub $0x8,%esp
10c8fe: 8d 55 f4 lea -0xc(%ebp),%edx
10c901: 52 push %edx
10c902: 8d 50 10 lea 0x10(%eax),%edx
10c905: 52 push %edx
10c906: 89 45 e4 mov %eax,-0x1c(%ebp)
10c909: e8 1e 1e 00 00 call 10e72c <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c90e: 8b 45 e4 mov -0x1c(%ebp),%eax
10c911: 8b 50 08 mov 0x8(%eax),%edx
10c914: 0f b7 f2 movzwl %dx,%esi
10c917: 8b 0d 9c c3 12 00 mov 0x12c39c,%ecx
10c91d: 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;
10c920: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10c927: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10c929: e8 06 33 00 00 call 10fc34 <_Thread_Enable_dispatch>
10c92e: 31 c0 xor %eax,%eax
return 0;
10c930: 83 c4 10 add $0x10,%esp
}
10c933: 8d 65 f8 lea -0x8(%ebp),%esp
10c936: 5b pop %ebx
10c937: 5e pop %esi
10c938: c9 leave
10c939: c3 ret
10c93a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10c93c: e8 f3 32 00 00 call 10fc34 <_Thread_Enable_dispatch>
10c941: b8 0b 00 00 00 mov $0xb,%eax
return EAGAIN;
10c946: eb 8c jmp 10c8d4 <pthread_rwlock_init+0x2c>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
10c948: 83 ec 0c sub $0xc,%esp
10c94b: 8d 75 ec lea -0x14(%ebp),%esi
10c94e: 56 push %esi
10c94f: e8 74 09 00 00 call 10d2c8 <pthread_rwlockattr_init>
10c954: 83 c4 10 add $0x10,%esp
10c957: e9 66 ff ff ff jmp 10c8c2 <pthread_rwlock_init+0x1a>
0010c9c4 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c9c4: 55 push %ebp
10c9c5: 89 e5 mov %esp,%ebp
10c9c7: 56 push %esi
10c9c8: 53 push %ebx
10c9c9: 83 ec 20 sub $0x20,%esp
10c9cc: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10c9cf: 85 db test %ebx,%ebx
10c9d1: 74 7d je 10ca50 <pthread_rwlock_timedrdlock+0x8c>
*
* 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 );
10c9d3: 83 ec 08 sub $0x8,%esp
10c9d6: 8d 45 f0 lea -0x10(%ebp),%eax
10c9d9: 50 push %eax
10c9da: ff 75 0c pushl 0xc(%ebp)
10c9dd: e8 26 6c 00 00 call 113608 <_POSIX_Absolute_timeout_to_ticks>
10c9e2: 89 c6 mov %eax,%esi
10c9e4: 83 c4 0c add $0xc,%esp
10c9e7: 8d 45 f4 lea -0xc(%ebp),%eax
10c9ea: 50 push %eax
10c9eb: ff 33 pushl (%ebx)
10c9ed: 68 80 c3 12 00 push $0x12c380
10c9f2: e8 c9 29 00 00 call 10f3c0 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10c9f7: 83 c4 10 add $0x10,%esp
10c9fa: 8b 55 f4 mov -0xc(%ebp),%edx
10c9fd: 85 d2 test %edx,%edx
10c9ff: 75 4f jne 10ca50 <pthread_rwlock_timedrdlock+0x8c>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
10ca01: 83 fe 03 cmp $0x3,%esi
10ca04: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10ca07: 83 ec 0c sub $0xc,%esp
10ca0a: 6a 00 push $0x0
10ca0c: ff 75 f0 pushl -0x10(%ebp)
10ca0f: 0f b6 ca movzbl %dl,%ecx
10ca12: 51 push %ecx
10ca13: ff 33 pushl (%ebx)
10ca15: 83 c0 10 add $0x10,%eax
10ca18: 50 push %eax
10ca19: 88 55 e4 mov %dl,-0x1c(%ebp)
10ca1c: e8 3f 1d 00 00 call 10e760 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10ca21: 83 c4 20 add $0x20,%esp
10ca24: e8 0b 32 00 00 call 10fc34 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10ca29: 8a 55 e4 mov -0x1c(%ebp),%dl
10ca2c: 84 d2 test %dl,%dl
10ca2e: 75 3c jne 10ca6c <pthread_rwlock_timedrdlock+0xa8>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10ca30: a1 b8 c1 12 00 mov 0x12c1b8,%eax
10ca35: 8b 40 34 mov 0x34(%eax),%eax
10ca38: 83 f8 02 cmp $0x2,%eax
10ca3b: 74 1f je 10ca5c <pthread_rwlock_timedrdlock+0x98>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ca3d: 83 ec 0c sub $0xc,%esp
10ca40: 50 push %eax
10ca41: e8 e6 00 00 00 call 10cb2c <_POSIX_RWLock_Translate_core_RWLock_return_code>
10ca46: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ca49: 8d 65 f8 lea -0x8(%ebp),%esp
10ca4c: 5b pop %ebx
10ca4d: 5e pop %esi
10ca4e: c9 leave
10ca4f: c3 ret
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10ca50: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10ca55: 8d 65 f8 lea -0x8(%ebp),%esp
10ca58: 5b pop %ebx
10ca59: 5e pop %esi
10ca5a: c9 leave
10ca5b: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
10ca5c: 85 f6 test %esi,%esi
10ca5e: 74 f0 je 10ca50 <pthread_rwlock_timedrdlock+0x8c><== NEVER TAKEN
10ca60: 83 fe 02 cmp $0x2,%esi
10ca63: 77 d8 ja 10ca3d <pthread_rwlock_timedrdlock+0x79><== NEVER TAKEN
10ca65: b0 74 mov $0x74,%al
10ca67: eb ec jmp 10ca55 <pthread_rwlock_timedrdlock+0x91>
10ca69: 8d 76 00 lea 0x0(%esi),%esi
10ca6c: a1 b8 c1 12 00 mov 0x12c1b8,%eax
10ca71: 8b 40 34 mov 0x34(%eax),%eax
10ca74: eb c7 jmp 10ca3d <pthread_rwlock_timedrdlock+0x79>
0010ca78 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10ca78: 55 push %ebp
10ca79: 89 e5 mov %esp,%ebp
10ca7b: 56 push %esi
10ca7c: 53 push %ebx
10ca7d: 83 ec 20 sub $0x20,%esp
10ca80: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
10ca83: 85 db test %ebx,%ebx
10ca85: 74 7d je 10cb04 <pthread_rwlock_timedwrlock+0x8c>
*
* 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 );
10ca87: 83 ec 08 sub $0x8,%esp
10ca8a: 8d 45 f0 lea -0x10(%ebp),%eax
10ca8d: 50 push %eax
10ca8e: ff 75 0c pushl 0xc(%ebp)
10ca91: e8 72 6b 00 00 call 113608 <_POSIX_Absolute_timeout_to_ticks>
10ca96: 89 c6 mov %eax,%esi
10ca98: 83 c4 0c add $0xc,%esp
10ca9b: 8d 45 f4 lea -0xc(%ebp),%eax
10ca9e: 50 push %eax
10ca9f: ff 33 pushl (%ebx)
10caa1: 68 80 c3 12 00 push $0x12c380
10caa6: e8 15 29 00 00 call 10f3c0 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
10caab: 83 c4 10 add $0x10,%esp
10caae: 8b 55 f4 mov -0xc(%ebp),%edx
10cab1: 85 d2 test %edx,%edx
10cab3: 75 4f jne 10cb04 <pthread_rwlock_timedwrlock+0x8c>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
10cab5: 83 fe 03 cmp $0x3,%esi
10cab8: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10cabb: 83 ec 0c sub $0xc,%esp
10cabe: 6a 00 push $0x0
10cac0: ff 75 f0 pushl -0x10(%ebp)
10cac3: 0f b6 ca movzbl %dl,%ecx
10cac6: 51 push %ecx
10cac7: ff 33 pushl (%ebx)
10cac9: 83 c0 10 add $0x10,%eax
10cacc: 50 push %eax
10cacd: 88 55 e4 mov %dl,-0x1c(%ebp)
10cad0: e8 53 1d 00 00 call 10e828 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10cad5: 83 c4 20 add $0x20,%esp
10cad8: e8 57 31 00 00 call 10fc34 <_Thread_Enable_dispatch>
if ( !do_wait &&
10cadd: 8a 55 e4 mov -0x1c(%ebp),%dl
10cae0: 84 d2 test %dl,%dl
10cae2: 75 3c jne 10cb20 <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10cae4: a1 b8 c1 12 00 mov 0x12c1b8,%eax
10cae9: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10caec: 83 f8 02 cmp $0x2,%eax
10caef: 74 1f je 10cb10 <pthread_rwlock_timedwrlock+0x98>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10caf1: 83 ec 0c sub $0xc,%esp
10caf4: 50 push %eax
10caf5: e8 32 00 00 00 call 10cb2c <_POSIX_RWLock_Translate_core_RWLock_return_code>
10cafa: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10cafd: 8d 65 f8 lea -0x8(%ebp),%esp
10cb00: 5b pop %ebx
10cb01: 5e pop %esi
10cb02: c9 leave
10cb03: c3 ret
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10cb04: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10cb09: 8d 65 f8 lea -0x8(%ebp),%esp
10cb0c: 5b pop %ebx
10cb0d: 5e pop %esi
10cb0e: c9 leave
10cb0f: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
10cb10: 85 f6 test %esi,%esi
10cb12: 74 f0 je 10cb04 <pthread_rwlock_timedwrlock+0x8c><== NEVER TAKEN
10cb14: 83 fe 02 cmp $0x2,%esi
10cb17: 77 d8 ja 10caf1 <pthread_rwlock_timedwrlock+0x79><== NEVER TAKEN
10cb19: b0 74 mov $0x74,%al
10cb1b: eb ec jmp 10cb09 <pthread_rwlock_timedwrlock+0x91>
10cb1d: 8d 76 00 lea 0x0(%esi),%esi
10cb20: a1 b8 c1 12 00 mov 0x12c1b8,%eax
10cb25: 8b 40 34 mov 0x34(%eax),%eax
10cb28: eb c7 jmp 10caf1 <pthread_rwlock_timedwrlock+0x79>
0010d280 <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10d280: 55 push %ebp
10d281: 89 e5 mov %esp,%ebp
10d283: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10d286: 85 c0 test %eax,%eax
10d288: 74 12 je 10d29c <pthread_rwlockattr_destroy+0x1c>
10d28a: 8b 10 mov (%eax),%edx
10d28c: 85 d2 test %edx,%edx
10d28e: 74 0c je 10d29c <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10d290: c7 00 00 00 00 00 movl $0x0,(%eax)
10d296: 31 c0 xor %eax,%eax
return 0;
}
10d298: c9 leave
10d299: c3 ret
10d29a: 66 90 xchg %ax,%ax
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
10d29c: b8 16 00 00 00 mov $0x16,%eax
}
10d2a1: c9 leave
10d2a2: c3 ret
0010d2e8 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10d2e8: 55 push %ebp
10d2e9: 89 e5 mov %esp,%ebp
10d2eb: 8b 45 08 mov 0x8(%ebp),%eax
10d2ee: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10d2f1: 85 c0 test %eax,%eax
10d2f3: 74 0b je 10d300 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10d2f5: 8b 08 mov (%eax),%ecx
10d2f7: 85 c9 test %ecx,%ecx
10d2f9: 74 05 je 10d300 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d2fb: 83 fa 01 cmp $0x1,%edx
10d2fe: 76 08 jbe 10d308 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
10d300: b8 16 00 00 00 mov $0x16,%eax
default:
return EINVAL;
}
}
10d305: c9 leave
10d306: c3 ret
10d307: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d308: 89 50 04 mov %edx,0x4(%eax)
10d30b: 31 c0 xor %eax,%eax
return 0;
default:
return EINVAL;
}
}
10d30d: c9 leave
10d30e: c3 ret
0010b818 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10b818: 55 push %ebp
10b819: 89 e5 mov %esp,%ebp
10b81b: 53 push %ebx
10b81c: 83 ec 04 sub $0x4,%esp
10b81f: 8b 4d 08 mov 0x8(%ebp),%ecx
10b822: 8b 55 0c mov 0xc(%ebp),%edx
* 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() )
10b825: a1 54 a8 12 00 mov 0x12a854,%eax
10b82a: 85 c0 test %eax,%eax
10b82c: 75 16 jne 10b844 <pthread_setcancelstate+0x2c>
return EPROTO;
if ( !oldstate )
10b82e: 85 d2 test %edx,%edx
10b830: 74 05 je 10b837 <pthread_setcancelstate+0x1f>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10b832: 83 f9 01 cmp $0x1,%ecx
10b835: 76 19 jbe 10b850 <pthread_setcancelstate+0x38>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b837: b8 16 00 00 00 mov $0x16,%eax
}
10b83c: 8b 5d fc mov -0x4(%ebp),%ebx
10b83f: c9 leave
10b840: c3 ret
10b841: 8d 76 00 lea 0x0(%esi),%esi
* 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() )
10b844: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b849: 8b 5d fc mov -0x4(%ebp),%ebx
10b84c: c9 leave
10b84d: c3 ret
10b84e: 66 90 xchg %ax,%ax
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b850: a1 78 a8 12 00 mov 0x12a878,%eax
10b855: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b85b: 8b 1d b8 a7 12 00 mov 0x12a7b8,%ebx
10b861: 43 inc %ebx
10b862: 89 1d b8 a7 12 00 mov %ebx,0x12a7b8
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10b868: 8b 98 d4 00 00 00 mov 0xd4(%eax),%ebx
10b86e: 89 1a mov %ebx,(%edx)
thread_support->cancelability_state = state;
10b870: 89 88 d4 00 00 00 mov %ecx,0xd4(%eax)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b876: 83 ec 0c sub $0xc,%esp
10b879: ff 35 78 a8 12 00 pushl 0x12a878
10b87f: e8 c4 5d 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b884: 31 c0 xor %eax,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b886: 83 c4 10 add $0x10,%esp
}
10b889: 8b 5d fc mov -0x4(%ebp),%ebx
10b88c: c9 leave
10b88d: c3 ret
0010b890 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10b890: 55 push %ebp
10b891: 89 e5 mov %esp,%ebp
10b893: 53 push %ebx
10b894: 83 ec 04 sub $0x4,%esp
10b897: 8b 4d 08 mov 0x8(%ebp),%ecx
10b89a: 8b 55 0c mov 0xc(%ebp),%edx
* 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() )
10b89d: a1 54 a8 12 00 mov 0x12a854,%eax
10b8a2: 85 c0 test %eax,%eax
10b8a4: 75 16 jne 10b8bc <pthread_setcanceltype+0x2c>
return EPROTO;
if ( !oldtype )
10b8a6: 85 d2 test %edx,%edx
10b8a8: 74 05 je 10b8af <pthread_setcanceltype+0x1f>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10b8aa: 83 f9 01 cmp $0x1,%ecx
10b8ad: 76 19 jbe 10b8c8 <pthread_setcanceltype+0x38>
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b8af: b8 16 00 00 00 mov $0x16,%eax
}
10b8b4: 8b 5d fc mov -0x4(%ebp),%ebx
10b8b7: c9 leave
10b8b8: c3 ret
10b8b9: 8d 76 00 lea 0x0(%esi),%esi
* 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() )
10b8bc: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b8c1: 8b 5d fc mov -0x4(%ebp),%ebx
10b8c4: c9 leave
10b8c5: c3 ret
10b8c6: 66 90 xchg %ax,%ax
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b8c8: a1 78 a8 12 00 mov 0x12a878,%eax
10b8cd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10b8d3: 8b 1d b8 a7 12 00 mov 0x12a7b8,%ebx
10b8d9: 43 inc %ebx
10b8da: 89 1d b8 a7 12 00 mov %ebx,0x12a7b8
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10b8e0: 8b 98 d8 00 00 00 mov 0xd8(%eax),%ebx
10b8e6: 89 1a mov %ebx,(%edx)
thread_support->cancelability_type = type;
10b8e8: 89 88 d8 00 00 00 mov %ecx,0xd8(%eax)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b8ee: 83 ec 0c sub $0xc,%esp
10b8f1: ff 35 78 a8 12 00 pushl 0x12a878
10b8f7: e8 4c 5d 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
10b8fc: 31 c0 xor %eax,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b8fe: 83 c4 10 add $0x10,%esp
}
10b901: 8b 5d fc mov -0x4(%ebp),%ebx
10b904: c9 leave
10b905: c3 ret
0010e2d0 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10e2d0: 55 push %ebp
10e2d1: 89 e5 mov %esp,%ebp
10e2d3: 57 push %edi
10e2d4: 56 push %esi
10e2d5: 53 push %ebx
10e2d6: 83 ec 2c sub $0x2c,%esp
10e2d9: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e2dc: 85 f6 test %esi,%esi
10e2de: 0f 84 cc 00 00 00 je 10e3b0 <pthread_setschedparam+0xe0>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10e2e4: 8d 45 e0 lea -0x20(%ebp),%eax
10e2e7: 50 push %eax
10e2e8: 8d 45 e4 lea -0x1c(%ebp),%eax
10e2eb: 50 push %eax
10e2ec: 56 push %esi
10e2ed: ff 75 0c pushl 0xc(%ebp)
10e2f0: e8 e7 62 00 00 call 1145dc <_POSIX_Thread_Translate_sched_param>
10e2f5: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10e2f7: 83 c4 10 add $0x10,%esp
10e2fa: 85 c0 test %eax,%eax
10e2fc: 74 0a je 10e308 <pthread_setschedparam+0x38>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e2fe: 89 d8 mov %ebx,%eax
10e300: 8d 65 f4 lea -0xc(%ebp),%esp
10e303: 5b pop %ebx
10e304: 5e pop %esi
10e305: 5f pop %edi
10e306: c9 leave
10e307: c3 ret
10e308: 50 push %eax
10e309: 8d 45 dc lea -0x24(%ebp),%eax
10e30c: 50 push %eax
10e30d: ff 75 08 pushl 0x8(%ebp)
10e310: 68 40 d7 12 00 push $0x12d740
10e315: e8 56 1f 00 00 call 110270 <_Objects_Get>
10e31a: 89 c2 mov %eax,%edx
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10e31c: 83 c4 10 add $0x10,%esp
10e31f: 8b 7d dc mov -0x24(%ebp),%edi
10e322: 85 ff test %edi,%edi
10e324: 0f 85 96 00 00 00 jne 10e3c0 <pthread_setschedparam+0xf0>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10e32a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10e330: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( api->schedpolicy == SCHED_SPORADIC )
10e333: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax)
10e33a: 0f 84 c8 00 00 00 je 10e408 <pthread_setschedparam+0x138>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10e340: 8b 45 0c mov 0xc(%ebp),%eax
10e343: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e346: 89 81 80 00 00 00 mov %eax,0x80(%ecx)
api->schedparam = *param;
10e34c: 89 cf mov %ecx,%edi
10e34e: 81 c7 84 00 00 00 add $0x84,%edi
10e354: b9 07 00 00 00 mov $0x7,%ecx
10e359: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10e35b: 8b 45 e4 mov -0x1c(%ebp),%eax
10e35e: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10e361: 8b 45 e0 mov -0x20(%ebp),%eax
10e364: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10e36a: 8b 75 0c mov 0xc(%ebp),%esi
10e36d: 85 f6 test %esi,%esi
10e36f: 78 2e js 10e39f <pthread_setschedparam+0xcf><== NEVER TAKEN
10e371: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10e375: 7f 55 jg 10e3cc <pthread_setschedparam+0xfc>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e377: a1 44 d4 12 00 mov 0x12d444,%eax
10e37c: 89 42 78 mov %eax,0x78(%edx)
10e37f: 0f b6 05 5c 92 12 00 movzbl 0x12925c,%eax
10e386: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e389: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax
the_thread->real_priority =
10e38f: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10e392: 51 push %ecx
10e393: 6a 01 push $0x1
10e395: 50 push %eax
10e396: 52 push %edx
10e397: e8 60 22 00 00 call 1105fc <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10e39c: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10e39f: e8 40 27 00 00 call 110ae4 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e3a4: 89 d8 mov %ebx,%eax
10e3a6: 8d 65 f4 lea -0xc(%ebp),%esp
10e3a9: 5b pop %ebx
10e3aa: 5e pop %esi
10e3ab: 5f pop %edi
10e3ac: c9 leave
10e3ad: c3 ret
10e3ae: 66 90 xchg %ax,%ax
int rc;
/*
* Check all the parameters
*/
if ( !param )
10e3b0: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e3b5: 89 d8 mov %ebx,%eax
10e3b7: 8d 65 f4 lea -0xc(%ebp),%esp
10e3ba: 5b pop %ebx
10e3bb: 5e pop %esi
10e3bc: 5f pop %edi
10e3bd: c9 leave
10e3be: c3 ret
10e3bf: 90 nop
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
10e3c0: b3 03 mov $0x3,%bl
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10e3c2: 89 d8 mov %ebx,%eax
10e3c4: 8d 65 f4 lea -0xc(%ebp),%esp
10e3c7: 5b pop %ebx
10e3c8: 5e pop %esi
10e3c9: 5f pop %edi
10e3ca: c9 leave
10e3cb: c3 ret
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10e3cc: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10e3d0: 75 cd jne 10e39f <pthread_setschedparam+0xcf><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10e3d2: 8b 4d d4 mov -0x2c(%ebp),%ecx
10e3d5: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax
10e3db: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx)
_Watchdog_Remove( &api->Sporadic_timer );
10e3e1: 83 ec 0c sub $0xc,%esp
10e3e4: 89 c8 mov %ecx,%eax
10e3e6: 05 a4 00 00 00 add $0xa4,%eax
10e3eb: 50 push %eax
10e3ec: 89 55 d0 mov %edx,-0x30(%ebp)
10e3ef: e8 f0 38 00 00 call 111ce4 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10e3f4: 58 pop %eax
10e3f5: 5a pop %edx
10e3f6: 8b 55 d0 mov -0x30(%ebp),%edx
10e3f9: 52 push %edx
10e3fa: 6a 00 push $0x0
10e3fc: e8 3b fe ff ff call 10e23c <_POSIX_Threads_Sporadic_budget_TSR>
10e401: 83 c4 10 add $0x10,%esp
10e404: eb 99 jmp 10e39f <pthread_setschedparam+0xcf>
10e406: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10e408: 83 ec 0c sub $0xc,%esp
10e40b: 05 a4 00 00 00 add $0xa4,%eax
10e410: 50 push %eax
10e411: 89 55 d0 mov %edx,-0x30(%ebp)
10e414: e8 cb 38 00 00 call 111ce4 <_Watchdog_Remove>
10e419: 83 c4 10 add $0x10,%esp
10e41c: 8b 55 d0 mov -0x30(%ebp),%edx
10e41f: e9 1c ff ff ff jmp 10e340 <pthread_setschedparam+0x70>
00112a10 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
112a10: 55 push %ebp
112a11: 89 e5 mov %esp,%ebp
112a13: 57 push %edi
112a14: 56 push %esi
112a15: 53 push %ebx
112a16: 83 ec 0c sub $0xc,%esp
112a19: 8b 4d 08 mov 0x8(%ebp),%ecx
112a1c: 8b 55 0c mov 0xc(%ebp),%edx
112a1f: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_API_Control *api;
if ( !set && !oset )
112a22: 85 d2 test %edx,%edx
112a24: 0f 84 9a 00 00 00 je 112ac4 <pthread_sigmask+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
112a2a: 8b 35 f8 b3 12 00 mov 0x12b3f8,%esi
112a30: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax
if ( oset )
112a36: 85 db test %ebx,%ebx
112a38: 74 0c je 112a46 <pthread_sigmask+0x36>
*oset = api->signals_blocked;
112a3a: 8b b8 cc 00 00 00 mov 0xcc(%eax),%edi
112a40: 89 3b mov %edi,(%ebx)
if ( !set )
112a42: 85 d2 test %edx,%edx
112a44: 74 42 je 112a88 <pthread_sigmask+0x78>
return 0;
switch ( how ) {
112a46: 83 f9 01 cmp $0x1,%ecx
112a49: 74 6d je 112ab8 <pthread_sigmask+0xa8>
112a4b: 83 f9 02 cmp $0x2,%ecx
112a4e: 74 44 je 112a94 <pthread_sigmask+0x84>
112a50: 85 c9 test %ecx,%ecx
112a52: 75 4c jne 112aa0 <pthread_sigmask+0x90>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
112a54: 8b 12 mov (%edx),%edx
112a56: 89 90 cc 00 00 00 mov %edx,0xcc(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
112a5c: 8b 15 28 bb 12 00 mov 0x12bb28,%edx
112a62: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
112a68: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax
112a6e: f7 d0 not %eax
112a70: 85 c2 test %eax,%edx
112a72: 74 14 je 112a88 <pthread_sigmask+0x78>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
112a74: c6 46 74 01 movb $0x1,0x74(%esi)
_Thread_Dispatch();
112a78: e8 93 bf ff ff call 10ea10 <_Thread_Dispatch>
112a7d: 31 c0 xor %eax,%eax
}
return 0;
}
112a7f: 83 c4 0c add $0xc,%esp
112a82: 5b pop %ebx
112a83: 5e pop %esi
112a84: 5f pop %edi
112a85: c9 leave
112a86: c3 ret
112a87: 90 nop
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
112a88: 31 c0 xor %eax,%eax
}
return 0;
}
112a8a: 83 c4 0c add $0xc,%esp
112a8d: 5b pop %ebx
112a8e: 5e pop %esi
112a8f: 5f pop %edi
112a90: c9 leave
112a91: c3 ret
112a92: 66 90 xchg %ax,%ax
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
112a94: 8b 12 mov (%edx),%edx
112a96: f7 d2 not %edx
112a98: 21 90 cc 00 00 00 and %edx,0xcc(%eax)
break;
112a9e: eb bc jmp 112a5c <pthread_sigmask+0x4c>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
112aa0: e8 03 34 00 00 call 115ea8 <__errno>
112aa5: c7 00 16 00 00 00 movl $0x16,(%eax)
112aab: b8 ff ff ff ff mov $0xffffffff,%eax
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
112ab0: 83 c4 0c add $0xc,%esp
112ab3: 5b pop %ebx
112ab4: 5e pop %esi
112ab5: 5f pop %edi
112ab6: c9 leave
112ab7: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
112ab8: 8b 12 mov (%edx),%edx
112aba: 09 90 cc 00 00 00 or %edx,0xcc(%eax)
break;
112ac0: eb 9a jmp 112a5c <pthread_sigmask+0x4c>
112ac2: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
112ac4: 85 db test %ebx,%ebx
112ac6: 74 d8 je 112aa0 <pthread_sigmask+0x90>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
112ac8: 8b 35 f8 b3 12 00 mov 0x12b3f8,%esi
112ace: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax
112ad4: e9 61 ff ff ff jmp 112a3a <pthread_sigmask+0x2a>
0010c17c <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10c17c: 55 push %ebp
10c17d: 89 e5 mov %esp,%ebp
10c17f: 83 ec 08 sub $0x8,%esp
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
10c182: a1 54 b0 12 00 mov 0x12b054,%eax
10c187: 85 c0 test %eax,%eax
10c189: 75 44 jne 10c1cf <pthread_testcancel+0x53><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10c18b: a1 78 b0 12 00 mov 0x12b078,%eax
10c190: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax
10c196: 8b 15 b8 af 12 00 mov 0x12afb8,%edx
10c19c: 42 inc %edx
10c19d: 89 15 b8 af 12 00 mov %edx,0x12afb8
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10c1a3: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx
10c1a9: 85 d2 test %edx,%edx
10c1ab: 75 27 jne 10c1d4 <pthread_testcancel+0x58><== NEVER TAKEN
thread_support->cancelation_requested )
10c1ad: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax
10c1b3: 85 c0 test %eax,%eax
10c1b5: 74 1d je 10c1d4 <pthread_testcancel+0x58>
cancel = true;
_Thread_Enable_dispatch();
10c1b7: e8 3c 26 00 00 call 10e7f8 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10c1bc: 83 ec 08 sub $0x8,%esp
10c1bf: 6a ff push $0xffffffff
10c1c1: ff 35 78 b0 12 00 pushl 0x12b078
10c1c7: e8 4c 62 00 00 call 112418 <_POSIX_Thread_Exit>
10c1cc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10c1cf: c9 leave <== NOT EXECUTED
10c1d0: c3 ret <== NOT EXECUTED
10c1d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
10c1d4: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10c1d5: e9 1e 26 00 00 jmp 10e7f8 <_Thread_Enable_dispatch>
001118d0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
1118d0: 55 push %ebp
1118d1: 89 e5 mov %esp,%ebp
1118d3: 57 push %edi
1118d4: 56 push %esi
1118d5: 53 push %ebx
1118d6: 83 ec 2c sub $0x2c,%esp
1118d9: 8b 5d 08 mov 0x8(%ebp),%ebx
1118dc: 8b 7d 0c mov 0xc(%ebp),%edi
1118df: 8b 45 10 mov 0x10(%ebp),%eax
1118e2: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
1118e5: 85 db test %ebx,%ebx
1118e7: 0f 84 87 00 00 00 je 111974 <rtems_barrier_create+0xa4>
return RTEMS_INVALID_NAME;
if ( !id )
1118ed: 85 f6 test %esi,%esi
1118ef: 0f 84 bb 00 00 00 je 1119b0 <rtems_barrier_create+0xe0>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
1118f5: f7 c7 10 00 00 00 test $0x10,%edi
1118fb: 0f 84 83 00 00 00 je 111984 <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
111901: 85 c0 test %eax,%eax
111903: 0f 84 87 00 00 00 je 111990 <rtems_barrier_create+0xc0>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
111909: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
111910: 89 45 e4 mov %eax,-0x1c(%ebp)
111913: a1 b8 94 12 00 mov 0x1294b8,%eax
111918: 40 inc %eax
111919: a3 b8 94 12 00 mov %eax,0x1294b8
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
11191e: 83 ec 0c sub $0xc,%esp
111921: 68 80 9e 12 00 push $0x129e80
111926: e8 1d b6 ff ff call 10cf48 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
11192b: 83 c4 10 add $0x10,%esp
11192e: 85 c0 test %eax,%eax
111930: 74 6a je 11199c <rtems_barrier_create+0xcc>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
111932: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
111935: 83 ec 08 sub $0x8,%esp
111938: 8d 55 e0 lea -0x20(%ebp),%edx
11193b: 52 push %edx
11193c: 8d 50 14 lea 0x14(%eax),%edx
11193f: 52 push %edx
111940: 89 45 d4 mov %eax,-0x2c(%ebp)
111943: e8 5c 06 00 00 call 111fa4 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
111948: 8b 45 d4 mov -0x2c(%ebp),%eax
11194b: 8b 50 08 mov 0x8(%eax),%edx
11194e: 0f b7 fa movzwl %dx,%edi
111951: 8b 0d 9c 9e 12 00 mov 0x129e9c,%ecx
111957: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11195a: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
11195d: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
11195f: e8 08 c3 ff ff call 10dc6c <_Thread_Enable_dispatch>
111964: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
111966: 83 c4 10 add $0x10,%esp
}
111969: 8d 65 f4 lea -0xc(%ebp),%esp
11196c: 5b pop %ebx
11196d: 5e pop %esi
11196e: 5f pop %edi
11196f: c9 leave
111970: c3 ret
111971: 8d 76 00 lea 0x0(%esi),%esi
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
111974: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111979: 8d 65 f4 lea -0xc(%ebp),%esp
11197c: 5b pop %ebx
11197d: 5e pop %esi
11197e: 5f pop %edi
11197f: c9 leave
111980: c3 ret
111981: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
111984: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
11198b: eb 83 jmp 111910 <rtems_barrier_create+0x40>
11198d: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
111990: b0 0a mov $0xa,%al
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
111992: 8d 65 f4 lea -0xc(%ebp),%esp
111995: 5b pop %ebx
111996: 5e pop %esi
111997: 5f pop %edi
111998: c9 leave
111999: c3 ret
11199a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
11199c: e8 cb c2 ff ff call 10dc6c <_Thread_Enable_dispatch>
1119a1: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1119a6: 8d 65 f4 lea -0xc(%ebp),%esp
1119a9: 5b pop %ebx
1119aa: 5e pop %esi
1119ab: 5f pop %edi
1119ac: c9 leave
1119ad: c3 ret
1119ae: 66 90 xchg %ax,%ax
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
1119b0: b8 09 00 00 00 mov $0x9,%eax
1119b5: eb b2 jmp 111969 <rtems_barrier_create+0x99>
00116318 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
116318: 55 push %ebp
116319: 89 e5 mov %esp,%ebp
11631b: 53 push %ebx
11631c: 83 ec 04 sub $0x4,%esp
11631f: 8b 45 08 mov 0x8(%ebp),%eax
116322: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
116325: 85 db test %ebx,%ebx
116327: 74 3b je 116364 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
116329: 85 c0 test %eax,%eax
11632b: 74 2b je 116358 <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
11632d: 83 f8 01 cmp $0x1,%eax
116330: 74 3e je 116370 <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
116332: 83 f8 02 cmp $0x2,%eax
116335: 74 45 je 11637c <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
116337: 83 f8 03 cmp $0x3,%eax
11633a: 74 4c je 116388 <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
11633c: 83 f8 04 cmp $0x4,%eax
11633f: 74 0b je 11634c <rtems_clock_get+0x34>
116341: b8 0a 00 00 00 mov $0xa,%eax
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
116346: 5a pop %edx
116347: 5b pop %ebx
116348: c9 leave
116349: c3 ret
11634a: 66 90 xchg %ax,%ax
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
11634c: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
11634f: 59 pop %ecx
116350: 5b pop %ebx
116351: c9 leave
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
116352: e9 49 01 00 00 jmp 1164a0 <rtems_clock_get_tod_timeval>
116357: 90 nop
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
116358: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
11635b: 58 pop %eax
11635c: 5b pop %ebx
11635d: c9 leave
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
11635e: e9 7d 00 00 00 jmp 1163e0 <rtems_clock_get_tod>
116363: 90 nop
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
116364: b8 09 00 00 00 mov $0x9,%eax
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
116369: 5a pop %edx
11636a: 5b pop %ebx
11636b: c9 leave
11636c: c3 ret
11636d: 8d 76 00 lea 0x0(%esi),%esi
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
116370: 89 5d 08 mov %ebx,0x8(%ebp)
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
}
116373: 5b pop %ebx
116374: 5b pop %ebx
116375: c9 leave
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
116376: e9 19 00 00 00 jmp 116394 <rtems_clock_get_seconds_since_epoch>
11637b: 90 nop
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
11637c: e8 53 00 00 00 call 1163d4 <rtems_clock_get_ticks_since_boot>
116381: 89 03 mov %eax,(%ebx)
116383: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116385: eb bf jmp 116346 <rtems_clock_get+0x2e>
116387: 90 nop
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
116388: e8 33 00 00 00 call 1163c0 <rtems_clock_get_ticks_per_second>
11638d: 89 03 mov %eax,(%ebx)
11638f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116391: eb b3 jmp 116346 <rtems_clock_get+0x2e>
0010c628 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
10c628: 55 push %ebp
10c629: 89 e5 mov %esp,%ebp
10c62b: 56 push %esi
10c62c: 53 push %ebx
10c62d: 83 ec 50 sub $0x50,%esp
10c630: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
10c633: 85 db test %ebx,%ebx
10c635: 0f 84 a1 00 00 00 je 10c6dc <rtems_clock_get_tod+0xb4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
10c63b: 80 3d cc cc 12 00 00 cmpb $0x0,0x12cccc
10c642: 75 0c jne 10c650 <rtems_clock_get_tod+0x28>
10c644: b8 0b 00 00 00 mov $0xb,%eax
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec /
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
}
10c649: 8d 65 f8 lea -0x8(%ebp),%esp
10c64c: 5b pop %ebx
10c64d: 5e pop %esi
10c64e: c9 leave
10c64f: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
10c650: 9c pushf
10c651: fa cli
10c652: 5e pop %esi
_TOD_Get( &now );
10c653: 83 ec 0c sub $0xc,%esp
10c656: 8d 45 e8 lea -0x18(%ebp),%eax
10c659: 50 push %eax
10c65a: e8 49 19 00 00 call 10dfa8 <_TOD_Get>
_ISR_Enable(level);
10c65f: 56 push %esi
10c660: 9d popf
useconds = (suseconds_t)now.tv_nsec;
10c661: 8b 4d ec mov -0x14(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
10c664: 8b 45 e8 mov -0x18(%ebp),%eax
10c667: 89 45 f0 mov %eax,-0x10(%ebp)
time->tv_usec = useconds;
10c66a: be d3 4d 62 10 mov $0x10624dd3,%esi
10c66f: 89 c8 mov %ecx,%eax
10c671: f7 ee imul %esi
10c673: 89 45 b0 mov %eax,-0x50(%ebp)
10c676: 89 55 b4 mov %edx,-0x4c(%ebp)
10c679: 8b 75 b4 mov -0x4c(%ebp),%esi
10c67c: c1 fe 06 sar $0x6,%esi
10c67f: 89 c8 mov %ecx,%eax
10c681: 99 cltd
10c682: 29 d6 sub %edx,%esi
10c684: 89 75 f4 mov %esi,-0xc(%ebp)
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
10c687: 58 pop %eax
10c688: 5a pop %edx
10c689: 8d 45 c4 lea -0x3c(%ebp),%eax
10c68c: 50 push %eax
10c68d: 8d 45 f0 lea -0x10(%ebp),%eax
10c690: 50 push %eax
10c691: e8 7a a9 00 00 call 117010 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
10c696: 8b 45 d8 mov -0x28(%ebp),%eax
10c699: 05 6c 07 00 00 add $0x76c,%eax
10c69e: 89 03 mov %eax,(%ebx)
tmbuf->month = time.tm_mon + 1;
10c6a0: 8b 45 d4 mov -0x2c(%ebp),%eax
10c6a3: 40 inc %eax
10c6a4: 89 43 04 mov %eax,0x4(%ebx)
tmbuf->day = time.tm_mday;
10c6a7: 8b 45 d0 mov -0x30(%ebp),%eax
10c6aa: 89 43 08 mov %eax,0x8(%ebx)
tmbuf->hour = time.tm_hour;
10c6ad: 8b 45 cc mov -0x34(%ebp),%eax
10c6b0: 89 43 0c mov %eax,0xc(%ebx)
tmbuf->minute = time.tm_min;
10c6b3: 8b 45 c8 mov -0x38(%ebp),%eax
10c6b6: 89 43 10 mov %eax,0x10(%ebx)
tmbuf->second = time.tm_sec;
10c6b9: 8b 45 c4 mov -0x3c(%ebp),%eax
10c6bc: 89 43 14 mov %eax,0x14(%ebx)
tmbuf->ticks = now.tv_usec /
10c6bf: 8b 45 f4 mov -0xc(%ebp),%eax
10c6c2: 31 d2 xor %edx,%edx
10c6c4: f7 35 8c 86 12 00 divl 0x12868c
10c6ca: 89 43 18 mov %eax,0x18(%ebx)
10c6cd: 31 c0 xor %eax,%eax
rtems_configuration_get_microseconds_per_tick();
return RTEMS_SUCCESSFUL;
10c6cf: 83 c4 10 add $0x10,%esp
}
10c6d2: 8d 65 f8 lea -0x8(%ebp),%esp
10c6d5: 5b pop %ebx
10c6d6: 5e pop %esi
10c6d7: c9 leave
10c6d8: c3 ret
10c6d9: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
10c6dc: b8 09 00 00 00 mov $0x9,%eax
10c6e1: e9 63 ff ff ff jmp 10c649 <rtems_clock_get_tod+0x21>
001164a0 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
1164a0: 55 push %ebp
1164a1: 89 e5 mov %esp,%ebp
1164a3: 56 push %esi
1164a4: 53 push %ebx
1164a5: 83 ec 20 sub $0x20,%esp
1164a8: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
1164ab: 85 db test %ebx,%ebx
1164ad: 74 59 je 116508 <rtems_clock_get_tod_timeval+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
1164af: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c
1164b6: 75 0c jne 1164c4 <rtems_clock_get_tod_timeval+0x24>
1164b8: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
1164bd: 8d 65 f8 lea -0x8(%ebp),%esp
1164c0: 5b pop %ebx
1164c1: 5e pop %esi
1164c2: c9 leave
1164c3: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
1164c4: 9c pushf
1164c5: fa cli
1164c6: 5e pop %esi
_TOD_Get( &now );
1164c7: 83 ec 0c sub $0xc,%esp
1164ca: 8d 45 f0 lea -0x10(%ebp),%eax
1164cd: 50 push %eax
1164ce: e8 61 44 00 00 call 11a934 <_TOD_Get>
_ISR_Enable(level);
1164d3: 56 push %esi
1164d4: 9d popf
useconds = (suseconds_t)now.tv_nsec;
1164d5: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1164d8: 8b 45 f0 mov -0x10(%ebp),%eax
1164db: 89 03 mov %eax,(%ebx)
time->tv_usec = useconds;
1164dd: be d3 4d 62 10 mov $0x10624dd3,%esi
1164e2: 89 c8 mov %ecx,%eax
1164e4: f7 ee imul %esi
1164e6: 89 45 e0 mov %eax,-0x20(%ebp)
1164e9: 89 55 e4 mov %edx,-0x1c(%ebp)
1164ec: 8b 75 e4 mov -0x1c(%ebp),%esi
1164ef: c1 fe 06 sar $0x6,%esi
1164f2: 89 c8 mov %ecx,%eax
1164f4: 99 cltd
1164f5: 29 d6 sub %edx,%esi
1164f7: 89 73 04 mov %esi,0x4(%ebx)
1164fa: 31 c0 xor %eax,%eax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
1164fc: 83 c4 10 add $0x10,%esp
}
1164ff: 8d 65 f8 lea -0x8(%ebp),%esp
116502: 5b pop %ebx
116503: 5e pop %esi
116504: c9 leave
116505: c3 ret
116506: 66 90 xchg %ax,%ax
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
116508: b8 09 00 00 00 mov $0x9,%eax
11650d: eb ae jmp 1164bd <rtems_clock_get_tod_timeval+0x1d>
0010b7a8 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
10b7a8: 55 push %ebp
10b7a9: 89 e5 mov %esp,%ebp
10b7ab: 83 ec 08 sub $0x8,%esp
10b7ae: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
10b7b1: 85 c0 test %eax,%eax
10b7b3: 74 13 je 10b7c8 <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
10b7b5: 83 ec 0c sub $0xc,%esp
10b7b8: 50 push %eax
10b7b9: e8 6e 16 00 00 call 10ce2c <_TOD_Get_uptime_as_timespec>
10b7be: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10b7c0: 83 c4 10 add $0x10,%esp
}
10b7c3: c9 leave
10b7c4: c3 ret
10b7c5: 8d 76 00 lea 0x0(%esi),%esi
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
10b7c8: b0 09 mov $0x9,%al
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
10b7ca: c9 leave
10b7cb: c3 ret
0010c700 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c700: 55 push %ebp
10c701: 89 e5 mov %esp,%ebp
10c703: 53 push %ebx
10c704: 83 ec 14 sub $0x14,%esp
10c707: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c70a: 85 db test %ebx,%ebx
10c70c: 74 66 je 10c774 <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c70e: 83 ec 0c sub $0xc,%esp
10c711: 53 push %ebx
10c712: e8 39 01 00 00 call 10c850 <_TOD_Validate>
10c717: 83 c4 10 add $0x10,%esp
10c71a: 84 c0 test %al,%al
10c71c: 75 0a jne 10c728 <rtems_clock_set+0x28>
10c71e: b8 14 00 00 00 mov $0x14,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c723: 8b 5d fc mov -0x4(%ebp),%ebx
10c726: c9 leave
10c727: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c728: 83 ec 0c sub $0xc,%esp
10c72b: 53 push %ebx
10c72c: e8 93 00 00 00 call 10c7c4 <_TOD_To_seconds>
10c731: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c734: 8b 43 18 mov 0x18(%ebx),%eax
10c737: 0f af 05 8c 86 12 00 imul 0x12868c,%eax
10c73e: 8d 04 80 lea (%eax,%eax,4),%eax
10c741: 8d 04 80 lea (%eax,%eax,4),%eax
10c744: 8d 04 80 lea (%eax,%eax,4),%eax
10c747: c1 e0 03 shl $0x3,%eax
10c74a: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c74d: a1 b8 cc 12 00 mov 0x12ccb8,%eax
10c752: 40 inc %eax
10c753: a3 b8 cc 12 00 mov %eax,0x12ccb8
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c758: 8d 45 f0 lea -0x10(%ebp),%eax
10c75b: 89 04 24 mov %eax,(%esp)
10c75e: e8 29 19 00 00 call 10e08c <_TOD_Set>
_Thread_Enable_dispatch();
10c763: e8 38 2c 00 00 call 10f3a0 <_Thread_Enable_dispatch>
10c768: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c76a: 83 c4 10 add $0x10,%esp
}
return RTEMS_INVALID_CLOCK;
}
10c76d: 8b 5d fc mov -0x4(%ebp),%ebx
10c770: c9 leave
10c771: c3 ret
10c772: 66 90 xchg %ax,%ax
rtems_time_of_day *time_buffer
)
{
struct timespec newtime;
if ( !time_buffer )
10c774: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c779: 8b 5d fc mov -0x4(%ebp),%ebx
10c77c: c9 leave
10c77d: c3 ret
0010b5d0 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10b5d0: 55 push %ebp
10b5d1: 89 e5 mov %esp,%ebp
10b5d3: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10b5d6: e8 35 15 00 00 call 10cb10 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10b5db: 83 ec 0c sub $0xc,%esp
10b5de: 68 98 95 12 00 push $0x129598
10b5e3: e8 9c 37 00 00 call 10ed84 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10b5e8: e8 17 32 00 00 call 10e804 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Context_Switch_necessary );
10b5ed: a0 88 95 12 00 mov 0x129588,%al
if ( _Thread_Is_context_switch_necessary() &&
10b5f2: 83 c4 10 add $0x10,%esp
10b5f5: 84 c0 test %al,%al
10b5f7: 74 09 je 10b602 <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10b5f9: a1 b8 94 12 00 mov 0x1294b8,%eax
10b5fe: 85 c0 test %eax,%eax
10b600: 74 06 je 10b608 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b602: 31 c0 xor %eax,%eax
10b604: c9 leave
10b605: c3 ret
10b606: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b608: e8 03 25 00 00 call 10db10 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b60d: 31 c0 xor %eax,%eax
10b60f: c9 leave
10b610: c3 ret
0010b798 <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b798: 55 push %ebp
10b799: 89 e5 mov %esp,%ebp
10b79b: 53 push %ebx
10b79c: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b79f: 8d 45 f4 lea -0xc(%ebp),%eax
10b7a2: 50 push %eax
10b7a3: ff 75 08 pushl 0x8(%ebp)
10b7a6: e8 e5 24 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10b7ab: 83 c4 10 add $0x10,%esp
10b7ae: 8b 55 f4 mov -0xc(%ebp),%edx
10b7b1: 85 d2 test %edx,%edx
10b7b3: 75 2b jne 10b7e0 <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b7b5: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b7bb: 9c pushf
10b7bc: fa cli
10b7bd: 59 pop %ecx
*the_event_set |= the_new_events;
10b7be: 8b 5d 0c mov 0xc(%ebp),%ebx
10b7c1: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b7c3: 51 push %ecx
10b7c4: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b7c5: 83 ec 0c sub $0xc,%esp
10b7c8: 50 push %eax
10b7c9: e8 1e 00 00 00 call 10b7ec <_Event_Surrender>
_Thread_Enable_dispatch();
10b7ce: e8 99 24 00 00 call 10dc6c <_Thread_Enable_dispatch>
10b7d3: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10b7d5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7d8: 8b 5d fc mov -0x4(%ebp),%ebx
10b7db: c9 leave
10b7dc: c3 ret
10b7dd: 8d 76 00 lea 0x0(%esi),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10b7e0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b7e5: 8b 5d fc mov -0x4(%ebp),%ebx
10b7e8: c9 leave
10b7e9: c3 ret
0010d73c <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
10d73c: 55 push %ebp
10d73d: 89 e5 mov %esp,%ebp
10d73f: 57 push %edi
10d740: 56 push %esi
10d741: 53 push %ebx
10d742: 83 ec 1c sub $0x1c,%esp
10d745: 8b 75 0c mov 0xc(%ebp),%esi
10d748: 8b 5d 10 mov 0x10(%ebp),%ebx
Extension_Control *the_extension;
if ( !id )
10d74b: 85 db test %ebx,%ebx
10d74d: 0f 84 85 00 00 00 je 10d7d8 <rtems_extension_create+0x9c><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10d753: 8b 45 08 mov 0x8(%ebp),%eax
10d756: 85 c0 test %eax,%eax
10d758: 75 0e jne 10d768 <rtems_extension_create+0x2c>
10d75a: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d75f: 8d 65 f4 lea -0xc(%ebp),%esp
10d762: 5b pop %ebx
10d763: 5e pop %esi
10d764: 5f pop %edi
10d765: c9 leave
10d766: c3 ret
10d767: 90 nop
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d768: a1 b8 cc 12 00 mov 0x12ccb8,%eax
10d76d: 40 inc %eax
10d76e: a3 b8 cc 12 00 mov %eax,0x12ccb8
#ifndef __EXTENSION_MANAGER_inl
#define __EXTENSION_MANAGER_inl
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
{
return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
10d773: 83 ec 0c sub $0xc,%esp
10d776: 68 40 cf 12 00 push $0x12cf40
10d77b: e8 18 0e 00 00 call 10e598 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
10d780: 83 c4 10 add $0x10,%esp
10d783: 85 c0 test %eax,%eax
10d785: 74 45 je 10d7cc <rtems_extension_create+0x90><== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
10d787: 8d 78 24 lea 0x24(%eax),%edi
10d78a: b9 08 00 00 00 mov $0x8,%ecx
10d78f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10d791: 83 ec 0c sub $0xc,%esp
10d794: 8d 50 10 lea 0x10(%eax),%edx
10d797: 52 push %edx
10d798: 89 45 e4 mov %eax,-0x1c(%ebp)
10d79b: e8 50 2b 00 00 call 1102f0 <_User_extensions_Add_set>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d7a0: 8b 45 e4 mov -0x1c(%ebp),%eax
10d7a3: 8b 50 08 mov 0x8(%eax),%edx
10d7a6: 0f b7 f2 movzwl %dx,%esi
10d7a9: 8b 0d 5c cf 12 00 mov 0x12cf5c,%ecx
10d7af: 89 04 b1 mov %eax,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10d7b2: 8b 4d 08 mov 0x8(%ebp),%ecx
10d7b5: 89 48 0c mov %ecx,0xc(%eax)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
10d7b8: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10d7ba: e8 e1 1b 00 00 call 10f3a0 <_Thread_Enable_dispatch>
10d7bf: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10d7c1: 83 c4 10 add $0x10,%esp
}
10d7c4: 8d 65 f4 lea -0xc(%ebp),%esp
10d7c7: 5b pop %ebx
10d7c8: 5e pop %esi
10d7c9: 5f pop %edi
10d7ca: c9 leave
10d7cb: c3 ret
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
10d7cc: e8 cf 1b 00 00 call 10f3a0 <_Thread_Enable_dispatch>
10d7d1: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
10d7d6: eb 87 jmp 10d75f <rtems_extension_create+0x23>
rtems_id *id
)
{
Extension_Control *the_extension;
if ( !id )
10d7d8: b8 09 00 00 00 mov $0x9,%eax
10d7dd: eb 80 jmp 10d75f <rtems_extension_create+0x23>
0010d5c0 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
10d5c0: 55 push %ebp
10d5c1: 89 e5 mov %esp,%ebp
10d5c3: 53 push %ebx
10d5c4: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
10d5c7: 8d 45 f4 lea -0xc(%ebp),%eax
10d5ca: 50 push %eax
10d5cb: ff 75 08 pushl 0x8(%ebp)
10d5ce: 68 e0 ba 12 00 push $0x12bae0
10d5d3: e8 f8 11 00 00 call 10e7d0 <_Objects_Get>
10d5d8: 89 c3 mov %eax,%ebx
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10d5da: 83 c4 10 add $0x10,%esp
10d5dd: 8b 55 f4 mov -0xc(%ebp),%edx
10d5e0: 85 d2 test %edx,%edx
10d5e2: 75 38 jne 10d61c <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10d5e4: 83 ec 0c sub $0xc,%esp
10d5e7: 8d 40 10 lea 0x10(%eax),%eax
10d5ea: 50 push %eax
10d5eb: e8 d0 29 00 00 call 10ffc0 <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10d5f0: 59 pop %ecx
10d5f1: 58 pop %eax
10d5f2: 53 push %ebx
10d5f3: 68 e0 ba 12 00 push $0x12bae0
10d5f8: e8 9f 0d 00 00 call 10e39c <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
10d5fd: 58 pop %eax
10d5fe: 5a pop %edx
10d5ff: 53 push %ebx
10d600: 68 e0 ba 12 00 push $0x12bae0
10d605: e8 96 10 00 00 call 10e6a0 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10d60a: e8 35 1a 00 00 call 10f044 <_Thread_Enable_dispatch>
10d60f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10d611: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d614: 8b 5d fc mov -0x4(%ebp),%ebx
10d617: c9 leave
10d618: c3 ret
10d619: 8d 76 00 lea 0x0(%esi),%esi
{
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
switch ( location ) {
10d61c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d621: 8b 5d fc mov -0x4(%ebp),%ebx
10d624: c9 leave
10d625: c3 ret
00114c64 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114c64: 55 push %ebp
114c65: 89 e5 mov %esp,%ebp
114c67: 56 push %esi
114c68: 53 push %ebx
114c69: 8b 45 08 mov 0x8(%ebp),%eax
114c6c: 8b 4d 0c mov 0xc(%ebp),%ecx
114c6f: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114c72: 39 05 60 9f 12 00 cmp %eax,0x129f60
114c78: 76 22 jbe 114c9c <rtems_io_close+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
114c7a: 8d 34 40 lea (%eax,%eax,2),%esi
114c7d: 8b 15 64 9f 12 00 mov 0x129f64,%edx
114c83: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114c87: 85 d2 test %edx,%edx
114c89: 74 1d je 114ca8 <rtems_io_close+0x44>
114c8b: 89 5d 10 mov %ebx,0x10(%ebp)
114c8e: 89 4d 0c mov %ecx,0xc(%ebp)
114c91: 89 45 08 mov %eax,0x8(%ebp)
}
114c94: 5b pop %ebx
114c95: 5e pop %esi
114c96: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114c97: ff e2 jmp *%edx
114c99: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114c9c: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114ca1: 5b pop %ebx
114ca2: 5e pop %esi
114ca3: c9 leave
114ca4: c3 ret
114ca5: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114ca8: 31 c0 xor %eax,%eax
}
114caa: 5b pop %ebx
114cab: 5e pop %esi
114cac: c9 leave
114cad: c3 ret
00114cb0 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114cb0: 55 push %ebp
114cb1: 89 e5 mov %esp,%ebp
114cb3: 56 push %esi
114cb4: 53 push %ebx
114cb5: 8b 45 08 mov 0x8(%ebp),%eax
114cb8: 8b 4d 0c mov 0xc(%ebp),%ecx
114cbb: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114cbe: 39 05 60 9f 12 00 cmp %eax,0x129f60
114cc4: 76 22 jbe 114ce8 <rtems_io_control+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
114cc6: 8d 34 40 lea (%eax,%eax,2),%esi
114cc9: 8b 15 64 9f 12 00 mov 0x129f64,%edx
114ccf: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114cd3: 85 d2 test %edx,%edx
114cd5: 74 1d je 114cf4 <rtems_io_control+0x44>
114cd7: 89 5d 10 mov %ebx,0x10(%ebp)
114cda: 89 4d 0c mov %ecx,0xc(%ebp)
114cdd: 89 45 08 mov %eax,0x8(%ebp)
}
114ce0: 5b pop %ebx
114ce1: 5e pop %esi
114ce2: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114ce3: ff e2 jmp *%edx
114ce5: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114ce8: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114ced: 5b pop %ebx
114cee: 5e pop %esi
114cef: c9 leave
114cf0: c3 ret
114cf1: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114cf4: 31 c0 xor %eax,%eax
}
114cf6: 5b pop %ebx
114cf7: 5e pop %esi
114cf8: c9 leave
114cf9: c3 ret
00111f1c <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
111f1c: 55 push %ebp
111f1d: 89 e5 mov %esp,%ebp
111f1f: 56 push %esi
111f20: 53 push %ebx
111f21: 8b 45 08 mov 0x8(%ebp),%eax
111f24: 8b 4d 0c mov 0xc(%ebp),%ecx
111f27: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
111f2a: 39 05 60 9f 12 00 cmp %eax,0x129f60
111f30: 76 1e jbe 111f50 <rtems_io_initialize+0x34>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
111f32: 8d 34 40 lea (%eax,%eax,2),%esi
111f35: 8b 15 64 9f 12 00 mov 0x129f64,%edx
111f3b: 8b 14 f2 mov (%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f3e: 85 d2 test %edx,%edx
111f40: 74 1a je 111f5c <rtems_io_initialize+0x40>
111f42: 89 5d 10 mov %ebx,0x10(%ebp)
111f45: 89 4d 0c mov %ecx,0xc(%ebp)
111f48: 89 45 08 mov %eax,0x8(%ebp)
}
111f4b: 5b pop %ebx
111f4c: 5e pop %esi
111f4d: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f4e: ff e2 jmp *%edx
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
111f50: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
111f55: 5b pop %ebx
111f56: 5e pop %esi
111f57: c9 leave
111f58: c3 ret
111f59: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
111f5c: 31 c0 xor %eax,%eax
}
111f5e: 5b pop %ebx
111f5f: 5e pop %esi
111f60: c9 leave
111f61: c3 ret
00114cfc <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114cfc: 55 push %ebp
114cfd: 89 e5 mov %esp,%ebp
114cff: 56 push %esi
114d00: 53 push %ebx
114d01: 8b 45 08 mov 0x8(%ebp),%eax
114d04: 8b 4d 0c mov 0xc(%ebp),%ecx
114d07: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d0a: 39 05 60 9f 12 00 cmp %eax,0x129f60
114d10: 76 22 jbe 114d34 <rtems_io_open+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
114d12: 8d 34 40 lea (%eax,%eax,2),%esi
114d15: 8b 15 64 9f 12 00 mov 0x129f64,%edx
114d1b: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d1f: 85 d2 test %edx,%edx
114d21: 74 1d je 114d40 <rtems_io_open+0x44>
114d23: 89 5d 10 mov %ebx,0x10(%ebp)
114d26: 89 4d 0c mov %ecx,0xc(%ebp)
114d29: 89 45 08 mov %eax,0x8(%ebp)
}
114d2c: 5b pop %ebx
114d2d: 5e pop %esi
114d2e: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d2f: ff e2 jmp *%edx
114d31: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d34: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114d39: 5b pop %ebx
114d3a: 5e pop %esi
114d3b: c9 leave
114d3c: c3 ret
114d3d: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d40: 31 c0 xor %eax,%eax
}
114d42: 5b pop %ebx
114d43: 5e pop %esi
114d44: c9 leave
114d45: c3 ret
00114d48 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114d48: 55 push %ebp
114d49: 89 e5 mov %esp,%ebp
114d4b: 56 push %esi
114d4c: 53 push %ebx
114d4d: 8b 45 08 mov 0x8(%ebp),%eax
114d50: 8b 4d 0c mov 0xc(%ebp),%ecx
114d53: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d56: 39 05 60 9f 12 00 cmp %eax,0x129f60
114d5c: 76 22 jbe 114d80 <rtems_io_read+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
114d5e: 8d 34 40 lea (%eax,%eax,2),%esi
114d61: 8b 15 64 9f 12 00 mov 0x129f64,%edx
114d67: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d6b: 85 d2 test %edx,%edx
114d6d: 74 1d je 114d8c <rtems_io_read+0x44>
114d6f: 89 5d 10 mov %ebx,0x10(%ebp)
114d72: 89 4d 0c mov %ecx,0xc(%ebp)
114d75: 89 45 08 mov %eax,0x8(%ebp)
}
114d78: 5b pop %ebx
114d79: 5e pop %esi
114d7a: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d7b: ff e2 jmp *%edx
114d7d: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114d80: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114d85: 5b pop %ebx
114d86: 5e pop %esi
114d87: c9 leave
114d88: c3 ret
114d89: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114d8c: 31 c0 xor %eax,%eax
}
114d8e: 5b pop %ebx
114d8f: 5e pop %esi
114d90: c9 leave
114d91: c3 ret
0010d51c <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
)
{
10d51c: 55 push %ebp
10d51d: 89 e5 mov %esp,%ebp
10d51f: 57 push %edi
10d520: 56 push %esi
10d521: 53 push %ebx
10d522: 83 ec 0c sub $0xc,%esp
10d525: 8b 5d 08 mov 0x8(%ebp),%ebx
10d528: 8b 75 0c mov 0xc(%ebp),%esi
10d52b: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10d52e: a1 00 db 12 00 mov 0x12db00,%eax
if ( rtems_interrupt_is_in_progress() )
10d533: 8b 0d f4 d0 12 00 mov 0x12d0f4,%ecx
10d539: 85 c9 test %ecx,%ecx
10d53b: 0f 85 ab 00 00 00 jne 10d5ec <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10d541: 85 d2 test %edx,%edx
10d543: 0f 84 e3 00 00 00 je 10d62c <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10d549: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10d54b: 85 f6 test %esi,%esi
10d54d: 0f 84 d9 00 00 00 je 10d62c <rtems_io_register_driver+0x110>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d553: 8b 3e mov (%esi),%edi
10d555: 85 ff test %edi,%edi
10d557: 0f 84 c3 00 00 00 je 10d620 <rtems_io_register_driver+0x104>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d55d: 39 d8 cmp %ebx,%eax
10d55f: 76 7b jbe 10d5dc <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10d561: a1 58 d0 12 00 mov 0x12d058,%eax
10d566: 40 inc %eax
10d567: a3 58 d0 12 00 mov %eax,0x12d058
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10d56c: 85 db test %ebx,%ebx
10d56e: 0f 85 88 00 00 00 jne 10d5fc <rtems_io_register_driver+0xe0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
10d574: 8b 0d 00 db 12 00 mov 0x12db00,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10d57a: 85 c9 test %ecx,%ecx
10d57c: 0f 84 b7 00 00 00 je 10d639 <rtems_io_register_driver+0x11d><== NEVER TAKEN
10d582: 8b 3d 04 db 12 00 mov 0x12db04,%edi
10d588: 89 f8 mov %edi,%eax
10d58a: eb 08 jmp 10d594 <rtems_io_register_driver+0x78>
10d58c: 43 inc %ebx
10d58d: 83 c0 18 add $0x18,%eax
10d590: 39 d9 cmp %ebx,%ecx
10d592: 76 0b jbe 10d59f <rtems_io_register_driver+0x83>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d594: 83 38 00 cmpl $0x0,(%eax)
10d597: 75 f3 jne 10d58c <rtems_io_register_driver+0x70>
10d599: 83 78 04 00 cmpl $0x0,0x4(%eax)
10d59d: 75 ed jne 10d58c <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d59f: 89 1a mov %ebx,(%edx)
if ( m != n )
10d5a1: 39 d9 cmp %ebx,%ecx
10d5a3: 0f 84 97 00 00 00 je 10d640 <rtems_io_register_driver+0x124>
10d5a9: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d5ac: 8d 04 c7 lea (%edi,%eax,8),%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10d5af: b9 06 00 00 00 mov $0x6,%ecx
10d5b4: 89 c7 mov %eax,%edi
10d5b6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10d5b8: e8 2f 1a 00 00 call 10efec <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10d5bd: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10d5c4: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10d5cb: 89 5d 08 mov %ebx,0x8(%ebp)
}
10d5ce: 83 c4 0c add $0xc,%esp
10d5d1: 5b pop %ebx
10d5d2: 5e pop %esi
10d5d3: 5f pop %edi
10d5d4: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d5d5: e9 f6 86 00 00 jmp 115cd0 <rtems_io_initialize>
10d5da: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
10d5dc: 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 );
}
10d5e1: 83 c4 0c add $0xc,%esp
10d5e4: 5b pop %ebx
10d5e5: 5e pop %esi
10d5e6: 5f pop %edi
10d5e7: c9 leave
10d5e8: c3 ret
10d5e9: 8d 76 00 lea 0x0(%esi),%esi
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
10d5ec: 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 );
}
10d5f1: 83 c4 0c add $0xc,%esp
10d5f4: 5b pop %ebx
10d5f5: 5e pop %esi
10d5f6: 5f pop %edi
10d5f7: c9 leave
10d5f8: c3 ret
10d5f9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10d5fc: 8d 04 5b lea (%ebx,%ebx,2),%eax
10d5ff: c1 e0 03 shl $0x3,%eax
10d602: 03 05 04 db 12 00 add 0x12db04,%eax
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d608: 8b 38 mov (%eax),%edi
10d60a: 85 ff test %edi,%edi
10d60c: 74 3e je 10d64c <rtems_io_register_driver+0x130>
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();
10d60e: e8 d9 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d613: b8 0c 00 00 00 mov $0xc,%eax
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
10d618: 83 c4 0c add $0xc,%esp
10d61b: 5b pop %ebx
10d61c: 5e pop %esi
10d61d: 5f pop %edi
10d61e: c9 leave
10d61f: c3 ret
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d620: 8b 4e 04 mov 0x4(%esi),%ecx
10d623: 85 c9 test %ecx,%ecx
10d625: 0f 85 32 ff ff ff jne 10d55d <rtems_io_register_driver+0x41>
10d62b: 90 nop
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10d62c: b8 09 00 00 00 mov $0x9,%eax
}
10d631: 83 c4 0c add $0xc,%esp
10d634: 5b pop %ebx
10d635: 5e pop %esi
10d636: 5f pop %edi
10d637: c9 leave
10d638: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d639: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
10d63f: 90 nop <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
10d640: e8 a7 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d645: b8 05 00 00 00 mov $0x5,%eax
return sc;
10d64a: eb 95 jmp 10d5e1 <rtems_io_register_driver+0xc5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d64c: 8b 48 04 mov 0x4(%eax),%ecx
10d64f: 85 c9 test %ecx,%ecx
10d651: 75 bb jne 10d60e <rtems_io_register_driver+0xf2>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d653: 89 1a mov %ebx,(%edx)
10d655: e9 55 ff ff ff jmp 10d5af <rtems_io_register_driver+0x93>
0010d65c <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d65c: 55 push %ebp
10d65d: 89 e5 mov %esp,%ebp
10d65f: 57 push %edi
10d660: 83 ec 04 sub $0x4,%esp
10d663: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d666: 8b 15 f4 d0 12 00 mov 0x12d0f4,%edx
10d66c: 85 d2 test %edx,%edx
10d66e: 75 44 jne 10d6b4 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d670: 39 05 00 db 12 00 cmp %eax,0x12db00
10d676: 77 0c ja 10d684 <rtems_io_unregister_driver+0x28>
10d678: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d67d: 5a pop %edx
10d67e: 5f pop %edi
10d67f: c9 leave
10d680: c3 ret
10d681: 8d 76 00 lea 0x0(%esi),%esi
10d684: 8b 15 58 d0 12 00 mov 0x12d058,%edx
10d68a: 42 inc %edx
10d68b: 89 15 58 d0 12 00 mov %edx,0x12d058
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
10d691: 8d 14 40 lea (%eax,%eax,2),%edx
10d694: c1 e2 03 shl $0x3,%edx
10d697: 03 15 04 db 12 00 add 0x12db04,%edx
10d69d: b9 18 00 00 00 mov $0x18,%ecx
10d6a2: 31 c0 xor %eax,%eax
10d6a4: 89 d7 mov %edx,%edi
10d6a6: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d6a8: e8 3f 19 00 00 call 10efec <_Thread_Enable_dispatch>
10d6ad: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d6af: 5a pop %edx
10d6b0: 5f pop %edi
10d6b1: c9 leave
10d6b2: c3 ret
10d6b3: 90 nop
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
10d6b4: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d6b9: 5a pop %edx
10d6ba: 5f pop %edi
10d6bb: c9 leave
10d6bc: c3 ret
00114d94 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
114d94: 55 push %ebp
114d95: 89 e5 mov %esp,%ebp
114d97: 56 push %esi
114d98: 53 push %ebx
114d99: 8b 45 08 mov 0x8(%ebp),%eax
114d9c: 8b 4d 0c mov 0xc(%ebp),%ecx
114d9f: 8b 5d 10 mov 0x10(%ebp),%ebx
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114da2: 39 05 60 9f 12 00 cmp %eax,0x129f60
114da8: 76 22 jbe 114dcc <rtems_io_write+0x38>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
114daa: 8d 34 40 lea (%eax,%eax,2),%esi
114dad: 8b 15 64 9f 12 00 mov 0x129f64,%edx
114db3: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114db7: 85 d2 test %edx,%edx
114db9: 74 1d je 114dd8 <rtems_io_write+0x44>
114dbb: 89 5d 10 mov %ebx,0x10(%ebp)
114dbe: 89 4d 0c mov %ecx,0xc(%ebp)
114dc1: 89 45 08 mov %eax,0x8(%ebp)
}
114dc4: 5b pop %ebx
114dc5: 5e pop %esi
114dc6: c9 leave
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114dc7: ff e2 jmp *%edx
114dc9: 8d 76 00 lea 0x0(%esi),%esi
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
114dcc: b8 0a 00 00 00 mov $0xa,%eax
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
114dd1: 5b pop %ebx
114dd2: 5e pop %esi
114dd3: c9 leave
114dd4: c3 ret
114dd5: 8d 76 00 lea 0x0(%esi),%esi
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
114dd8: 31 c0 xor %eax,%eax
}
114dda: 5b pop %ebx
114ddb: 5e pop %esi
114ddc: c9 leave
114ddd: c3 ret
0010e530 <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)
{
10e530: 55 push %ebp
10e531: 89 e5 mov %esp,%ebp
10e533: 57 push %edi
10e534: 56 push %esi
10e535: 53 push %ebx
10e536: 83 ec 1c sub $0x1c,%esp
10e539: 8b 7d 08 mov 0x8(%ebp),%edi
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
10e53c: 85 ff test %edi,%edi
10e53e: 74 4d je 10e58d <rtems_iterate_over_all_threads+0x5d><== NEVER TAKEN
10e540: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
10e547: 8b 55 e4 mov -0x1c(%ebp),%edx
10e54a: 8b 04 95 8c cc 12 00 mov 0x12cc8c(,%edx,4),%eax
10e551: 85 c0 test %eax,%eax
10e553: 74 2f je 10e584 <rtems_iterate_over_all_threads+0x54>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
10e555: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10e558: 85 f6 test %esi,%esi
10e55a: 74 28 je 10e584 <rtems_iterate_over_all_threads+0x54>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e55c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10e561: 74 21 je 10e584 <rtems_iterate_over_all_threads+0x54>
10e563: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10e568: 8b 46 1c mov 0x1c(%esi),%eax
10e56b: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e56e: 85 c0 test %eax,%eax
10e570: 74 09 je 10e57b <rtems_iterate_over_all_threads+0x4b><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e572: 83 ec 0c sub $0xc,%esp
10e575: 50 push %eax
10e576: ff d7 call *%edi
10e578: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e57b: 43 inc %ebx
10e57c: 0f b7 46 10 movzwl 0x10(%esi),%eax
10e580: 39 d8 cmp %ebx,%eax
10e582: 73 e4 jae 10e568 <rtems_iterate_over_all_threads+0x38>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e584: ff 45 e4 incl -0x1c(%ebp)
10e587: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp)
10e58b: 75 ba jne 10e547 <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10e58d: 8d 65 f4 lea -0xc(%ebp),%esp
10e590: 5b pop %ebx
10e591: 5e pop %esi
10e592: 5f pop %edi
10e593: c9 leave
10e594: c3 ret
00116c78 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
116c78: 55 push %ebp
116c79: 89 e5 mov %esp,%ebp
116c7b: 57 push %edi
116c7c: 56 push %esi
116c7d: 53 push %ebx
116c7e: 83 ec 1c sub $0x1c,%esp
116c81: 8b 7d 08 mov 0x8(%ebp),%edi
116c84: 8b 5d 0c mov 0xc(%ebp),%ebx
116c87: 8b 75 14 mov 0x14(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
116c8a: 85 db test %ebx,%ebx
116c8c: 74 62 je 116cf0 <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
116c8e: 85 f6 test %esi,%esi
116c90: 74 5e je 116cf0 <rtems_message_queue_broadcast+0x78>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
116c92: 51 push %ecx
116c93: 8d 45 e4 lea -0x1c(%ebp),%eax
116c96: 50 push %eax
116c97: 57 push %edi
116c98: 68 20 4b 14 00 push $0x144b20
116c9d: e8 36 4d 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116ca2: 83 c4 10 add $0x10,%esp
116ca5: 8b 55 e4 mov -0x1c(%ebp),%edx
116ca8: 85 d2 test %edx,%edx
116caa: 74 10 je 116cbc <rtems_message_queue_broadcast+0x44>
116cac: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116cb1: 8d 65 f4 lea -0xc(%ebp),%esp
116cb4: 5b pop %ebx
116cb5: 5e pop %esi
116cb6: 5f pop %edi
116cb7: c9 leave
116cb8: c3 ret
116cb9: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
116cbc: 83 ec 08 sub $0x8,%esp
116cbf: 56 push %esi
116cc0: 6a 00 push $0x0
116cc2: 57 push %edi
116cc3: ff 75 10 pushl 0x10(%ebp)
116cc6: 53 push %ebx
116cc7: 83 c0 14 add $0x14,%eax
116cca: 50 push %eax
116ccb: e8 ec 34 00 00 call 11a1bc <_CORE_message_queue_Broadcast>
116cd0: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
116cd2: 83 c4 20 add $0x20,%esp
116cd5: e8 e2 55 00 00 call 11c2bc <_Thread_Enable_dispatch>
return
_Message_queue_Translate_core_message_queue_return_code( core_status );
116cda: 83 ec 0c sub $0xc,%esp
116cdd: 53 push %ebx
116cde: e8 69 03 00 00 call 11704c <_Message_queue_Translate_core_message_queue_return_code>
#endif
count
);
_Thread_Enable_dispatch();
return
116ce3: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ce6: 8d 65 f4 lea -0xc(%ebp),%esp
116ce9: 5b pop %ebx
116cea: 5e pop %esi
116ceb: 5f pop %edi
116cec: c9 leave
116ced: c3 ret
116cee: 66 90 xchg %ax,%ax
#endif
count
);
_Thread_Enable_dispatch();
return
116cf0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116cf5: 8d 65 f4 lea -0xc(%ebp),%esp
116cf8: 5b pop %ebx
116cf9: 5e pop %esi
116cfa: 5f pop %edi
116cfb: c9 leave
116cfc: c3 ret
0011418c <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
11418c: 55 push %ebp
11418d: 89 e5 mov %esp,%ebp
11418f: 57 push %edi
114190: 56 push %esi
114191: 53 push %ebx
114192: 83 ec 2c sub $0x2c,%esp
114195: 8b 5d 08 mov 0x8(%ebp),%ebx
114198: 8b 75 0c mov 0xc(%ebp),%esi
11419b: 8b 4d 10 mov 0x10(%ebp),%ecx
11419e: 8b 7d 18 mov 0x18(%ebp),%edi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1141a1: 85 db test %ebx,%ebx
1141a3: 74 2f je 1141d4 <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
1141a5: 85 ff test %edi,%edi
1141a7: 0f 84 a3 00 00 00 je 114250 <rtems_message_queue_create+0xc4>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
1141ad: 85 f6 test %esi,%esi
1141af: 74 13 je 1141c4 <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
1141b1: 85 c9 test %ecx,%ecx
1141b3: 75 2f jne 1141e4 <rtems_message_queue_create+0x58>
1141b5: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141ba: 8d 65 f4 lea -0xc(%ebp),%esp
1141bd: 5b pop %ebx
1141be: 5e pop %esi
1141bf: 5f pop %edi
1141c0: c9 leave
1141c1: c3 ret
1141c2: 66 90 xchg %ax,%ax
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
1141c4: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141c9: 8d 65 f4 lea -0xc(%ebp),%esp
1141cc: 5b pop %ebx
1141cd: 5e pop %esi
1141ce: 5f pop %edi
1141cf: c9 leave
1141d0: c3 ret
1141d1: 8d 76 00 lea 0x0(%esi),%esi
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
1141d4: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1141d9: 8d 65 f4 lea -0xc(%ebp),%esp
1141dc: 5b pop %ebx
1141dd: 5e pop %esi
1141de: 5f pop %edi
1141df: c9 leave
1141e0: c3 ret
1141e1: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1141e4: a1 18 2d 13 00 mov 0x132d18,%eax
1141e9: 40 inc %eax
1141ea: a3 18 2d 13 00 mov %eax,0x132d18
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
1141ef: 89 4d d4 mov %ecx,-0x2c(%ebp)
1141f2: e8 09 69 00 00 call 11ab00 <_Message_queue_Allocate>
1141f7: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
1141f9: 85 c0 test %eax,%eax
1141fb: 8b 4d d4 mov -0x2c(%ebp),%ecx
1141fe: 74 7c je 11427c <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
114200: 8b 45 14 mov 0x14(%ebp),%eax
114203: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
114206: a8 04 test $0x4,%al
114208: 0f 95 c0 setne %al
11420b: 0f b6 c0 movzbl %al,%eax
11420e: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
114211: 51 push %ecx
114212: 56 push %esi
114213: 8d 45 e4 lea -0x1c(%ebp),%eax
114216: 50 push %eax
114217: 8d 42 14 lea 0x14(%edx),%eax
11421a: 50 push %eax
11421b: 89 55 d4 mov %edx,-0x2c(%ebp)
11421e: e8 f1 10 00 00 call 115314 <_CORE_message_queue_Initialize>
114223: 83 c4 10 add $0x10,%esp
114226: 84 c0 test %al,%al
114228: 8b 55 d4 mov -0x2c(%ebp),%edx
11422b: 75 2f jne 11425c <rtems_message_queue_create+0xd0>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
11422d: 83 ec 08 sub $0x8,%esp
114230: 52 push %edx
114231: 68 40 37 13 00 push $0x133740
114236: e8 6d 1f 00 00 call 1161a8 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
11423b: e8 8c 29 00 00 call 116bcc <_Thread_Enable_dispatch>
114240: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
114245: 83 c4 10 add $0x10,%esp
114248: e9 6d ff ff ff jmp 1141ba <rtems_message_queue_create+0x2e>
11424d: 8d 76 00 lea 0x0(%esi),%esi
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
114250: b8 09 00 00 00 mov $0x9,%eax
114255: e9 60 ff ff ff jmp 1141ba <rtems_message_queue_create+0x2e>
11425a: 66 90 xchg %ax,%ax
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11425c: 8b 42 08 mov 0x8(%edx),%eax
11425f: 0f b7 f0 movzwl %ax,%esi
114262: 8b 0d 5c 37 13 00 mov 0x13375c,%ecx
114268: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11426b: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
11426e: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
114270: e8 57 29 00 00 call 116bcc <_Thread_Enable_dispatch>
114275: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
114277: e9 3e ff ff ff jmp 1141ba <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
11427c: e8 4b 29 00 00 call 116bcc <_Thread_Enable_dispatch>
114281: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
114286: e9 2f ff ff ff jmp 1141ba <rtems_message_queue_create+0x2e>
00116e00 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
116e00: 55 push %ebp
116e01: 89 e5 mov %esp,%ebp
116e03: 53 push %ebx
116e04: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
116e07: 8d 45 f4 lea -0xc(%ebp),%eax
116e0a: 50 push %eax
116e0b: ff 75 08 pushl 0x8(%ebp)
116e0e: 68 20 4b 14 00 push $0x144b20
116e13: e8 c0 4b 00 00 call 11b9d8 <_Objects_Get>
116e18: 89 c3 mov %eax,%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116e1a: 83 c4 10 add $0x10,%esp
116e1d: 8b 4d f4 mov -0xc(%ebp),%ecx
116e20: 85 c9 test %ecx,%ecx
116e22: 75 3c jne 116e60 <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
116e24: 83 ec 08 sub $0x8,%esp
116e27: 50 push %eax
116e28: 68 20 4b 14 00 push $0x144b20
116e2d: e8 36 47 00 00 call 11b568 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
116e32: 83 c4 0c add $0xc,%esp
116e35: 6a 05 push $0x5
116e37: 6a 00 push $0x0
116e39: 8d 43 14 lea 0x14(%ebx),%eax
116e3c: 50 push %eax
116e3d: e8 fe 33 00 00 call 11a240 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
116e42: 58 pop %eax
116e43: 5a pop %edx
116e44: 53 push %ebx
116e45: 68 20 4b 14 00 push $0x144b20
116e4a: e8 1d 4a 00 00 call 11b86c <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
116e4f: e8 68 54 00 00 call 11c2bc <_Thread_Enable_dispatch>
116e54: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116e56: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116e59: 8b 5d fc mov -0x4(%ebp),%ebx
116e5c: c9 leave
116e5d: c3 ret
116e5e: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116e60: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116e65: 8b 5d fc mov -0x4(%ebp),%ebx
116e68: c9 leave
116e69: c3 ret
00116e6c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
116e6c: 55 push %ebp
116e6d: 89 e5 mov %esp,%ebp
116e6f: 53 push %ebx
116e70: 83 ec 14 sub $0x14,%esp
116e73: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116e76: 85 db test %ebx,%ebx
116e78: 74 46 je 116ec0 <rtems_message_queue_flush+0x54>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
116e7a: 51 push %ecx
116e7b: 8d 45 f4 lea -0xc(%ebp),%eax
116e7e: 50 push %eax
116e7f: ff 75 08 pushl 0x8(%ebp)
116e82: 68 20 4b 14 00 push $0x144b20
116e87: e8 4c 4b 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116e8c: 83 c4 10 add $0x10,%esp
116e8f: 8b 55 f4 mov -0xc(%ebp),%edx
116e92: 85 d2 test %edx,%edx
116e94: 74 0a je 116ea0 <rtems_message_queue_flush+0x34>
116e96: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116e9b: 8b 5d fc mov -0x4(%ebp),%ebx
116e9e: c9 leave
116e9f: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
116ea0: 83 ec 0c sub $0xc,%esp
116ea3: 83 c0 14 add $0x14,%eax
116ea6: 50 push %eax
116ea7: e8 d0 33 00 00 call 11a27c <_CORE_message_queue_Flush>
116eac: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116eae: e8 09 54 00 00 call 11c2bc <_Thread_Enable_dispatch>
116eb3: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116eb5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116eb8: 8b 5d fc mov -0x4(%ebp),%ebx
116ebb: c9 leave
116ebc: c3 ret
116ebd: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116ec0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116ec5: 8b 5d fc mov -0x4(%ebp),%ebx
116ec8: c9 leave
116ec9: c3 ret
00116ecc <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
116ecc: 55 push %ebp
116ecd: 89 e5 mov %esp,%ebp
116ecf: 53 push %ebx
116ed0: 83 ec 14 sub $0x14,%esp
116ed3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116ed6: 85 db test %ebx,%ebx
116ed8: 74 3a je 116f14 <rtems_message_queue_get_number_pending+0x48>
116eda: 51 push %ecx
116edb: 8d 45 f4 lea -0xc(%ebp),%eax
116ede: 50 push %eax
116edf: ff 75 08 pushl 0x8(%ebp)
116ee2: 68 20 4b 14 00 push $0x144b20
116ee7: e8 ec 4a 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
116eec: 83 c4 10 add $0x10,%esp
116eef: 8b 55 f4 mov -0xc(%ebp),%edx
116ef2: 85 d2 test %edx,%edx
116ef4: 74 0a je 116f00 <rtems_message_queue_get_number_pending+0x34>
116ef6: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116efb: 8b 5d fc mov -0x4(%ebp),%ebx
116efe: c9 leave
116eff: c3 ret
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
116f00: 8b 40 5c mov 0x5c(%eax),%eax
116f03: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116f05: e8 b2 53 00 00 call 11c2bc <_Thread_Enable_dispatch>
116f0a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116f0c: 8b 5d fc mov -0x4(%ebp),%ebx
116f0f: c9 leave
116f10: c3 ret
116f11: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116f14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116f19: 8b 5d fc mov -0x4(%ebp),%ebx
116f1c: c9 leave
116f1d: c3 ret
001142b0 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
1142b0: 55 push %ebp
1142b1: 89 e5 mov %esp,%ebp
1142b3: 56 push %esi
1142b4: 53 push %ebx
1142b5: 83 ec 10 sub $0x10,%esp
1142b8: 8b 5d 0c mov 0xc(%ebp),%ebx
1142bb: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
1142be: 85 db test %ebx,%ebx
1142c0: 74 6e je 114330 <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1142c2: 85 f6 test %esi,%esi
1142c4: 74 6a je 114330 <rtems_message_queue_receive+0x80>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
1142c6: 51 push %ecx
1142c7: 8d 45 f4 lea -0xc(%ebp),%eax
1142ca: 50 push %eax
1142cb: ff 75 08 pushl 0x8(%ebp)
1142ce: 68 40 37 13 00 push $0x133740
1142d3: e8 00 20 00 00 call 1162d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
1142d8: 83 c4 10 add $0x10,%esp
1142db: 8b 55 f4 mov -0xc(%ebp),%edx
1142de: 85 d2 test %edx,%edx
1142e0: 75 42 jne 114324 <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
1142e2: 83 ec 08 sub $0x8,%esp
1142e5: ff 75 18 pushl 0x18(%ebp)
1142e8: 8b 55 14 mov 0x14(%ebp),%edx
1142eb: 83 e2 01 and $0x1,%edx
1142ee: 83 f2 01 xor $0x1,%edx
1142f1: 52 push %edx
1142f2: 56 push %esi
1142f3: 53 push %ebx
1142f4: ff 70 08 pushl 0x8(%eax)
1142f7: 83 c0 14 add $0x14,%eax
1142fa: 50 push %eax
1142fb: e8 d4 10 00 00 call 1153d4 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
114300: 83 c4 20 add $0x20,%esp
114303: e8 c4 28 00 00 call 116bcc <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
114308: 83 ec 0c sub $0xc,%esp
11430b: a1 d8 2d 13 00 mov 0x132dd8,%eax
114310: ff 70 34 pushl 0x34(%eax)
114313: e8 a0 00 00 00 call 1143b8 <_Message_queue_Translate_core_message_queue_return_code>
114318: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11431b: 8d 65 f8 lea -0x8(%ebp),%esp
11431e: 5b pop %ebx
11431f: 5e pop %esi
114320: c9 leave
114321: c3 ret
114322: 66 90 xchg %ax,%ax
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
114324: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114329: 8d 65 f8 lea -0x8(%ebp),%esp
11432c: 5b pop %ebx
11432d: 5e pop %esi
11432e: c9 leave
11432f: c3 ret
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
114330: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
114335: 8d 65 f8 lea -0x8(%ebp),%esp
114338: 5b pop %ebx
114339: 5e pop %esi
11433a: c9 leave
11433b: c3 ret
0010b9a4 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
10b9a4: 55 push %ebp
10b9a5: 89 e5 mov %esp,%ebp
10b9a7: 56 push %esi
10b9a8: 53 push %ebx
10b9a9: 83 ec 10 sub $0x10,%esp
10b9ac: 8b 75 08 mov 0x8(%ebp),%esi
10b9af: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b9b2: 85 db test %ebx,%ebx
10b9b4: 74 5e je 10ba14 <rtems_message_queue_send+0x70><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10b9b6: 51 push %ecx
10b9b7: 8d 45 f4 lea -0xc(%ebp),%eax
10b9ba: 50 push %eax
10b9bb: 56 push %esi
10b9bc: 68 e0 9e 12 00 push $0x129ee0
10b9c1: e8 32 1a 00 00 call 10d3f8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10b9c6: 83 c4 10 add $0x10,%esp
10b9c9: 8b 55 f4 mov -0xc(%ebp),%edx
10b9cc: 85 d2 test %edx,%edx
10b9ce: 74 0c je 10b9dc <rtems_message_queue_send+0x38>
10b9d0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b9d5: 8d 65 f8 lea -0x8(%ebp),%esp
10b9d8: 5b pop %ebx
10b9d9: 5e pop %esi
10b9da: c9 leave
10b9db: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10b9dc: 6a 00 push $0x0
10b9de: 6a 00 push $0x0
10b9e0: 68 ff ff ff 7f push $0x7fffffff
10b9e5: 6a 00 push $0x0
10b9e7: 56 push %esi
10b9e8: ff 75 10 pushl 0x10(%ebp)
10b9eb: 53 push %ebx
10b9ec: 83 c0 14 add $0x14,%eax
10b9ef: 50 push %eax
10b9f0: e8 2b 0c 00 00 call 10c620 <_CORE_message_queue_Submit>
10b9f5: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10b9f7: 83 c4 20 add $0x20,%esp
10b9fa: e8 6d 22 00 00 call 10dc6c <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
10b9ff: 83 ec 0c sub $0xc,%esp
10ba02: 53 push %ebx
10ba03: e8 18 00 00 00 call 10ba20 <_Message_queue_Translate_core_message_queue_return_code>
10ba08: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba0b: 8d 65 f8 lea -0x8(%ebp),%esp
10ba0e: 5b pop %ebx
10ba0f: 5e pop %esi
10ba10: c9 leave
10ba11: c3 ret
10ba12: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10ba14: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba19: 8d 65 f8 lea -0x8(%ebp),%esp
10ba1c: 5b pop %ebx
10ba1d: 5e pop %esi
10ba1e: c9 leave
10ba1f: c3 ret
0011705c <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
11705c: 55 push %ebp
11705d: 89 e5 mov %esp,%ebp
11705f: 56 push %esi
117060: 53 push %ebx
117061: 83 ec 10 sub $0x10,%esp
117064: 8b 75 08 mov 0x8(%ebp),%esi
117067: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
11706a: 85 db test %ebx,%ebx
11706c: 74 5e je 1170cc <rtems_message_queue_urgent+0x70>
11706e: 51 push %ecx
11706f: 8d 45 f4 lea -0xc(%ebp),%eax
117072: 50 push %eax
117073: 56 push %esi
117074: 68 20 4b 14 00 push $0x144b20
117079: e8 5a 49 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
11707e: 83 c4 10 add $0x10,%esp
117081: 8b 55 f4 mov -0xc(%ebp),%edx
117084: 85 d2 test %edx,%edx
117086: 74 0c je 117094 <rtems_message_queue_urgent+0x38>
117088: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11708d: 8d 65 f8 lea -0x8(%ebp),%esp
117090: 5b pop %ebx
117091: 5e pop %esi
117092: c9 leave
117093: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
117094: 6a 00 push $0x0
117096: 6a 00 push $0x0
117098: 68 00 00 00 80 push $0x80000000
11709d: 6a 00 push $0x0
11709f: 56 push %esi
1170a0: ff 75 10 pushl 0x10(%ebp)
1170a3: 53 push %ebx
1170a4: 83 c0 14 add $0x14,%eax
1170a7: 50 push %eax
1170a8: e8 23 34 00 00 call 11a4d0 <_CORE_message_queue_Submit>
1170ad: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
1170af: 83 c4 20 add $0x20,%esp
1170b2: e8 05 52 00 00 call 11c2bc <_Thread_Enable_dispatch>
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
1170b7: 83 ec 0c sub $0xc,%esp
1170ba: 53 push %ebx
1170bb: e8 8c ff ff ff call 11704c <_Message_queue_Translate_core_message_queue_return_code>
1170c0: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1170c3: 8d 65 f8 lea -0x8(%ebp),%esp
1170c6: 5b pop %ebx
1170c7: 5e pop %esi
1170c8: c9 leave
1170c9: c3 ret
1170ca: 66 90 xchg %ax,%ax
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1170cc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1170d1: 8d 65 f8 lea -0x8(%ebp),%esp
1170d4: 5b pop %ebx
1170d5: 5e pop %esi
1170d6: c9 leave
1170d7: c3 ret
0010bf68 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10bf68: 55 push %ebp
10bf69: 89 e5 mov %esp,%ebp
10bf6b: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10bf6e: ff 75 08 pushl 0x8(%ebp)
10bf71: 68 a0 8e 12 00 push $0x128ea0
10bf76: e8 3d 53 00 00 call 1112b8 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10bf7b: 83 c4 10 add $0x10,%esp
10bf7e: 85 c0 test %eax,%eax
10bf80: 74 06 je 10bf88 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10bf82: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10bf84: c9 leave
10bf85: c3 ret
10bf86: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
10bf88: b8 af 3c 12 00 mov $0x123caf,%eax
return api_assoc->name;
return "BAD CLASS";
}
10bf8d: c9 leave
10bf8e: c3 ret
0010d4f0 <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
)
{
10d4f0: 55 push %ebp
10d4f1: 89 e5 mov %esp,%ebp
10d4f3: 57 push %edi
10d4f4: 56 push %esi
10d4f5: 53 push %ebx
10d4f6: 83 ec 0c sub $0xc,%esp
10d4f9: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d4fc: 85 db test %ebx,%ebx
10d4fe: 74 5c je 10d55c <rtems_object_get_class_information+0x6c>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d500: 83 ec 08 sub $0x8,%esp
10d503: ff 75 0c pushl 0xc(%ebp)
10d506: ff 75 08 pushl 0x8(%ebp)
10d509: e8 12 1b 00 00 call 10f020 <_Objects_Get_information>
if ( !obj_info )
10d50e: 83 c4 10 add $0x10,%esp
10d511: 85 c0 test %eax,%eax
10d513: 74 57 je 10d56c <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;
10d515: 8b 50 08 mov 0x8(%eax),%edx
10d518: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10d51a: 8b 50 0c mov 0xc(%eax),%edx
10d51d: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10d520: 8a 50 12 mov 0x12(%eax),%dl
10d523: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10d526: 0f b7 70 10 movzwl 0x10(%eax),%esi
10d52a: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d52d: 85 f6 test %esi,%esi
10d52f: 74 3f je 10d570 <rtems_object_get_class_information+0x80><== NEVER TAKEN
10d531: 8b 78 1c mov 0x1c(%eax),%edi
10d534: b9 01 00 00 00 mov $0x1,%ecx
10d539: b8 01 00 00 00 mov $0x1,%eax
10d53e: 31 d2 xor %edx,%edx
if ( !obj_info->local_table[i] )
unallocated++;
10d540: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4)
10d544: 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++ )
10d547: 40 inc %eax
10d548: 89 c1 mov %eax,%ecx
10d54a: 39 c6 cmp %eax,%esi
10d54c: 73 f2 jae 10d540 <rtems_object_get_class_information+0x50>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d54e: 89 53 10 mov %edx,0x10(%ebx)
10d551: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10d553: 8d 65 f4 lea -0xc(%ebp),%esp
10d556: 5b pop %ebx
10d557: 5e pop %esi
10d558: 5f pop %edi
10d559: c9 leave
10d55a: c3 ret
10d55b: 90 nop
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d55c: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d561: 8d 65 f4 lea -0xc(%ebp),%esp
10d564: 5b pop %ebx
10d565: 5e pop %esi
10d566: 5f pop %edi
10d567: c9 leave
10d568: c3 ret
10d569: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
10d56c: b0 0a mov $0xa,%al
10d56e: eb e3 jmp 10d553 <rtems_object_get_class_information+0x63>
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++ )
10d570: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d572: eb da jmp 10d54e <rtems_object_get_class_information+0x5e><== NOT EXECUTED
0010cb10 <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10cb10: 55 push %ebp
10cb11: 89 e5 mov %esp,%ebp
10cb13: 53 push %ebx
10cb14: 83 ec 14 sub $0x14,%esp
10cb17: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10cb1a: 85 db test %ebx,%ebx
10cb1c: 74 26 je 10cb44 <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10cb1e: 83 ec 08 sub $0x8,%esp
10cb21: 8d 45 f4 lea -0xc(%ebp),%eax
10cb24: 50 push %eax
10cb25: ff 75 08 pushl 0x8(%ebp)
10cb28: e8 5f 1b 00 00 call 10e68c <_Objects_Id_to_name>
*name = name_u.name_u32;
10cb2d: 8b 55 f4 mov -0xc(%ebp),%edx
10cb30: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10cb32: 8b 04 85 ac 48 12 00 mov 0x1248ac(,%eax,4),%eax
10cb39: 83 c4 10 add $0x10,%esp
}
10cb3c: 8b 5d fc mov -0x4(%ebp),%ebx
10cb3f: c9 leave
10cb40: c3 ret
10cb41: 8d 76 00 lea 0x0(%esi),%esi
)
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10cb44: b8 09 00 00 00 mov $0x9,%eax
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
return _Status_Object_name_errors_to_status[ status ];
}
10cb49: 8b 5d fc mov -0x4(%ebp),%ebx
10cb4c: c9 leave
10cb4d: c3 ret
0010bf9c <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10bf9c: 55 push %ebp
10bf9d: 89 e5 mov %esp,%ebp
10bf9f: 57 push %edi
10bfa0: 56 push %esi
10bfa1: 53 push %ebx
10bfa2: 83 ec 1c sub $0x1c,%esp
10bfa5: 8b 75 08 mov 0x8(%ebp),%esi
10bfa8: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10bfab: 85 ff test %edi,%edi
10bfad: 74 61 je 10c010 <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bfaf: 85 f6 test %esi,%esi
10bfb1: 74 35 je 10bfe8 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10bfb3: 83 ec 0c sub $0xc,%esp
10bfb6: 56 push %esi
10bfb7: e8 f0 18 00 00 call 10d8ac <_Objects_Get_information_id>
10bfbc: 89 c3 mov %eax,%ebx
if ( !information )
10bfbe: 83 c4 10 add $0x10,%esp
10bfc1: 85 c0 test %eax,%eax
10bfc3: 74 16 je 10bfdb <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10bfc5: 50 push %eax
10bfc6: 8d 45 e4 lea -0x1c(%ebp),%eax
10bfc9: 50 push %eax
10bfca: 56 push %esi
10bfcb: 53 push %ebx
10bfcc: e8 7f 1a 00 00 call 10da50 <_Objects_Get>
switch ( location ) {
10bfd1: 83 c4 10 add $0x10,%esp
10bfd4: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bfd7: 85 c9 test %ecx,%ecx
10bfd9: 74 19 je 10bff4 <rtems_object_set_name+0x58>
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10bfdb: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bfe0: 8d 65 f4 lea -0xc(%ebp),%esp
10bfe3: 5b pop %ebx
10bfe4: 5e pop %esi
10bfe5: 5f pop %edi
10bfe6: c9 leave
10bfe7: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10bfe8: a1 38 b3 12 00 mov 0x12b338,%eax
10bfed: 8b 70 08 mov 0x8(%eax),%esi
10bff0: eb c1 jmp 10bfb3 <rtems_object_set_name+0x17>
10bff2: 66 90 xchg %ax,%ax
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10bff4: 52 push %edx
10bff5: 57 push %edi
10bff6: 50 push %eax
10bff7: 53 push %ebx
10bff8: e8 4f 1c 00 00 call 10dc4c <_Objects_Set_name>
_Thread_Enable_dispatch();
10bffd: e8 96 23 00 00 call 10e398 <_Thread_Enable_dispatch>
10c002: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c004: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c007: 8d 65 f4 lea -0xc(%ebp),%esp
10c00a: 5b pop %ebx
10c00b: 5e pop %esi
10c00c: 5f pop %edi
10c00d: c9 leave
10c00e: c3 ret
10c00f: 90 nop
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10c010: b8 09 00 00 00 mov $0x9,%eax
10c015: eb c9 jmp 10bfe0 <rtems_object_set_name+0x44>
001170d8 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1170d8: 55 push %ebp
1170d9: 89 e5 mov %esp,%ebp
1170db: 57 push %edi
1170dc: 56 push %esi
1170dd: 53 push %ebx
1170de: 83 ec 1c sub $0x1c,%esp
1170e1: 8b 5d 08 mov 0x8(%ebp),%ebx
1170e4: 8b 75 0c mov 0xc(%ebp),%esi
1170e7: 8b 55 10 mov 0x10(%ebp),%edx
1170ea: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
1170ed: 85 db test %ebx,%ebx
1170ef: 74 47 je 117138 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
1170f1: 85 f6 test %esi,%esi
1170f3: 74 23 je 117118 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
1170f5: 8b 45 1c mov 0x1c(%ebp),%eax
1170f8: 85 c0 test %eax,%eax
1170fa: 74 1c je 117118 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
1170fc: 85 d2 test %edx,%edx
1170fe: 74 28 je 117128 <rtems_partition_create+0x50>
117100: 85 ff test %edi,%edi
117102: 74 24 je 117128 <rtems_partition_create+0x50>
117104: 39 fa cmp %edi,%edx
117106: 72 20 jb 117128 <rtems_partition_create+0x50>
117108: f7 c7 03 00 00 00 test $0x3,%edi
11710e: 75 18 jne 117128 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
117110: f7 c6 03 00 00 00 test $0x3,%esi
117116: 74 30 je 117148 <rtems_partition_create+0x70>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
117118: b8 09 00 00 00 mov $0x9,%eax
}
11711d: 8d 65 f4 lea -0xc(%ebp),%esp
117120: 5b pop %ebx
117121: 5e pop %esi
117122: 5f pop %edi
117123: c9 leave
117124: c3 ret
117125: 8d 76 00 lea 0x0(%esi),%esi
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
117128: b8 08 00 00 00 mov $0x8,%eax
}
11712d: 8d 65 f4 lea -0xc(%ebp),%esp
117130: 5b pop %ebx
117131: 5e pop %esi
117132: 5f pop %edi
117133: c9 leave
117134: c3 ret
117135: 8d 76 00 lea 0x0(%esi),%esi
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
117138: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
11713d: 8d 65 f4 lea -0xc(%ebp),%esp
117140: 5b pop %ebx
117141: 5e pop %esi
117142: 5f pop %edi
117143: c9 leave
117144: c3 ret
117145: 8d 76 00 lea 0x0(%esi),%esi
117148: a1 f8 40 14 00 mov 0x1440f8,%eax
11714d: 40 inc %eax
11714e: a3 f8 40 14 00 mov %eax,0x1440f8
* 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 );
117153: 83 ec 0c sub $0xc,%esp
117156: 68 80 3f 14 00 push $0x143f80
11715b: 89 55 e0 mov %edx,-0x20(%ebp)
11715e: e8 89 43 00 00 call 11b4ec <_Objects_Allocate>
117163: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
117166: 83 c4 10 add $0x10,%esp
117169: 85 c0 test %eax,%eax
11716b: 8b 55 e0 mov -0x20(%ebp),%edx
11716e: 74 58 je 1171c8 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
117170: 8b 45 e4 mov -0x1c(%ebp),%eax
117173: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
117176: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
117179: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
11717c: 8b 4d 18 mov 0x18(%ebp),%ecx
11717f: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
117182: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
117189: 57 push %edi
11718a: 89 d0 mov %edx,%eax
11718c: 31 d2 xor %edx,%edx
11718e: f7 f7 div %edi
117190: 50 push %eax
117191: 56 push %esi
117192: 8b 45 e4 mov -0x1c(%ebp),%eax
117195: 83 c0 24 add $0x24,%eax
117198: 50 push %eax
117199: e8 de 2f 00 00 call 11a17c <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
11719e: 8b 7d e4 mov -0x1c(%ebp),%edi
1171a1: 8b 47 08 mov 0x8(%edi),%eax
1171a4: 0f b7 f0 movzwl %ax,%esi
1171a7: 8b 15 9c 3f 14 00 mov 0x143f9c,%edx
1171ad: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
1171b0: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
1171b3: 8b 55 1c mov 0x1c(%ebp),%edx
1171b6: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
1171b8: e8 ff 50 00 00 call 11c2bc <_Thread_Enable_dispatch>
1171bd: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1171bf: 83 c4 10 add $0x10,%esp
1171c2: e9 66 ff ff ff jmp 11712d <rtems_partition_create+0x55>
1171c7: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
1171c8: e8 ef 50 00 00 call 11c2bc <_Thread_Enable_dispatch>
1171cd: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1171d2: e9 56 ff ff ff jmp 11712d <rtems_partition_create+0x55>
00117244 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
117244: 55 push %ebp
117245: 89 e5 mov %esp,%ebp
117247: 56 push %esi
117248: 53 push %ebx
117249: 83 ec 20 sub $0x20,%esp
11724c: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
11724f: 85 db test %ebx,%ebx
117251: 74 59 je 1172ac <rtems_partition_get_buffer+0x68>
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
117253: 52 push %edx
117254: 8d 45 f4 lea -0xc(%ebp),%eax
117257: 50 push %eax
117258: ff 75 08 pushl 0x8(%ebp)
11725b: 68 80 3f 14 00 push $0x143f80
117260: e8 73 47 00 00 call 11b9d8 <_Objects_Get>
117265: 89 c6 mov %eax,%esi
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
117267: 83 c4 10 add $0x10,%esp
11726a: 8b 45 f4 mov -0xc(%ebp),%eax
11726d: 85 c0 test %eax,%eax
11726f: 75 2f jne 1172a0 <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
117271: 83 ec 0c sub $0xc,%esp
117274: 8d 46 24 lea 0x24(%esi),%eax
117277: 50 push %eax
117278: e8 db 2e 00 00 call 11a158 <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
11727d: 83 c4 10 add $0x10,%esp
117280: 85 c0 test %eax,%eax
117282: 74 34 je 1172b8 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
117284: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
117287: 89 45 e4 mov %eax,-0x1c(%ebp)
11728a: e8 2d 50 00 00 call 11c2bc <_Thread_Enable_dispatch>
*buffer = the_buffer;
11728f: 8b 45 e4 mov -0x1c(%ebp),%eax
117292: 89 03 mov %eax,(%ebx)
117294: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117296: 8d 65 f8 lea -0x8(%ebp),%esp
117299: 5b pop %ebx
11729a: 5e pop %esi
11729b: c9 leave
11729c: c3 ret
11729d: 8d 76 00 lea 0x0(%esi),%esi
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
1172a0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1172a5: 8d 65 f8 lea -0x8(%ebp),%esp
1172a8: 5b pop %ebx
1172a9: 5e pop %esi
1172aa: c9 leave
1172ab: c3 ret
{
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
1172ac: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1172b1: 8d 65 f8 lea -0x8(%ebp),%esp
1172b4: 5b pop %ebx
1172b5: 5e pop %esi
1172b6: c9 leave
1172b7: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1172b8: e8 ff 4f 00 00 call 11c2bc <_Thread_Enable_dispatch>
1172bd: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
1172c2: eb e1 jmp 1172a5 <rtems_partition_get_buffer+0x61>
001172e8 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
1172e8: 55 push %ebp
1172e9: 89 e5 mov %esp,%ebp
1172eb: 56 push %esi
1172ec: 53 push %ebx
1172ed: 83 ec 14 sub $0x14,%esp
1172f0: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
1172f3: 8d 45 f4 lea -0xc(%ebp),%eax
1172f6: 50 push %eax
1172f7: ff 75 08 pushl 0x8(%ebp)
1172fa: 68 80 3f 14 00 push $0x143f80
1172ff: e8 d4 46 00 00 call 11b9d8 <_Objects_Get>
117304: 89 c3 mov %eax,%ebx
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
117306: 83 c4 10 add $0x10,%esp
117309: 8b 45 f4 mov -0xc(%ebp),%eax
11730c: 85 c0 test %eax,%eax
11730e: 74 0c je 11731c <rtems_partition_return_buffer+0x34>
117310: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117315: 8d 65 f8 lea -0x8(%ebp),%esp
117318: 5b pop %ebx
117319: 5e pop %esi
11731a: c9 leave
11731b: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
11731c: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
11731f: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
117322: 39 c6 cmp %eax,%esi
117324: 72 3a jb 117360 <rtems_partition_return_buffer+0x78>
117326: 8d 14 10 lea (%eax,%edx,1),%edx
117329: 39 d6 cmp %edx,%esi
11732b: 77 33 ja 117360 <rtems_partition_return_buffer+0x78><== NEVER TAKEN
return (
11732d: 89 f2 mov %esi,%edx
11732f: 29 c2 sub %eax,%edx
117331: 89 d0 mov %edx,%eax
117333: 31 d2 xor %edx,%edx
117335: f7 73 18 divl 0x18(%ebx)
117338: 85 d2 test %edx,%edx
11733a: 75 24 jne 117360 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
11733c: 83 ec 08 sub $0x8,%esp
11733f: 56 push %esi
117340: 8d 43 24 lea 0x24(%ebx),%eax
117343: 50 push %eax
117344: e8 d3 2d 00 00 call 11a11c <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
117349: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
11734c: e8 6b 4f 00 00 call 11c2bc <_Thread_Enable_dispatch>
117351: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
117353: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117356: 8d 65 f8 lea -0x8(%ebp),%esp
117359: 5b pop %ebx
11735a: 5e pop %esi
11735b: c9 leave
11735c: c3 ret
11735d: 8d 76 00 lea 0x0(%esi),%esi
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
117360: e8 57 4f 00 00 call 11c2bc <_Thread_Enable_dispatch>
117365: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11736a: 8d 65 f8 lea -0x8(%ebp),%esp
11736d: 5b pop %ebx
11736e: 5e pop %esi
11736f: c9 leave
117370: c3 ret
00116710 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
116710: 55 push %ebp
116711: 89 e5 mov %esp,%ebp
116713: 57 push %edi
116714: 56 push %esi
116715: 53 push %ebx
116716: 83 ec 1c sub $0x1c,%esp
116719: 8b 5d 08 mov 0x8(%ebp),%ebx
11671c: 8b 55 0c mov 0xc(%ebp),%edx
11671f: 8b 7d 10 mov 0x10(%ebp),%edi
116722: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
116725: 85 db test %ebx,%ebx
116727: 74 1b je 116744 <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
116729: 85 f6 test %esi,%esi
11672b: 74 08 je 116735 <rtems_port_create+0x25>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
11672d: 89 f8 mov %edi,%eax
11672f: 09 d0 or %edx,%eax
116731: a8 03 test $0x3,%al
116733: 74 1f je 116754 <rtems_port_create+0x44>
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
116735: b8 09 00 00 00 mov $0x9,%eax
}
11673a: 8d 65 f4 lea -0xc(%ebp),%esp
11673d: 5b pop %ebx
11673e: 5e pop %esi
11673f: 5f pop %edi
116740: c9 leave
116741: c3 ret
116742: 66 90 xchg %ax,%ax
rtems_id *id
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
116744: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
116749: 8d 65 f4 lea -0xc(%ebp),%esp
11674c: 5b pop %ebx
11674d: 5e pop %esi
11674e: 5f pop %edi
11674f: c9 leave
116750: c3 ret
116751: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
116754: a1 f8 40 14 00 mov 0x1440f8,%eax
116759: 40 inc %eax
11675a: a3 f8 40 14 00 mov %eax,0x1440f8
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
11675f: 83 ec 0c sub $0xc,%esp
116762: 68 40 3f 14 00 push $0x143f40
116767: 89 55 e4 mov %edx,-0x1c(%ebp)
11676a: e8 7d 4d 00 00 call 11b4ec <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
11676f: 83 c4 10 add $0x10,%esp
116772: 85 c0 test %eax,%eax
116774: 8b 55 e4 mov -0x1c(%ebp),%edx
116777: 74 33 je 1167ac <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
116779: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
11677c: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
11677f: 8b 55 14 mov 0x14(%ebp),%edx
116782: 4a dec %edx
116783: 89 50 18 mov %edx,0x18(%eax)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
116786: 8b 50 08 mov 0x8(%eax),%edx
116789: 0f b7 fa movzwl %dx,%edi
11678c: 8b 0d 5c 3f 14 00 mov 0x143f5c,%ecx
116792: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
116795: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
116798: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
11679a: e8 1d 5b 00 00 call 11c2bc <_Thread_Enable_dispatch>
11679f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
1167a1: 8d 65 f4 lea -0xc(%ebp),%esp
1167a4: 5b pop %ebx
1167a5: 5e pop %esi
1167a6: 5f pop %edi
1167a7: c9 leave
1167a8: c3 ret
1167a9: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
1167ac: e8 0b 5b 00 00 call 11c2bc <_Thread_Enable_dispatch>
1167b1: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
1167b6: eb 82 jmp 11673a <rtems_port_create+0x2a>
001167b8 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
1167b8: 55 push %ebp
1167b9: 89 e5 mov %esp,%ebp
1167bb: 83 ec 2c sub $0x2c,%esp
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
1167be: 8d 45 f4 lea -0xc(%ebp),%eax
1167c1: 50 push %eax
1167c2: ff 75 08 pushl 0x8(%ebp)
1167c5: 68 40 3f 14 00 push $0x143f40
1167ca: e8 09 52 00 00 call 11b9d8 <_Objects_Get>
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
1167cf: 83 c4 10 add $0x10,%esp
1167d2: 8b 4d f4 mov -0xc(%ebp),%ecx
1167d5: 85 c9 test %ecx,%ecx
1167d7: 75 2f jne 116808 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
1167d9: 83 ec 08 sub $0x8,%esp
1167dc: 50 push %eax
1167dd: 68 40 3f 14 00 push $0x143f40
1167e2: 89 45 e4 mov %eax,-0x1c(%ebp)
1167e5: e8 7e 4d 00 00 call 11b568 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
Dual_ported_memory_Control *the_port
)
{
_Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
1167ea: 58 pop %eax
1167eb: 5a pop %edx
1167ec: 8b 45 e4 mov -0x1c(%ebp),%eax
1167ef: 50 push %eax
1167f0: 68 40 3f 14 00 push $0x143f40
1167f5: e8 72 50 00 00 call 11b86c <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
1167fa: e8 bd 5a 00 00 call 11c2bc <_Thread_Enable_dispatch>
1167ff: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
116801: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116804: c9 leave
116805: c3 ret
116806: 66 90 xchg %ax,%ax
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
116808: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11680d: c9 leave
11680e: c3 ret
00116810 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
116810: 55 push %ebp
116811: 89 e5 mov %esp,%ebp
116813: 56 push %esi
116814: 53 push %ebx
116815: 83 ec 10 sub $0x10,%esp
116818: 8b 75 0c mov 0xc(%ebp),%esi
11681b: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
11681e: 85 db test %ebx,%ebx
116820: 74 4e je 116870 <rtems_port_external_to_internal+0x60>
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
116822: 51 push %ecx
116823: 8d 45 f4 lea -0xc(%ebp),%eax
116826: 50 push %eax
116827: ff 75 08 pushl 0x8(%ebp)
11682a: 68 40 3f 14 00 push $0x143f40
11682f: e8 a4 51 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
116834: 83 c4 10 add $0x10,%esp
116837: 8b 55 f4 mov -0xc(%ebp),%edx
11683a: 85 d2 test %edx,%edx
11683c: 74 0e je 11684c <rtems_port_external_to_internal+0x3c>
11683e: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116843: 8d 65 f8 lea -0x8(%ebp),%esp
116846: 5b pop %ebx
116847: 5e pop %esi
116848: c9 leave
116849: c3 ret
11684a: 66 90 xchg %ax,%ax
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
11684c: 89 f2 mov %esi,%edx
11684e: 2b 50 14 sub 0x14(%eax),%edx
if ( ending > the_port->length )
116851: 3b 50 18 cmp 0x18(%eax),%edx
116854: 77 16 ja 11686c <rtems_port_external_to_internal+0x5c>
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
116856: 03 50 10 add 0x10(%eax),%edx
116859: 89 13 mov %edx,(%ebx)
ending );
_Thread_Enable_dispatch();
11685b: e8 5c 5a 00 00 call 11c2bc <_Thread_Enable_dispatch>
116860: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116862: 8d 65 f8 lea -0x8(%ebp),%esp
116865: 5b pop %ebx
116866: 5e pop %esi
116867: c9 leave
116868: c3 ret
116869: 8d 76 00 lea 0x0(%esi),%esi
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
11686c: 89 33 mov %esi,(%ebx)
11686e: eb eb jmp 11685b <rtems_port_external_to_internal+0x4b>
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
116870: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116875: 8d 65 f8 lea -0x8(%ebp),%esp
116878: 5b pop %ebx
116879: 5e pop %esi
11687a: c9 leave
11687b: c3 ret
001168a0 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
1168a0: 55 push %ebp
1168a1: 89 e5 mov %esp,%ebp
1168a3: 56 push %esi
1168a4: 53 push %ebx
1168a5: 83 ec 10 sub $0x10,%esp
1168a8: 8b 75 0c mov 0xc(%ebp),%esi
1168ab: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
1168ae: 85 db test %ebx,%ebx
1168b0: 74 4e je 116900 <rtems_port_internal_to_external+0x60>
1168b2: 51 push %ecx
1168b3: 8d 45 f4 lea -0xc(%ebp),%eax
1168b6: 50 push %eax
1168b7: ff 75 08 pushl 0x8(%ebp)
1168ba: 68 40 3f 14 00 push $0x143f40
1168bf: e8 14 51 00 00 call 11b9d8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
1168c4: 83 c4 10 add $0x10,%esp
1168c7: 8b 55 f4 mov -0xc(%ebp),%edx
1168ca: 85 d2 test %edx,%edx
1168cc: 74 0e je 1168dc <rtems_port_internal_to_external+0x3c>
1168ce: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1168d3: 8d 65 f8 lea -0x8(%ebp),%esp
1168d6: 5b pop %ebx
1168d7: 5e pop %esi
1168d8: c9 leave
1168d9: c3 ret
1168da: 66 90 xchg %ax,%ax
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
1168dc: 89 f2 mov %esi,%edx
1168de: 2b 50 10 sub 0x10(%eax),%edx
if ( ending > the_port->length )
1168e1: 3b 50 18 cmp 0x18(%eax),%edx
1168e4: 77 16 ja 1168fc <rtems_port_internal_to_external+0x5c>
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
1168e6: 03 50 14 add 0x14(%eax),%edx
1168e9: 89 13 mov %edx,(%ebx)
ending );
_Thread_Enable_dispatch();
1168eb: e8 cc 59 00 00 call 11c2bc <_Thread_Enable_dispatch>
1168f0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1168f2: 8d 65 f8 lea -0x8(%ebp),%esp
1168f5: 5b pop %ebx
1168f6: 5e pop %esi
1168f7: c9 leave
1168f8: c3 ret
1168f9: 8d 76 00 lea 0x0(%esi),%esi
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
1168fc: 89 33 mov %esi,(%ebx)
1168fe: eb eb jmp 1168eb <rtems_port_internal_to_external+0x4b>
{
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
116900: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116905: 8d 65 f8 lea -0x8(%ebp),%esp
116908: 5b pop %ebx
116909: 5e pop %esi
11690a: c9 leave
11690b: c3 ret
00117374 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
117374: 55 push %ebp
117375: 89 e5 mov %esp,%ebp
117377: 53 push %ebx
117378: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
11737b: 8d 45 f4 lea -0xc(%ebp),%eax
11737e: 50 push %eax
11737f: ff 75 08 pushl 0x8(%ebp)
117382: 68 c0 3f 14 00 push $0x143fc0
117387: e8 4c 46 00 00 call 11b9d8 <_Objects_Get>
11738c: 89 c3 mov %eax,%ebx
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
11738e: 83 c4 10 add $0x10,%esp
117391: 8b 45 f4 mov -0xc(%ebp),%eax
117394: 85 c0 test %eax,%eax
117396: 74 0c je 1173a4 <rtems_rate_monotonic_cancel+0x30>
117398: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11739d: 8b 5d fc mov -0x4(%ebp),%ebx
1173a0: c9 leave
1173a1: c3 ret
1173a2: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
1173a4: 8b 43 40 mov 0x40(%ebx),%eax
1173a7: 3b 05 b8 41 14 00 cmp 0x1441b8,%eax
1173ad: 74 11 je 1173c0 <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
1173af: e8 08 4f 00 00 call 11c2bc <_Thread_Enable_dispatch>
1173b4: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1173b9: 8b 5d fc mov -0x4(%ebp),%ebx
1173bc: c9 leave
1173bd: c3 ret
1173be: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
(void) _Watchdog_Remove( &the_period->Timer );
1173c0: 83 ec 0c sub $0xc,%esp
1173c3: 8d 43 10 lea 0x10(%ebx),%eax
1173c6: 50 push %eax
1173c7: e8 5c 63 00 00 call 11d728 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
1173cc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
1173d3: e8 e4 4e 00 00 call 11c2bc <_Thread_Enable_dispatch>
1173d8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1173da: 83 c4 10 add $0x10,%esp
1173dd: eb be jmp 11739d <rtems_rate_monotonic_cancel+0x29>
0010c930 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c930: 55 push %ebp
10c931: 89 e5 mov %esp,%ebp
10c933: 57 push %edi
10c934: 56 push %esi
10c935: 53 push %ebx
10c936: 83 ec 1c sub $0x1c,%esp
10c939: 8b 5d 08 mov 0x8(%ebp),%ebx
10c93c: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c93f: 85 db test %ebx,%ebx
10c941: 0f 84 a9 00 00 00 je 10c9f0 <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c947: 85 f6 test %esi,%esi
10c949: 0f 84 c5 00 00 00 je 10ca14 <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c94f: a1 58 c3 12 00 mov 0x12c358,%eax
10c954: 40 inc %eax
10c955: a3 58 c3 12 00 mov %eax,0x12c358
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
10c95a: 83 ec 0c sub $0xc,%esp
10c95d: 68 60 c2 12 00 push $0x12c260
10c962: e8 c1 1e 00 00 call 10e828 <_Objects_Allocate>
10c967: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c969: 83 c4 10 add $0x10,%esp
10c96c: 85 c0 test %eax,%eax
10c96e: 0f 84 8c 00 00 00 je 10ca00 <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c974: a1 18 c4 12 00 mov 0x12c418,%eax
10c979: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c97c: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c983: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c98a: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c991: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c998: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
10c99f: 8d 42 54 lea 0x54(%edx),%eax
10c9a2: 89 45 e4 mov %eax,-0x1c(%ebp)
10c9a5: b9 38 00 00 00 mov $0x38,%ecx
10c9aa: 31 c0 xor %eax,%eax
10c9ac: 8b 7d e4 mov -0x1c(%ebp),%edi
10c9af: f3 aa rep stos %al,%es:(%edi)
10c9b1: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10c9b8: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10c9bf: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10c9c6: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c9cd: 8b 42 08 mov 0x8(%edx),%eax
10c9d0: 0f b7 f8 movzwl %ax,%edi
10c9d3: 8b 0d 7c c2 12 00 mov 0x12c27c,%ecx
10c9d9: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c9dc: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10c9df: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c9e1: e8 4a 2c 00 00 call 10f630 <_Thread_Enable_dispatch>
10c9e6: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10c9e8: 8d 65 f4 lea -0xc(%ebp),%esp
10c9eb: 5b pop %ebx
10c9ec: 5e pop %esi
10c9ed: 5f pop %edi
10c9ee: c9 leave
10c9ef: c3 ret
rtems_id *id
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c9f0: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c9f5: 8d 65 f4 lea -0xc(%ebp),%esp
10c9f8: 5b pop %ebx
10c9f9: 5e pop %esi
10c9fa: 5f pop %edi
10c9fb: c9 leave
10c9fc: c3 ret
10c9fd: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10ca00: e8 2b 2c 00 00 call 10f630 <_Thread_Enable_dispatch>
10ca05: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca0a: 8d 65 f4 lea -0xc(%ebp),%esp
10ca0d: 5b pop %ebx
10ca0e: 5e pop %esi
10ca0f: 5f pop %edi
10ca10: c9 leave
10ca11: c3 ret
10ca12: 66 90 xchg %ax,%ax
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10ca14: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca19: 8d 65 f4 lea -0xc(%ebp),%esp
10ca1c: 5b pop %ebx
10ca1d: 5e pop %esi
10ca1e: 5f pop %edi
10ca1f: c9 leave
10ca20: c3 ret
00113884 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
113884: 55 push %ebp
113885: 89 e5 mov %esp,%ebp
113887: 53 push %ebx
113888: 83 ec 24 sub $0x24,%esp
11388b: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
11388e: 85 db test %ebx,%ebx
113890: 0f 84 92 00 00 00 je 113928 <rtems_rate_monotonic_get_status+0xa4>
113896: 50 push %eax
113897: 8d 45 f4 lea -0xc(%ebp),%eax
11389a: 50 push %eax
11389b: ff 75 08 pushl 0x8(%ebp)
11389e: 68 60 c2 12 00 push $0x12c260
1138a3: e8 14 b5 ff ff call 10edbc <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
1138a8: 83 c4 10 add $0x10,%esp
1138ab: 8b 4d f4 mov -0xc(%ebp),%ecx
1138ae: 85 c9 test %ecx,%ecx
1138b0: 74 0a je 1138bc <rtems_rate_monotonic_get_status+0x38>
1138b2: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1138b7: 8b 5d fc mov -0x4(%ebp),%ebx
1138ba: c9 leave
1138bb: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
1138bc: 8b 50 40 mov 0x40(%eax),%edx
1138bf: 8b 52 08 mov 0x8(%edx),%edx
1138c2: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
1138c4: 8b 50 38 mov 0x38(%eax),%edx
1138c7: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
1138ca: 85 d2 test %edx,%edx
1138cc: 75 2a jne 1138f8 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
1138ce: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
1138d5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
1138dc: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
1138e3: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
1138ea: e8 41 bd ff ff call 10f630 <_Thread_Enable_dispatch>
1138ef: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1138f1: 8b 5d fc mov -0x4(%ebp),%ebx
1138f4: c9 leave
1138f5: c3 ret
1138f6: 66 90 xchg %ax,%ax
/*
* Grab the current status.
*/
valid_status =
_Rate_monotonic_Get_status(
1138f8: 52 push %edx
1138f9: 8d 55 ec lea -0x14(%ebp),%edx
1138fc: 52 push %edx
1138fd: 8d 55 e4 lea -0x1c(%ebp),%edx
113900: 52 push %edx
113901: 50 push %eax
113902: e8 b5 91 ff ff call 10cabc <_Rate_monotonic_Get_status>
the_period, &since_last_period, &executed
);
if (!valid_status) {
113907: 83 c4 10 add $0x10,%esp
11390a: 84 c0 test %al,%al
11390c: 74 26 je 113934 <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
11390e: 8b 45 e4 mov -0x1c(%ebp),%eax
113911: 8b 55 e8 mov -0x18(%ebp),%edx
113914: 89 43 08 mov %eax,0x8(%ebx)
113917: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
11391a: 8b 45 ec mov -0x14(%ebp),%eax
11391d: 8b 55 f0 mov -0x10(%ebp),%edx
113920: 89 43 10 mov %eax,0x10(%ebx)
113923: 89 53 14 mov %edx,0x14(%ebx)
113926: eb c2 jmp 1138ea <rtems_rate_monotonic_get_status+0x66>
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
113928: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11392d: 8b 5d fc mov -0x4(%ebp),%ebx
113930: c9 leave
113931: c3 ret
113932: 66 90 xchg %ax,%ax
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
113934: e8 f7 bc ff ff call 10f630 <_Thread_Enable_dispatch>
113939: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
11393e: e9 74 ff ff ff jmp 1138b7 <rtems_rate_monotonic_get_status+0x33>
0010cc44 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10cc44: 55 push %ebp
10cc45: 89 e5 mov %esp,%ebp
10cc47: 57 push %edi
10cc48: 56 push %esi
10cc49: 53 push %ebx
10cc4a: 83 ec 30 sub $0x30,%esp
10cc4d: 8b 5d 08 mov 0x8(%ebp),%ebx
10cc50: 8b 75 0c mov 0xc(%ebp),%esi
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
10cc53: 8d 45 e4 lea -0x1c(%ebp),%eax
10cc56: 50 push %eax
10cc57: 53 push %ebx
10cc58: 68 60 c2 12 00 push $0x12c260
10cc5d: e8 5a 21 00 00 call 10edbc <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10cc62: 83 c4 10 add $0x10,%esp
10cc65: 8b 7d e4 mov -0x1c(%ebp),%edi
10cc68: 85 ff test %edi,%edi
10cc6a: 74 10 je 10cc7c <rtems_rate_monotonic_period+0x38>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
10cc6c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cc71: 8d 65 f4 lea -0xc(%ebp),%esp
10cc74: 5b pop %ebx
10cc75: 5e pop %esi
10cc76: 5f pop %edi
10cc77: c9 leave
10cc78: c3 ret
10cc79: 8d 76 00 lea 0x0(%esi),%esi
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10cc7c: 8b 50 40 mov 0x40(%eax),%edx
10cc7f: 3b 15 18 c4 12 00 cmp 0x12c418,%edx
10cc85: 74 15 je 10cc9c <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10cc87: e8 a4 29 00 00 call 10f630 <_Thread_Enable_dispatch>
10cc8c: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cc91: 8d 65 f4 lea -0xc(%ebp),%esp
10cc94: 5b pop %ebx
10cc95: 5e pop %esi
10cc96: 5f pop %edi
10cc97: c9 leave
10cc98: c3 ret
10cc99: 8d 76 00 lea 0x0(%esi),%esi
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10cc9c: 85 f6 test %esi,%esi
10cc9e: 0f 84 b0 00 00 00 je 10cd54 <rtems_rate_monotonic_period+0x110>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
10cca4: 9c pushf
10cca5: fa cli
10cca6: 5f pop %edi
switch ( the_period->state ) {
10cca7: 8b 50 38 mov 0x38(%eax),%edx
10ccaa: 83 fa 02 cmp $0x2,%edx
10ccad: 0f 84 bd 00 00 00 je 10cd70 <rtems_rate_monotonic_period+0x12c>
10ccb3: 83 fa 04 cmp $0x4,%edx
10ccb6: 74 5c je 10cd14 <rtems_rate_monotonic_period+0xd0>
10ccb8: 85 d2 test %edx,%edx
10ccba: 75 b0 jne 10cc6c <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
10ccbc: 57 push %edi
10ccbd: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10ccbe: 83 ec 0c sub $0xc,%esp
10ccc1: 50 push %eax
10ccc2: 89 45 d4 mov %eax,-0x2c(%ebp)
10ccc5: e8 7e fd ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10ccca: 8b 45 d4 mov -0x2c(%ebp),%eax
10cccd: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ccd4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10ccdb: c7 40 2c 9c d0 10 00 movl $0x10d09c,0x2c(%eax)
the_watchdog->id = id;
10cce2: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
10cce5: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10ccec: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10ccef: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10ccf2: 5a pop %edx
10ccf3: 59 pop %ecx
10ccf4: 83 c0 10 add $0x10,%eax
10ccf7: 50 push %eax
10ccf8: 68 38 c4 12 00 push $0x12c438
10ccfd: e8 76 3a 00 00 call 110778 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10cd02: e8 29 29 00 00 call 10f630 <_Thread_Enable_dispatch>
10cd07: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10cd09: 83 c4 10 add $0x10,%esp
10cd0c: e9 60 ff ff ff jmp 10cc71 <rtems_rate_monotonic_period+0x2d>
10cd11: 8d 76 00 lea 0x0(%esi),%esi
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10cd14: 83 ec 0c sub $0xc,%esp
10cd17: 50 push %eax
10cd18: 89 45 d4 mov %eax,-0x2c(%ebp)
10cd1b: e8 34 fe ff ff call 10cb54 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10cd20: 57 push %edi
10cd21: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10cd22: 8b 45 d4 mov -0x2c(%ebp),%eax
10cd25: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
10cd2c: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10cd2f: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10cd32: 59 pop %ecx
10cd33: 5b pop %ebx
10cd34: 83 c0 10 add $0x10,%eax
10cd37: 50 push %eax
10cd38: 68 38 c4 12 00 push $0x12c438
10cd3d: e8 36 3a 00 00 call 110778 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
10cd42: e8 e9 28 00 00 call 10f630 <_Thread_Enable_dispatch>
10cd47: b8 06 00 00 00 mov $0x6,%eax
return RTEMS_TIMEOUT;
10cd4c: 83 c4 10 add $0x10,%esp
10cd4f: e9 1d ff ff ff jmp 10cc71 <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10cd54: 8b 40 38 mov 0x38(%eax),%eax
10cd57: 83 f8 04 cmp $0x4,%eax
10cd5a: 76 74 jbe 10cdd0 <rtems_rate_monotonic_period+0x18c><== ALWAYS TAKEN
10cd5c: 31 c0 xor %eax,%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10cd5e: 89 45 d4 mov %eax,-0x2c(%ebp)
10cd61: e8 ca 28 00 00 call 10f630 <_Thread_Enable_dispatch>
return( return_value );
10cd66: 8b 45 d4 mov -0x2c(%ebp),%eax
10cd69: e9 03 ff ff ff jmp 10cc71 <rtems_rate_monotonic_period+0x2d>
10cd6e: 66 90 xchg %ax,%ax
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10cd70: 83 ec 0c sub $0xc,%esp
10cd73: 50 push %eax
10cd74: 89 45 d4 mov %eax,-0x2c(%ebp)
10cd77: e8 d8 fd ff ff call 10cb54 <_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;
10cd7c: 8b 45 d4 mov -0x2c(%ebp),%eax
10cd7f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
10cd86: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
10cd89: 57 push %edi
10cd8a: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10cd8b: 8b 15 18 c4 12 00 mov 0x12c418,%edx
10cd91: 8b 48 08 mov 0x8(%eax),%ecx
10cd94: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10cd97: 5e pop %esi
10cd98: 5f pop %edi
10cd99: 68 00 40 00 00 push $0x4000
10cd9e: 52 push %edx
10cd9f: 89 45 d4 mov %eax,-0x2c(%ebp)
10cda2: e8 a1 31 00 00 call 10ff48 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10cda7: 9c pushf
10cda8: fa cli
10cda9: 59 pop %ecx
local_state = the_period->state;
10cdaa: 8b 45 d4 mov -0x2c(%ebp),%eax
10cdad: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10cdb0: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
10cdb7: 51 push %ecx
10cdb8: 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 )
10cdb9: 83 c4 10 add $0x10,%esp
10cdbc: 83 fa 03 cmp $0x3,%edx
10cdbf: 74 18 je 10cdd9 <rtems_rate_monotonic_period+0x195>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10cdc1: e8 6a 28 00 00 call 10f630 <_Thread_Enable_dispatch>
10cdc6: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10cdc8: e9 a4 fe ff ff jmp 10cc71 <rtems_rate_monotonic_period+0x2d>
10cdcd: 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 ) {
10cdd0: 8b 04 85 68 4d 12 00 mov 0x124d68(,%eax,4),%eax
10cdd7: eb 85 jmp 10cd5e <rtems_rate_monotonic_period+0x11a>
/*
* 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 );
10cdd9: 83 ec 08 sub $0x8,%esp
10cddc: 68 00 40 00 00 push $0x4000
10cde1: ff 35 18 c4 12 00 pushl 0x12c418
10cde7: e8 9c 24 00 00 call 10f288 <_Thread_Clear_state>
10cdec: 83 c4 10 add $0x10,%esp
10cdef: eb d0 jmp 10cdc1 <rtems_rate_monotonic_period+0x17d>
0010cdf4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10cdf4: 55 push %ebp
10cdf5: 89 e5 mov %esp,%ebp
10cdf7: 57 push %edi
10cdf8: 56 push %esi
10cdf9: 53 push %ebx
10cdfa: 83 ec 7c sub $0x7c,%esp
10cdfd: 8b 7d 08 mov 0x8(%ebp),%edi
10ce00: 8b 75 0c mov 0xc(%ebp),%esi
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
10ce03: 85 f6 test %esi,%esi
10ce05: 0f 84 bd 00 00 00 je 10cec8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10ce0b: 83 ec 08 sub $0x8,%esp
10ce0e: 68 7c 4d 12 00 push $0x124d7c
10ce13: 57 push %edi
10ce14: ff d6 call *%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10ce16: 59 pop %ecx
10ce17: 5b pop %ebx
10ce18: 68 b4 4d 12 00 push $0x124db4
10ce1d: 57 push %edi
10ce1e: ff d6 call *%esi
(*print)( context, "--- Wall times are in seconds ---\n" );
10ce20: 58 pop %eax
10ce21: 5a pop %edx
10ce22: 68 d8 4d 12 00 push $0x124dd8
10ce27: 57 push %edi
10ce28: ff d6 call *%esi
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10ce2a: 59 pop %ecx
10ce2b: 5b pop %ebx
10ce2c: 68 fc 4d 12 00 push $0x124dfc
10ce31: 57 push %edi
10ce32: ff d6 call *%esi
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10ce34: 58 pop %eax
10ce35: 5a pop %edx
10ce36: 68 48 4e 12 00 push $0x124e48
10ce3b: 57 push %edi
10ce3c: ff d6 call *%esi
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
10ce3e: 8b 1d 68 c2 12 00 mov 0x12c268,%ebx
10ce44: 83 c4 10 add $0x10,%esp
10ce47: 3b 1d 6c c2 12 00 cmp 0x12c26c,%ebx
10ce4d: 77 79 ja 10cec8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NEVER TAKEN
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);
10ce4f: 89 75 84 mov %esi,-0x7c(%ebp)
10ce52: eb 09 jmp 10ce5d <rtems_rate_monotonic_report_statistics_with_plugin+0x69>
* 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++ ) {
10ce54: 43 inc %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 ;
10ce55: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c
10ce5b: 72 6b jb 10cec8 <rtems_rate_monotonic_report_statistics_with_plugin+0xd4>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10ce5d: 83 ec 08 sub $0x8,%esp
10ce60: 8d 45 88 lea -0x78(%ebp),%eax
10ce63: 50 push %eax
10ce64: 53 push %ebx
10ce65: e8 6e 69 00 00 call 1137d8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10ce6a: 83 c4 10 add $0x10,%esp
10ce6d: 85 c0 test %eax,%eax
10ce6f: 75 e3 jne 10ce54 <rtems_rate_monotonic_report_statistics_with_plugin+0x60>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
10ce71: 83 ec 08 sub $0x8,%esp
10ce74: 8d 55 c0 lea -0x40(%ebp),%edx
10ce77: 52 push %edx
10ce78: 53 push %ebx
10ce79: e8 06 6a 00 00 call 113884 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10ce7e: 83 c4 0c add $0xc,%esp
10ce81: 8d 45 e3 lea -0x1d(%ebp),%eax
10ce84: 50 push %eax
10ce85: 6a 05 push $0x5
10ce87: ff 75 c0 pushl -0x40(%ebp)
10ce8a: e8 a9 02 00 00 call 10d138 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10ce8f: 59 pop %ecx
10ce90: 5e pop %esi
10ce91: ff 75 8c pushl -0x74(%ebp)
10ce94: ff 75 88 pushl -0x78(%ebp)
10ce97: 8d 55 e3 lea -0x1d(%ebp),%edx
10ce9a: 52 push %edx
10ce9b: 53 push %ebx
10ce9c: 68 9a 4d 12 00 push $0x124d9a
10cea1: 57 push %edi
10cea2: ff 55 84 call *-0x7c(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10cea5: 8b 45 88 mov -0x78(%ebp),%eax
10cea8: 83 c4 20 add $0x20,%esp
10ceab: 85 c0 test %eax,%eax
10cead: 75 21 jne 10ced0 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc>
(*print)( context, "\n" );
10ceaf: 83 ec 08 sub $0x8,%esp
10ceb2: 68 3d 2f 12 00 push $0x122f3d
10ceb7: 57 push %edi
10ceb8: ff 55 84 call *-0x7c(%ebp)
continue;
10cebb: 83 c4 10 add $0x10,%esp
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10cebe: 43 inc %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 ;
10cebf: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c
10cec5: 73 96 jae 10ce5d <rtems_rate_monotonic_report_statistics_with_plugin+0x69><== ALWAYS TAKEN
10cec7: 90 nop
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
10cec8: 8d 65 f4 lea -0xc(%ebp),%esp
10cecb: 5b pop %ebx
10cecc: 5e pop %esi
10cecd: 5f pop %edi
10cece: c9 leave
10cecf: c3 ret
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 );
10ced0: 52 push %edx
10ced1: 8d 55 d8 lea -0x28(%ebp),%edx
10ced4: 52 push %edx
10ced5: 50 push %eax
10ced6: 8d 45 a0 lea -0x60(%ebp),%eax
10ced9: 50 push %eax
10ceda: e8 01 35 00 00 call 1103e0 <_Timespec_Divide_by_integer>
(*print)( context,
10cedf: 8b 4d dc mov -0x24(%ebp),%ecx
10cee2: be d3 4d 62 10 mov $0x10624dd3,%esi
10cee7: 89 c8 mov %ecx,%eax
10cee9: f7 ee imul %esi
10ceeb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cef1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10cef7: c1 f8 06 sar $0x6,%eax
10cefa: c1 f9 1f sar $0x1f,%ecx
10cefd: 29 c8 sub %ecx,%eax
10ceff: 50 push %eax
10cf00: ff 75 d8 pushl -0x28(%ebp)
10cf03: 8b 4d 9c mov -0x64(%ebp),%ecx
10cf06: 89 c8 mov %ecx,%eax
10cf08: f7 ee imul %esi
10cf0a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cf10: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10cf16: c1 f8 06 sar $0x6,%eax
10cf19: c1 f9 1f sar $0x1f,%ecx
10cf1c: 29 c8 sub %ecx,%eax
10cf1e: 50 push %eax
10cf1f: ff 75 98 pushl -0x68(%ebp)
10cf22: 8b 4d 94 mov -0x6c(%ebp),%ecx
10cf25: 89 c8 mov %ecx,%eax
10cf27: f7 ee imul %esi
10cf29: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
10cf2f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cf35: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10cf3b: c1 f8 06 sar $0x6,%eax
10cf3e: c1 f9 1f sar $0x1f,%ecx
10cf41: 29 c8 sub %ecx,%eax
10cf43: 50 push %eax
10cf44: ff 75 90 pushl -0x70(%ebp)
10cf47: 68 94 4e 12 00 push $0x124e94
10cf4c: 57 push %edi
10cf4d: ff 55 84 call *-0x7c(%ebp)
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);
10cf50: 83 c4 2c add $0x2c,%esp
10cf53: 8d 55 d8 lea -0x28(%ebp),%edx
10cf56: 52 push %edx
10cf57: ff 75 88 pushl -0x78(%ebp)
10cf5a: 8d 45 b8 lea -0x48(%ebp),%eax
10cf5d: 50 push %eax
10cf5e: e8 7d 34 00 00 call 1103e0 <_Timespec_Divide_by_integer>
(*print)( context,
10cf63: 8b 4d dc mov -0x24(%ebp),%ecx
10cf66: 89 c8 mov %ecx,%eax
10cf68: f7 ee imul %esi
10cf6a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cf70: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10cf76: c1 f8 06 sar $0x6,%eax
10cf79: c1 f9 1f sar $0x1f,%ecx
10cf7c: 29 c8 sub %ecx,%eax
10cf7e: 50 push %eax
10cf7f: ff 75 d8 pushl -0x28(%ebp)
10cf82: 8b 4d b4 mov -0x4c(%ebp),%ecx
10cf85: 89 c8 mov %ecx,%eax
10cf87: f7 ee imul %esi
10cf89: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cf8f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax
10cf95: c1 f8 06 sar $0x6,%eax
10cf98: c1 f9 1f sar $0x1f,%ecx
10cf9b: 29 c8 sub %ecx,%eax
10cf9d: 50 push %eax
10cf9e: ff 75 b0 pushl -0x50(%ebp)
10cfa1: 8b 4d ac mov -0x54(%ebp),%ecx
10cfa4: 89 c8 mov %ecx,%eax
10cfa6: f7 ee imul %esi
10cfa8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp)
10cfae: 89 95 7c ff ff ff mov %edx,-0x84(%ebp)
10cfb4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi
10cfba: c1 fe 06 sar $0x6,%esi
10cfbd: 89 c8 mov %ecx,%eax
10cfbf: 99 cltd
10cfc0: 29 d6 sub %edx,%esi
10cfc2: 56 push %esi
10cfc3: ff 75 a8 pushl -0x58(%ebp)
10cfc6: 68 b4 4e 12 00 push $0x124eb4
10cfcb: 57 push %edi
10cfcc: ff 55 84 call *-0x7c(%ebp)
10cfcf: 83 c4 30 add $0x30,%esp
10cfd2: e9 7d fe ff ff jmp 10ce54 <rtems_rate_monotonic_report_statistics_with_plugin+0x60>
0010cff0 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10cff0: 55 push %ebp
10cff1: 89 e5 mov %esp,%ebp
10cff3: 53 push %ebx
10cff4: 83 ec 04 sub $0x4,%esp
10cff7: a1 58 c3 12 00 mov 0x12c358,%eax
10cffc: 40 inc %eax
10cffd: a3 58 c3 12 00 mov %eax,0x12c358
/*
* 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 ;
10d002: 8b 1d 68 c2 12 00 mov 0x12c268,%ebx
10d008: 3b 1d 6c c2 12 00 cmp 0x12c26c,%ebx
10d00e: 77 15 ja 10d025 <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
10d010: 83 ec 0c sub $0xc,%esp
10d013: 53 push %ebx
10d014: e8 17 00 00 00 call 10d030 <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++ ) {
10d019: 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 ;
10d01a: 83 c4 10 add $0x10,%esp
10d01d: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c
10d023: 73 eb jae 10d010 <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10d025: 8b 5d fc mov -0x4(%ebp),%ebx
10d028: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10d029: e9 02 26 00 00 jmp 10f630 <_Thread_Enable_dispatch>
0010d030 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
10d030: 55 push %ebp
10d031: 89 e5 mov %esp,%ebp
10d033: 57 push %edi
10d034: 53 push %ebx
10d035: 83 ec 14 sub $0x14,%esp
10d038: 8d 45 f4 lea -0xc(%ebp),%eax
10d03b: 50 push %eax
10d03c: ff 75 08 pushl 0x8(%ebp)
10d03f: 68 60 c2 12 00 push $0x12c260
10d044: e8 73 1d 00 00 call 10edbc <_Objects_Get>
10d049: 89 c2 mov %eax,%edx
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10d04b: 83 c4 10 add $0x10,%esp
10d04e: 8b 45 f4 mov -0xc(%ebp),%eax
10d051: 85 c0 test %eax,%eax
10d053: 75 3b jne 10d090 <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
10d055: 8d 5a 54 lea 0x54(%edx),%ebx
10d058: b9 38 00 00 00 mov $0x38,%ecx
10d05d: 31 c0 xor %eax,%eax
10d05f: 89 df mov %ebx,%edi
10d061: f3 aa rep stos %al,%es:(%edi)
10d063: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10d06a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10d071: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10d078: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
10d07f: e8 ac 25 00 00 call 10f630 <_Thread_Enable_dispatch>
10d084: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d086: 8d 65 f8 lea -0x8(%ebp),%esp
10d089: 5b pop %ebx
10d08a: 5f pop %edi
10d08b: c9 leave
10d08c: c3 ret
10d08d: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
10d090: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d095: 8d 65 f8 lea -0x8(%ebp),%esp
10d098: 5b pop %ebx
10d099: 5f pop %edi
10d09a: c9 leave
10d09b: c3 ret
00117b18 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117b18: 55 push %ebp
117b19: 89 e5 mov %esp,%ebp
117b1b: 57 push %edi
117b1c: 56 push %esi
117b1d: 53 push %ebx
117b1e: 83 ec 1c sub $0x1c,%esp
117b21: 8b 75 08 mov 0x8(%ebp),%esi
117b24: 8b 5d 0c mov 0xc(%ebp),%ebx
117b27: 8b 7d 1c mov 0x1c(%ebp),%edi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117b2a: 85 f6 test %esi,%esi
117b2c: 0f 84 92 00 00 00 je 117bc4 <rtems_region_create+0xac>
return RTEMS_INVALID_NAME;
if ( !starting_address )
117b32: 85 db test %ebx,%ebx
117b34: 74 09 je 117b3f <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !id )
117b36: 85 ff test %edi,%edi
117b38: 74 05 je 117b3f <rtems_region_create+0x27>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
117b3a: f6 c3 03 test $0x3,%bl
117b3d: 74 0d je 117b4c <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
117b3f: b8 09 00 00 00 mov $0x9,%eax
}
117b44: 8d 65 f4 lea -0xc(%ebp),%esp
117b47: 5b pop %ebx
117b48: 5e pop %esi
117b49: 5f pop %edi
117b4a: c9 leave
117b4b: c3 ret
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117b4c: 83 ec 0c sub $0xc,%esp
117b4f: ff 35 b0 41 14 00 pushl 0x1441b0
117b55: e8 4a 25 00 00 call 11a0a4 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
117b5a: c7 04 24 00 40 14 00 movl $0x144000,(%esp)
117b61: e8 86 39 00 00 call 11b4ec <_Objects_Allocate>
117b66: 89 c2 mov %eax,%edx
the_region = _Region_Allocate();
if ( !the_region )
117b68: 83 c4 10 add $0x10,%esp
117b6b: 85 c0 test %eax,%eax
117b6d: 74 65 je 117bd4 <rtems_region_create+0xbc>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
117b6f: ff 75 14 pushl 0x14(%ebp)
117b72: ff 75 10 pushl 0x10(%ebp)
117b75: 53 push %ebx
117b76: 8d 40 68 lea 0x68(%eax),%eax
117b79: 50 push %eax
117b7a: 89 55 e4 mov %edx,-0x1c(%ebp)
117b7d: e8 4e 34 00 00 call 11afd0 <_Heap_Initialize>
117b82: 8b 55 e4 mov -0x1c(%ebp),%edx
117b85: 89 42 5c mov %eax,0x5c(%edx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
117b88: 83 c4 10 add $0x10,%esp
117b8b: 85 c0 test %eax,%eax
117b8d: 75 4d jne 117bdc <rtems_region_create+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117b8f: 83 ec 08 sub $0x8,%esp
117b92: 52 push %edx
117b93: 68 00 40 14 00 push $0x144000
117b98: e8 cf 3c 00 00 call 11b86c <_Objects_Free>
117b9d: b8 08 00 00 00 mov $0x8,%eax
117ba2: 83 c4 10 add $0x10,%esp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
117ba5: 83 ec 0c sub $0xc,%esp
117ba8: ff 35 b0 41 14 00 pushl 0x1441b0
117bae: 89 45 e4 mov %eax,-0x1c(%ebp)
117bb1: e8 36 25 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
117bb6: 83 c4 10 add $0x10,%esp
117bb9: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117bbc: 8d 65 f4 lea -0xc(%ebp),%esp
117bbf: 5b pop %ebx
117bc0: 5e pop %esi
117bc1: 5f pop %edi
117bc2: c9 leave
117bc3: c3 ret
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
117bc4: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117bc9: 8d 65 f4 lea -0xc(%ebp),%esp
117bcc: 5b pop %ebx
117bcd: 5e pop %esi
117bce: 5f pop %edi
117bcf: c9 leave
117bd0: c3 ret
117bd1: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
117bd4: b8 05 00 00 00 mov $0x5,%eax
117bd9: eb ca jmp 117ba5 <rtems_region_create+0x8d>
117bdb: 90 nop
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
117bdc: 89 5a 50 mov %ebx,0x50(%edx)
the_region->length = length;
117bdf: 8b 45 10 mov 0x10(%ebp),%eax
117be2: 89 42 54 mov %eax,0x54(%edx)
the_region->page_size = page_size;
117be5: 8b 45 14 mov 0x14(%ebp),%eax
117be8: 89 42 58 mov %eax,0x58(%edx)
the_region->attribute_set = attribute_set;
117beb: 8b 45 18 mov 0x18(%ebp),%eax
117bee: 89 42 60 mov %eax,0x60(%edx)
the_region->number_of_used_blocks = 0;
117bf1: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx)
_Thread_queue_Initialize(
117bf8: 6a 06 push $0x6
117bfa: 6a 40 push $0x40
117bfc: 8b 45 18 mov 0x18(%ebp),%eax
117bff: c1 e8 02 shr $0x2,%eax
117c02: 83 e0 01 and $0x1,%eax
117c05: 50 push %eax
117c06: 8d 42 10 lea 0x10(%edx),%eax
117c09: 50 push %eax
117c0a: 89 55 e4 mov %edx,-0x1c(%ebp)
117c0d: e8 6e 4e 00 00 call 11ca80 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
117c12: 8b 55 e4 mov -0x1c(%ebp),%edx
117c15: 8b 42 08 mov 0x8(%edx),%eax
117c18: 0f b7 d8 movzwl %ax,%ebx
117c1b: 8b 0d 1c 40 14 00 mov 0x14401c,%ecx
117c21: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
117c24: 89 72 0c mov %esi,0xc(%edx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
117c27: 89 07 mov %eax,(%edi)
117c29: 31 c0 xor %eax,%eax
117c2b: 83 c4 10 add $0x10,%esp
117c2e: e9 72 ff ff ff jmp 117ba5 <rtems_region_create+0x8d>
00117c34 <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
117c34: 55 push %ebp
117c35: 89 e5 mov %esp,%ebp
117c37: 53 push %ebx
117c38: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
117c3b: ff 35 b0 41 14 00 pushl 0x1441b0
117c41: e8 5e 24 00 00 call 11a0a4 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
117c46: 83 c4 0c add $0xc,%esp
117c49: 8d 45 f4 lea -0xc(%ebp),%eax
117c4c: 50 push %eax
117c4d: ff 75 08 pushl 0x8(%ebp)
117c50: 68 00 40 14 00 push $0x144000
117c55: e8 42 3d 00 00 call 11b99c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117c5a: 83 c4 10 add $0x10,%esp
117c5d: 8b 5d f4 mov -0xc(%ebp),%ebx
117c60: 85 db test %ebx,%ebx
117c62: 74 1c je 117c80 <rtems_region_delete+0x4c>
117c64: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117c69: 83 ec 0c sub $0xc,%esp
117c6c: ff 35 b0 41 14 00 pushl 0x1441b0
117c72: e8 75 24 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
}
117c77: 89 d8 mov %ebx,%eax
117c79: 8b 5d fc mov -0x4(%ebp),%ebx
117c7c: c9 leave
117c7d: c3 ret
117c7e: 66 90 xchg %ax,%ax
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
117c80: 8b 48 64 mov 0x64(%eax),%ecx
117c83: 85 c9 test %ecx,%ecx
117c85: 74 09 je 117c90 <rtems_region_delete+0x5c>
117c87: bb 0c 00 00 00 mov $0xc,%ebx
117c8c: eb db jmp 117c69 <rtems_region_delete+0x35>
117c8e: 66 90 xchg %ax,%ax
return_status = RTEMS_RESOURCE_IN_USE;
else {
_Objects_Close( &_Region_Information, &the_region->Object );
117c90: 83 ec 08 sub $0x8,%esp
117c93: 50 push %eax
117c94: 68 00 40 14 00 push $0x144000
117c99: 89 45 e4 mov %eax,-0x1c(%ebp)
117c9c: e8 c7 38 00 00 call 11b568 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117ca1: 58 pop %eax
117ca2: 5a pop %edx
117ca3: 8b 45 e4 mov -0x1c(%ebp),%eax
117ca6: 50 push %eax
117ca7: 68 00 40 14 00 push $0x144000
117cac: e8 bb 3b 00 00 call 11b86c <_Objects_Free>
117cb1: 31 db xor %ebx,%ebx
117cb3: 83 c4 10 add $0x10,%esp
117cb6: eb b1 jmp 117c69 <rtems_region_delete+0x35>
00117cb8 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
117cb8: 55 push %ebp
117cb9: 89 e5 mov %esp,%ebp
117cbb: 56 push %esi
117cbc: 53 push %ebx
117cbd: 83 ec 10 sub $0x10,%esp
117cc0: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
117cc3: 85 db test %ebx,%ebx
117cc5: 74 71 je 117d38 <rtems_region_extend+0x80>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
117cc7: 83 ec 0c sub $0xc,%esp
117cca: ff 35 b0 41 14 00 pushl 0x1441b0
117cd0: e8 cf 23 00 00 call 11a0a4 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
117cd5: 83 c4 0c add $0xc,%esp
117cd8: 8d 45 f0 lea -0x10(%ebp),%eax
117cdb: 50 push %eax
117cdc: ff 75 08 pushl 0x8(%ebp)
117cdf: 68 00 40 14 00 push $0x144000
117ce4: e8 b3 3c 00 00 call 11b99c <_Objects_Get_no_protection>
117ce9: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
117ceb: 83 c4 10 add $0x10,%esp
117cee: 8b 45 f0 mov -0x10(%ebp),%eax
117cf1: 85 c0 test %eax,%eax
117cf3: 74 1f je 117d14 <rtems_region_extend+0x5c>
117cf5: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117cfa: 83 ec 0c sub $0xc,%esp
117cfd: ff 35 b0 41 14 00 pushl 0x1441b0
117d03: e8 e4 23 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
117d08: 83 c4 10 add $0x10,%esp
}
117d0b: 89 d8 mov %ebx,%eax
117d0d: 8d 65 f8 lea -0x8(%ebp),%esp
117d10: 5b pop %ebx
117d11: 5e pop %esi
117d12: c9 leave
117d13: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
117d14: 8d 45 f4 lea -0xc(%ebp),%eax
117d17: 50 push %eax
117d18: ff 75 10 pushl 0x10(%ebp)
117d1b: 53 push %ebx
117d1c: 8d 46 68 lea 0x68(%esi),%eax
117d1f: 50 push %eax
117d20: e8 b3 2f 00 00 call 11acd8 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
117d25: 83 c4 10 add $0x10,%esp
117d28: 85 c0 test %eax,%eax
117d2a: 74 18 je 117d44 <rtems_region_extend+0x8c>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
117d2c: 48 dec %eax
117d2d: 74 25 je 117d54 <rtems_region_extend+0x9c>
117d2f: bb 18 00 00 00 mov $0x18,%ebx
117d34: eb c4 jmp 117cfa <rtems_region_extend+0x42>
117d36: 66 90 xchg %ax,%ax
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
117d38: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117d3a: 89 d8 mov %ebx,%eax
117d3c: 8d 65 f8 lea -0x8(%ebp),%esp
117d3f: 5b pop %ebx
117d40: 5e pop %esi
117d41: c9 leave
117d42: c3 ret
117d43: 90 nop
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
117d44: 8b 45 f4 mov -0xc(%ebp),%eax
117d47: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
117d4a: 01 46 5c add %eax,0x5c(%esi)
117d4d: 31 db xor %ebx,%ebx
117d4f: eb a9 jmp 117cfa <rtems_region_extend+0x42>
117d51: 8d 76 00 lea 0x0(%esi),%esi
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
117d54: bb 09 00 00 00 mov $0x9,%ebx
117d59: eb 9f jmp 117cfa <rtems_region_extend+0x42>
00117d5c <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
117d5c: 55 push %ebp
117d5d: 89 e5 mov %esp,%ebp
117d5f: 53 push %ebx
117d60: 83 ec 14 sub $0x14,%esp
117d63: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
117d66: 85 db test %ebx,%ebx
117d68: 74 76 je 117de0 <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
117d6a: 83 ec 0c sub $0xc,%esp
117d6d: ff 35 b0 41 14 00 pushl 0x1441b0
117d73: e8 2c 23 00 00 call 11a0a4 <_API_Mutex_Lock>
117d78: 83 c4 0c add $0xc,%esp
117d7b: 8d 45 f4 lea -0xc(%ebp),%eax
117d7e: 50 push %eax
117d7f: ff 75 08 pushl 0x8(%ebp)
117d82: 68 00 40 14 00 push $0x144000
117d87: e8 10 3c 00 00 call 11b99c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117d8c: 83 c4 10 add $0x10,%esp
117d8f: 8b 55 f4 mov -0xc(%ebp),%edx
117d92: 85 d2 test %edx,%edx
117d94: 74 1e je 117db4 <rtems_region_get_free_information+0x58>
117d96: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117d9b: 83 ec 0c sub $0xc,%esp
117d9e: ff 35 b0 41 14 00 pushl 0x1441b0
117da4: e8 43 23 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
117da9: 83 c4 10 add $0x10,%esp
}
117dac: 89 d8 mov %ebx,%eax
117dae: 8b 5d fc mov -0x4(%ebp),%ebx
117db1: c9 leave
117db2: c3 ret
117db3: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
117db4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
117dbb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
117dc2: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
117dc9: 83 ec 08 sub $0x8,%esp
117dcc: 53 push %ebx
117dcd: 83 c0 68 add $0x68,%eax
117dd0: 50 push %eax
117dd1: e8 12 31 00 00 call 11aee8 <_Heap_Get_free_information>
117dd6: 31 db xor %ebx,%ebx
return_status = RTEMS_SUCCESSFUL;
break;
117dd8: 83 c4 10 add $0x10,%esp
117ddb: eb be jmp 117d9b <rtems_region_get_free_information+0x3f>
117ddd: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
117de0: b3 09 mov $0x9,%bl
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117de2: 89 d8 mov %ebx,%eax
117de4: 8b 5d fc mov -0x4(%ebp),%ebx
117de7: c9 leave
117de8: c3 ret
00117e64 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
117e64: 55 push %ebp
117e65: 89 e5 mov %esp,%ebp
117e67: 57 push %edi
117e68: 56 push %esi
117e69: 53 push %ebx
117e6a: 83 ec 2c sub $0x2c,%esp
117e6d: 8b 75 0c mov 0xc(%ebp),%esi
117e70: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117e73: 85 db test %ebx,%ebx
117e75: 0f 84 a1 00 00 00 je 117f1c <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
117e7b: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
117e81: 85 f6 test %esi,%esi
117e83: 75 0f jne 117e94 <rtems_region_get_segment+0x30>
117e85: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117e8a: 8d 65 f4 lea -0xc(%ebp),%esp
117e8d: 5b pop %ebx
117e8e: 5e pop %esi
117e8f: 5f pop %edi
117e90: c9 leave
117e91: c3 ret
117e92: 66 90 xchg %ax,%ax
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
117e94: 83 ec 0c sub $0xc,%esp
117e97: ff 35 b0 41 14 00 pushl 0x1441b0
117e9d: e8 02 22 00 00 call 11a0a4 <_API_Mutex_Lock>
executing = _Thread_Executing;
117ea2: a1 b8 41 14 00 mov 0x1441b8,%eax
117ea7: 89 45 d4 mov %eax,-0x2c(%ebp)
117eaa: 83 c4 0c add $0xc,%esp
117ead: 8d 45 e4 lea -0x1c(%ebp),%eax
117eb0: 50 push %eax
117eb1: ff 75 08 pushl 0x8(%ebp)
117eb4: 68 00 40 14 00 push $0x144000
117eb9: e8 de 3a 00 00 call 11b99c <_Objects_Get_no_protection>
117ebe: 89 c7 mov %eax,%edi
the_region = _Region_Get( id, &location );
switch ( location ) {
117ec0: 83 c4 10 add $0x10,%esp
117ec3: 8b 45 e4 mov -0x1c(%ebp),%eax
117ec6: 85 c0 test %eax,%eax
117ec8: 75 2a jne 117ef4 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
117eca: 3b 77 5c cmp 0x5c(%edi),%esi
117ecd: 76 2d jbe 117efc <rtems_region_get_segment+0x98>
117ecf: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117ed4: 83 ec 0c sub $0xc,%esp
117ed7: ff 35 b0 41 14 00 pushl 0x1441b0
117edd: 89 45 d0 mov %eax,-0x30(%ebp)
117ee0: e8 07 22 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
117ee5: 83 c4 10 add $0x10,%esp
117ee8: 8b 45 d0 mov -0x30(%ebp),%eax
}
117eeb: 8d 65 f4 lea -0xc(%ebp),%esp
117eee: 5b pop %ebx
117eef: 5e pop %esi
117ef0: 5f pop %edi
117ef1: c9 leave
117ef2: c3 ret
117ef3: 90 nop
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
_Thread_Enable_dispatch();
return (rtems_status_code) executing->Wait.return_code;
117ef4: b8 04 00 00 00 mov $0x4,%eax
117ef9: eb d9 jmp 117ed4 <rtems_region_get_segment+0x70>
117efb: 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 );
117efc: 6a 00 push $0x0
117efe: 6a 00 push $0x0
117f00: 56 push %esi
117f01: 8d 47 68 lea 0x68(%edi),%eax
117f04: 50 push %eax
117f05: e8 1a 2c 00 00 call 11ab24 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
117f0a: 83 c4 10 add $0x10,%esp
117f0d: 85 c0 test %eax,%eax
117f0f: 74 17 je 117f28 <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117f11: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117f14: 89 03 mov %eax,(%ebx)
117f16: 31 c0 xor %eax,%eax
117f18: eb ba jmp 117ed4 <rtems_region_get_segment+0x70>
117f1a: 66 90 xchg %ax,%ax
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
117f1c: b8 09 00 00 00 mov $0x9,%eax
117f21: e9 64 ff ff ff jmp 117e8a <rtems_region_get_segment+0x26>
117f26: 66 90 xchg %ax,%ax
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
} else if ( _Options_Is_no_wait( option_set ) ) {
117f28: f6 45 10 01 testb $0x1,0x10(%ebp)
117f2c: 74 07 je 117f35 <rtems_region_get_segment+0xd1>
117f2e: b8 0d 00 00 00 mov $0xd,%eax
117f33: eb 9f jmp 117ed4 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
117f35: a1 f8 40 14 00 mov 0x1440f8,%eax
117f3a: 40 inc %eax
117f3b: a3 f8 40 14 00 mov %eax,0x1440f8
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
117f40: 83 ec 0c sub $0xc,%esp
117f43: ff 35 b0 41 14 00 pushl 0x1441b0
117f49: e8 9e 21 00 00 call 11a0ec <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
117f4e: 8d 47 10 lea 0x10(%edi),%eax
117f51: 8b 55 d4 mov -0x2c(%ebp),%edx
117f54: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
117f57: 8b 4d 08 mov 0x8(%ebp),%ecx
117f5a: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
117f5d: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
117f60: 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;
117f63: c7 47 40 01 00 00 00 movl $0x1,0x40(%edi)
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
117f6a: 83 c4 0c add $0xc,%esp
117f6d: 68 30 cb 11 00 push $0x11cb30
117f72: ff 75 14 pushl 0x14(%ebp)
117f75: 50 push %eax
117f76: e8 a5 48 00 00 call 11c820 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
117f7b: e8 3c 43 00 00 call 11c2bc <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
117f80: 8b 55 d4 mov -0x2c(%ebp),%edx
117f83: 8b 42 34 mov 0x34(%edx),%eax
117f86: 83 c4 10 add $0x10,%esp
117f89: e9 fc fe ff ff jmp 117e8a <rtems_region_get_segment+0x26>
00117f90 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
117f90: 55 push %ebp
117f91: 89 e5 mov %esp,%ebp
117f93: 56 push %esi
117f94: 53 push %ebx
117f95: 83 ec 20 sub $0x20,%esp
117f98: 8b 5d 0c mov 0xc(%ebp),%ebx
117f9b: 8b 75 10 mov 0x10(%ebp),%esi
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
117f9e: 85 db test %ebx,%ebx
117fa0: 74 72 je 118014 <rtems_region_get_segment_size+0x84><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
117fa2: 85 f6 test %esi,%esi
117fa4: 74 6e je 118014 <rtems_region_get_segment_size+0x84><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
117fa6: 83 ec 0c sub $0xc,%esp
117fa9: ff 35 b0 41 14 00 pushl 0x1441b0
117faf: e8 f0 20 00 00 call 11a0a4 <_API_Mutex_Lock>
117fb4: 83 c4 0c add $0xc,%esp
117fb7: 8d 45 f4 lea -0xc(%ebp),%eax
117fba: 50 push %eax
117fbb: ff 75 08 pushl 0x8(%ebp)
117fbe: 68 00 40 14 00 push $0x144000
117fc3: e8 d4 39 00 00 call 11b99c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
117fc8: 83 c4 10 add $0x10,%esp
117fcb: 8b 55 f4 mov -0xc(%ebp),%edx
117fce: 85 d2 test %edx,%edx
117fd0: 75 36 jne 118008 <rtems_region_get_segment_size+0x78><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
117fd2: 52 push %edx
117fd3: 56 push %esi
117fd4: 53 push %ebx
117fd5: 83 c0 68 add $0x68,%eax
117fd8: 50 push %eax
117fd9: e8 22 34 00 00 call 11b400 <_Heap_Size_of_alloc_area>
117fde: 83 c4 10 add $0x10,%esp
117fe1: 84 c0 test %al,%al
117fe3: 74 3b je 118020 <rtems_region_get_segment_size+0x90><== NEVER TAKEN
117fe5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117fe7: 83 ec 0c sub $0xc,%esp
117fea: ff 35 b0 41 14 00 pushl 0x1441b0
117ff0: 89 45 e4 mov %eax,-0x1c(%ebp)
117ff3: e8 f4 20 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
117ff8: 83 c4 10 add $0x10,%esp
117ffb: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117ffe: 8d 65 f8 lea -0x8(%ebp),%esp
118001: 5b pop %ebx
118002: 5e pop %esi
118003: c9 leave
118004: c3 ret
118005: 8d 76 00 lea 0x0(%esi),%esi
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
118008: 4a dec %edx
118009: 75 da jne 117fe5 <rtems_region_get_segment_size+0x55><== NEVER TAKEN
11800b: b8 04 00 00 00 mov $0x4,%eax
118010: eb d5 jmp 117fe7 <rtems_region_get_segment_size+0x57>
118012: 66 90 xchg %ax,%ax
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
118014: b8 09 00 00 00 mov $0x9,%eax
}
118019: 8d 65 f8 lea -0x8(%ebp),%esp
11801c: 5b pop %ebx
11801d: 5e pop %esi
11801e: c9 leave
11801f: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
118020: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED
118025: eb c0 jmp 117fe7 <rtems_region_get_segment_size+0x57><== NOT EXECUTED
0011804c <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
11804c: 55 push %ebp
11804d: 89 e5 mov %esp,%ebp
11804f: 56 push %esi
118050: 53 push %ebx
118051: 83 ec 20 sub $0x20,%esp
118054: 8b 5d 14 mov 0x14(%ebp),%ebx
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
118057: 85 db test %ebx,%ebx
118059: 0f 84 a5 00 00 00 je 118104 <rtems_region_resize_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
11805f: 83 ec 0c sub $0xc,%esp
118062: ff 35 b0 41 14 00 pushl 0x1441b0
118068: e8 37 20 00 00 call 11a0a4 <_API_Mutex_Lock>
11806d: 83 c4 0c add $0xc,%esp
118070: 8d 45 f0 lea -0x10(%ebp),%eax
118073: 50 push %eax
118074: ff 75 08 pushl 0x8(%ebp)
118077: 68 00 40 14 00 push $0x144000
11807c: e8 1b 39 00 00 call 11b99c <_Objects_Get_no_protection>
118081: 89 c6 mov %eax,%esi
the_region = _Region_Get( id, &location );
switch ( location ) {
118083: 83 c4 10 add $0x10,%esp
118086: 8b 45 f0 mov -0x10(%ebp),%eax
118089: 85 c0 test %eax,%eax
11808b: 74 1f je 1180ac <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11808d: 83 ec 0c sub $0xc,%esp
118090: ff 35 b0 41 14 00 pushl 0x1441b0
118096: e8 51 20 00 00 call 11a0ec <_API_Mutex_Unlock>
11809b: b8 04 00 00 00 mov $0x4,%eax
return return_status;
1180a0: 83 c4 10 add $0x10,%esp
}
1180a3: 8d 65 f8 lea -0x8(%ebp),%esp
1180a6: 5b pop %ebx
1180a7: 5e pop %esi
1180a8: c9 leave
1180a9: c3 ret
1180aa: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1180ac: 83 ec 0c sub $0xc,%esp
1180af: 8d 45 f4 lea -0xc(%ebp),%eax
1180b2: 50 push %eax
1180b3: 8d 45 ec lea -0x14(%ebp),%eax
1180b6: 50 push %eax
1180b7: ff 75 10 pushl 0x10(%ebp)
1180ba: ff 75 0c pushl 0xc(%ebp)
1180bd: 8d 46 68 lea 0x68(%esi),%eax
1180c0: 50 push %eax
1180c1: e8 2e 32 00 00 call 11b2f4 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
1180c6: 8b 55 ec mov -0x14(%ebp),%edx
1180c9: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
1180cb: 83 c4 20 add $0x20,%esp
1180ce: 85 c0 test %eax,%eax
1180d0: 75 16 jne 1180e8 <rtems_region_resize_segment+0x9c>
_Region_Process_queue( the_region ); /* unlocks allocator */
1180d2: 83 ec 0c sub $0xc,%esp
1180d5: 56 push %esi
1180d6: e8 b9 85 00 00 call 120694 <_Region_Process_queue>
1180db: 31 c0 xor %eax,%eax
1180dd: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1180e0: 8d 65 f8 lea -0x8(%ebp),%esp
1180e3: 5b pop %ebx
1180e4: 5e pop %esi
1180e5: c9 leave
1180e6: c3 ret
1180e7: 90 nop
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
1180e8: 83 ec 0c sub $0xc,%esp
1180eb: ff 35 b0 41 14 00 pushl 0x1441b0
1180f1: 89 45 e4 mov %eax,-0x1c(%ebp)
1180f4: e8 f3 1f 00 00 call 11a0ec <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
1180f9: 83 c4 10 add $0x10,%esp
1180fc: 8b 45 e4 mov -0x1c(%ebp),%eax
1180ff: 83 f8 01 cmp $0x1,%eax
118102: 74 0c je 118110 <rtems_region_resize_segment+0xc4>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
118104: b8 09 00 00 00 mov $0x9,%eax
}
118109: 8d 65 f8 lea -0x8(%ebp),%esp
11810c: 5b pop %ebx
11810d: 5e pop %esi
11810e: c9 leave
11810f: c3 ret
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
118110: b0 0d mov $0xd,%al
118112: eb 8f jmp 1180a3 <rtems_region_resize_segment+0x57>
00118114 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
118114: 55 push %ebp
118115: 89 e5 mov %esp,%ebp
118117: 53 push %ebx
118118: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
11811b: ff 35 b0 41 14 00 pushl 0x1441b0
118121: e8 7e 1f 00 00 call 11a0a4 <_API_Mutex_Lock>
118126: 83 c4 0c add $0xc,%esp
118129: 8d 45 f4 lea -0xc(%ebp),%eax
11812c: 50 push %eax
11812d: ff 75 08 pushl 0x8(%ebp)
118130: 68 00 40 14 00 push $0x144000
118135: e8 62 38 00 00 call 11b99c <_Objects_Get_no_protection>
11813a: 89 c3 mov %eax,%ebx
the_region = _Region_Get( id, &location );
switch ( location ) {
11813c: 83 c4 10 add $0x10,%esp
11813f: 8b 45 f4 mov -0xc(%ebp),%eax
118142: 85 c0 test %eax,%eax
118144: 74 1e je 118164 <rtems_region_return_segment+0x50>
118146: bb 04 00 00 00 mov $0x4,%ebx
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11814b: 83 ec 0c sub $0xc,%esp
11814e: ff 35 b0 41 14 00 pushl 0x1441b0
118154: e8 93 1f 00 00 call 11a0ec <_API_Mutex_Unlock>
return return_status;
118159: 83 c4 10 add $0x10,%esp
}
11815c: 89 d8 mov %ebx,%eax
11815e: 8b 5d fc mov -0x4(%ebp),%ebx
118161: c9 leave
118162: c3 ret
118163: 90 nop
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
118164: 83 ec 08 sub $0x8,%esp
118167: ff 75 0c pushl 0xc(%ebp)
11816a: 8d 43 68 lea 0x68(%ebx),%eax
11816d: 50 push %eax
11816e: e8 05 2c 00 00 call 11ad78 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
118173: 83 c4 10 add $0x10,%esp
118176: 84 c0 test %al,%al
118178: 75 0a jne 118184 <rtems_region_return_segment+0x70>
else {
the_region->number_of_used_blocks -= 1;
_Region_Process_queue(the_region); /* unlocks allocator */
return RTEMS_SUCCESSFUL;
11817a: bb 09 00 00 00 mov $0x9,%ebx
11817f: eb ca jmp 11814b <rtems_region_return_segment+0x37>
118181: 8d 76 00 lea 0x0(%esi),%esi
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
118184: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
118187: 83 ec 0c sub $0xc,%esp
11818a: 53 push %ebx
11818b: e8 04 85 00 00 call 120694 <_Region_Process_queue>
118190: 31 db xor %ebx,%ebx
return RTEMS_SUCCESSFUL;
118192: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
118195: 89 d8 mov %ebx,%eax
118197: 8b 5d fc mov -0x4(%ebp),%ebx
11819a: c9 leave
11819b: c3 ret
0010ba30 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10ba30: 55 push %ebp
10ba31: 89 e5 mov %esp,%ebp
10ba33: 57 push %edi
10ba34: 56 push %esi
10ba35: 53 push %ebx
10ba36: 83 ec 3c sub $0x3c,%esp
10ba39: 8b 75 08 mov 0x8(%ebp),%esi
10ba3c: 8b 5d 10 mov 0x10(%ebp),%ebx
10ba3f: 8b 7d 18 mov 0x18(%ebp),%edi
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10ba42: 85 f6 test %esi,%esi
10ba44: 74 4a je 10ba90 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10ba46: 85 ff test %edi,%edi
10ba48: 0f 84 f6 00 00 00 je 10bb44 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10ba4e: 89 da mov %ebx,%edx
10ba50: 81 e2 c0 00 00 00 and $0xc0,%edx
10ba56: 74 48 je 10baa0 <rtems_semaphore_create+0x70>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10ba58: 89 d8 mov %ebx,%eax
10ba5a: 83 e0 30 and $0x30,%eax
10ba5d: 83 f8 10 cmp $0x10,%eax
10ba60: 74 0e je 10ba70 <rtems_semaphore_create+0x40>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10ba62: b8 0b 00 00 00 mov $0xb,%eax
}
10ba67: 8d 65 f4 lea -0xc(%ebp),%esp
10ba6a: 5b pop %ebx
10ba6b: 5e pop %esi
10ba6c: 5f pop %edi
10ba6d: c9 leave
10ba6e: c3 ret
10ba6f: 90 nop
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10ba70: f6 c3 04 test $0x4,%bl
10ba73: 74 ed je 10ba62 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10ba75: 81 fa c0 00 00 00 cmp $0xc0,%edx
10ba7b: 74 e5 je 10ba62 <rtems_semaphore_create+0x32>
10ba7d: b9 10 00 00 00 mov $0x10,%ecx
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10ba82: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10ba86: 76 1f jbe 10baa7 <rtems_semaphore_create+0x77>
10ba88: b8 0a 00 00 00 mov $0xa,%eax
10ba8d: eb d8 jmp 10ba67 <rtems_semaphore_create+0x37>
10ba8f: 90 nop
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
10ba90: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ba95: 8d 65 f4 lea -0xc(%ebp),%esp
10ba98: 5b pop %ebx
10ba99: 5e pop %esi
10ba9a: 5f pop %edi
10ba9b: c9 leave
10ba9c: c3 ret
10ba9d: 8d 76 00 lea 0x0(%esi),%esi
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
10baa0: 89 d9 mov %ebx,%ecx
10baa2: 83 e1 30 and $0x30,%ecx
10baa5: 75 db jne 10ba82 <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10baa7: a1 b8 94 12 00 mov 0x1294b8,%eax
10baac: 40 inc %eax
10baad: a3 b8 94 12 00 mov %eax,0x1294b8
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
10bab2: 83 ec 0c sub $0xc,%esp
10bab5: 68 00 94 12 00 push $0x129400
10baba: 89 4d c4 mov %ecx,-0x3c(%ebp)
10babd: e8 86 14 00 00 call 10cf48 <_Objects_Allocate>
10bac2: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10bac4: 83 c4 10 add $0x10,%esp
10bac7: 85 c0 test %eax,%eax
10bac9: 8b 4d c4 mov -0x3c(%ebp),%ecx
10bacc: 0f 84 ba 00 00 00 je 10bb8c <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10bad2: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10bad5: 85 c9 test %ecx,%ecx
10bad7: 74 77 je 10bb50 <rtems_semaphore_create+0x120>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
10bad9: 31 c0 xor %eax,%eax
10badb: f6 c3 04 test $0x4,%bl
10bade: 0f 95 c0 setne %al
10bae1: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10bae4: 83 f9 10 cmp $0x10,%ecx
10bae7: 0f 84 ae 00 00 00 je 10bb9b <rtems_semaphore_create+0x16b>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
10baed: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10baf4: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10baf8: 50 push %eax
10baf9: 31 c0 xor %eax,%eax
10bafb: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10baff: 0f 94 c0 sete %al
10bb02: 50 push %eax
10bb03: 8d 45 d0 lea -0x30(%ebp),%eax
10bb06: 50 push %eax
10bb07: 8d 42 14 lea 0x14(%edx),%eax
10bb0a: 50 push %eax
10bb0b: 89 55 c4 mov %edx,-0x3c(%ebp)
10bb0e: e8 4d 0c 00 00 call 10c760 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
10bb13: 83 c4 10 add $0x10,%esp
10bb16: 83 f8 06 cmp $0x6,%eax
10bb19: 8b 55 c4 mov -0x3c(%ebp),%edx
10bb1c: 0f 84 a9 00 00 00 je 10bbcb <rtems_semaphore_create+0x19b><== NEVER TAKEN
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bb22: 8b 42 08 mov 0x8(%edx),%eax
10bb25: 0f b7 d8 movzwl %ax,%ebx
10bb28: 8b 0d 1c 94 12 00 mov 0x12941c,%ecx
10bb2e: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10bb31: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10bb34: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10bb36: e8 31 21 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bb3b: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bb3d: e9 25 ff ff ff jmp 10ba67 <rtems_semaphore_create+0x37>
10bb42: 66 90 xchg %ax,%ax
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10bb44: b8 09 00 00 00 mov $0x9,%eax
10bb49: e9 19 ff ff ff jmp 10ba67 <rtems_semaphore_create+0x37>
10bb4e: 66 90 xchg %ax,%ax
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10bb50: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
10bb57: 31 c0 xor %eax,%eax
10bb59: f6 c3 04 test $0x4,%bl
10bb5c: 0f 95 c0 setne %al
10bb5f: 89 45 e4 mov %eax,-0x1c(%ebp)
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10bb62: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10bb69: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10bb70: 51 push %ecx
10bb71: ff 75 0c pushl 0xc(%ebp)
10bb74: 8d 45 e0 lea -0x20(%ebp),%eax
10bb77: 50 push %eax
10bb78: 8d 42 14 lea 0x14(%edx),%eax
10bb7b: 50 push %eax
10bb7c: 89 55 c4 mov %edx,-0x3c(%ebp)
10bb7f: e8 80 0e 00 00 call 10ca04 <_CORE_semaphore_Initialize>
10bb84: 83 c4 10 add $0x10,%esp
10bb87: 8b 55 c4 mov -0x3c(%ebp),%edx
10bb8a: eb 96 jmp 10bb22 <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10bb8c: e8 db 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bb91: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
10bb96: e9 cc fe ff ff jmp 10ba67 <rtems_semaphore_create+0x37>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
10bb9b: 8b 45 14 mov 0x14(%ebp),%eax
10bb9e: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10bba1: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10bba8: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10bbac: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10bbb0: 0f 85 42 ff ff ff jne 10baf8 <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10bbb6: f6 c3 40 test $0x40,%bl
10bbb9: 74 30 je 10bbeb <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10bbbb: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10bbc2: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10bbc6: e9 2d ff ff ff jmp 10baf8 <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10bbcb: 83 ec 08 sub $0x8,%esp
10bbce: 52 push %edx
10bbcf: 68 00 94 12 00 push $0x129400
10bbd4: e8 ef 16 00 00 call 10d2c8 <_Objects_Free>
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
10bbd9: e8 8e 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bbde: b8 13 00 00 00 mov $0x13,%eax
return RTEMS_INVALID_PRIORITY;
10bbe3: 83 c4 10 add $0x10,%esp
10bbe6: e9 7c fe ff ff jmp 10ba67 <rtems_semaphore_create+0x37>
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
10bbeb: 84 db test %bl,%bl
10bbed: 0f 89 05 ff ff ff jns 10baf8 <rtems_semaphore_create+0xc8>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10bbf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10bbfa: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10bbfe: e9 f5 fe ff ff jmp 10baf8 <rtems_semaphore_create+0xc8>
0010bc04 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10bc04: 55 push %ebp
10bc05: 89 e5 mov %esp,%ebp
10bc07: 53 push %ebx
10bc08: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
10bc0b: 8d 45 f4 lea -0xc(%ebp),%eax
10bc0e: 50 push %eax
10bc0f: ff 75 08 pushl 0x8(%ebp)
10bc12: 68 00 94 12 00 push $0x129400
10bc17: e8 dc 17 00 00 call 10d3f8 <_Objects_Get>
10bc1c: 89 c3 mov %eax,%ebx
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10bc1e: 83 c4 10 add $0x10,%esp
10bc21: 8b 4d f4 mov -0xc(%ebp),%ecx
10bc24: 85 c9 test %ecx,%ecx
10bc26: 74 0c je 10bc34 <rtems_semaphore_delete+0x30>
10bc28: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bc2d: 8b 5d fc mov -0x4(%ebp),%ebx
10bc30: c9 leave
10bc31: c3 ret
10bc32: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10bc34: 8b 40 10 mov 0x10(%eax),%eax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10bc37: 83 e0 30 and $0x30,%eax
10bc3a: 74 58 je 10bc94 <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10bc3c: 8b 53 64 mov 0x64(%ebx),%edx
10bc3f: 85 d2 test %edx,%edx
10bc41: 75 15 jne 10bc58 <rtems_semaphore_delete+0x54>
10bc43: 83 f8 20 cmp $0x20,%eax
10bc46: 74 10 je 10bc58 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10bc48: e8 1f 20 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bc4d: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bc52: 8b 5d fc mov -0x4(%ebp),%ebx
10bc55: c9 leave
10bc56: c3 ret
10bc57: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10bc58: 50 push %eax
10bc59: 6a 04 push $0x4
10bc5b: 6a 00 push $0x0
10bc5d: 8d 43 14 lea 0x14(%ebx),%eax
10bc60: 50 push %eax
10bc61: e8 ee 0a 00 00 call 10c754 <_CORE_mutex_Flush>
10bc66: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10bc69: 83 ec 08 sub $0x8,%esp
10bc6c: 53 push %ebx
10bc6d: 68 00 94 12 00 push $0x129400
10bc72: e8 4d 13 00 00 call 10cfc4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10bc77: 58 pop %eax
10bc78: 5a pop %edx
10bc79: 53 push %ebx
10bc7a: 68 00 94 12 00 push $0x129400
10bc7f: e8 44 16 00 00 call 10d2c8 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10bc84: e8 e3 1f 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bc89: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bc8b: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bc8e: 8b 5d fc mov -0x4(%ebp),%ebx
10bc91: c9 leave
10bc92: c3 ret
10bc93: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10bc94: 51 push %ecx
10bc95: 6a 02 push $0x2
10bc97: 6a 00 push $0x0
10bc99: 8d 43 14 lea 0x14(%ebx),%eax
10bc9c: 50 push %eax
10bc9d: e8 56 0d 00 00 call 10c9f8 <_CORE_semaphore_Flush>
10bca2: 83 c4 10 add $0x10,%esp
10bca5: eb c2 jmp 10bc69 <rtems_semaphore_delete+0x65>
0010bca8 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10bca8: 55 push %ebp
10bca9: 89 e5 mov %esp,%ebp
10bcab: 57 push %edi
10bcac: 56 push %esi
10bcad: 53 push %ebx
10bcae: 83 ec 1c sub $0x1c,%esp
10bcb1: 8b 5d 08 mov 0x8(%ebp),%ebx
10bcb4: 8b 75 0c mov 0xc(%ebp),%esi
10bcb7: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
10bcba: 8d 45 e0 lea -0x20(%ebp),%eax
10bcbd: 50 push %eax
10bcbe: 8d 45 e4 lea -0x1c(%ebp),%eax
10bcc1: 50 push %eax
10bcc2: 53 push %ebx
10bcc3: 68 00 94 12 00 push $0x129400
10bcc8: e8 d3 16 00 00 call 10d3a0 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
10bccd: 83 c4 10 add $0x10,%esp
10bcd0: 8b 4d e4 mov -0x1c(%ebp),%ecx
10bcd3: 85 c9 test %ecx,%ecx
10bcd5: 74 0d je 10bce4 <rtems_semaphore_obtain+0x3c>
10bcd7: b8 04 00 00 00 mov $0x4,%eax
break;
}
return RTEMS_INVALID_ID;
}
10bcdc: 8d 65 f4 lea -0xc(%ebp),%esp
10bcdf: 5b pop %ebx
10bce0: 5e pop %esi
10bce1: 5f pop %edi
10bce2: c9 leave
10bce3: c3 ret
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10bce4: f6 40 10 30 testb $0x30,0x10(%eax)
10bce8: 74 36 je 10bd20 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10bcea: 83 ec 0c sub $0xc,%esp
10bced: ff 75 e0 pushl -0x20(%ebp)
10bcf0: 57 push %edi
10bcf1: 83 e6 01 and $0x1,%esi
10bcf4: 83 f6 01 xor $0x1,%esi
10bcf7: 56 push %esi
10bcf8: 53 push %ebx
10bcf9: 83 c0 14 add $0x14,%eax
10bcfc: 50 push %eax
10bcfd: e8 56 0b 00 00 call 10c858 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10bd02: 83 c4 14 add $0x14,%esp
10bd05: a1 78 95 12 00 mov 0x129578,%eax
10bd0a: ff 70 34 pushl 0x34(%eax)
10bd0d: e8 12 01 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code>
10bd12: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10bd15: 8d 65 f4 lea -0xc(%ebp),%esp
10bd18: 5b pop %ebx
10bd19: 5e pop %esi
10bd1a: 5f pop %edi
10bd1b: c9 leave
10bd1c: c3 ret
10bd1d: 8d 76 00 lea 0x0(%esi),%esi
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10bd20: 8b 15 78 95 12 00 mov 0x129578,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10bd26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10bd2d: 8b 48 5c mov 0x5c(%eax),%ecx
10bd30: 85 c9 test %ecx,%ecx
10bd32: 75 2c jne 10bd60 <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10bd34: 83 e6 01 and $0x1,%esi
10bd37: 74 33 je 10bd6c <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10bd39: ff 75 e0 pushl -0x20(%ebp)
10bd3c: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10bd3d: c7 42 34 01 00 00 00 movl $0x1,0x34(%edx)
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10bd44: 83 ec 0c sub $0xc,%esp
10bd47: a1 78 95 12 00 mov 0x129578,%eax
10bd4c: ff 70 34 pushl 0x34(%eax)
10bd4f: e8 e0 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code>
10bd54: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10bd57: 8d 65 f4 lea -0xc(%ebp),%esp
10bd5a: 5b pop %ebx
10bd5b: 5e pop %esi
10bd5c: 5f pop %edi
10bd5d: c9 leave
10bd5e: c3 ret
10bd5f: 90 nop
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
10bd60: 49 dec %ecx
10bd61: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10bd64: ff 75 e0 pushl -0x20(%ebp)
10bd67: 9d popf
10bd68: eb da jmp 10bd44 <rtems_semaphore_obtain+0x9c>
10bd6a: 66 90 xchg %ax,%ax
10bd6c: 8b 0d b8 94 12 00 mov 0x1294b8,%ecx
10bd72: 41 inc %ecx
10bd73: 89 0d b8 94 12 00 mov %ecx,0x1294b8
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;
10bd79: c7 40 44 01 00 00 00 movl $0x1,0x44(%eax)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
10bd80: 83 c0 14 add $0x14,%eax
10bd83: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10bd86: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10bd89: ff 75 e0 pushl -0x20(%ebp)
10bd8c: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10bd8d: 52 push %edx
10bd8e: 68 b4 e4 10 00 push $0x10e4b4
10bd93: 57 push %edi
10bd94: 50 push %eax
10bd95: e8 0a 24 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10bd9a: e8 cd 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
10bd9f: 83 c4 10 add $0x10,%esp
10bda2: eb a0 jmp 10bd44 <rtems_semaphore_obtain+0x9c>
0010bda4 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10bda4: 55 push %ebp
10bda5: 89 e5 mov %esp,%ebp
10bda7: 53 push %ebx
10bda8: 83 ec 18 sub $0x18,%esp
10bdab: 8b 5d 08 mov 0x8(%ebp),%ebx
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
10bdae: 8d 45 f4 lea -0xc(%ebp),%eax
10bdb1: 50 push %eax
10bdb2: 53 push %ebx
10bdb3: 68 00 94 12 00 push $0x129400
10bdb8: e8 3b 16 00 00 call 10d3f8 <_Objects_Get>
Objects_Locations location;
CORE_mutex_Status mutex_status;
CORE_semaphore_Status semaphore_status;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
10bdbd: 83 c4 10 add $0x10,%esp
10bdc0: 8b 55 f4 mov -0xc(%ebp),%edx
10bdc3: 85 d2 test %edx,%edx
10bdc5: 74 0d je 10bdd4 <rtems_semaphore_release+0x30>
10bdc7: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bdcc: 8b 5d fc mov -0x4(%ebp),%ebx
10bdcf: c9 leave
10bdd0: c3 ret
10bdd1: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10bdd4: f6 40 10 30 testb $0x30,0x10(%eax)
10bdd8: 75 26 jne 10be00 <rtems_semaphore_release+0x5c>
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
} else {
semaphore_status = _CORE_semaphore_Surrender(
10bdda: 52 push %edx
10bddb: 6a 00 push $0x0
10bddd: 53 push %ebx
10bdde: 83 c0 14 add $0x14,%eax
10bde1: 50 push %eax
10bde2: e8 5d 0c 00 00 call 10ca44 <_CORE_semaphore_Surrender>
10bde7: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10bde9: e8 7e 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
return
_Semaphore_Translate_core_semaphore_return_code( semaphore_status );
10bdee: 89 1c 24 mov %ebx,(%esp)
10bdf1: e8 3e 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code>
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
return
10bdf6: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bdf9: 8b 5d fc mov -0x4(%ebp),%ebx
10bdfc: c9 leave
10bdfd: c3 ret
10bdfe: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10be00: 51 push %ecx
10be01: 6a 00 push $0x0
10be03: 53 push %ebx
10be04: 83 c0 14 add $0x14,%eax
10be07: 50 push %eax
10be08: e8 eb 0a 00 00 call 10c8f8 <_CORE_mutex_Surrender>
10be0d: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10be0f: e8 58 1e 00 00 call 10dc6c <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10be14: 89 1c 24 mov %ebx,(%esp)
10be17: e8 08 00 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code>
10be1c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10be1f: 8b 5d fc mov -0x4(%ebp),%ebx
10be22: c9 leave
10be23: c3 ret
00118670 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
118670: 55 push %ebp
118671: 89 e5 mov %esp,%ebp
118673: 53 push %ebx
118674: 83 ec 14 sub $0x14,%esp
118677: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
11867a: 85 db test %ebx,%ebx
11867c: 75 0a jne 118688 <rtems_signal_send+0x18>
11867e: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118683: 8b 5d fc mov -0x4(%ebp),%ebx
118686: c9 leave
118687: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
118688: 83 ec 08 sub $0x8,%esp
11868b: 8d 45 f4 lea -0xc(%ebp),%eax
11868e: 50 push %eax
11868f: ff 75 08 pushl 0x8(%ebp)
118692: e8 75 3c 00 00 call 11c30c <_Thread_Get>
switch ( location ) {
118697: 83 c4 10 add $0x10,%esp
11869a: 8b 55 f4 mov -0xc(%ebp),%edx
11869d: 85 d2 test %edx,%edx
11869f: 74 0b je 1186ac <rtems_signal_send+0x3c>
1186a1: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1186a6: 8b 5d fc mov -0x4(%ebp),%ebx
1186a9: c9 leave
1186aa: c3 ret
1186ab: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
1186ac: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx
asr = &api->Signal;
1186b2: 8b 4a 0c mov 0xc(%edx),%ecx
1186b5: 85 c9 test %ecx,%ecx
1186b7: 74 43 je 1186fc <rtems_signal_send+0x8c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
1186b9: 80 7a 08 00 cmpb $0x0,0x8(%edx)
1186bd: 74 29 je 1186e8 <rtems_signal_send+0x78>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1186bf: 9c pushf
1186c0: fa cli
1186c1: 59 pop %ecx
*signal_set |= signals;
1186c2: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
1186c5: 51 push %ecx
1186c6: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
1186c7: c6 40 74 01 movb $0x1,0x74(%eax)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
1186cb: 8b 15 94 41 14 00 mov 0x144194,%edx
1186d1: 85 d2 test %edx,%edx
1186d3: 74 1b je 1186f0 <rtems_signal_send+0x80>
1186d5: 3b 05 b8 41 14 00 cmp 0x1441b8,%eax
1186db: 75 13 jne 1186f0 <rtems_signal_send+0x80><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
1186dd: c6 05 68 42 14 00 01 movb $0x1,0x144268
1186e4: eb 0a jmp 1186f0 <rtems_signal_send+0x80>
1186e6: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
1186e8: 9c pushf
1186e9: fa cli
1186ea: 58 pop %eax
*signal_set |= signals;
1186eb: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
1186ee: 50 push %eax
1186ef: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
1186f0: e8 c7 3b 00 00 call 11c2bc <_Thread_Enable_dispatch>
1186f5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1186f7: 8b 5d fc mov -0x4(%ebp),%ebx
1186fa: c9 leave
1186fb: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1186fc: e8 bb 3b 00 00 call 11c2bc <_Thread_Enable_dispatch>
118701: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_NOT_DEFINED;
118706: e9 78 ff ff ff jmp 118683 <rtems_signal_send+0x13>
0010be44 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10be44: 55 push %ebp
10be45: 89 e5 mov %esp,%ebp
10be47: 57 push %edi
10be48: 56 push %esi
10be49: 53 push %ebx
10be4a: 83 ec 1c sub $0x1c,%esp
10be4d: 8b 5d 08 mov 0x8(%ebp),%ebx
10be50: 8b 4d 0c mov 0xc(%ebp),%ecx
10be53: 8b 7d 18 mov 0x18(%ebp),%edi
10be56: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10be59: 85 f6 test %esi,%esi
10be5b: 0f 84 37 01 00 00 je 10bf98 <rtems_task_create+0x154>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10be61: 85 db test %ebx,%ebx
10be63: 0f 84 cb 00 00 00 je 10bf34 <rtems_task_create+0xf0>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10be69: 66 85 ff test %di,%di
10be6c: 78 1d js 10be8b <rtems_task_create+0x47>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10be6e: 85 c9 test %ecx,%ecx
10be70: 75 0e jne 10be80 <rtems_task_create+0x3c>
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
10be72: b8 13 00 00 00 mov $0x13,%eax
}
10be77: 8d 65 f4 lea -0xc(%ebp),%esp
10be7a: 5b pop %ebx
10be7b: 5e pop %esi
10be7c: 5f pop %edi
10be7d: c9 leave
10be7e: c3 ret
10be7f: 90 nop
10be80: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax
10be87: 39 c1 cmp %eax,%ecx
10be89: 77 e7 ja 10be72 <rtems_task_create+0x2e>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10be8b: 83 ec 0c sub $0xc,%esp
10be8e: ff 35 70 95 12 00 pushl 0x129570
10be94: 89 4d e4 mov %ecx,-0x1c(%ebp)
10be97: e8 ac 06 00 00 call 10c548 <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
10be9c: c7 04 24 40 94 12 00 movl $0x129440,(%esp)
10bea3: e8 a0 10 00 00 call 10cf48 <_Objects_Allocate>
10bea8: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10beaa: 83 c4 10 add $0x10,%esp
10bead: 85 c0 test %eax,%eax
10beaf: 8b 4d e4 mov -0x1c(%ebp),%ecx
10beb2: 0f 84 c0 00 00 00 je 10bf78 <rtems_task_create+0x134>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10beb8: 50 push %eax
10beb9: 53 push %ebx
10beba: 8b 45 14 mov 0x14(%ebp),%eax
10bebd: 83 e0 01 and $0x1,%eax
10bec0: 50 push %eax
10bec1: 6a 00 push $0x0
10bec3: 8b 45 14 mov 0x14(%ebp),%eax
10bec6: c1 e8 09 shr $0x9,%eax
10bec9: 83 e0 01 and $0x1,%eax
10becc: 50 push %eax
10becd: 8b 45 14 mov 0x14(%ebp),%eax
10bed0: c1 e8 08 shr $0x8,%eax
10bed3: 83 f0 01 xor $0x1,%eax
10bed6: 83 e0 01 and $0x1,%eax
10bed9: 50 push %eax
10beda: 51 push %ecx
10bedb: 83 e7 01 and $0x1,%edi
10bede: 57 push %edi
10bedf: ff 75 10 pushl 0x10(%ebp)
10bee2: 6a 00 push $0x0
10bee4: 52 push %edx
10bee5: 68 40 94 12 00 push $0x129440
10beea: 89 55 e4 mov %edx,-0x1c(%ebp)
10beed: e8 16 1e 00 00 call 10dd08 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10bef2: 83 c4 30 add $0x30,%esp
10bef5: 84 c0 test %al,%al
10bef7: 8b 55 e4 mov -0x1c(%ebp),%edx
10befa: 74 48 je 10bf44 <rtems_task_create+0x100>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
10befc: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx
10bf02: 8b 45 14 mov 0x14(%ebp),%eax
10bf05: c1 e8 0a shr $0xa,%eax
10bf08: 83 f0 01 xor $0x1,%eax
10bf0b: 83 e0 01 and $0x1,%eax
10bf0e: 88 41 08 mov %al,0x8(%ecx)
*id = the_thread->Object.id;
10bf11: 8b 42 08 mov 0x8(%edx),%eax
10bf14: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10bf16: 83 ec 0c sub $0xc,%esp
10bf19: ff 35 70 95 12 00 pushl 0x129570
10bf1f: e8 6c 06 00 00 call 10c590 <_API_Mutex_Unlock>
10bf24: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10bf26: 83 c4 10 add $0x10,%esp
}
10bf29: 8d 65 f4 lea -0xc(%ebp),%esp
10bf2c: 5b pop %ebx
10bf2d: 5e pop %esi
10bf2e: 5f pop %edi
10bf2f: c9 leave
10bf30: c3 ret
10bf31: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10bf34: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bf39: 8d 65 f4 lea -0xc(%ebp),%esp
10bf3c: 5b pop %ebx
10bf3d: 5e pop %esi
10bf3e: 5f pop %edi
10bf3f: c9 leave
10bf40: c3 ret
10bf41: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10bf44: 83 ec 0c sub $0xc,%esp
10bf47: ff 72 08 pushl 0x8(%edx)
10bf4a: e8 e9 13 00 00 call 10d338 <_Objects_Get_information_id>
10bf4f: 5a pop %edx
10bf50: 59 pop %ecx
10bf51: 8b 55 e4 mov -0x1c(%ebp),%edx
10bf54: 52 push %edx
10bf55: 50 push %eax
10bf56: e8 6d 13 00 00 call 10d2c8 <_Objects_Free>
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10bf5b: 58 pop %eax
10bf5c: ff 35 70 95 12 00 pushl 0x129570
10bf62: e8 29 06 00 00 call 10c590 <_API_Mutex_Unlock>
10bf67: b8 0d 00 00 00 mov $0xd,%eax
return RTEMS_UNSATISFIED;
10bf6c: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp
10bf72: 5b pop %ebx
10bf73: 5e pop %esi
10bf74: 5f pop %edi
10bf75: c9 leave
10bf76: c3 ret
10bf77: 90 nop
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10bf78: 83 ec 0c sub $0xc,%esp
10bf7b: ff 35 70 95 12 00 pushl 0x129570
10bf81: e8 0a 06 00 00 call 10c590 <_API_Mutex_Unlock>
10bf86: b8 05 00 00 00 mov $0x5,%eax
return RTEMS_TOO_MANY;
10bf8b: 83 c4 10 add $0x10,%esp
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10bf8e: 8d 65 f4 lea -0xc(%ebp),%esp
10bf91: 5b pop %ebx
10bf92: 5e pop %esi
10bf93: 5f pop %edi
10bf94: c9 leave
10bf95: c3 ret
10bf96: 66 90 xchg %ax,%ax
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10bf98: b8 09 00 00 00 mov $0x9,%eax
10bf9d: e9 d5 fe ff ff jmp 10be77 <rtems_task_create+0x33>
0010bfa4 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10bfa4: 55 push %ebp
10bfa5: 89 e5 mov %esp,%ebp
10bfa7: 53 push %ebx
10bfa8: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10bfab: ff 35 70 95 12 00 pushl 0x129570
10bfb1: e8 92 05 00 00 call 10c548 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10bfb6: 5a pop %edx
10bfb7: 59 pop %ecx
10bfb8: 8d 45 f4 lea -0xc(%ebp),%eax
10bfbb: 50 push %eax
10bfbc: ff 75 08 pushl 0x8(%ebp)
10bfbf: e8 cc 1c 00 00 call 10dc90 <_Thread_Get>
10bfc4: 89 c3 mov %eax,%ebx
switch ( location ) {
10bfc6: 83 c4 10 add $0x10,%esp
10bfc9: 8b 45 f4 mov -0xc(%ebp),%eax
10bfcc: 85 c0 test %eax,%eax
10bfce: 75 44 jne 10c014 <rtems_task_delete+0x70>
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10bfd0: 83 ec 0c sub $0xc,%esp
10bfd3: ff 73 08 pushl 0x8(%ebx)
10bfd6: e8 5d 13 00 00 call 10d338 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10bfdb: 5a pop %edx
10bfdc: 59 pop %ecx
10bfdd: 53 push %ebx
10bfde: 50 push %eax
10bfdf: e8 74 19 00 00 call 10d958 <_Thread_Close>
10bfe4: 58 pop %eax
10bfe5: ff 73 08 pushl 0x8(%ebx)
10bfe8: e8 4b 13 00 00 call 10d338 <_Objects_Get_information_id>
10bfed: 5a pop %edx
10bfee: 59 pop %ecx
10bfef: 53 push %ebx
10bff0: 50 push %eax
10bff1: e8 d2 12 00 00 call 10d2c8 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10bff6: 58 pop %eax
10bff7: ff 35 70 95 12 00 pushl 0x129570
10bffd: e8 8e 05 00 00 call 10c590 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10c002: e8 65 1c 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c007: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c009: 83 c4 10 add $0x10,%esp
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10c00c: 8b 5d fc mov -0x4(%ebp),%ebx
10c00f: c9 leave
10c010: c3 ret
10c011: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10c014: 83 ec 0c sub $0xc,%esp
10c017: ff 35 70 95 12 00 pushl 0x129570
10c01d: e8 6e 05 00 00 call 10c590 <_API_Mutex_Unlock>
10c022: b8 04 00 00 00 mov $0x4,%eax
return RTEMS_INVALID_ID;
10c027: 83 c4 10 add $0x10,%esp
}
10c02a: 8b 5d fc mov -0x4(%ebp),%ebx
10c02d: c9 leave
10c02e: c3 ret
0010dac0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10dac0: 55 push %ebp
10dac1: 89 e5 mov %esp,%ebp
10dac3: 56 push %esi
10dac4: 53 push %ebx
10dac5: 83 ec 10 sub $0x10,%esp
10dac8: 8b 45 08 mov 0x8(%ebp),%eax
10dacb: 8b 75 0c mov 0xc(%ebp),%esi
10dace: 8b 5d 10 mov 0x10(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dad1: 80 3d 44 8c 12 00 00 cmpb $0x0,0x128c44
10dad8: 74 6e je 10db48 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10dada: 85 db test %ebx,%ebx
10dadc: 74 7e je 10db5c <rtems_task_get_note+0x9c>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10dade: 83 fe 0f cmp $0xf,%esi
10dae1: 77 3d ja 10db20 <rtems_task_get_note+0x60>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dae3: 85 c0 test %eax,%eax
10dae5: 74 45 je 10db2c <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10dae7: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10daed: 3b 42 08 cmp 0x8(%edx),%eax
10daf0: 74 40 je 10db32 <rtems_task_get_note+0x72>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10daf2: 83 ec 08 sub $0x8,%esp
10daf5: 8d 55 f4 lea -0xc(%ebp),%edx
10daf8: 52 push %edx
10daf9: 50 push %eax
10dafa: e8 b5 1f 00 00 call 10fab4 <_Thread_Get>
switch ( location ) {
10daff: 83 c4 10 add $0x10,%esp
10db02: 8b 55 f4 mov -0xc(%ebp),%edx
10db05: 85 d2 test %edx,%edx
10db07: 75 4b jne 10db54 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10db09: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10db0f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10db13: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10db15: e8 76 1f 00 00 call 10fa90 <_Thread_Enable_dispatch>
10db1a: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10db1c: eb 07 jmp 10db25 <rtems_task_get_note+0x65>
10db1e: 66 90 xchg %ax,%ax
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10db20: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db25: 8d 65 f8 lea -0x8(%ebp),%esp
10db28: 5b pop %ebx
10db29: 5e pop %esi
10db2a: c9 leave
10db2b: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10db2c: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10db32: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10db38: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10db3c: 89 03 mov %eax,(%ebx)
10db3e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db40: 8d 65 f8 lea -0x8(%ebp),%esp
10db43: 5b pop %ebx
10db44: 5e pop %esi
10db45: c9 leave
10db46: c3 ret
10db47: 90 nop
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10db48: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10db4d: 8d 65 f8 lea -0x8(%ebp),%esp
10db50: 5b pop %ebx
10db51: 5e pop %esi
10db52: c9 leave
10db53: c3 ret
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10db54: b8 04 00 00 00 mov $0x4,%eax
10db59: eb ca jmp 10db25 <rtems_task_get_note+0x65>
10db5b: 90 nop
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
10db5c: b8 09 00 00 00 mov $0x9,%eax
10db61: eb c2 jmp 10db25 <rtems_task_get_note+0x65>
00118a54 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
118a54: 55 push %ebp
118a55: 89 e5 mov %esp,%ebp
118a57: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118a5a: 8d 45 f4 lea -0xc(%ebp),%eax
118a5d: 50 push %eax
118a5e: ff 75 08 pushl 0x8(%ebp)
118a61: e8 a6 38 00 00 call 11c30c <_Thread_Get>
switch ( location ) {
118a66: 83 c4 10 add $0x10,%esp
118a69: 8b 55 f4 mov -0xc(%ebp),%edx
118a6c: 85 d2 test %edx,%edx
118a6e: 74 08 je 118a78 <rtems_task_is_suspended+0x24>
118a70: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a75: c9 leave
118a76: c3 ret
118a77: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
118a78: f6 40 10 02 testb $0x2,0x10(%eax)
118a7c: 74 0e je 118a8c <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
118a7e: e8 39 38 00 00 call 11c2bc <_Thread_Enable_dispatch>
118a83: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a88: c9 leave
118a89: c3 ret
118a8a: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
118a8c: e8 2b 38 00 00 call 11c2bc <_Thread_Enable_dispatch>
118a91: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118a93: c9 leave
118a94: c3 ret
00114b24 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
114b24: 55 push %ebp
114b25: 89 e5 mov %esp,%ebp
114b27: 57 push %edi
114b28: 56 push %esi
114b29: 53 push %ebx
114b2a: 83 ec 1c sub $0x1c,%esp
114b2d: 8b 4d 10 mov 0x10(%ebp),%ecx
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
114b30: 85 c9 test %ecx,%ecx
114b32: 0f 84 1c 01 00 00 je 114c54 <rtems_task_mode+0x130>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
114b38: 8b 1d 78 95 12 00 mov 0x129578,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
114b3e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
114b44: 80 7b 75 01 cmpb $0x1,0x75(%ebx)
114b48: 19 f6 sbb %esi,%esi
114b4a: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
114b50: 8b 53 7c mov 0x7c(%ebx),%edx
114b53: 85 d2 test %edx,%edx
114b55: 0f 85 b5 00 00 00 jne 114c10 <rtems_task_mode+0xec>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
114b5b: 80 7f 08 01 cmpb $0x1,0x8(%edi)
114b5f: 19 d2 sbb %edx,%edx
114b61: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
114b67: 89 55 e4 mov %edx,-0x1c(%ebp)
114b6a: 89 4d e0 mov %ecx,-0x20(%ebp)
114b6d: e8 1a a5 ff ff call 10f08c <_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;
114b72: 8b 55 e4 mov -0x1c(%ebp),%edx
114b75: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
114b77: 09 f0 or %esi,%eax
114b79: 8b 4d e0 mov -0x20(%ebp),%ecx
114b7c: 89 01 mov %eax,(%ecx)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
114b7e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
114b85: 74 0f je 114b96 <rtems_task_mode+0x72>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
114b87: 8b 45 08 mov 0x8(%ebp),%eax
114b8a: c1 e8 08 shr $0x8,%eax
114b8d: 83 f0 01 xor $0x1,%eax
114b90: 83 e0 01 and $0x1,%eax
114b93: 88 43 75 mov %al,0x75(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
114b96: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
114b9d: 74 18 je 114bb7 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
114b9f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
114ba6: 74 74 je 114c1c <rtems_task_mode+0xf8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
114ba8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
114baf: a1 84 94 12 00 mov 0x129484,%eax
114bb4: 89 43 78 mov %eax,0x78(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
114bb7: f6 45 0c 01 testb $0x1,0xc(%ebp)
114bbb: 74 07 je 114bc4 <rtems_task_mode+0xa0>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
114bbd: f6 45 08 01 testb $0x1,0x8(%ebp)
114bc1: 74 69 je 114c2c <rtems_task_mode+0x108>
114bc3: fa cli
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
114bc4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
114bcb: 74 2c je 114bf9 <rtems_task_mode+0xd5>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
114bcd: 8b 45 08 mov 0x8(%ebp),%eax
114bd0: c1 e8 0a shr $0xa,%eax
114bd3: 83 f0 01 xor $0x1,%eax
114bd6: 83 e0 01 and $0x1,%eax
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
114bd9: 38 47 08 cmp %al,0x8(%edi)
114bdc: 74 1b je 114bf9 <rtems_task_mode+0xd5>
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
114bde: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
114be1: 9c pushf
114be2: fa cli
114be3: 58 pop %eax
_signals = information->signals_pending;
114be4: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
114be7: 8b 4f 14 mov 0x14(%edi),%ecx
114bea: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
114bed: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
114bf0: 50 push %eax
114bf1: 9d popf
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
114bf2: 8b 47 14 mov 0x14(%edi),%eax
114bf5: 85 c0 test %eax,%eax
114bf7: 75 53 jne 114c4c <rtems_task_mode+0x128>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
114bf9: 31 db xor %ebx,%ebx
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
114bfb: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680
114c02: 74 2c je 114c30 <rtems_task_mode+0x10c> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
114c04: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
114c06: 83 c4 1c add $0x1c,%esp
114c09: 5b pop %ebx
114c0a: 5e pop %esi
114c0b: 5f pop %edi
114c0c: c9 leave
114c0d: c3 ret
114c0e: 66 90 xchg %ax,%ax
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;
114c10: 81 ce 00 02 00 00 or $0x200,%esi
114c16: e9 40 ff ff ff jmp 114b5b <rtems_task_mode+0x37>
114c1b: 90 nop
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
114c1c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
114c23: f6 45 0c 01 testb $0x1,0xc(%ebp)
114c27: 74 9b je 114bc4 <rtems_task_mode+0xa0>
114c29: eb 92 jmp 114bbd <rtems_task_mode+0x99>
114c2b: 90 nop
114c2c: fb sti
114c2d: eb 95 jmp 114bc4 <rtems_task_mode+0xa0>
114c2f: 90 nop
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
114c30: e8 bf 01 00 00 call 114df4 <_Thread_Evaluate_mode>
114c35: 84 c0 test %al,%al
114c37: 75 04 jne 114c3d <rtems_task_mode+0x119>
114c39: 84 db test %bl,%bl
114c3b: 74 c7 je 114c04 <rtems_task_mode+0xe0>
_Thread_Dispatch();
114c3d: e8 ce 8e ff ff call 10db10 <_Thread_Dispatch>
114c42: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
114c44: 83 c4 1c add $0x1c,%esp
114c47: 5b pop %ebx
114c48: 5e pop %esi
114c49: 5f pop %edi
114c4a: c9 leave
114c4b: c3 ret
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
114c4c: c6 43 74 01 movb $0x1,0x74(%ebx)
114c50: b3 01 mov $0x1,%bl
114c52: eb a7 jmp 114bfb <rtems_task_mode+0xd7>
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
114c54: b8 09 00 00 00 mov $0x9,%eax
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
114c59: 83 c4 1c add $0x1c,%esp
114c5c: 5b pop %ebx
114c5d: 5e pop %esi
114c5e: 5f pop %edi
114c5f: c9 leave
114c60: c3 ret
0010f2f0 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10f2f0: 55 push %ebp
10f2f1: 89 e5 mov %esp,%ebp
10f2f3: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10f2f6: 8d 45 f4 lea -0xc(%ebp),%eax
10f2f9: 50 push %eax
10f2fa: ff 75 08 pushl 0x8(%ebp)
10f2fd: e8 12 1d 00 00 call 111014 <_Thread_Get>
switch ( location ) {
10f302: 83 c4 10 add $0x10,%esp
10f305: 8b 55 f4 mov -0xc(%ebp),%edx
10f308: 85 d2 test %edx,%edx
10f30a: 74 08 je 10f314 <rtems_task_resume+0x24>
10f30c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f311: c9 leave
10f312: c3 ret
10f313: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10f314: f6 40 10 02 testb $0x2,0x10(%eax)
10f318: 75 0e jne 10f328 <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10f31a: e8 a5 1c 00 00 call 110fc4 <_Thread_Enable_dispatch>
10f31f: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f324: c9 leave
10f325: c3 ret
10f326: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10f328: 83 ec 08 sub $0x8,%esp
10f32b: 6a 01 push $0x1
10f32d: 50 push %eax
10f32e: e8 3d 25 00 00 call 111870 <_Thread_Resume>
_Thread_Enable_dispatch();
10f333: e8 8c 1c 00 00 call 110fc4 <_Thread_Enable_dispatch>
10f338: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10f33a: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10f33d: c9 leave
10f33e: c3 ret
0010dc38 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10dc38: 55 push %ebp
10dc39: 89 e5 mov %esp,%ebp
10dc3b: 56 push %esi
10dc3c: 53 push %ebx
10dc3d: 83 ec 10 sub $0x10,%esp
10dc40: 8b 45 08 mov 0x8(%ebp),%eax
10dc43: 8b 5d 0c mov 0xc(%ebp),%ebx
10dc46: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dc49: 80 3d 44 8c 12 00 00 cmpb $0x0,0x128c44
10dc50: 74 66 je 10dcb8 <rtems_task_set_note+0x80>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10dc52: 83 fb 0f cmp $0xf,%ebx
10dc55: 77 39 ja 10dc90 <rtems_task_set_note+0x58>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dc57: 85 c0 test %eax,%eax
10dc59: 74 41 je 10dc9c <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10dc5b: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dc61: 3b 42 08 cmp 0x8(%edx),%eax
10dc64: 74 3c je 10dca2 <rtems_task_set_note+0x6a>
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
10dc66: 83 ec 08 sub $0x8,%esp
10dc69: 8d 55 f4 lea -0xc(%ebp),%edx
10dc6c: 52 push %edx
10dc6d: 50 push %eax
10dc6e: e8 41 1e 00 00 call 10fab4 <_Thread_Get>
switch ( location ) {
10dc73: 83 c4 10 add $0x10,%esp
10dc76: 8b 55 f4 mov -0xc(%ebp),%edx
10dc79: 85 d2 test %edx,%edx
10dc7b: 75 47 jne 10dcc4 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10dc7d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
10dc83: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10dc87: e8 04 1e 00 00 call 10fa90 <_Thread_Enable_dispatch>
10dc8c: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10dc8e: eb 05 jmp 10dc95 <rtems_task_set_note+0x5d>
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
10dc90: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dc95: 8d 65 f8 lea -0x8(%ebp),%esp
10dc98: 5b pop %ebx
10dc99: 5e pop %esi
10dc9a: c9 leave
10dc9b: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10dc9c: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10dca2: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax
10dca8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
10dcac: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcae: 8d 65 f8 lea -0x8(%ebp),%esp
10dcb1: 5b pop %ebx
10dcb2: 5e pop %esi
10dcb3: c9 leave
10dcb4: c3 ret
10dcb5: 8d 76 00 lea 0x0(%esi),%esi
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
10dcb8: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcbd: 8d 65 f8 lea -0x8(%ebp),%esp
10dcc0: 5b pop %ebx
10dcc1: 5e pop %esi
10dcc2: c9 leave
10dcc3: c3 ret
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10dcc4: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcc9: 8d 65 f8 lea -0x8(%ebp),%esp
10dccc: 5b pop %ebx
10dccd: 5e pop %esi
10dcce: c9 leave
10dccf: c3 ret
0010ffac <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10ffac: 55 push %ebp
10ffad: 89 e5 mov %esp,%ebp
10ffaf: 56 push %esi
10ffb0: 53 push %ebx
10ffb1: 83 ec 10 sub $0x10,%esp
10ffb4: 8b 5d 0c mov 0xc(%ebp),%ebx
10ffb7: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10ffba: 85 db test %ebx,%ebx
10ffbc: 74 0b je 10ffc9 <rtems_task_set_priority+0x1d>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10ffbe: 0f b6 05 14 82 12 00 movzbl 0x128214,%eax
10ffc5: 39 c3 cmp %eax,%ebx
10ffc7: 77 5f ja 110028 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10ffc9: 85 f6 test %esi,%esi
10ffcb: 74 67 je 110034 <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10ffcd: 83 ec 08 sub $0x8,%esp
10ffd0: 8d 45 f4 lea -0xc(%ebp),%eax
10ffd3: 50 push %eax
10ffd4: ff 75 08 pushl 0x8(%ebp)
10ffd7: e8 68 1e 00 00 call 111e44 <_Thread_Get>
switch ( location ) {
10ffdc: 83 c4 10 add $0x10,%esp
10ffdf: 8b 55 f4 mov -0xc(%ebp),%edx
10ffe2: 85 d2 test %edx,%edx
10ffe4: 75 36 jne 11001c <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10ffe6: 8b 50 14 mov 0x14(%eax),%edx
10ffe9: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10ffeb: 85 db test %ebx,%ebx
10ffed: 74 1c je 11000b <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
10ffef: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10fff2: 8b 48 1c mov 0x1c(%eax),%ecx
10fff5: 85 c9 test %ecx,%ecx
10fff7: 74 05 je 10fffe <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
10fff9: 3b 58 14 cmp 0x14(%eax),%ebx
10fffc: 73 0d jae 11000b <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
10fffe: 52 push %edx
10ffff: 6a 00 push $0x0
110001: 53 push %ebx
110002: 50 push %eax
110003: e8 04 19 00 00 call 11190c <_Thread_Change_priority>
110008: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
11000b: e8 e4 1d 00 00 call 111df4 <_Thread_Enable_dispatch>
110010: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110012: 8d 65 f8 lea -0x8(%ebp),%esp
110015: 5b pop %ebx
110016: 5e pop %esi
110017: c9 leave
110018: c3 ret
110019: 8d 76 00 lea 0x0(%esi),%esi
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
11001c: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110021: 8d 65 f8 lea -0x8(%ebp),%esp
110024: 5b pop %ebx
110025: 5e pop %esi
110026: c9 leave
110027: c3 ret
110028: b8 13 00 00 00 mov $0x13,%eax
11002d: 8d 65 f8 lea -0x8(%ebp),%esp
110030: 5b pop %ebx
110031: 5e pop %esi
110032: c9 leave
110033: c3 ret
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
110034: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
110039: 8d 65 f8 lea -0x8(%ebp),%esp
11003c: 5b pop %ebx
11003d: 5e pop %esi
11003e: c9 leave
11003f: c3 ret
0010c0e8 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10c0e8: 55 push %ebp
10c0e9: 89 e5 mov %esp,%ebp
10c0eb: 53 push %ebx
10c0ec: 83 ec 14 sub $0x14,%esp
10c0ef: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10c0f2: 85 db test %ebx,%ebx
10c0f4: 74 4e je 10c144 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10c0f6: 83 ec 08 sub $0x8,%esp
10c0f9: 8d 45 f4 lea -0xc(%ebp),%eax
10c0fc: 50 push %eax
10c0fd: ff 75 08 pushl 0x8(%ebp)
10c100: e8 8b 1b 00 00 call 10dc90 <_Thread_Get>
switch ( location ) {
10c105: 83 c4 10 add $0x10,%esp
10c108: 8b 55 f4 mov -0xc(%ebp),%edx
10c10b: 85 d2 test %edx,%edx
10c10d: 75 29 jne 10c138 <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10c10f: 83 ec 0c sub $0xc,%esp
10c112: ff 75 10 pushl 0x10(%ebp)
10c115: 6a 00 push $0x0
10c117: 53 push %ebx
10c118: 6a 00 push $0x0
10c11a: 50 push %eax
10c11b: e8 84 26 00 00 call 10e7a4 <_Thread_Start>
10c120: 83 c4 20 add $0x20,%esp
10c123: 84 c0 test %al,%al
10c125: 75 29 jne 10c150 <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10c127: e8 40 1b 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c12c: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c131: 8b 5d fc mov -0x4(%ebp),%ebx
10c134: c9 leave
10c135: c3 ret
10c136: 66 90 xchg %ax,%ax
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
10c138: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c13d: 8b 5d fc mov -0x4(%ebp),%ebx
10c140: c9 leave
10c141: c3 ret
10c142: 66 90 xchg %ax,%ax
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10c144: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c149: 8b 5d fc mov -0x4(%ebp),%ebx
10c14c: c9 leave
10c14d: c3 ret
10c14e: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10c150: e8 17 1b 00 00 call 10dc6c <_Thread_Enable_dispatch>
10c155: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c157: 8b 5d fc mov -0x4(%ebp),%ebx
10c15a: c9 leave
10c15b: c3 ret
00111e48 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
111e48: 55 push %ebp
111e49: 89 e5 mov %esp,%ebp
111e4b: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
111e4e: 8d 45 f4 lea -0xc(%ebp),%eax
111e51: 50 push %eax
111e52: ff 75 08 pushl 0x8(%ebp)
111e55: e8 36 be ff ff call 10dc90 <_Thread_Get>
switch ( location ) {
111e5a: 83 c4 10 add $0x10,%esp
111e5d: 8b 55 f4 mov -0xc(%ebp),%edx
111e60: 85 d2 test %edx,%edx
111e62: 74 08 je 111e6c <rtems_task_suspend+0x24>
111e64: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111e69: c9 leave
111e6a: c3 ret
111e6b: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
111e6c: f6 40 10 02 testb $0x2,0x10(%eax)
111e70: 74 0e je 111e80 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
111e72: e8 f5 bd ff ff call 10dc6c <_Thread_Enable_dispatch>
111e77: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111e7c: c9 leave
111e7d: c3 ret
111e7e: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
111e80: 83 ec 0c sub $0xc,%esp
111e83: 50 push %eax
111e84: e8 d3 0a 00 00 call 11295c <_Thread_Suspend>
_Thread_Enable_dispatch();
111e89: e8 de bd ff ff call 10dc6c <_Thread_Enable_dispatch>
111e8e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
111e90: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111e93: c9 leave
111e94: c3 ret
0010c9c8 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10c9c8: 55 push %ebp
10c9c9: 89 e5 mov %esp,%ebp
10c9cb: 57 push %edi
10c9cc: 56 push %esi
10c9cd: 53 push %ebx
10c9ce: 83 ec 1c sub $0x1c,%esp
10c9d1: 8b 5d 0c mov 0xc(%ebp),%ebx
10c9d4: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10c9d7: 85 db test %ebx,%ebx
10c9d9: 0f 84 9d 00 00 00 je 10ca7c <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c9df: 83 ec 08 sub $0x8,%esp
10c9e2: 8d 45 e4 lea -0x1c(%ebp),%eax
10c9e5: 50 push %eax
10c9e6: ff 75 08 pushl 0x8(%ebp)
10c9e9: e8 26 1d 00 00 call 10e714 <_Thread_Get>
10c9ee: 89 c6 mov %eax,%esi
switch (location) {
10c9f0: 83 c4 10 add $0x10,%esp
10c9f3: 8b 45 e4 mov -0x1c(%ebp),%eax
10c9f6: 85 c0 test %eax,%eax
10c9f8: 74 0e je 10ca08 <rtems_task_variable_add+0x40>
10c9fa: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c9ff: 8d 65 f4 lea -0xc(%ebp),%esp
10ca02: 5b pop %ebx
10ca03: 5e pop %esi
10ca04: 5f pop %edi
10ca05: c9 leave
10ca06: c3 ret
10ca07: 90 nop
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10ca08: 8b 86 04 01 00 00 mov 0x104(%esi),%eax
while (tvp) {
10ca0e: 85 c0 test %eax,%eax
10ca10: 75 44 jne 10ca56 <rtems_task_variable_add+0x8e>
10ca12: 66 90 xchg %ax,%ax
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
10ca14: 83 ec 0c sub $0xc,%esp
10ca17: 6a 14 push $0x14
10ca19: e8 82 2e 00 00 call 10f8a0 <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
10ca1e: 83 c4 10 add $0x10,%esp
10ca21: 85 c0 test %eax,%eax
10ca23: 74 4b je 10ca70 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10ca25: 8b 13 mov (%ebx),%edx
10ca27: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
10ca2a: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
10ca2d: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10ca30: 8b 96 04 01 00 00 mov 0x104(%esi),%edx
10ca36: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
10ca38: 89 86 04 01 00 00 mov %eax,0x104(%esi)
_Thread_Enable_dispatch();
10ca3e: e8 ad 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10ca43: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ca45: 8d 65 f4 lea -0xc(%ebp),%esp
10ca48: 5b pop %ebx
10ca49: 5e pop %esi
10ca4a: 5f pop %edi
10ca4b: c9 leave
10ca4c: c3 ret
10ca4d: 8d 76 00 lea 0x0(%esi),%esi
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10ca50: 8b 00 mov (%eax),%eax
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
10ca52: 85 c0 test %eax,%eax
10ca54: 74 be je 10ca14 <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
10ca56: 39 58 04 cmp %ebx,0x4(%eax)
10ca59: 75 f5 jne 10ca50 <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
10ca5b: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
10ca5e: e8 8d 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10ca63: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ca65: 8d 65 f4 lea -0xc(%ebp),%esp
10ca68: 5b pop %ebx
10ca69: 5e pop %esi
10ca6a: 5f pop %edi
10ca6b: c9 leave
10ca6c: c3 ret
10ca6d: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10ca70: e8 7b 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10ca75: b8 1a 00 00 00 mov $0x1a,%eax
return RTEMS_NO_MEMORY;
10ca7a: eb 83 jmp 10c9ff <rtems_task_variable_add+0x37>
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10ca7c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ca81: 8d 65 f4 lea -0xc(%ebp),%esp
10ca84: 5b pop %ebx
10ca85: 5e pop %esi
10ca86: 5f pop %edi
10ca87: c9 leave
10ca88: c3 ret
0010ca8c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10ca8c: 55 push %ebp
10ca8d: 89 e5 mov %esp,%ebp
10ca8f: 53 push %ebx
10ca90: 83 ec 14 sub $0x14,%esp
10ca93: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10ca96: 85 db test %ebx,%ebx
10ca98: 74 4c je 10cae6 <rtems_task_variable_delete+0x5a>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10ca9a: 83 ec 08 sub $0x8,%esp
10ca9d: 8d 45 f4 lea -0xc(%ebp),%eax
10caa0: 50 push %eax
10caa1: ff 75 08 pushl 0x8(%ebp)
10caa4: e8 6b 1c 00 00 call 10e714 <_Thread_Get>
switch (location) {
10caa9: 83 c4 10 add $0x10,%esp
10caac: 8b 55 f4 mov -0xc(%ebp),%edx
10caaf: 85 d2 test %edx,%edx
10cab1: 74 0d je 10cac0 <rtems_task_variable_delete+0x34>
10cab3: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cab8: 8b 5d fc mov -0x4(%ebp),%ebx
10cabb: c9 leave
10cabc: c3 ret
10cabd: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10cac0: 8b 90 04 01 00 00 mov 0x104(%eax),%edx
while (tvp) {
10cac6: 85 d2 test %edx,%edx
10cac8: 74 17 je 10cae1 <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
10caca: 39 5a 04 cmp %ebx,0x4(%edx)
10cacd: 75 0a jne 10cad9 <rtems_task_variable_delete+0x4d>
10cacf: eb 3c jmp 10cb0d <rtems_task_variable_delete+0x81>
10cad1: 8d 76 00 lea 0x0(%esi),%esi
10cad4: 39 5a 04 cmp %ebx,0x4(%edx)
10cad7: 74 17 je 10caf0 <rtems_task_variable_delete+0x64>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10cad9: 89 d1 mov %edx,%ecx
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
10cadb: 8b 12 mov (%edx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10cadd: 85 d2 test %edx,%edx
10cadf: 75 f3 jne 10cad4 <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10cae1: e8 0a 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10cae6: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10caeb: 8b 5d fc mov -0x4(%ebp),%ebx
10caee: c9 leave
10caef: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10caf0: 8b 1a mov (%edx),%ebx
10caf2: 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 );
10caf4: 83 ec 08 sub $0x8,%esp
10caf7: 52 push %edx
10caf8: 50 push %eax
10caf9: e8 a2 00 00 00 call 10cba0 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10cafe: e8 ed 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10cb03: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10cb05: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb08: 8b 5d fc mov -0x4(%ebp),%ebx
10cb0b: c9 leave
10cb0c: c3 ret
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
10cb0d: 8b 0a mov (%edx),%ecx
10cb0f: 89 88 04 01 00 00 mov %ecx,0x104(%eax)
10cb15: eb dd jmp 10caf4 <rtems_task_variable_delete+0x68>
0010cb18 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10cb18: 55 push %ebp
10cb19: 89 e5 mov %esp,%ebp
10cb1b: 56 push %esi
10cb1c: 53 push %ebx
10cb1d: 83 ec 10 sub $0x10,%esp
10cb20: 8b 5d 0c mov 0xc(%ebp),%ebx
10cb23: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10cb26: 85 db test %ebx,%ebx
10cb28: 74 56 je 10cb80 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10cb2a: 85 f6 test %esi,%esi
10cb2c: 74 52 je 10cb80 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10cb2e: 83 ec 08 sub $0x8,%esp
10cb31: 8d 45 f4 lea -0xc(%ebp),%eax
10cb34: 50 push %eax
10cb35: ff 75 08 pushl 0x8(%ebp)
10cb38: e8 d7 1b 00 00 call 10e714 <_Thread_Get>
switch (location) {
10cb3d: 83 c4 10 add $0x10,%esp
10cb40: 8b 55 f4 mov -0xc(%ebp),%edx
10cb43: 85 d2 test %edx,%edx
10cb45: 75 2d jne 10cb74 <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10cb47: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
while (tvp) {
10cb4d: 85 c0 test %eax,%eax
10cb4f: 75 09 jne 10cb5a <rtems_task_variable_get+0x42>
10cb51: eb 39 jmp 10cb8c <rtems_task_variable_get+0x74>
10cb53: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10cb54: 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) {
10cb56: 85 c0 test %eax,%eax
10cb58: 74 32 je 10cb8c <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10cb5a: 39 58 04 cmp %ebx,0x4(%eax)
10cb5d: 75 f5 jne 10cb54 <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;
10cb5f: 8b 40 0c mov 0xc(%eax),%eax
10cb62: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10cb64: e8 87 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10cb69: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb6b: 8d 65 f8 lea -0x8(%ebp),%esp
10cb6e: 5b pop %ebx
10cb6f: 5e pop %esi
10cb70: c9 leave
10cb71: c3 ret
10cb72: 66 90 xchg %ax,%ax
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
10cb74: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb79: 8d 65 f8 lea -0x8(%ebp),%esp
10cb7c: 5b pop %ebx
10cb7d: 5e pop %esi
10cb7e: c9 leave
10cb7f: c3 ret
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
10cb80: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb85: 8d 65 f8 lea -0x8(%ebp),%esp
10cb88: 5b pop %ebx
10cb89: 5e pop %esi
10cb8a: c9 leave
10cb8b: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10cb8c: e8 5f 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch>
10cb91: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cb96: 8d 65 f8 lea -0x8(%ebp),%esp
10cb99: 5b pop %ebx
10cb9a: 5e pop %esi
10cb9b: c9 leave
10cb9c: c3 ret
0010cf88 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10cf88: 55 push %ebp
10cf89: 89 e5 mov %esp,%ebp
10cf8b: 53 push %ebx
10cf8c: 83 ec 14 sub $0x14,%esp
10cf8f: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10cf92: 80 3d 0c bd 12 00 00 cmpb $0x0,0x12bd0c
10cf99: 0f 84 a9 00 00 00 je 10d048 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10cf9f: 85 db test %ebx,%ebx
10cfa1: 0f 84 ad 00 00 00 je 10d054 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10cfa7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10cfae: 83 ec 0c sub $0xc,%esp
10cfb1: 53 push %ebx
10cfb2: e8 d9 f3 ff ff call 10c390 <_TOD_Validate>
10cfb7: 83 c4 10 add $0x10,%esp
10cfba: 84 c0 test %al,%al
10cfbc: 75 0a jne 10cfc8 <rtems_task_wake_when+0x40>
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
10cfbe: b8 14 00 00 00 mov $0x14,%eax
}
10cfc3: 8b 5d fc mov -0x4(%ebp),%ebx
10cfc6: c9 leave
10cfc7: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10cfc8: 83 ec 0c sub $0xc,%esp
10cfcb: 53 push %ebx
10cfcc: e8 33 f3 ff ff call 10c304 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10cfd1: 83 c4 10 add $0x10,%esp
10cfd4: 3b 05 8c bd 12 00 cmp 0x12bd8c,%eax
10cfda: 76 e2 jbe 10cfbe <rtems_task_wake_when+0x36>
10cfdc: 8b 15 f8 bc 12 00 mov 0x12bcf8,%edx
10cfe2: 42 inc %edx
10cfe3: 89 15 f8 bc 12 00 mov %edx,0x12bcf8
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10cfe9: 83 ec 08 sub $0x8,%esp
10cfec: 6a 10 push $0x10
10cfee: ff 35 b8 bd 12 00 pushl 0x12bdb8
10cff4: 89 45 f4 mov %eax,-0xc(%ebp)
10cff7: e8 74 24 00 00 call 10f470 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10cffc: 8b 15 b8 bd 12 00 mov 0x12bdb8,%edx
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
10d002: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10d005: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10d00c: c7 42 64 ec e9 10 00 movl $0x10e9ec,0x64(%edx)
the_watchdog->id = id;
10d013: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10d016: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10d01d: 8b 45 f4 mov -0xc(%ebp),%eax
10d020: 2b 05 8c bd 12 00 sub 0x12bd8c,%eax
10d026: 89 42 54 mov %eax,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10d029: 58 pop %eax
10d02a: 59 pop %ecx
10d02b: 83 c2 48 add $0x48,%edx
10d02e: 52 push %edx
10d02f: 68 cc bd 12 00 push $0x12bdcc
10d034: e8 37 2b 00 00 call 10fb70 <_Watchdog_Insert>
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10d039: e8 46 1b 00 00 call 10eb84 <_Thread_Enable_dispatch>
10d03e: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10d040: 83 c4 10 add $0x10,%esp
10d043: e9 7b ff ff ff jmp 10cfc3 <rtems_task_wake_when+0x3b>
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10d048: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d04d: 8b 5d fc mov -0x4(%ebp),%ebx
10d050: c9 leave
10d051: c3 ret
10d052: 66 90 xchg %ax,%ax
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10d054: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10d059: 8b 5d fc mov -0x4(%ebp),%ebx
10d05c: c9 leave
10d05d: c3 ret
00118fc0 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
118fc0: 55 push %ebp
118fc1: 89 e5 mov %esp,%ebp
118fc3: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
118fc6: 8d 45 f4 lea -0xc(%ebp),%eax
118fc9: 50 push %eax
118fca: ff 75 08 pushl 0x8(%ebp)
118fcd: 68 60 4b 14 00 push $0x144b60
118fd2: e8 01 2a 00 00 call 11b9d8 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
118fd7: 83 c4 10 add $0x10,%esp
118fda: 8b 55 f4 mov -0xc(%ebp),%edx
118fdd: 85 d2 test %edx,%edx
118fdf: 74 07 je 118fe8 <rtems_timer_cancel+0x28>
118fe1: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118fe6: c9 leave
118fe7: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
118fe8: 83 78 38 04 cmpl $0x4,0x38(%eax)
118fec: 74 0f je 118ffd <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
118fee: 83 ec 0c sub $0xc,%esp
118ff1: 83 c0 10 add $0x10,%eax
118ff4: 50 push %eax
118ff5: e8 2e 47 00 00 call 11d728 <_Watchdog_Remove>
118ffa: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118ffd: e8 ba 32 00 00 call 11c2bc <_Thread_Enable_dispatch>
119002: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119004: c9 leave
119005: c3 ret
0010c494 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10c494: 55 push %ebp
10c495: 89 e5 mov %esp,%ebp
10c497: 57 push %edi
10c498: 56 push %esi
10c499: 53 push %ebx
10c49a: 83 ec 0c sub $0xc,%esp
10c49d: 8b 5d 08 mov 0x8(%ebp),%ebx
10c4a0: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c4a3: 85 db test %ebx,%ebx
10c4a5: 74 6d je 10c514 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10c4a7: 85 f6 test %esi,%esi
10c4a9: 0f 84 89 00 00 00 je 10c538 <rtems_timer_create+0xa4>
10c4af: a1 b8 a7 12 00 mov 0x12a7b8,%eax
10c4b4: 40 inc %eax
10c4b5: a3 b8 a7 12 00 mov %eax,0x12a7b8
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
10c4ba: 83 ec 0c sub $0xc,%esp
10c4bd: 68 20 b2 12 00 push $0x12b220
10c4c2: e8 cd 0e 00 00 call 10d394 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c4c7: 83 c4 10 add $0x10,%esp
10c4ca: 85 c0 test %eax,%eax
10c4cc: 74 56 je 10c524 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c4ce: c7 40 38 04 00 00 00 movl $0x4,0x38(%eax)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c4d5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c4dc: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c4e3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c4ea: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c4f1: 8b 50 08 mov 0x8(%eax),%edx
10c4f4: 0f b7 fa movzwl %dx,%edi
10c4f7: 8b 0d 3c b2 12 00 mov 0x12b23c,%ecx
10c4fd: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c500: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c503: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c505: e8 ae 1b 00 00 call 10e0b8 <_Thread_Enable_dispatch>
10c50a: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
}
10c50c: 8d 65 f4 lea -0xc(%ebp),%esp
10c50f: 5b pop %ebx
10c510: 5e pop %esi
10c511: 5f pop %edi
10c512: c9 leave
10c513: c3 ret
rtems_id *id
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c514: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c519: 8d 65 f4 lea -0xc(%ebp),%esp
10c51c: 5b pop %ebx
10c51d: 5e pop %esi
10c51e: 5f pop %edi
10c51f: c9 leave
10c520: c3 ret
10c521: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c524: e8 8f 1b 00 00 call 10e0b8 <_Thread_Enable_dispatch>
10c529: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c52e: 8d 65 f4 lea -0xc(%ebp),%esp
10c531: 5b pop %ebx
10c532: 5e pop %esi
10c533: 5f pop %edi
10c534: c9 leave
10c535: c3 ret
10c536: 66 90 xchg %ax,%ax
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
10c538: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c53d: 8d 65 f4 lea -0xc(%ebp),%esp
10c540: 5b pop %ebx
10c541: 5e pop %esi
10c542: 5f pop %edi
10c543: c9 leave
10c544: c3 ret
001190bc <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
1190bc: 55 push %ebp
1190bd: 89 e5 mov %esp,%ebp
1190bf: 53 push %ebx
1190c0: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
1190c3: 8d 45 f4 lea -0xc(%ebp),%eax
1190c6: 50 push %eax
1190c7: ff 75 08 pushl 0x8(%ebp)
1190ca: 68 60 4b 14 00 push $0x144b60
1190cf: e8 04 29 00 00 call 11b9d8 <_Objects_Get>
1190d4: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1190d6: 83 c4 10 add $0x10,%esp
1190d9: 8b 4d f4 mov -0xc(%ebp),%ecx
1190dc: 85 c9 test %ecx,%ecx
1190de: 75 38 jne 119118 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
1190e0: 83 ec 08 sub $0x8,%esp
1190e3: 50 push %eax
1190e4: 68 60 4b 14 00 push $0x144b60
1190e9: e8 7a 24 00 00 call 11b568 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
1190ee: 8d 43 10 lea 0x10(%ebx),%eax
1190f1: 89 04 24 mov %eax,(%esp)
1190f4: e8 2f 46 00 00 call 11d728 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
1190f9: 58 pop %eax
1190fa: 5a pop %edx
1190fb: 53 push %ebx
1190fc: 68 60 4b 14 00 push $0x144b60
119101: e8 66 27 00 00 call 11b86c <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
119106: e8 b1 31 00 00 call 11c2bc <_Thread_Enable_dispatch>
11910b: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
11910d: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119110: 8b 5d fc mov -0x4(%ebp),%ebx
119113: c9 leave
119114: c3 ret
119115: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119118: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11911d: 8b 5d fc mov -0x4(%ebp),%ebx
119120: c9 leave
119121: c3 ret
0010c548 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c548: 55 push %ebp
10c549: 89 e5 mov %esp,%ebp
10c54b: 57 push %edi
10c54c: 56 push %esi
10c54d: 53 push %ebx
10c54e: 83 ec 2c sub $0x2c,%esp
10c551: 8b 5d 0c mov 0xc(%ebp),%ebx
10c554: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c557: 85 db test %ebx,%ebx
10c559: 0f 84 99 00 00 00 je 10c5f8 <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c55f: 85 f6 test %esi,%esi
10c561: 0f 84 b1 00 00 00 je 10c618 <rtems_timer_fire_after+0xd0>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
10c567: 57 push %edi
10c568: 8d 45 e4 lea -0x1c(%ebp),%eax
10c56b: 50 push %eax
10c56c: ff 75 08 pushl 0x8(%ebp)
10c56f: 68 20 b2 12 00 push $0x12b220
10c574: e8 cb 12 00 00 call 10d844 <_Objects_Get>
10c579: 89 c7 mov %eax,%edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10c57b: 83 c4 10 add $0x10,%esp
10c57e: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c581: 85 c9 test %ecx,%ecx
10c583: 74 0f je 10c594 <rtems_timer_fire_after+0x4c>
10c585: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c58a: 8d 65 f4 lea -0xc(%ebp),%esp
10c58d: 5b pop %ebx
10c58e: 5e pop %esi
10c58f: 5f pop %edi
10c590: c9 leave
10c591: c3 ret
10c592: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c594: 8d 50 10 lea 0x10(%eax),%edx
10c597: 83 ec 0c sub $0xc,%esp
10c59a: 52 push %edx
10c59b: 89 55 d4 mov %edx,-0x2c(%ebp)
10c59e: e8 c1 2b 00 00 call 10f164 <_Watchdog_Remove>
_ISR_Disable( level );
10c5a3: 9c pushf
10c5a4: fa cli
10c5a5: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
10c5a6: 83 c4 10 add $0x10,%esp
10c5a9: 8b 57 18 mov 0x18(%edi),%edx
10c5ac: 85 d2 test %edx,%edx
10c5ae: 8b 55 d4 mov -0x2c(%ebp),%edx
10c5b1: 75 55 jne 10c608 <rtems_timer_fire_after+0xc0>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
10c5b3: c7 47 38 00 00 00 00 movl $0x0,0x38(%edi)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10c5ba: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c5c1: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c5c4: 8b 4d 08 mov 0x8(%ebp),%ecx
10c5c7: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c5ca: 8b 4d 14 mov 0x14(%ebp),%ecx
10c5cd: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c5d0: 50 push %eax
10c5d1: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c5d2: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c5d5: 83 ec 08 sub $0x8,%esp
10c5d8: 52 push %edx
10c5d9: 68 98 a8 12 00 push $0x12a898
10c5de: e8 49 2a 00 00 call 10f02c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c5e3: e8 d0 1a 00 00 call 10e0b8 <_Thread_Enable_dispatch>
10c5e8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c5ea: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5ed: 8d 65 f4 lea -0xc(%ebp),%esp
10c5f0: 5b pop %ebx
10c5f1: 5e pop %esi
10c5f2: 5f pop %edi
10c5f3: c9 leave
10c5f4: c3 ret
10c5f5: 8d 76 00 lea 0x0(%esi),%esi
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c5f8: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c5fd: 8d 65 f4 lea -0xc(%ebp),%esp
10c600: 5b pop %ebx
10c601: 5e pop %esi
10c602: 5f pop %edi
10c603: c9 leave
10c604: c3 ret
10c605: 8d 76 00 lea 0x0(%esi),%esi
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
10c608: 50 push %eax
10c609: 9d popf
_Thread_Enable_dispatch();
10c60a: e8 a9 1a 00 00 call 10e0b8 <_Thread_Enable_dispatch>
10c60f: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
10c611: e9 74 ff ff ff jmp 10c58a <rtems_timer_fire_after+0x42>
10c616: 66 90 xchg %ax,%ax
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c618: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c61d: 8d 65 f4 lea -0xc(%ebp),%esp
10c620: 5b pop %ebx
10c621: 5e pop %esi
10c622: 5f pop %edi
10c623: c9 leave
10c624: c3 ret
00119204 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
119204: 55 push %ebp
119205: 89 e5 mov %esp,%ebp
119207: 57 push %edi
119208: 56 push %esi
119209: 53 push %ebx
11920a: 83 ec 2c sub $0x2c,%esp
11920d: 8b 75 08 mov 0x8(%ebp),%esi
119210: 8b 7d 0c mov 0xc(%ebp),%edi
119213: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
119216: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c
11921d: 75 0d jne 11922c <rtems_timer_fire_when+0x28>
11921f: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119224: 8d 65 f4 lea -0xc(%ebp),%esp
119227: 5b pop %ebx
119228: 5e pop %esi
119229: 5f pop %edi
11922a: c9 leave
11922b: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
11922c: 83 ec 0c sub $0xc,%esp
11922f: 57 push %edi
119230: e8 67 d4 ff ff call 11669c <_TOD_Validate>
119235: 83 c4 10 add $0x10,%esp
119238: 84 c0 test %al,%al
11923a: 74 1e je 11925a <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
11923c: 85 db test %ebx,%ebx
11923e: 0f 84 a4 00 00 00 je 1192e8 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
119244: 83 ec 0c sub $0xc,%esp
119247: 57 push %edi
119248: e8 c3 d3 ff ff call 116610 <_TOD_To_seconds>
11924d: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
11924f: 83 c4 10 add $0x10,%esp
119252: 3b 05 8c 41 14 00 cmp 0x14418c,%eax
119258: 77 0e ja 119268 <rtems_timer_fire_when+0x64>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
11925a: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11925f: 8d 65 f4 lea -0xc(%ebp),%esp
119262: 5b pop %ebx
119263: 5e pop %esi
119264: 5f pop %edi
119265: c9 leave
119266: c3 ret
119267: 90 nop
119268: 50 push %eax
119269: 8d 45 e4 lea -0x1c(%ebp),%eax
11926c: 50 push %eax
11926d: 56 push %esi
11926e: 68 60 4b 14 00 push $0x144b60
119273: e8 60 27 00 00 call 11b9d8 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119278: 83 c4 10 add $0x10,%esp
11927b: 8b 4d e4 mov -0x1c(%ebp),%ecx
11927e: 85 c9 test %ecx,%ecx
119280: 75 5a jne 1192dc <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
119282: 8d 48 10 lea 0x10(%eax),%ecx
119285: 83 ec 0c sub $0xc,%esp
119288: 51 push %ecx
119289: 89 45 d4 mov %eax,-0x2c(%ebp)
11928c: 89 4d d0 mov %ecx,-0x30(%ebp)
11928f: e8 94 44 00 00 call 11d728 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
119294: 8b 55 d4 mov -0x2c(%ebp),%edx
119297: c7 42 38 02 00 00 00 movl $0x2,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11929e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
1192a5: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
1192a8: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
1192ab: 8b 45 14 mov 0x14(%ebp),%eax
1192ae: 89 42 34 mov %eax,0x34(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1192b1: 2b 3d 8c 41 14 00 sub 0x14418c,%edi
1192b7: 89 7a 1c mov %edi,0x1c(%edx)
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1192ba: 58 pop %eax
1192bb: 5a pop %edx
1192bc: 8b 4d d0 mov -0x30(%ebp),%ecx
1192bf: 51 push %ecx
1192c0: 68 cc 41 14 00 push $0x1441cc
1192c5: e8 26 43 00 00 call 11d5f0 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
1192ca: e8 ed 2f 00 00 call 11c2bc <_Thread_Enable_dispatch>
1192cf: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1192d1: 83 c4 10 add $0x10,%esp
1192d4: e9 4b ff ff ff jmp 119224 <rtems_timer_fire_when+0x20>
1192d9: 8d 76 00 lea 0x0(%esi),%esi
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1192dc: b8 04 00 00 00 mov $0x4,%eax
1192e1: e9 3e ff ff ff jmp 119224 <rtems_timer_fire_when+0x20>
1192e6: 66 90 xchg %ax,%ax
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
1192e8: b8 09 00 00 00 mov $0x9,%eax
1192ed: e9 32 ff ff ff jmp 119224 <rtems_timer_fire_when+0x20>
00119604 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
119604: 55 push %ebp
119605: 89 e5 mov %esp,%ebp
119607: 56 push %esi
119608: 53 push %ebx
119609: 83 ec 10 sub $0x10,%esp
11960c: 8b 45 08 mov 0x8(%ebp),%eax
11960f: 85 c0 test %eax,%eax
119611: 75 0d jne 119620 <rtems_timer_initiate_server+0x1c>
if (status) {
initialized = false;
}
#endif
return status;
119613: b8 13 00 00 00 mov $0x13,%eax
}
119618: 8d 65 f8 lea -0x8(%ebp),%esp
11961b: 5b pop %ebx
11961c: 5e pop %esi
11961d: c9 leave
11961e: c3 ret
11961f: 90 nop
119620: 0f b6 15 f4 ba 13 00 movzbl 0x13baf4,%edx
119627: 39 d0 cmp %edx,%eax
119629: 76 35 jbe 119660 <rtems_timer_initiate_server+0x5c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
11962b: 40 inc %eax
11962c: 75 e5 jne 119613 <rtems_timer_initiate_server+0xf>
11962e: 31 f6 xor %esi,%esi
119630: 8b 15 f8 40 14 00 mov 0x1440f8,%edx
119636: 42 inc %edx
119637: 89 15 f8 40 14 00 mov %edx,0x1440f8
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
11963d: 8a 1d 80 f9 13 00 mov 0x13f980,%bl
initialized = true;
119643: c6 05 80 f9 13 00 01 movb $0x1,0x13f980
_Thread_Enable_dispatch();
11964a: e8 6d 2c 00 00 call 11c2bc <_Thread_Enable_dispatch>
if ( tmpInitialized )
11964f: 84 db test %bl,%bl
119651: 74 11 je 119664 <rtems_timer_initiate_server+0x60>
119653: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
119658: 8d 65 f8 lea -0x8(%ebp),%esp
11965b: 5b pop %ebx
11965c: 5e pop %esi
11965d: c9 leave
11965e: c3 ret
11965f: 90 nop
119660: 89 c6 mov %eax,%esi
119662: eb cc jmp 119630 <rtems_timer_initiate_server+0x2c>
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
119664: 83 ec 08 sub $0x8,%esp
119667: 8d 45 f4 lea -0xc(%ebp),%eax
11966a: 50 push %eax
11966b: 8b 45 10 mov 0x10(%ebp),%eax
11966e: 80 cc 80 or $0x80,%ah
119671: 50 push %eax
119672: 68 00 01 00 00 push $0x100
119677: ff 75 0c pushl 0xc(%ebp)
11967a: 56 push %esi
11967b: 68 45 4d 49 54 push $0x54494d45
119680: e8 87 f0 ff ff call 11870c <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
119685: 83 c4 20 add $0x20,%esp
119688: 85 c0 test %eax,%eax
11968a: 74 10 je 11969c <rtems_timer_initiate_server+0x98>
initialized = false;
11968c: c6 05 80 f9 13 00 00 movb $0x0,0x13f980
initialized = false;
}
#endif
return status;
}
119693: 8d 65 f8 lea -0x8(%ebp),%esp
119696: 5b pop %ebx
119697: 5e pop %esi
119698: c9 leave
119699: c3 ret
11969a: 66 90 xchg %ax,%ax
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
11969c: 8b 45 f4 mov -0xc(%ebp),%eax
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
11969f: 0f b7 c8 movzwl %ax,%ecx
1196a2: 8b 15 9c 40 14 00 mov 0x14409c,%edx
1196a8: 8b 14 8a mov (%edx,%ecx,4),%edx
1196ab: 89 15 a0 f9 13 00 mov %edx,0x13f9a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1196b1: c7 05 d0 f9 13 00 d4 movl $0x13f9d4,0x13f9d0
1196b8: f9 13 00
the_chain->permanent_null = NULL;
1196bb: c7 05 d4 f9 13 00 00 movl $0x0,0x13f9d4
1196c2: 00 00 00
the_chain->last = _Chain_Head(the_chain);
1196c5: c7 05 d8 f9 13 00 d0 movl $0x13f9d0,0x13f9d8
1196cc: f9 13 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
1196cf: c7 05 08 fa 13 00 0c movl $0x13fa0c,0x13fa08
1196d6: fa 13 00
the_chain->permanent_null = NULL;
1196d9: c7 05 0c fa 13 00 00 movl $0x0,0x13fa0c
1196e0: 00 00 00
the_chain->last = _Chain_Head(the_chain);
1196e3: c7 05 10 fa 13 00 08 movl $0x13fa08,0x13fa10
1196ea: fa 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1196ed: c7 05 b0 f9 13 00 00 movl $0x0,0x13f9b0
1196f4: 00 00 00
the_watchdog->routine = routine;
1196f7: c7 05 c4 f9 13 00 24 movl $0x11c124,0x13f9c4
1196fe: c1 11 00
the_watchdog->id = id;
119701: a3 c8 f9 13 00 mov %eax,0x13f9c8
the_watchdog->user_data = user_data;
119706: c7 05 cc f9 13 00 00 movl $0x0,0x13f9cc
11970d: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119710: c7 05 e8 f9 13 00 00 movl $0x0,0x13f9e8
119717: 00 00 00
the_watchdog->routine = routine;
11971a: c7 05 fc f9 13 00 24 movl $0x11c124,0x13f9fc
119721: c1 11 00
the_watchdog->id = id;
119724: a3 00 fa 13 00 mov %eax,0x13fa00
the_watchdog->user_data = user_data;
119729: c7 05 04 fa 13 00 00 movl $0x0,0x13fa04
119730: 00 00 00
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
119733: c7 05 a4 f9 13 00 d8 movl $0x1199d8,0x13f9a4
11973a: 99 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
11973d: 8b 15 64 42 14 00 mov 0x144264,%edx
119743: 89 15 dc f9 13 00 mov %edx,0x13f9dc
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
119749: 8b 15 8c 41 14 00 mov 0x14418c,%edx
11974f: 89 15 14 fa 13 00 mov %edx,0x13fa14
ts->insert_chain = NULL;
119755: c7 05 18 fa 13 00 00 movl $0x0,0x13fa18
11975c: 00 00 00
ts->active = false;
11975f: c6 05 1c fa 13 00 00 movb $0x0,0x13fa1c
/*
* The default timer server is now available.
*/
_Timer_server = ts;
119766: c7 05 a0 4b 14 00 a0 movl $0x13f9a0,0x144ba0
11976d: f9 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
119770: 52 push %edx
119771: 68 a0 f9 13 00 push $0x13f9a0
119776: 68 2c 98 11 00 push $0x11982c
11977b: 50 push %eax
11977c: e8 23 f6 ff ff call 118da4 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
119781: 83 c4 10 add $0x10,%esp
119784: e9 8f fe ff ff jmp 119618 <rtems_timer_initiate_server+0x14>
0011937c <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
11937c: 55 push %ebp
11937d: 89 e5 mov %esp,%ebp
11937f: 56 push %esi
119380: 53 push %ebx
119381: 83 ec 24 sub $0x24,%esp
119384: 8d 45 f4 lea -0xc(%ebp),%eax
119387: 50 push %eax
119388: ff 75 08 pushl 0x8(%ebp)
11938b: 68 60 4b 14 00 push $0x144b60
119390: e8 43 26 00 00 call 11b9d8 <_Objects_Get>
119395: 89 c3 mov %eax,%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119397: 83 c4 10 add $0x10,%esp
11939a: 8b 45 f4 mov -0xc(%ebp),%eax
11939d: 85 c0 test %eax,%eax
11939f: 74 0f je 1193b0 <rtems_timer_reset+0x34>
1193a1: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1193a6: 8d 65 f8 lea -0x8(%ebp),%esp
1193a9: 5b pop %ebx
1193aa: 5e pop %esi
1193ab: c9 leave
1193ac: c3 ret
1193ad: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
1193b0: 8b 43 38 mov 0x38(%ebx),%eax
1193b3: 85 c0 test %eax,%eax
1193b5: 74 1d je 1193d4 <rtems_timer_reset+0x58>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1193b7: 48 dec %eax
1193b8: 74 3a je 1193f4 <rtems_timer_reset+0x78>
1193ba: b8 0b 00 00 00 mov $0xb,%eax
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
1193bf: 89 45 e4 mov %eax,-0x1c(%ebp)
1193c2: e8 f5 2e 00 00 call 11c2bc <_Thread_Enable_dispatch>
1193c7: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1193ca: 8d 65 f8 lea -0x8(%ebp),%esp
1193cd: 5b pop %ebx
1193ce: 5e pop %esi
1193cf: c9 leave
1193d0: c3 ret
1193d1: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
1193d4: 83 c3 10 add $0x10,%ebx
1193d7: 83 ec 0c sub $0xc,%esp
1193da: 53 push %ebx
1193db: e8 48 43 00 00 call 11d728 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
1193e0: 59 pop %ecx
1193e1: 5e pop %esi
1193e2: 53 push %ebx
1193e3: 68 d8 41 14 00 push $0x1441d8
1193e8: e8 03 42 00 00 call 11d5f0 <_Watchdog_Insert>
1193ed: 31 c0 xor %eax,%eax
1193ef: 83 c4 10 add $0x10,%esp
1193f2: eb cb jmp 1193bf <rtems_timer_reset+0x43>
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
1193f4: 8b 35 a0 4b 14 00 mov 0x144ba0,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
1193fa: 83 ec 0c sub $0xc,%esp
1193fd: 8d 43 10 lea 0x10(%ebx),%eax
119400: 50 push %eax
119401: e8 22 43 00 00 call 11d728 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
119406: 58 pop %eax
119407: 5a pop %edx
119408: 53 push %ebx
119409: 56 push %esi
11940a: ff 56 04 call *0x4(%esi)
11940d: 31 c0 xor %eax,%eax
11940f: 83 c4 10 add $0x10,%esp
119412: eb ab jmp 1193bf <rtems_timer_reset+0x43>
00119414 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
119414: 55 push %ebp
119415: 89 e5 mov %esp,%ebp
119417: 57 push %edi
119418: 56 push %esi
119419: 53 push %ebx
11941a: 83 ec 2c sub $0x2c,%esp
11941d: 8b 7d 0c mov 0xc(%ebp),%edi
119420: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
119423: 8b 1d a0 4b 14 00 mov 0x144ba0,%ebx
if ( !timer_server )
119429: 85 db test %ebx,%ebx
11942b: 0f 84 9f 00 00 00 je 1194d0 <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
119431: 85 f6 test %esi,%esi
119433: 0f 84 a3 00 00 00 je 1194dc <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
119439: 85 ff test %edi,%edi
11943b: 75 0f jne 11944c <rtems_timer_server_fire_after+0x38>
11943d: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
119442: 8d 65 f4 lea -0xc(%ebp),%esp
119445: 5b pop %ebx
119446: 5e pop %esi
119447: 5f pop %edi
119448: c9 leave
119449: c3 ret
11944a: 66 90 xchg %ax,%ax
11944c: 52 push %edx
11944d: 8d 45 e4 lea -0x1c(%ebp),%eax
119450: 50 push %eax
119451: ff 75 08 pushl 0x8(%ebp)
119454: 68 60 4b 14 00 push $0x144b60
119459: e8 7a 25 00 00 call 11b9d8 <_Objects_Get>
11945e: 89 c2 mov %eax,%edx
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119460: 83 c4 10 add $0x10,%esp
119463: 8b 45 e4 mov -0x1c(%ebp),%eax
119466: 85 c0 test %eax,%eax
119468: 75 56 jne 1194c0 <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11946a: 83 ec 0c sub $0xc,%esp
11946d: 8d 42 10 lea 0x10(%edx),%eax
119470: 50 push %eax
119471: 89 55 d4 mov %edx,-0x2c(%ebp)
119474: e8 af 42 00 00 call 11d728 <_Watchdog_Remove>
_ISR_Disable( level );
119479: 9c pushf
11947a: fa cli
11947b: 58 pop %eax
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
11947c: 83 c4 10 add $0x10,%esp
11947f: 8b 55 d4 mov -0x2c(%ebp),%edx
119482: 8b 4a 18 mov 0x18(%edx),%ecx
119485: 85 c9 test %ecx,%ecx
119487: 75 5f jne 1194e8 <rtems_timer_server_fire_after+0xd4>
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
119489: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119490: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
119497: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
11949a: 8b 4d 08 mov 0x8(%ebp),%ecx
11949d: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
1194a0: 8b 4d 14 mov 0x14(%ebp),%ecx
1194a3: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
1194a6: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
1194a9: 50 push %eax
1194aa: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
1194ab: 83 ec 08 sub $0x8,%esp
1194ae: 52 push %edx
1194af: 53 push %ebx
1194b0: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
1194b3: e8 04 2e 00 00 call 11c2bc <_Thread_Enable_dispatch>
1194b8: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1194ba: 83 c4 10 add $0x10,%esp
1194bd: eb 83 jmp 119442 <rtems_timer_server_fire_after+0x2e>
1194bf: 90 nop
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1194c0: b8 04 00 00 00 mov $0x4,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1194c5: 8d 65 f4 lea -0xc(%ebp),%esp
1194c8: 5b pop %ebx
1194c9: 5e pop %esi
1194ca: 5f pop %edi
1194cb: c9 leave
1194cc: c3 ret
1194cd: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
1194d0: b8 0e 00 00 00 mov $0xe,%eax
1194d5: e9 68 ff ff ff jmp 119442 <rtems_timer_server_fire_after+0x2e>
1194da: 66 90 xchg %ax,%ax
return RTEMS_INCORRECT_STATE;
if ( !routine )
1194dc: b8 09 00 00 00 mov $0x9,%eax
1194e1: e9 5c ff ff ff jmp 119442 <rtems_timer_server_fire_after+0x2e>
1194e6: 66 90 xchg %ax,%ax
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
1194e8: 50 push %eax
1194e9: 9d popf
_Thread_Enable_dispatch();
1194ea: e8 cd 2d 00 00 call 11c2bc <_Thread_Enable_dispatch>
1194ef: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1194f1: e9 4c ff ff ff jmp 119442 <rtems_timer_server_fire_after+0x2e>
001194f8 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1194f8: 55 push %ebp
1194f9: 89 e5 mov %esp,%ebp
1194fb: 57 push %edi
1194fc: 56 push %esi
1194fd: 53 push %ebx
1194fe: 83 ec 2c sub $0x2c,%esp
119501: 8b 7d 0c mov 0xc(%ebp),%edi
119504: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
119507: 8b 1d a0 4b 14 00 mov 0x144ba0,%ebx
if ( !timer_server )
11950d: 85 db test %ebx,%ebx
11950f: 0f 84 d7 00 00 00 je 1195ec <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
119515: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c
11951c: 0f 84 aa 00 00 00 je 1195cc <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
119522: 85 f6 test %esi,%esi
119524: 0f 84 b2 00 00 00 je 1195dc <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
11952a: 83 ec 0c sub $0xc,%esp
11952d: 57 push %edi
11952e: e8 69 d1 ff ff call 11669c <_TOD_Validate>
119533: 83 c4 10 add $0x10,%esp
119536: 84 c0 test %al,%al
119538: 75 0e jne 119548 <rtems_timer_server_fire_when+0x50>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
11953a: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11953f: 8d 65 f4 lea -0xc(%ebp),%esp
119542: 5b pop %ebx
119543: 5e pop %esi
119544: 5f pop %edi
119545: c9 leave
119546: c3 ret
119547: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
119548: 83 ec 0c sub $0xc,%esp
11954b: 57 push %edi
11954c: e8 bf d0 ff ff call 116610 <_TOD_To_seconds>
119551: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
119553: 83 c4 10 add $0x10,%esp
119556: 3b 05 8c 41 14 00 cmp 0x14418c,%eax
11955c: 76 dc jbe 11953a <rtems_timer_server_fire_when+0x42>
11955e: 52 push %edx
11955f: 8d 45 e4 lea -0x1c(%ebp),%eax
119562: 50 push %eax
119563: ff 75 08 pushl 0x8(%ebp)
119566: 68 60 4b 14 00 push $0x144b60
11956b: e8 68 24 00 00 call 11b9d8 <_Objects_Get>
119570: 89 c2 mov %eax,%edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
119572: 83 c4 10 add $0x10,%esp
119575: 8b 45 e4 mov -0x1c(%ebp),%eax
119578: 85 c0 test %eax,%eax
11957a: 75 7c jne 1195f8 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
11957c: 83 ec 0c sub $0xc,%esp
11957f: 8d 42 10 lea 0x10(%edx),%eax
119582: 50 push %eax
119583: 89 55 d4 mov %edx,-0x2c(%ebp)
119586: e8 9d 41 00 00 call 11d728 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
11958b: 8b 55 d4 mov -0x2c(%ebp),%edx
11958e: c7 42 38 03 00 00 00 movl $0x3,0x38(%edx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119595: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
11959c: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
11959f: 8b 45 08 mov 0x8(%ebp),%eax
1195a2: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
1195a5: 8b 45 14 mov 0x14(%ebp),%eax
1195a8: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
1195ab: 2b 3d 8c 41 14 00 sub 0x14418c,%edi
1195b1: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
1195b4: 58 pop %eax
1195b5: 59 pop %ecx
1195b6: 52 push %edx
1195b7: 53 push %ebx
1195b8: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
1195bb: e8 fc 2c 00 00 call 11c2bc <_Thread_Enable_dispatch>
1195c0: 31 c0 xor %eax,%eax
return RTEMS_SUCCESSFUL;
1195c2: 83 c4 10 add $0x10,%esp
1195c5: e9 75 ff ff ff jmp 11953f <rtems_timer_server_fire_when+0x47>
1195ca: 66 90 xchg %ax,%ax
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
1195cc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1195d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1195d4: 5b pop %ebx <== NOT EXECUTED
1195d5: 5e pop %esi <== NOT EXECUTED
1195d6: 5f pop %edi <== NOT EXECUTED
1195d7: c9 leave <== NOT EXECUTED
1195d8: c3 ret <== NOT EXECUTED
1195d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
1195dc: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1195e1: 8d 65 f4 lea -0xc(%ebp),%esp
1195e4: 5b pop %ebx
1195e5: 5e pop %esi
1195e6: 5f pop %edi
1195e7: c9 leave
1195e8: c3 ret
1195e9: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
1195ec: b8 0e 00 00 00 mov $0xe,%eax
1195f1: e9 49 ff ff ff jmp 11953f <rtems_timer_server_fire_when+0x47>
1195f6: 66 90 xchg %ax,%ax
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1195f8: b8 04 00 00 00 mov $0x4,%eax
1195fd: e9 3d ff ff ff jmp 11953f <rtems_timer_server_fire_when+0x47>
0010c420 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10c420: 55 push %ebp
10c421: 89 e5 mov %esp,%ebp
10c423: 83 ec 08 sub $0x8,%esp
10c426: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10c429: 85 c0 test %eax,%eax
10c42b: 78 0a js 10c437 <sched_get_priority_max+0x17>
10c42d: 83 f8 02 cmp $0x2,%eax
10c430: 7e 1a jle 10c44c <sched_get_priority_max+0x2c>
10c432: 83 f8 04 cmp $0x4,%eax
10c435: 74 15 je 10c44c <sched_get_priority_max+0x2c><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c437: e8 f0 98 00 00 call 115d2c <__errno>
10c43c: c7 00 16 00 00 00 movl $0x16,(%eax)
10c442: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10c447: c9 leave
10c448: c3 ret
10c449: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10c44c: 0f b6 05 bc 64 12 00 movzbl 0x1264bc,%eax
10c453: 48 dec %eax
}
10c454: c9 leave
10c455: c3 ret
0010c458 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10c458: 55 push %ebp
10c459: 89 e5 mov %esp,%ebp
10c45b: 83 ec 08 sub $0x8,%esp
10c45e: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10c461: 85 c0 test %eax,%eax
10c463: 78 0a js 10c46f <sched_get_priority_min+0x17>
10c465: 83 f8 02 cmp $0x2,%eax
10c468: 7e 1a jle 10c484 <sched_get_priority_min+0x2c><== ALWAYS TAKEN
10c46a: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10c46d: 74 15 je 10c484 <sched_get_priority_min+0x2c><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10c46f: e8 b8 98 00 00 call 115d2c <__errno>
10c474: c7 00 16 00 00 00 movl $0x16,(%eax)
10c47a: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10c47f: c9 leave
10c480: c3 ret
10c481: 8d 76 00 lea 0x0(%esi),%esi
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
10c484: b8 01 00 00 00 mov $0x1,%eax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10c489: c9 leave
10c48a: c3 ret
0010c48c <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10c48c: 55 push %ebp
10c48d: 89 e5 mov %esp,%ebp
10c48f: 56 push %esi
10c490: 53 push %ebx
10c491: 8b 75 08 mov 0x8(%ebp),%esi
10c494: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c497: 85 f6 test %esi,%esi
10c499: 75 21 jne 10c4bc <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10c49b: 85 db test %ebx,%ebx
10c49d: 74 38 je 10c4d7 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10c49f: 83 ec 08 sub $0x8,%esp
10c4a2: 53 push %ebx
10c4a3: ff 35 64 a6 12 00 pushl 0x12a664
10c4a9: e8 8a 34 00 00 call 10f938 <_Timespec_From_ticks>
10c4ae: 31 c0 xor %eax,%eax
return 0;
10c4b0: 83 c4 10 add $0x10,%esp
}
10c4b3: 8d 65 f8 lea -0x8(%ebp),%esp
10c4b6: 5b pop %ebx
10c4b7: 5e pop %esi
10c4b8: c9 leave
10c4b9: c3 ret
10c4ba: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10c4bc: e8 df c7 ff ff call 108ca0 <getpid>
10c4c1: 39 f0 cmp %esi,%eax
10c4c3: 74 d6 je 10c49b <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10c4c5: e8 62 98 00 00 call 115d2c <__errno>
10c4ca: c7 00 03 00 00 00 movl $0x3,(%eax)
10c4d0: b8 ff ff ff ff mov $0xffffffff,%eax
10c4d5: eb dc jmp 10c4b3 <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c4d7: e8 50 98 00 00 call 115d2c <__errno>
10c4dc: c7 00 16 00 00 00 movl $0x16,(%eax)
10c4e2: b8 ff ff ff ff mov $0xffffffff,%eax
10c4e7: eb ca jmp 10c4b3 <sched_rr_get_interval+0x27>
0010ea1c <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10ea1c: 55 push %ebp
10ea1d: 89 e5 mov %esp,%ebp
10ea1f: 83 ec 1c sub $0x1c,%esp
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
10ea22: 8d 45 f4 lea -0xc(%ebp),%eax
10ea25: 50 push %eax
10ea26: 8b 45 08 mov 0x8(%ebp),%eax
10ea29: ff 30 pushl (%eax)
10ea2b: 68 80 f3 12 00 push $0x12f380
10ea30: e8 7b 21 00 00 call 110bb0 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10ea35: 83 c4 10 add $0x10,%esp
10ea38: 8b 55 f4 mov -0xc(%ebp),%edx
10ea3b: 85 d2 test %edx,%edx
10ea3d: 74 15 je 10ea54 <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ea3f: e8 10 a7 00 00 call 119154 <__errno>
10ea44: c7 00 16 00 00 00 movl $0x16,(%eax)
10ea4a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ea4f: c9 leave
10ea50: c3 ret
10ea51: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10ea54: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10ea57: 83 ec 0c sub $0xc,%esp
10ea5a: 50 push %eax
10ea5b: e8 d4 6a 00 00 call 115534 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10ea60: e8 0f 2a 00 00 call 111474 <_Thread_Enable_dispatch>
10ea65: 31 c0 xor %eax,%eax
return 0;
10ea67: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ea6a: c9 leave
10ea6b: c3 ret
0010ea6c <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10ea6c: 55 push %ebp
10ea6d: 89 e5 mov %esp,%ebp
10ea6f: 83 ec 1c sub $0x1c,%esp
10ea72: 8d 45 f4 lea -0xc(%ebp),%eax
10ea75: 50 push %eax
10ea76: 8b 45 08 mov 0x8(%ebp),%eax
10ea79: ff 30 pushl (%eax)
10ea7b: 68 80 f3 12 00 push $0x12f380
10ea80: e8 2b 21 00 00 call 110bb0 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10ea85: 83 c4 10 add $0x10,%esp
10ea88: 8b 55 f4 mov -0xc(%ebp),%edx
10ea8b: 85 d2 test %edx,%edx
10ea8d: 74 15 je 10eaa4 <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ea8f: e8 c0 a6 00 00 call 119154 <__errno>
10ea94: c7 00 16 00 00 00 movl $0x16,(%eax)
10ea9a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ea9f: c9 leave
10eaa0: c3 ret
10eaa1: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
10eaa4: 80 78 14 00 cmpb $0x0,0x14(%eax)
10eaa8: 75 16 jne 10eac0 <sem_destroy+0x54>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10eaaa: 83 ec 0c sub $0xc,%esp
10eaad: 50 push %eax
10eaae: e8 81 6a 00 00 call 115534 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10eab3: e8 bc 29 00 00 call 111474 <_Thread_Enable_dispatch>
10eab8: 31 c0 xor %eax,%eax
return 0;
10eaba: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10eabd: c9 leave
10eabe: c3 ret
10eabf: 90 nop
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
10eac0: e8 af 29 00 00 call 111474 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10eac5: e8 8a a6 00 00 call 119154 <__errno>
10eaca: c7 00 16 00 00 00 movl $0x16,(%eax)
10ead0: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ead5: c9 leave
10ead6: c3 ret
0010ead8 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10ead8: 55 push %ebp
10ead9: 89 e5 mov %esp,%ebp
10eadb: 83 ec 1c sub $0x1c,%esp
10eade: 8d 45 f4 lea -0xc(%ebp),%eax
10eae1: 50 push %eax
10eae2: 8b 45 08 mov 0x8(%ebp),%eax
10eae5: ff 30 pushl (%eax)
10eae7: 68 80 f3 12 00 push $0x12f380
10eaec: e8 bf 20 00 00 call 110bb0 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10eaf1: 83 c4 10 add $0x10,%esp
10eaf4: 8b 55 f4 mov -0xc(%ebp),%edx
10eaf7: 85 d2 test %edx,%edx
10eaf9: 74 15 je 10eb10 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10eafb: e8 54 a6 00 00 call 119154 <__errno>
10eb00: c7 00 16 00 00 00 movl $0x16,(%eax)
10eb06: b8 ff ff ff ff mov $0xffffffff,%eax
}
10eb0b: c9 leave
10eb0c: c3 ret
10eb0d: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10eb10: 8b 50 64 mov 0x64(%eax),%edx
10eb13: 8b 45 0c mov 0xc(%ebp),%eax
10eb16: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10eb18: e8 57 29 00 00 call 111474 <_Thread_Enable_dispatch>
10eb1d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10eb1f: c9 leave
10eb20: c3 ret
0010eb6c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10eb6c: 55 push %ebp
10eb6d: 89 e5 mov %esp,%ebp
10eb6f: 57 push %edi
10eb70: 56 push %esi
10eb71: 53 push %ebx
10eb72: 83 ec 2c sub $0x2c,%esp
10eb75: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10eb78: a1 38 f0 12 00 mov 0x12f038,%eax
10eb7d: 40 inc %eax
10eb7e: a3 38 f0 12 00 mov %eax,0x12f038
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10eb83: 8b 7d 0c mov 0xc(%ebp),%edi
10eb86: 81 e7 00 02 00 00 and $0x200,%edi
10eb8c: 0f 85 86 00 00 00 jne 10ec18 <sem_open+0xac>
10eb92: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
10eb99: 83 ec 08 sub $0x8,%esp
10eb9c: 8d 45 e4 lea -0x1c(%ebp),%eax
10eb9f: 50 push %eax
10eba0: 56 push %esi
10eba1: e8 de 69 00 00 call 115584 <_POSIX_Semaphore_Name_to_id>
10eba6: 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 ) {
10eba8: 83 c4 10 add $0x10,%esp
10ebab: 85 c0 test %eax,%eax
10ebad: 74 25 je 10ebd4 <sem_open+0x68>
/*
* 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) ) ) {
10ebaf: 83 f8 02 cmp $0x2,%eax
10ebb2: 75 04 jne 10ebb8 <sem_open+0x4c> <== NEVER TAKEN
10ebb4: 85 ff test %edi,%edi
10ebb6: 75 6c jne 10ec24 <sem_open+0xb8>
_Thread_Enable_dispatch();
10ebb8: e8 b7 28 00 00 call 111474 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10ebbd: e8 92 a5 00 00 call 119154 <__errno>
10ebc2: 89 18 mov %ebx,(%eax)
10ebc4: b8 ff ff ff ff mov $0xffffffff,%eax
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
10ebc9: 8d 65 f4 lea -0xc(%ebp),%esp
10ebcc: 5b pop %ebx
10ebcd: 5e pop %esi
10ebce: 5f pop %edi
10ebcf: c9 leave
10ebd0: c3 ret
10ebd1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10ebd4: 8b 45 0c mov 0xc(%ebp),%eax
10ebd7: 25 00 0a 00 00 and $0xa00,%eax
10ebdc: 3d 00 0a 00 00 cmp $0xa00,%eax
10ebe1: 74 65 je 10ec48 <sem_open+0xdc>
10ebe3: 50 push %eax
10ebe4: 8d 45 dc lea -0x24(%ebp),%eax
10ebe7: 50 push %eax
10ebe8: ff 75 e4 pushl -0x1c(%ebp)
10ebeb: 68 80 f3 12 00 push $0x12f380
10ebf0: e8 bb 1f 00 00 call 110bb0 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
10ebf5: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10ebf8: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10ebfb: e8 74 28 00 00 call 111474 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10ec00: e8 6f 28 00 00 call 111474 <_Thread_Enable_dispatch>
goto return_id;
10ec05: 83 c4 10 add $0x10,%esp
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
10ec08: 8b 45 e0 mov -0x20(%ebp),%eax
10ec0b: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10ec0e: 8d 65 f4 lea -0xc(%ebp),%esp
10ec11: 5b pop %ebx
10ec12: 5e pop %esi
10ec13: 5f pop %edi
10ec14: c9 leave
10ec15: c3 ret
10ec16: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
10ec18: 8b 45 14 mov 0x14(%ebp),%eax
10ec1b: 89 45 d4 mov %eax,-0x2c(%ebp)
10ec1e: e9 76 ff ff ff jmp 10eb99 <sem_open+0x2d>
10ec23: 90 nop
/*
* 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(
10ec24: 8d 45 e0 lea -0x20(%ebp),%eax
10ec27: 50 push %eax
10ec28: ff 75 d4 pushl -0x2c(%ebp)
10ec2b: 6a 00 push $0x0
10ec2d: 56 push %esi
10ec2e: e8 f5 67 00 00 call 115428 <_POSIX_Semaphore_Create_support>
10ec33: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10ec35: e8 3a 28 00 00 call 111474 <_Thread_Enable_dispatch>
if ( status == -1 )
10ec3a: 83 c4 10 add $0x10,%esp
10ec3d: 43 inc %ebx
10ec3e: 75 c8 jne 10ec08 <sem_open+0x9c>
10ec40: b8 ff ff ff ff mov $0xffffffff,%eax
10ec45: eb c7 jmp 10ec0e <sem_open+0xa2>
10ec47: 90 nop
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10ec48: e8 27 28 00 00 call 111474 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10ec4d: e8 02 a5 00 00 call 119154 <__errno>
10ec52: c7 00 11 00 00 00 movl $0x11,(%eax)
10ec58: b8 ff ff ff ff mov $0xffffffff,%eax
10ec5d: eb af jmp 10ec0e <sem_open+0xa2>
0010ec60 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10ec60: 55 push %ebp
10ec61: 89 e5 mov %esp,%ebp
10ec63: 83 ec 1c sub $0x1c,%esp
10ec66: 8d 45 f4 lea -0xc(%ebp),%eax
10ec69: 50 push %eax
10ec6a: 8b 45 08 mov 0x8(%ebp),%eax
10ec6d: ff 30 pushl (%eax)
10ec6f: 68 80 f3 12 00 push $0x12f380
10ec74: e8 37 1f 00 00 call 110bb0 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
10ec79: 83 c4 10 add $0x10,%esp
10ec7c: 8b 4d f4 mov -0xc(%ebp),%ecx
10ec7f: 85 c9 test %ecx,%ecx
10ec81: 74 15 je 10ec98 <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ec83: e8 cc a4 00 00 call 119154 <__errno>
10ec88: c7 00 16 00 00 00 movl $0x16,(%eax)
10ec8e: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ec93: c9 leave
10ec94: c3 ret
10ec95: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10ec98: 52 push %edx
10ec99: 6a 00 push $0x0
10ec9b: ff 70 08 pushl 0x8(%eax)
10ec9e: 83 c0 1c add $0x1c,%eax
10eca1: 50 push %eax
10eca2: e8 55 15 00 00 call 1101fc <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10eca7: e8 c8 27 00 00 call 111474 <_Thread_Enable_dispatch>
10ecac: 31 c0 xor %eax,%eax
return 0;
10ecae: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ecb1: c9 leave
10ecb2: c3 ret
0010ecb4 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10ecb4: 55 push %ebp
10ecb5: 89 e5 mov %esp,%ebp
10ecb7: 53 push %ebx
10ecb8: 83 ec 1c sub $0x1c,%esp
10ecbb: 8b 5d 08 mov 0x8(%ebp),%ebx
*
* 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 );
10ecbe: 8d 45 f4 lea -0xc(%ebp),%eax
10ecc1: 50 push %eax
10ecc2: ff 75 0c pushl 0xc(%ebp)
10ecc5: e8 82 5e 00 00 call 114b4c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10ecca: 83 c4 10 add $0x10,%esp
10eccd: 83 f8 03 cmp $0x3,%eax
10ecd0: 74 16 je 10ece8 <sem_timedwait+0x34> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10ecd2: 50 push %eax <== NOT EXECUTED
10ecd3: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10ecd6: 6a 00 push $0x0 <== NOT EXECUTED
10ecd8: 53 push %ebx <== NOT EXECUTED
10ecd9: e8 12 69 00 00 call 1155f0 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10ecde: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
}
}
return lock_status;
}
10ece1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10ece4: c9 leave <== NOT EXECUTED
10ece5: c3 ret <== NOT EXECUTED
10ece6: 66 90 xchg %ax,%ax <== 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 );
10ece8: 52 push %edx
10ece9: ff 75 f4 pushl -0xc(%ebp)
10ecec: 6a 01 push $0x1
10ecee: 53 push %ebx
10ecef: e8 fc 68 00 00 call 1155f0 <_POSIX_Semaphore_Wait_support>
10ecf4: 83 c4 10 add $0x10,%esp
break;
}
}
return lock_status;
}
10ecf7: 8b 5d fc mov -0x4(%ebp),%ebx
10ecfa: c9 leave
10ecfb: c3 ret
0010b8f8 <setitimer>:
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
10b8f8: 55 push %ebp
10b8f9: 89 e5 mov %esp,%ebp
10b8fb: 83 ec 08 sub $0x8,%esp
if ( !value )
10b8fe: 8b 55 0c mov 0xc(%ebp),%edx
10b901: 85 d2 test %edx,%edx
10b903: 74 33 je 10b938 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
10b905: 8b 45 10 mov 0x10(%ebp),%eax
10b908: 85 c0 test %eax,%eax
10b90a: 74 2c je 10b938 <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b90c: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b910: 76 12 jbe 10b924 <setitimer+0x2c>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b912: e8 6d 9e 00 00 call 115784 <__errno>
10b917: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b91d: b8 ff ff ff ff mov $0xffffffff,%eax
10b922: c9 leave
10b923: c3 ret
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b924: e8 5b 9e 00 00 call 115784 <__errno>
10b929: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b92f: b8 ff ff ff ff mov $0xffffffff,%eax
10b934: c9 leave
10b935: c3 ret
10b936: 66 90 xchg %ax,%ax
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
10b938: e8 47 9e 00 00 call 115784 <__errno>
10b93d: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b943: eb d8 jmp 10b91d <setitimer+0x25>
0010c360 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
10c360: 55 push %ebp
10c361: 89 e5 mov %esp,%ebp
10c363: 57 push %edi
10c364: 56 push %esi
10c365: 53 push %ebx
10c366: 83 ec 1c sub $0x1c,%esp
10c369: 8b 5d 08 mov 0x8(%ebp),%ebx
10c36c: 8b 45 0c mov 0xc(%ebp),%eax
10c36f: 8b 55 10 mov 0x10(%ebp),%edx
ISR_Level level;
if ( oact )
10c372: 85 d2 test %edx,%edx
10c374: 74 13 je 10c389 <sigaction+0x29>
*oact = _POSIX_signals_Vectors[ sig ];
10c376: 8d 0c 5b lea (%ebx,%ebx,2),%ecx
10c379: 8d 34 8d 20 b9 12 00 lea 0x12b920(,%ecx,4),%esi
10c380: b9 03 00 00 00 mov $0x3,%ecx
10c385: 89 d7 mov %edx,%edi
10c387: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10c389: 85 db test %ebx,%ebx
10c38b: 74 6f je 10c3fc <sigaction+0x9c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10c38d: 8d 53 ff lea -0x1(%ebx),%edx
10c390: 83 fa 1f cmp $0x1f,%edx
10c393: 77 67 ja 10c3fc <sigaction+0x9c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10c395: 83 fb 09 cmp $0x9,%ebx
10c398: 74 62 je 10c3fc <sigaction+0x9c>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10c39a: 85 c0 test %eax,%eax
10c39c: 74 37 je 10c3d5 <sigaction+0x75> <== 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 );
10c39e: 9c pushf
10c39f: fa cli
10c3a0: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10c3a3: 8b 50 08 mov 0x8(%eax),%edx
10c3a6: 85 d2 test %edx,%edx
10c3a8: 74 36 je 10c3e0 <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10c3aa: 83 ec 0c sub $0xc,%esp
10c3ad: 53 push %ebx
10c3ae: 89 45 e0 mov %eax,-0x20(%ebp)
10c3b1: e8 1a 61 00 00 call 1124d0 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10c3b6: 8d 14 5b lea (%ebx,%ebx,2),%edx
10c3b9: 8d 3c 95 20 b9 12 00 lea 0x12b920(,%edx,4),%edi
10c3c0: b9 03 00 00 00 mov $0x3,%ecx
10c3c5: 8b 45 e0 mov -0x20(%ebp),%eax
10c3c8: 89 c6 mov %eax,%esi
10c3ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c3cc: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10c3cf: ff 75 e4 pushl -0x1c(%ebp)
10c3d2: 9d popf
10c3d3: 31 c0 xor %eax,%eax
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
10c3d5: 8d 65 f4 lea -0xc(%ebp),%esp
10c3d8: 5b pop %ebx
10c3d9: 5e pop %esi
10c3da: 5f pop %edi
10c3db: c9 leave
10c3dc: c3 ret
10c3dd: 8d 76 00 lea 0x0(%esi),%esi
* 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 ];
10c3e0: 8d 34 5b lea (%ebx,%ebx,2),%esi
10c3e3: c1 e6 02 shl $0x2,%esi
10c3e6: 8d be 20 b9 12 00 lea 0x12b920(%esi),%edi
10c3ec: 81 c6 60 4d 12 00 add $0x124d60,%esi
10c3f2: b9 03 00 00 00 mov $0x3,%ecx
10c3f7: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10c3f9: eb d4 jmp 10c3cf <sigaction+0x6f>
10c3fb: 90 nop
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
10c3fc: e8 a7 9a 00 00 call 115ea8 <__errno>
10c401: c7 00 16 00 00 00 movl $0x16,(%eax)
10c407: b8 ff ff ff ff mov $0xffffffff,%eax
10c40c: eb c7 jmp 10c3d5 <sigaction+0x75>
0010e064 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
10e064: 55 push %ebp
10e065: 89 e5 mov %esp,%ebp
10e067: 56 push %esi
10e068: 53 push %ebx
10e069: 83 ec 14 sub $0x14,%esp
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
10e06c: 8d 5d f4 lea -0xc(%ebp),%ebx
10e06f: 53 push %ebx
10e070: ff 75 08 pushl 0x8(%ebp)
10e073: 6a 01 push $0x1
10e075: e8 c6 ff ff ff call 10e040 <sigprocmask>
(void) sigfillset( &all_signals );
10e07a: 8d 75 f0 lea -0x10(%ebp),%esi
10e07d: 89 34 24 mov %esi,(%esp)
10e080: e8 0f ff ff ff call 10df94 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
10e085: 83 c4 0c add $0xc,%esp
10e088: 6a 00 push $0x0
10e08a: 6a 00 push $0x0
10e08c: 56 push %esi
10e08d: e8 76 00 00 00 call 10e108 <sigtimedwait>
10e092: 89 c6 mov %eax,%esi
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
10e094: 83 c4 0c add $0xc,%esp
10e097: 6a 00 push $0x0
10e099: 53 push %ebx
10e09a: 6a 00 push $0x0
10e09c: e8 9f ff ff ff call 10e040 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
10e0a1: 83 c4 10 add $0x10,%esp
10e0a4: 46 inc %esi
10e0a5: 75 0d jne 10e0b4 <sigsuspend+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
10e0a7: b8 ff ff ff ff mov $0xffffffff,%eax
10e0ac: 8d 65 f8 lea -0x8(%ebp),%esp
10e0af: 5b pop %ebx
10e0b0: 5e pop %esi
10e0b1: c9 leave
10e0b2: c3 ret
10e0b3: 90 nop
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
10e0b4: e8 9b 98 00 00 call 117954 <__errno>
10e0b9: c7 00 04 00 00 00 movl $0x4,(%eax)
10e0bf: eb e6 jmp 10e0a7 <sigsuspend+0x43>
0010c70c <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c70c: 55 push %ebp
10c70d: 89 e5 mov %esp,%ebp
10c70f: 57 push %edi
10c710: 56 push %esi
10c711: 53 push %ebx
10c712: 83 ec 2c sub $0x2c,%esp
10c715: 8b 75 08 mov 0x8(%ebp),%esi
10c718: 8b 5d 0c mov 0xc(%ebp),%ebx
10c71b: 8b 7d 10 mov 0x10(%ebp),%edi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c71e: 85 f6 test %esi,%esi
10c720: 0f 84 7a 01 00 00 je 10c8a0 <sigtimedwait+0x194>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c726: 85 ff test %edi,%edi
10c728: 0f 84 1e 01 00 00 je 10c84c <sigtimedwait+0x140>
if ( !_Timespec_Is_valid( timeout ) )
10c72e: 83 ec 0c sub $0xc,%esp
10c731: 57 push %edi
10c732: e8 d1 34 00 00 call 10fc08 <_Timespec_Is_valid>
10c737: 83 c4 10 add $0x10,%esp
10c73a: 84 c0 test %al,%al
10c73c: 0f 84 5e 01 00 00 je 10c8a0 <sigtimedwait+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c742: 83 ec 0c sub $0xc,%esp
10c745: 57 push %edi
10c746: e8 21 35 00 00 call 10fc6c <_Timespec_To_ticks>
if ( !interval )
10c74b: 83 c4 10 add $0x10,%esp
10c74e: 85 c0 test %eax,%eax
10c750: 0f 84 4a 01 00 00 je 10c8a0 <sigtimedwait+0x194> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c756: 85 db test %ebx,%ebx
10c758: 0f 84 f8 00 00 00 je 10c856 <sigtimedwait+0x14a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c75e: 8b 15 98 b7 12 00 mov 0x12b798,%edx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c764: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c76a: 9c pushf
10c76b: fa cli
10c76c: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10c76f: 8b 0e mov (%esi),%ecx
10c771: 89 4d d4 mov %ecx,-0x2c(%ebp)
10c774: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx
10c77a: 85 4d d4 test %ecx,-0x2c(%ebp)
10c77d: 0f 85 dd 00 00 00 jne 10c860 <sigtimedwait+0x154>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c783: 8b 0d c8 be 12 00 mov 0x12bec8,%ecx
10c789: 85 4d d4 test %ecx,-0x2c(%ebp)
10c78c: 75 7e jne 10c80c <sigtimedwait+0x100> <== NEVER TAKEN
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c78e: c7 03 ff ff ff ff movl $0xffffffff,(%ebx)
10c794: 8b 0d d8 b6 12 00 mov 0x12b6d8,%ecx
10c79a: 41 inc %ecx
10c79b: 89 0d d8 b6 12 00 mov %ecx,0x12b6d8
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c7a1: c7 42 44 60 be 12 00 movl $0x12be60,0x44(%edx)
the_thread->Wait.return_code = EINTR;
10c7a8: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx)
the_thread->Wait.option = *set;
10c7af: 8b 0e mov (%esi),%ecx
10c7b1: 89 4a 30 mov %ecx,0x30(%edx)
the_thread->Wait.return_argument = the_info;
10c7b4: 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;
10c7b7: c7 05 90 be 12 00 01 movl $0x1,0x12be90
10c7be: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c7c1: ff 75 d0 pushl -0x30(%ebp)
10c7c4: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c7c5: 52 push %edx
10c7c6: 68 ac f7 10 00 push $0x10f7ac
10c7cb: 50 push %eax
10c7cc: 68 60 be 12 00 push $0x12be60
10c7d1: e8 c6 2c 00 00 call 10f49c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c7d6: e8 89 27 00 00 call 10ef64 <_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 );
10c7db: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c7e2: 6a 00 push $0x0
10c7e4: 53 push %ebx
10c7e5: ff 33 pushl (%ebx)
10c7e7: 57 push %edi
10c7e8: e8 3f 63 00 00 call 112b2c <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
10c7ed: 83 c4 20 add $0x20,%esp
10c7f0: e8 b3 99 00 00 call 1161a8 <__errno>
10c7f5: 8b 15 98 b7 12 00 mov 0x12b798,%edx
10c7fb: 8b 52 34 mov 0x34(%edx),%edx
10c7fe: 89 10 mov %edx,(%eax)
return the_info->si_signo;
10c800: 8b 33 mov (%ebx),%esi
}
10c802: 89 f0 mov %esi,%eax
10c804: 8d 65 f4 lea -0xc(%ebp),%esp
10c807: 5b pop %ebx
10c808: 5e pop %esi
10c809: 5f pop %edi
10c80a: c9 leave
10c80b: c3 ret
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
10c80c: 83 ec 0c sub $0xc,%esp
10c80f: 51 push %ecx
10c810: e8 b3 fe ff ff call 10c6c8 <_POSIX_signals_Get_highest>
10c815: 89 c6 mov %eax,%esi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c817: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c81e: 6a 01 push $0x1
10c820: 53 push %ebx
10c821: 50 push %eax
10c822: 57 push %edi
10c823: e8 04 63 00 00 call 112b2c <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c828: ff 75 d0 pushl -0x30(%ebp)
10c82b: 9d popf
the_info->si_signo = signo;
10c82c: 89 33 mov %esi,(%ebx)
the_info->si_code = SI_USER;
10c82e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c835: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return signo;
10c83c: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10c83f: 89 f0 mov %esi,%eax
10c841: 8d 65 f4 lea -0xc(%ebp),%esp
10c844: 5b pop %ebx
10c845: 5e pop %esi
10c846: 5f pop %edi
10c847: c9 leave
10c848: c3 ret
10c849: 8d 76 00 lea 0x0(%esi),%esi
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c84c: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c84e: 85 db test %ebx,%ebx
10c850: 0f 85 08 ff ff ff jne 10c75e <sigtimedwait+0x52>
10c856: 8d 5d dc lea -0x24(%ebp),%ebx
10c859: e9 00 ff ff ff jmp 10c75e <sigtimedwait+0x52>
10c85e: 66 90 xchg %ax,%ax
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
10c860: 83 ec 0c sub $0xc,%esp
10c863: 51 push %ecx
10c864: e8 5f fe ff ff call 10c6c8 <_POSIX_signals_Get_highest>
10c869: 89 03 mov %eax,(%ebx)
_POSIX_signals_Clear_signals(
10c86b: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c872: 6a 00 push $0x0
10c874: 53 push %ebx
10c875: 50 push %eax
10c876: 57 push %edi
10c877: e8 b0 62 00 00 call 112b2c <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c87c: ff 75 d0 pushl -0x30(%ebp)
10c87f: 9d popf
the_info->si_code = SI_USER;
10c880: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
the_info->si_value.sival_int = 0;
10c887: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
return the_info->si_signo;
10c88e: 8b 33 mov (%ebx),%esi
10c890: 83 c4 20 add $0x20,%esp
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
errno = _Thread_Executing->Wait.return_code;
return the_info->si_signo;
}
10c893: 89 f0 mov %esi,%eax
10c895: 8d 65 f4 lea -0xc(%ebp),%esp
10c898: 5b pop %ebx
10c899: 5e pop %esi
10c89a: 5f pop %edi
10c89b: c9 leave
10c89c: c3 ret
10c89d: 8d 76 00 lea 0x0(%esi),%esi
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c8a0: e8 03 99 00 00 call 1161a8 <__errno>
10c8a5: c7 00 16 00 00 00 movl $0x16,(%eax)
10c8ab: be ff ff ff ff mov $0xffffffff,%esi
10c8b0: e9 4d ff ff ff jmp 10c802 <sigtimedwait+0xf6>
0010e2cc <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10e2cc: 55 push %ebp
10e2cd: 89 e5 mov %esp,%ebp
10e2cf: 53 push %ebx
10e2d0: 83 ec 08 sub $0x8,%esp
10e2d3: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10e2d6: 6a 00 push $0x0
10e2d8: 6a 00 push $0x0
10e2da: ff 75 08 pushl 0x8(%ebp)
10e2dd: e8 26 fe ff ff call 10e108 <sigtimedwait>
if ( status != -1 ) {
10e2e2: 83 c4 10 add $0x10,%esp
10e2e5: 83 f8 ff cmp $0xffffffff,%eax
10e2e8: 74 0e je 10e2f8 <sigwait+0x2c>
if ( sig )
10e2ea: 85 db test %ebx,%ebx
10e2ec: 74 02 je 10e2f0 <sigwait+0x24> <== NEVER TAKEN
*sig = status;
10e2ee: 89 03 mov %eax,(%ebx)
10e2f0: 31 c0 xor %eax,%eax
return 0;
}
return errno;
}
10e2f2: 8b 5d fc mov -0x4(%ebp),%ebx
10e2f5: c9 leave
10e2f6: c3 ret
10e2f7: 90 nop
if ( sig )
*sig = status;
return 0;
}
return errno;
10e2f8: e8 57 96 00 00 call 117954 <__errno>
10e2fd: 8b 00 mov (%eax),%eax
}
10e2ff: 8b 5d fc mov -0x4(%ebp),%ebx
10e302: c9 leave
10e303: c3 ret
0010b7b8 <sysconf>:
*/
long sysconf(
int name
)
{
10b7b8: 55 push %ebp
10b7b9: 89 e5 mov %esp,%ebp
10b7bb: 83 ec 08 sub $0x8,%esp
10b7be: 8b 45 08 mov 0x8(%ebp),%eax
if ( name == _SC_CLK_TCK )
10b7c1: 83 f8 02 cmp $0x2,%eax
10b7c4: 74 16 je 10b7dc <sysconf+0x24>
return (TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
10b7c6: 83 f8 04 cmp $0x4,%eax
10b7c9: 74 21 je 10b7ec <sysconf+0x34>
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b7cb: 83 f8 33 cmp $0x33,%eax
10b7ce: 74 24 je 10b7f4 <sysconf+0x3c>
return 1024;
if ( name == _SC_PAGESIZE )
10b7d0: 83 f8 08 cmp $0x8,%eax
10b7d3: 75 27 jne 10b7fc <sysconf+0x44>
10b7d5: 66 b8 00 10 mov $0x1000,%ax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7d9: c9 leave
10b7da: c3 ret
10b7db: 90 nop
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
return (TOD_MICROSECONDS_PER_SECOND /
10b7dc: b8 40 42 0f 00 mov $0xf4240,%eax
10b7e1: 31 d2 xor %edx,%edx
10b7e3: f7 35 0c 64 12 00 divl 0x12640c
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7e9: c9 leave
10b7ea: c3 ret
10b7eb: 90 nop
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;
10b7ec: a1 ec 62 12 00 mov 0x1262ec,%eax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7f1: c9 leave
10b7f2: c3 ret
10b7f3: 90 nop
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
10b7f4: 66 b8 00 04 mov $0x400,%ax
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b7f8: c9 leave
10b7f9: c3 ret
10b7fa: 66 90 xchg %ax,%ax
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b7fc: e8 43 9e 00 00 call 115644 <__errno>
10b801: c7 00 16 00 00 00 movl $0x16,(%eax)
10b807: b8 ff ff ff ff mov $0xffffffff,%eax
}
10b80c: c9 leave
10b80d: c3 ret
0010baf8 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10baf8: 55 push %ebp
10baf9: 89 e5 mov %esp,%ebp
10bafb: 56 push %esi
10bafc: 53 push %ebx
10bafd: 8b 5d 0c mov 0xc(%ebp),%ebx
10bb00: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10bb03: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10bb07: 0f 85 db 00 00 00 jne 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10bb0d: 85 f6 test %esi,%esi
10bb0f: 0f 84 d3 00 00 00 je 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10bb15: 85 db test %ebx,%ebx
10bb17: 74 21 je 10bb3a <timer_create+0x42>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10bb19: 8b 03 mov (%ebx),%eax
10bb1b: 48 dec %eax
10bb1c: 83 f8 01 cmp $0x1,%eax
10bb1f: 0f 87 c3 00 00 00 ja 10bbe8 <timer_create+0xf0> <== 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 )
10bb25: 8b 43 04 mov 0x4(%ebx),%eax
10bb28: 85 c0 test %eax,%eax
10bb2a: 0f 84 b8 00 00 00 je 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10bb30: 48 dec %eax
10bb31: 83 f8 1f cmp $0x1f,%eax
10bb34: 0f 87 ae 00 00 00 ja 10bbe8 <timer_create+0xf0> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10bb3a: a1 b8 b2 12 00 mov 0x12b2b8,%eax
10bb3f: 40 inc %eax
10bb40: a3 b8 b2 12 00 mov %eax,0x12b2b8
* 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 );
10bb45: 83 ec 0c sub $0xc,%esp
10bb48: 68 40 b6 12 00 push $0x12b640
10bb4d: e8 42 1e 00 00 call 10d994 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10bb52: 83 c4 10 add $0x10,%esp
10bb55: 85 c0 test %eax,%eax
10bb57: 0f 84 a2 00 00 00 je 10bbff <timer_create+0x107> <== NEVER TAKEN
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;
10bb5d: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10bb61: 8b 15 78 b3 12 00 mov 0x12b378,%edx
10bb67: 8b 52 08 mov 0x8(%edx),%edx
10bb6a: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10bb6d: 85 db test %ebx,%ebx
10bb6f: 74 11 je 10bb82 <timer_create+0x8a>
ptimer->inf.sigev_notify = evp->sigev_notify;
10bb71: 8b 13 mov (%ebx),%edx
10bb73: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10bb76: 8b 53 04 mov 0x4(%ebx),%edx
10bb79: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10bb7c: 8b 53 08 mov 0x8(%ebx),%edx
10bb7f: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10bb82: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10bb89: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10bb90: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10bb97: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10bb9e: 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;
10bba5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10bbac: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10bbb3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10bbba: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10bbc1: 8b 50 08 mov 0x8(%eax),%edx
10bbc4: 0f b7 da movzwl %dx,%ebx
10bbc7: 8b 0d 5c b6 12 00 mov 0x12b65c,%ecx
10bbcd: 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;
10bbd0: 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;
10bbd7: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10bbd9: e8 da 2a 00 00 call 10e6b8 <_Thread_Enable_dispatch>
10bbde: 31 c0 xor %eax,%eax
return 0;
}
10bbe0: 8d 65 f8 lea -0x8(%ebp),%esp
10bbe3: 5b pop %ebx
10bbe4: 5e pop %esi
10bbe5: c9 leave
10bbe6: c3 ret
10bbe7: 90 nop
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 );
10bbe8: e8 b7 9f 00 00 call 115ba4 <__errno>
10bbed: c7 00 16 00 00 00 movl $0x16,(%eax)
10bbf3: 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;
}
10bbf8: 8d 65 f8 lea -0x8(%ebp),%esp
10bbfb: 5b pop %ebx
10bbfc: 5e pop %esi
10bbfd: c9 leave
10bbfe: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10bbff: e8 b4 2a 00 00 call 10e6b8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10bc04: e8 9b 9f 00 00 call 115ba4 <__errno>
10bc09: c7 00 0b 00 00 00 movl $0xb,(%eax)
10bc0f: b8 ff ff ff ff mov $0xffffffff,%eax
10bc14: eb ca jmp 10bbe0 <timer_create+0xe8>
0010c038 <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10c038: 55 push %ebp
10c039: 89 e5 mov %esp,%ebp
10c03b: 53 push %ebx
10c03c: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10c03f: 8d 45 f4 lea -0xc(%ebp),%eax
10c042: 50 push %eax
10c043: ff 75 08 pushl 0x8(%ebp)
10c046: 68 40 b8 12 00 push $0x12b840
10c04b: e8 4c 21 00 00 call 10e19c <_Objects_Get>
10c050: 89 c3 mov %eax,%ebx
*/
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10c052: 83 c4 10 add $0x10,%esp
10c055: 8b 4d f4 mov -0xc(%ebp),%ecx
10c058: 85 c9 test %ecx,%ecx
10c05a: 74 18 je 10c074 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c05c: e8 a7 a2 00 00 call 116308 <__errno>
10c061: c7 00 16 00 00 00 movl $0x16,(%eax)
10c067: b8 ff ff ff ff mov $0xffffffff,%eax
}
10c06c: 8b 5d fc mov -0x4(%ebp),%ebx
10c06f: c9 leave
10c070: c3 ret
10c071: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10c074: 83 ec 08 sub $0x8,%esp
10c077: 50 push %eax
10c078: 68 40 b8 12 00 push $0x12b840
10c07d: e8 e6 1c 00 00 call 10dd68 <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10c082: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10c086: 8d 43 10 lea 0x10(%ebx),%eax
10c089: 89 04 24 mov %eax,(%esp)
10c08c: e8 eb 3a 00 00 call 10fb7c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
10c091: 58 pop %eax
10c092: 5a pop %edx
10c093: 53 push %ebx
10c094: 68 40 b8 12 00 push $0x12b840
10c099: e8 ce 1f 00 00 call 10e06c <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10c09e: e8 6d 29 00 00 call 10ea10 <_Thread_Enable_dispatch>
10c0a3: 31 c0 xor %eax,%eax
return 0;
10c0a5: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c0a8: 8b 5d fc mov -0x4(%ebp),%ebx
10c0ab: c9 leave
10c0ac: c3 ret
0010cf00 <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10cf00: 55 push %ebp
10cf01: 89 e5 mov %esp,%ebp
10cf03: 53 push %ebx
10cf04: 83 ec 18 sub $0x18,%esp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10cf07: 8d 45 f4 lea -0xc(%ebp),%eax
10cf0a: 50 push %eax
10cf0b: ff 75 08 pushl 0x8(%ebp)
10cf0e: 68 e0 cf 12 00 push $0x12cfe0
10cf13: e8 d4 20 00 00 call 10efec <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10cf18: 83 c4 10 add $0x10,%esp
10cf1b: 8b 55 f4 mov -0xc(%ebp),%edx
10cf1e: 85 d2 test %edx,%edx
10cf20: 74 1a je 10cf3c <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10cf22: e8 55 9e 00 00 call 116d7c <__errno>
10cf27: c7 00 16 00 00 00 movl $0x16,(%eax)
10cf2d: bb ff ff ff ff mov $0xffffffff,%ebx
}
10cf32: 89 d8 mov %ebx,%eax
10cf34: 8b 5d fc mov -0x4(%ebp),%ebx
10cf37: c9 leave
10cf38: c3 ret
10cf39: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10cf3c: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10cf3f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10cf46: e8 15 29 00 00 call 10f860 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10cf4b: 89 d8 mov %ebx,%eax
10cf4d: 8b 5d fc mov -0x4(%ebp),%ebx
10cf50: c9 leave
10cf51: c3 ret
0010cf54 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10cf54: 55 push %ebp
10cf55: 89 e5 mov %esp,%ebp
10cf57: 56 push %esi
10cf58: 53 push %ebx
10cf59: 83 ec 10 sub $0x10,%esp
10cf5c: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10cf5f: 85 db test %ebx,%ebx
10cf61: 74 65 je 10cfc8 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10cf63: 83 ec 0c sub $0xc,%esp
10cf66: 8d 45 ec lea -0x14(%ebp),%eax
10cf69: 50 push %eax
10cf6a: e8 e5 16 00 00 call 10e654 <_TOD_Get>
10cf6f: 83 c4 0c add $0xc,%esp
10cf72: 8d 45 f4 lea -0xc(%ebp),%eax
10cf75: 50 push %eax
10cf76: ff 75 08 pushl 0x8(%ebp)
10cf79: 68 e0 cf 12 00 push $0x12cfe0
10cf7e: e8 69 20 00 00 call 10efec <_Objects_Get>
10cf83: 89 c6 mov %eax,%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10cf85: 83 c4 10 add $0x10,%esp
10cf88: 8b 45 f4 mov -0xc(%ebp),%eax
10cf8b: 85 c0 test %eax,%eax
10cf8d: 75 39 jne 10cfc8 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10cf8f: a1 c4 cd 12 00 mov 0x12cdc4,%eax
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10cf94: 83 ec 08 sub $0x8,%esp
10cf97: 8d 53 08 lea 0x8(%ebx),%edx
10cf9a: 52 push %edx
10cf9b: 8b 56 1c mov 0x1c(%esi),%edx
10cf9e: 03 56 24 add 0x24(%esi),%edx
10cfa1: 29 c2 sub %eax,%edx
10cfa3: 52 push %edx
10cfa4: e8 5b 35 00 00 call 110504 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10cfa9: 8b 46 54 mov 0x54(%esi),%eax
10cfac: 8b 56 58 mov 0x58(%esi),%edx
10cfaf: 89 03 mov %eax,(%ebx)
10cfb1: 89 53 04 mov %edx,0x4(%ebx)
_Thread_Enable_dispatch();
10cfb4: e8 a7 28 00 00 call 10f860 <_Thread_Enable_dispatch>
10cfb9: 31 c0 xor %eax,%eax
return 0;
10cfbb: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10cfbe: 8d 65 f8 lea -0x8(%ebp),%esp
10cfc1: 5b pop %ebx
10cfc2: 5e pop %esi
10cfc3: c9 leave
10cfc4: c3 ret
10cfc5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10cfc8: e8 af 9d 00 00 call 116d7c <__errno>
10cfcd: c7 00 16 00 00 00 movl $0x16,(%eax)
10cfd3: b8 ff ff ff ff mov $0xffffffff,%eax
10cfd8: eb e4 jmp 10cfbe <timer_gettime+0x6a>
0010bc18 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10bc18: 55 push %ebp
10bc19: 89 e5 mov %esp,%ebp
10bc1b: 57 push %edi
10bc1c: 56 push %esi
10bc1d: 53 push %ebx
10bc1e: 83 ec 3c sub $0x3c,%esp
10bc21: 8b 4d 0c mov 0xc(%ebp),%ecx
10bc24: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10bc27: 85 db test %ebx,%ebx
10bc29: 0f 84 39 01 00 00 je 10bd68 <timer_settime+0x150> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
10bc2f: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx)
10bc36: 0f 87 2c 01 00 00 ja 10bd68 <timer_settime+0x150>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
10bc3c: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx)
10bc43: 0f 87 1f 01 00 00 ja 10bd68 <timer_settime+0x150> <== NEVER TAKEN
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10bc49: 83 f9 04 cmp $0x4,%ecx
10bc4c: 0f 84 da 00 00 00 je 10bd2c <timer_settime+0x114>
10bc52: 85 c9 test %ecx,%ecx
10bc54: 0f 85 0e 01 00 00 jne 10bd68 <timer_settime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10bc5a: 8d 45 cc lea -0x34(%ebp),%eax
10bc5d: 89 45 c4 mov %eax,-0x3c(%ebp)
10bc60: b9 04 00 00 00 mov $0x4,%ecx
10bc65: 89 c7 mov %eax,%edi
10bc67: 89 de mov %ebx,%esi
10bc69: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
10bc6b: 50 push %eax
10bc6c: 8d 45 e4 lea -0x1c(%ebp),%eax
10bc6f: 50 push %eax
10bc70: ff 75 08 pushl 0x8(%ebp)
10bc73: 68 40 b6 12 00 push $0x12b640
10bc78: e8 c7 21 00 00 call 10de44 <_Objects_Get>
10bc7d: 89 c2 mov %eax,%edx
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
10bc7f: 83 c4 10 add $0x10,%esp
10bc82: 8b 7d e4 mov -0x1c(%ebp),%edi
10bc85: 85 ff test %edi,%edi
10bc87: 0f 85 db 00 00 00 jne 10bd68 <timer_settime+0x150>
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 ) {
10bc8d: 8b 75 d4 mov -0x2c(%ebp),%esi
10bc90: 85 f6 test %esi,%esi
10bc92: 75 0b jne 10bc9f <timer_settime+0x87>
10bc94: 8b 4d d8 mov -0x28(%ebp),%ecx
10bc97: 85 c9 test %ecx,%ecx
10bc99: 0f 84 e1 00 00 00 je 10bd80 <timer_settime+0x168>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10bc9f: 83 ec 0c sub $0xc,%esp
10bca2: 53 push %ebx
10bca3: 89 55 c0 mov %edx,-0x40(%ebp)
10bca6: e8 11 37 00 00 call 10f3bc <_Timespec_To_ticks>
10bcab: 8b 55 c0 mov -0x40(%ebp),%edx
10bcae: 89 42 64 mov %eax,0x64(%edx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10bcb1: 8d 45 d4 lea -0x2c(%ebp),%eax
10bcb4: 89 04 24 mov %eax,(%esp)
10bcb7: e8 00 37 00 00 call 10f3bc <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10bcbc: 8b 55 c0 mov -0x40(%ebp),%edx
10bcbf: 89 14 24 mov %edx,(%esp)
10bcc2: 68 ec bd 10 00 push $0x10bdec
10bcc7: ff 72 08 pushl 0x8(%edx)
10bcca: 50 push %eax
10bccb: 8d 42 10 lea 0x10(%edx),%eax
10bcce: 50 push %eax
10bccf: e8 1c 68 00 00 call 1124f0 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10bcd4: 83 c4 20 add $0x20,%esp
10bcd7: 84 c0 test %al,%al
10bcd9: 8b 55 c0 mov -0x40(%ebp),%edx
10bcdc: 0f 84 ea 00 00 00 je 10bdcc <timer_settime+0x1b4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10bce2: 8b 45 14 mov 0x14(%ebp),%eax
10bce5: 85 c0 test %eax,%eax
10bce7: 0f 84 ef 00 00 00 je 10bddc <timer_settime+0x1c4>
*ovalue = ptimer->timer_data;
10bced: 8d 42 54 lea 0x54(%edx),%eax
10bcf0: b9 04 00 00 00 mov $0x4,%ecx
10bcf5: 8b 7d 14 mov 0x14(%ebp),%edi
10bcf8: 89 c6 mov %eax,%esi
10bcfa: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10bcfc: b9 04 00 00 00 mov $0x4,%ecx
10bd01: 89 c7 mov %eax,%edi
10bd03: 8b 75 c4 mov -0x3c(%ebp),%esi
10bd06: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10bd08: c6 42 3c 03 movb $0x3,0x3c(%edx)
_TOD_Get( &ptimer->time );
10bd0c: 83 ec 0c sub $0xc,%esp
10bd0f: 83 c2 6c add $0x6c,%edx
10bd12: 52 push %edx
10bd13: e8 b8 17 00 00 call 10d4d0 <_TOD_Get>
_Thread_Enable_dispatch();
10bd18: e8 9b 29 00 00 call 10e6b8 <_Thread_Enable_dispatch>
10bd1d: 31 c0 xor %eax,%eax
return 0;
10bd1f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bd22: 8d 65 f4 lea -0xc(%ebp),%esp
10bd25: 5b pop %ebx
10bd26: 5e pop %esi
10bd27: 5f pop %edi
10bd28: c9 leave
10bd29: c3 ret
10bd2a: 66 90 xchg %ax,%ax
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10bd2c: 8d 45 cc lea -0x34(%ebp),%eax
10bd2f: 89 45 c4 mov %eax,-0x3c(%ebp)
10bd32: 89 c7 mov %eax,%edi
10bd34: 89 de mov %ebx,%esi
10bd36: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
10bd38: 83 ec 0c sub $0xc,%esp
10bd3b: 8d 75 dc lea -0x24(%ebp),%esi
10bd3e: 56 push %esi
10bd3f: e8 8c 17 00 00 call 10d4d0 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10bd44: 59 pop %ecx
10bd45: 5f pop %edi
10bd46: 8d 7d d4 lea -0x2c(%ebp),%edi
10bd49: 57 push %edi
10bd4a: 56 push %esi
10bd4b: e8 0c 36 00 00 call 10f35c <_Timespec_Greater_than>
10bd50: 83 c4 10 add $0x10,%esp
10bd53: 84 c0 test %al,%al
10bd55: 75 11 jne 10bd68 <timer_settime+0x150>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10bd57: 52 push %edx
10bd58: 57 push %edi
10bd59: 57 push %edi
10bd5a: 56 push %esi
10bd5b: e8 20 36 00 00 call 10f380 <_Timespec_Subtract>
10bd60: 83 c4 10 add $0x10,%esp
10bd63: e9 03 ff ff ff jmp 10bc6b <timer_settime+0x53>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10bd68: e8 37 9e 00 00 call 115ba4 <__errno>
10bd6d: c7 00 16 00 00 00 movl $0x16,(%eax)
10bd73: b8 ff ff ff ff mov $0xffffffff,%eax
}
10bd78: 8d 65 f4 lea -0xc(%ebp),%esp
10bd7b: 5b pop %ebx
10bd7c: 5e pop %esi
10bd7d: 5f pop %edi
10bd7e: c9 leave
10bd7f: c3 ret
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 );
10bd80: 83 ec 0c sub $0xc,%esp
10bd83: 8d 40 10 lea 0x10(%eax),%eax
10bd86: 50 push %eax
10bd87: 89 55 c0 mov %edx,-0x40(%ebp)
10bd8a: e8 4d 3a 00 00 call 10f7dc <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10bd8f: 83 c4 10 add $0x10,%esp
10bd92: 8b 55 14 mov 0x14(%ebp),%edx
10bd95: 85 d2 test %edx,%edx
10bd97: 8b 55 c0 mov -0x40(%ebp),%edx
10bd9a: 74 48 je 10bde4 <timer_settime+0x1cc>
*ovalue = ptimer->timer_data;
10bd9c: 8d 42 54 lea 0x54(%edx),%eax
10bd9f: b9 04 00 00 00 mov $0x4,%ecx
10bda4: 8b 7d 14 mov 0x14(%ebp),%edi
10bda7: 89 c6 mov %eax,%esi
10bda9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10bdab: b9 04 00 00 00 mov $0x4,%ecx
10bdb0: 89 c7 mov %eax,%edi
10bdb2: 8b 75 c4 mov -0x3c(%ebp),%esi
10bdb5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10bdb7: c6 42 3c 04 movb $0x4,0x3c(%edx)
/* Returns with success */
_Thread_Enable_dispatch();
10bdbb: e8 f8 28 00 00 call 10e6b8 <_Thread_Enable_dispatch>
10bdc0: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bdc2: 8d 65 f4 lea -0xc(%ebp),%esp
10bdc5: 5b pop %ebx
10bdc6: 5e pop %esi
10bdc7: 5f pop %edi
10bdc8: c9 leave
10bdc9: c3 ret
10bdca: 66 90 xchg %ax,%ax
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10bdcc: e8 e7 28 00 00 call 10e6b8 <_Thread_Enable_dispatch>
10bdd1: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bdd3: 8d 65 f4 lea -0xc(%ebp),%esp
10bdd6: 5b pop %ebx
10bdd7: 5e pop %esi
10bdd8: 5f pop %edi
10bdd9: c9 leave
10bdda: c3 ret
10bddb: 90 nop
10bddc: 8d 42 54 lea 0x54(%edx),%eax
10bddf: e9 18 ff ff ff jmp 10bcfc <timer_settime+0xe4>
10bde4: 8d 42 54 lea 0x54(%edx),%eax
10bde7: eb c2 jmp 10bdab <timer_settime+0x193>
0010b9d0 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b9d0: 55 push %ebp
10b9d1: 89 e5 mov %esp,%ebp
10b9d3: 57 push %edi
10b9d4: 56 push %esi
10b9d5: 53 push %ebx
10b9d6: 83 ec 2c sub $0x2c,%esp
10b9d9: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b9dc: 8b 0d 7c b8 12 00 mov 0x12b87c,%ecx
10b9e2: 85 c9 test %ecx,%ecx
10b9e4: 0f 84 8e 00 00 00 je 10ba78 <ualarm+0xa8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b9ea: 83 ec 0c sub $0xc,%esp
10b9ed: 68 60 b8 12 00 push $0x12b860
10b9f2: e8 91 39 00 00 call 10f388 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b9f7: 83 e8 02 sub $0x2,%eax
10b9fa: 83 c4 10 add $0x10,%esp
10b9fd: 83 f8 01 cmp $0x1,%eax
10ba00: 0f 86 a2 00 00 00 jbe 10baa8 <ualarm+0xd8> <== ALWAYS TAKEN
10ba06: 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 ) {
10ba08: 85 db test %ebx,%ebx
10ba0a: 74 62 je 10ba6e <ualarm+0x9e>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10ba0c: ba 83 de 1b 43 mov $0x431bde83,%edx
10ba11: 89 d8 mov %ebx,%eax
10ba13: f7 e2 mul %edx
10ba15: c1 ea 12 shr $0x12,%edx
10ba18: 89 55 e0 mov %edx,-0x20(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10ba1b: 8d 04 92 lea (%edx,%edx,4),%eax
10ba1e: 8d 04 80 lea (%eax,%eax,4),%eax
10ba21: 8d 04 80 lea (%eax,%eax,4),%eax
10ba24: 8d 04 80 lea (%eax,%eax,4),%eax
10ba27: 8d 04 80 lea (%eax,%eax,4),%eax
10ba2a: 8d 04 80 lea (%eax,%eax,4),%eax
10ba2d: c1 e0 06 shl $0x6,%eax
10ba30: 29 c3 sub %eax,%ebx
10ba32: 8d 04 9b lea (%ebx,%ebx,4),%eax
10ba35: 8d 04 80 lea (%eax,%eax,4),%eax
10ba38: 8d 04 80 lea (%eax,%eax,4),%eax
10ba3b: c1 e0 03 shl $0x3,%eax
10ba3e: 89 45 e4 mov %eax,-0x1c(%ebp)
ticks = _Timespec_To_ticks( &tp );
10ba41: 83 ec 0c sub $0xc,%esp
10ba44: 8d 5d e0 lea -0x20(%ebp),%ebx
10ba47: 53 push %ebx
10ba48: e8 a3 34 00 00 call 10eef0 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10ba4d: 89 1c 24 mov %ebx,(%esp)
10ba50: e8 9b 34 00 00 call 10eef0 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10ba55: a3 6c b8 12 00 mov %eax,0x12b86c
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10ba5a: 58 pop %eax
10ba5b: 5a pop %edx
10ba5c: 68 60 b8 12 00 push $0x12b860
10ba61: 68 b8 af 12 00 push $0x12afb8
10ba66: e8 e5 37 00 00 call 10f250 <_Watchdog_Insert>
10ba6b: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10ba6e: 89 f0 mov %esi,%eax
10ba70: 8d 65 f4 lea -0xc(%ebp),%esp
10ba73: 5b pop %ebx
10ba74: 5e pop %esi
10ba75: 5f pop %edi
10ba76: c9 leave
10ba77: c3 ret
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ba78: c7 05 68 b8 12 00 00 movl $0x0,0x12b868
10ba7f: 00 00 00
the_watchdog->routine = routine;
10ba82: c7 05 7c b8 12 00 04 movl $0x10bb04,0x12b87c
10ba89: bb 10 00
the_watchdog->id = id;
10ba8c: c7 05 80 b8 12 00 00 movl $0x0,0x12b880
10ba93: 00 00 00
the_watchdog->user_data = user_data;
10ba96: c7 05 84 b8 12 00 00 movl $0x0,0x12b884
10ba9d: 00 00 00
10baa0: 31 f6 xor %esi,%esi
10baa2: e9 61 ff ff ff jmp 10ba08 <ualarm+0x38>
10baa7: 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);
10baa8: a1 74 b8 12 00 mov 0x12b874,%eax
10baad: 03 05 6c b8 12 00 add 0x12b86c,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10bab3: 83 ec 08 sub $0x8,%esp
10bab6: 8d 55 e0 lea -0x20(%ebp),%edx
10bab9: 52 push %edx
10baba: 2b 05 78 b8 12 00 sub 0x12b878,%eax
10bac0: 50 push %eax
10bac1: e8 a6 33 00 00 call 10ee6c <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10bac6: 8b 45 e0 mov -0x20(%ebp),%eax
10bac9: 8d 04 80 lea (%eax,%eax,4),%eax
10bacc: 8d 04 80 lea (%eax,%eax,4),%eax
10bacf: 8d 04 80 lea (%eax,%eax,4),%eax
10bad2: 8d 04 80 lea (%eax,%eax,4),%eax
10bad5: 8d 04 80 lea (%eax,%eax,4),%eax
10bad8: 8d 3c 80 lea (%eax,%eax,4),%edi
10badb: c1 e7 06 shl $0x6,%edi
remaining += tp.tv_nsec / 1000;
10bade: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10bae3: 8b 45 e4 mov -0x1c(%ebp),%eax
10bae6: f7 e9 imul %ecx
10bae8: 89 45 d0 mov %eax,-0x30(%ebp)
10baeb: 89 55 d4 mov %edx,-0x2c(%ebp)
10baee: 8b 75 d4 mov -0x2c(%ebp),%esi
10baf1: c1 fe 06 sar $0x6,%esi
10baf4: 8b 45 e4 mov -0x1c(%ebp),%eax
10baf7: 99 cltd
10baf8: 29 d6 sub %edx,%esi
10bafa: 01 fe add %edi,%esi
10bafc: 83 c4 10 add $0x10,%esp
10baff: e9 04 ff ff ff jmp 10ba08 <ualarm+0x38>