0004713c <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
4713c: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47140: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 47146: 5280 addql #1,%d0 47148: 206e 0008 moveal %fp@(8),%a0 4714c: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
47152: 42a7 clrl %sp@- 47154: 2f28 0008 movel %a0@(8),%sp@- 47158: 4868 0010 pea %a0@(16) 4715c: 4eb9 0004 7444 jsr 47444 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47162: 4fef 000c lea %sp@(12),%sp
}
47166: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47168: 4ef9 0004 890c jmp 4890c <_Thread_Enable_dispatch>
...
00046ffc <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
46ffc: 4e56 0000 linkw %fp,#0 47000: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
47002: 2479 0006 15cc moveal 615cc <_API_extensions_List>,%a2 47008: b5fc 0006 15d0 cmpal #398800,%a2
4700e: 6710 beqs 47020 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
* 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)();
47010: 206a 0008 moveal %a2@(8),%a0 47014: 4e90 jsr %a0@
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 ) {
47016: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
47018: b5fc 0006 15d0 cmpal #398800,%a2
4701e: 66f0 bnes 47010 <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
47020: 246e fffc moveal %fp@(-4),%a2
47024: 4e5e unlk %fp <== NOT EXECUTED
00047028 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
47028: 4e56 0000 linkw %fp,#0 4702c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4702e: 2479 0006 15cc moveal 615cc <_API_extensions_List>,%a2 47034: b5fc 0006 15d0 cmpal #398800,%a2
4703a: 6718 beqs 47054 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
4703c: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 47042: 206a 000c moveal %a2@(12),%a0 47046: 4e90 jsr %a0@
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 ) {
47048: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4704a: 588f addql #4,%sp 4704c: b5fc 0006 15d0 cmpal #398800,%a2
47052: 66e8 bnes 4703c <_API_extensions_Run_postswitch+0x14>
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47054: 246e fffc moveal %fp@(-4),%a2
47058: 4e5e unlk %fp <== NOT EXECUTED
00049558 <_CORE_RWLock_Obtain_for_reading>:
* 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 );
49558: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
4955e: 4e56 ffe8 linkw %fp,#-24 49562: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 49566: 246e 0008 moveal %fp@(8),%a2 4956a: 2a2e 000c movel %fp@(12),%d5 4956e: 282e 0014 movel %fp@(20),%d4 49572: 162e 0013 moveb %fp@(19),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
49576: 2679 0006 422a moveal 6422a <_Thread_Executing>,%a3
* 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 );
4957c: 40c2 movew %sr,%d2 4957e: 8082 orl %d2,%d0 49580: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
49582: 202a 0044 movel %a2@(68),%d0
49586: 661a bnes 495a2 <_CORE_RWLock_Obtain_for_reading+0x4a>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
49588: 52aa 0048 addql #1,%a2@(72)
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
4958c: 7001 moveq #1,%d0 4958e: 2540 0044 movel %d0,%a2@(68)
the_rwlock->number_of_readers += 1; _ISR_Enable( level );
49592: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49594: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49598: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4959e: 4e5e unlk %fp 495a0: 4e75 rts
* 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 ) {
495a2: 7201 moveq #1,%d1 495a4: b280 cmpl %d0,%d1
495a6: 674e beqs 495f6 <_CORE_RWLock_Obtain_for_reading+0x9e>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
495a8: 4a03 tstb %d3
495aa: 6612 bnes 495be <_CORE_RWLock_Obtain_for_reading+0x66>
_ISR_Enable( level );
495ac: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
495ae: 7202 moveq #2,%d1 495b0: 2741 0034 movel %d1,%a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495b4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495ba: 4e5e unlk %fp 495bc: 4e75 rts 495be: 7001 moveq #1,%d0
* 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;
executing->Wait.id = id;
495c0: 2745 0020 movel %d5,%a3@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
495c4: 42ab 0034 clrl %a3@(52)
/*
* 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;
495c8: 274a 0044 movel %a2,%a3@(68)
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
495cc: 42ab 0030 clrl %a3@(48) 495d0: 2540 0030 movel %d0,%a2@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
495d4: 46c2 movew %d2,%sr
_Thread_queue_Enqueue_with_handler(
495d6: 2d44 000c movel %d4,%fp@(12) 495da: 223c 0004 9784 movel #300932,%d1 495e0: 2d4a 0008 movel %a2,%fp@(8)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495e4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
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(
495ea: 2d41 0010 movel %d1,%fp@(16)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495ee: 4e5e unlk %fp
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(
495f0: 4ef9 0004 b078 jmp 4b078 <_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 );
495f6: 2f0a movel %a2,%sp@- 495f8: 4eb9 0004 b3e0 jsr 4b3e0 <_Thread_queue_First>
if ( !waiter ) {
495fe: 588f addql #4,%sp 49600: 4a80 tstl %d0
49602: 66a4 bnes 495a8 <_CORE_RWLock_Obtain_for_reading+0x50><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
49604: 52aa 0048 addql #1,%a2@(72)
_ISR_Enable( level );
49608: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4960a: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4960e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
49614: 4e5e unlk %fp <== NOT EXECUTED
00049618 <_CORE_RWLock_Obtain_for_writing>:
* 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 );
49618: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
4961e: 4e56 fff4 linkw %fp,#-12 49622: 206e 0008 moveal %fp@(8),%a0 49626: 48d7 001c moveml %d2-%d4,%sp@ 4962a: 282e 000c movel %fp@(12),%d4 4962e: 242e 0010 movel %fp@(16),%d2 49632: 262e 0014 movel %fp@(20),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
49636: 2279 0006 422a moveal 6422a <_Thread_Executing>,%a1
* 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 );
4963c: 40c1 movew %sr,%d1 4963e: 8081 orl %d1,%d0 49640: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
49642: 4aa8 0044 tstl %a0@(68)
49646: 6614 bnes 4965c <_CORE_RWLock_Obtain_for_writing+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
49648: 7002 moveq #2,%d0 4964a: 2140 0044 movel %d0,%a0@(68)
_ISR_Enable( level );
4964e: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49650: 42a9 0034 clrl %a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49654: 4cd7 001c moveml %sp@,%d2-%d4 49658: 4e5e unlk %fp 4965a: 4e75 rts
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
4965c: 4a02 tstb %d2
4965e: 6610 bnes 49670 <_CORE_RWLock_Obtain_for_writing+0x58>
_ISR_Enable( level );
49660: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49662: 7002 moveq #2,%d0
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49664: 4cd7 001c moveml %sp@,%d2-%d4
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49668: 2340 0034 movel %d0,%a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4966c: 4e5e unlk %fp 4966e: 4e75 rts
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
49670: 7001 moveq #1,%d0
* 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;
executing->Wait.id = id;
49672: 2344 0020 movel %d4,%a1@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49676: 42a9 0034 clrl %a1@(52)
/*
* 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;
4967a: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
4967e: 2340 0030 movel %d0,%a1@(48) 49682: 2140 0030 movel %d0,%a0@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
49686: 46c1 movew %d1,%sr
_Thread_queue_Enqueue_with_handler(
49688: 2d43 000c movel %d3,%fp@(12) 4968c: 203c 0004 9784 movel #300932,%d0 49692: 2d48 0008 movel %a0,%fp@(8) 49696: 2d40 0010 movel %d0,%fp@(16)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4969a: 4cd7 001c moveml %sp@,%d2-%d4 4969e: 4e5e unlk %fp
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(
496a0: 4ef9 0004 b078 jmp 4b078 <_Thread_queue_Enqueue_with_handler>
...
000496a8 <_CORE_RWLock_Release>:
* 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 );
496a8: 203c 0000 0700 movel #1792,%d0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496ae: 4e56 fff0 linkw %fp,#-16
ISR_Level level; Thread_Control *executing = _Thread_Executing;
496b2: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496b8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 496bc: 246e 0008 moveal %fp@(8),%a2
* 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 );
496c0: 40c1 movew %sr,%d1 496c2: 8081 orl %d1,%d0 496c4: 46c0 movew %d0,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
496c6: 202a 0044 movel %a2@(68),%d0 496ca: 6700 0090 beqw 4975c <_CORE_RWLock_Release+0xb4>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
496ce: 7401 moveq #1,%d2 496d0: b480 cmpl %d0,%d2
496d2: 676e beqs 49742 <_CORE_RWLock_Release+0x9a>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
496d4: 42a8 0034 clrl %a0@(52)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
496d8: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
496dc: 46c1 movew %d1,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
496de: 2f0a movel %a2,%sp@- 496e0: 4eb9 0004 af18 jsr 4af18 <_Thread_queue_Dequeue>
if ( next ) {
496e6: 588f addql #4,%sp 496e8: 4a80 tstl %d0
496ea: 674a beqs 49736 <_CORE_RWLock_Release+0x8e>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
496ec: 7201 moveq #1,%d1 496ee: 2040 moveal %d0,%a0 496f0: b2a8 0030 cmpl %a0@(48),%d1
496f4: 677c beqs 49772 <_CORE_RWLock_Release+0xca>
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
496f6: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
496f8: 52aa 0048 addql #1,%a2@(72) 496fc: 47f9 0004 b3e0 lea 4b3e0 <_Thread_queue_First>,%a3
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
49702: 49f9 0004 b28c lea 4b28c <_Thread_queue_Extract>,%a4
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
49708: 2541 0044 movel %d1,%a2@(68)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
4970c: 2f0a movel %a2,%sp@- 4970e: 4e93 jsr %a3@
if ( !next ||
49710: 588f addql #4,%sp 49712: 4a80 tstl %d0
49714: 6720 beqs 49736 <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
49716: 7401 moveq #1,%d2 49718: 2040 moveal %d0,%a0 4971a: b4a8 0030 cmpl %a0@(48),%d2
4971e: 6716 beqs 49736 <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
49720: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
49724: 2f00 movel %d0,%sp@- 49726: 2f0a movel %a2,%sp@- 49728: 4e94 jsr %a4@
}
4972a: 508f addql #8,%sp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
4972c: 2f0a movel %a2,%sp@- 4972e: 4e93 jsr %a3@
if ( !next ||
49730: 588f addql #4,%sp 49732: 4a80 tstl %d0
49734: 66e0 bnes 49716 <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49736: 4280 clrl %d0 49738: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4973e: 4e5e unlk %fp 49740: 4e75 rts
_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;
49742: 202a 0048 movel %a2@(72),%d0 49746: 5380 subql #1,%d0 49748: 2540 0048 movel %d0,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
4974c: 6786 beqs 496d4 <_CORE_RWLock_Release+0x2c>
/* must be unlocked again */
_ISR_Enable( level );
4974e: 46c1 movew %d1,%sr
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49750: 4280 clrl %d0 49752: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49758: 4e5e unlk %fp 4975a: 4e75 rts
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
4975c: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
4975e: 103c 0002 moveb #2,%d0
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49762: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49768: 2140 0034 movel %d0,%a0@(52)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
4976c: 4280 clrl %d0 4976e: 4e5e unlk %fp 49770: 4e75 rts
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;
49772: 7002 moveq #2,%d0 49774: 2540 0044 movel %d0,%a2@(68)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49778: 4280 clrl %d0 4977a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
49780: 4e5e unlk %fp <== NOT EXECUTED
00049784 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
49784: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49788: 486e fffc pea %fp@(-4) 4978c: 2f2e 0008 movel %fp@(8),%sp@- 49790: 4eb9 0004 ab44 jsr 4ab44 <_Thread_Get>
switch ( location ) {
49796: 508f addql #8,%sp 49798: 4aae fffc tstl %fp@(-4)
4979c: 6618 bnes 497b6 <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
4979e: 2f00 movel %d0,%sp@- 497a0: 4eb9 0004 b4e8 jsr 4b4e8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
497a6: 588f addql #4,%sp 497a8: 2039 0006 4170 movel 64170 <_Thread_Dispatch_disable_level>,%d0 497ae: 5380 subql #1,%d0 497b0: 23c0 0006 4170 movel %d0,64170 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
497b6: 4e5e unlk %fp
...
0004d3e4 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d3e4: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d3ea: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4d3ee: 2279 0006 14e6 moveal 614e6 <_Thread_Executing>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d3f4: 48d7 001c moveml %d2-%d4,%sp@ 4d3f8: 242e 000c movel %fp@(12),%d2 4d3fc: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4d400: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d404: 206e 0008 moveal %fp@(8),%a0 4d408: 282e 0018 movel %fp@(24),%d4
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d40c: 40c1 movew %sr,%d1 4d40e: 8081 orl %d1,%d0 4d410: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4d412: 2028 0048 movel %a0@(72),%d0 4d416: 5280 addql #1,%d0 4d418: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4d41c: 4aa8 0040 tstl %a0@(64)
4d420: 6606 bnes 4d428 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
4d422: b0a8 0044 cmpl %a0@(68),%d0
4d426: 672e beqs 4d456 <_CORE_barrier_Wait+0x72>
4d428: 7001 moveq #1,%d0
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
4d42a: 2342 0020 movel %d2,%a1@(32)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4d42e: 2348 0044 movel %a0,%a1@(68) 4d432: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4d436: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d438: 2d43 000c movel %d3,%fp@(12) 4d43c: 203c 0004 91c8 movel #299464,%d0 4d442: 2d48 0008 movel %a0,%fp@(8) 4d446: 2d40 0010 movel %d0,%fp@(16)
}
4d44a: 4cd7 001c moveml %sp@,%d2-%d4 4d44e: 4e5e unlk %fp
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d450: 4ef9 0004 8e68 jmp 48e68 <_Thread_queue_Enqueue_with_handler>
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
4d456: 7001 moveq #1,%d0 4d458: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4d45c: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d45e: 2d44 0010 movel %d4,%fp@(16) 4d462: 2d42 000c movel %d2,%fp@(12) 4d466: 2d48 0008 movel %a0,%fp@(8)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4d46a: 4cd7 001c moveml %sp@,%d2-%d4 4d46e: 4e5e unlk %fp
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d470: 4ef9 0004 d3a8 jmp 4d3a8 <_CORE_barrier_Release>
...
0005a98c <_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
)
{
5a98c: 4e56 ffe0 linkw %fp,#-32 5a990: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a994: 266e 0008 moveal %fp@(8),%a3 5a998: 282e 000c movel %fp@(12),%d4 5a99c: 242e 0010 movel %fp@(16),%d2 5a9a0: 2a2e 001c movel %fp@(28),%d5
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5a9a4: b4ab 004c cmpl %a3@(76),%d2
5a9a8: 6262 bhis 5aa0c <_CORE_message_queue_Broadcast+0x80><== 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 ) {
5a9aa: 4aab 0048 tstl %a3@(72)
5a9ae: 664c bnes 5a9fc <_CORE_message_queue_Broadcast+0x70>
* 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))) {
5a9b0: 2f0b movel %a3,%sp@- 5a9b2: 49f9 0005 d164 lea 5d164 <_Thread_queue_Dequeue>,%a4 5a9b8: 4283 clrl %d3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5a9ba: 4bf9 0006 5018 lea 65018 <memcpy>,%a5 5a9c0: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9c2: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9c4: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9c6: 4a80 tstl %d0
5a9c8: 6722 beqs 5a9ec <_CORE_message_queue_Broadcast+0x60>
5a9ca: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
5a9cc: 5283 addql #1,%d3 5a9ce: 2f04 movel %d4,%sp@- 5a9d0: 2f2a 002c movel %a2@(44),%sp@- 5a9d4: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5a9d6: 206a 0028 moveal %a2@(40),%a0 5a9da: 4fef 000c lea %sp@(12),%sp 5a9de: 2082 movel %d2,%a0@
* 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))) {
5a9e0: 2f0b movel %a3,%sp@- 5a9e2: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9e4: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9e6: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9e8: 4a80 tstl %d0
5a9ea: 66de bnes 5a9ca <_CORE_message_queue_Broadcast+0x3e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
5a9ec: 2045 moveal %d5,%a0 5a9ee: 4280 clrl %d0 5a9f0: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a9f2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a9f8: 4e5e unlk %fp 5a9fa: 4e75 rts
* 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;
5a9fc: 2045 moveal %d5,%a0 5a9fe: 4280 clrl %d0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa00: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
* 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;
5aa06: 4290 clrl %a0@
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa08: 4e5e unlk %fp 5aa0a: 4e75 rts
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5aa0c: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa0e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5aa14: 4e5e unlk %fp <== NOT EXECUTED
0004e740 <_CORE_message_queue_Close>:
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4e740: 4e56 0000 linkw %fp,#0 4e744: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e746: 2f2e 0010 movel %fp@(16),%sp@- 4e74a: 2f2e 000c movel %fp@(12),%sp@-
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4e74e: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e752: 2f0a movel %a2,%sp@- 4e754: 4eb9 0005 0904 jsr 50904 <_Thread_queue_Flush>
* This removes all messages from the pending message queue. Since
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
4e75a: 4fef 000c lea %sp@(12),%sp 4e75e: 4aaa 0048 tstl %a2@(72)
4e762: 6612 bnes 4e776 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e764: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4e76a: 246e fffc moveal %fp@(-4),%a2 4e76e: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e770: 4ef9 0005 16c0 jmp 516c0 <_Workspace_Free>
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4e776: 2f0a movel %a2,%sp@- 4e778: 4eb9 0004 e794 jsr 4e794 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4e77e: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4e784: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4e786: 246e fffc moveal %fp@(-4),%a2 4e78a: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e78c: 4ef9 0005 16c0 jmp 516c0 <_Workspace_Free>
...
000505cc <_CORE_message_queue_Initialize>:
/*
* 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)) {
505cc: 7203 moveq #3,%d1
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
)
{
505ce: 4e56 fff4 linkw %fp,#-12 505d2: 202e 0014 movel %fp@(20),%d0 505d6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 505da: 246e 0008 moveal %fp@(8),%a2 505de: 242e 0010 movel %fp@(16),%d2
/*
* 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)) {
505e2: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
505e4: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
505e8: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
505ec: 2540 004c movel %d0,%a2@(76)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
505f0: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
505f4: 42aa 0064 clrl %a2@(100)
/*
* 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)) {
505f8: 4a81 tstl %d1
505fa: 6620 bnes 5061c <_CORE_message_queue_Initialize+0x50>
505fc: 2200 movel %d0,%d1
/*
* 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));
505fe: 2601 movel %d1,%d3 50600: 0683 0000 0014 addil #20,%d3
/*
* 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 *
50606: 2003 movel %d3,%d0 50608: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
5060c: b280 cmpl %d0,%d1
5060e: 631c blss 5062c <_CORE_message_queue_Initialize+0x60><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50610: 4200 clrb %d0
}
50612: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50618: 4e5e unlk %fp 5061a: 4e75 rts
* 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);
5061c: 2200 movel %d0,%d1 5061e: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
50620: 76fc moveq #-4,%d3 50622: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
50624: b280 cmpl %d0,%d1
50626: 64d6 bccs 505fe <_CORE_message_queue_Initialize+0x32><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50628: 4200 clrb %d0 <== NOT EXECUTED 5062a: 60e6 bras 50612 <_CORE_message_queue_Initialize+0x46><== NOT EXECUTED
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
5062c: 2f00 movel %d0,%sp@- 5062e: 4eb9 0005 34f8 jsr 534f8 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
50634: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
50636: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
5063a: 67d4 beqs 50610 <_CORE_message_queue_Initialize+0x44>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
5063c: 2f03 movel %d3,%sp@- 5063e: 2f02 movel %d2,%sp@- 50640: 2f00 movel %d0,%sp@- 50642: 486a 0068 pea %a2@(104) 50646: 4eb9 0005 6aec jsr 56aec <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
5064c: 4878 0006 pea 6 <EXTENDSFDF> 50650: 7001 moveq #1,%d0 50652: 206e 000c moveal %fp@(12),%a0 50656: b090 cmpl %a0@,%d0 50658: 57c0 seq %d0 5065a: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5065e: 49c0 extbl %d0 50660: 4480 negl %d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
50662: 41ea 0054 lea %a2@(84),%a0 50666: 2f00 movel %d0,%sp@- 50668: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
5066c: 41ea 0050 lea %a2@(80),%a0 50670: 2548 0058 movel %a0,%a2@(88) 50674: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
50676: 42aa 0054 clrl %a2@(84) 5067a: 4eb9 0005 2898 jsr 52898 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50680: 4fef 0020 lea %sp@(32),%sp
}
50684: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
5068a: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5068c: 4e5e unlk %fp <== NOT EXECUTED
00056c40 <_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
)
{
56c40: 4e56 0000 linkw %fp,#0 56c44: 226e 000c moveal %fp@(12),%a1 56c48: 2f0b movel %a3,%sp@- 56c4a: 202e 0010 movel %fp@(16),%d0 56c4e: 206e 0008 moveal %fp@(8),%a0 56c52: 2f0a movel %a2,%sp@- 56c54: 2340 0008 movel %d0,%a1@(8)
_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 ) {
56c58: 0c80 7fff ffff cmpil #2147483647,%d0
56c5e: 6760 beqs 56cc0 <_CORE_message_queue_Insert_message+0x80>
_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 ) {
56c60: 0c80 8000 0000 cmpil #-2147483648,%d0 56c66: 6700 008e beqw 56cf6 <_CORE_message_queue_Insert_message+0xb6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
56c6a: 2208 movel %a0,%d1 56c6c: 0681 0000 0054 addil #84,%d1
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;
56c72: 2468 0050 moveal %a0@(80),%a2
while ( !_Chain_Is_tail( the_header, the_node ) ) {
56c76: b28a cmpl %a2,%d1
56c78: 670c beqs 56c86 <_CORE_message_queue_Insert_message+0x46>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
56c7a: b0aa 0008 cmpl %a2@(8),%d0
56c7e: 6d06 blts 56c86 <_CORE_message_queue_Insert_message+0x46>
the_node = the_node->next;
56c80: 2452 moveal %a2@,%a2
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 ) ) {
56c82: b28a cmpl %a2,%d1
56c84: 66f4 bnes 56c7a <_CORE_message_queue_Insert_message+0x3a>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
56c86: 203c 0000 0700 movel #1792,%d0 56c8c: 40c1 movew %sr,%d1 56c8e: 8081 orl %d1,%d0 56c90: 46c0 movew %d0,%sr
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
56c92: 246a 0004 moveal %a2@(4),%a2
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56c96: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
56c9a: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
56c9c: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
56ca0: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
56ca2: 2749 0004 movel %a1,%a3@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
56ca6: 228b movel %a3,%a1@
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
56ca8: 46c1 movew %d1,%sr
/*
* 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 )
56caa: 2268 0060 moveal %a0@(96),%a1 56cae: 4a89 tstl %a1
56cb0: 673c beqs 56cee <_CORE_message_queue_Insert_message+0xae>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
56cb2: 2d68 0064 0008 movel %a0@(100),%fp@(8)
#endif }
56cb8: 245f moveal %sp@+,%a2 56cba: 265f moveal %sp@+,%a3 56cbc: 4e5e unlk %fp
* 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);
56cbe: 4ed1 jmp %a1@
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 );
56cc0: 203c 0000 0700 movel #1792,%d0 56cc6: 40c1 movew %sr,%d1 56cc8: 8081 orl %d1,%d0 56cca: 46c0 movew %d0,%sr
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
56ccc: 45e8 0054 lea %a0@(84),%a2
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56cd0: 52a8 0048 addql #1,%a0@(72) 56cd4: 228a movel %a2,%a1@
old_last_node = the_chain->last;
56cd6: 2468 0058 moveal %a0@(88),%a2
the_chain->last = the_node;
56cda: 2149 0058 movel %a1,%a0@(88)
old_last_node->next = the_node; the_node->previous = old_last_node;
56cde: 234a 0004 movel %a2,%a1@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
56ce2: 2489 movel %a1,%a2@
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
56ce4: 46c1 movew %d1,%sr
/*
* 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 )
56ce6: 2268 0060 moveal %a0@(96),%a1 56cea: 4a89 tstl %a1
56cec: 66c4 bnes 56cb2 <_CORE_message_queue_Insert_message+0x72><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
56cee: 245f moveal %sp@+,%a2 56cf0: 265f moveal %sp@+,%a3 56cf2: 4e5e unlk %fp 56cf4: 4e75 rts
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 );
56cf6: 203c 0000 0700 movel #1792,%d0 56cfc: 40c1 movew %sr,%d1 56cfe: 8081 orl %d1,%d0 56d00: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
56d02: 45e8 0050 lea %a0@(80),%a2
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56d06: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
56d0a: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
56d0c: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
56d10: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
56d12: 2749 0004 movel %a1,%a3@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
56d16: 228b movel %a3,%a1@
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
56d18: 46c1 movew %d1,%sr 56d1a: 608e bras 56caa <_CORE_message_queue_Insert_message+0x6a>
00050690 <_CORE_message_queue_Seize>:
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
50690: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50696: 4e56 ffe8 linkw %fp,#-24
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
5069a: 2279 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
506a0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 506a4: 282e 000c movel %fp@(12),%d4 506a8: 286e 001c moveal %fp@(28),%a4 506ac: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
506b0: 42a9 0034 clrl %a1@(52)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
506b4: 262e 0010 movel %fp@(16),%d3 506b8: 206e 0014 moveal %fp@(20),%a0 506bc: 242e 0018 movel %fp@(24),%d2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
506c0: 40c1 movew %sr,%d1 506c2: 8081 orl %d1,%d0 506c4: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
506c6: 200a movel %a2,%d0 506c8: 0680 0000 0054 addil #84,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
506ce: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
506d2: b08b cmpl %a3,%d0 506d4: 6700 0088 beqw 5075e <_CORE_message_queue_Seize+0xce>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
506d8: 2253 moveal %a3@,%a1
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
506da: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
506de: 49ea 0050 lea %a2@(80),%a4
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
506e2: 2549 0050 movel %a1,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
506e6: 234c 0004 movel %a4,%a1@(4)
_ISR_Enable( level );
506ea: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
506ec: 2279 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a1
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
506f2: 240b movel %a3,%d2 506f4: 0682 0000 0010 addil #16,%d2
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
506fa: 49f9 0005 a3e4 lea 5a3e4 <memcpy>,%a4
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
50700: 20ab 000c movel %a3@(12),%a0@
_Thread_Executing->Wait.count =
50704: 236b 0008 0024 movel %a3@(8),%a1@(36) 5070a: 2f10 movel %a0@,%sp@- 5070c: 2f02 movel %d2,%sp@- 5070e: 2f03 movel %d3,%sp@- 50710: 4e94 jsr %a4@
* 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 );
50712: 2f0a movel %a2,%sp@- 50714: 4eb9 0005 24bc jsr 524bc <_Thread_queue_Dequeue>
if ( !the_thread ) {
5071a: 4fef 0010 lea %sp@(16),%sp
* 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 );
5071e: 2040 moveal %d0,%a0
if ( !the_thread ) {
50720: 4a80 tstl %d0 50722: 6700 0088 beqw 507ac <_CORE_message_queue_Seize+0x11c>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
50726: 2028 0030 movel %a0@(48),%d0
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
5072a: 2768 0024 0008 movel %a0@(36),%a3@(8) 50730: 2740 000c movel %d0,%a3@(12)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
50734: 2f00 movel %d0,%sp@- 50736: 2f28 002c movel %a0@(44),%sp@- 5073a: 2f02 movel %d2,%sp@- 5073c: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
5073e: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 50744: 4fef 000c lea %sp@(12),%sp 50748: 2d4b 000c movel %a3,%fp@(12) 5074c: 2d4a 0008 movel %a2,%fp@(8)
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 );
}
50750: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50756: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
50758: 4ef9 0005 6c40 jmp 56c40 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
5075e: 4a02 tstb %d2
50760: 6612 bnes 50774 <_CORE_message_queue_Seize+0xe4>
_ISR_Enable( level );
50762: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
50764: 7004 moveq #4,%d0
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 );
}
50766: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
5076c: 2340 0034 movel %d0,%a1@(52)
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 );
}
50770: 4e5e unlk %fp 50772: 4e75 rts
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;
50774: 7001 moveq #1,%d0 50776: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
5077a: 2348 0028 movel %a0,%a1@(40)
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
5077e: 2343 002c movel %d3,%a1@(44)
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
50782: 2344 0020 movel %d4,%a1@(32)
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;
50786: 234a 0044 movel %a2,%a1@(68)
executing->Wait.id = id; 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 );
5078a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5078c: 2d4c 000c movel %a4,%fp@(12) 50790: 49f9 0005 297c lea 5297c <_Thread_queue_Timeout>,%a4 50796: 2d4a 0008 movel %a2,%fp@(8) 5079a: 2d4c 0010 movel %a4,%fp@(16)
}
5079e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 507a4: 4e5e unlk %fp
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 );
507a6: 4ef9 0005 261c jmp 5261c <_Thread_queue_Enqueue_with_handler>
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 );
507ac: 45ea 0068 lea %a2@(104),%a2 507b0: 2d4b 000c movel %a3,%fp@(12) 507b4: 2d4a 0008 movel %a2,%fp@(8)
}
507b8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 507be: 4e5e unlk %fp 507c0: 4ef9 0005 0500 jmp 50500 <_Chain_Append>
...
000507c8 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
507c8: 4e56 ffec linkw %fp,#-20 507cc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 507d0: 246e 0008 moveal %fp@(8),%a2 507d4: 242e 0010 movel %fp@(16),%d2 507d8: 282e 001c movel %fp@(28),%d4 507dc: 162e 0023 moveb %fp@(35),%d3
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
507e0: b4aa 004c cmpl %a2@(76),%d2
507e4: 6228 bhis 5080e <_CORE_message_queue_Submit+0x46>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
507e6: 202a 0048 movel %a2@(72),%d0
507ea: 672e beqs 5081a <_CORE_message_queue_Submit+0x52>
/*
* 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 ) {
507ec: b0aa 0044 cmpl %a2@(68),%d0 507f0: 6500 00ba bcsw 508ac <_CORE_message_queue_Submit+0xe4>
/*
* 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 ) {
507f4: 4a03 tstb %d3 507f6: 6700 00f4 beqw 508ec <_CORE_message_queue_Submit+0x124>
/*
* 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() ) {
507fa: 2039 0006 b4ae movel 6b4ae <_ISR_Nest_level>,%d0
50800: 6754 beqs 50856 <_CORE_message_queue_Submit+0x8e>
50802: 7003 moveq #3,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50804: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5080a: 4e5e unlk %fp 5080c: 4e75 rts
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
5080e: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50810: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50816: 4e5e unlk %fp 50818: 4e75 rts
/*
* 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 );
5081a: 2f0a movel %a2,%sp@- 5081c: 4eb9 0005 24bc jsr 524bc <_Thread_queue_Dequeue>
if ( the_thread ) {
50822: 588f addql #4,%sp
/*
* 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 );
50824: 2640 moveal %d0,%a3
if ( the_thread ) {
50826: 4a80 tstl %d0 50828: 6700 00ce beqw 508f8 <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5082c: 2f02 movel %d2,%sp@- 5082e: 2f2e 000c movel %fp@(12),%sp@- 50832: 2f2b 002c movel %a3@(44),%sp@- 50836: 4eb9 0005 a3e4 jsr 5a3e4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5083c: 206b 0028 moveal %a3@(40),%a0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50840: 4fef 000c lea %sp@(12),%sp
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
the_thread->Wait.count = (uint32_t) submit_type;
50844: 4280 clrl %d0
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
50846: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
50848: 2744 0024 movel %d4,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5084c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50852: 4e5e unlk %fp 50854: 4e75 rts
* 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;
50856: 2079 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a0
ISR_Level level;
_ISR_Disable( level );
5085c: 203c 0000 0700 movel #1792,%d0 50862: 40c1 movew %sr,%d1 50864: 8081 orl %d1,%d0 50866: 46c0 movew %d0,%sr 50868: 7001 moveq #1,%d0
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
5086a: 216e 0014 0020 movel %fp@(20),%a0@(32) 50870: 2540 0030 movel %d0,%a2@(48)
executing->Wait.return_argument_second.immutable_object = buffer;
50874: 202e 000c movel %fp@(12),%d0
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
50878: 2144 0024 movel %d4,%a0@(36)
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
5087c: 2140 002c movel %d0,%a0@(44)
executing->Wait.option = (uint32_t) size;
50880: 2142 0030 movel %d2,%a0@(48)
Thread_Control *executing = _Thread_Executing;
ISR_Level level;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
50884: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
50888: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5088a: 4879 0005 297c pea 5297c <_Thread_queue_Timeout> 50890: 2f2e 0024 movel %fp@(36),%sp@- 50894: 2f0a movel %a2,%sp@- 50896: 4eb9 0005 261c jsr 5261c <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
5089c: 4fef 000c lea %sp@(12),%sp
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
508a0: 7007 moveq #7,%d0
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508a2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508a8: 4e5e unlk %fp 508aa: 4e75 rts
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 *)
508ac: 486a 0068 pea %a2@(104) 508b0: 4eb9 0005 0560 jsr 50560 <_Chain_Get> 508b6: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
508b8: 2f02 movel %d2,%sp@- 508ba: 2f2e 000c movel %fp@(12),%sp@- 508be: 486b 0010 pea %a3@(16) 508c2: 4eb9 0005 a3e4 jsr 5a3e4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
508c8: 2742 000c movel %d2,%a3@(12)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
508cc: 2744 0008 movel %d4,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
508d0: 2f04 movel %d4,%sp@- 508d2: 2f0b movel %a3,%sp@- 508d4: 2f0a movel %a2,%sp@- 508d6: 4eb9 0005 6c40 jsr 56c40 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
508dc: 4fef 001c lea %sp@(28),%sp
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
508e0: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508e2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508e8: 4e5e unlk %fp 508ea: 4e75 rts
/*
* 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 ) {
508ec: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508ee: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508f4: 4e5e unlk %fp 508f6: 4e75 rts
/*
* 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 ) {
508f8: 202a 0048 movel %a2@(72),%d0
/*
* 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 ) {
508fc: b0aa 0044 cmpl %a2@(68),%d0 50900: 6400 fef2 bccw 507f4 <_CORE_message_queue_Submit+0x2c> 50904: 60a6 bras 508ac <_CORE_message_queue_Submit+0xe4>
...
00047394 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
47394: 4e56 0000 linkw %fp,#0 47398: 202e 0010 movel %fp@(16),%d0 4739c: 2f0a movel %a2,%sp@- 4739e: 246e 0008 moveal %fp@(8),%a2 473a2: 2f02 movel %d2,%sp@-
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473a4: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473aa: 1400 moveb %d0,%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473ac: 4a81 tstl %d1
473ae: 6704 beqs 473b4 <_CORE_mutex_Seize+0x20>
473b0: 4a00 tstb %d0
473b2: 6634 bnes 473e8 <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN
473b4: 486e 0018 pea %fp@(24) 473b8: 2f0a movel %a2,%sp@- 473ba: 4eb9 0004 d478 jsr 4d478 <_CORE_mutex_Seize_interrupt_trylock> 473c0: 508f addql #8,%sp 473c2: 4a80 tstl %d0
473c4: 6716 beqs 473dc <_CORE_mutex_Seize+0x48>
473c6: 4a02 tstb %d2
473c8: 6636 bnes 47400 <_CORE_mutex_Seize+0x6c>
473ca: 202e 0018 movel %fp@(24),%d0 473ce: 46c0 movew %d0,%sr 473d0: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 473d6: 7001 moveq #1,%d0 473d8: 2140 0034 movel %d0,%a0@(52)
}
473dc: 242e fff8 movel %fp@(-8),%d2 473e0: 246e fffc moveal %fp@(-4),%a2 473e4: 4e5e unlk %fp 473e6: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473e8: 7001 moveq #1,%d0 473ea: b0b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d0
473f0: 64c2 bccs 473b4 <_CORE_mutex_Seize+0x20>
473f2: 4878 0013 pea 13 <INVALID_OPERATION+0x3> 473f6: 42a7 clrl %sp@- 473f8: 42a7 clrl %sp@- 473fa: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> 47400: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 47406: 5280 addql #1,%d0 47408: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 4740e: 216e 000c 0020 movel %fp@(12),%a0@(32) 47414: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
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;
4741a: 7001 moveq #1,%d0 4741c: 214a 0044 movel %a2,%a0@(68) 47420: 2540 0030 movel %d0,%a2@(48) 47424: 202e 0018 movel %fp@(24),%d0 47428: 46c0 movew %d0,%sr 4742a: 2f2e 0014 movel %fp@(20),%sp@- 4742e: 2f0a movel %a2,%sp@- 47430: 4eb9 0004 7308 jsr 47308 <_CORE_mutex_Seize_interrupt_blocking>
}
47436: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4743a: 508f addql #8,%sp
}
4743c: 246e fffc moveal %fp@(-4),%a2
47440: 4e5e unlk %fp <== NOT EXECUTED
000475a8 <_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
)
{
475a8: 4e56 0000 linkw %fp,#0 475ac: 2f0a movel %a2,%sp@- 475ae: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
475b2: 2f0a movel %a2,%sp@- 475b4: 4eb9 0004 8d08 jsr 48d08 <_Thread_queue_Dequeue> 475ba: 588f addql #4,%sp 475bc: 4a80 tstl %d0
475be: 670a beqs 475ca <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c0: 246e fffc moveal %fp@(-4),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
475c4: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c6: 4e5e unlk %fp 475c8: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
475ca: 203c 0000 0700 movel #1792,%d0 475d0: 40c1 movew %sr,%d1 475d2: 8081 orl %d1,%d0 475d4: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475d6: 202a 0048 movel %a2@(72),%d0 475da: b0aa 0040 cmpl %a2@(64),%d0
475de: 6412 bccs 475f2 <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN
the_semaphore->count += 1;
475e0: 5280 addql #1,%d0 475e2: 2540 0048 movel %d0,%a2@(72) 475e6: 4280 clrl %d0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475e8: 46c1 movew %d1,%sr
}
return status;
}
475ea: 246e fffc moveal %fp@(-4),%a2 475ee: 4e5e unlk %fp 475f0: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475f2: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475f4: 46c1 movew %d1,%sr <== NOT EXECUTED 475f6: 60f2 bras 475ea <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004d324 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4d324: 4e56 0000 linkw %fp,#0 4d328: 202e 0010 movel %fp@(16),%d0 4d32c: 2f0a movel %a2,%sp@- 4d32e: 246e 0008 moveal %fp@(8),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4d332: 224a moveal %a2,%a1 4d334: 2f02 movel %d2,%sp@- 4d336: 242e 0014 movel %fp@(20),%d2
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
4d33a: 42aa 0004 clrl %a2@(4)
next = starting_address;
while ( count-- ) {
4d33e: 4a80 tstl %d0
4d340: 6718 beqs 4d35a <_Chain_Initialize+0x36> <== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
4d342: 206e 000c moveal %fp@(12),%a0
while ( count-- ) {
current->next = next;
next->previous = current;
4d346: 2149 0004 movel %a1,%a0@(4) 4d34a: 2208 movel %a0,%d1 4d34c: d282 addl %d2,%d1
current = next;
next = (Chain_Node *)
4d34e: 5380 subql #1,%d0
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
4d350: 2288 movel %a0,%a1@
next->previous = current;
current = next;
next = (Chain_Node *)
4d352: 2248 moveal %a0,%a1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4d354: 2041 moveal %d1,%a0 4d356: 4a80 tstl %d0
4d358: 66ec bnes 4d346 <_Chain_Initialize+0x22>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
4d35a: 200a movel %a2,%d0 4d35c: 5880 addql #4,%d0 4d35e: 2280 movel %d0,%a1@
the_chain->last = current; }
4d360: 241f movel %sp@+,%d2
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
4d362: 2549 0008 movel %a1,%a2@(8)
}
4d366: 245f moveal %sp@+,%a2
4d368: 4e5e unlk %fp <== NOT EXECUTED
000460a8 <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
460a8: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460ae: 4e56 ffec linkw %fp,#-20 460b2: 222e 0008 movel %fp@(8),%d1 460b6: 48d7 043c moveml %d2-%d5/%a2,%sp@
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
460ba: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460c0: 242e 000c movel %fp@(12),%d2 460c4: 2a2e 0010 movel %fp@(16),%d5
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
460c8: 42aa 0034 clrl %a2@(52)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460cc: 226e 0014 moveal %fp@(20),%a1
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
460d0: 206a 010a moveal %a2@(266),%a0
_ISR_Disable( level );
460d4: 40c4 movew %sr,%d4 460d6: 8084 orl %d4,%d0 460d8: 46c0 movew %d0,%sr
pending_events = api->pending_events;
460da: 2610 movel %a0@,%d3
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
460dc: 2001 movel %d1,%d0 460de: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
460e0: 670c beqs 460ee <_Event_Seize+0x46>
460e2: b081 cmpl %d1,%d0 460e4: 6700 0084 beqw 4616a <_Event_Seize+0xc2> 460e8: 0802 0001 btst #1,%d2
460ec: 667c bnes 4616a <_Event_Seize+0xc2> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
460ee: 0802 0000 btst #0,%d2
460f2: 6662 bnes 46156 <_Event_Seize+0xae> * 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;
460f4: 2542 0030 movel %d2,%a2@(48)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
460f8: 7401 moveq #1,%d2
* * 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; executing->Wait.count = (uint32_t) event_in;
460fa: 2541 0024 movel %d1,%a2@(36)
executing->Wait.return_argument = event_out;
460fe: 2549 0028 movel %a1,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
46102: 23c2 0006 1ca8 movel %d2,61ca8 <_Event_Sync_state>
_ISR_Enable( level );
46108: 46c4 movew %d4,%sr
if ( ticks ) {
4610a: 4a85 tstl %d5
4610c: 6672 bnes 46180 <_Event_Seize+0xd8>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4610e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 46112: 2f0a movel %a2,%sp@- 46114: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
_ISR_Disable( level );
4611a: 203c 0000 0700 movel #1792,%d0 46120: 40c1 movew %sr,%d1 46122: 8081 orl %d1,%d0 46124: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46126: 7401 moveq #1,%d2 46128: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
4612a: 2039 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
46130: 42b9 0006 1ca8 clrl 61ca8 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46136: b480 cmpl %d0,%d2 46138: 6700 00a4 beqw 461de <_Event_Seize+0x136>
* 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 );
4613c: 2d4a 000c movel %a2,%fp@(12) 46140: 2d41 0010 movel %d1,%fp@(16)
}
46144: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* 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 );
4614a: 2d40 0008 movel %d0,%fp@(8)
}
4614e: 4e5e unlk %fp
* 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 );
46150: 4ef9 0004 8384 jmp 48384 <_Thread_blocking_operation_Cancel>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
46156: 46c4 movew %d4,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
46158: 720d moveq #13,%d1 4615a: 2541 0034 movel %d1,%a2@(52)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
4615e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
46164: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46166: 4e5e unlk %fp 46168: 4e75 rts
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 =
4616a: 2200 movel %d0,%d1 4616c: 4681 notl %d1 4616e: c283 andl %d3,%d1 46170: 2081 movel %d1,%a0@
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
46172: 46c4 movew %d4,%sr
*event_out = seized_events;
46174: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46176: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4617c: 4e5e unlk %fp 4617e: 4e75 rts
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
46180: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46184: 223c 0004 6374 movel #287604,%d1
the_watchdog->id = id;
4618a: 2540 0068 movel %d0,%a2@(104)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4618e: 2541 0064 movel %d1,%a2@(100)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46192: 2545 0054 movel %d5,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46196: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
4619a: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4619e: 486a 0048 pea %a2@(72) 461a2: 4879 0006 1504 pea 61504 <_Watchdog_Ticks_chain> 461a8: 4eb9 0004 9aac jsr 49aac <_Watchdog_Insert> 461ae: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
461b0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 461b4: 2f0a movel %a2,%sp@- 461b6: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
_ISR_Disable( level );
461bc: 203c 0000 0700 movel #1792,%d0 461c2: 40c1 movew %sr,%d1 461c4: 8081 orl %d1,%d0 461c6: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461c8: 7401 moveq #1,%d2 461ca: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
461cc: 2039 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
461d2: 42b9 0006 1ca8 clrl 61ca8 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461d8: b480 cmpl %d0,%d2 461da: 6600 ff60 bnew 4613c <_Event_Seize+0x94>
_ISR_Enable( level );
461de: 46c1 movew %d1,%sr
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
461e0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 461e6: 4e5e unlk %fp
...
00046248 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
46248: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4624e: 4e56 ffec linkw %fp,#-20 46252: 48d7 043c moveml %d2-%d5/%a2,%sp@ 46256: 246e 0008 moveal %fp@(8),%a2
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 ];
4625a: 206a 010a moveal %a2@(266),%a0
option_set = (rtems_option) the_thread->Wait.option;
4625e: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
46262: 40c3 movew %sr,%d3 46264: 8083 orl %d3,%d0 46266: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
46268: 222a 0024 movel %a2@(36),%d1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
4626c: 2001 movel %d1,%d0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
4626e: 2410 movel %a0@,%d2 46270: c082 andl %d2,%d0
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
46272: 6778 beqs 462ec <_Event_Surrender+0xa4>
/*
* 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() &&
46274: 2279 0006 14c6 moveal 614c6 <_ISR_Nest_level>,%a1 4627a: 4a89 tstl %a1
4627c: 670a beqs 46288 <_Event_Surrender+0x40>
4627e: b5f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a2 46284: 6700 00a0 beqw 46326 <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
46288: 2a2a 0010 movel %a2@(16),%d5 4628c: 0285 0000 0100 andil #256,%d5
46292: 674c beqs 462e0 <_Event_Surrender+0x98>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
46294: b081 cmpl %d1,%d0
46296: 6706 beqs 4629e <_Event_Surrender+0x56>
46298: 0804 0001 btst #1,%d4
4629c: 6742 beqs 462e0 <_Event_Surrender+0x98> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
4629e: 2200 movel %d0,%d1 462a0: 4681 notl %d1 462a2: c282 andl %d2,%d1 462a4: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462a6: 206a 0028 moveal %a2@(40),%a0
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
462aa: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462ae: 2080 movel %d0,%a0@
_ISR_Flash( level );
462b0: 203c 0000 0700 movel #1792,%d0 462b6: 46c3 movew %d3,%sr 462b8: 8083 orl %d3,%d0 462ba: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
462bc: 7a02 moveq #2,%d5 462be: baaa 0050 cmpl %a2@(80),%d5
462c2: 6734 beqs 462f8 <_Event_Surrender+0xb0>
_ISR_Enable( level );
462c4: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
462c6: 2f3c 1003 fff8 movel #268697592,%sp@- 462cc: 2f0a movel %a2,%sp@- 462ce: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 462d4: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
462d6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462dc: 4e5e unlk %fp 462de: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
462e0: 46c3 movew %d3,%sr
}
462e2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462e8: 4e5e unlk %fp 462ea: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
462ec: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
462ee: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462f4: 4e5e unlk %fp 462f6: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
462f8: 7003 moveq #3,%d0 462fa: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
462fe: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
46300: 486a 0048 pea %a2@(72) 46304: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4630a: 2f3c 1003 fff8 movel #268697592,%sp@- 46310: 2f0a movel %a2,%sp@- 46312: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 46318: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
4631c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46322: 4e5e unlk %fp 46324: 4e75 rts
* 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) ||
46326: 2279 0006 1ca8 moveal 61ca8 <_Event_Sync_state>,%a1
/*
* 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() &&
4632c: 7a02 moveq #2,%d5 4632e: ba89 cmpl %a1,%d5
46330: 6710 beqs 46342 <_Event_Surrender+0xfa> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
46332: 2279 0006 1ca8 moveal 61ca8 <_Event_Sync_state>,%a1
/*
* 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() &&
46338: 1a3c 0001 moveb #1,%d5 4633c: ba89 cmpl %a1,%d5 4633e: 6600 ff48 bnew 46288 <_Event_Surrender+0x40>
_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) ) {
46342: b081 cmpl %d1,%d0
46344: 6706 beqs 4634c <_Event_Surrender+0x104>
46346: 0804 0001 btst #1,%d4
4634a: 671a beqs 46366 <_Event_Surrender+0x11e> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
4634c: 2200 movel %d0,%d1 4634e: 4681 notl %d1 46350: c282 andl %d2,%d1 46352: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46354: 206a 0028 moveal %a2@(40),%a0
_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) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
46358: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4635c: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4635e: 7003 moveq #3,%d0 46360: 23c0 0006 1ca8 movel %d0,61ca8 <_Event_Sync_state>
}
_ISR_Enable( level );
46366: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46368: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4636e: 4e5e unlk %fp
...
00046374 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
46374: 4e56 fffc linkw %fp,#-4 46378: 2f03 movel %d3,%sp@- 4637a: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
4637c: 486e fffc pea %fp@(-4) 46380: 2f2e 0008 movel %fp@(8),%sp@- 46384: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
4638a: 508f addql #8,%sp 4638c: 4aae fffc tstl %fp@(-4)
46390: 6642 bnes 463d4 <_Event_Timeout+0x60> <== 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 );
46392: 223c 0000 0700 movel #1792,%d1 46398: 40c2 movew %sr,%d2 4639a: 8282 orl %d2,%d1 4639c: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
4639e: 2040 moveal %d0,%a0 463a0: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
463a4: b0b9 0006 14e6 cmpl 614e6 <_Thread_Executing>,%d0
463aa: 6734 beqs 463e0 <_Event_Timeout+0x6c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463ac: 7606 moveq #6,%d3 463ae: 2040 moveal %d0,%a0 463b0: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
463b4: 46c2 movew %d2,%sr 463b6: 2f3c 1003 fff8 movel #268697592,%sp@- 463bc: 2f00 movel %d0,%sp@- 463be: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
463c4: 508f addql #8,%sp 463c6: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 463cc: 5380 subql #1,%d0 463ce: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
463d4: 242e fff4 movel %fp@(-12),%d2 463d8: 262e fff8 movel %fp@(-8),%d3 463dc: 4e5e unlk %fp 463de: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
463e0: 2239 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d1 463e6: 7601 moveq #1,%d3 463e8: b681 cmpl %d1,%d3
463ea: 66c0 bnes 463ac <_Event_Timeout+0x38> <== ALWAYS TAKEN
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463ec: 7606 moveq #6,%d3 <== NOT EXECUTED 463ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
463f0: 7202 moveq #2,%d1 <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463f2: 2143 0034 movel %d3,%a0@(52) <== NOT EXECUTED
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
463f6: 23c1 0006 1ca8 movel %d1,61ca8 <_Event_Sync_state> <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
463fc: 46c2 movew %d2,%sr <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
463fe: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 46404: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46406: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4640c: 508f addql #8,%sp <== NOT EXECUTED 4640e: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 46414: 5380 subql #1,%d0 <== NOT EXECUTED 46416: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level><== NOT EXECUTED 4641c: 60b6 bras 463d4 <_Event_Timeout+0x60> <== NOT EXECUTED
...
0004d658 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4d658: 4e56 ffcc linkw %fp,#-52 4d65c: 226e 000c moveal %fp@(12),%a1 4d660: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d664: 246e 0008 moveal %fp@(8),%a2
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;
4d668: 2c09 movel %a1,%d6 4d66a: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4d66c: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4d670: 222e 0010 movel %fp@(16),%d1 4d674: 282e 0014 movel %fp@(20),%d4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4d678: 206a 0008 moveal %a2@(8),%a0
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;
4d67c: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4d680: bc89 cmpl %a1,%d6 4d682: 6500 0146 bcsw 4d7ca <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4d686: 4a84 tstl %d4 4d688: 6600 013c bnew 4d7c6 <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d68c: b1ca cmpal %a2,%a0 4d68e: 6700 0152 beqw 4d7e2 <_Heap_Allocate_aligned_with_boundary+0x18a>
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;
4d692: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d696: 7a04 moveq #4,%d5
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;
4d698: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d69a: 9a89 subl %a1,%d5
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d69c: 4283 clrl %d3
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;
4d69e: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d6a2: 2d45 fff4 movel %d5,%fp@(-12)
/*
* 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 ) {
4d6a6: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4d6aa: 5283 addql #1,%d3
/*
* 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 ) {
4d6ac: b086 cmpl %d6,%d0
4d6ae: 630e blss 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4d6b0: 4a81 tstl %d1
4d6b2: 6628 bnes 4d6dc <_Heap_Allocate_aligned_with_boundary+0x84>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4d6b4: 2408 movel %a0,%d2 4d6b6: 5082 addql #8,%d2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4d6b8: 4a82 tstl %d2 4d6ba: 6600 00ee bnew 4d7aa <_Heap_Allocate_aligned_with_boundary+0x152>
break;
}
block = block->next;
4d6be: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d6c2: b1ca cmpal %a2,%a0
4d6c4: 66e0 bnes 4d6a6 <_Heap_Allocate_aligned_with_boundary+0x4e>
4d6c6: 4280 clrl %d0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4d6c8: b6aa 0044 cmpl %a2@(68),%d3
4d6cc: 6304 blss 4d6d2 <_Heap_Allocate_aligned_with_boundary+0x7a>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4d6ce: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4d6d2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4d6d8: 4e5e unlk %fp 4d6da: 4e75 rts
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4d6dc: 7efe moveq #-2,%d7 4d6de: 4be8 0008 lea %a0@(8),%a5 4d6e2: c087 andl %d7,%d0
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4d6e4: 286a 0014 moveal %a2@(20),%a4
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;
4d6e8: d088 addl %a0,%d0
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;
4d6ea: 2a2e fff8 movel %fp@(-8),%d5 4d6ee: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d6f0: 242e fff4 movel %fp@(-12),%d2 4d6f4: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4d6f6: 2e02 movel %d2,%d7
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;
4d6f8: d085 addl %d5,%d0 4d6fa: 4c41 7005 remul %d1,%d5,%d7 4d6fe: 9485 subl %d5,%d2
uintptr_t alloc_begin = alloc_end - alloc_size;
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 ) {
4d700: b480 cmpl %d0,%d2
4d702: 630a blss 4d70e <_Heap_Allocate_aligned_with_boundary+0xb6>
4d704: 2a00 movel %d0,%d5 4d706: 4c41 5002 remul %d1,%d2,%d5 4d70a: 9082 subl %d2,%d0 4d70c: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4d70e: 4a84 tstl %d4
4d710: 676c beqs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
/* 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;
4d712: 2002 movel %d2,%d0 4d714: d089 addl %a1,%d0 4d716: 2e00 movel %d0,%d7 4d718: 4c44 7005 remul %d4,%d5,%d7 4d71c: 2e00 movel %d0,%d7 4d71e: 9e85 subl %d5,%d7 4d720: 2a07 movel %d7,%d5
/* 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 ) {
4d722: be82 cmpl %d2,%d7
4d724: 6358 blss 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
4d726: be80 cmpl %d0,%d7
4d728: 6454 bccs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4d72a: 2e0d movel %a5,%d7 4d72c: de89 addl %a1,%d7
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4d72e: ba87 cmpl %d7,%d5
4d730: 658c bcss 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4d732: 9a89 subl %a1,%d5 4d734: 2005 movel %d5,%d0 4d736: 2647 moveal %d7,%a3 4d738: 4c41 0002 remul %d1,%d2,%d0 4d73c: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4d73e: 2005 movel %d5,%d0 4d740: d089 addl %a1,%d0 4d742: 2405 movel %d5,%d2 4d744: 2e00 movel %d0,%d7 4d746: 4c44 7005 remul %d4,%d5,%d7 4d74a: 2e00 movel %d0,%d7 4d74c: 9e85 subl %d5,%d7 4d74e: 2a07 movel %d7,%d5
/* 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 ) {
4d750: be82 cmpl %d2,%d7
4d752: 632a blss 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
4d754: be80 cmpl %d0,%d7
4d756: 6426 bccs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4d758: ba8b cmpl %a3,%d5 4d75a: 6500 ff62 bcsw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4d75e: 9a89 subl %a1,%d5 4d760: 2005 movel %d5,%d0 4d762: 4c41 0002 remul %d1,%d2,%d0 4d766: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4d768: 2005 movel %d5,%d0 4d76a: d089 addl %a1,%d0 4d76c: 2405 movel %d5,%d2 4d76e: 2e00 movel %d0,%d7 4d770: 4c44 7005 remul %d4,%d5,%d7 4d774: 2e00 movel %d0,%d7 4d776: 9e85 subl %d5,%d7 4d778: 2a07 movel %d7,%d5
/* 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 ) {
4d77a: be82 cmpl %d2,%d7
4d77c: 62d6 bhis 4d754 <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN
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 ) {
4d77e: b48d cmpl %a5,%d2 4d780: 6500 ff3c bcsw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
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;
4d784: 70f8 moveq #-8,%d0 4d786: 9088 subl %a0,%d0 4d788: 2a40 moveal %d0,%a5 4d78a: 2e02 movel %d2,%d7 4d78c: dbc2 addal %d2,%a5 4d78e: 202e fffc movel %fp@(-4),%d0 4d792: 4c40 7005 remul %d0,%d5,%d7 4d796: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4d798: bbcc cmpal %a4,%a5 4d79a: 6400 ff1c bccw 4d6b8 <_Heap_Allocate_aligned_with_boundary+0x60> 4d79e: 4a8d tstl %a5 4d7a0: 6600 ff1c bnew 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4d7a4: 4a82 tstl %d2 4d7a6: 6700 ff16 beqw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4d7aa: 2f09 movel %a1,%sp@-
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4d7ac: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4d7b0: 2f02 movel %d2,%sp@- 4d7b2: 2f08 movel %a0,%sp@- 4d7b4: 2f0a movel %a2,%sp@- 4d7b6: 4eb9 0004 796c jsr 4796c <_Heap_Block_allocate> 4d7bc: 4fef 0010 lea %sp@(16),%sp 4d7c0: 2002 movel %d2,%d0 4d7c2: 6000 ff04 braw 4d6c8 <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4d7c6: b889 cmpl %a1,%d4
4d7c8: 640c bccs 4d7d6 <_Heap_Allocate_aligned_with_boundary+0x17e>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4d7ca: 4280 clrl %d0
}
return (void *) alloc_begin;
}
4d7cc: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4d7d2: 4e5e unlk %fp 4d7d4: 4e75 rts
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4d7d6: 4a81 tstl %d1 4d7d8: 6600 feb2 bnew 4d68c <_Heap_Allocate_aligned_with_boundary+0x34> 4d7dc: 2200 movel %d0,%d1 4d7de: 6000 feac braw 4d68c <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d7e2: 4283 clrl %d3 4d7e4: 4280 clrl %d0 4d7e6: 6000 fee0 braw 4d6c8 <_Heap_Allocate_aligned_with_boundary+0x70>
...
0004796c <_Heap_Block_allocate>:
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4796c: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4796e: 4e56 ffe0 linkw %fp,#-32 47972: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
47976: 2041 moveal %d1,%a0 47978: 5188 subql #8,%a0 4797a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4797e: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47982: 7601 moveq #1,%d3
)
{
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;
47984: 2848 moveal %a0,%a4 47986: 240a movel %a2,%d2 47988: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4798a: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4798e: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47992: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
47996: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4799a: 4a03 tstb %d3 4799c: 6600 00aa bnew 47a48 <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
479a0: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479a4: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
479a6: 52ab 0040 addql #1,%a3@(64)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
479aa: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
479ae: 2a40 moveal %d0,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
479b0: 226a 000c moveal %a2@(12),%a1
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479b4: c6aa 0004 andl %a2@(4),%d3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
479b8: 2340 0008 movel %d0,%a1@(8)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
479bc: 202b 0010 movel %a3@(16),%d0
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479c0: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
479c4: 2b49 000c movel %a1,%a5@(12)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
479c8: b08c cmpl %a4,%d0 479ca: 6200 0088 bhiw 47a54 <_Heap_Block_allocate+0xe8>
- 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;
479ce: 262a 0004 movel %a2@(4),%d3
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 )
479d2: 4c40 1004 remul %d0,%d4,%d1
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
479d6: 7201 moveq #1,%d1 479d8: 91c4 subal %d4,%a0
_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;
479da: 2008 movel %a0,%d0 479dc: 908a subl %a2,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
479de: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
479e2: c2aa 0004 andl %a2@(4),%d1 479e6: 6700 0082 beqw 47a6a <_Heap_Block_allocate+0xfe>
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
479ea: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
479ec: 52ab 0038 addql #1,%a3@(56) 479f0: 220a movel %a2,%d1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
479f2: 2869 0008 moveal %a1@(8),%a4
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
479f6: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
479f8: 7801 moveq #1,%d4 479fa: 8880 orl %d0,%d4
new_block->next = next;
479fc: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a00: d483 addl %d3,%d2 47a02: 9488 subl %a0,%d2
new_block->prev = block_before;
47a04: 2549 000c movel %a1,%a2@(12)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a08: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
47a0c: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
47a10: 294a 000c movel %a2,%a4@(12)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a14: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
47a16: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
47a18: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a1c: 2f05 movel %d5,%sp@- 47a1e: 2f01 movel %d1,%sp@- 47a20: 2f08 movel %a0,%sp@- 47a22: 2f0b movel %a3,%sp@- 47a24: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a2a: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
47a2e: 202b 0030 movel %a3@(48),%d0
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
47a32: b0ab 0034 cmpl %a3@(52),%d0
47a36: 6404 bccs 47a3c <_Heap_Block_allocate+0xd0>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
47a38: 2740 0034 movel %d0,%a3@(52)
}
return block;
}
47a3c: 200a movel %a2,%d0 47a3e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 47a44: 4e5e unlk %fp 47a46: 4e75 rts
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a48: 202b 0010 movel %a3@(16),%d0
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
47a4c: 224b moveal %a3,%a1
}
if ( alloc_area_offset < heap->page_size ) {
47a4e: b08c cmpl %a4,%d0 47a50: 6300 ff7c blsw 479ce <_Heap_Block_allocate+0x62>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
47a54: 4874 5800 pea %a4@(00000000,%d5:l) 47a58: 2f09 movel %a1,%sp@- 47a5a: 2f0a movel %a2,%sp@- 47a5c: 2f0b movel %a3,%sp@- 47a5e: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a64: 4fef 0010 lea %sp@(16),%sp 47a68: 60c4 bras 47a2e <_Heap_Block_allocate+0xc2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
47a6a: 95d2 subal %a2@,%a2
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;
47a6c: 78fe moveq #-2,%d4 47a6e: 2209 movel %a1,%d1 47a70: c8aa 0004 andl %a2@(4),%d4 47a74: d084 addl %d4,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a76: 78fe moveq #-2,%d4 47a78: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a7a: 7801 moveq #1,%d4 47a7c: 8880 orl %d0,%d4
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a7e: d483 addl %d3,%d2 47a80: 9488 subl %a0,%d2
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a82: 2544 0004 movel %d4,%a2@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a86: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
47a88: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
47a8a: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a8e: 2f05 movel %d5,%sp@- 47a90: 2f01 movel %d1,%sp@- 47a92: 2f08 movel %a0,%sp@- 47a94: 2f0b movel %a3,%sp@- 47a96: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a9c: 4fef 0010 lea %sp@(16),%sp 47aa0: 608c bras 47a2e <_Heap_Block_allocate+0xc2>
...
000526e4 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
526e4: 4e56 fff4 linkw %fp,#-12 526e8: 206e 0008 moveal %fp@(8),%a0 526ec: 202e 000c movel %fp@(12),%d0
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;
526f0: 2228 001c movel %a0@(28),%d1
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;
526f4: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
526f8: 48d7 040c moveml %d2-%d3/%a2,%sp@
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;
526fc: b0a8 0018 cmpl %a0@(24),%d0
52700: 6410 bccs 52712 <_Heap_Extend+0x2e>
* 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 ) {
52702: b280 cmpl %d0,%d1
52704: 671c beqs 52722 <_Heap_Extend+0x3e>
52706: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
52708: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5270e: 4e5e unlk %fp 52710: 4e75 rts
* 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 ) {
52712: b280 cmpl %d0,%d1
52714: 63ec blss 52702 <_Heap_Extend+0x1e>
52716: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
52718: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5271e: 4e5e unlk %fp 52720: 4e75 rts
{
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;
52722: 2200 movel %d0,%d1 52724: d2ae 0010 addl %fp@(16),%d1
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
52728: 70f8 moveq #-8,%d0 5272a: 9089 subl %a1,%d0 5272c: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5272e: 2600 movel %d0,%d3 52730: 4c68 3002 0010 remul %a0@(16),%d2,%d3
* 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;
52736: 2141 001c movel %d1,%a0@(28)
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
5273a: 246e 0014 moveal %fp@(20),%a2 5273e: 9082 subl %d2,%d0 52740: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
52742: b0a8 0014 cmpl %a0@(20),%d0
52746: 640c bccs 52754 <_Heap_Extend+0x70> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52748: 4280 clrl %d0
}
return HEAP_EXTEND_SUCCESSFUL;
}
5274a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 52750: 4e5e unlk %fp 52752: 4e75 rts
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
52754: 7401 moveq #1,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
52756: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
5275a: c4a9 0004 andl %a1@(4),%d2
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 =
5275e: 2228 0020 movel %a0@(32),%d1 52762: 928a subl %a2,%d1 52764: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
52766: 214a 0024 movel %a2,%a0@(36) 5276a: 2342 0004 movel %d2,%a1@(4)
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 =
5276e: 7401 moveq #1,%d2 52770: 8481 orl %d1,%d2 52772: 2542 0004 movel %d2,%a2@(4)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52776: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
5277a: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
5277e: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
52782: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52786: 2f08 movel %a0,%sp@- 52788: 4eb9 0004 bde8 jsr 4bde8 <_Heap_Free> 5278e: 508f addql #8,%sp 52790: 4280 clrl %d0 52792: 60b6 bras 5274a <_Heap_Extend+0x66>
0004d7ec <_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 )
{
4d7ec: 4e56 ffe4 linkw %fp,#-28 4d7f0: 202e 000c movel %fp@(12),%d0
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 )
4d7f4: 2040 moveal %d0,%a0 4d7f6: 5188 subql #8,%a0 4d7f8: 226e 0008 moveal %fp@(8),%a1 4d7fc: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4d802: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
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;
4d806: 2029 0020 movel %a1@(32),%d0
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 )
4d80a: 91c1 subal %d1,%a0
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
4d80c: b088 cmpl %a0,%d0 4d80e: 6200 00a0 bhiw 4d8b0 <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4d812: 2229 0024 movel %a1@(36),%d1
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
4d816: b288 cmpl %a0,%d1 4d818: 6500 0096 bcsw 4d8b0 <_Heap_Free+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;
4d81c: 2628 0004 movel %a0@(4),%d3 4d820: 74fe moveq #-2,%d2 4d822: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4d824: 45f0 2800 lea %a0@(00000000,%d2:l),%a2
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
4d828: b5c0 cmpal %d0,%a2 4d82a: 6500 0084 bcsw 4d8b0 <_Heap_Free+0xc4> 4d82e: b5c1 cmpal %d1,%a2
4d830: 627e bhis 4d8b0 <_Heap_Free+0xc4> <== 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;
4d832: 282a 0004 movel %a2@(4),%d4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4d836: 7a01 moveq #1,%d5 4d838: ca84 andl %d4,%d5 4d83a: 4a05 tstb %d5
4d83c: 6772 beqs 4d8b0 <_Heap_Free+0xc4> <== 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;
4d83e: 7afe moveq #-2,%d5 4d840: c885 andl %d5,%d4
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4d842: b5c1 cmpal %d1,%a2 4d844: 6700 00fa beqw 4d940 <_Heap_Free+0x154>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4d848: 7a01 moveq #1,%d5 4d84a: 7c01 moveq #1,%d6 4d84c: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4d850: bd85 eorl %d6,%d5
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 ) ) {
4d852: 7c01 moveq #1,%d6 4d854: c686 andl %d6,%d3 4d856: 4a03 tstb %d3
4d858: 6660 bnes 4d8ba <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4d85a: 2610 movel %a0@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4d85c: 91c3 subal %d3,%a0
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
4d85e: b1c0 cmpal %d0,%a0
4d860: 654e bcss 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
4d862: b1c1 cmpal %d1,%a0
4d864: 624a bhis 4d8b0 <_Heap_Free+0xc4> <== 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) ) {
4d866: 7001 moveq #1,%d0 4d868: c0a8 0004 andl %a0@(4),%d0 4d86c: 4a00 tstb %d0
4d86e: 6740 beqs 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4d870: 4a05 tstb %d5 4d872: 6700 00d2 beqw 4d946 <_Heap_Free+0x15a>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4d876: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4d87a: 53a9 0038 subql #1,%a1@(56)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4d87e: d882 addl %d2,%d4 4d880: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d882: 7001 moveq #1,%d0
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4d884: 246a 0008 moveal %a2@(8),%a2 4d888: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4d88a: 2183 3800 movel %d3,%a0@(00000000,%d3:l)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d88e: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4d892: 254b 000c movel %a3,%a2@(12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4d896: 274a 0008 movel %a2,%a3@(8)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d89a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d89e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d8a2: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4d8a6: 7001 moveq #1,%d0
return( true );
}
4d8a8: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4d8ac: 4e5e unlk %fp 4d8ae: 4e75 rts 4d8b0: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4d8b4: 4200 clrb %d0
}
4d8b6: 4e5e unlk %fp 4d8b8: 4e75 rts
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 */
4d8ba: 4a05 tstb %d5
4d8bc: 6736 beqs 4d8f4 <_Heap_Free+0x108>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4d8be: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4d8c2: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d8c4: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4d8c6: 246a 0008 moveal %a2@(8),%a2 4d8ca: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4d8cc: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4d8d0: 214b 000c movel %a3,%a0@(12)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4d8d4: 214a 0008 movel %a2,%a0@(8)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d8d8: 2140 0004 movel %d0,%a0@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d8dc: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d8e0: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d8e4: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4d8e8: 7001 moveq #1,%d0
new_block->prev = prev;
next->prev = new_block;
4d8ea: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4d8ee: 2748 0008 movel %a0,%a3@(8) 4d8f2: 60b4 bras 4d8a8 <_Heap_Free+0xbc>
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;
4d8f4: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d8f6: 7cfe moveq #-2,%d6
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;
4d8f8: 8a82 orl %d2,%d5
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4d8fa: 2669 0008 moveal %a1@(8),%a3 4d8fe: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d902: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4d906: 2482 movel %d2,%a2@
/* Statistics */
++stats->free_blocks;
4d908: 2029 0038 movel %a1@(56),%d0 4d90c: 5280 addql #1,%d0
new_block->next = next;
4d90e: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4d912: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4d916: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4d91a: 2748 000c movel %a0,%a3@(12) 4d91e: 2340 0038 movel %d0,%a1@(56)
#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;
4d922: b0a9 003c cmpl %a1@(60),%d0 4d926: 6300 ff72 blsw 4d89a <_Heap_Free+0xae>
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d92a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d92e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d932: 52a9 0050 addql #1,%a1@(80)
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;
4d936: 2340 003c movel %d0,%a1@(60)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d93a: 7001 moveq #1,%d0 4d93c: 6000 ff6a braw 4d8a8 <_Heap_Free+0xbc>
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4d940: 4205 clrb %d5 4d942: 6000 ff0e braw 4d852 <_Heap_Free+0x66>
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;
4d946: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d948: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d94a: 7cfe moveq #-2,%d6
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d94c: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4d94e: 2483 movel %d3,%a2@
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d950: 7001 moveq #1,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d952: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d956: cdaa 0004 andl %d6,%a2@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d95a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d95e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d962: 52a9 0050 addql #1,%a1@(80) 4d966: 6000 ff40 braw 4d8a8 <_Heap_Free+0xbc>
...
00052794 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
52794: 4e56 fff4 linkw %fp,#-12 52798: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5279c: 266e 0008 moveal %fp@(8),%a3 527a0: 246e 000c moveal %fp@(12),%a2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
527a4: 206b 0008 moveal %a3@(8),%a0
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
527a8: 4292 clrl %a2@
info->largest = 0;
527aa: 42aa 0004 clrl %a2@(4)
info->total = 0;
527ae: 42aa 0008 clrl %a2@(8)
for(the_block = _Heap_Free_list_first(the_heap);
527b2: b1cb cmpal %a3,%a0
527b4: 672e beqs 527e4 <_Heap_Get_free_information+0x50><== NEVER TAKEN
527b6: 327c 0001 moveaw #1,%a1 527ba: 4281 clrl %d1
- 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;
527bc: 70fe moveq #-2,%d0
the_block != tail;
the_block = the_block->next)
527be: 2409 movel %a1,%d2 527c0: 5282 addql #1,%d2 527c2: c0a8 0004 andl %a0@(4),%d0
/* 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;
527c6: d280 addl %d0,%d1
if ( info->largest < the_size )
527c8: b0aa 0004 cmpl %a2@(4),%d0
527cc: 6304 blss 527d2 <_Heap_Get_free_information+0x3e>
info->largest = the_size;
527ce: 2540 0004 movel %d0,%a2@(4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
527d2: 2068 0008 moveal %a0@(8),%a0
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
527d6: b1cb cmpal %a3,%a0
527d8: 6704 beqs 527de <_Heap_Get_free_information+0x4a>
527da: 2242 moveal %d2,%a1 527dc: 60de bras 527bc <_Heap_Get_free_information+0x28> 527de: 2541 0008 movel %d1,%a2@(8) 527e2: 2489 movel %a1,%a2@
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
527e4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
527e8: 4e5e unlk %fp <== NOT EXECUTED
000527ec <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
527ec: 4e56 fff4 linkw %fp,#-12 527f0: 206e 0008 moveal %fp@(8),%a0 527f4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 527f8: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
527fc: 2428 0024 movel %a0@(36),%d2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
52800: 2268 0020 moveal %a0@(32),%a1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
52804: 4292 clrl %a2@
the_info->Free.total = 0;
52806: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
5280a: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
5280e: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
52812: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
52816: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
5281a: b489 cmpl %a1,%d2
5281c: 6746 beqs 52864 <_Heap_Get_information+0x78> <== NEVER TAKEN
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;
5281e: 260a movel %a2,%d3 52820: 0683 0000 000c addil #12,%d3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
52826: 2229 0004 movel %a1@(4),%d1 5282a: 70fe moveq #-2,%d0
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) )
5282c: 204a moveal %a2,%a0 5282e: c081 andl %d1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
52830: d3c0 addal %d0,%a1
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;
52832: 2229 0004 movel %a1@(4),%d1 52836: 0801 0000 btst #0,%d1
5283a: 6702 beqs 5283e <_Heap_Get_information+0x52>
5283c: 2043 moveal %d3,%a0
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
5283e: 5290 addql #1,%a0@
info->total += the_size;
52840: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
52844: b0a8 0004 cmpl %a0@(4),%d0
52848: 6304 blss 5284e <_Heap_Get_information+0x62>
info->largest = the_size;
5284a: 2140 0004 movel %d0,%a0@(4)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
5284e: b3c2 cmpal %d2,%a1
52850: 66d8 bnes 5282a <_Heap_Get_information+0x3e>
52852: 202a 0014 movel %a2@(20),%d0 52856: 5080 addql #8,%d0
/* * 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;
52858: 2540 0014 movel %d0,%a2@(20)
}
5285c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 52860: 4e5e unlk %fp 52862: 4e75 rts
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
52864: 7008 moveq #8,%d0 <== NOT EXECUTED
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
52866: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
5286a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 5286e: 4e5e unlk %fp <== NOT EXECUTED
...
00047738 <_Heap_Initialize>:
Heap_Control *heap,
void *heap_area_begin_ptr,
uintptr_t heap_area_size,
uintptr_t page_size
)
{
47738: 4e56 ffe8 linkw %fp,#-24 4773c: 206e 0008 moveal %fp@(8),%a0 47740: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47744: 226e 000c moveal %fp@(12),%a1 47748: 242e 0010 movel %fp@(16),%d2 4774c: 222e 0014 movel %fp@(20),%d1
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
47750: 6600 00ce bnew 47820 <_Heap_Initialize+0xe8>
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
47754: 2009 movel %a1,%d0 47756: 5080 addql #8,%d0
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
47758: 123c 0004 moveb #4,%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4775c: 2a00 movel %d0,%d5 4775e: 7610 moveq #16,%d3 47760: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47764: 4a84 tstl %d4
47766: 6704 beqs 4776c <_Heap_Initialize+0x34> <== ALWAYS TAKEN
return value - remainder + alignment;
47768: d081 addl %d1,%d0 4776a: 9084 subl %d4,%d0
uintptr_t page_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
4776c: 2809 movel %a1,%d4 4776e: d882 addl %d2,%d4
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
47770: b889 cmpl %a1,%d4 47772: 6500 00bc bcsw 47830 <_Heap_Initialize+0xf8>
}
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
47776: 2a00 movel %d0,%d5 47778: 2440 moveal %d0,%a2 4777a: 9a89 subl %a1,%d5 4777c: 518a subql #8,%a2
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
4777e: ba82 cmpl %d2,%d5 47780: 6400 00ae bccw 47830 <_Heap_Initialize+0xf8>
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
47784: 9485 subl %d5,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
47786: 2a02 movel %d2,%d5 47788: 4c41 5000 remul %d1,%d0,%d5 4778c: 9480 subl %d0,%d2
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
4778e: b483 cmpl %d3,%d2 47790: 6500 009e bcsw 47830 <_Heap_Initialize+0xf8>
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
47794: 7a01 moveq #1,%d5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47796: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
4779a: 2002 movel %d2,%d0 4779c: 5180 subql #8,%d0
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
4779e: 8a82 orl %d2,%d5
return 0;
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
477a0: 2481 movel %d1,%a2@
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
477a2: 2545 0004 movel %d5,%a2@(4)
* last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
477a6: 2a0a movel %a2,%d5 477a8: 9a8b subl %a3,%d5 477aa: 2745 0004 movel %d5,%a3@(4)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
477ae: 2a39 0006 0bcc movel 60bcc <instance>,%d5
* block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size;
477b4: 2682 movel %d2,%a3@
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
477b6: 2141 0010 movel %d1,%a0@(16)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
477ba: 7201 moveq #1,%d1
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
first_block->next = _Heap_Free_list_tail( heap );
477bc: 2548 0008 movel %a0,%a2@(8)
first_block->prev = _Heap_Free_list_head( heap );
477c0: 2548 000c movel %a0,%a2@(12)
last_block->prev_size = first_block_size;
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
477c4: 2143 0014 movel %d3,%a0@(20)
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end;
477c8: 2144 001c movel %d4,%a0@(28)
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
477cc: 2142 0034 movel %d2,%a0@(52)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
477d0: 2145 0028 movel %d5,%a0@(40) 477d4: 5285 addql #1,%d5
heap->last_block = last_block;
_Heap_Free_list_head( heap )->next = first_block;
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
477d6: 2142 002c movel %d2,%a0@(44)
stats->free_size = first_block_size;
477da: 2142 0030 movel %d2,%a0@(48)
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
heap->area_begin = heap_area_begin;
477de: 2149 0018 movel %a1,%a0@(24)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
477e2: 2141 0038 movel %d1,%a0@(56)
stats->max_free_blocks = 1;
477e6: 2141 003c movel %d1,%a0@(60)
stats->used_blocks = 0;
477ea: 42a8 0040 clrl %a0@(64)
stats->max_search = 0;
477ee: 42a8 0044 clrl %a0@(68)
stats->allocs = 0;
477f2: 42a8 0048 clrl %a0@(72)
stats->searches = 0;
477f6: 42a8 004c clrl %a0@(76)
stats->frees = 0;
477fa: 42a8 0050 clrl %a0@(80)
stats->resizes = 0;
477fe: 42a8 0054 clrl %a0@(84)
heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block;
47802: 214b 0024 movel %a3,%a0@(36)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
47806: 23c5 0006 0bcc movel %d5,60bcc <instance>
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block;
4780c: 214a 000c movel %a2,%a0@(12)
/* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block;
47810: 214a 0020 movel %a2,%a0@(32)
heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block;
47814: 214a 0008 movel %a2,%a0@(8)
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
}
47818: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4781c: 4e5e unlk %fp 4781e: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47820: 7003 moveq #3,%d0 47822: c081 andl %d1,%d0
if ( remainder != 0 ) {
47824: 6704 beqs 4782a <_Heap_Initialize+0xf2>
return value - remainder + alignment;
47826: 5881 addql #4,%d1 47828: 9280 subl %d0,%d1
if ( page_size == 0 ) {
page_size = CPU_ALIGNMENT;
} else {
page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT );
if ( page_size < CPU_ALIGNMENT ) {
4782a: 7003 moveq #3,%d0 4782c: b081 cmpl %d1,%d0
4782e: 650a bcss 4783a <_Heap_Initialize+0x102>
);
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
47830: 4280 clrl %d0
}
47832: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 47836: 4e5e unlk %fp 47838: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4783a: 7610 moveq #16,%d3 4783c: 4c41 3000 remul %d1,%d0,%d3
if ( remainder != 0 ) {
47840: 4a80 tstl %d0
47842: 671e beqs 47862 <_Heap_Initialize+0x12a>
return value - remainder + alignment;
47844: 2601 movel %d1,%d3 47846: 0683 0000 0010 addil #16,%d3 4784c: 9680 subl %d0,%d3
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
4784e: 2009 movel %a1,%d0 47850: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47852: 2a00 movel %d0,%d5 47854: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47858: 4a84 tstl %d4 4785a: 6700 ff10 beqw 4776c <_Heap_Initialize+0x34> 4785e: 6000 ff08 braw 47768 <_Heap_Initialize+0x30> 47862: 2009 movel %a1,%d0 47864: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47866: 2a00 movel %d0,%d5
if ( remainder != 0 ) {
47868: 7610 moveq #16,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4786a: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
4786e: 4a84 tstl %d4 47870: 6700 fefa beqw 4776c <_Heap_Initialize+0x34> 47874: 6000 fef2 braw 47768 <_Heap_Initialize+0x30>
0005dcf8 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5dcf8: 4e56 0000 linkw %fp,#0 5dcfc: 202e 000c movel %fp@(12),%d0
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 )
5dd00: 2040 moveal %d0,%a0 5dd02: 5188 subql #8,%a0 5dd04: 226e 0008 moveal %fp@(8),%a1 5dd08: 2f02 movel %d2,%sp@- 5dd0a: 2400 movel %d0,%d2 5dd0c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5dd12: 91c1 subal %d1,%a0
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;
5dd14: 2229 0020 movel %a1@(32),%d1
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
5dd18: b288 cmpl %a0,%d1
5dd1a: 6238 bhis 5dd54 <_Heap_Size_of_alloc_area+0x5c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5dd1c: 2269 0024 moveal %a1@(36),%a1
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
5dd20: b3c8 cmpal %a0,%a1
5dd22: 6530 bcss 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5dd24: 74fe moveq #-2,%d2 5dd26: c4a8 0004 andl %a0@(4),%d2 5dd2a: d1c2 addal %d2,%a0
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
5dd2c: b1c1 cmpal %d1,%a0
5dd2e: 6524 bcss 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
5dd30: b1c9 cmpal %a1,%a0
5dd32: 6220 bhis 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5dd34: 7201 moveq #1,%d1 5dd36: c2a8 0004 andl %a0@(4),%d1 5dd3a: 4a01 tstb %d1
5dd3c: 6716 beqs 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5dd3e: 7204 moveq #4,%d1 5dd40: 9280 subl %d0,%d1 5dd42: 2001 movel %d1,%d0 5dd44: d088 addl %a0,%d0 5dd46: 226e 0010 moveal %fp@(16),%a1
return true;
}
5dd4a: 241f movel %sp@+,%d2 5dd4c: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5dd4e: 2280 movel %d0,%a1@ 5dd50: 7001 moveq #1,%d0
return true;
}
5dd52: 4e75 rts 5dd54: 241f movel %sp@+,%d2 5dd56: 4e5e unlk %fp
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
5dd58: 4200 clrb %d0 <== NOT EXECUTED
}
00048494 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48494: 4e56 ffc4 linkw %fp,#-60 48498: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4849c: 246e 0008 moveal %fp@(8),%a2
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;
484a0: 4bfa 049c lea %pc@(4893e <_Heap_Walk_print>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
484a4: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
484a8: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
484ac: 282a 0014 movel %a2@(20),%d4
Heap_Block *const last_block = heap->last_block;
484b0: 2a2a 0024 movel %a2@(36),%d5
Heap_Block *block = heap->first_block;
484b4: 266a 0020 moveal %a2@(32),%a3
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
484b8: 4a2e 0013 tstb %fp@(19)
484bc: 6604 bnes 484c2 <_Heap_Walk+0x2e>
484be: 4bfa ffcc lea %pc@(4848c <_Heap_Walk_print_nothing>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
484c2: 7003 moveq #3,%d0 484c4: b0b9 0006 3aac cmpl 63aac <_System_state_Current>,%d0
484ca: 670c beqs 484d8 <_Heap_Walk+0x44>
block = next_block;
}
return true;
}
484cc: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
484d2: 7001 moveq #1,%d0
block = next_block;
}
return true;
}
484d4: 4e5e unlk %fp 484d6: 4e75 rts
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)(
484d8: 2f2a 000c movel %a2@(12),%sp@- 484dc: 2f2a 0008 movel %a2@(8),%sp@- 484e0: 2f05 movel %d5,%sp@- 484e2: 2f0b movel %a3,%sp@- 484e4: 2f2a 001c movel %a2@(28),%sp@- 484e8: 2f2a 0018 movel %a2@(24),%sp@- 484ec: 2f04 movel %d4,%sp@- 484ee: 2f03 movel %d3,%sp@- 484f0: 4879 0005 fa5e pea 5fa5e <_Status_Object_name_errors_to_status+0x14> 484f6: 42a7 clrl %sp@- 484f8: 2f02 movel %d2,%sp@- 484fa: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
484fc: 4fef 002c lea %sp@(44),%sp 48500: 4a83 tstl %d3 48502: 6700 0158 beqw 4865c <_Heap_Walk+0x1c8>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
48506: 7003 moveq #3,%d0 48508: c083 andl %d3,%d0 4850a: 6600 016e bnew 4867a <_Heap_Walk+0x1e6>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
4850e: 2204 movel %d4,%d1 48510: 4c43 1000 remul %d3,%d0,%d1 48514: 4a80 tstl %d0 48516: 6600 017a bnew 48692 <_Heap_Walk+0x1fe>
);
return false;
}
if (
4851a: 200b movel %a3,%d0 4851c: 5080 addql #8,%d0 4851e: 4c43 0001 remul %d3,%d1,%d0 48522: 4a81 tstl %d1 48524: 6600 0184 bnew 486aa <_Heap_Walk+0x216>
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;
48528: 2c2b 0004 movel %a3@(4),%d6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
4852c: 7201 moveq #1,%d1 4852e: c286 andl %d6,%d1 48530: 2d46 ffec movel %d6,%fp@(-20) 48534: 4a01 tstb %d1 48536: 6700 018a beqw 486c2 <_Heap_Walk+0x22e>
);
return false;
}
if ( first_block->prev_size != page_size ) {
4853a: 2053 moveal %a3@,%a0 4853c: b1c3 cmpal %d3,%a0 4853e: 6600 00e2 bnew 48622 <_Heap_Walk+0x18e>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
48542: 2045 moveal %d5,%a0 48544: 7cfe moveq #-2,%d6 48546: 7001 moveq #1,%d0 48548: cca8 0004 andl %a0@(4),%d6 4854c: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 48550: 4a00 tstb %d0 48552: 6700 0184 beqw 486d8 <_Heap_Walk+0x244>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
48556: 2c2a 0010 movel %a2@(16),%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4855a: 206a 0008 moveal %a2@(8),%a0 4855e: 2d46 fffc movel %d6,%fp@(-4)
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 ) {
48562: b1ca cmpal %a2,%a0 48564: 6700 0198 beqw 486fe <_Heap_Walk+0x26a>
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;
48568: 286a 0020 moveal %a2@(32),%a4
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
4856c: b1cc cmpal %a4,%a0 4856e: 6500 00cc bcsw 4863c <_Heap_Walk+0x1a8>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48572: 2e2a 0024 movel %a2@(36),%d7 48576: 2d47 fff8 movel %d7,%fp@(-8)
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
4857a: be88 cmpl %a0,%d7 4857c: 6500 00be bcsw 4863c <_Heap_Walk+0x1a8>
);
return false;
}
if (
48580: 2248 moveal %a0,%a1 48582: 5089 addql #8,%a1 48584: 2009 movel %a1,%d0 48586: 4c46 0007 remul %d6,%d7,%d0 4858a: 2d49 fff4 movel %a1,%fp@(-12) 4858e: 4a87 tstl %d7 48590: 6600 0378 bnew 4890a <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48594: 7cfe moveq #-2,%d6 48596: 7001 moveq #1,%d0 48598: cca8 0004 andl %a0@(4),%d6 4859c: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 485a0: 6600 0382 bnew 48924 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
485a4: 2c28 000c movel %a0@(12),%d6 485a8: b5c6 cmpal %d6,%a2
485aa: 6654 bnes 48600 <_Heap_Walk+0x16c> <== NEVER TAKEN
485ac: 2e2e ffec movel %fp@(-20),%d7 485b0: 2243 moveal %d3,%a1 485b2: 2d47 fff4 movel %d7,%fp@(-12) 485b6: 2e0c movel %a4,%d7 485b8: 2841 moveal %d1,%a4 485ba: 2d44 fff0 movel %d4,%fp@(-16)
(*printer)(
485be: 2008 movel %a0,%d0
return false;
}
prev_block = free_block;
free_block = free_block->next;
485c0: 2068 0008 moveal %a0@(8),%a0
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 ) {
485c4: b1c6 cmpal %d6,%a0 485c6: 6700 0126 beqw 486ee <_Heap_Walk+0x25a> 485ca: b1c7 cmpal %d7,%a0
485cc: 656e bcss 4863c <_Heap_Walk+0x1a8>
);
return false;
}
if (
485ce: 2208 movel %a0,%d1 485d0: 5081 addql #8,%d1 485d2: b1ee fff8 cmpal %fp@(-8),%a0
485d6: 6264 bhis 4863c <_Heap_Walk+0x1a8> <== NEVER TAKEN
485d8: 282e fffc movel %fp@(-4),%d4 485dc: 4c44 1003 remul %d4,%d3,%d1 485e0: 4a83 tstl %d3 485e2: 6600 0326 bnew 4890a <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
485e6: 72fe moveq #-2,%d1 485e8: 7601 moveq #1,%d3 485ea: c2a8 0004 andl %a0@(4),%d1 485ee: c6b0 1804 andl %a0@(00000004,%d1:l),%d3 485f2: 6600 0330 bnew 48924 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
485f6: 2228 000c movel %a0@(12),%d1 485fa: b081 cmpl %d1,%d0
485fc: 67c0 beqs 485be <_Heap_Walk+0x12a>
485fe: 2c01 movel %d1,%d6
(*printer)(
48600: 2f06 movel %d6,%sp@- 48602: 2f08 movel %a0,%sp@- 48604: 4879 0005 fc4f pea 5fc4f <_Status_Object_name_errors_to_status+0x205>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4860a: 4878 0001 pea 1 <ADD> 4860e: 2f02 movel %d2,%sp@- 48610: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48612: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48616: 4200 clrb %d0
block = next_block;
}
return true;
}
48618: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4861e: 4e5e unlk %fp 48620: 4e75 rts
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
48622: 2f03 movel %d3,%sp@- 48624: 2f08 movel %a0,%sp@- 48626: 4879 0005 fba3 pea 5fba3 <_Status_Object_name_errors_to_status+0x159>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4862c: 4878 0001 pea 1 <ADD> 48630: 2f02 movel %d2,%sp@- 48632: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48634: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48638: 4200 clrb %d0 4863a: 60dc bras 48618 <_Heap_Walk+0x184>
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
4863c: 2f08 movel %a0,%sp@- 4863e: 4879 0005 fbe3 pea 5fbe3 <_Status_Object_name_errors_to_status+0x199>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48644: 4878 0001 pea 1 <ADD> 48648: 2f02 movel %d2,%sp@- 4864a: 4e95 jsr %a5@ 4864c: 4fef 0010 lea %sp@(16),%sp 48650: 4200 clrb %d0
block = next_block;
}
return true;
}
48652: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48658: 4e5e unlk %fp 4865a: 4e75 rts
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
4865c: 4879 0005 faef pea 5faef <_Status_Object_name_errors_to_status+0xa5>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48662: 4878 0001 pea 1 <ADD> 48666: 2f02 movel %d2,%sp@- 48668: 4e95 jsr %a5@ 4866a: 4fef 000c lea %sp@(12),%sp 4866e: 4200 clrb %d0
block = next_block;
}
return true;
}
48670: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48676: 4e5e unlk %fp 48678: 4e75 rts
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4867a: 2f03 movel %d3,%sp@- 4867c: 4879 0005 fb02 pea 5fb02 <_Status_Object_name_errors_to_status+0xb8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48682: 4878 0001 pea 1 <ADD> 48686: 2f02 movel %d2,%sp@- 48688: 4e95 jsr %a5@ 4868a: 4fef 0010 lea %sp@(16),%sp 4868e: 4200 clrb %d0 48690: 60c0 bras 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
48692: 2f04 movel %d4,%sp@- 48694: 4879 0005 fb20 pea 5fb20 <_Status_Object_name_errors_to_status+0xd6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4869a: 4878 0001 pea 1 <ADD> 4869e: 2f02 movel %d2,%sp@- 486a0: 4e95 jsr %a5@ 486a2: 4fef 0010 lea %sp@(16),%sp 486a6: 4200 clrb %d0 486a8: 60a8 bras 48652 <_Heap_Walk+0x1be>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
486aa: 2f0b movel %a3,%sp@- 486ac: 4879 0005 fb44 pea 5fb44 <_Status_Object_name_errors_to_status+0xfa>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
486b2: 4878 0001 pea 1 <ADD> 486b6: 2f02 movel %d2,%sp@- 486b8: 4e95 jsr %a5@ 486ba: 4fef 0010 lea %sp@(16),%sp 486be: 4200 clrb %d0 486c0: 6090 bras 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
486c2: 4879 0005 fb75 pea 5fb75 <_Status_Object_name_errors_to_status+0x12b> 486c8: 4878 0001 pea 1 <ADD> 486cc: 2f02 movel %d2,%sp@- 486ce: 4e95 jsr %a5@ 486d0: 4fef 000c lea %sp@(12),%sp 486d4: 4200 clrb %d0 486d6: 6098 bras 48670 <_Heap_Walk+0x1dc>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
486d8: 4879 0005 fbce pea 5fbce <_Status_Object_name_errors_to_status+0x184>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
486de: 4878 0001 pea 1 <ADD> 486e2: 2f02 movel %d2,%sp@- 486e4: 4e95 jsr %a5@ 486e6: 4fef 000c lea %sp@(12),%sp 486ea: 4200 clrb %d0 486ec: 6082 bras 48670 <_Heap_Walk+0x1dc> 486ee: 202e fff4 movel %fp@(-12),%d0 486f2: 2609 movel %a1,%d3 486f4: 220c movel %a4,%d1 486f6: 282e fff0 movel %fp@(-16),%d4 486fa: 2d40 ffec movel %d0,%fp@(-20)
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
486fe: b7c5 cmpal %d5,%a3 48700: 6700 fdca beqw 484cc <_Heap_Walk+0x38> 48704: 2c2e ffec movel %fp@(-20),%d6 48708: 2d43 fff8 movel %d3,%fp@(-8)
- 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;
4870c: 76fe moveq #-2,%d3 4870e: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48710: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
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 ) {
48714: 4a01 tstb %d1 48716: 6700 0126 beqw 4883e <_Heap_Walk+0x3aa>
(*printer)(
4871a: 2f06 movel %d6,%sp@- 4871c: 2f0b movel %a3,%sp@- 4871e: 4879 0005 fc81 pea 5fc81 <_Status_Object_name_errors_to_status+0x237> 48724: 42a7 clrl %sp@- 48726: 2f02 movel %d2,%sp@- 48728: 4e95 jsr %a5@ 4872a: 4fef 0014 lea %sp@(20),%sp
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
4872e: b9ea 0020 cmpal %a2@(32),%a4 48732: 6500 00d0 bcsw 48804 <_Heap_Walk+0x370> 48736: b9ea 0024 cmpal %a2@(36),%a4 4873a: 6200 00c8 bhiw 48804 <_Heap_Walk+0x370>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
4873e: 2e2e fff8 movel %fp@(-8),%d7 48742: 2206 movel %d6,%d1 48744: 4c47 1000 remul %d7,%d0,%d1 48748: 4a80 tstl %d0 4874a: 6600 0162 bnew 488ae <_Heap_Walk+0x41a>
);
return false;
}
if ( block_size < min_block_size ) {
4874e: bc84 cmpl %d4,%d6 48750: 6500 0178 bcsw 488ca <_Heap_Walk+0x436>
);
return false;
}
if ( next_block_begin <= block_begin ) {
48754: b9cb cmpal %a3,%a4 48756: 6300 0196 blsw 488ee <_Heap_Walk+0x45a>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4875a: 7001 moveq #1,%d0 4875c: c0ac 0004 andl %a4@(4),%d0 48760: 4a00 tstb %d0 48762: 6600 00bc bnew 48820 <_Heap_Walk+0x38c>
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;
48766: 262b 0004 movel %a3@(4),%d3
- 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;
4876a: 7cfe moveq #-2,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4876c: 2e0b movel %a3,%d7
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;
4876e: 43f9 0005 fd77 lea 5fd77 <_Status_Object_name_errors_to_status+0x32d>,%a1
- 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;
48774: cc83 andl %d3,%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48776: 206a 0008 moveal %a2@(8),%a0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4877a: de86 addl %d6,%d7
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)(
4877c: 222b 0008 movel %a3@(8),%d1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48780: 2d48 fffc movel %a0,%fp@(-4)
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
48784: b2aa 000c cmpl %a2@(12),%d1
48788: 6710 beqs 4879a <_Heap_Walk+0x306>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
4878a: 43f9 0005 fd81 lea 5fd81 <_Status_Object_name_errors_to_status+0x337>,%a1 48790: b5c1 cmpal %d1,%a2
48792: 6706 beqs 4879a <_Heap_Walk+0x306>
48794: 43f9 0005 f9bc lea 5f9bc <rtems_filesystem_default_pathconf+0x40>,%a1
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)(
4879a: 202b 000c movel %a3@(12),%d0 4879e: 41f9 0005 fd8b lea 5fd8b <_Status_Object_name_errors_to_status+0x341>,%a0 487a4: b0ae fffc cmpl %fp@(-4),%d0
487a8: 6710 beqs 487ba <_Heap_Walk+0x326>
"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)" : ""),
487aa: 41f9 0005 fd96 lea 5fd96 <_Status_Object_name_errors_to_status+0x34c>,%a0 487b0: b5c0 cmpal %d0,%a2
487b2: 6706 beqs 487ba <_Heap_Walk+0x326>
487b4: 41f9 0005 f9bc lea 5f9bc <rtems_filesystem_default_pathconf+0x40>,%a0
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)(
487ba: 2f09 movel %a1,%sp@- 487bc: 2f01 movel %d1,%sp@- 487be: 2f08 movel %a0,%sp@- 487c0: 2f00 movel %d0,%sp@- 487c2: 2f0b movel %a3,%sp@- 487c4: 4879 0005 fda0 pea 5fda0 <_Status_Object_name_errors_to_status+0x356> 487ca: 42a7 clrl %sp@- 487cc: 2f02 movel %d2,%sp@- 487ce: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
487d0: 4fef 0020 lea %sp@(32),%sp 487d4: 2247 moveal %d7,%a1 487d6: 2011 movel %a1@,%d0 487d8: b086 cmpl %d6,%d0 487da: 6700 0082 beqw 4885e <_Heap_Walk+0x3ca>
(*printer)(
487de: 2f07 movel %d7,%sp@- 487e0: 2f00 movel %d0,%sp@- 487e2: 2f06 movel %d6,%sp@- 487e4: 2f0b movel %a3,%sp@- 487e6: 4879 0005 fdcc pea 5fdcc <_Status_Object_name_errors_to_status+0x382> 487ec: 4878 0001 pea 1 <ADD> 487f0: 2f02 movel %d2,%sp@- 487f2: 4e95 jsr %a5@ 487f4: 4fef 001c lea %sp@(28),%sp
block = next_block;
}
return true;
}
487f8: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
487fe: 4200 clrb %d0
block = next_block;
}
return true;
}
48800: 4e5e unlk %fp 48802: 4e75 rts
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
48804: 2f0c movel %a4,%sp@- 48806: 2f0b movel %a3,%sp@- 48808: 4879 0005 fcbd pea 5fcbd <_Status_Object_name_errors_to_status+0x273>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4880e: 4878 0001 pea 1 <ADD> 48812: 2f02 movel %d2,%sp@- 48814: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48816: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4881a: 4200 clrb %d0 4881c: 6000 fdfa braw 48618 <_Heap_Walk+0x184>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
48820: b9c5 cmpal %d5,%a4 48822: 6700 fca8 beqw 484cc <_Heap_Walk+0x38>
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 ) {
48826: 2c2c 0004 movel %a4@(4),%d6 4882a: 7201 moveq #1,%d1
- 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;
4882c: 76fe moveq #-2,%d3 4882e: 264c moveal %a4,%a3 48830: c286 andl %d6,%d1 48832: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48834: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
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 ) {
48838: 4a01 tstb %d1 4883a: 6600 fede bnew 4871a <_Heap_Walk+0x286>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
4883e: 2f13 movel %a3@,%sp@- 48840: 2f06 movel %d6,%sp@- 48842: 2f0b movel %a3,%sp@- 48844: 4879 0005 fc98 pea 5fc98 <_Status_Object_name_errors_to_status+0x24e> 4884a: 42a7 clrl %sp@- 4884c: 2f02 movel %d2,%sp@- 4884e: 4e95 jsr %a5@ 48850: 4fef 0018 lea %sp@(24),%sp
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
48854: b9ea 0020 cmpal %a2@(32),%a4
48858: 65aa bcss 48804 <_Heap_Walk+0x370> <== NEVER TAKEN
4885a: 6000 feda braw 48736 <_Heap_Walk+0x2a2>
);
return false;
}
if ( !prev_used ) {
4885e: 7001 moveq #1,%d0 48860: c680 andl %d0,%d3 48862: 4a03 tstb %d3
48864: 672e beqs 48894 <_Heap_Walk+0x400>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48866: 206a 0008 moveal %a2@(8),%a0
)
{
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 ) {
4886a: b5c8 cmpal %a0,%a2
4886c: 670c beqs 4887a <_Heap_Walk+0x3e6> <== NEVER TAKEN
if ( free_block == block ) {
4886e: b7c8 cmpal %a0,%a3
48870: 67ae beqs 48820 <_Heap_Walk+0x38c>
return true;
}
free_block = free_block->next;
48872: 2068 0008 moveal %a0@(8),%a0
)
{
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 ) {
48876: b5c8 cmpal %a0,%a2
48878: 66f4 bnes 4886e <_Heap_Walk+0x3da>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4887a: 2f0b movel %a3,%sp@- 4887c: 4879 0005 fe34 pea 5fe34 <_Status_Object_name_errors_to_status+0x3ea> 48882: 4878 0001 pea 1 <ADD> 48886: 2f02 movel %d2,%sp@- 48888: 4e95 jsr %a5@ 4888a: 4fef 0010 lea %sp@(16),%sp 4888e: 4200 clrb %d0 48890: 6000 fdc0 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !prev_used ) {
(*printer)(
48894: 2f0b movel %a3,%sp@- 48896: 4879 0005 fe05 pea 5fe05 <_Status_Object_name_errors_to_status+0x3bb>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4889c: 4878 0001 pea 1 <ADD> 488a0: 2f02 movel %d2,%sp@- 488a2: 4e95 jsr %a5@ 488a4: 4fef 0010 lea %sp@(16),%sp 488a8: 4200 clrb %d0 488aa: 6000 fda6 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
488ae: 2f06 movel %d6,%sp@- 488b0: 2f0b movel %a3,%sp@- 488b2: 4879 0005 fcea pea 5fcea <_Status_Object_name_errors_to_status+0x2a0>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488b8: 4878 0001 pea 1 <ADD> 488bc: 2f02 movel %d2,%sp@- 488be: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
488c0: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488c4: 4200 clrb %d0 488c6: 6000 fd50 braw 48618 <_Heap_Walk+0x184>
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
488ca: 2f04 movel %d4,%sp@- 488cc: 2f06 movel %d6,%sp@- 488ce: 2f0b movel %a3,%sp@- 488d0: 4879 0005 fd18 pea 5fd18 <_Status_Object_name_errors_to_status+0x2ce> 488d6: 4878 0001 pea 1 <ADD> 488da: 2f02 movel %d2,%sp@- 488dc: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
488de: 4fef 0018 lea %sp@(24),%sp
block = next_block;
}
return true;
}
488e2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
488e8: 4200 clrb %d0
block = next_block;
}
return true;
}
488ea: 4e5e unlk %fp 488ec: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488ee: 2f0c movel %a4,%sp@- 488f0: 2f0b movel %a3,%sp@- 488f2: 4879 0005 fd43 pea 5fd43 <_Status_Object_name_errors_to_status+0x2f9> 488f8: 4878 0001 pea 1 <ADD> 488fc: 2f02 movel %d2,%sp@- 488fe: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48900: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48904: 4200 clrb %d0 48906: 6000 fd10 braw 48618 <_Heap_Walk+0x184>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4890a: 2f08 movel %a0,%sp@- 4890c: 4879 0005 fc03 pea 5fc03 <_Status_Object_name_errors_to_status+0x1b9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48912: 4878 0001 pea 1 <ADD> 48916: 2f02 movel %d2,%sp@- 48918: 4e95 jsr %a5@ 4891a: 4fef 0010 lea %sp@(16),%sp 4891e: 4200 clrb %d0 48920: 6000 fd30 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
48924: 2f08 movel %a0,%sp@- 48926: 4879 0005 fc33 pea 5fc33 <_Status_Object_name_errors_to_status+0x1e9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4892c: 4878 0001 pea 1 <ADD> 48930: 2f02 movel %d2,%sp@- 48932: 4e95 jsr %a5@ 48934: 4fef 0010 lea %sp@(16),%sp 48938: 4200 clrb %d0 4893a: 6000 fd16 braw 48652 <_Heap_Walk+0x1be>
00046e44 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46e44: 4e56 0000 linkw %fp,#0 46e48: 2f0a movel %a2,%sp@- 46e4a: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e4c: 4ab9 0006 1ce6 tstl 61ce6 <_IO_Number_of_drivers>
46e52: 671e beqs 46e72 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46e54: 4282 clrl %d2 46e56: 45f9 0004 d2c8 lea 4d2c8 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46e5c: 42a7 clrl %sp@- 46e5e: 42a7 clrl %sp@- 46e60: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e62: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46e64: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e66: 4fef 000c lea %sp@(12),%sp 46e6a: b4b9 0006 1ce6 cmpl 61ce6 <_IO_Number_of_drivers>,%d2
46e70: 65ea bcss 46e5c <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46e72: 242e fff8 movel %fp@(-8),%d2 46e76: 246e fffc moveal %fp@(-4),%a2
46e7a: 4e5e unlk %fp <== NOT EXECUTED
00046e7e <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46e7e: 4e56 fff0 linkw %fp,#-16 46e82: 48d7 003c moveml %d2-%d5,%sp@
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;
46e86: 2639 0005 fc86 movel 5fc86 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46e8c: 2439 0005 fc82 movel 5fc82 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46e92: 2839 0005 fc7e movel 5fc7e <Configuration+0x2a>,%d4
/*
* 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 )
46e98: b882 cmpl %d2,%d4
46e9a: 6216 bhis 46eb2 <_IO_Manager_initialization+0x34>
* 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;
46e9c: 23c3 0006 1cea movel %d3,61cea <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46ea2: 23c2 0006 1ce6 movel %d2,61ce6 <_IO_Number_of_drivers>
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
46ea8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46eae: 4e5e unlk %fp 46eb0: 4e75 rts
/*
* 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 *)
46eb2: 2004 movel %d4,%d0 46eb4: 2a04 movel %d4,%d5 46eb6: e788 lsll #3,%d0 46eb8: eb8d lsll #5,%d5 46eba: 9a80 subl %d0,%d5 46ebc: 2f05 movel %d5,%sp@- 46ebe: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ec4: 2f05 movel %d5,%sp@- 46ec6: 42a7 clrl %sp@-
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
46ec8: 23c4 0006 1ce6 movel %d4,61ce6 <_IO_Number_of_drivers>
memset(
46ece: 2f00 movel %d0,%sp@-
/*
* 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 *)
46ed0: 23c0 0006 1cea movel %d0,61cea <_IO_Driver_address_table>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ed6: 4eb9 0005 0e48 jsr 50e48 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46edc: 4fef 0010 lea %sp@(16),%sp 46ee0: 4a82 tstl %d2
46ee2: 67c4 beqs 46ea8 <_IO_Manager_initialization+0x2a><== NEVER TAKEN
46ee4: 2839 0006 1cea movel 61cea <_IO_Driver_address_table>,%d4 46eea: 4280 clrl %d0 46eec: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46eee: 2243 moveal %d3,%a1 46ef0: 2044 moveal %d4,%a0 46ef2: d3c0 addal %d0,%a1 46ef4: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46ef6: 5281 addql #1,%d1 46ef8: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46efe: 20d9 movel %a1@+,%a0@+ 46f00: 20d9 movel %a1@+,%a0@+ 46f02: 20d9 movel %a1@+,%a0@+ 46f04: 20d9 movel %a1@+,%a0@+ 46f06: 20d9 movel %a1@+,%a0@+ 46f08: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f0a: b282 cmpl %d2,%d1
46f0c: 649a bccs 46ea8 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
46f0e: 2243 moveal %d3,%a1 46f10: 2044 moveal %d4,%a0 46f12: d3c0 addal %d0,%a1 46f14: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f16: 5281 addql #1,%d1 46f18: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46f1e: 20d9 movel %a1@+,%a0@+ 46f20: 20d9 movel %a1@+,%a0@+ 46f22: 20d9 movel %a1@+,%a0@+ 46f24: 20d9 movel %a1@+,%a0@+ 46f26: 20d9 movel %a1@+,%a0@+ 46f28: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f2a: b282 cmpl %d2,%d1
46f2c: 65c0 bcss 46eee <_IO_Manager_initialization+0x70><== NEVER TAKEN
46f2e: 6000 ff78 braw 46ea8 <_IO_Manager_initialization+0x2a>
...
00047b00 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
47b00: 4e56 0000 linkw %fp,#0
_ISR_Signals_to_thread_executing = false;
47b04: 4200 clrb %d0
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
47b06: 2f0a movel %a2,%sp@-
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b08: 4878 0400 pea 400 <D_BIAS+0x2> 47b0c: 45f9 0004 9d10 lea 49d10 <_Workspace_Allocate_or_fatal_error>,%a2
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
47b12: 13c0 0006 1574 moveb %d0,61574 <_ISR_Signals_to_thread_executing>
_ISR_Nest_level = 0;
47b18: 42b9 0006 14c6 clrl 614c6 <_ISR_Nest_level>
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b1e: 4e92 jsr %a2@
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
47b20: 2239 0005 fc70 movel 5fc70 <Configuration+0x1c>,%d1 47b26: 588f addql #4,%sp
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b28: 23c0 0006 14a6 movel %d0,614a6 <_ISR_Vector_table>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
47b2e: b2b9 0005 fc4e cmpl 5fc4e <rtems_minimum_stack_size>,%d1
47b34: 6522 bcss 47b58 <_ISR_Handler_initialization+0x58><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
47b36: 2f01 movel %d1,%sp@- 47b38: 4e92 jsr %a2@
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b3a: 246e fffc moveal %fp@(-4),%a2
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
47b3e: 2200 movel %d0,%d1 47b40: d2b9 0005 fc70 addl 5fc70 <Configuration+0x1c>,%d1 47b46: 588f addql #4,%sp
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b48: 4e5e unlk %fp
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
47b4a: 23c1 0006 13e0 movel %d1,613e0 <_CPU_Interrupt_stack_high>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
47b50: 23c0 0006 143c movel %d0,6143c <_CPU_Interrupt_stack_low>
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b56: 4e75 rts
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
_Internal_error_Occurred(
47b58: 4878 0005 pea 5 <COMPARE> 47b5c: 4878 0001 pea 1 <ADD> 47b60: 42a7 clrl %sp@- 47b62: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
00047aa4 <_Internal_error_Occurred>:
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47aa4: 4280 clrl %d0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47aa6: 4e56 0000 linkw %fp,#0 47aaa: 222e 000c movel %fp@(12),%d1
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47aae: 1001 moveb %d1,%d0 47ab0: 2040 moveal %d0,%a0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ab2: 2f03 movel %d3,%sp@- 47ab4: 202e 0008 movel %fp@(8),%d0 47ab8: 2f02 movel %d2,%sp@- 47aba: 242e 0010 movel %fp@(16),%d2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47abe: 2f02 movel %d2,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47ac0: 13c1 0006 14d6 moveb %d1,614d6 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ac6: 2f08 movel %a0,%sp@-
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47ac8: 23c0 0006 14d2 movel %d0,614d2 <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ace: 2f00 movel %d0,%sp@-
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
47ad0: 23c2 0006 14d8 movel %d2,614d8 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47ad6: 4eb9 0004 9942 jsr 49942 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47adc: 307c 0700 moveaw #1792,%a0 47ae0: 2608 movel %a0,%d3 47ae2: 40c0 movew %sr,%d0 47ae4: 8083 orl %d3,%d0 47ae6: 46c0 movew %d0,%sr
47ae8: 2002 movel %d2,%d0 <== NOT EXECUTED 47aea: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47af0: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47af2: 7005 moveq #5,%d0 47af4: 4fef 000c lea %sp@(12),%sp 47af8: 23c0 0006 15b4 movel %d0,615b4 <_System_state_Current> 47afe: 60fe bras 47afe <_Internal_error_Occurred+0x5a>
00047b68 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47b68: 4e56 fff0 linkw %fp,#-16 47b6c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47b70: 246e 0008 moveal %fp@(8),%a2
* 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 )
47b74: 4aaa 0014 tstl %a2@(20)
47b78: 660c bnes 47b86 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
47b7a: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
47b7c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b82: 4e5e unlk %fp 47b84: 4e75 rts
/*
* 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 );
47b86: 240a movel %a2,%d2 47b88: 0682 0000 001c addil #28,%d2 47b8e: 47f9 0004 71d0 lea 471d0 <_Chain_Get>,%a3 47b94: 2f02 movel %d2,%sp@- 47b96: 4e93 jsr %a3@
if ( information->auto_extend ) {
47b98: 588f addql #4,%sp 47b9a: 4a2a 0010 tstb %a2@(16)
47b9e: 67dc beqs 47b7c <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47ba0: 4a80 tstl %d0
47ba2: 6738 beqs 47bdc <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47ba4: 2040 moveal %d0,%a0 47ba6: 4281 clrl %d1 47ba8: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47baa: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bac: 362a 0008 movew %a2@(8),%d3 47bb0: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47bb4: 306a 0028 moveaw %a2@(40),%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bb8: 342a 0012 movew %a2@(18),%d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bbc: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47bbe: 5388 subql #1,%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bc0: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
47bc4: 3548 0028 movew %a0,%a2@(40)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bc8: 206a 002a moveal %a2@(42),%a0 47bcc: e589 lsll #2,%d1
information->inactive--;
}
}
return the_object;
}
47bce: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47bd4: 4e5e unlk %fp
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bd6: d1c1 addal %d1,%a0 47bd8: 5390 subql #1,%a0@
information->inactive--;
}
}
return the_object;
}
47bda: 4e75 rts
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
47bdc: 2f0a movel %a2,%sp@- 47bde: 4eb9 0004 7c24 jsr 47c24 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47be4: 2f02 movel %d2,%sp@- 47be6: 4e93 jsr %a3@
}
if ( the_object ) {
47be8: 508f addql #8,%sp 47bea: 4a80 tstl %d0
47bec: 66b6 bnes 47ba4 <_Objects_Allocate+0x3c>
information->inactive--;
}
}
return the_object;
}
47bee: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47bf4: 4e5e unlk %fp <== NOT EXECUTED
00047bf8 <_Objects_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47bf8: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47bfa: 4e56 0000 linkw %fp,#0 47bfe: 226e 000c moveal %fp@(12),%a1 47c02: 206e 0008 moveal %fp@(8),%a0 47c06: 2f0a movel %a2,%sp@- 47c08: 2468 0018 moveal %a0@(24),%a2 47c0c: 3029 000a movew %a1@(10),%d0 47c10: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c14: 2d49 000c movel %a1,%fp@(12)
}
47c18: 245f moveal %sp@+,%a2 47c1a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c1c: 4ef9 0004 8180 jmp 48180 <_Objects_Namespace_remove>
...
00047c24 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47c24: 4e56 ffcc linkw %fp,#-52 47c28: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47c2c: 246e 0008 moveal %fp@(8),%a2
/*
* 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 );
47c30: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c32: 206a 002e moveal %a2@(46),%a0
/*
* 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 );
47c36: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c3a: 4a88 tstl %a0 47c3c: 6700 022c beqw 47e6a <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47c40: 322a 000e movew %a2@(14),%d1 47c44: 302a 0012 movew %a2@(18),%d0 47c48: 3801 movew %d1,%d4 47c4a: 0284 0000 ffff andil #65535,%d4 47c50: 88c0 divuw %d0,%d4 47c52: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47c58: 6700 0224 beqw 47e7e <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47c5c: 4a90 tstl %a0@ 47c5e: 6700 021e beqw 47e7e <_Objects_Extend_information+0x25a> 47c62: 5888 addql #4,%a0 47c64: 2605 movel %d5,%d3 47c66: 4282 clrl %d2 47c68: 0280 0000 ffff andil #65535,%d0
break;
else
index_base += information->allocation_size;
47c6e: d680 addl %d0,%d3
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47c70: 5282 addql #1,%d2 47c72: b484 cmpl %d4,%d2
47c74: 6404 bccs 47c7a <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
47c76: 4a98 tstl %a0@+
47c78: 66f4 bnes 47c6e <_Objects_Extend_information+0x4a>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47c7a: 0281 0000 ffff andil #65535,%d1 47c80: 2641 moveal %d1,%a3 47c82: d7c0 addal %d0,%a3
/*
* 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 ) {
47c84: b7fc 0000 ffff cmpal #65535,%a3 47c8a: 6200 0186 bhiw 47e12 <_Objects_Extend_information+0x1ee>
/*
* 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;
47c8e: 41ea 0014 lea %a2@(20),%a0 47c92: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47c96: 4a2a 0010 tstb %a2@(16) 47c9a: 6700 0180 beqw 47e1c <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
47c9e: 2f00 movel %d0,%sp@- 47ca0: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !new_object_block )
47ca6: 588f addql #4,%sp
* 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 );
47ca8: 2c00 movel %d0,%d6
if ( !new_object_block )
47caa: 6700 0166 beqw 47e12 <_Objects_Extend_information+0x1ee>
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
47cae: 4280 clrl %d0 47cb0: 302a 000e movew %a2@(14),%d0 47cb4: b083 cmpl %d3,%d0 47cb6: 6200 00c4 bhiw 47d7c <_Objects_Extend_information+0x158>
*/
/*
* Up the block count and maximum
*/
block_count++;
47cba: 2a44 moveal %d4,%a5 47cbc: 528d addql #1,%a5
* 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 );
47cbe: 200b movel %a3,%d0 47cc0: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47cc4: d088 addl %a0,%d0 47cc6: d085 addl %d5,%d0 47cc8: e588 lsll #2,%d0 47cca: 2f00 movel %d0,%sp@- 47ccc: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !object_blocks ) {
47cd2: 588f addql #4,%sp
* 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 );
47cd4: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47cd6: 4a80 tstl %d0 47cd8: 6700 01b2 beqw 47e8c <_Objects_Extend_information+0x268>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cdc: 2e0d movel %a5,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47cde: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47ce0: e58f lsll #2,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47ce2: 302a 000e movew %a2@(14),%d0
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
47ce6: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47cea: de8d addl %a5,%d7 47cec: b085 cmpl %d5,%d0 47cee: 6200 013c bhiw 47e2c <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47cf2: 4a85 tstl %d5
47cf4: 670c beqs 47d02 <_Objects_Extend_information+0xde><== 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,
47cf6: 2047 moveal %d7,%a0 47cf8: 4280 clrl %d0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
47cfa: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47cfc: 5280 addql #1,%d0 47cfe: b085 cmpl %d5,%d0
47d00: 65f8 bcss 47cfa <_Objects_Extend_information+0xd6><== NEVER TAKEN
47d02: e58c lsll #2,%d4
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d04: 4281 clrl %d1 47d06: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47d0a: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d0e: d283 addl %d3,%d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47d10: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d14: b283 cmpl %d3,%d1
47d16: 6310 blss 47d28 <_Objects_Extend_information+0x104><== NEVER TAKEN
47d18: 2247 moveal %d7,%a1 47d1a: 2003 movel %d3,%d0 47d1c: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47d20: 4298 clrl %a0@+
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
47d22: 5280 addql #1,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d24: b081 cmpl %d1,%d0
47d26: 65f8 bcss 47d20 <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47d28: 203c 0000 0700 movel #1792,%d0 47d2e: 40c4 movew %sr,%d4 47d30: 8084 orl %d4,%d0 47d32: 46c0 movew %d0,%sr
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d34: 2012 movel %a2@,%d0 47d36: 7218 moveq #24,%d1 47d38: 4285 clrl %d5 47d3a: e3a8 lsll %d1,%d0 47d3c: 3a0b movew %a3,%d5 47d3e: 4281 clrl %d1 47d40: 2245 moveal %d5,%a1 47d42: 7a1b moveq #27,%d5 47d44: 322a 0004 movew %a2@(4),%d1 47d48: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47d4c: 206a 002e moveal %a2@(46),%a0
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d50: eba9 lsll %d5,%d1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47d52: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
47d56: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d5a: 8081 orl %d1,%d0 47d5c: 2209 movel %a1,%d1 47d5e: 8280 orl %d0,%d1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
47d60: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d64: 2541 000a movel %d1,%a2@(10)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
47d68: 2547 0018 movel %d7,%a2@(24)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47d6c: 46c4 movew %d4,%sr
if ( old_tables )
47d6e: 4a88 tstl %a0
47d70: 670a beqs 47d7c <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
47d72: 2f08 movel %a0,%sp@- 47d74: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 47d7a: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d7c: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d80: 4280 clrl %d0 47d82: 280e movel %fp,%d4 47d84: 0684 ffff fff4 addil #-12,%d4 47d8a: 47f9 0004 71d0 lea 471d0 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d90: 2a0a movel %a2,%d5 47d92: 0685 0000 001c addil #28,%d5 47d98: 49f9 0004 7170 lea 47170 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d9e: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47da0: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47da4: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47da8: 2f2a 0014 movel %a2@(20),%sp@- 47dac: 2f00 movel %d0,%sp@- 47dae: 2f06 movel %d6,%sp@- 47db0: 2f04 movel %d4,%sp@- 47db2: 4eb9 0004 d324 jsr 4d324 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47db8: 4fef 0010 lea %sp@(16),%sp 47dbc: 2f04 movel %d4,%sp@- 47dbe: 4e93 jsr %a3@ 47dc0: 588f addql #4,%sp 47dc2: 4a80 tstl %d0
47dc4: 6732 beqs 47df8 <_Objects_Extend_information+0x1d4><== NEVER TAKEN
the_object->id = _Objects_Build_id(
47dc6: 2212 movel %a2@,%d1 47dc8: 7c18 moveq #24,%d6 47dca: 7e1b moveq #27,%d7 47dcc: 2040 moveal %d0,%a0 47dce: eda9 lsll %d6,%d1 47dd0: 4286 clrl %d6 47dd2: 3c2a 0004 movew %a2@(4),%d6 47dd6: 08c1 0010 bset #16,%d1 47dda: efae lsll %d7,%d6 47ddc: 8286 orl %d6,%d1 47dde: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47de0: 5283 addql #1,%d3
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
47de2: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47de6: 2f00 movel %d0,%sp@- 47de8: 2f05 movel %d5,%sp@- 47dea: 4e94 jsr %a4@
index++;
47dec: 508f addql #8,%sp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47dee: 2f04 movel %d4,%sp@- 47df0: 4e93 jsr %a3@ 47df2: 588f addql #4,%sp 47df4: 4a80 tstl %d0
47df6: 66ce bnes 47dc6 <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47df8: 4280 clrl %d0
information->inactive =
47dfa: 322a 0028 movew %a2@(40),%d1 47dfe: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e02: 206a 002a moveal %a2@(42),%a0
information->inactive =
47e06: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e08: 3009 movew %a1,%d0
information->inactive =
47e0a: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e0e: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e12: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e18: 4e5e unlk %fp 47e1a: 4e75 rts
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
47e1c: 2f00 movel %d0,%sp@- 47e1e: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error> 47e24: 588f addql #4,%sp 47e26: 2c00 movel %d0,%d6 47e28: 6000 fe84 braw 47cae <_Objects_Extend_information+0x8a>
/*
* 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,
47e2c: e58c lsll #2,%d4 47e2e: 2f04 movel %d4,%sp@- 47e30: 2f2a 002e movel %a2@(46),%sp@- 47e34: 2f0c movel %a4,%sp@- 47e36: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47e3c: 2f04 movel %d4,%sp@- 47e3e: 2f2a 002a movel %a2@(42),%sp@- 47e42: 2f0d movel %a5,%sp@- 47e44: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47e4a: 4280 clrl %d0 47e4c: 302a 000e movew %a2@(14),%d0 47e50: da80 addl %d0,%d5 47e52: e58d lsll #2,%d5 47e54: 2f05 movel %d5,%sp@- 47e56: 2f2a 0018 movel %a2@(24),%sp@- 47e5a: 2f07 movel %d7,%sp@- 47e5c: 4eb9 0005 0dd8 jsr 50dd8 <memcpy> 47e62: 4fef 0024 lea %sp@(36),%sp 47e66: 6000 fe9c braw 47d04 <_Objects_Extend_information+0xe0>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e6a: 4280 clrl %d0 47e6c: 2605 movel %d5,%d3 47e6e: 4282 clrl %d2 47e70: 4284 clrl %d4 47e72: 322a 000e movew %a2@(14),%d1 47e76: 302a 0012 movew %a2@(18),%d0 47e7a: 6000 fdfe braw 47c7a <_Objects_Extend_information+0x56>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
47e7e: 2605 movel %d5,%d3 <== NOT EXECUTED 47e80: 4282 clrl %d2 <== NOT EXECUTED 47e82: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47e88: 6000 fdf0 braw 47c7a <_Objects_Extend_information+0x56><== 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 );
47e8c: 2f06 movel %d6,%sp@- 47e8e: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free>
return;
47e94: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e96: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47e9c: 4e5e unlk %fp <== NOT EXECUTED
00047f50 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
47f50: 4e56 0000 linkw %fp,#0 47f54: 2f02 movel %d2,%sp@- 47f56: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47f5a: 660a bnes 47f66 <_Objects_Get_information+0x16>
* 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 )
47f5c: 4280 clrl %d0
return NULL;
#endif
return info;
}
47f5e: 242e fffc movel %fp@(-4),%d2 47f62: 4e5e unlk %fp 47f64: 4e75 rts
/*
* 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 );
47f66: 2f2e 0008 movel %fp@(8),%sp@- 47f6a: 4eb9 0004 d96c jsr 4d96c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47f70: 588f addql #4,%sp 47f72: 4a80 tstl %d0
47f74: 67e6 beqs 47f5c <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47f76: b082 cmpl %d2,%d0
47f78: 65e2 bcss 47f5c <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47f7a: 202e 0008 movel %fp@(8),%d0 47f7e: 41f9 0006 13e4 lea 613e4 <_Objects_Information_table>,%a0 47f84: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f88: 4a88 tstl %a0
47f8a: 67d0 beqs 47f5c <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47f8c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47f90: 67cc beqs 47f5e <_Objects_Get_information+0xe> <== 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 )
47f92: 2040 moveal %d0,%a0 47f94: 4a68 000e tstw %a0@(14)
47f98: 67c2 beqs 47f5c <_Objects_Get_information+0xc>
return NULL;
#endif
return info;
}
47f9a: 242e fffc movel %fp@(-4),%d2 47f9e: 4e5e unlk %fp
...
00049a38 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
49a38: 4e56 ffe0 linkw %fp,#-32 49a3c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49a40: 262e 000c movel %fp@(12),%d3 49a44: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
49a48: 4a83 tstl %d3
49a4a: 660e bnes 49a5a <_Objects_Get_name_as_string+0x22>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
49a4c: 4282 clrl %d2
} return NULL; /* unreachable path */ }
49a4e: 2002 movel %d2,%d0 49a50: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49a56: 4e5e unlk %fp 49a58: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
49a5a: 4a82 tstl %d2
49a5c: 67f0 beqs 49a4e <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49a5e: 4aae 0008 tstl %fp@(8) 49a62: 6700 0092 beqw 49af6 <_Objects_Get_name_as_string+0xbe> 49a66: 282e 0008 movel %fp@(8),%d4
information = _Objects_Get_information_id( tmpId );
49a6a: 2f04 movel %d4,%sp@- 49a6c: 4eb9 0004 9958 jsr 49958 <_Objects_Get_information_id>
if ( !information )
49a72: 588f addql #4,%sp
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
49a74: 2440 moveal %d0,%a2
if ( !information )
49a76: 4a80 tstl %d0
49a78: 67d2 beqs 49a4c <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49a7a: 486e fffc pea %fp@(-4) 49a7e: 2f04 movel %d4,%sp@- 49a80: 2f00 movel %d0,%sp@- 49a82: 4eb9 0004 9b38 jsr 49b38 <_Objects_Get>
switch ( location ) {
49a88: 4fef 000c lea %sp@(12),%sp 49a8c: 4aae fffc tstl %fp@(-4)
49a90: 66ba bnes 49a4c <_Objects_Get_name_as_string+0x14>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
49a92: 4a2a 0032 tstb %a2@(50)
49a96: 676c beqs 49b04 <_Objects_Get_name_as_string+0xcc>
s = the_object->name.name_p;
49a98: 2040 moveal %d0,%a0 49a9a: 2468 000c moveal %a0@(12),%a2
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
49a9e: 4a8a tstl %a2
49aa0: 6748 beqs 49aea <_Objects_Get_name_as_string+0xb2>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49aa2: 5383 subql #1,%d3
49aa4: 6744 beqs 49aea <_Objects_Get_name_as_string+0xb2><== NEVER TAKEN
49aa6: 1012 moveb %a2@,%d0
49aa8: 6740 beqs 49aea <_Objects_Get_name_as_string+0xb2>
49aaa: 2042 moveal %d2,%a0 49aac: 4281 clrl %d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49aae: 4284 clrl %d4 49ab0: 1800 moveb %d0,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49ab2: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49ab4: 2279 0006 2604 moveal 62604 <__ctype_ptr__>,%a1 49aba: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 49abe: 49c4 extbl %d4 49ac0: 0284 0000 0097 andil #151,%d4
49ac6: 6602 bnes 49aca <_Objects_Get_name_as_string+0x92>
49ac8: 702a moveq #42,%d0 49aca: 10c0 moveb %d0,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49acc: b681 cmpl %d1,%d3
49ace: 6306 blss 49ad6 <_Objects_Get_name_as_string+0x9e>
49ad0: 1032 1800 moveb %a2@(00000000,%d1:l),%d0
49ad4: 66d8 bnes 49aae <_Objects_Get_name_as_string+0x76>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49ad6: 4210 clrb %a0@
_Thread_Enable_dispatch();
49ad8: 4eb9 0004 a3c0 jsr 4a3c0 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49ade: 2002 movel %d2,%d0 49ae0: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49ae6: 4e5e unlk %fp 49ae8: 4e75 rts
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49aea: 2042 moveal %d2,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49aec: 4210 clrb %a0@
_Thread_Enable_dispatch();
49aee: 4eb9 0004 a3c0 jsr 4a3c0 <_Thread_Enable_dispatch> 49af4: 60e8 bras 49ade <_Objects_Get_name_as_string+0xa6>
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49af6: 2079 0006 4116 moveal 64116 <_Thread_Executing>,%a0 49afc: 2828 0008 movel %a0@(8),%d4 49b00: 6000 ff68 braw 49a6a <_Objects_Get_name_as_string+0x32>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49b04: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b06: 7218 moveq #24,%d1
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b08: 45ee fff7 lea %fp@(-9),%a2
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49b0c: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b10: 2a00 movel %d0,%d5 49b12: e2ad lsrl %d1,%d5
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b14: 2200 movel %d0,%d1
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b16: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b18: e089 lsrl #8,%d1
lname[ 3 ] = (u32_name >> 0) & 0xff;
49b1a: 1d40 fffa moveb %d0,%fp@(-6)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b1e: 4244 clrw %d4 49b20: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b22: 4200 clrb %d0
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b24: 1d45 fff7 moveb %d5,%fp@(-9)
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b28: 1d44 fff8 moveb %d4,%fp@(-8)
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b2c: 1d41 fff9 moveb %d1,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b30: 1d40 fffb moveb %d0,%fp@(-5) 49b34: 6000 ff6c braw 49aa2 <_Objects_Get_name_as_string+0x6a>
0005c368 <_Objects_Get_no_protection>:
/*
* 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;
5c368: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5c36a: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c36c: 4e56 0000 linkw %fp,#0 5c370: 206e 0008 moveal %fp@(8),%a0
/*
* 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;
5c374: 90a8 0006 subl %a0@(6),%d0 5c378: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5c37c: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c380: 226e 0010 moveal %fp@(16),%a1
* 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;
if ( information->maximum >= index ) {
5c384: b280 cmpl %d0,%d1
5c386: 6510 bcss 5c398 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5c388: 2068 0018 moveal %a0@(24),%a0 5c38c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5c390: 6706 beqs 5c398 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5c392: 4291 clrl %a1@
* 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; }
5c394: 4e5e unlk %fp 5c396: 4e75 rts
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5c398: 7001 moveq #1,%d0
return NULL; }
5c39a: 4e5e unlk %fp
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5c39c: 2280 movel %d0,%a1@ 5c39e: 4280 clrl %d0
return NULL;
}
...
000497a4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
497a4: 4e56 fffc linkw %fp,#-4 497a8: 222e 0008 movel %fp@(8),%d1 497ac: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
497ae: 4a81 tstl %d1
497b0: 660a bnes 497bc <_Objects_Id_to_name+0x18>
497b2: 2079 0006 321e moveal 6321e <_Thread_Executing>,%a0 497b8: 2228 0008 movel %a0@(8),%d1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
497bc: 7418 moveq #24,%d2 497be: 2001 movel %d1,%d0 497c0: e4a8 lsrl %d2,%d0 497c2: 143c 0007 moveb #7,%d2 497c6: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
497c8: 143c 0003 moveb #3,%d2 497cc: 2040 moveal %d0,%a0 497ce: 5388 subql #1,%a0 497d0: b488 cmpl %a0,%d2
497d2: 6522 bcss 497f6 <_Objects_Id_to_name+0x52>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
497d4: 41f9 0006 311c lea 6311c <_Objects_Information_table>,%a0 497da: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 497de: 4a88 tstl %a0
497e0: 6714 beqs 497f6 <_Objects_Id_to_name+0x52>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
497e2: 2001 movel %d1,%d0 497e4: 741b moveq #27,%d2 497e6: e4a8 lsrl %d2,%d0 497e8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
497ec: 4a88 tstl %a0
497ee: 6706 beqs 497f6 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
497f0: 4a28 0032 tstb %a0@(50)
497f4: 670a beqs 49800 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
497f6: 242e fff8 movel %fp@(-8),%d2
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
497fa: 7003 moveq #3,%d0
}
497fc: 4e5e unlk %fp 497fe: 4e75 rts
#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 );
49800: 486e fffc pea %fp@(-4) 49804: 2f01 movel %d1,%sp@- 49806: 2f08 movel %a0,%sp@- 49808: 4eb9 0004 9738 jsr 49738 <_Objects_Get>
if ( !the_object )
4980e: 4fef 000c lea %sp@(12),%sp 49812: 4a80 tstl %d0
49814: 67e0 beqs 497f6 <_Objects_Id_to_name+0x52>
return OBJECTS_INVALID_ID;
*name = the_object->name;
49816: 206e 000c moveal %fp@(12),%a0 4981a: 2240 moveal %d0,%a1 4981c: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
49820: 4eb9 0004 a0cc jsr 4a0cc <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
49826: 242e fff8 movel %fp@(-8),%d2
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
4982a: 4280 clrl %d0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
4982c: 4e5e unlk %fp <== NOT EXECUTED
000481b0 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
481b0: 4e56 fff4 linkw %fp,#-12 481b4: 206e 0008 moveal %fp@(8),%a0 481b8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 481bc: 222e 000c movel %fp@(12),%d1 481c0: 202e 0010 movel %fp@(16),%d0 481c4: 246e 0014 moveal %fp@(20),%a2
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
481c8: 4a8a tstl %a2
481ca: 675a beqs 48226 <_Objects_Name_to_id_u32+0x76>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
481cc: 4a81 tstl %d1
481ce: 6718 beqs 481e8 <_Objects_Name_to_id_u32+0x38>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
481d0: 3428 000e movew %a0@(14),%d2
481d4: 6712 beqs 481e8 <_Objects_Name_to_id_u32+0x38> <== NEVER TAKEN
481d6: 4a80 tstl %d0
481d8: 6718 beqs 481f2 <_Objects_Name_to_id_u32+0x42>
481da: 0c80 7fff ffff cmpil #2147483647,%d0
481e0: 6710 beqs 481f2 <_Objects_Name_to_id_u32+0x42>
481e2: 7601 moveq #1,%d3 481e4: b680 cmpl %d0,%d3
481e6: 670a beqs 481f2 <_Objects_Name_to_id_u32+0x42>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
481e8: 7001 moveq #1,%d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
481ea: 4cd7 040c moveml %sp@,%d2-%d3/%a2 481ee: 4e5e unlk %fp 481f0: 4e75 rts
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
481f2: 2068 0018 moveal %a0@(24),%a0 481f6: 7001 moveq #1,%d0 481f8: 5888 addql #4,%a0 481fa: 0282 0000 ffff andil #65535,%d2
the_object = information->local_table[ index ];
48200: 2250 moveal %a0@,%a1
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
48202: 5280 addql #1,%d0 48204: 5888 addql #4,%a0
the_object = information->local_table[ index ];
if ( !the_object )
48206: 4a89 tstl %a1
48208: 6706 beqs 48210 <_Objects_Name_to_id_u32+0x60>
continue;
if ( name == the_object->name.name_u32 ) {
4820a: b2a9 000c cmpl %a1@(12),%d1
4820e: 6708 beqs 48218 <_Objects_Name_to_id_u32+0x68>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
48210: b082 cmpl %d2,%d0
48212: 63ec blss 48200 <_Objects_Name_to_id_u32+0x50>
48214: 7001 moveq #1,%d0 48216: 60d2 bras 481ea <_Objects_Name_to_id_u32+0x3a>
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
48218: 24a9 0008 movel %a1@(8),%a2@ 4821c: 4280 clrl %d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
4821e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48222: 4e5e unlk %fp 48224: 4e75 rts
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
48226: 7002 moveq #2,%d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
48228: 4cd7 040c moveml %sp@,%d2-%d3/%a2
4822c: 4e5e unlk %fp <== NOT EXECUTED
000485b0 <_Objects_Set_name>:
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485b0: 4280 clrl %d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
485b2: 4e56 fff0 linkw %fp,#-16 485b6: 48d7 3c00 moveml %a2-%a5,%sp@ 485ba: 286e 0008 moveal %fp@(8),%a4 485be: 246e 0010 moveal %fp@(16),%a2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485c2: 302c 0034 movew %a4@(52),%d0 485c6: 2f00 movel %d0,%sp@-
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
485c8: 2a6e 000c moveal %fp@(12),%a5
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485cc: 2f0a movel %a2,%sp@- 485ce: 4eb9 0005 22c4 jsr 522c4 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
485d4: 508f addql #8,%sp
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485d6: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
485d8: 4a2c 0032 tstb %a4@(50)
485dc: 6662 bnes 48640 <_Objects_Set_name+0x90>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
485de: 7018 moveq #24,%d0 485e0: 1212 moveb %a2@,%d1 485e2: 49c1 extbl %d1 485e4: e1a9 lsll %d0,%d1 485e6: 103c 0001 moveb #1,%d0 485ea: b08b cmpl %a3,%d0
485ec: 643c bccs 4862a <_Objects_Set_name+0x7a>
485ee: 102a 0001 moveb %a2@(1),%d0 485f2: 49c0 extbl %d0 485f4: 4840 swap %d0 485f6: 4240 clrw %d0 485f8: 8081 orl %d1,%d0 485fa: 7202 moveq #2,%d1 485fc: b28b cmpl %a3,%d1
485fe: 6730 beqs 48630 <_Objects_Set_name+0x80>
48600: 122a 0002 moveb %a2@(2),%d1 48604: 49c1 extbl %d1 48606: e189 lsll #8,%d1 48608: 8081 orl %d1,%d0 4860a: 7203 moveq #3,%d1 4860c: b28b cmpl %a3,%d1 4860e: 6700 0088 beqw 48698 <_Objects_Set_name+0xe8> 48612: 122a 0003 moveb %a2@(3),%d1 48616: 49c1 extbl %d1 48618: 8081 orl %d1,%d0 4861a: 2b40 000c movel %d0,%a5@(12) 4861e: 7001 moveq #1,%d0
);
}
return true;
}
48620: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48626: 4e5e unlk %fp 48628: 4e75 rts
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
4862a: 2001 movel %d1,%d0 4862c: 08c0 0015 bset #21,%d0 48630: 7220 moveq #32,%d1 48632: 08c0 000d bset #13,%d0 48636: 8081 orl %d1,%d0 48638: 2b40 000c movel %d0,%a5@(12) 4863c: 7001 moveq #1,%d0 4863e: 60e0 bras 48620 <_Objects_Set_name+0x70>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
48640: 486b 0001 pea %a3@(1) 48644: 4eb9 0004 a1bc jsr 4a1bc <_Workspace_Allocate>
if ( !d )
4864a: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
4864c: 2840 moveal %d0,%a4
if ( !d )
4864e: 4a80 tstl %d0
48650: 673a beqs 4868c <_Objects_Set_name+0xdc> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
48652: 202d 000c movel %a5@(12),%d0
48656: 670e beqs 48666 <_Objects_Set_name+0xb6>
_Workspace_Free( (void *)the_object->name.name_p );
48658: 2f00 movel %d0,%sp@- 4865a: 4eb9 0004 a1d8 jsr 4a1d8 <_Workspace_Free>
the_object->name.name_p = NULL;
48660: 588f addql #4,%sp 48662: 42ad 000c clrl %a5@(12)
}
strncpy( d, name, length );
48666: 2f0b movel %a3,%sp@- 48668: 2f0a movel %a2,%sp@- 4866a: 2f0c movel %a4,%sp@- 4866c: 4eb9 0005 223c jsr 5223c <strncpy>
d[length] = '\0';
the_object->name.name_p = d;
48672: 4fef 000c lea %sp@(12),%sp
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
48676: 4200 clrb %d0 48678: 1980 b800 moveb %d0,%a4@(00000000,%a3:l)
the_object->name.name_p = d;
4867c: 7001 moveq #1,%d0 4867e: 2b4c 000c movel %a4,%a5@(12)
);
}
return true;
}
48682: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48688: 4e5e unlk %fp 4868a: 4e75 rts
4868c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
48692: 4200 clrb %d0 <== NOT EXECUTED
);
}
return true;
}
48694: 4e5e unlk %fp <== NOT EXECUTED 48696: 4e75 rts <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
48698: 123c 0020 moveb #32,%d1 4869c: 8081 orl %d1,%d0 4869e: 2b40 000c movel %d0,%a5@(12) 486a2: 7001 moveq #1,%d0 486a4: 6000 ff7a braw 48620 <_Objects_Set_name+0x70>
00048230 <_Objects_Shrink_information>:
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
48230: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
48232: 4e56 ffec linkw %fp,#-20 48236: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4823a: 246e 0008 moveal %fp@(8),%a2
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4823e: 4283 clrl %d3
block_count = (information->maximum - index_base) /
48240: 4284 clrl %d4
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
48242: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
48246: 382a 000e movew %a2@(14),%d4 4824a: 322a 0012 movew %a2@(18),%d1 4824e: 9883 subl %d3,%d4 48250: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48254: 672c beqs 48282 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
48256: 226a 002a moveal %a2@(42),%a1 4825a: b291 cmpl %a1@,%d1
4825c: 672e beqs 4828c <_Objects_Shrink_information+0x5c><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4825e: 7404 moveq #4,%d2 48260: 4280 clrl %d0
}
index_base += information->allocation_size;
48262: 2042 moveal %d2,%a0 48264: d681 addl %d1,%d3 48266: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48268: 5280 addql #1,%d0 4826a: b084 cmpl %d4,%d0
4826c: 6414 bccs 48282 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
4826e: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1
48272: 671a beqs 4828e <_Objects_Shrink_information+0x5e>
48274: 2408 movel %a0,%d2
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48276: 2042 moveal %d2,%a0 48278: d681 addl %d1,%d3 4827a: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
4827c: 5280 addql #1,%d0 4827e: b084 cmpl %d4,%d0
48280: 65ec bcss 4826e <_Objects_Shrink_information+0x3e>
return;
}
index_base += information->allocation_size;
}
}
48282: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48288: 4e5e unlk %fp 4828a: 4e75 rts
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 ] ==
4828c: 4282 clrl %d2 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
4828e: 206a 001c moveal %a2@(28),%a0
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
48292: 47f9 0004 71a8 lea 471a8 <_Chain_Extract>,%a3
* 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 );
48298: 4280 clrl %d0 4829a: 3028 000a movew %a0@(10),%d0
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
4829e: 2810 movel %a0@,%d4
if ((index >= index_base) &&
482a0: b680 cmpl %d0,%d3
482a2: 620c bhis 482b0 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
482a4: 4281 clrl %d1 482a6: 322a 0012 movew %a2@(18),%d1 482aa: d283 addl %d3,%d1 482ac: b280 cmpl %d0,%d1
482ae: 623e bhis 482ee <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
482b0: 2044 moveal %d4,%a0 482b2: 4a84 tstl %d4
482b4: 66e2 bnes 48298 <_Objects_Shrink_information+0x68>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
482b6: 206a 002e moveal %a2@(46),%a0 482ba: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 482be: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
482c4: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
482c8: 588f addql #4,%sp
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
482ca: 302a 0028 movew %a2@(40),%d0 482ce: 322a 0012 movew %a2@(18),%d1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
482d2: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
482d6: 9081 subl %d1,%d0
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
482d8: 42b1 2800 clrl %a1@(00000000,%d2:l)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
482dc: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
482e0: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
482e4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 482ea: 4e5e unlk %fp 482ec: 4e75 rts
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482ee: 2f08 movel %a0,%sp@- 482f0: 4e93 jsr %a3@ 482f2: 588f addql #4,%sp
}
}
while ( the_object );
482f4: 2044 moveal %d4,%a0 482f6: 4a84 tstl %d4
482f8: 669e bnes 48298 <_Objects_Shrink_information+0x68>
482fa: 60ba bras 482b6 <_Objects_Shrink_information+0x86>
000475a0 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475a0: 4e56 ffe8 linkw %fp,#-24 475a4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
475a8: 240e movel %fp,%d2 475aa: 5982 subql #4,%d2 475ac: 2f02 movel %d2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475ae: 246e 000c moveal %fp@(12),%a2
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
475b2: 2f0a movel %a2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475b4: 266e 0008 moveal %fp@(8),%a3 475b8: 162e 0017 moveb %fp@(23),%d3
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
475bc: 4eb9 0004 7796 jsr 47796 <_POSIX_Mutex_Get> 475c2: 508f addql #8,%sp 475c4: 4a80 tstl %d0
475c6: 6764 beqs 4762c <_POSIX_Condition_variables_Wait_support+0x8c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
475c8: 2039 0006 3e7c movel 63e7c <_Thread_Dispatch_disable_level>,%d0 475ce: 5380 subql #1,%d0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
475d0: 2f02 movel %d2,%sp@- 475d2: 23c0 0006 3e7c movel %d0,63e7c <_Thread_Dispatch_disable_level> 475d8: 2f0b movel %a3,%sp@- 475da: 4eb9 0004 738c jsr 4738c <_POSIX_Condition_variables_Get>
switch ( location ) {
475e0: 508f addql #8,%sp
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
475e2: 2840 moveal %d0,%a4
switch ( location ) {
475e4: 4aae fffc tstl %fp@(-4)
475e8: 6642 bnes 4762c <_POSIX_Condition_variables_Wait_support+0x8c>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
475ea: 202c 0014 movel %a4@(20),%d0
475ee: 6718 beqs 47608 <_POSIX_Condition_variables_Wait_support+0x68>
475f0: b092 cmpl %a2@,%d0
475f2: 6714 beqs 47608 <_POSIX_Condition_variables_Wait_support+0x68>
_Thread_Enable_dispatch();
475f4: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch> 475fa: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
475fc: 2002 movel %d2,%d0 475fe: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47604: 4e5e unlk %fp 47606: 4e75 rts
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
47608: 2f0a movel %a2,%sp@- 4760a: 4eb9 0004 79e4 jsr 479e4 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
47610: 588f addql #4,%sp 47612: 4a03 tstb %d3
47614: 6724 beqs 4763a <_POSIX_Condition_variables_Wait_support+0x9a>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
47616: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch> 4761c: 7474 moveq #116,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
4761e: 2f0a movel %a2,%sp@- 47620: 4eb9 0004 7948 jsr 47948 <pthread_mutex_lock>
if ( mutex_status )
47626: 588f addql #4,%sp 47628: 4a80 tstl %d0
4762a: 67d0 beqs 475fc <_POSIX_Condition_variables_Wait_support+0x5c>
4762c: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4762e: 2002 movel %d2,%d0 47630: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47636: 4e5e unlk %fp 47638: 4e75 rts
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
4763a: 2952 0014 movel %a2@,%a4@(20)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
4763e: 200c movel %a4,%d0 47640: 0680 0000 0018 addil #24,%d0
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;
47646: 7201 moveq #1,%d1
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
47648: 2079 0006 3f36 moveal 63f36 <_Thread_Executing>,%a0 4764e: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
47652: 2153 0020 movel %a3@,%a0@(32)
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
47656: 2140 0044 movel %d0,%a0@(68) 4765a: 2941 0048 movel %d1,%a4@(72)
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
4765e: 4879 0004 b3d4 pea 4b3d4 <_Thread_queue_Timeout> 47664: 2f2e 0010 movel %fp@(16),%sp@- 47668: 2f00 movel %d0,%sp@- 4766a: 4eb9 0004 b018 jsr 4b018 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
47670: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
47676: 2079 0006 3f36 moveal 63f36 <_Thread_Executing>,%a0
if ( status && status != ETIMEDOUT )
4767c: 4fef 000c lea %sp@(12),%sp
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
47680: 2428 0034 movel %a0@(52),%d2
if ( status && status != ETIMEDOUT )
47684: 6798 beqs 4761e <_POSIX_Condition_variables_Wait_support+0x7e>
47686: 7074 moveq #116,%d0 47688: b082 cmpl %d2,%d0
4768a: 6792 beqs 4761e <_POSIX_Condition_variables_Wait_support+0x7e><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4768c: 2002 movel %d2,%d0 <== NOT EXECUTED 4768e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 47694: 4e5e unlk %fp <== NOT EXECUTED
0004f7c4 <_POSIX_Keys_Run_destructors>:
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
4f7c4: 7218 moveq #24,%d1
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4f7c6: 4e56 ffec linkw %fp,#-20 4f7ca: 206e 0008 moveal %fp@(8),%a0 4f7ce: 48d7 007c moveml %d2-%d6,%sp@
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
4f7d2: 2628 0008 movel %a0@(8),%d3 4f7d6: 2003 movel %d3,%d0 4f7d8: e2a8 lsrl %d1,%d0 4f7da: 123c 0007 moveb #7,%d1 4f7de: c081 andl %d1,%d0
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 ];
4f7e0: 0283 0000 ffff andil #65535,%d3 4f7e6: 2c00 movel %d0,%d6 4f7e8: 5a86 addql #5,%d6
*
* 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;
4f7ea: 3039 0006 17ce movew 617ce <_POSIX_Keys_Information+0xe>,%d0
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 ];
4f7f0: e58b lsll #2,%d3
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f7f2: 4a40 tstw %d0
4f7f4: 660a bnes 4f800 <_POSIX_Keys_Run_destructors+0x3c>
done = false;
}
}
}
}
}
4f7f6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4f7fc: 4e5e unlk %fp 4f7fe: 4e75 rts 4f800: 4285 clrl %d5 4f802: 7201 moveq #1,%d1 4f804: 3a00 movew %d0,%d5
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f806: 7401 moveq #1,%d2 4f808: 7801 moveq #1,%d4
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
4f80a: 2079 0006 17d8 moveal 617d8 <_POSIX_Keys_Information+0x18>,%a0
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f810: 5282 addql #1,%d2
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
4f812: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0
if ( key != NULL && key->destructor != NULL ) {
4f816: 4a88 tstl %a0
4f818: 671e beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
4f81a: 4aa8 0010 tstl %a0@(16)
4f81e: 6718 beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
4f820: 2270 6c00 moveal %a0@(00000000,%d6:l:4),%a1 4f824: d3c3 addal %d3,%a1 4f826: 2211 movel %a1@,%d1
if ( value != NULL ) {
4f828: 670e beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
key->Values [ thread_api ][ thread_index ] = NULL;
4f82a: 4291 clrl %a1@
(*key->destructor)( value );
4f82c: 4204 clrb %d4 4f82e: 2f01 movel %d1,%sp@- 4f830: 2068 0010 moveal %a0@(16),%a0 4f834: 4e90 jsr %a0@ 4f836: 588f addql #4,%sp
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f838: 4281 clrl %d1 4f83a: 3202 movew %d2,%d1 4f83c: b285 cmpl %d5,%d1
4f83e: 63ca blss 4f80a <_POSIX_Keys_Run_destructors+0x46>
* 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 ) {
4f840: 4a04 tstb %d4
4f842: 66b2 bnes 4f7f6 <_POSIX_Keys_Run_destructors+0x32>
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
4f844: 3039 0006 17ce movew 617ce <_POSIX_Keys_Information+0xe>,%d0
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f84a: 67aa beqs 4f7f6 <_POSIX_Keys_Run_destructors+0x32><== NEVER TAKEN
4f84c: 60b2 bras 4f800 <_POSIX_Keys_Run_destructors+0x3c>
...
0004c410 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c410: 4e56 ffe8 linkw %fp,#-24 4c414: 48d7 041c moveml %d2-%d4/%a2,%sp@
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(
4c418: 486e fffc pea %fp@(-4) 4c41c: 242e 0008 movel %fp@(8),%d2 4c420: 2f02 movel %d2,%sp@- 4c422: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c428: 246e 0014 moveal %fp@(20),%a2 4c42c: 262e 0018 movel %fp@(24),%d3 4c430: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c436: 4fef 000c lea %sp@(12),%sp 4c43a: 2040 moveal %d0,%a0 4c43c: 4aae fffc tstl %fp@(-4)
4c440: 671a beqs 4c45c <_POSIX_Message_queue_Receive_support+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c442: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c448: 72ff moveq #-1,%d1 4c44a: 2040 moveal %d0,%a0 4c44c: 7009 moveq #9,%d0
}
4c44e: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c454: 2080 movel %d0,%a0@
}
4c456: 2001 movel %d1,%d0 4c458: 4e5e unlk %fp 4c45a: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
4c45c: 2028 0014 movel %a0@(20),%d0 4c460: 7203 moveq #3,%d1 4c462: 7801 moveq #1,%d4 4c464: c280 andl %d0,%d1 4c466: b881 cmpl %d1,%d4 4c468: 6700 00f2 beqw 4c55c <_POSIX_Message_queue_Receive_support+0x14c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c46c: 2068 0010 moveal %a0@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4c470: 222e 0010 movel %fp@(16),%d1 4c474: b2a8 0066 cmpl %a0@(102),%d1 4c478: 6500 0098 bcsw 4c512 <_POSIX_Message_queue_Receive_support+0x102>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c47c: 4a03 tstb %d3
4c47e: 6756 beqs 4c4d6 <_POSIX_Message_queue_Receive_support+0xc6><== NEVER TAKEN
4c480: 720e moveq #14,%d1 4c482: e2a8 lsrl %d1,%d0 4c484: 7801 moveq #1,%d4 4c486: b980 eorl %d4,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c488: 2f2e 001c movel %fp@(28),%sp@-
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c48c: c084 andl %d4,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c48e: 2f00 movel %d0,%sp@- 4c490: 486e fff8 pea %fp@(-8)
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c494: 70ff moveq #-1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c496: 2f2e 000c movel %fp@(12),%sp@- 4c49a: 2f02 movel %d2,%sp@- 4c49c: 4868 001a pea %a0@(26)
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4a0: 2d40 fff8 movel %d0,%fp@(-8)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4a4: 4eb9 0004 e7f0 jsr 4e7f0 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c4aa: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c4b0: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c4b6: 24a8 0024 movel %a0@(36),%a2@
4c4ba: 6d4e blts 4c50a <_POSIX_Message_queue_Receive_support+0xfa>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
4c4bc: 4fef 0018 lea %sp@(24),%sp 4c4c0: 4aa8 0034 tstl %a0@(52)
4c4c4: 666c bnes 4c532 <_POSIX_Message_queue_Receive_support+0x122>
return length_out;
4c4c6: 222e fff8 movel %fp@(-8),%d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4ca: 2001 movel %d1,%d0 4c4cc: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c4d2: 4e5e unlk %fp 4c4d4: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4d6: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c4da: 4280 clrl %d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4de: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4e2: 70ff moveq #-1,%d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4e4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c4e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c4ea: 4868 001a pea %a0@(26) <== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4ee: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4f2: 4eb9 0004 e7f0 jsr 4e7f0 <_CORE_message_queue_Seize> <== NOT EXECUTED
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c4f8: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch> <== NOT EXECUTED
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c4fe: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 <== NOT EXECUTED
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c504: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4c508: 6cb2 bges 4c4bc <_POSIX_Message_queue_Receive_support+0xac><== NOT EXECUTED
4c50a: 2212 movel %a2@,%d1 4c50c: 4481 negl %d1 4c50e: 2481 movel %d1,%a2@ 4c510: 60aa bras 4c4bc <_POSIX_Message_queue_Receive_support+0xac>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
4c512: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c518: 747a moveq #122,%d2 4c51a: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c520: 72ff moveq #-1,%d1 4c522: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c524: 2001 movel %d1,%d0
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c526: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c528: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c52e: 4e5e unlk %fp 4c530: 4e75 rts
_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(
4c532: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c538: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 4c53e: 2440 moveal %d0,%a2 4c540: 2f28 0034 movel %a0@(52),%sp@- 4c544: 4eb9 0004 c810 jsr 4c810 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c54a: 588f addql #4,%sp 4c54c: 72ff moveq #-1,%d1 4c54e: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c550: 2001 movel %d1,%d0 4c552: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c558: 4e5e unlk %fp 4c55a: 4e75 rts
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();
4c55c: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c562: 7609 moveq #9,%d3 4c564: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c56a: 72ff moveq #-1,%d1 4c56c: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c56e: 2001 movel %d1,%d0
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
4c570: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c572: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
4c578: 4e5e unlk %fp <== NOT EXECUTED
0004c5a0 <_POSIX_Message_queue_Send_support>:
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
4c5a0: 7020 moveq #32,%d0
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c5a2: 4e56 ffec linkw %fp,#-20 4c5a6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4c5aa: 262e 0008 movel %fp@(8),%d3 4c5ae: 242e 0014 movel %fp@(20),%d2 4c5b2: 282e 0018 movel %fp@(24),%d4
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
4c5b6: b082 cmpl %d2,%d0 4c5b8: 6500 00e2 bcsw 4c69c <_POSIX_Message_queue_Send_support+0xfc> 4c5bc: 486e fffc pea %fp@(-4) 4c5c0: 2f03 movel %d3,%sp@- 4c5c2: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c5c8: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c5ce: 4fef 000c lea %sp@(12),%sp 4c5d2: 2040 moveal %d0,%a0 4c5d4: 4aae fffc tstl %fp@(-4) 4c5d8: 6600 00a8 bnew 4c682 <_POSIX_Message_queue_Send_support+0xe2>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
4c5dc: 2028 0014 movel %a0@(20),%d0 4c5e0: 7203 moveq #3,%d1 4c5e2: c280 andl %d0,%d1 4c5e4: 6700 00d0 beqw 4c6b6 <_POSIX_Message_queue_Send_support+0x116>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c5e8: 2068 0010 moveal %a0@(16),%a0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c5ec: 4a04 tstb %d4
4c5ee: 6752 beqs 4c642 <_POSIX_Message_queue_Send_support+0xa2>
4c5f0: 720e moveq #14,%d1 4c5f2: e2a8 lsrl %d1,%d0 4c5f4: 123c 0001 moveb #1,%d1
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5f8: 4482 negl %d2
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c5fa: b380 eorl %d1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5fc: 2f2e 001c movel %fp@(28),%sp@-
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c600: c081 andl %d1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c602: 2f00 movel %d0,%sp@- 4c604: 2f02 movel %d2,%sp@- 4c606: 42a7 clrl %sp@- 4c608: 2f03 movel %d3,%sp@- 4c60a: 2f2e 0010 movel %fp@(16),%sp@- 4c60e: 2f2e 000c movel %fp@(12),%sp@- 4c612: 4868 001a pea %a0@(26) 4c616: 4eb9 0004 e928 jsr 4e928 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c61c: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c620: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c622: 4eb9 0005 0168 jsr 50168 <_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 )
4c628: 7007 moveq #7,%d0 4c62a: b082 cmpl %d2,%d0
4c62c: 6748 beqs 4c676 <_POSIX_Message_queue_Send_support+0xd6>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
4c62e: 4a82 tstl %d2 4c630: 6600 00a4 bnew 4c6d6 <_POSIX_Message_queue_Send_support+0x136> 4c634: 4281 clrl %d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c636: 2001 movel %d1,%d0 4c638: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c63e: 4e5e unlk %fp 4c640: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c642: 2f2e 001c movel %fp@(28),%sp@-
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c646: 4280 clrl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c648: 4482 negl %d2 4c64a: 2f00 movel %d0,%sp@- 4c64c: 2f02 movel %d2,%sp@- 4c64e: 42a7 clrl %sp@- 4c650: 2f03 movel %d3,%sp@- 4c652: 2f2e 0010 movel %fp@(16),%sp@- 4c656: 2f2e 000c movel %fp@(12),%sp@- 4c65a: 4868 001a pea %a0@(26) 4c65e: 4eb9 0004 e928 jsr 4e928 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c664: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c668: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c66a: 4eb9 0005 0168 jsr 50168 <_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 )
4c670: 7007 moveq #7,%d0 4c672: b082 cmpl %d2,%d0
4c674: 66b8 bnes 4c62e <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN
msg_status = _Thread_Executing->Wait.return_code;
4c676: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 4c67c: 2428 0034 movel %a0@(52),%d2 4c680: 60ac bras 4c62e <_POSIX_Message_queue_Send_support+0x8e>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c682: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c688: 72ff moveq #-1,%d1 4c68a: 2040 moveal %d0,%a0 4c68c: 7009 moveq #9,%d0
}
4c68e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c694: 2080 movel %d0,%a0@
}
4c696: 2001 movel %d1,%d0 4c698: 4e5e unlk %fp 4c69a: 4e75 rts
* 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 );
4c69c: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6a2: 7616 moveq #22,%d3 4c6a4: 72ff moveq #-1,%d1 4c6a6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6a8: 2001 movel %d1,%d0
* 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 );
4c6aa: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6ac: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c6b2: 4e5e unlk %fp 4c6b4: 4e75 rts
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();
4c6b6: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c6bc: 7409 moveq #9,%d2 4c6be: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6c4: 72ff moveq #-1,%d1 4c6c6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6c8: 2001 movel %d1,%d0
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
4c6ca: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6cc: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c6d2: 4e5e unlk %fp 4c6d4: 4e75 rts
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
4c6d6: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6dc: 2440 moveal %d0,%a2 4c6de: 2f02 movel %d2,%sp@- 4c6e0: 4eb9 0004 c810 jsr 4c810 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c6e6: 588f addql #4,%sp 4c6e8: 72ff moveq #-1,%d1 4c6ea: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6ec: 2001 movel %d1,%d0 4c6ee: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
4c6f4: 4e5e unlk %fp <== NOT EXECUTED
0004c7e4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4c7e4: 4e56 0000 linkw %fp,#0 4c7e8: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c7ec: 2069 010e moveal %a1@(270),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4c7f0: 4aa8 00d4 tstl %a0@(212)
4c7f4: 6608 bnes 4c7fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
4c7f6: 7001 moveq #1,%d0 4c7f8: b0a8 00d8 cmpl %a0@(216),%d0
4c7fc: 6708 beqs 4c806 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4c7fe: 4e5e unlk %fp
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();
4c800: 4ef9 0004 8c78 jmp 48c78 <_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 ) {
4c806: 4aa8 00dc tstl %a0@(220)
4c80a: 67f2 beqs 4c7fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4c80c: 4878 ffff pea ffffffff <LESS>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4c810: 2039 0006 1c30 movel 61c30 <_Thread_Dispatch_disable_level>,%d0 4c816: 5380 subql #1,%d0 4c818: 2f09 movel %a1,%sp@- 4c81a: 23c0 0006 1c30 movel %d0,61c30 <_Thread_Dispatch_disable_level> 4c820: 4eb9 0004 cf9c jsr 4cf9c <_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 &&
4c826: 508f addql #8,%sp
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4c828: 4e5e unlk %fp <== NOT EXECUTED
0004dd8c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4dd8c: 4e56 ffe8 linkw %fp,#-24 4dd90: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4dd94: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4dd98: 47f9 0004 dd68 lea 4dd68 <_POSIX_Priority_Is_valid>,%a3 4dd9e: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4dda0: 242e 0008 movel %fp@(8),%d2 4dda4: 286e 0010 moveal %fp@(16),%a4 4dda8: 2a6e 0014 moveal %fp@(20),%a5
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4ddac: 4e93 jsr %a3@ 4ddae: 588f addql #4,%sp 4ddb0: 4a00 tstb %d0
4ddb2: 671e beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4ddb4: 4294 clrl %a4@
*budget_callout = NULL;
4ddb6: 4295 clrl %a5@
if ( policy == SCHED_OTHER ) {
4ddb8: 4a82 tstl %d2
4ddba: 6722 beqs 4ddde <_POSIX_Thread_Translate_sched_param+0x52>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
4ddbc: 7001 moveq #1,%d0 4ddbe: b082 cmpl %d2,%d0 4ddc0: 6700 0084 beqw 4de46 <_POSIX_Thread_Translate_sched_param+0xba>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4ddc4: 7002 moveq #2,%d0 4ddc6: b082 cmpl %d2,%d0 4ddc8: 6700 008a beqw 4de54 <_POSIX_Thread_Translate_sched_param+0xc8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
4ddcc: 7004 moveq #4,%d0 4ddce: b082 cmpl %d2,%d0
4ddd0: 671c beqs 4ddee <_POSIX_Thread_Translate_sched_param+0x62>
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;
4ddd2: 7016 moveq #22,%d0
}
return EINVAL;
}
4ddd4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ddda: 4e5e unlk %fp 4dddc: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4ddde: 7201 moveq #1,%d1 4dde0: 4280 clrl %d0 4dde2: 2881 movel %d1,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4dde4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ddea: 4e5e unlk %fp 4ddec: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4ddee: 4aaa 0008 tstl %a2@(8)
4ddf2: 6606 bnes 4ddfa <_POSIX_Thread_Translate_sched_param+0x6e>
(param->sched_ss_repl_period.tv_nsec == 0) )
4ddf4: 4aaa 000c tstl %a2@(12)
4ddf8: 67d8 beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4ddfa: 4aaa 0010 tstl %a2@(16)
4ddfe: 6606 bnes 4de06 <_POSIX_Thread_Translate_sched_param+0x7a>
(param->sched_ss_init_budget.tv_nsec == 0) )
4de00: 4aaa 0014 tstl %a2@(20)
4de04: 67cc beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4de06: 486a 0008 pea %a2@(8) 4de0a: 243c 0004 abb0 movel #306096,%d2 4de10: 2042 moveal %d2,%a0 4de12: 4e90 jsr %a0@ 4de14: 486a 0010 pea %a2@(16) 4de18: 2600 movel %d0,%d3 4de1a: 2042 moveal %d2,%a0 4de1c: 4e90 jsr %a0@ 4de1e: 508f addql #8,%sp 4de20: b083 cmpl %d3,%d0
4de22: 62ae bhis 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4de24: 2f2a 0004 movel %a2@(4),%sp@- 4de28: 4e93 jsr %a3@ 4de2a: 588f addql #4,%sp 4de2c: 4a00 tstb %d0
4de2e: 67a2 beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4de30: 7003 moveq #3,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4de32: 2abc 0004 704c movel #290892,%a5@
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4de38: 2880 movel %d0,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4de3a: 4280 clrl %d0
return 0;
}
return EINVAL;
}
4de3c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de42: 4e5e unlk %fp 4de44: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4de46: 4294 clrl %a4@ 4de48: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4de4a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de50: 4e5e unlk %fp 4de52: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4de54: 2880 movel %d0,%a4@ 4de56: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4de58: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de5e: 4e5e unlk %fp
...
00046d30 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
46d30: 4e56 ff9c linkw %fp,#-100 46d34: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
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;
46d38: 2479 0006 107e moveal 6107e <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
46d3e: 2839 0006 107a movel 6107a <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
46d44: 4a8a tstl %a2
46d46: 675a beqs 46da2 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46d48: 4a84 tstl %d4
46d4a: 6756 beqs 46da2 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46d4c: 240e movel %fp,%d2 46d4e: 2a0e movel %fp,%d5 46d50: 4283 clrl %d3 46d52: 0682 ffff ffc0 addil #-64,%d2 46d58: 2c3c 0004 de64 movel #319076,%d6 46d5e: 4bf9 0004 de94 lea 4de94 <pthread_attr_setinheritsched>,%a5 46d64: 49f9 0004 ded4 lea 4ded4 <pthread_attr_setstacksize>,%a4 46d6a: 5985 subql #4,%d5 46d6c: 47f9 0004 6984 lea 46984 <pthread_create>,%a3
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
46d72: 2f02 movel %d2,%sp@- 46d74: 2046 moveal %d6,%a0 46d76: 4e90 jsr %a0@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46d78: 4878 0002 pea 2 <DOUBLE_FLOAT> 46d7c: 2f02 movel %d2,%sp@- 46d7e: 4e95 jsr %a5@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
46d80: 2f2a 0004 movel %a2@(4),%sp@- 46d84: 2f02 movel %d2,%sp@- 46d86: 4e94 jsr %a4@
status = pthread_create(
46d88: 42a7 clrl %sp@- 46d8a: 2f12 movel %a2@,%sp@- 46d8c: 2f02 movel %d2,%sp@- 46d8e: 2f05 movel %d5,%sp@- 46d90: 4e93 jsr %a3@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
46d92: 4fef 0024 lea %sp@(36),%sp 46d96: 4a80 tstl %d0
46d98: 6612 bnes 46dac <_POSIX_Threads_Initialize_user_threads_body+0x7c>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
46d9a: 5283 addql #1,%d3 46d9c: 508a addql #8,%a2 46d9e: b684 cmpl %d4,%d3
46da0: 65d0 bcss 46d72 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
46da2: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 46da8: 4e5e unlk %fp 46daa: 4e75 rts
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
46dac: 2f00 movel %d0,%sp@- 46dae: 4878 0001 pea 1 <ADD> 46db2: 4878 0002 pea 2 <DOUBLE_FLOAT> 46db6: 4eb9 0004 8e68 jsr 48e68 <_Internal_error_Occurred>
0004cb0c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4cb0c: 4e56 fff4 linkw %fp,#-12 4cb10: 48d7 1c00 moveml %a2-%a4,%sp@ 4cb14: 266e 000c moveal %fp@(12),%a3
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4cb18: 49f9 0004 ddc0 lea 4ddc0 <_Timespec_To_ticks>,%a4
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4cb1e: 246b 010e moveal %a3@(270),%a2
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4cb22: 486a 0094 pea %a2@(148) 4cb26: 4e94 jsr %a4@
*/
#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 ) {
4cb28: 588f addql #4,%sp 4cb2a: 4281 clrl %d1 4cb2c: 1239 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d1 4cb32: 92aa 0084 subl %a2@(132),%d1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
4cb36: 2740 0076 movel %d0,%a3@(118)
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4cb3a: 2741 0018 movel %d1,%a3@(24)
*/
#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 ) {
4cb3e: 4aab 001c tstl %a3@(28)
4cb42: 6606 bnes 4cb4a <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
4cb44: b2ab 0014 cmpl %a3@(20),%d1
4cb48: 652c bcss 4cb76 <_POSIX_Threads_Sporadic_budget_TSR+0x6a>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
4cb4a: 486a 008c pea %a2@(140) 4cb4e: 4e94 jsr %a4@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb50: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4cb52: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb56: 45ea 00a4 lea %a2@(164),%a2 4cb5a: 203c 0006 1504 movel #398596,%d0 4cb60: 2d4a 000c movel %a2,%fp@(12)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4cb64: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4cb6a: 2d40 0008 movel %d0,%fp@(8) 4cb6e: 4e5e unlk %fp 4cb70: 4ef9 0004 9aac jmp 49aac <_Watchdog_Insert>
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
4cb76: 4878 0001 pea 1 <ADD> 4cb7a: 2f01 movel %d1,%sp@- 4cb7c: 2f0b movel %a3,%sp@- 4cb7e: 4eb9 0004 83ec jsr 483ec <_Thread_Change_priority> 4cb84: 4fef 000c lea %sp@(12),%sp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
4cb88: 486a 008c pea %a2@(140) 4cb8c: 4e94 jsr %a4@ 4cb8e: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4cb90: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb94: 45ea 00a4 lea %a2@(164),%a2 4cb98: 203c 0006 1504 movel #398596,%d0 4cb9e: 2d4a 000c movel %a2,%fp@(12)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4cba2: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4cba8: 2d40 0008 movel %d0,%fp@(8) 4cbac: 4e5e unlk %fp 4cbae: 4ef9 0004 9aac jmp 49aac <_Watchdog_Insert>
0004cac4 <_POSIX_Threads_Sporadic_budget_callout>:
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4cac4: 4280 clrl %d0
/*
* 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 */
4cac6: 72ff moveq #-1,%d1
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4cac8: 4e56 0000 linkw %fp,#0 4cacc: 206e 0008 moveal %fp@(8),%a0 4cad0: 1039 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d0
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4cad6: 2268 010e moveal %a0@(270),%a1 4cada: 90a9 0088 subl %a1@(136),%d0
/*
* 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 */
4cade: 2141 0076 movel %d1,%a0@(118)
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4cae2: 2140 0018 movel %d0,%a0@(24)
*/
#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 ) {
4cae6: 4aa8 001c tstl %a0@(28)
4caea: 6606 bnes 4caf2 <_POSIX_Threads_Sporadic_budget_callout+0x2e><== 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 ) {
4caec: b0a8 0014 cmpl %a0@(20),%d0
4caf0: 6204 bhis 4caf6 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4caf2: 4e5e unlk %fp <== NOT EXECUTED 4caf4: 4e75 rts <== 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 );
4caf6: 4878 0001 pea 1 <ADD> 4cafa: 2f00 movel %d0,%sp@- 4cafc: 2f08 movel %a0,%sp@- 4cafe: 4eb9 0004 83ec jsr 483ec <_Thread_Change_priority> 4cb04: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4cb08: 4e5e unlk %fp <== NOT EXECUTED
0004f75c <_POSIX_Threads_cancel_run>:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4f75c: 7001 moveq #1,%d0
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
4f75e: 4e56 ffec linkw %fp,#-20 4f762: 206e 0008 moveal %fp@(8),%a0 4f766: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
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 ];
4f76a: 2668 010e moveal %a0@(270),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4f76e: 45eb 00e4 lea %a3@(228),%a2
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4f772: 2740 00d4 movel %d0,%a3@(212)
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
4f776: b5eb 00e0 cmpal %a3@(224),%a2
4f77a: 673c beqs 4f7b8 <_POSIX_Threads_cancel_run+0x5c>
4f77c: 49f9 0004 9d60 lea 49d60 <_Workspace_Free>,%a4
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
4f782: 243c 0000 0700 movel #1792,%d2 4f788: 2002 movel %d2,%d0 4f78a: 40c1 movew %sr,%d1 4f78c: 8081 orl %d1,%d0 4f78e: 46c0 movew %d0,%sr
handler = (POSIX_Cancel_Handler_control *)
4f790: 2a6a 0004 moveal %a2@(4),%a5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4f794: 2055 moveal %a5@,%a0
previous = the_node->previous;
4f796: 226d 0004 moveal %a5@(4),%a1
next->previous = previous; previous->next = next;
4f79a: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4f79c: 2149 0004 movel %a1,%a0@(4)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
4f7a0: 46c1 movew %d1,%sr
(*handler->routine)( handler->arg );
4f7a2: 2f2d 000c movel %a5@(12),%sp@- 4f7a6: 206d 0008 moveal %a5@(8),%a0 4f7aa: 4e90 jsr %a0@
_Workspace_Free( handler );
4f7ac: 2f0d movel %a5,%sp@- 4f7ae: 4e94 jsr %a4@
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
4f7b0: 508f addql #8,%sp 4f7b2: b5eb 00e0 cmpal %a3@(224),%a2
4f7b6: 66d0 bnes 4f788 <_POSIX_Threads_cancel_run+0x2c> <== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
4f7b8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4f7be: 4e5e unlk %fp
...
00046698 <_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)
{
46698: 4e56 0000 linkw %fp,#0 4669c: 2f0a movel %a2,%sp@- 4669e: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
466a2: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
466a6: 4aaa 0052 tstl %a2@(82)
466aa: 6606 bnes 466b2 <_POSIX_Timer_TSR+0x1a>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
466ac: 4aaa 0056 tstl %a2@(86)
466b0: 672a beqs 466dc <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
466b2: 2f0a movel %a2,%sp@- 466b4: 4879 0004 6698 pea 46698 <_POSIX_Timer_TSR> 466ba: 2f2a 0008 movel %a2@(8),%sp@- 466be: 2f2a 0062 movel %a2@(98),%sp@- 466c2: 486a 0010 pea %a2@(16) 466c6: 4eb9 0004 d5e8 jsr 4d5e8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
466cc: 4fef 0014 lea %sp@(20),%sp 466d0: 4a00 tstb %d0
466d2: 662a bnes 466fe <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
466d4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 466d8: 4e5e unlk %fp <== NOT EXECUTED 466da: 4e75 rts <== NOT EXECUTED
/* 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;
466dc: 7004 moveq #4,%d0 <== NOT EXECUTED 466de: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
466e2: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 466e6: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 466ea: 4eb9 0004 d0fc jsr 4d0fc <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
466f0: 508f addql #8,%sp <== NOT EXECUTED 466f2: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
}
466f6: 246e fffc moveal %fp@(-4),%a2 466fa: 4e5e unlk %fp 466fc: 4e75 rts
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
466fe: 486a 006a pea %a2@(106) 46702: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
46708: 588f addql #4,%sp
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
4670a: 7003 moveq #3,%d0 4670c: 1540 003c moveb %d0,%a2@(60)
/*
* 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 ) ) {
46710: 2f2a 0042 movel %a2@(66),%sp@- 46714: 2f2a 0038 movel %a2@(56),%sp@- 46718: 4eb9 0004 d0fc jsr 4d0fc <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
4671e: 508f addql #8,%sp 46720: 42aa 0066 clrl %a2@(102) 46724: 60d0 bras 466f6 <_POSIX_Timer_TSR+0x5e>
...
0004c7f0 <_POSIX_signals_Abnormal_termination_handler>:
sigset_t _POSIX_signals_Pending;
void _POSIX_signals_Abnormal_termination_handler(
int signo __attribute__((unused)) )
{
4c7f0: 4e56 0000 linkw %fp,#0
exit( 1 );
4c7f4: 4878 0001 pea 1 <ADD> 4c7f8: 4eb9 0005 05c8 jsr 505c8 <exit>
...
0004fae8 <_POSIX_signals_Check_signal>:
)
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fae8: 4280 clrl %d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4faea: 4e56 ffdc linkw %fp,#-36 4faee: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4faf2: 4878 0001 pea 1 <ADD> 4faf6: 102e 0013 moveb %fp@(19),%d0 4fafa: 260e movel %fp,%d3 4fafc: 0683 ffff fff4 addil #-12,%d3
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4fb02: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fb06: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4fb08: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fb0c: 2f03 movel %d3,%sp@- 4fb0e: 2f02 movel %d2,%sp@- 4fb10: 2f0a movel %a2,%sp@- 4fb12: 4eb9 0004 fb94 jsr 4fb94 <_POSIX_signals_Clear_signals> 4fb18: 4fef 0014 lea %sp@(20),%sp 4fb1c: 4a00 tstb %d0
4fb1e: 6766 beqs 4fb86 <_POSIX_signals_Check_signal+0x9e>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4fb20: 2202 movel %d2,%d1 4fb22: 2002 movel %d2,%d0 4fb24: 43f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a1 4fb2a: e589 lsll #2,%d1 4fb2c: e988 lsll #4,%d0 4fb2e: 9081 subl %d1,%d0 4fb30: 2040 moveal %d0,%a0 4fb32: d1fc 0006 18d6 addal #399574,%a0 4fb38: 7201 moveq #1,%d1 4fb3a: 2050 moveal %a0@,%a0 4fb3c: b288 cmpl %a0,%d1
4fb3e: 6746 beqs 4fb86 <_POSIX_signals_Check_signal+0x9e><== NEVER TAKEN
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4fb40: 2842 moveal %d2,%a4 4fb42: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
4fb46: 282a 00cc movel %a2@(204),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4fb4a: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4fb4e: 8284 orl %d4,%d1 4fb50: 2541 00cc movel %d1,%a2@(204)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4fb54: 7202 moveq #2,%d1 4fb56: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1
4fb5a: 6716 beqs 4fb72 <_POSIX_signals_Check_signal+0x8a>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4fb5c: 2f02 movel %d2,%sp@- 4fb5e: 4e90 jsr %a0@ 4fb60: 588f addql #4,%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4fb62: 7001 moveq #1,%d0 4fb64: 2544 00cc movel %d4,%a2@(204)
return true;
}
4fb68: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4fb6e: 4e5e unlk %fp 4fb70: 4e75 rts
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4fb72: 42a7 clrl %sp@- 4fb74: 2f03 movel %d3,%sp@- 4fb76: 2f02 movel %d2,%sp@- 4fb78: 4e90 jsr %a0@
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
4fb7a: 4fef 000c lea %sp@(12),%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4fb7e: 2544 00cc movel %d4,%a2@(204) 4fb82: 7001 moveq #1,%d0 4fb84: 60e2 bras 4fb68 <_POSIX_signals_Check_signal+0x80>
return true;
}
4fb86: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
4fb8c: 4200 clrb %d0
}
4fb8e: 4e5e unlk %fp
...
00050518 <_POSIX_signals_Clear_process_signals>:
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
50518: 203c 0000 0700 movel #1792,%d0
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
5051e: 4e56 0000 linkw %fp,#0 50522: 222e 0008 movel %fp@(8),%d1 50526: 2f03 movel %d3,%sp@- 50528: 2f02 movel %d2,%sp@-
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
5052a: 40c2 movew %sr,%d2 5052c: 8082 orl %d2,%d0 5052e: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
50530: 2601 movel %d1,%d3 50532: 2001 movel %d1,%d0 50534: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 5053a: e58b lsll #2,%d3 5053c: e988 lsll #4,%d0 5053e: 9083 subl %d3,%d0 50540: 7602 moveq #2,%d3 50542: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3
50546: 6726 beqs 5056e <_POSIX_signals_Clear_process_signals+0x56>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
50548: 5381 subql #1,%d1 5054a: 7001 moveq #1,%d0 5054c: e3a8 lsll %d1,%d0 5054e: 4680 notl %d0 50550: c0b9 0006 1ac2 andl 61ac2 <_POSIX_signals_Pending>,%d0 50556: 23c0 0006 1ac2 movel %d0,61ac2 <_POSIX_signals_Pending>
if ( !_POSIX_signals_Pending )
5055c: 6606 bnes 50564 <_POSIX_signals_Clear_process_signals+0x4c><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
5055e: 53b9 0006 14ce subql #1,614ce <_Thread_Do_post_task_switch_extension>
}
_ISR_Enable( level );
50564: 46c2 movew %d2,%sr
}
50566: 241f movel %sp@+,%d2 50568: 261f movel %sp@+,%d3 5056a: 4e5e unlk %fp 5056c: 4e75 rts
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
5056e: 0680 0006 1ac6 addil #400070,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
50574: 2040 moveal %d0,%a0 50576: 5888 addql #4,%a0 50578: 2240 moveal %d0,%a1 5057a: b1d1 cmpal %a1@,%a0
5057c: 67ca beqs 50548 <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
5057e: 46c2 movew %d2,%sr <== NOT EXECUTED
}
50580: 241f movel %sp@+,%d2 <== NOT EXECUTED 50582: 261f movel %sp@+,%d3 <== NOT EXECUTED 50584: 4e5e unlk %fp <== NOT EXECUTED
0004fb94 <_POSIX_signals_Clear_signals>:
4fb94: 7001 moveq #1,%d0
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
4fb96: 4e56 ffe8 linkw %fp,#-24 4fb9a: 206e 0008 moveal %fp@(8),%a0 4fb9e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4fba2: 242e 000c movel %fp@(12),%d2 4fba6: 2202 movel %d2,%d1 4fba8: 5381 subql #1,%d1 4fbaa: 1a2e 0017 moveb %fp@(23),%d5 4fbae: e3a8 lsll %d1,%d0
/* 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 )
4fbb0: 4a2e 001b tstb %fp@(27)
4fbb4: 664e bnes 4fc04 <_POSIX_signals_Clear_signals+0x70>
4fbb6: 78ff moveq #-1,%d4
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 );
4fbb8: 223c 0000 0700 movel #1792,%d1 4fbbe: 40c3 movew %sr,%d3 4fbc0: 8283 orl %d3,%d1 4fbc2: 46c1 movew %d1,%sr
if ( is_global ) {
4fbc4: 4a05 tstb %d5
4fbc6: 6752 beqs 4fc1a <_POSIX_signals_Clear_signals+0x86>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
4fbc8: c0b9 0006 1ac2 andl 61ac2 <_POSIX_signals_Pending>,%d0 4fbce: c084 andl %d4,%d0
4fbd0: 676a beqs 4fc3c <_POSIX_signals_Clear_signals+0xa8>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4fbd2: 2202 movel %d2,%d1 4fbd4: 2002 movel %d2,%d0 4fbd6: 47f9 0005 0518 lea 50518 <_POSIX_signals_Clear_process_signals>,%a3 4fbdc: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 4fbe2: e589 lsll #2,%d1 4fbe4: e988 lsll #4,%d0 4fbe6: 9081 subl %d1,%d0 4fbe8: 7202 moveq #2,%d1 4fbea: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1
4fbee: 675a beqs 4fc4a <_POSIX_signals_Clear_signals+0xb6>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fbf0: 2f02 movel %d2,%sp@- 4fbf2: 4e93 jsr %a3@ 4fbf4: 588f addql #4,%sp 4fbf6: 7001 moveq #1,%d0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
4fbf8: 46c3 movew %d3,%sr
return do_callout; }
4fbfa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc00: 4e5e unlk %fp 4fc02: 4e75 rts
/* 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;
4fc04: 2828 00cc movel %a0@(204),%d4
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 );
4fc08: 223c 0000 0700 movel #1792,%d1
/* 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;
4fc0e: 4684 notl %d4
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 );
4fc10: 40c3 movew %sr,%d3 4fc12: 8283 orl %d3,%d1 4fc14: 46c1 movew %d1,%sr
if ( is_global ) {
4fc16: 4a05 tstb %d5
4fc18: 66ae bnes 4fbc8 <_POSIX_signals_Clear_signals+0x34>
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
4fc1a: 2428 00d0 movel %a0@(208),%d2 4fc1e: 2200 movel %d0,%d1 4fc20: c282 andl %d2,%d1 4fc22: c284 andl %d4,%d1
4fc24: 6716 beqs 4fc3c <_POSIX_signals_Clear_signals+0xa8>
api->signals_pending &= ~mask;
4fc26: 4680 notl %d0 4fc28: c082 andl %d2,%d0 4fc2a: 2140 00d0 movel %d0,%a0@(208) 4fc2e: 7001 moveq #1,%d0
do_callout = true;
}
}
_ISR_Enable( level );
4fc30: 46c3 movew %d3,%sr
return do_callout; }
4fc32: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc38: 4e5e unlk %fp 4fc3a: 4e75 rts
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
4fc3c: 4200 clrb %d0
do_callout = true;
}
}
_ISR_Enable( level );
4fc3e: 46c3 movew %d3,%sr
return do_callout; }
4fc40: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc46: 4e5e unlk %fp 4fc48: 4e75 rts
_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 *)
4fc4a: 0680 0006 1ac6 addil #400070,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4fc50: 2040 moveal %d0,%a0 4fc52: 2458 moveal %a0@+,%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4fc54: b1ca cmpal %a2,%a0
4fc56: 6744 beqs 4fc9c <_POSIX_signals_Clear_signals+0x108>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
4fc58: 2052 moveal %a2@,%a0
the_chain->first = new_first;
4fc5a: 2240 moveal %d0,%a1 4fc5c: 2288 movel %a0,%a1@
new_first->previous = _Chain_Head(the_chain);
4fc5e: 2140 0004 movel %d0,%a0@(4)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
4fc62: 2f02 movel %d2,%sp@- 4fc64: 4e93 jsr %a3@
* 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;
4fc66: 206e 0010 moveal %fp@(16),%a0
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
the_node->previous = old_last_node;
4fc6a: 588f addql #4,%sp 4fc6c: 20ea 0008 movel %a2@(8),%a0@+ 4fc70: 20ea 000c movel %a2@(12),%a0@+ 4fc74: 20aa 0010 movel %a2@(16),%a0@
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4fc78: 24bc 0006 1a52 movel #399954,%a2@
old_last_node = the_chain->last;
4fc7e: 2279 0006 1a56 moveal 61a56 <_POSIX_signals_Inactive_siginfo+0x8>,%a1
the_chain->last = the_node;
4fc84: 23ca 0006 1a56 movel %a2,61a56 <_POSIX_signals_Inactive_siginfo+0x8>
old_last_node->next = the_node; the_node->previous = old_last_node;
4fc8a: 2549 0004 movel %a1,%a2@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4fc8e: 228a movel %a2,%a1@
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fc90: 2f02 movel %d2,%sp@- 4fc92: 4e93 jsr %a3@ 4fc94: 588f addql #4,%sp 4fc96: 7001 moveq #1,%d0 4fc98: 6000 ff5e braw 4fbf8 <_POSIX_signals_Clear_signals+0x64>
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 );
4fc9c: 2f02 movel %d2,%sp@- 4fc9e: 4e93 jsr %a3@ 4fca0: 588f addql #4,%sp
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fca2: 2f02 movel %d2,%sp@- 4fca4: 4e93 jsr %a3@ 4fca6: 588f addql #4,%sp 4fca8: 7001 moveq #1,%d0 4fcaa: 6000 ff4c braw 4fbf8 <_POSIX_signals_Clear_signals+0x64>
...
0004746c <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
4746c: 701b moveq #27,%d0 4746e: 4e56 fff4 linkw %fp,#-12 47472: 48d7 001c moveml %d2-%d4,%sp@ 47476: 242e 0008 movel %fp@(8),%d2
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
4747a: 7601 moveq #1,%d3 4747c: 2200 movel %d0,%d1 4747e: 5381 subql #1,%d1 47480: 2803 movel %d3,%d4 47482: e3ac lsll %d1,%d4 47484: 2204 movel %d4,%d1 47486: c282 andl %d2,%d1
47488: 6626 bnes 474b0 <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4748a: 5280 addql #1,%d0 4748c: 123c 0020 moveb #32,%d1 47490: b280 cmpl %d0,%d1
47492: 66e8 bnes 4747c <_POSIX_signals_Get_highest+0x10>
47494: 7001 moveq #1,%d0
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
47496: 7601 moveq #1,%d3 47498: 2200 movel %d0,%d1 4749a: 5381 subql #1,%d1 4749c: 2803 movel %d3,%d4 4749e: e3ac lsll %d1,%d4 474a0: 2204 movel %d4,%d1 474a2: c282 andl %d2,%d1
474a4: 660a bnes 474b0 <_POSIX_signals_Get_highest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
474a6: 5280 addql #1,%d0 474a8: 123c 001b moveb #27,%d1 474ac: b280 cmpl %d0,%d1
474ae: 66e8 bnes 47498 <_POSIX_signals_Get_highest+0x2c><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; }
474b0: 4cd7 001c moveml %sp@,%d2-%d4
474b4: 4e5e unlk %fp <== NOT EXECUTED
0004c744 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
4c744: 4e56 fff0 linkw %fp,#-16 4c748: 206e 0008 moveal %fp@(8),%a0 4c74c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c750: 2468 010e moveal %a0@(270),%a2
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
4c754: 4a8a tstl %a2 4c756: 6700 008e beqw 4c7e6 <_POSIX_signals_Post_switch_extension+0xa2>
*
* 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 );
4c75a: 263c 0000 0700 movel #1792,%d3 4c760: 47f9 0004 fae8 lea 4fae8 <_POSIX_signals_Check_signal>,%a3 4c766: 2003 movel %d3,%d0 4c768: 40c1 movew %sr,%d1 4c76a: 8081 orl %d1,%d0 4c76c: 46c0 movew %d0,%sr
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c76e: 2039 0006 1ac2 movel 61ac2 <_POSIX_signals_Pending>,%d0
* 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 &
4c774: 242a 00cc movel %a2@(204),%d2 4c778: 4682 notl %d2
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c77a: 80aa 00d0 orl %a2@(208),%d0
* 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 &
4c77e: c082 andl %d2,%d0
4c780: 6762 beqs 4c7e4 <_POSIX_signals_Post_switch_extension+0xa0>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
4c782: 46c1 movew %d1,%sr 4c784: 741b moveq #27,%d2
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
4c786: 42a7 clrl %sp@- 4c788: 2f02 movel %d2,%sp@- 4c78a: 2f0a movel %a2,%sp@- 4c78c: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c78e: 4878 0001 pea 1 <ADD> 4c792: 2f02 movel %d2,%sp@-
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c794: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c796: 2f0a movel %a2,%sp@- 4c798: 4e93 jsr %a3@
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c79a: 4fef 0018 lea %sp@(24),%sp 4c79e: 7020 moveq #32,%d0 4c7a0: b082 cmpl %d2,%d0
4c7a2: 66e2 bnes 4c786 <_POSIX_signals_Post_switch_extension+0x42>
4c7a4: 7401 moveq #1,%d2
_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 );
4c7a6: 42a7 clrl %sp@- 4c7a8: 2f02 movel %d2,%sp@- 4c7aa: 2f0a movel %a2,%sp@- 4c7ac: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c7ae: 4878 0001 pea 1 <ADD> 4c7b2: 2f02 movel %d2,%sp@-
_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++ ) {
4c7b4: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c7b6: 2f0a movel %a2,%sp@- 4c7b8: 4e93 jsr %a3@
_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++ ) {
4c7ba: 4fef 0018 lea %sp@(24),%sp 4c7be: 701b moveq #27,%d0 4c7c0: b082 cmpl %d2,%d0
4c7c2: 67a2 beqs 4c766 <_POSIX_signals_Post_switch_extension+0x22><== NEVER TAKEN
_POSIX_signals_Check_signal( api, signo, false );
4c7c4: 42a7 clrl %sp@- 4c7c6: 2f02 movel %d2,%sp@- 4c7c8: 2f0a movel %a2,%sp@- 4c7ca: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c7cc: 4878 0001 pea 1 <ADD> 4c7d0: 2f02 movel %d2,%sp@-
_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++ ) {
4c7d2: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c7d4: 2f0a movel %a2,%sp@- 4c7d6: 4e93 jsr %a3@
_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++ ) {
4c7d8: 4fef 0018 lea %sp@(24),%sp 4c7dc: 701b moveq #27,%d0 4c7de: b082 cmpl %d2,%d0
4c7e0: 66c4 bnes 4c7a6 <_POSIX_signals_Post_switch_extension+0x62>
4c7e2: 6082 bras 4c766 <_POSIX_signals_Post_switch_extension+0x22>
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
4c7e4: 46c1 movew %d1,%sr
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
}
4c7e6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4c7ec: 4e5e unlk %fp <== NOT EXECUTED
00046560 <_POSIX_signals_Ualarm_TSR>:
void _POSIX_signals_Ualarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
46560: 4e56 0000 linkw %fp,#0
/* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM );
46564: 4eb9 0004 3084 jsr 43084 <getpid> 4656a: 4878 000e pea e <OPER1+0x2> 4656e: 2f00 movel %d0,%sp@- 46570: 4eb9 0004 625c jsr 4625c <kill>
RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
Watchdog_Control *the_watchdog
)
{
(void) _Watchdog_Remove( the_watchdog );
46576: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 4657c: 4eb9 0004 a24c jsr 4a24c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46582: 4fef 000c lea %sp@(12),%sp 46586: 203c 0006 35e6 movel #407014,%d0 4658c: 2d40 000c movel %d0,%fp@(12) 46590: 203c 0006 2ea4 movel #405156,%d0 46596: 2d40 0008 movel %d0,%fp@(8)
/*
* If the reset interval is non-zero, reschedule ourselves.
*/
_Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
}
4659a: 4e5e unlk %fp 4659c: 4ef9 0004 a104 jmp 4a104 <_Watchdog_Insert>
...
0004fce0 <_POSIX_signals_Unblock_thread>:
4fce0: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
4fce2: 4e56 fff4 linkw %fp,#-12 4fce6: 222e 000c movel %fp@(12),%d1 4fcea: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fcee: 246e 0008 moveal %fp@(8),%a2 4fcf2: 2601 movel %d1,%d3 4fcf4: 5383 subql #1,%d3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4fcf6: 242a 0010 movel %a2@(16),%d2 4fcfa: 0282 1000 8000 andil #268468224,%d2
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
4fd00: 226e 0010 moveal %fp@(16),%a1
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4fd04: 206a 010e moveal %a2@(270),%a0 4fd08: e7a8 lsll %d3,%d0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4fd0a: 0c82 1000 8000 cmpil #268468224,%d2
4fd10: 6772 beqs 4fd84 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
4fd12: 2228 00cc movel %a0@(204),%d1 4fd16: 4681 notl %d1 4fd18: c081 andl %d1,%d0
4fd1a: 675c beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4fd1c: 202a 0010 movel %a2@(16),%d0
* 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;
4fd20: 7201 moveq #1,%d1 4fd22: 1541 0074 moveb %d1,%a2@(116)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4fd26: 0800 001c btst #28,%d0
4fd2a: 6736 beqs 4fd62 <_POSIX_signals_Unblock_thread+0x82>
the_thread->Wait.return_code = EINTR;
4fd2c: 7004 moveq #4,%d0 4fd2e: 2540 0034 movel %d0,%a2@(52)
#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) ){
4fd32: 103c 0008 moveb #8,%d0 4fd36: c0aa 0010 andl %a2@(16),%d0
4fd3a: 673c beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4fd3c: 7202 moveq #2,%d1 4fd3e: b2aa 0050 cmpl %a2@(80),%d1 4fd42: 6700 00a4 beqw 4fde8 <_POSIX_signals_Unblock_thread+0x108>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4fd46: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4fd4c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd4e: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> <== NOT EXECUTED 4fd54: 508f addql #8,%sp <== NOT EXECUTED 4fd56: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fd58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fd5e: 4e5e unlk %fp 4fd60: 4e75 rts
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 ) {
4fd62: 4a80 tstl %d0
4fd64: 6612 bnes 4fd78 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
4fd66: 2039 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d0
4fd6c: 670a beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
4fd6e: b5f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a2 4fd74: 6700 0094 beqw 4fe0a <_POSIX_signals_Unblock_thread+0x12a>
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fd78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
(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;
4fd7e: 4200 clrb %d0
}
}
return false;
}
4fd80: 4e5e unlk %fp 4fd82: 4e75 rts
* 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) ) {
4fd84: 2400 movel %d0,%d2 4fd86: c4aa 0030 andl %a2@(48),%d2
4fd8a: 672a beqs 4fdb6 <_POSIX_signals_Unblock_thread+0xd6>
the_thread->Wait.return_code = EINTR;
4fd8c: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4fd8e: 206a 0028 moveal %a2@(40),%a0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
4fd92: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
4fd96: 4a89 tstl %a1
4fd98: 6734 beqs 4fdce <_POSIX_signals_Unblock_thread+0xee>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
4fd9a: 20d9 movel %a1@+,%a0@+ 4fd9c: 20d9 movel %a1@+,%a0@+ 4fd9e: 2091 movel %a1@,%a0@
}
_Thread_queue_Extract_with_proxy( the_thread );
4fda0: 2f0a movel %a2,%sp@- 4fda2: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy>
return true;
4fda8: 588f addql #4,%sp
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fdaa: 7001 moveq #1,%d0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fdac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fdb2: 4e5e unlk %fp 4fdb4: 4e75 rts
* 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) ) {
4fdb6: 2428 00cc movel %a0@(204),%d2 4fdba: 4682 notl %d2 4fdbc: c082 andl %d2,%d0
4fdbe: 67b8 beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
the_thread->Wait.return_code = EINTR;
4fdc0: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4fdc2: 206a 0028 moveal %a2@(40),%a0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
4fdc6: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
4fdca: 4a89 tstl %a1
4fdcc: 66cc bnes 4fd9a <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN
the_info->si_signo = signo;
4fdce: 2081 movel %d1,%a0@
the_info->si_code = SI_USER;
4fdd0: 7201 moveq #1,%d1
the_info->si_value.sival_int = 0;
4fdd2: 42a8 0008 clrl %a0@(8)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
4fdd6: 2141 0004 movel %d1,%a0@(4)
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fdda: 2f0a movel %a2,%sp@- 4fddc: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy>
return true;
4fde2: 588f addql #4,%sp
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fde4: 7001 moveq #1,%d0 4fde6: 60c4 bras 4fdac <_POSIX_signals_Unblock_thread+0xcc>
_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 );
4fde8: 486a 0048 pea %a2@(72) 4fdec: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4fdf2: 588f addql #4,%sp 4fdf4: 2f3c 1003 fff8 movel #268697592,%sp@- 4fdfa: 2f0a movel %a2,%sp@- 4fdfc: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 4fe02: 508f addql #8,%sp 4fe04: 4200 clrb %d0 4fe06: 6000 ff50 braw 4fd58 <_POSIX_signals_Unblock_thread+0x78>
_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;
4fe0a: 7001 moveq #1,%d0
}
}
return false;
}
4fe0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fe12: 4e5e unlk %fp
(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;
4fe14: 13c0 0006 1574 moveb %d0,61574 <_ISR_Signals_to_thread_executing> 4fe1a: 4200 clrb %d0
}
}
return false;
}
...
0004d1ae <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4d1ae: 4e56 0000 linkw %fp,#0 4d1b2: 2f0a movel %a2,%sp@- 4d1b4: 246e 000c moveal %fp@(12),%a2
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4d1b8: 4a39 0005 fc24 tstb 5fc24 <Configuration_RTEMS_API+0x4>
4d1be: 665c bnes 4d21c <_RTEMS_tasks_Create_extension+0x6e>
4d1c0: 701e moveq #30,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d1c2: 2f00 movel %d0,%sp@- 4d1c4: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !api )
4d1ca: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d1cc: 2040 moveal %d0,%a0
if ( !api )
4d1ce: 4a80 tstl %d0
4d1d0: 675c beqs 4d22e <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4d1d2: 42aa 011a clrl %a2@(282)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4d1d6: 4200 clrb %d0
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4d1d8: 2548 010a movel %a0,%a2@(266) 4d1dc: 1140 0008 moveb %d0,%a0@(8)
api->pending_events = EVENT_SETS_NONE_PENDING;
4d1e0: 4290 clrl %a0@
api->event_condition = 0;
4d1e2: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4d1e6: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4d1ea: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4d1ee: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4d1f2: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4d1f6: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
4d1fa: 4a39 0005 fc24 tstb 5fc24 <Configuration_RTEMS_API+0x4>
4d200: 6710 beqs 4d212 <_RTEMS_tasks_Create_extension+0x64>
4d202: 41e8 001e lea %a0@(30),%a0 4d206: 4280 clrl %d0
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4d208: 4298 clrl %a0@+
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4d20a: 5280 addql #1,%d0 4d20c: 7210 moveq #16,%d1 4d20e: b280 cmpl %d0,%d1
4d210: 66f6 bnes 4d208 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4d212: 246e fffc moveal %fp@(-4),%a2 4d216: 4e5e unlk %fp
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4d218: 7001 moveq #1,%d0
api->Notepads[i] = 0;
}
return true;
}
4d21a: 4e75 rts
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4d21c: 705e moveq #94,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d21e: 2f00 movel %d0,%sp@- 4d220: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !api )
4d226: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d228: 2040 moveal %d0,%a0
if ( !api )
4d22a: 4a80 tstl %d0
4d22c: 66a4 bnes 4d1d2 <_RTEMS_tasks_Create_extension+0x24>
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4d22e: 246e fffc moveal %fp@(-4),%a2 4d232: 4e5e unlk %fp
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
4d234: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
00046b28 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46b28: 4e56 ffe4 linkw %fp,#-28 46b2c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
46b30: 2479 0005 fc4a moveal 5fc4a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46b36: 2639 0005 fc46 movel 5fc46 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46b3c: 4a8a tstl %a2
46b3e: 6754 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b40: 4a83 tstl %d3
46b42: 6750 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46b44: 280e movel %fp,%d4 46b46: 4282 clrl %d2 46b48: 5984 subql #4,%d4 46b4a: 47f9 0004 68fc lea 468fc <rtems_task_create>,%a3
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46b50: 49f9 0004 6bb0 lea 46bb0 <rtems_task_start>,%a4
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
46b56: 2f04 movel %d4,%sp@- 46b58: 2f2a 000c movel %a2@(12),%sp@- 46b5c: 2f2a 0014 movel %a2@(20),%sp@- 46b60: 2f2a 0004 movel %a2@(4),%sp@- 46b64: 2f2a 0008 movel %a2@(8),%sp@- 46b68: 2f12 movel %a2@,%sp@- 46b6a: 4e93 jsr %a3@
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
46b6c: 4fef 0018 lea %sp@(24),%sp 46b70: 4a80 tstl %d0
46b72: 662a bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46b74: 2f2a 0018 movel %a2@(24),%sp@- 46b78: 2f2a 0010 movel %a2@(16),%sp@- 46b7c: 2f2e fffc movel %fp@(-4),%sp@- 46b80: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46b82: 4fef 000c lea %sp@(12),%sp 46b86: 4a80 tstl %d0
46b88: 6614 bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b8a: 5282 addql #1,%d2 46b8c: 45ea 001c lea %a2@(28),%a2 46b90: b483 cmpl %d3,%d2
46b92: 65c2 bcss 46b56 <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
46b94: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46b9a: 4e5e unlk %fp 46b9c: 4e75 rts
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 );
46b9e: 2f00 movel %d0,%sp@- 46ba0: 4878 0001 pea 1 <ADD> 46ba4: 4878 0001 pea 1 <ADD> 46ba8: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
0004d0ea <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4d0ea: 4e56 ffec linkw %fp,#-20 4d0ee: 206e 0008 moveal %fp@(8),%a0 4d0f2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4d0f6: 2468 010a moveal %a0@(266),%a2
if ( !api )
4d0fa: 4a8a tstl %a2
4d0fc: 671a beqs 4d118 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4d0fe: 203c 0000 0700 movel #1792,%d0 4d104: 40c1 movew %sr,%d1 4d106: 8081 orl %d1,%d0 4d108: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4d10a: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4d10e: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4d112: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4d114: 4a82 tstl %d2
4d116: 660a bnes 4d122 <_RTEMS_tasks_Post_switch_extension+0x38>
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4d118: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4d11e: 4e5e unlk %fp 4d120: 4e75 rts
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4d122: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4d126: 260e movel %fp,%d3 4d128: 5983 subql #4,%d3 4d12a: 47f9 0004 ffb4 lea 4ffb4 <rtems_task_mode>,%a3 4d130: 2f03 movel %d3,%sp@- 4d132: 2f3c 0000 ffff movel #65535,%sp@- 4d138: 2f2a 000e movel %a2@(14),%sp@- 4d13c: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4d13e: 2f02 movel %d2,%sp@- 4d140: 206a 000a moveal %a2@(10),%a0 4d144: 4e90 jsr %a0@
asr->nest_level -= 1;
4d146: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4d14a: 2f03 movel %d3,%sp@- 4d14c: 2f3c 0000 ffff movel #65535,%sp@- 4d152: 2f2e fffc movel %fp@(-4),%sp@- 4d156: 4e93 jsr %a3@ 4d158: 4fef 001c lea %sp@(28),%sp
}
4d15c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4d162: 4e5e unlk %fp <== NOT EXECUTED
0004d046 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4d046: 4e56 0000 linkw %fp,#0 4d04a: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4d04e: 2068 011a moveal %a0@(282),%a0
while (tvp) {
4d052: 4a88 tstl %a0
4d054: 6712 beqs 4d068 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4d056: 2268 0004 moveal %a0@(4),%a1 4d05a: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4d05e: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4d062: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4d064: 4a88 tstl %a0
4d066: 66ee bnes 4d056 <_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;
4d068: 206e 000c moveal %fp@(12),%a0 4d06c: 2068 011a moveal %a0@(282),%a0
while (tvp) {
4d070: 4a88 tstl %a0
4d072: 6712 beqs 4d086 <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4d074: 2268 0004 moveal %a0@(4),%a1 4d078: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4d07c: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4d080: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4d082: 4a88 tstl %a0
4d084: 66ee bnes 4d074 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4d086: 4e5e unlk %fp <== NOT EXECUTED
00047bfc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47bfc: 4e56 fffc linkw %fp,#-4 47c00: 2f0a movel %a2,%sp@- 47c02: 486e fffc pea %fp@(-4) 47c06: 2f2e 0008 movel %fp@(8),%sp@- 47c0a: 4879 0006 3474 pea 63474 <_Rate_monotonic_Information> 47c10: 4eb9 0004 9b4c jsr 49b4c <_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 ) {
47c16: 4fef 000c lea %sp@(12),%sp 47c1a: 2440 moveal %d0,%a2 47c1c: 4aae fffc tstl %fp@(-4)
47c20: 6636 bnes 47c58 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47c22: 206a 0040 moveal %a2@(64),%a0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47c26: 2028 0010 movel %a0@(16),%d0 47c2a: 0280 0000 4000 andil #16384,%d0
47c30: 670a beqs 47c3c <_Rate_monotonic_Timeout+0x40>
the_thread->Wait.id == the_period->Object.id ) {
47c32: 202a 0008 movel %a2@(8),%d0 47c36: b0a8 0020 cmpl %a0@(32),%d0
47c3a: 675e beqs 47c9a <_Rate_monotonic_Timeout+0x9e>
_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 ) {
47c3c: 7001 moveq #1,%d0 47c3e: b0aa 0038 cmpl %a2@(56),%d0
47c42: 671c beqs 47c60 <_Rate_monotonic_Timeout+0x64>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
47c44: 7004 moveq #4,%d0 47c46: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47c4a: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47c50: 5380 subql #1,%d0 47c52: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47c58: 246e fff8 moveal %fp@(-8),%a2 47c5c: 4e5e unlk %fp 47c5e: 4e75 rts
_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;
47c60: 103c 0003 moveb #3,%d0 47c64: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47c68: 2f0a movel %a2,%sp@- 47c6a: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47c70: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47c76: 486a 0010 pea %a2@(16) 47c7a: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47c80: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert> 47c86: 4fef 000c lea %sp@(12),%sp 47c8a: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47c90: 5380 subql #1,%d0 47c92: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47c98: 60be bras 47c58 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47c9a: 2f3c 1003 fff8 movel #268697592,%sp@- 47ca0: 2f08 movel %a0,%sp@- 47ca2: 4eb9 0004 a080 jsr 4a080 <_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 );
47ca8: 2f0a movel %a2,%sp@- 47caa: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47cb0: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47cb6: 486a 0010 pea %a2@(16) 47cba: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47cc0: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47cc6: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47cca: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47cd0: 5380 subql #1,%d0 47cd2: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47cd8: 6000 ff7e braw 47c58 <_Rate_monotonic_Timeout+0x5c>
00049000 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
49000: 4e56 0000 linkw %fp,#0 49004: 2039 0006 405c movel 6405c <_Thread_Dispatch_disable_level>,%d0 4900a: 5280 addql #1,%d0 4900c: 2f0a movel %a2,%sp@- 4900e: 246e 0008 moveal %fp@(8),%a2 49012: 23c0 0006 405c movel %d0,6405c <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
49018: 2039 0006 40ee movel 640ee <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
4901e: 2212 movel %a2@,%d1 49020: b280 cmpl %d0,%d1
49022: 6d38 blts 4905c <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
49024: 9280 subl %d0,%d1 49026: 2f01 movel %d1,%sp@- 49028: 42a7 clrl %sp@- 4902a: 4879 0006 4128 pea 64128 <_Watchdog_Seconds_chain> 49030: 4eb9 0004 b76c jsr 4b76c <_Watchdog_Adjust>
_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 );
49036: 23d2 0006 40ee movel %a2@,640ee <_TOD_Now> 4903c: 588a addql #4,%a2 4903e: 4fef 000c lea %sp@(12),%sp 49042: 23d2 0006 40f2 movel %a2@,640f2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49048: 246e fffc moveal %fp@(-4),%a2 4904c: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
4904e: 7001 moveq #1,%d0 49050: 13c0 0006 4070 moveb %d0,64070 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49056: 4ef9 0004 a3c0 jmp 4a3c0 <_Thread_Enable_dispatch> 4905c: 9081 subl %d1,%d0 4905e: 2f00 movel %d0,%sp@- 49060: 4878 0001 pea 1 <ADD> 49064: 4879 0006 4128 pea 64128 <_Watchdog_Seconds_chain> 4906a: 4eb9 0004 b76c jsr 4b76c <_Watchdog_Adjust>
_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 );
49070: 23d2 0006 40ee movel %a2@,640ee <_TOD_Now> 49076: 588a addql #4,%a2 49078: 4fef 000c lea %sp@(12),%sp 4907c: 23d2 0006 40f2 movel %a2@,640f2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49082: 246e fffc moveal %fp@(-4),%a2 49086: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49088: 7001 moveq #1,%d0 4908a: 13c0 0006 4070 moveb %d0,64070 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49090: 4ef9 0004 a3c0 jmp 4a3c0 <_Thread_Enable_dispatch>
...
00047610 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47610: 4e56 0000 linkw %fp,#0 47614: 206e 0008 moveal %fp@(8),%a0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
47618: 2039 0006 24b0 movel 624b0 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
4761e: 2f02 movel %d2,%sp@-
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) ||
47620: 4a88 tstl %a0
47622: 6762 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47624: 243c 000f 4240 movel #1000000,%d2 4762a: 4c40 2002 remul %d0,%d2,%d2
(the_tod->ticks >= ticks_per_second) ||
4762e: b4a8 0018 cmpl %a0@(24),%d2
47632: 6352 blss 47686 <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
47634: 703b moveq #59,%d0 47636: b0a8 0014 cmpl %a0@(20),%d0
4763a: 654a bcss 47686 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
4763c: b0a8 0010 cmpl %a0@(16),%d0
47640: 6544 bcss 47686 <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
47642: 7217 moveq #23,%d1 47644: b2a8 000c cmpl %a0@(12),%d1
47648: 653c bcss 47686 <_TOD_Validate+0x76>
(the_tod->month == 0) ||
4764a: 2028 0004 movel %a0@(4),%d0
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) ||
4764e: 6736 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47650: 740c moveq #12,%d2 47652: b480 cmpl %d0,%d2
47654: 6530 bcss 47686 <_TOD_Validate+0x76>
(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) ||
47656: 2210 movel %a0@,%d1
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) ||
47658: 0c81 0000 07c3 cmpil #1987,%d1
4765e: 6326 blss 47686 <_TOD_Validate+0x76>
(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) )
47660: 2068 0008 moveal %a0@(8),%a0
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) ||
47664: 4a88 tstl %a0
47666: 671e beqs 47686 <_TOD_Validate+0x76> <== 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 )
47668: 143c 0003 moveb #3,%d2 4766c: c282 andl %d2,%d1
4766e: 661e bnes 4768e <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
47670: 43f9 0006 10e2 lea 610e2 <_TOD_Days_per_month>,%a1 47676: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
4767a: b1c0 cmpal %d0,%a0 4767c: 53c0 sls %d0 4767e: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47680: 241f movel %sp@+,%d2 47682: 4e5e unlk %fp 47684: 4e75 rts 47686: 241f movel %sp@+,%d2 47688: 4e5e unlk %fp
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
4768a: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
4768c: 4e75 rts
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 ];
4768e: 43f9 0006 10e2 lea 610e2 <_TOD_Days_per_month>,%a1 47694: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
47698: b1c0 cmpal %d0,%a0 4769a: 53c0 sls %d0 4769c: 4480 negl %d0 4769e: 60e0 bras 47680 <_TOD_Validate+0x70>
000483ec <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
483ec: 4e56 fff0 linkw %fp,#-16 483f0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 483f4: 246e 0008 moveal %fp@(8),%a2
/* * 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 );
483f8: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
483fa: 242e 000c movel %fp@(12),%d2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
483fe: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48402: 182e 0013 moveb %fp@(19),%d4
/* * 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 );
48406: 4eb9 0004 9384 jsr 49384 <_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 )
4840c: 588f addql #4,%sp 4840e: b4aa 0014 cmpl %a2@(20),%d2
48412: 670c beqs 48420 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
48414: 2f02 movel %d2,%sp@- 48416: 2f0a movel %a2,%sp@- 48418: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority> 4841e: 508f addql #8,%sp
_ISR_Disable( level );
48420: 203c 0000 0700 movel #1792,%d0 48426: 40c1 movew %sr,%d1 48428: 8081 orl %d1,%d0 4842a: 46c0 movew %d0,%sr
/*
* 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;
4842c: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
48430: 7404 moveq #4,%d2 48432: b480 cmpl %d0,%d2
48434: 6738 beqs 4846e <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
48436: 44c3 movew %d3,%ccr
48438: 6708 beqs 48442 <_Thread_Change_priority+0x56> <== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
4843a: 74fb moveq #-5,%d2 4843c: c480 andl %d0,%d2 4843e: 2542 0010 movel %d2,%a2@(16)
_ISR_Enable( level );
48442: 46c1 movew %d1,%sr
if ( _States_Is_waiting_on_thread_queue( state ) ) {
48444: 0280 0003 bee0 andil #245472,%d0
4844a: 660a bnes 48456 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4844c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48452: 4e5e unlk %fp 48454: 4e75 rts
/* 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 );
48456: 2d4a 000c movel %a2,%fp@(12) 4845a: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
48460: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48466: 4e5e unlk %fp
/* 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 );
48468: 4ef9 0004 9154 jmp 49154 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4846e: 44c3 movew %d3,%ccr
48470: 673c beqs 484ae <_Thread_Change_priority+0xc2> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
48472: 206a 008e moveal %a2@(142),%a0 48476: 302a 0094 movew %a2@(148),%d0 4847a: 3410 movew %a0@,%d2
* 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 );
4847c: 42aa 0010 clrl %a2@(16) 48480: 8082 orl %d2,%d0 48482: 3080 movew %d0,%a0@
_Priority_Major_bit_map |= the_priority_map->ready_major;
48484: 3439 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d2 4848a: 302a 0092 movew %a2@(146),%d0 4848e: 8082 orl %d2,%d0 48490: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
48496: 4a04 tstb %d4 48498: 6700 0082 beqw 4851c <_Thread_Change_priority+0x130>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4849c: 206a 008a moveal %a2@(138),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
484a0: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
484a2: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next; after_node->next = the_node;
484a6: 208a movel %a2,%a0@
the_node->next = before_node; before_node->previous = the_node;
484a8: 234a 0004 movel %a2,%a1@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
484ac: 2489 movel %a1,%a2@
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
484ae: 203c 0000 0700 movel #1792,%d0 484b4: 46c1 movew %d1,%sr 484b6: 8081 orl %d1,%d0 484b8: 46c0 movew %d0,%sr
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 );
484ba: 3039 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d0 484c0: 4840 swap %d0 484c2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
484c4: 4282 clrl %d2 484c6: 41f9 0006 154c lea 6154c <_Priority_Bit_map>,%a0 484cc: 3400 movew %d0,%d2 484ce: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 484d2: 4840 swap %d0 484d4: 04c0 ff1 %d0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
484d6: 4283 clrl %d3 484d8: e98a lsll #4,%d2 484da: 3600 movew %d0,%d3 484dc: 2279 0006 13d8 moveal 613d8 <_Thread_Ready_chain>,%a1 484e2: 2002 movel %d2,%d0 484e4: d083 addl %d3,%d0 484e6: 2400 movel %d0,%d2 484e8: e58a lsll #2,%d2 484ea: e988 lsll #4,%d0
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
484ec: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
484f2: 93c2 subal %d2,%a1 484f4: 2031 0800 movel %a1@(00000000,%d0:l),%d0 484f8: 23c0 0006 14ba movel %d0,614ba <_Thread_Heir>
* 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() &&
484fe: b1c0 cmpal %d0,%a0
48500: 670e beqs 48510 <_Thread_Change_priority+0x124>
_Thread_Executing->is_preemptible )
48502: 4a28 0075 tstb %a0@(117)
48506: 6708 beqs 48510 <_Thread_Change_priority+0x124>
_Context_Switch_necessary = true;
48508: 7401 moveq #1,%d2 4850a: 13c2 0006 14f6 moveb %d2,614f6 <_Context_Switch_necessary>
_ISR_Enable( level );
48510: 46c1 movew %d1,%sr
}
48512: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48518: 4e5e unlk %fp 4851a: 4e75 rts
_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 );
4851c: 206a 008a moveal %a2@(138),%a0
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48520: 2008 movel %a0,%d0 48522: 5880 addql #4,%d0 48524: 2480 movel %d0,%a2@
old_last_node = the_chain->last;
48526: 2268 0008 moveal %a0@(8),%a1
the_chain->last = the_node;
4852a: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4852e: 2549 0004 movel %a1,%a2@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
48532: 228a movel %a2,%a1@ 48534: 6000 ff78 braw 484ae <_Thread_Change_priority+0xc2>
00048538 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
48538: 327c 0700 moveaw #1792,%a1 4853c: 2009 movel %a1,%d0
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
4853e: 4e56 ffec linkw %fp,#-20 48542: 206e 0008 moveal %fp@(8),%a0 48546: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4854a: 242e 000c movel %fp@(12),%d2
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4854e: 40c3 movew %sr,%d3 48550: 8083 orl %d3,%d0 48552: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
48554: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
48558: 2002 movel %d2,%d0 4855a: c081 andl %d1,%d0
4855c: 6776 beqs 485d4 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4855e: 2002 movel %d2,%d0 48560: 4680 notl %d0 48562: c081 andl %d1,%d0
current_state =
48564: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
48568: 666a bnes 485d4 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4856a: 2868 008e moveal %a0@(142),%a4 4856e: 3028 0094 movew %a0@(148),%d0 48572: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
48574: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48578: 240a movel %a2,%d2 4857a: 5882 addql #4,%d2 4857c: 8081 orl %d1,%d0 4857e: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
48580: 266a 0008 moveal %a2@(8),%a3 48584: 3880 movew %d0,%a4@
the_chain->last = the_node;
48586: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4858a: 3239 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d1 48590: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
48594: 214b 0004 movel %a3,%a0@(4) 48598: 8081 orl %d1,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4859a: 2688 movel %a0,%a3@ 4859c: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
_ISR_Flash( level );
485a2: 2009 movel %a1,%d0 485a4: 46c3 movew %d3,%sr 485a6: 8083 orl %d3,%d0 485a8: 46c0 movew %d0,%sr
* 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 ) {
485aa: 2028 0014 movel %a0@(20),%d0 485ae: 2279 0006 14ba moveal 614ba <_Thread_Heir>,%a1 485b4: b0a9 0014 cmpl %a1@(20),%d0
485b8: 641a bccs 485d4 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
485ba: 23c8 0006 14ba movel %a0,614ba <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
485c0: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 485c6: 4a28 0075 tstb %a0@(117)
485ca: 6712 beqs 485de <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
485cc: 7001 moveq #1,%d0 485ce: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
485d4: 46c3 movew %d3,%sr
}
485d6: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 485da: 4e5e unlk %fp 485dc: 4e75 rts
* 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 ||
485de: 4a80 tstl %d0
485e0: 66f2 bnes 485d4 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
485e2: 7001 moveq #1,%d0 <== NOT EXECUTED 485e4: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED 485ea: 60e8 bras 485d4 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
000485ec <_Thread_Close>:
485ec: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
485ee: 4e56 0000 linkw %fp,#0 485f2: 2f0b movel %a3,%sp@- 485f4: 266e 0008 moveal %fp@(8),%a3 485f8: 2f0a movel %a2,%sp@- 485fa: 246e 000c moveal %fp@(12),%a2 485fe: 206b 0018 moveal %a3@(24),%a0 48602: 302a 000a movew %a2@(10),%d0 48606: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4860a: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48610: 5380 subql #1,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
48612: 2f0a movel %a2,%sp@- 48614: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level> 4861a: 4eb9 0004 99e0 jsr 499e0 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48620: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48626: 5280 addql #1,%d0 48628: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
/* * 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 );
4862e: 2f0a movel %a2,%sp@- 48630: 2f0b movel %a3,%sp@- 48632: 4eb9 0004 7bf8 jsr 47bf8 <_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 );
48638: 4878 0001 pea 1 <ADD> 4863c: 2f0a movel %a2,%sp@- 4863e: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
48644: 2f0a movel %a2,%sp@- 48646: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy> 4864c: 4fef 0018 lea %sp@(24),%sp 48650: 4a00 tstb %d0
48652: 6608 bnes 4865c <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
48654: 7002 moveq #2,%d0 48656: b0aa 0050 cmpl %a2@(80),%d0
4865a: 6756 beqs 486b2 <_Thread_Close+0xc6> /* * 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 ) )
4865c: b5f9 0006 14b2 cmpal 614b2 <_Thread_Allocated_fp>,%a2
48662: 6746 beqs 486aa <_Thread_Close+0xbe>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
48664: 202a 00c6 movel %a2@(198),%d0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
48668: 42aa 0102 clrl %a2@(258)
if ( the_thread->Start.fp_context )
4866c: 4a80 tstl %d0
4866e: 670a beqs 4867a <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
48670: 2f00 movel %d0,%sp@- 48672: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48678: 588f addql #4,%sp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
4867a: 2f0a movel %a2,%sp@- 4867c: 4eb9 0004 946c jsr 4946c <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
48682: 202a 0116 movel %a2@(278),%d0 48686: 588f addql #4,%sp
/* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL;
48688: 42aa 00ca clrl %a2@(202)
if ( the_thread->extensions )
4868c: 4a80 tstl %d0
4868e: 670a beqs 4869a <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
48690: 2f00 movel %d0,%sp@- 48692: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48698: 588f addql #4,%sp
the_thread->extensions = NULL;
4869a: 42aa 0116 clrl %a2@(278)
}
4869e: 246e fff8 moveal %fp@(-8),%a2 486a2: 266e fffc moveal %fp@(-4),%a3 486a6: 4e5e unlk %fp 486a8: 4e75 rts
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
486aa: 42b9 0006 14b2 clrl 614b2 <_Thread_Allocated_fp> 486b0: 60b2 bras 48664 <_Thread_Close+0x78>
*/
_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 );
486b2: 486a 0048 pea %a2@(72) 486b6: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 486bc: 588f addql #4,%sp
/* * 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 ) )
486be: b5f9 0006 14b2 cmpal 614b2 <_Thread_Allocated_fp>,%a2
486c4: 669e bnes 48664 <_Thread_Close+0x78> <== ALWAYS TAKEN
486c6: 60e2 bras 486aa <_Thread_Close+0xbe> <== NOT EXECUTED
00048778 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48778: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
4877c: 486e fffc pea %fp@(-4) 48780: 2f2e 0008 movel %fp@(8),%sp@- 48784: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
4878a: 508f addql #8,%sp 4878c: 4aae fffc tstl %fp@(-4)
48790: 661e bnes 487b0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48792: 2f3c 1000 0018 movel #268435480,%sp@- 48798: 2f00 movel %d0,%sp@- 4879a: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 487a0: 508f addql #8,%sp 487a2: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 487a8: 5380 subql #1,%d0 487aa: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
487b0: 4e5e unlk %fp <== NOT EXECUTED
000487b4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
487b4: 4e56 ffc8 linkw %fp,#-56 487b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
487bc: 2e3c 0000 0700 movel #1792,%d7 487c2: 2007 movel %d7,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
487c4: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
_ISR_Disable( level );
487ca: 40c1 movew %sr,%d1 487cc: 8081 orl %d1,%d0 487ce: 46c0 movew %d0,%sr
while ( _Context_Switch_necessary == true ) {
487d0: 1039 0006 14f6 moveb 614f6 <_Context_Switch_necessary>,%d0 487d6: 6700 00fa beqw 488d2 <_Thread_Dispatch+0x11e> 487da: 260e movel %fp,%d3 487dc: 240e movel %fp,%d2 487de: 5183 subql #8,%d3 487e0: 2c3c 0004 d5bc movel #316860,%d6 487e6: 0682 ffff fff0 addil #-16,%d2 487ec: 2a3c 0004 97ac movel #300972,%d5 487f2: 283c 0004 9764 movel #300900,%d4 487f8: 4bf9 0004 9a6c lea 49a6c <_User_extensions_Thread_switch>,%a5 487fe: 49f9 0004 9de0 lea 49de0 <_CPU_Context_switch>,%a4
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48804: 7001 moveq #1,%d0 48806: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
4880c: 2679 0006 14ba moveal 614ba <_Thread_Heir>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48812: 4200 clrb %d0
_Thread_Executing = heir;
48814: 23cb 0006 14e6 movel %a3,614e6 <_Thread_Executing>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
4881a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
_Thread_Executing = heir;
#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 )
48820: 7001 moveq #1,%d0 48822: b0ab 007a cmpl %a3@(122),%d0 48826: 6700 00d6 beqw 488fe <_Thread_Dispatch+0x14a>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
4882a: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
4882c: 2f03 movel %d3,%sp@- 4882e: 2046 moveal %d6,%a0 48830: 4e90 jsr %a0@
_Timestamp_Subtract(
48832: 2045 moveal %d5,%a0 48834: 2f02 movel %d2,%sp@- 48836: 2f03 movel %d3,%sp@- 48838: 4879 0006 14ee pea 614ee <_Thread_Time_of_last_context_switch> 4883e: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
48840: 2044 moveal %d4,%a0 48842: 2f02 movel %d2,%sp@- 48844: 486a 0082 pea %a2@(130) 48848: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
4884a: 2079 0006 14b6 moveal 614b6 <_Thread_libc_reent>,%a0 48850: 4fef 0018 lea %sp@(24),%sp
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
48854: 202e fff8 movel %fp@(-8),%d0 48858: 222e fffc movel %fp@(-4),%d1 4885c: 23c0 0006 14ee movel %d0,614ee <_Thread_Time_of_last_context_switch> 48862: 23c1 0006 14f2 movel %d1,614f2 <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48868: 4a88 tstl %a0
4886a: 6708 beqs 48874 <_Thread_Dispatch+0xc0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
4886c: 2550 0106 movel %a0@,%a2@(262)
*_Thread_libc_reent = heir->libc_reent;
48870: 20ab 0106 movel %a3@(262),%a0@
}
_User_extensions_Thread_switch( executing, heir );
48874: 2f0b movel %a3,%sp@- 48876: 2f0a movel %a2,%sp@- 48878: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
4887a: 486b 00ce pea %a3@(206) 4887e: 486a 00ce pea %a2@(206) 48882: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48884: 4fef 0010 lea %sp@(16),%sp 48888: 4aaa 0102 tstl %a2@(258)
4888c: 672c beqs 488ba <_Thread_Dispatch+0x106>
#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 );
4888e: 2079 0006 14b2 moveal 614b2 <_Thread_Allocated_fp>,%a0 48894: b1ca cmpal %a2,%a0
48896: 6722 beqs 488ba <_Thread_Dispatch+0x106>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48898: 4a88 tstl %a0
4889a: 670c beqs 488a8 <_Thread_Dispatch+0xf4>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4889c: 4868 0102 pea %a0@(258) 488a0: 4eb9 0004 9f16 jsr 49f16 <_CPU_Context_save_fp> 488a6: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
488a8: 486a 0102 pea %a2@(258) 488ac: 4eb9 0004 9f4e jsr 49f4e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
488b2: 588f addql #4,%sp 488b4: 23ca 0006 14b2 movel %a2,614b2 <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
488ba: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
_ISR_Disable( level );
488c0: 2007 movel %d7,%d0 488c2: 40c1 movew %sr,%d1 488c4: 8081 orl %d1,%d0 488c6: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
488c8: 1039 0006 14f6 moveb 614f6 <_Context_Switch_necessary>,%d0 488ce: 6600 ff34 bnew 48804 <_Thread_Dispatch+0x50>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
488d2: 42b9 0006 142c clrl 6142c <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
488d8: 46c1 movew %d1,%sr
if ( _Thread_Do_post_task_switch_extension ||
488da: 4ab9 0006 14ce tstl 614ce <_Thread_Do_post_task_switch_extension>
488e0: 6606 bnes 488e8 <_Thread_Dispatch+0x134>
executing->do_post_task_switch_extension ) {
488e2: 4a2a 0074 tstb %a2@(116)
488e6: 670c beqs 488f4 <_Thread_Dispatch+0x140>
executing->do_post_task_switch_extension = false;
488e8: 4201 clrb %d1 488ea: 1541 0074 moveb %d1,%a2@(116)
_API_extensions_Run_postswitch();
488ee: 4eb9 0004 7028 jsr 47028 <_API_extensions_Run_postswitch>
}
}
488f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 488fa: 4e5e unlk %fp 488fc: 4e75 rts
#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 )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
488fe: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0 48904: 2750 0076 movel %a0@,%a3@(118) 48908: 6000 ff20 braw 4882a <_Thread_Dispatch+0x76>
0004890c <_Thread_Enable_dispatch>:
#if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \
(CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
4890c: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
48910: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48916: 5380 subql #1,%d0 48918: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level> 4891e: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0
48924: 6704 beqs 4892a <_Thread_Enable_dispatch+0x1e>
return;
_Thread_Dispatch();
}
48926: 4e5e unlk %fp 48928: 4e75 rts 4892a: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
4892c: 4ef9 0004 87b4 jmp 487b4 <_Thread_Dispatch>
...
00050310 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
50310: 4e56 0000 linkw %fp,#0
Thread_Control *executing;
executing = _Thread_Executing;
50314: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
5031a: 4aa8 0010 tstl %a0@(16)
5031e: 660e bnes 5032e <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN
50320: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
50326: 6712 beqs 5033a <_Thread_Evaluate_mode+0x2a>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
50328: 4a28 0075 tstb %a0@(117)
5032c: 670c beqs 5033a <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN
_Context_Switch_necessary = true;
return true;
}
return false;
}
5032e: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
50330: 7001 moveq #1,%d0 50332: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
return true;
}
return false;
}
50338: 4e75 rts 5033a: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
5033c: 4200 clrb %d0 <== NOT EXECUTED
}
return false;
}
00050340 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
50340: 4e56 0000 linkw %fp,#0 50344: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
50346: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
5034c: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
5034e: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
50352: 40c0 movew %sr,%d0 50354: e189 lsll #8,%d1 50356: 0280 0000 f8ff andil #63743,%d0 5035c: 8081 orl %d1,%d0 5035e: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
50360: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
50362: 1439 0006 0be0 moveb 60be0 <doneConstructors.3606>,%d2
doneConstructors = 1;
50368: 13c0 0006 0be0 moveb %d0,60be0 <doneConstructors.3606>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
5036e: 4aaa 0102 tstl %a2@(258)
50372: 6720 beqs 50394 <_Thread_Handler+0x54>
#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 );
50374: 2079 0006 14b2 moveal 614b2 <_Thread_Allocated_fp>,%a0 5037a: b1ca cmpal %a2,%a0
5037c: 6716 beqs 50394 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
5037e: 4a88 tstl %a0
50380: 670c beqs 5038e <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
50382: 4868 0102 pea %a0@(258) 50386: 4eb9 0004 9f16 jsr 49f16 <_CPU_Context_save_fp> 5038c: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
5038e: 23ca 0006 14b2 movel %a2,614b2 <_Thread_Allocated_fp>
/* * 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 );
50394: 2f0a movel %a2,%sp@- 50396: 4eb9 0004 98c4 jsr 498c4 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
5039c: 4eb9 0004 890c jsr 4890c <_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) */ {
503a2: 588f addql #4,%sp 503a4: 4a02 tstb %d2
503a6: 6724 beqs 503cc <_Thread_Handler+0x8c>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
503a8: 202a 009e movel %a2@(158),%d0
503ac: 672a beqs 503d8 <_Thread_Handler+0x98>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
503ae: 7201 moveq #1,%d1 503b0: b280 cmpl %d0,%d1
503b2: 674c beqs 50400 <_Thread_Handler+0xc0> <== 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 );
503b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 503b6: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
503bc: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 503c0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 503c4: 42a7 clrl %sp@- <== NOT EXECUTED 503c6: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> <== NOT EXECUTED
* _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 ();
503cc: 4eb9 0005 ddf4 jsr 5ddf4 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
503d2: 202a 009e movel %a2@(158),%d0
503d6: 66d6 bnes 503ae <_Thread_Handler+0x6e>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
503d8: 2f2a 00a6 movel %a2@(166),%sp@- 503dc: 206a 009a moveal %a2@(154),%a0 503e0: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
503e2: 588f addql #4,%sp 503e4: 2540 0028 movel %d0,%a2@(40)
* 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 );
503e8: 2f0a movel %a2,%sp@- 503ea: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
503f0: 4878 0006 pea 6 <EXTENDSFDF> 503f4: 4878 0001 pea 1 <ADD> 503f8: 42a7 clrl %sp@- 503fa: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
50400: 2f2a 00a2 movel %a2@(162),%sp@- 50404: 206a 009a moveal %a2@(154),%a0 50408: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
5040a: 588f addql #4,%sp 5040c: 2540 0028 movel %d0,%a2@(40)
* 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 );
50410: 2f0a movel %a2,%sp@- 50412: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
50418: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 5041c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 50420: 42a7 clrl %sp@- <== NOT EXECUTED 50422: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> <== NOT EXECUTED
00048c28 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48c28: 4e56 0000 linkw %fp,#0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48c2c: 4ab9 0005 fc78 tstl 5fc78 <Configuration+0x24> 48c32: 57c0 seq %d0 48c34: 4ab9 0005 fc74 tstl 5fc74 <Configuration+0x20> 48c3a: 57c1 seq %d1 48c3c: 4480 negl %d0 48c3e: 4481 negl %d1 48c40: b380 eorl %d1,%d0
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
48c42: 2239 0005 fc64 movel 5fc64 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
48c48: 2079 0005 fc5c moveal 5fc5c <Configuration+0x8>,%a0
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48c4e: 2f02 movel %d2,%sp@-
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48c50: 4a00 tstb %d0 48c52: 6600 00a2 bnew 48cf6 <_Thread_Handler_initialization+0xce>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c56: 4280 clrl %d0 48c58: 1039 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48c5e: 4282 clrl %d2
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c60: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
48c62: 23c1 0006 13dc movel %d1,613dc <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c68: 2200 movel %d0,%d1 48c6a: e588 lsll #2,%d0 48c6c: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
48c6e: 23c8 0006 14ca movel %a0,614ca <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c74: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48c76: 4200 clrb %d0
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c78: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48c7a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
_Thread_Executing = NULL;
48c80: 42b9 0006 14e6 clrl 614e6 <_Thread_Executing>
_Thread_Heir = NULL;
48c86: 42b9 0006 14ba clrl 614ba <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
48c8c: 42b9 0006 14b2 clrl 614b2 <_Thread_Allocated_fp>
#endif
_Thread_Do_post_task_switch_extension = 0;
48c92: 42b9 0006 14ce clrl 614ce <_Thread_Do_post_task_switch_extension>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c98: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48c9e: 588f addql #4,%sp 48ca0: 1439 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d2 48ca6: 2040 moveal %d0,%a0 48ca8: 4281 clrl %d1
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48caa: 23c0 0006 13d8 movel %d0,613d8 <_Thread_Ready_chain>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48cb0: 2008 movel %a0,%d0 48cb2: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48cb4: 5281 addql #1,%d1 48cb6: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48cb8: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
48cbc: 2148 0008 movel %a0,%a0@(8) 48cc0: 41e8 000c lea %a0@(12),%a0 48cc4: b481 cmpl %d1,%d2
48cc6: 64e8 bccs 48cb0 <_Thread_Handler_initialization+0x88>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48cc8: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 48ccc: 42a7 clrl %sp@- 48cce: 4878 011e pea 11e <DBL_MANT_DIG+0xe9> 48cd2: 4878 0001 pea 1 <ADD> 48cd6: 4878 0001 pea 1 <ADD> 48cda: 4878 0001 pea 1 <ADD> 48cde: 4879 0006 157a pea 6157a <_Thread_Internal_information> 48ce4: 4eb9 0004 8070 jsr 48070 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48cea: 242e fffc movel %fp@(-4),%d2
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48cee: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48cf2: 4e5e unlk %fp 48cf4: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
48cf6: 4878 000f pea f <FPTRAP> 48cfa: 4878 0001 pea 1 <ADD> 48cfe: 42a7 clrl %sp@- 48d00: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
000489d0 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489d0: 4e56 ffe8 linkw %fp,#-24 489d4: 202e 0010 movel %fp@(16),%d0 489d8: 48d7 047c moveml %d2-%d6/%a2,%sp@ 489dc: 246e 000c moveal %fp@(12),%a2 489e0: 282e 0014 movel %fp@(20),%d4 489e4: 242e 001c movel %fp@(28),%d2 489e8: 262e 0024 movel %fp@(36),%d3
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489ec: 42aa 010a clrl %a2@(266)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489f0: 1a2e 001b moveb %fp@(27),%d5
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489f4: 42aa 010e clrl %a2@(270)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489f8: 1c2e 0023 moveb %fp@(35),%d6
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489fc: 42aa 0112 clrl %a2@(274)
extensions_area = NULL;
the_thread->libc_reent = NULL;
48a00: 42aa 0106 clrl %a2@(262)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
48a04: 4a80 tstl %d0 48a06: 6700 01f0 beqw 48bf8 <_Thread_Initialize+0x228>
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;
48a0a: 2204 movel %d4,%d1 48a0c: 4204 clrb %d4 48a0e: 1544 00bc moveb %d4,%a2@(188)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
48a12: 2540 00c2 movel %d0,%a2@(194)
the_stack->size = size;
48a16: 2541 00be movel %d1,%a2@(190)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
48a1a: 4a05 tstb %d5 48a1c: 6600 017e bnew 48b9c <_Thread_Initialize+0x1cc> 48a20: 4280 clrl %d0 48a22: 4285 clrl %d5
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
48a24: 2239 0006 14ca movel 614ca <_Thread_Maximum_extensions>,%d1
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
48a2a: 2540 00c6 movel %d0,%a2@(198)
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;
48a2e: 2540 0102 movel %d0,%a2@(258)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48a32: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
48a36: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
48a3a: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
48a3e: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
48a42: 4a81 tstl %d1 48a44: 6600 0178 bnew 48bbe <_Thread_Initialize+0x1ee>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48a48: 42aa 0116 clrl %a2@(278) 48a4c: 4284 clrl %d4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
48a4e: 2543 00ac movel %d3,%a2@(172)
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
48a52: 7002 moveq #2,%d0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
48a54: 256e 0028 00b0 movel %fp@(40),%a2@(176)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
48a5a: 1546 00aa moveb %d6,%a2@(170)
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
48a5e: b083 cmpl %d3,%d0 48a60: 6700 00d6 beqw 48b38 <_Thread_Initialize+0x168>
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48a64: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48a66: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
48a6c: 7001 moveq #1,%d0
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48a6e: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48a70: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48a74: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48a78: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
48a7c: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48a80: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48a84: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a8a: 206e 0008 moveal %fp@(8),%a0 48a8e: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48a90: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a96: 2068 0018 moveal %a0@(24),%a0 48a9a: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
48a9e: 42aa 0082 clrl %a2@(130) 48aa2: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48aa6: 42aa 0086 clrl %a2@(134)
* 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 );
48aaa: 2f0a movel %a2,%sp@- 48aac: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48ab2: 4fef 000c lea %sp@(12),%sp 48ab6: 4a00 tstb %d0
48ab8: 6672 bnes 48b2c <_Thread_Initialize+0x15c>
return true;
failed:
if ( the_thread->libc_reent )
48aba: 202a 0106 movel %a2@(262),%d0
48abe: 670a beqs 48aca <_Thread_Initialize+0xfa>
_Workspace_Free( the_thread->libc_reent );
48ac0: 2f00 movel %d0,%sp@- 48ac2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ac8: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48aca: 202a 010a movel %a2@(266),%d0
48ace: 670a beqs 48ada <_Thread_Initialize+0x10a>
_Workspace_Free( the_thread->API_Extensions[i] );
48ad0: 2f00 movel %d0,%sp@- 48ad2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ad8: 588f addql #4,%sp
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] )
48ada: 202a 010e movel %a2@(270),%d0
48ade: 670a beqs 48aea <_Thread_Initialize+0x11a>
_Workspace_Free( the_thread->API_Extensions[i] );
48ae0: 2f00 movel %d0,%sp@- 48ae2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ae8: 588f addql #4,%sp
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] )
48aea: 202a 0112 movel %a2@(274),%d0
48aee: 670a beqs 48afa <_Thread_Initialize+0x12a> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
48af0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48af2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> <== NOT EXECUTED 48af8: 588f addql #4,%sp <== NOT EXECUTED
if ( extensions_area )
48afa: 4a84 tstl %d4
48afc: 670a beqs 48b08 <_Thread_Initialize+0x138>
(void) _Workspace_Free( extensions_area );
48afe: 2f04 movel %d4,%sp@- 48b00: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48b06: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
48b08: 4a85 tstl %d5
48b0a: 670a beqs 48b16 <_Thread_Initialize+0x146>
(void) _Workspace_Free( fp_area );
48b0c: 2f05 movel %d5,%sp@- 48b0e: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48b14: 588f addql #4,%sp
#endif
_Thread_Stack_Free( the_thread );
48b16: 2f0a movel %a2,%sp@- 48b18: 4eb9 0004 946c jsr 4946c <_Thread_Stack_Free>
return false;
48b1e: 588f addql #4,%sp
}
48b20: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
48b26: 4200 clrb %d0
return false;
}
48b28: 4e5e unlk %fp 48b2a: 4e75 rts 48b2c: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
* 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 )
48b32: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread );
return false;
}
48b34: 4e5e unlk %fp 48b36: 4e75 rts
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;
48b38: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48b3e: 7001 moveq #1,%d0
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;
48b40: 2550 0076 movel %a0@,%a2@(118)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48b44: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48b46: 256e 002c 00b4 movel %fp@(44),%a2@(180)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48b4c: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48b4e: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48b52: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48b56: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
48b5a: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48b5e: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48b62: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority> 48b68: 206e 0008 moveal %fp@(8),%a0 48b6c: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48b6e: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48b74: 2068 0018 moveal %a0@(24),%a0 48b78: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
48b7c: 42aa 0082 clrl %a2@(130) 48b80: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48b84: 42aa 0086 clrl %a2@(134)
* 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 );
48b88: 2f0a movel %a2,%sp@- 48b8a: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48b90: 4fef 000c lea %sp@(12),%sp 48b94: 4a00 tstb %d0 48b96: 6700 ff22 beqw 48aba <_Thread_Initialize+0xea> 48b9a: 6090 bras 48b2c <_Thread_Initialize+0x15c>
/*
* 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 );
48b9c: 4878 001c pea 1c <OPER2+0x8> 48ba0: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !fp_area )
48ba6: 588f addql #4,%sp
/*
* 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 );
48ba8: 2a00 movel %d0,%d5
if ( !fp_area )
48baa: 6600 fe78 bnew 48a24 <_Thread_Initialize+0x54>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48bae: 202a 0106 movel %a2@(262),%d0
* 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 )
48bb2: 4284 clrl %d4
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48bb4: 4a80 tstl %d0 48bb6: 6600 ff08 bnew 48ac0 <_Thread_Initialize+0xf0> 48bba: 6000 ff0e braw 48aca <_Thread_Initialize+0xfa>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48bbe: e589 lsll #2,%d1 48bc0: 2041 moveal %d1,%a0 48bc2: 4868 0004 pea %a0@(4) 48bc6: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48bcc: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48bce: 2800 movel %d0,%d4
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48bd0: 6700 fee8 beqw 48aba <_Thread_Initialize+0xea>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48bd4: 2040 moveal %d0,%a0
* 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++ )
48bd6: 4281 clrl %d1 48bd8: 4280 clrl %d0 48bda: 2279 0006 14ca moveal 614ca <_Thread_Maximum_extensions>,%a1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48be0: 2544 0116 movel %d4,%a2@(278)
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
48be4: 42b0 1c00 clrl %a0@(00000000,%d1:l: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++ )
48be8: 5280 addql #1,%d0 48bea: 2200 movel %d0,%d1 48bec: b089 cmpl %a1,%d0 48bee: 6200 fe5e bhiw 48a4e <_Thread_Initialize+0x7e> 48bf2: 206a 0116 moveal %a2@(278),%a0 48bf6: 60ec bras 48be4 <_Thread_Initialize+0x214>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48bf8: 2f04 movel %d4,%sp@- 48bfa: 2f0a movel %a2,%sp@- 48bfc: 4eb9 0004 9408 jsr 49408 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
48c02: 508f addql #8,%sp
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48c04: 2200 movel %d0,%d1
if ( !actual_stack_size || actual_stack_size < stack_size )
48c06: 6712 beqs 48c1a <_Thread_Initialize+0x24a>
48c08: b084 cmpl %d4,%d0
48c0a: 650e bcss 48c1a <_Thread_Initialize+0x24a> <== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
48c0c: 202a 00ca movel %a2@(202),%d0
the_thread->Start.core_allocated_stack = true;
48c10: 7801 moveq #1,%d4 48c12: 1544 00bc moveb %d4,%a2@(188) 48c16: 6000 fdfa braw 48a12 <_Thread_Initialize+0x42>
_Thread_Stack_Free( the_thread );
return false;
}
48c1a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
48c20: 4200 clrb %d0
}
48c22: 4e5e unlk %fp
...
0004ea20 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4ea20: 4e56 0000 linkw %fp,#0 4ea24: 2f0a movel %a2,%sp@- 4ea26: 246e 0008 moveal %fp@(8),%a2
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
4ea2a: 256e 0010 00a6 movel %fp@(16),%a2@(166)
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4ea30: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4ea36: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4ea3c: 256e 000c 00a2 movel %fp@(12),%a2@(162)
{
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4ea42: 156a 00aa 0075 moveb %a2@(170),%a2@(117)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4ea48: 42aa 001c clrl %a2@(28)
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
4ea4c: 2f0a movel %a2,%sp@- 4ea4e: 4eb9 0004 9c90 jsr 49c90 <_Thread_queue_Extract_with_proxy> 4ea54: 588f addql #4,%sp 4ea56: 4a00 tstb %d0
4ea58: 6608 bnes 4ea62 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4ea5a: 7002 moveq #2,%d0 4ea5c: b0aa 0050 cmpl %a2@(80),%d0
4ea60: 672a beqs 4ea8c <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4ea62: 202a 00b8 movel %a2@(184),%d0 4ea66: b0aa 0014 cmpl %a2@(20),%d0
4ea6a: 6718 beqs 4ea84 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4ea6c: 2d4a 0008 movel %a2,%fp@(8) 4ea70: 2d40 000c movel %d0,%fp@(12)
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(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;
4ea74: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
4ea78: 246e fffc moveal %fp@(-4),%a2 4ea7c: 4e5e unlk %fp
(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 );
4ea7e: 4ef9 0004 9ea0 jmp 49ea0 <_Thread_Set_priority>
} }
4ea84: 246e fffc moveal %fp@(-4),%a2 4ea88: 4e5e unlk %fp 4ea8a: 4e75 rts
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 );
4ea8c: 486a 0048 pea %a2@(72) 4ea90: 4eb9 0004 a8d8 jsr 4a8d8 <_Watchdog_Remove> 4ea96: 588f addql #4,%sp 4ea98: 60c8 bras 4ea62 <_Thread_Reset+0x42>
...
00049e14 <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e14: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
49e16: 4e56 0000 linkw %fp,#0 49e1a: 2f0a movel %a2,%sp@- 49e1c: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e20: c0aa 0010 andl %a2@(16),%d0 49e24: 4a00 tstb %d0
49e26: 670a beqs 49e32 <_Thread_Restart+0x1e>
return true;
}
return false;
}
49e28: 246e fffc moveal %fp@(-4),%a2 49e2c: 4e5e unlk %fp
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e2e: 4200 clrb %d0
return true;
}
return false;
}
49e30: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
49e32: 2f0a movel %a2,%sp@- 49e34: 4eb9 0004 a024 jsr 4a024 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
49e3a: 2f2e 0010 movel %fp@(16),%sp@- 49e3e: 2f2e 000c movel %fp@(12),%sp@- 49e42: 2f0a movel %a2,%sp@- 49e44: 4eb9 0004 ea20 jsr 4ea20 <_Thread_Reset>
_Thread_Load_environment( the_thread );
49e4a: 2f0a movel %a2,%sp@- 49e4c: 4eb9 0004 e674 jsr 4e674 <_Thread_Load_environment>
_Thread_Ready( the_thread );
49e52: 2f0a movel %a2,%sp@- 49e54: 4eb9 0004 e960 jsr 4e960 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49e5a: 2f0a movel %a2,%sp@- 49e5c: 4eb9 0004 a6c8 jsr 4a6c8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
49e62: 4fef 001c lea %sp@(28),%sp 49e66: b5f9 0006 247e cmpal 6247e <_Thread_Executing>,%a2
49e6c: 670a beqs 49e78 <_Thread_Restart+0x64>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49e6e: 7001 moveq #1,%d0
return true;
}
return false;
}
49e70: 246e fffc moveal %fp@(-4),%a2 49e74: 4e5e unlk %fp 49e76: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
49e78: 4aaa 0102 tstl %a2@(258)
49e7c: 6712 beqs 49e90 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49e7e: 486a 0102 pea %a2@(258) 49e82: 4eb9 0004 ac32 jsr 4ac32 <_CPU_Context_restore_fp> 49e88: 2479 0006 247e moveal 6247e <_Thread_Executing>,%a2 49e8e: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49e90: 486a 00ce pea %a2@(206) 49e94: 4eb9 0004 aada jsr 4aada <_CPU_Context_Restart_self>
49e9a: 588f addql #4,%sp <== NOT EXECUTED 49e9c: 7001 moveq #1,%d0 <== NOT EXECUTED 49e9e: 60d0 bras 49e70 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c8a4 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8a4: 327c 0700 moveaw #1792,%a1 4c8a8: 2009 movel %a1,%d0
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4c8aa: 4e56 ffec linkw %fp,#-20 4c8ae: 206e 0008 moveal %fp@(8),%a0 4c8b2: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8b6: 40c1 movew %sr,%d1 4c8b8: 8081 orl %d1,%d0 4c8ba: 46c0 movew %d0,%sr
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4c8bc: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c8c0: 0800 0001 btst #1,%d0
4c8c4: 6774 beqs 4c93a <_Thread_Resume+0x96> <== NEVER TAKEN
4c8c6: 74fd moveq #-3,%d2 4c8c8: c082 andl %d2,%d0
current_state =
4c8ca: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4c8ce: 666a bnes 4c93a <_Thread_Resume+0x96>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4c8d0: 2868 008e moveal %a0@(142),%a4 4c8d4: 3028 0094 movew %a0@(148),%d0 4c8d8: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c8da: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4c8de: 260a movel %a2,%d3 4c8e0: 5883 addql #4,%d3 4c8e2: 8082 orl %d2,%d0 4c8e4: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c8e6: 266a 0008 moveal %a2@(8),%a3 4c8ea: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c8ec: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c8f0: 3439 0006 5034 movew 65034 <_Priority_Major_bit_map>,%d2 4c8f6: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c8fa: 214b 0004 movel %a3,%a0@(4) 4c8fe: 8082 orl %d2,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4c900: 2688 movel %a0,%a3@ 4c902: 33c0 0006 5034 movew %d0,65034 <_Priority_Major_bit_map>
_ISR_Flash( level );
4c908: 2009 movel %a1,%d0 4c90a: 46c1 movew %d1,%sr 4c90c: 8081 orl %d1,%d0 4c90e: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c910: 2028 0014 movel %a0@(20),%d0 4c914: 2279 0006 5012 moveal 65012 <_Thread_Heir>,%a1 4c91a: b0a9 0014 cmpl %a1@(20),%d0
4c91e: 641a bccs 4c93a <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c920: 23c8 0006 5012 movel %a0,65012 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c926: 2079 0006 503e moveal 6503e <_Thread_Executing>,%a0 4c92c: 4a28 0075 tstb %a0@(117)
4c930: 6712 beqs 4c944 <_Thread_Resume+0xa0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c932: 7001 moveq #1,%d0 4c934: 13c0 0006 504e moveb %d0,6504e <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4c93a: 46c1 movew %d1,%sr
}
4c93c: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c940: 4e5e unlk %fp 4c942: 4e75 rts
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4c944: 4a80 tstl %d0
4c946: 66f2 bnes 4c93a <_Thread_Resume+0x96> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c948: 7001 moveq #1,%d0 <== NOT EXECUTED 4c94a: 13c0 0006 504e moveb %d0,6504e <_Context_Switch_necessary> <== NOT EXECUTED 4c950: 60e8 bras 4c93a <_Thread_Resume+0x96> <== NOT EXECUTED
...
00049548 <_Thread_Suspend>:
{
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
49548: 203c 0000 0700 movel #1792,%d0
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
4954e: 4e56 fff4 linkw %fp,#-12 49552: 206e 0008 moveal %fp@(8),%a0 49556: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
4955a: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4955e: 40c1 movew %sr,%d1 49560: 8081 orl %d1,%d0 49562: 46c0 movew %d0,%sr
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
49564: 2028 0010 movel %a0@(16),%d0
49568: 6642 bnes 495ac <_Thread_Suspend+0x64>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
4956a: 7002 moveq #2,%d0
if ( _Chain_Has_only_one_node( ready ) ) {
4956c: 2429 0008 movel %a1@(8),%d2
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
49570: 2140 0010 movel %d0,%a0@(16)
if ( _Chain_Has_only_one_node( ready ) ) {
49574: b491 cmpl %a1@,%d2 49576: 6700 0098 beqw 49610 <_Thread_Suspend+0xc8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4957a: 2250 moveal %a0@,%a1
previous = the_node->previous;
4957c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49580: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49582: 234a 0004 movel %a2,%a1@(4)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49586: 203c 0000 0700 movel #1792,%d0 4958c: 46c1 movew %d1,%sr 4958e: 8081 orl %d1,%d0 49590: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
49592: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
49598: 6730 beqs 495ca <_Thread_Suspend+0x82>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
4959a: b1f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a0
495a0: 671c beqs 495be <_Thread_Suspend+0x76> <== NEVER TAKEN
_Context_Switch_necessary = true;
_ISR_Enable( level );
495a2: 46c1 movew %d1,%sr
}
495a4: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495a8: 4e5e unlk %fp 495aa: 4e75 rts
_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 =
495ac: 7402 moveq #2,%d2 495ae: 8480 orl %d0,%d2 495b0: 2142 0010 movel %d2,%a0@(16)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
495b4: 46c1 movew %d1,%sr
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
495b6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495ba: 4e5e unlk %fp 495bc: 4e75 rts
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
495be: 7401 moveq #1,%d2 495c0: 13c2 0006 14f6 moveb %d2,614f6 <_Context_Switch_necessary>
_ISR_Enable( level );
495c6: 46c1 movew %d1,%sr 495c8: 60da bras 495a4 <_Thread_Suspend+0x5c>
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 );
495ca: 3039 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d0 495d0: 4840 swap %d0 495d2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
495d4: 4282 clrl %d2 495d6: 43f9 0006 154c lea 6154c <_Priority_Bit_map>,%a1 495dc: 3400 movew %d0,%d2 495de: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 495e2: 4840 swap %d0 495e4: 04c0 ff1 %d0 495e6: 4283 clrl %d3 495e8: e98a lsll #4,%d2 495ea: 3600 movew %d0,%d3 495ec: 2279 0006 13d8 moveal 613d8 <_Thread_Ready_chain>,%a1 495f2: 2002 movel %d2,%d0 495f4: d083 addl %d3,%d0 495f6: 2400 movel %d0,%d2 495f8: e58a lsll #2,%d2 495fa: e988 lsll #4,%d0 495fc: 93c2 subal %d2,%a1 495fe: d3c0 addal %d0,%a1 49600: 23d1 0006 14ba movel %a1@,614ba <_Thread_Heir>
_ISR_Flash( level );
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
49606: b1f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a0
4960c: 6694 bnes 495a2 <_Thread_Suspend+0x5a> <== NEVER TAKEN
4960e: 60ae bras 495be <_Thread_Suspend+0x76>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49610: 2009 movel %a1,%d0 49612: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
49614: 2468 008e moveal %a0@(142),%a2 49618: 2280 movel %d0,%a1@ 4961a: 3412 movew %a2@,%d2 4961c: 3028 0098 movew %a0@(152),%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49620: 2349 0008 movel %a1,%a1@(8) 49624: c082 andl %d2,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
49626: 42a9 0004 clrl %a1@(4) 4962a: 3480 movew %d0,%a2@
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 );
4962c: 6600 ff58 bnew 49586 <_Thread_Suspend+0x3e>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
49630: 3439 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d2 49636: 3028 0096 movew %a0@(150),%d0 4963a: c082 andl %d2,%d0 4963c: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49642: 203c 0000 0700 movel #1792,%d0 49648: 46c1 movew %d1,%sr 4964a: 8081 orl %d1,%d0 4964c: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
4964e: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0 49654: 6600 ff44 bnew 4959a <_Thread_Suspend+0x52> 49658: 6000 ff70 braw 495ca <_Thread_Suspend+0x82>
0004965c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
4965c: 4e56 0000 linkw %fp,#0 49660: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
49662: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
49668: 4a2a 0075 tstb %a2@(117)
4966c: 6720 beqs 4968e <_Thread_Tickle_timeslice+0x32>
return;
if ( !_States_Is_ready( executing->current_state ) )
4966e: 4aaa 0010 tstl %a2@(16)
49672: 661a bnes 4968e <_Thread_Tickle_timeslice+0x32>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
49674: 202a 007a movel %a2@(122),%d0 49678: 7201 moveq #1,%d1 4967a: b280 cmpl %d0,%d1
4967c: 6210 bhis 4968e <_Thread_Tickle_timeslice+0x32>
4967e: 123c 0002 moveb #2,%d1 49682: b280 cmpl %d0,%d1
49684: 642e bccs 496b4 <_Thread_Tickle_timeslice+0x58>
49686: 123c 0003 moveb #3,%d1 4968a: b280 cmpl %d0,%d1
4968c: 6708 beqs 49696 <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
4968e: 246e fffc moveal %fp@(-4),%a2 49692: 4e5e unlk %fp 49694: 4e75 rts
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
49696: 202a 0076 movel %a2@(118),%d0 4969a: 5380 subql #1,%d0 4969c: 2540 0076 movel %d0,%a2@(118)
496a0: 66ec bnes 4968e <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing );
496a2: 2f0a movel %a2,%sp@- 496a4: 206a 007e moveal %a2@(126),%a0 496a8: 4e90 jsr %a0@
break;
#endif
}
}
496aa: 246e fffc moveal %fp@(-4),%a2
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
496ae: 588f addql #4,%sp
break;
#endif
}
}
496b0: 4e5e unlk %fp 496b2: 4e75 rts
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 ) {
496b4: 202a 0076 movel %a2@(118),%d0 496b8: 5380 subql #1,%d0 496ba: 2540 0076 movel %d0,%a2@(118)
496be: 6ece bgts 4968e <_Thread_Tickle_timeslice+0x32>
_Thread_Reset_timeslice();
496c0: 4eb9 0004 dd3c jsr 4dd3c <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
496c6: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0 496cc: 2550 0076 movel %a0@,%a2@(118)
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
496d0: 246e fffc moveal %fp@(-4),%a2
496d4: 4e5e unlk %fp <== NOT EXECUTED
000496d8 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496d8: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
496dc: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496e2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
496e6: 243c 0000 0700 movel #1792,%d2 496ec: 2002 movel %d2,%d0
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
496ee: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
496f2: 40c1 movew %sr,%d1 496f4: 8081 orl %d1,%d0 496f6: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
496f8: 2029 0008 movel %a1@(8),%d0 496fc: b091 cmpl %a1@,%d0
496fe: 6750 beqs 49750 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
49700: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
49702: 2009 movel %a1,%d0 49704: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49706: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
4970a: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4970c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
49710: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
49712: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
49716: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4971a: 214a 0004 movel %a2,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4971e: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
49720: 46c1 movew %d1,%sr 49722: 8481 orl %d1,%d2 49724: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
49726: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
4972c: 6712 beqs 49740 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
4972e: 7001 moveq #1,%d0 <== NOT EXECUTED 49730: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
49736: 46c1 movew %d1,%sr
}
49738: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4973c: 4e5e unlk %fp 4973e: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
49740: 23d1 0006 14ba movel %a1@,614ba <_Thread_Heir>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
49746: 7001 moveq #1,%d0 49748: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> 4974e: 60e6 bras 49736 <_Thread_Yield_processor+0x5e>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
49750: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
49756: 67de beqs 49736 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN
_Context_Switch_necessary = true;
49758: 7001 moveq #1,%d0 <== NOT EXECUTED 4975a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED 49760: 60d4 bras 49736 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
...
00048384 <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
48384: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
48386: 4e56 0000 linkw %fp,#0 4838a: 202e 0010 movel %fp@(16),%d0 4838e: 2f0a movel %a2,%sp@- 48390: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
48394: 42aa 0044 clrl %a2@(68)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
48398: b2aa 0050 cmpl %a2@(80),%d1
4839c: 671c beqs 483ba <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
4839e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
483a0: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
483a4: 246e fffc moveal %fp@(-4),%a2 483a8: 203c 1003 fff8 movel #268697592,%d0 483ae: 2d40 000c movel %d0,%fp@(12) 483b2: 4e5e unlk %fp 483b4: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
483ba: 123c 0003 moveb #3,%d1 483be: 2541 0050 movel %d1,%a2@(80)
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
483c2: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
483c4: 486a 0048 pea %a2@(72) 483c8: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 483ce: 588f addql #4,%sp 483d0: 203c 1003 fff8 movel #268697592,%d0 483d6: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
483da: 246e fffc moveal %fp@(-4),%a2 483de: 2d40 000c movel %d0,%fp@(12) 483e2: 4e5e unlk %fp 483e4: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
00048f04 <_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
)
{
48f04: 4e56 ffe4 linkw %fp,#-28 48f08: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 48f0c: 266e 000c moveal %fp@(12),%a3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48f10: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
48f14: 263c 0000 0700 movel #1792,%d3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
48f1a: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
48f1e: 2401 movel %d1,%d2 48f20: ec8a lsrl #6,%d2 48f22: 2002 movel %d2,%d0 48f24: e58a lsll #2,%d2 48f26: e988 lsll #4,%d0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
48f28: 286e 0008 moveal %fp@(8),%a4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
48f2c: 9082 subl %d2,%d0 48f2e: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 48f32: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48f36: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
48f3a: 242c 0038 movel %a4@(56),%d2 48f3e: 2748 0040 movel %a0,%a3@(64)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48f42: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
48f46: 0801 0005 btst #5,%d1
48f4a: 6656 bnes 48fa2 <_Thread_queue_Enqueue_priority+0x9e>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48f4c: 2a0a movel %a2,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48f4e: 2803 movel %d3,%d4 48f50: 5885 addql #4,%d5 48f52: 2004 movel %d4,%d0 48f54: 40c3 movew %sr,%d3 48f56: 8083 orl %d3,%d0 48f58: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
48f5a: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f5c: ba88 cmpl %a0,%d5 48f5e: 6700 010a beqw 4906a <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
48f62: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
48f66: b3c1 cmpal %d1,%a1
48f68: 6418 bccs 48f82 <_Thread_queue_Enqueue_priority+0x7e>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
48f6a: 2004 movel %d4,%d0 48f6c: 46c3 movew %d3,%sr 48f6e: 8083 orl %d3,%d0 48f70: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48f72: 2002 movel %d2,%d0 48f74: c0a8 0010 andl %a0@(16),%d0 48f78: 6700 0092 beqw 4900c <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
48f7c: 2050 moveal %a0@,%a0
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 ) ) {
48f7e: ba88 cmpl %a0,%d5
48f80: 66e0 bnes 48f62 <_Thread_queue_Enqueue_priority+0x5e>
48f82: 2403 movel %d3,%d2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48f84: 7001 moveq #1,%d0 48f86: b0ac 0030 cmpl %a4@(48),%d0 48f8a: 6700 0094 beqw 49020 <_Thread_queue_Enqueue_priority+0x11c>
* 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;
48f8e: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
48f92: 202c 0030 movel %a4@(48),%d0
* 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;
48f96: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48f98: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f9c: 4e5e unlk %fp 48f9e: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48fa0: 46c4 movew %d4,%sr
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48fa2: 4284 clrl %d4 48fa4: 1839 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
48faa: 2003 movel %d3,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48fac: 2244 moveal %d4,%a1 48fae: 5289 addql #1,%a1
_ISR_Disable( level );
48fb0: 40c4 movew %sr,%d4 48fb2: 8084 orl %d4,%d0 48fb4: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
48fb6: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48fba: b5c8 cmpal %a0,%a2
48fbc: 6720 beqs 48fde <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
48fbe: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
48fc2: b3c1 cmpal %d1,%a1
48fc4: 6318 blss 48fde <_Thread_queue_Enqueue_priority+0xda>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
48fc6: 2003 movel %d3,%d0 48fc8: 46c4 movew %d4,%sr 48fca: 8084 orl %d4,%d0 48fcc: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48fce: 2002 movel %d2,%d0 48fd0: c0a8 0010 andl %a0@(16),%d0
48fd4: 67ca beqs 48fa0 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
48fd6: 2068 0004 moveal %a0@(4),%a0
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 ) ) {
48fda: b5c8 cmpal %a0,%a2
48fdc: 66e0 bnes 48fbe <_Thread_queue_Enqueue_priority+0xba>
48fde: 2404 movel %d4,%d2
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
48fe0: 7001 moveq #1,%d0 48fe2: b0ac 0030 cmpl %a4@(48),%d0
48fe6: 66a6 bnes 48f8e <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48fe8: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48fec: b3c1 cmpal %d1,%a1
48fee: 6756 beqs 49046 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
48ff0: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
48ff2: 2748 0004 movel %a0,%a3@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
48ff6: 2689 movel %a1,%a3@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48ff8: 274c 0044 movel %a4,%a3@(68)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
48ffc: 208b movel %a3,%a0@
next_node->previous = the_node;
48ffe: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
49002: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49004: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49008: 4e5e unlk %fp 4900a: 4e75 rts
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
4900c: 46c3 movew %d3,%sr <== NOT EXECUTED
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
4900e: 2004 movel %d4,%d0 <== NOT EXECUTED 49010: 40c3 movew %sr,%d3 <== NOT EXECUTED 49012: 8083 orl %d3,%d0 <== NOT EXECUTED 49014: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
49016: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49018: ba88 cmpl %a0,%d5 <== NOT EXECUTED 4901a: 6600 ff46 bnew 48f62 <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 4901e: 604a bras 4906a <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49020: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
49024: b3c1 cmpal %d1,%a1
49026: 671e beqs 49046 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
49028: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
4902c: 2688 movel %a0,%a3@
the_node->previous = previous_node;
4902e: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
49032: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
49036: 228b movel %a3,%a1@
search_node->previous = the_node;
49038: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
4903c: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
4903e: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49042: 4e5e unlk %fp 49044: 4e75 rts 49046: 41e8 003c lea %a0@(60),%a0
_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;
4904a: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
4904e: 2688 movel %a0,%a3@
the_node->previous = previous_node;
49050: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
49054: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
49058: 228b movel %a3,%a1@
search_node->previous = the_node;
4905a: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
4905e: 46c2 movew %d2,%sr 49060: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49062: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49066: 4e5e unlk %fp 49068: 4e75 rts
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 ) ) {
4906a: 2403 movel %d3,%d2 4906c: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
49070: 7001 moveq #1,%d0 49072: b0ac 0030 cmpl %a4@(48),%d0 49076: 6600 ff16 bnew 48f8e <_Thread_queue_Enqueue_priority+0x8a> 4907a: 60a4 bras 49020 <_Thread_queue_Enqueue_priority+0x11c>
00048e68 <_Thread_queue_Enqueue_with_handler>:
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48e68: 4e56 fff0 linkw %fp,#-16 48e6c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48e70: 266e 0008 moveal %fp@(8),%a3
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48e74: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
48e78: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48e7e: 242e 000c movel %fp@(12),%d2
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48e82: 2f0a movel %a2,%sp@- 48e84: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
48e8a: 508f addql #8,%sp 48e8c: 4a82 tstl %d2
48e8e: 6644 bnes 48ed4 <_Thread_queue_Enqueue_with_handler+0x6c>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
48e90: 41f9 0004 8f04 lea 48f04 <_Thread_queue_Enqueue_priority>,%a0 48e96: 7001 moveq #1,%d0 48e98: b0ab 0034 cmpl %a3@(52),%d0
48e9c: 6706 beqs 48ea4 <_Thread_queue_Enqueue_with_handler+0x3c>
48e9e: 41f9 0004 dab0 lea 4dab0 <_Thread_queue_Enqueue_fifo>,%a0
enqueue_p = _Thread_queue_Enqueue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
48ea4: 486e fffc pea %fp@(-4) 48ea8: 2f0a movel %a2,%sp@- 48eaa: 2f0b movel %a3,%sp@- 48eac: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
48eae: 4fef 000c lea %sp@(12),%sp 48eb2: 7201 moveq #1,%d1 48eb4: b280 cmpl %d0,%d1
48eb6: 6712 beqs 48eca <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48eb8: 2f2e fffc movel %fp@(-4),%sp@- 48ebc: 2f0a movel %a2,%sp@- 48ebe: 2f00 movel %d0,%sp@- 48ec0: 4eb9 0004 8384 jsr 48384 <_Thread_blocking_operation_Cancel> 48ec6: 4fef 000c lea %sp@(12),%sp
}
48eca: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48ed0: 4e5e unlk %fp 48ed2: 4e75 rts
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
48ed4: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
48ed8: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
48ede: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
48ee2: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48ee6: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
48eea: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
48eee: 486a 0048 pea %a2@(72) 48ef2: 4879 0006 1504 pea 61504 <_Watchdog_Ticks_chain> 48ef8: 4eb9 0004 9aac jsr 49aac <_Watchdog_Insert> 48efe: 508f addql #8,%sp 48f00: 608e bras 48e90 <_Thread_queue_Enqueue_with_handler+0x28>
...
00050428 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
50428: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
5042e: 4e56 0000 linkw %fp,#0 50432: 2f0a movel %a2,%sp@- 50434: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
50438: 40c1 movew %sr,%d1 5043a: 8081 orl %d1,%d0 5043c: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
5043e: 202a 0010 movel %a2@(16),%d0 50442: 0280 0003 bee0 andil #245472,%d0
50448: 6734 beqs 5047e <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5044a: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
5044c: 7002 moveq #2,%d0
previous = the_node->previous;
5044e: 226a 0004 moveal %a2@(4),%a1
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
50452: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
50456: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
50458: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
5045c: b0aa 0050 cmpl %a2@(80),%d0
50460: 6726 beqs 50488 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
50462: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
50464: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
50468: 246e fffc moveal %fp@(-4),%a2 5046c: 203c 1003 fff8 movel #268697592,%d0 50472: 2d40 000c movel %d0,%fp@(12) 50476: 4e5e unlk %fp 50478: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
5047e: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
50480: 246e fffc moveal %fp@(-4),%a2 50484: 4e5e unlk %fp 50486: 4e75 rts 50488: 7003 moveq #3,%d0 5048a: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
5048e: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
50490: 486a 0048 pea %a2@(72) 50494: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 5049a: 588f addql #4,%sp 5049c: 203c 1003 fff8 movel #268697592,%d0 504a2: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
504a6: 246e fffc moveal %fp@(-4),%a2 504aa: 2d40 000c movel %d0,%fp@(12) 504ae: 4e5e unlk %fp 504b0: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
0004db44 <_Thread_queue_Extract_priority_helper>:
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4db44: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4db4a: 4e56 ffec linkw %fp,#-20 4db4e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4db52: 246e 000c moveal %fp@(12),%a2 4db56: 142e 0013 moveb %fp@(19),%d2
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4db5a: 40c1 movew %sr,%d1 4db5c: 8081 orl %d1,%d0 4db5e: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4db60: 202a 0010 movel %a2@(16),%d0 4db64: 0280 0003 bee0 andil #245472,%d0
4db6a: 677e beqs 4dbea <_Thread_queue_Extract_priority_helper+0xa6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4db6c: 200a movel %a2,%d0 4db6e: 0680 0000 003c addil #60,%d0
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4db74: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4db76: 226a 0004 moveal %a2@(4),%a1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4db7a: 206a 0038 moveal %a2@(56),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4db7e: b088 cmpl %a0,%d0
4db80: 6774 beqs 4dbf6 <_Thread_queue_Extract_priority_helper+0xb2>
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;
4db82: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4db86: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4db88: 2748 0004 movel %a0,%a3@(4)
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4db8c: 2288 movel %a0,%a1@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4db8e: 2149 0004 movel %a1,%a0@(4)
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
4db92: 208b movel %a3,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4db94: 202a 0040 movel %a2@(64),%d0 4db98: b0aa 0038 cmpl %a2@(56),%d0
4db9c: 6716 beqs 4dbb4 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
new_second_node->previous =
4db9e: 43e8 0038 lea %a0@(56),%a1 4dba2: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
4dba6: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4dbaa: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4dbae: 41e8 003c lea %a0@(60),%a0 4dbb2: 2888 movel %a0,%a4@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4dbb4: 4a02 tstb %d2
4dbb6: 6626 bnes 4dbde <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4dbb8: 7002 moveq #2,%d0 4dbba: b0aa 0050 cmpl %a2@(80),%d0
4dbbe: 6742 beqs 4dc02 <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4dbc0: 46c1 movew %d1,%sr 4dbc2: 2d4a 0008 movel %a2,%fp@(8) 4dbc6: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dbcc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbd2: 2d49 000c movel %a1,%fp@(12) 4dbd6: 4e5e unlk %fp 4dbd8: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4dbde: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dbe0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbe6: 4e5e unlk %fp 4dbe8: 4e75 rts
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 );
4dbea: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dbec: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbf2: 4e5e unlk %fp 4dbf4: 4e75 rts
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
4dbf6: 2749 0004 movel %a1,%a3@(4)
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
4dbfa: 228b movel %a3,%a1@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4dbfc: 4a02 tstb %d2
4dbfe: 67b8 beqs 4dbb8 <_Thread_queue_Extract_priority_helper+0x74>
4dc00: 60dc bras 4dbde <_Thread_queue_Extract_priority_helper+0x9a> 4dc02: 7003 moveq #3,%d0 4dc04: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4dc08: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4dc0a: 486a 0048 pea %a2@(72) 4dc0e: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4dc14: 588f addql #4,%sp 4dc16: 227c 1003 fff8 moveal #268697592,%a1 4dc1c: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dc20: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dc26: 2d49 000c movel %a1,%fp@(12) 4dc2a: 4e5e unlk %fp 4dc2c: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
000490e4 <_Thread_queue_Initialize>:
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
490e4: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
490e6: 4e56 0000 linkw %fp,#0 490ea: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
490ee: 216e 0010 0038 movel %fp@(16),%a0@(56)
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
490f4: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
490f8: 216e 0014 003c movel %fp@(20),%a0@(60)
States_Control state,
uint32_t timeout_status
)
{
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
490fe: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49102: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49106: b280 cmpl %d0,%d1
49108: 6712 beqs 4911c <_Thread_queue_Initialize+0x38>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4910a: 2008 movel %a0,%d0 4910c: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4910e: 2148 0008 movel %a0,%a0@(8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49112: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
49114: 42a8 0004 clrl %a0@(4)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
49118: 4e5e unlk %fp 4911a: 4e75 rts
* timeout_status - return on a timeout
*
* Output parameters: NONE
*/
void _Thread_queue_Initialize(
4911c: 2008 movel %a0,%d0 4911e: 0680 0000 0030 addil #48,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49124: 2208 movel %a0,%d1 49126: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
49128: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4912c: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4912e: 2148 0008 movel %a0,%a0@(8) 49132: 41e8 000c lea %a0@(12),%a0
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49136: b088 cmpl %a0,%d0
49138: 67de beqs 49118 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4913a: 2208 movel %a0,%d1 4913c: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
4913e: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49142: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49144: 2148 0008 movel %a0,%a0@(8) 49148: 41e8 000c lea %a0@(12),%a0 4914c: b088 cmpl %a0,%d0
4914e: 66d4 bnes 49124 <_Thread_queue_Initialize+0x40>
49150: 60c6 bras 49118 <_Thread_queue_Initialize+0x34>
...
00049154 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
49154: 4e56 fff0 linkw %fp,#-16 49158: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4915c: 246e 0008 moveal %fp@(8),%a2 49160: 266e 000c moveal %fp@(12),%a3
/* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue )
49164: 4a8a tstl %a2
49166: 6708 beqs 49170 <_Thread_queue_Requeue+0x1c> <== 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 ) {
49168: 7001 moveq #1,%d0 4916a: b0aa 0034 cmpl %a2@(52),%d0
4916e: 670a beqs 4917a <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
49170: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49176: 4e5e unlk %fp <== NOT EXECUTED 49178: 4e75 rts <== 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 );
4917a: 303c 0700 movew #1792,%d0 4917e: 40c2 movew %sr,%d2 49180: 8082 orl %d2,%d0 49182: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49184: 202b 0010 movel %a3@(16),%d0 49188: 0280 0003 bee0 andil #245472,%d0
4918e: 660c bnes 4919c <_Thread_queue_Requeue+0x48> <== 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 );
49190: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
49192: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49198: 4e5e unlk %fp 4919a: 4e75 rts
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 );
4919c: 4878 0001 pea 1 <ADD> 491a0: 7001 moveq #1,%d0 491a2: 2f0b movel %a3,%sp@- 491a4: 2540 0030 movel %d0,%a2@(48) 491a8: 2f0a movel %a2,%sp@- 491aa: 4eb9 0004 db44 jsr 4db44 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
491b0: 486e fffc pea %fp@(-4) 491b4: 2f0b movel %a3,%sp@- 491b6: 2f0a movel %a2,%sp@- 491b8: 4eb9 0004 8f04 jsr 48f04 <_Thread_queue_Enqueue_priority> 491be: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
491c2: 46c2 movew %d2,%sr 491c4: 60cc bras 49192 <_Thread_queue_Requeue+0x3e>
...
000491c8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
491c8: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
491cc: 486e fffc pea %fp@(-4) 491d0: 2f2e 0008 movel %fp@(8),%sp@- 491d4: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
491da: 508f addql #8,%sp 491dc: 4aae fffc tstl %fp@(-4)
491e0: 6618 bnes 491fa <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
491e2: 2f00 movel %d0,%sp@- 491e4: 4eb9 0004 dc34 jsr 4dc34 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
491ea: 588f addql #4,%sp 491ec: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 491f2: 5380 subql #1,%d0 491f4: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
491fa: 4e5e unlk %fp
...
00059e24 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59e24: 4e56 ffb0 linkw %fp,#-80 59e28: 41ee ffec lea %fp@(-20),%a0 59e2c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59e30: 246e 0008 moveal %fp@(8),%a2 59e34: 2c0e movel %fp,%d6 59e36: 260e movel %fp,%d3 59e38: 5186 subql #8,%d6 59e3a: 0683 ffff ffe8 addil #-24,%d3
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e40: 240a movel %a2,%d2
/*
* 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 );
59e42: 2a0a movel %a2,%d5 59e44: 4bf9 0005 e184 lea 5e184 <_Watchdog_Adjust_to_chain>,%a5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e4a: 0682 0000 0030 addil #48,%d2
/*
* 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 );
59e50: 0685 0000 0068 addil #104,%d5 59e56: 47f9 0005 a908 lea 5a908 <_Chain_Get>,%a3 59e5c: 49f9 0005 e214 lea 5e214 <_Watchdog_Insert>,%a4
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59e62: 283c 0000 0700 movel #1792,%d4 59e68: 2d48 ffd8 movel %a0,%fp@(-40)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
59e6c: 41ea 0008 lea %a2@(8),%a0 59e70: 2d48 ffe0 movel %a0,%fp@(-32)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59e74: 41ea 0040 lea %a2@(64),%a0 59e78: 2d48 ffe4 movel %a0,%fp@(-28)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
59e7c: 41ee fff4 lea %fp@(-12),%a0 59e80: 2d48 fffc movel %a0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e84: 41ee ffec lea %fp@(-20),%a0 59e88: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
59e8c: 42ae fff8 clrl %fp@(-8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e90: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
59e94: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
59e98: 2d43 fff0 movel %d3,%fp@(-16)
{
/*
* 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;
59e9c: 41ee fff4 lea %fp@(-12),%a0 59ea0: 2548 0078 movel %a0,%a2@(120)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
59ea4: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59eaa: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
59eae: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59eb2: 9081 subl %d1,%d0 59eb4: 2f03 movel %d3,%sp@- 59eb6: 2f00 movel %d0,%sp@- 59eb8: 2f02 movel %d2,%sp@- 59eba: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59ebc: 2039 0008 0d52 movel 80d52 <_TOD_Now>,%d0
/*
* 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 ) {
59ec2: 4fef 000c lea %sp@(12),%sp
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59ec6: 222a 0074 movel %a2@(116),%d1
/*
* 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 ) {
59eca: b280 cmpl %d0,%d1 59ecc: 6500 0086 bcsw 59f54 <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
59ed0: b280 cmpl %d0,%d1 59ed2: 6200 00a4 bhiw 59f78 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59ed6: 2540 0074 movel %d0,%a2@(116)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59eda: 202a 0078 movel %a2@(120),%d0 59ede: 2f00 movel %d0,%sp@- 59ee0: 4e93 jsr %a3@
if ( timer == NULL ) {
59ee2: 588f addql #4,%sp 59ee4: 4a80 tstl %d0
59ee6: 672e beqs 59f16 <_Timer_server_Body+0xf2>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59ee8: 2040 moveal %d0,%a0 59eea: 7e01 moveq #1,%d7 59eec: 2228 0038 movel %a0@(56),%d1 59ef0: be81 cmpl %d1,%d7 59ef2: 6700 00a8 beqw 59f9c <_Timer_server_Body+0x178>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
59ef6: 7e03 moveq #3,%d7 59ef8: be81 cmpl %d1,%d7
59efa: 66de bnes 59eda <_Timer_server_Body+0xb6> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59efc: 2040 moveal %d0,%a0 59efe: 4868 0010 pea %a0@(16) 59f02: 2f05 movel %d5,%sp@- 59f04: 4e94 jsr %a4@
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59f06: 202a 0078 movel %a2@(120),%d0
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59f0a: 508f addql #8,%sp
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59f0c: 2f00 movel %d0,%sp@- 59f0e: 4e93 jsr %a3@
if ( timer == NULL ) {
59f10: 588f addql #4,%sp 59f12: 4a80 tstl %d0
59f14: 66d2 bnes 59ee8 <_Timer_server_Body+0xc4> <== NEVER TAKEN
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59f16: 2004 movel %d4,%d0 59f18: 40c1 movew %sr,%d1 59f1a: 8081 orl %d1,%d0 59f1c: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59f1e: bcae fff4 cmpl %fp@(-12),%d6 59f22: 6700 0086 beqw 59faa <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
59f26: 46c1 movew %d1,%sr <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
59f28: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59f2e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
59f32: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59f36: 9081 subl %d1,%d0 <== NOT EXECUTED 59f38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59f3a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59f3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59f3e: 4e95 jsr %a5@ <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59f40: 2039 0008 0d52 movel 80d52 <_TOD_Now>,%d0 <== NOT EXECUTED
/*
* 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 ) {
59f46: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59f4a: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED
/*
* 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 ) {
59f4e: b280 cmpl %d0,%d1 <== NOT EXECUTED 59f50: 6400 ff7e bccw 59ed0 <_Timer_server_Body+0xac> <== 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 );
59f54: 2f03 movel %d3,%sp@- 59f56: 2e00 movel %d0,%d7 59f58: 9e81 subl %d1,%d7 59f5a: 2f07 movel %d7,%sp@- 59f5c: 2d40 ffdc movel %d0,%fp@(-36) 59f60: 2f05 movel %d5,%sp@- 59f62: 4eb9 0005 e184 jsr 5e184 <_Watchdog_Adjust_to_chain> 59f68: 202e ffdc movel %fp@(-36),%d0 59f6c: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59f70: 2540 0074 movel %d0,%a2@(116) 59f74: 6000 ff64 braw 59eda <_Timer_server_Body+0xb6>
/*
* 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 );
59f78: 9280 subl %d0,%d1 59f7a: 2f01 movel %d1,%sp@- 59f7c: 4878 0001 pea 1 <ADD> 59f80: 2d40 ffdc movel %d0,%fp@(-36) 59f84: 2f05 movel %d5,%sp@- 59f86: 4eb9 0005 e0f0 jsr 5e0f0 <_Watchdog_Adjust> 59f8c: 202e ffdc movel %fp@(-36),%d0 59f90: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
59f94: 2540 0074 movel %d0,%a2@(116) 59f98: 6000 ff40 braw 59eda <_Timer_server_Body+0xb6>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59f9c: 4868 0010 pea %a0@(16) 59fa0: 2f02 movel %d2,%sp@- 59fa2: 4e94 jsr %a4@ 59fa4: 508f addql #8,%sp 59fa6: 6000 ff32 braw 59eda <_Timer_server_Body+0xb6>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
59faa: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
59fae: 46c1 movew %d1,%sr
_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 ) ) {
59fb0: 202e ffd8 movel %fp@(-40),%d0 59fb4: b0ae ffe8 cmpl %fp@(-24),%d0
59fb8: 6752 beqs 5a00c <_Timer_server_Body+0x1e8>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59fba: 2204 movel %d4,%d1 59fbc: 40c0 movew %sr,%d0 59fbe: 8280 orl %d0,%d1 59fc0: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59fc2: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59fc6: b1ee ffd8 cmpal %fp@(-40),%a0
59fca: 6732 beqs 59ffe <_Timer_server_Body+0x1da> <== NEVER TAKEN
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
59fcc: 2250 moveal %a0@,%a1
the_chain->first = new_first;
59fce: 2d49 ffe8 movel %a1,%fp@(-24)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
59fd2: 42a8 0008 clrl %a0@(8)
new_first->previous = _Chain_Head(the_chain);
59fd6: 2343 0004 movel %d3,%a1@(4)
_ISR_Enable( level );
59fda: 46c0 movew %d0,%sr
/*
* 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 );
59fdc: 2f28 0024 movel %a0@(36),%sp@- 59fe0: 2f28 0020 movel %a0@(32),%sp@- 59fe4: 2068 001c moveal %a0@(28),%a0 59fe8: 4e90 jsr %a0@
}
59fea: 508f addql #8,%sp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59fec: 2204 movel %d4,%d1 59fee: 40c0 movew %sr,%d0 59ff0: 8280 orl %d0,%d1 59ff2: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59ff4: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59ff8: b1ee ffd8 cmpal %fp@(-40),%a0
59ffc: 66ce bnes 59fcc <_Timer_server_Body+0x1a8>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59ffe: 46c0 movew %d0,%sr
{
/*
* 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;
5a000: 41ee fff4 lea %fp@(-12),%a0 5a004: 2548 0078 movel %a0,%a2@(120) 5a008: 6000 fe9a braw 59ea4 <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
5a00c: 4207 clrb %d7 5a00e: 1547 007c moveb %d7,%a2@(124) 5a012: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 5a018: 5280 addql #1,%d0 5a01a: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5a020: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5a024: 2f12 movel %a2@,%sp@- 5a026: 4eb9 0005 d808 jsr 5d808 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
5a02c: 2f0a movel %a2,%sp@- 5a02e: 4eba fd1c jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5a032: 2f0a movel %a2,%sp@- 5a034: 4eba fd80 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5a038: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
ts->active = true;
5a03e: 7001 moveq #1,%d0 5a040: 1540 007c moveb %d0,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5a044: 2f2e ffe0 movel %fp@(-32),%sp@- 5a048: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5a04e: 2f2e ffe4 movel %fp@(-28),%sp@- 5a052: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove> 5a058: 4fef 0018 lea %sp@(24),%sp 5a05c: 6000 fe3e braw 59e9c <_Timer_server_Body+0x78>
0005a060 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
5a060: 4e56 fff0 linkw %fp,#-16 5a064: 206e 000c moveal %fp@(12),%a0 5a068: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5a06c: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
5a070: 202a 0078 movel %a2@(120),%d0
5a074: 671a beqs 5a090 <_Timer_server_Schedule_operation_method+0x30>
* 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 );
5a076: 202a 0078 movel %a2@(120),%d0 5a07a: 2d48 000c movel %a0,%fp@(12)
} }
5a07e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
* 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 );
5a084: 2d40 0008 movel %d0,%fp@(8)
} }
5a088: 4e5e unlk %fp
* 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 );
5a08a: 4ef9 0005 a8a8 jmp 5a8a8 <_Chain_Append> 5a090: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 5a096: 5280 addql #1,%d0 5a098: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5a09e: 2028 0038 movel %a0@(56),%d0 5a0a2: 7201 moveq #1,%d1 5a0a4: b280 cmpl %d0,%d1 5a0a6: 6700 0088 beqw 5a130 <_Timer_server_Schedule_operation_method+0xd0>
_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 ) {
5a0aa: 7203 moveq #3,%d1 5a0ac: b280 cmpl %d0,%d1
5a0ae: 670e beqs 5a0be <_Timer_server_Schedule_operation_method+0x5e>
* 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 );
}
}
5a0b0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a0b6: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a0b8: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
} 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 );
5a0be: 203c 0000 0700 movel #1792,%d0 5a0c4: 40c2 movew %sr,%d2 5a0c6: 8082 orl %d2,%d0 5a0c8: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0ca: 260a movel %a2,%d3 5a0cc: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5a0d2: 2039 0008 0d52 movel 80d52 <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
5a0d8: 222a 0074 movel %a2@(116),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5a0dc: 226a 0068 moveal %a2@(104),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0e0: b689 cmpl %a1,%d3
5a0e2: 671a beqs 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5a0e4: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
5a0e8: b280 cmpl %d0,%d1 5a0ea: 6400 00b8 bccw 5a1a4 <_Timer_server_Schedule_operation_method+0x144>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
5a0ee: 2800 movel %d0,%d4 5a0f0: 9881 subl %d1,%d4
if (delta_interval > delta) {
5a0f2: b883 cmpl %d3,%d4 5a0f4: 6500 00ba bcsw 5a1b0 <_Timer_server_Schedule_operation_method+0x150>
5a0f8: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a0fa: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5a0fe: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5a102: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5a104: 4868 0010 pea %a0@(16) 5a108: 486a 0068 pea %a2@(104) 5a10c: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert>
if ( !ts->active ) {
5a112: 508f addql #8,%sp 5a114: 102a 007c moveb %a2@(124),%d0
5a118: 6696 bnes 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
5a11a: 2f0a movel %a2,%sp@- 5a11c: 4eba fc98 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>) 5a120: 588f addql #4,%sp
* 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 );
}
}
5a122: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a128: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a12a: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
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 );
5a130: 203c 0000 0700 movel #1792,%d0 5a136: 40c3 movew %sr,%d3 5a138: 8083 orl %d3,%d0 5a13a: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
5a13c: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0 5a142: 240a movel %a2,%d2 5a144: 0682 0000 0034 addil #52,%d2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
5a14a: 222a 003c movel %a2@(60),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5a14e: 226a 0030 moveal %a2@(48),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a152: b489 cmpl %a1,%d2
5a154: 6712 beqs 5a168 <_Timer_server_Schedule_operation_method+0x108>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5a156: 2800 movel %d0,%d4 5a158: 9881 subl %d1,%d4
delta_interval = first_watchdog->delta_interval;
5a15a: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
5a15e: b484 cmpl %d4,%d2
5a160: 623a bhis 5a19c <_Timer_server_Schedule_operation_method+0x13c>
5a162: 4282 clrl %d2
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a164: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
5a168: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
5a16c: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
5a16e: 4868 0010 pea %a0@(16) 5a172: 486a 0030 pea %a2@(48) 5a176: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert>
if ( !ts->active ) {
5a17c: 508f addql #8,%sp 5a17e: 102a 007c moveb %a2@(124),%d0 5a182: 6600 ff2c bnew 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
5a186: 2f0a movel %a2,%sp@- 5a188: 4eba fbc2 jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>) 5a18c: 588f addql #4,%sp
* 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 );
}
}
5a18e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a194: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a196: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
5a19c: 9484 subl %d4,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a19e: 2342 0010 movel %d2,%a1@(16) 5a1a2: 60c4 bras 5a168 <_Timer_server_Schedule_operation_method+0x108>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
5a1a4: d283 addl %d3,%d1
delta_interval += delta;
5a1a6: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
5a1a8: 2341 0010 movel %d1,%a1@(16) 5a1ac: 6000 ff50 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
5a1b0: 9684 subl %d4,%d3 5a1b2: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a1b4: 2341 0010 movel %d1,%a1@(16) 5a1b8: 6000 ff44 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
00049942 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49942: 4e56 fff0 linkw %fp,#-16 49946: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4994a: 242e 0008 movel %fp@(8),%d2 4994e: 262e 0010 movel %fp@(16),%d3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49952: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49958: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
4995c: b5fc 0006 15c0 cmpal #398784,%a2
49962: 6726 beqs 4998a <_User_extensions_Fatal+0x48> <== 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 );
49964: 0284 0000 00ff andil #255,%d4
!_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 )
4996a: 206a 0030 moveal %a2@(48),%a0 4996e: 4a88 tstl %a0
49970: 670c beqs 4997e <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
49972: 2f03 movel %d3,%sp@- 49974: 2f04 movel %d4,%sp@- 49976: 2f02 movel %d2,%sp@- 49978: 4e90 jsr %a0@ 4997a: 4fef 000c lea %sp@(12),%sp
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 ) {
4997e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49982: b5fc 0006 15c0 cmpal #398784,%a2
49988: 66e0 bnes 4996a <_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 );
}
}
4998a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
49990: 4e5e unlk %fp <== NOT EXECUTED
00049800 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
49800: 4e56 ffec linkw %fp,#-20
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49804: 203c 0006 15c4 movel #398788,%d0 4980a: 23c0 0006 15c0 movel %d0,615c0 <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49810: 203c 0006 15c0 movel #398784,%d0 49816: 23c0 0006 15c8 movel %d0,615c8 <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4981c: 203c 0006 1434 movel #398388,%d0 49822: 23c0 0006 1430 movel %d0,61430 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49828: 203c 0006 1430 movel #398384,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4982e: 42b9 0006 15c4 clrl 615c4 <_User_extensions_List+0x4> 49834: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
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;
49838: 2439 0005 fc8a movel 5fc8a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
4983e: 2639 0005 fc8e movel 5fc8e <Configuration+0x3a>,%d3 49844: 42b9 0006 1434 clrl 61434 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
4984a: 23c0 0006 1438 movel %d0,61438 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
49850: 4a83 tstl %d3
49852: 6764 beqs 498b8 <_User_extensions_Handler_initialization+0xb8>
extension = (User_extensions_Control *)
49854: 7834 moveq #52,%d4 49856: 4c02 4800 mulsl %d2,%d4 4985a: 2f04 movel %d4,%sp@- 4985c: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error> 49862: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
49864: 2f04 movel %d4,%sp@- 49866: 42a7 clrl %sp@- 49868: 2f00 movel %d0,%sp@- 4986a: 4eb9 0005 0e48 jsr 50e48 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49870: 4fef 0010 lea %sp@(16),%sp 49874: 4a82 tstl %d2
49876: 6740 beqs 498b8 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
49878: 4284 clrl %d4 4987a: 47f9 0004 de20 lea 4de20 <_User_extensions_Add_set>,%a3
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
49880: 2043 moveal %d3,%a0 49882: 5284 addql #1,%d4 49884: 0683 0000 0020 addil #32,%d3 4988a: 2558 0014 movel %a0@+,%a2@(20) 4988e: 2558 0018 movel %a0@+,%a2@(24) 49892: 2558 001c movel %a0@+,%a2@(28) 49896: 2558 0020 movel %a0@+,%a2@(32) 4989a: 2558 0024 movel %a0@+,%a2@(36) 4989e: 2558 0028 movel %a0@+,%a2@(40) 498a2: 2558 002c movel %a0@+,%a2@(44) 498a6: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
498aa: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
498ac: 45ea 0034 lea %a2@(52),%a2 498b0: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
498b2: 588f addql #4,%sp 498b4: b882 cmpl %d2,%d4
498b6: 65c8 bcss 49880 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
498b8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 498be: 4e5e unlk %fp
...
000498c4 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
498c4: 4e56 0000 linkw %fp,#0 498c8: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498ca: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
498d0: 2f02 movel %d2,%sp@- 498d2: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498d6: b5fc 0006 15c4 cmpal #398788,%a2
498dc: 6718 beqs 498f6 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
!_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 )
498de: 206a 0028 moveal %a2@(40),%a0 498e2: 4a88 tstl %a0
498e4: 6706 beqs 498ec <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
498e6: 2f02 movel %d2,%sp@- 498e8: 4e90 jsr %a0@ 498ea: 588f addql #4,%sp
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 ) {
498ec: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498ee: b5fc 0006 15c4 cmpal #398788,%a2
498f4: 66e8 bnes 498de <_User_extensions_Thread_begin+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
498f6: 242e fff8 movel %fp@(-8),%d2 498fa: 246e fffc moveal %fp@(-4),%a2
498fe: 4e5e unlk %fp <== NOT EXECUTED
00049994 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49994: 4e56 0000 linkw %fp,#0 49998: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
4999a: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
499a0: 2f02 movel %d2,%sp@- 499a2: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
499a6: b5fc 0006 15c4 cmpal #398788,%a2
499ac: 6722 beqs 499d0 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
!_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 ) {
499ae: 206a 0014 moveal %a2@(20),%a0 499b2: 4a88 tstl %a0
499b4: 6710 beqs 499c6 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
499b6: 2f02 movel %d2,%sp@- 499b8: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 499be: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
499c0: 508f addql #8,%sp 499c2: 4a00 tstb %d0
499c4: 670c beqs 499d2 <_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 ) {
499c6: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
499c8: b5fc 0006 15c4 cmpal #398788,%a2
499ce: 66de bnes 499ae <_User_extensions_Thread_create+0x1a>
499d0: 7001 moveq #1,%d0
return false;
}
}
return true;
}
499d2: 242e fff8 movel %fp@(-8),%d2 499d6: 246e fffc moveal %fp@(-4),%a2 499da: 4e5e unlk %fp
...
000499e0 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499e0: 4e56 0000 linkw %fp,#0 499e4: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499e6: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499ec: 2f02 movel %d2,%sp@- 499ee: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499f2: b5fc 0006 15c0 cmpal #398784,%a2
499f8: 6720 beqs 49a1a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN
!_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 )
499fa: 206a 0020 moveal %a2@(32),%a0 499fe: 4a88 tstl %a0
49a00: 670c beqs 49a0e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49a02: 2f02 movel %d2,%sp@- 49a04: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 49a0a: 4e90 jsr %a0@ 49a0c: 508f addql #8,%sp
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 ) {
49a0e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49a12: b5fc 0006 15c0 cmpal #398784,%a2
49a18: 66e0 bnes 499fa <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a1a: 242e fff8 movel %fp@(-8),%d2 49a1e: 246e fffc moveal %fp@(-4),%a2 49a22: 4e5e unlk %fp
...
00049902 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49902: 4e56 0000 linkw %fp,#0 49906: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49908: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
4990e: 2f02 movel %d2,%sp@- 49910: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49914: b5fc 0006 15c0 cmpal #398784,%a2
4991a: 671a beqs 49936 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN
!_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 )
4991c: 206a 002c moveal %a2@(44),%a0 49920: 4a88 tstl %a0
49922: 6706 beqs 4992a <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
49924: 2f02 movel %d2,%sp@- 49926: 4e90 jsr %a0@ 49928: 588f addql #4,%sp
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 ) {
4992a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
4992e: b5fc 0006 15c0 cmpal #398784,%a2
49934: 66e6 bnes 4991c <_User_extensions_Thread_exitted+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
49936: 242e fff8 movel %fp@(-8),%d2 4993a: 246e fffc moveal %fp@(-4),%a2
4993e: 4e5e unlk %fp <== NOT EXECUTED
0004a6c8 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6c8: 4e56 0000 linkw %fp,#0 4a6cc: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6ce: 2479 0006 2558 moveal 62558 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6d4: 2f02 movel %d2,%sp@- 4a6d6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6da: b5fc 0006 255c cmpal #402780,%a2
4a6e0: 671e beqs 4a700 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
!_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 )
4a6e2: 206a 001c moveal %a2@(28),%a0 4a6e6: 4a88 tstl %a0
4a6e8: 670c beqs 4a6f6 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a6ea: 2f02 movel %d2,%sp@- 4a6ec: 2f39 0006 247e movel 6247e <_Thread_Executing>,%sp@- 4a6f2: 4e90 jsr %a0@ 4a6f4: 508f addql #8,%sp
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 ) {
4a6f6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6f8: b5fc 0006 255c cmpal #402780,%a2
4a6fe: 66e2 bnes 4a6e2 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a700: 242e fff8 movel %fp@(-8),%d2 4a704: 246e fffc moveal %fp@(-4),%a2
4a708: 4e5e unlk %fp <== NOT EXECUTED
00049a28 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a28: 4e56 0000 linkw %fp,#0 49a2c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a2e: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a34: 2f02 movel %d2,%sp@- 49a36: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a3a: b5fc 0006 15c4 cmpal #398788,%a2
49a40: 671e beqs 49a60 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
!_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 )
49a42: 206a 0018 moveal %a2@(24),%a0 49a46: 4a88 tstl %a0
49a48: 670c beqs 49a56 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49a4a: 2f02 movel %d2,%sp@- 49a4c: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 49a52: 4e90 jsr %a0@ 49a54: 508f addql #8,%sp
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 ) {
49a56: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a58: b5fc 0006 15c4 cmpal #398788,%a2
49a5e: 66e2 bnes 49a42 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49a60: 242e fff8 movel %fp@(-8),%d2 49a64: 246e fffc moveal %fp@(-4),%a2
49a68: 4e5e unlk %fp <== NOT EXECUTED
00049a6c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49a6c: 4e56 fff4 linkw %fp,#-12 49a70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49a74: 262e 0008 movel %fp@(8),%d3 49a78: 242e 000c movel %fp@(12),%d2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49a7c: 2479 0006 1430 moveal 61430 <_User_extensions_Switches_list>,%a2 49a82: b5fc 0006 1434 cmpal #398388,%a2
49a88: 6716 beqs 49aa0 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
49a8a: 2f02 movel %d2,%sp@- 49a8c: 2f03 movel %d3,%sp@- 49a8e: 206a 0008 moveal %a2@(8),%a0 49a92: 4e90 jsr %a0@
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 ) {
49a94: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49a96: 508f addql #8,%sp 49a98: b5fc 0006 1434 cmpal #398388,%a2
49a9e: 66ea bnes 49a8a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49aa0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49aa6: 4e5e unlk %fp
...
0004b76c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b76c: 4e56 ffe8 linkw %fp,#-24 4b770: 226e 000c moveal %fp@(12),%a1 4b774: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b778: 283c 0000 0700 movel #1792,%d4 4b77e: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b780: 266e 0008 moveal %fp@(8),%a3 4b784: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b788: 40c1 movew %sr,%d1 4b78a: 8081 orl %d1,%d0 4b78c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b78e: 244b moveal %a3,%a2 4b790: 205a moveal %a2@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4b792: b5c8 cmpal %a0,%a2
4b794: 6748 beqs 4b7de <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b796: 4a89 tstl %a1
4b798: 6650 bnes 4b7ea <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b79a: 4a82 tstl %d2
4b79c: 6740 beqs 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b79e: 2628 0010 movel %a0@(16),%d3 4b7a2: 49f9 0004 b9e8 lea 4b9e8 <_Watchdog_Tickle>,%a4 4b7a8: b682 cmpl %d2,%d3
4b7aa: 622c bhis 4b7d8 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4b7ac: 7001 moveq #1,%d0 4b7ae: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b7b2: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b7b4: 2f0b movel %a3,%sp@- 4b7b6: 4e94 jsr %a4@
_ISR_Disable( level );
4b7b8: 2004 movel %d4,%d0 4b7ba: 40c1 movew %sr,%d1 4b7bc: 8081 orl %d1,%d0 4b7be: 46c0 movew %d0,%sr
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b7c0: 9483 subl %d3,%d2
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b7c2: 588f addql #4,%sp 4b7c4: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
4b7c6: 2040 moveal %d0,%a0 4b7c8: b08a cmpl %a2,%d0
4b7ca: 6712 beqs 4b7de <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b7cc: 4a82 tstl %d2
4b7ce: 670e beqs 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b7d0: 2628 0010 movel %a0@(16),%d3 4b7d4: b483 cmpl %d3,%d2
4b7d6: 64d4 bccs 4b7ac <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b7d8: 9682 subl %d2,%d3 4b7da: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7de: 46c1 movew %d1,%sr
}
4b7e0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b7e6: 4e5e unlk %fp 4b7e8: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b7ea: 7001 moveq #1,%d0 4b7ec: b089 cmpl %a1,%d0
4b7ee: 66ee bnes 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b7f0: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7f4: 46c1 movew %d1,%sr
}
4b7f6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b7fc: 4e5e unlk %fp <== NOT EXECUTED
0005e184 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
5e184: 4e56 ffe4 linkw %fp,#-28 5e188: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5e18c: 2a6e 0008 moveal %fp@(8),%a5 5e190: 282e 000c movel %fp@(12),%d4 5e194: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
5e198: 675e beqs 5e1f8 <_Watchdog_Adjust_to_chain+0x74>
return;
}
_ISR_Disable( level );
5e19a: 263c 0000 0700 movel #1792,%d3 5e1a0: 2003 movel %d3,%d0 5e1a2: 40c1 movew %sr,%d1 5e1a4: 8081 orl %d1,%d0 5e1a6: 46c0 movew %d0,%sr 5e1a8: 284d moveal %a5,%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5e1aa: 240b movel %a3,%d2 5e1ac: 5882 addql #4,%d2 5e1ae: 205c moveal %a4@+,%a0
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
5e1b0: b1cc cmpal %a4,%a0
5e1b2: 6742 beqs 5e1f6 <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
5e1b4: 2028 0010 movel %a0@(16),%d0 5e1b8: b880 cmpl %d0,%d4
5e1ba: 654c bcss 5e208 <_Watchdog_Adjust_to_chain+0x84>
/*
* 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;
5e1bc: 9880 subl %d0,%d4
first->delta_interval = 0;
5e1be: 42a8 0010 clrl %a0@(16)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5e1c2: 2250 moveal %a0@,%a1
previous = the_node->previous;
5e1c4: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5e1c8: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
5e1ca: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
5e1ce: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5e1d0: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5e1d4: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5e1d8: 2149 0004 movel %a1,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
5e1dc: 2288 movel %a0,%a1@
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
5e1de: 2003 movel %d3,%d0 5e1e0: 46c1 movew %d1,%sr 5e1e2: 8081 orl %d1,%d0 5e1e4: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5e1e6: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5e1e8: b1cc cmpal %a4,%a0
5e1ea: 6714 beqs 5e200 <_Watchdog_Adjust_to_chain+0x7c>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
5e1ec: 4aa8 0010 tstl %a0@(16)
5e1f0: 67d0 beqs 5e1c2 <_Watchdog_Adjust_to_chain+0x3e>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5e1f2: 4a84 tstl %d4
5e1f4: 66ba bnes 5e1b0 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5e1f6: 46c1 movew %d1,%sr
}
5e1f8: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5e1fc: 4e5e unlk %fp 5e1fe: 4e75 rts
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5e200: 204c moveal %a4,%a0
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5e202: 4a84 tstl %d4
5e204: 66aa bnes 5e1b0 <_Watchdog_Adjust_to_chain+0x2c>
5e206: 60ee bras 5e1f6 <_Watchdog_Adjust_to_chain+0x72>
/*
* 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;
5e208: 9084 subl %d4,%d0 5e20a: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5e20e: 46c1 movew %d1,%sr 5e210: 60e6 bras 5e1f8 <_Watchdog_Adjust_to_chain+0x74>
...
00049aac <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
49aac: 4e56 ffec linkw %fp,#-20 49ab0: 226e 000c moveal %fp@(12),%a1 49ab4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49ab8: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
49abc: 2a3c 0000 0700 movel #1792,%d5 49ac2: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49ac4: 2839 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d4
_ISR_Disable( level );
49aca: 40c3 movew %sr,%d3 49acc: 8083 orl %d3,%d0 49ace: 46c0 movew %d0,%sr
/*
* 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 ) {
49ad0: 4aa9 0008 tstl %a1@(8) 49ad4: 6600 00c6 bnew 49b9c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49ad8: 2039 0006 156c movel 6156c <_Watchdog_Sync_count>,%d0 49ade: 5280 addql #1,%d0 49ae0: 23c0 0006 156c movel %d0,6156c <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49ae6: 7001 moveq #1,%d0 49ae8: 2340 0008 movel %d0,%a1@(8)
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
49aec: 2029 000c movel %a1@(12),%d0
* cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
49af0: 2052 moveal %a2@,%a0
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49af2: 6764 beqs 49b58 <_Watchdog_Insert+0xac>
49af4: 4a90 tstl %a0@
49af6: 6760 beqs 49b58 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49af8: 2228 0010 movel %a0@(16),%d1 49afc: b280 cmpl %d0,%d1
49afe: 6252 bhis 49b52 <_Watchdog_Insert+0xa6>
* 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 );
49b00: 2405 movel %d5,%d2 49b02: 46c3 movew %d3,%sr 49b04: 8483 orl %d3,%d2 49b06: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b08: 7401 moveq #1,%d2 49b0a: b4a9 0008 cmpl %a1@(8),%d2
49b0e: 666e bnes 49b7e <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b10: 2439 0006 14e2 movel 614e2 <_Watchdog_Sync_level>,%d2 49b16: b484 cmpl %d4,%d2
49b18: 6230 bhis 49b4a <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b1a: 9081 subl %d1,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
49b1c: 2050 moveal %a0@,%a0
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b1e: 4a80 tstl %d0
49b20: 6736 beqs 49b58 <_Watchdog_Insert+0xac>
49b22: 4a90 tstl %a0@
49b24: 6732 beqs 49b58 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b26: 2228 0010 movel %a0@(16),%d1 49b2a: b081 cmpl %d1,%d0
49b2c: 6524 bcss 49b52 <_Watchdog_Insert+0xa6>
* 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 );
49b2e: 2405 movel %d5,%d2 49b30: 46c3 movew %d3,%sr 49b32: 8483 orl %d3,%d2 49b34: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b36: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b38: 7201 moveq #1,%d1 49b3a: b2a9 0008 cmpl %a1@(8),%d1
49b3e: 663e bnes 49b7e <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b40: 2239 0006 14e2 movel 614e2 <_Watchdog_Sync_level>,%d1 49b46: b284 cmpl %d4,%d1
49b48: 63d2 blss 49b1c <_Watchdog_Insert+0x70>
_Watchdog_Sync_level = insert_isr_nest_level;
49b4a: 23c4 0006 14e2 movel %d4,614e2 <_Watchdog_Sync_level>
goto restart;
49b50: 609a bras 49aec <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49b52: 9280 subl %d0,%d1 49b54: 2141 0010 movel %d1,%a0@(16)
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
49b58: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49b5c: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49b5e: 2450 moveal %a0@,%a2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49b60: 2239 0006 1570 movel 61570 <_Watchdog_Ticks_since_boot>,%d1
after_node->next = the_node;
49b66: 2089 movel %a1,%a0@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49b68: 2348 0004 movel %a0,%a1@(4) 49b6c: 2341 0014 movel %d1,%a1@(20)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49b70: 2340 0010 movel %d0,%a1@(16)
before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node;
49b74: 2549 0004 movel %a1,%a2@(4) 49b78: 2342 0008 movel %d2,%a1@(8)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
49b7c: 228a movel %a2,%a1@
_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;
49b7e: 23c4 0006 14e2 movel %d4,614e2 <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49b84: 2039 0006 156c movel 6156c <_Watchdog_Sync_count>,%d0 49b8a: 5380 subql #1,%d0 49b8c: 23c0 0006 156c movel %d0,6156c <_Watchdog_Sync_count>
_ISR_Enable( level );
49b92: 46c3 movew %d3,%sr
}
49b94: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49b98: 4e5e unlk %fp 49b9a: 4e75 rts
* 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 );
49b9c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49b9e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49ba2: 4e5e unlk %fp
...
00049bf4 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49bf4: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49bfa: 4e56 0000 linkw %fp,#0 49bfe: 206e 0008 moveal %fp@(8),%a0 49c02: 2f0a movel %a2,%sp@- 49c04: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c06: 40c1 movew %sr,%d1 49c08: 8081 orl %d1,%d0 49c0a: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49c0c: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49c10: 7401 moveq #1,%d2 49c12: b480 cmpl %d0,%d2
49c14: 6764 beqs 49c7a <_Watchdog_Remove+0x86>
49c16: 6314 blss 49c2c <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c18: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1 49c1e: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c22: 46c1 movew %d1,%sr
return( previous_state ); }
49c24: 241f movel %sp@+,%d2 49c26: 245f moveal %sp@+,%a2 49c28: 4e5e unlk %fp 49c2a: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49c2c: 143c 0003 moveb #3,%d2 49c30: b480 cmpl %d0,%d2
49c32: 65e4 bcss 49c18 <_Watchdog_Remove+0x24> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
49c34: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49c36: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49c3a: 4a91 tstl %a1@
49c3c: 6708 beqs 49c46 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49c3e: 2428 0010 movel %a0@(16),%d2 49c42: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49c46: 2479 0006 156c moveal 6156c <_Watchdog_Sync_count>,%a2 49c4c: 4a8a tstl %a2
49c4e: 670c beqs 49c5c <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49c50: 2479 0006 14c6 moveal 614c6 <_ISR_Nest_level>,%a2 49c56: 23ca 0006 14e2 movel %a2,614e2 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49c5c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49c60: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49c62: 234a 0004 movel %a2,%a1@(4)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c66: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1 49c6c: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c70: 46c1 movew %d1,%sr
return( previous_state ); }
49c72: 241f movel %sp@+,%d2 49c74: 245f moveal %sp@+,%a2 49c76: 4e5e unlk %fp 49c78: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c7a: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1
/*
* 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;
49c80: 42a8 0008 clrl %a0@(8)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c84: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c88: 46c1 movew %d1,%sr
return( previous_state ); }
49c8a: 241f movel %sp@+,%d2 49c8c: 245f moveal %sp@+,%a2 49c8e: 4e5e unlk %fp
...
0004b100 <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b100: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b106: 4e56 ffe8 linkw %fp,#-24 4b10a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b10e: 242e 0008 movel %fp@(8),%d2 4b112: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b116: 40c3 movew %sr,%d3 4b118: 8083 orl %d3,%d0 4b11a: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b11c: 2f0b movel %a3,%sp@- 4b11e: 4bf9 0004 49c0 lea 449c0 <printk>,%a5 4b124: 2f02 movel %d2,%sp@- 4b126: 4879 0006 0a88 pea 60a88 <_Status_Object_name_errors_to_status+0x14> 4b12c: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b12e: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4b130: 4fef 000c lea %sp@(12),%sp 4b134: b7ca cmpal %a2,%a3
4b136: 672c beqs 4b164 <_Watchdog_Report_chain+0x64>
4b138: 49f9 0004 b17c lea 4b17c <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b13e: 2f0a movel %a2,%sp@- 4b140: 42a7 clrl %sp@- 4b142: 4e94 jsr %a4@
_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 )
4b144: 2452 moveal %a2@,%a2
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
4b146: 508f addql #8,%sp 4b148: b7ca cmpal %a2,%a3
4b14a: 66f2 bnes 4b13e <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b14c: 2f02 movel %d2,%sp@- 4b14e: 4879 0006 0a9f pea 60a9f <_Status_Object_name_errors_to_status+0x2b> 4b154: 4e95 jsr %a5@ 4b156: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b158: 46c3 movew %d3,%sr
}
4b15a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b160: 4e5e unlk %fp 4b162: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b164: 4879 0006 0aae pea 60aae <_Status_Object_name_errors_to_status+0x3a> 4b16a: 4e95 jsr %a5@ 4b16c: 588f addql #4,%sp
}
_ISR_Enable( level );
4b16e: 46c3 movew %d3,%sr
}
4b170: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b176: 4e5e unlk %fp
...
00049c94 <_Watchdog_Tickle>:
* 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 );
49c94: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49c9a: 4e56 ffe8 linkw %fp,#-24 49c9e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49ca2: 286e 0008 moveal %fp@(8),%a4
* 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 );
49ca6: 40c2 movew %sr,%d2 49ca8: 8082 orl %d2,%d0 49caa: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
49cac: 264c moveal %a4,%a3 49cae: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49cb0: b7ca cmpal %a2,%a3
49cb2: 673e beqs 49cf2 <_Watchdog_Tickle+0x5e>
* 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) {
49cb4: 202a 0010 movel %a2@(16),%d0 49cb8: 4bf9 0004 9bf4 lea 49bf4 <_Watchdog_Remove>,%a5
49cbe: 6708 beqs 49cc8 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49cc0: 5380 subql #1,%d0 49cc2: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49cc6: 662a bnes 49cf2 <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49cc8: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49cce: 2f0a movel %a2,%sp@- 49cd0: 4e95 jsr %a5@
_ISR_Enable( level );
49cd2: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49cd4: 7202 moveq #2,%d1 49cd6: 588f addql #4,%sp 49cd8: b280 cmpl %d0,%d1
49cda: 6722 beqs 49cfe <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49cdc: 2003 movel %d3,%d0 49cde: 40c2 movew %sr,%d2 49ce0: 8082 orl %d2,%d0 49ce2: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49ce4: 2014 movel %a4@,%d0 49ce6: 2440 moveal %d0,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49ce8: b08b cmpl %a3,%d0
49cea: 6706 beqs 49cf2 <_Watchdog_Tickle+0x5e>
49cec: 4aaa 0010 tstl %a2@(16)
49cf0: 67dc beqs 49cce <_Watchdog_Tickle+0x3a>
leave:
_ISR_Enable(level);
49cf2: 46c2 movew %d2,%sr
}
49cf4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49cfa: 4e5e unlk %fp 49cfc: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49cfe: 2f2a 0024 movel %a2@(36),%sp@- 49d02: 2f2a 0020 movel %a2@(32),%sp@- 49d06: 206a 001c moveal %a2@(28),%a0 49d0a: 4e90 jsr %a0@ 49d0c: 508f addql #8,%sp 49d0e: 60cc bras 49cdc <_Watchdog_Tickle+0x48>
00049d78 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49d78: 4e56 0000 linkw %fp,#0 49d7c: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
49d7e: 2639 0005 fc58 movel 5fc58 <Configuration+0x4>,%d3
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49d84: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
49d86: 2439 0005 fc54 movel 5fc54 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
49d8c: 4a39 0005 fc7c tstb 5fc7c <Configuration+0x28>
49d92: 6628 bnes 49dbc <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
49d94: 4878 0004 pea 4 <CONTEXT_ARG> 49d98: 2f03 movel %d3,%sp@- 49d9a: 2f02 movel %d2,%sp@- 49d9c: 4879 0006 144e pea 6144e <_Workspace_Area> 49da2: 4eb9 0004 7738 jsr 47738 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
49da8: 4fef 0010 lea %sp@(16),%sp 49dac: 4a80 tstl %d0
49dae: 671e beqs 49dce <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
49db0: 242e fff8 movel %fp@(-8),%d2 49db4: 262e fffc movel %fp@(-4),%d3 49db8: 4e5e unlk %fp 49dba: 4e75 rts
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 );
49dbc: 2f03 movel %d3,%sp@- 49dbe: 42a7 clrl %sp@- 49dc0: 2f02 movel %d2,%sp@- 49dc2: 4eb9 0005 0e48 jsr 50e48 <memset> 49dc8: 4fef 000c lea %sp@(12),%sp 49dcc: 60c6 bras 49d94 <_Workspace_Handler_initialization+0x1c>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
49dce: 4878 0003 pea 3 <DIVIDE> 49dd2: 4878 0001 pea 1 <ADD> 49dd6: 42a7 clrl %sp@- 49dd8: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
00046648 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
46648: 4e56 ffec linkw %fp,#-20 4664c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46650: 246e 0008 moveal %fp@(8),%a2 46654: 266e 000c moveal %fp@(12),%a3
long adjustment;
/*
* Simple validations
*/
if ( !delta )
46658: 4a8a tstl %a2 4665a: 6700 00ec beqw 46748 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
4665e: 202a 0004 movel %a2@(4),%d0 46662: 0c80 000f 423f cmpil #999999,%d0 46668: 6200 00de bhiw 46748 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
4666c: 4a8b tstl %a3
4666e: 670a beqs 4667a <adjtime+0x32>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
46670: 42ab 0004 clrl %a3@(4) 46674: 202a 0004 movel %a2@(4),%d0
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
46678: 4293 clrl %a3@
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
4667a: 223c 000f 4240 movel #1000000,%d1 46680: 4c12 1800 mulsl %a2@,%d1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
46684: d081 addl %d1,%d0 46686: b0b9 0006 11a0 cmpl 611a0 <Configuration+0xc>,%d0
4668c: 640c bccs 4669a <adjtime+0x52>
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
4668e: 4280 clrl %d0
return 0;
}
46690: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46696: 4e5e unlk %fp 46698: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4669a: 2039 0006 2a94 movel 62a94 <_Thread_Dispatch_disable_level>,%d0 466a0: 5280 addql #1,%d0 466a2: 23c0 0006 2a94 movel %d0,62a94 <_Thread_Dispatch_disable_level>
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
466a8: 240e movel %fp,%d2 466aa: 5182 subql #8,%d2 466ac: 2f02 movel %d2,%sp@- 466ae: 4eb9 0004 8040 jsr 48040 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466b4: 202a 0004 movel %a2@(4),%d0 466b8: 223c 0000 03e8 movel #1000,%d1 466be: 4c01 0800 mulsl %d1,%d0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
466c2: 588f addql #4,%sp
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
466c4: 2212 movel %a2@,%d1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466c6: d0ae fffc addl %fp@(-4),%d0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
466ca: d3ae fff8 addl %d1,%fp@(-8)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466ce: 2d40 fffc movel %d0,%fp@(-4)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
466d2: 0c80 3b9a c9ff cmpil #999999999,%d0
466d8: 631c blss 466f6 <adjtime+0xae>
466da: 222e fff8 movel %fp@(-8),%d1
* 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(
466de: 5281 addql #1,%d1
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 ) {
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
466e0: 0680 c465 3600 addil #-1000000000,%d0
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 ) {
466e6: 0c80 3b9a c9ff cmpil #999999999,%d0
466ec: 62f0 bhis 466de <adjtime+0x96> <== NEVER TAKEN
466ee: 2d41 fff8 movel %d1,%fp@(-8) 466f2: 2d40 fffc movel %d0,%fp@(-4)
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) ) {
466f6: 0c80 c465 3600 cmpil #-1000000000,%d0
466fc: 621c bhis 4671a <adjtime+0xd2> <== NEVER TAKEN
466fe: 222e fff8 movel %fp@(-8),%d1
* 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(
46702: 5381 subql #1,%d1
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
46704: 0680 3b9a ca00 addil #1000000000,%d0
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) ) {
4670a: 0c80 c465 3600 cmpil #-1000000000,%d0
46710: 63f0 blss 46702 <adjtime+0xba>
46712: 2d40 fffc movel %d0,%fp@(-4) 46716: 2d41 fff8 movel %d1,%fp@(-8)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
4671a: 2f02 movel %d2,%sp@- 4671c: 4eb9 0004 810c jsr 4810c <_TOD_Set>
_Thread_Enable_dispatch();
46722: 4eb9 0004 936c jsr 4936c <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
46728: 588f addql #4,%sp 4672a: 4a8b tstl %a3 4672c: 6700 ff60 beqw 4668e <adjtime+0x46>
*olddelta = *delta;
46730: 4280 clrl %d0 46732: 2212 movel %a2@,%d1 46734: 242a 0004 movel %a2@(4),%d2 46738: 2681 movel %d1,%a3@ 4673a: 2742 0004 movel %d2,%a3@(4)
return 0;
}
4673e: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46744: 4e5e unlk %fp 46746: 4e75 rts
*/
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 );
46748: 4eb9 0005 1150 jsr 51150 <__errno> 4674e: 7216 moveq #22,%d1 46750: 2040 moveal %d0,%a0 46752: 70ff moveq #-1,%d0
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
46754: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3
*/
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 );
4675a: 2081 movel %d1,%a0@
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
4675c: 4e5e unlk %fp <== NOT EXECUTED
00048658 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
48658: 4e56 fff4 linkw %fp,#-12 4865c: 48d7 001c moveml %d2-%d4,%sp@ 48660: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
48664: 4ab9 0006 62b4 tstl 662b4 <_POSIX_signals_Alarm_timer+0x1c>
4866a: 674e beqs 486ba <alarm+0x62>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4866c: 4879 0006 6298 pea 66298 <_POSIX_signals_Alarm_timer> 48672: 4eb9 0004 d578 jsr 4d578 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
48678: 588f addql #4,%sp 4867a: 7201 moveq #1,%d1 4867c: 5580 subql #2,%d0 4867e: b280 cmpl %d0,%d1
48680: 645e bccs 486e0 <alarm+0x88>
48682: 4283 clrl %d3
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
48684: 4a82 tstl %d2
48686: 660c bnes 48694 <alarm+0x3c> <== NEVER TAKEN
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
48688: 2003 movel %d3,%d0 4868a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48690: 4e5e unlk %fp 48692: 4e75 rts
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48694: 4879 0006 6298 pea 66298 <_POSIX_signals_Alarm_timer> 4869a: 4879 0006 6600 pea 66600 <_Watchdog_Seconds_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
486a0: 23c2 0006 62a4 movel %d2,662a4 <_POSIX_signals_Alarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
486a6: 4eb9 0004 d430 jsr 4d430 <_Watchdog_Insert> 486ac: 508f addql #8,%sp 486ae: 2003 movel %d3,%d0 486b0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 486b6: 4e5e unlk %fp 486b8: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
486ba: 42b9 0006 62a0 clrl 662a0 <_POSIX_signals_Alarm_timer+0x8>
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
486c0: 4283 clrl %d3
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
486c2: 203c 0004 8704 movel #296708,%d0
the_watchdog->id = id;
486c8: 42b9 0006 62b8 clrl 662b8 <_POSIX_signals_Alarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
486ce: 23c0 0006 62b4 movel %d0,662b4 <_POSIX_signals_Alarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
486d4: 42b9 0006 62bc clrl 662bc <_POSIX_signals_Alarm_timer+0x24>
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
486da: 4a82 tstl %d2
486dc: 67aa beqs 48688 <alarm+0x30> <== NEVER TAKEN
486de: 60b4 bras 48694 <alarm+0x3c>
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
486e0: 2839 0006 62b0 movel 662b0 <_POSIX_signals_Alarm_timer+0x18>,%d4 486e6: 98b9 0006 62ac subl 662ac <_POSIX_signals_Alarm_timer+0x14>,%d4
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
486ec: 2639 0006 62a4 movel 662a4 <_POSIX_signals_Alarm_timer+0xc>,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
486f2: 4eb9 0004 afc0 jsr 4afc0 <TOD_TICKS_PER_SECOND_method>
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
486f8: 4c40 4004 remul %d0,%d4,%d4 486fc: 9684 subl %d4,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
486fe: 4a82 tstl %d2
48700: 6786 beqs 48688 <alarm+0x30> <== NEVER TAKEN
48702: 6090 bras 48694 <alarm+0x3c>
00046610 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
46610: 4e56 0000 linkw %fp,#0 46614: 202e 0008 movel %fp@(8),%d0 46618: 222e 000c movel %fp@(12),%d1 4661c: 2f02 movel %d2,%sp@-
if ( !tp )
4661e: 4a81 tstl %d1
46620: 6718 beqs 4663a <clock_gettime+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
46622: 7401 moveq #1,%d2 46624: b480 cmpl %d0,%d2
46626: 6752 beqs 4667a <clock_gettime+0x6a>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
46628: 7404 moveq #4,%d2 4662a: b480 cmpl %d0,%d2
4662c: 6738 beqs 46666 <clock_gettime+0x56> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
4662e: 7402 moveq #2,%d2 46630: b480 cmpl %d0,%d2
46632: 6732 beqs 46666 <clock_gettime+0x56>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
46634: 7203 moveq #3,%d1 46636: b280 cmpl %d0,%d1
46638: 6716 beqs 46650 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
4663a: 4eb9 0005 1618 jsr 51618 <__errno>
return 0;
}
46640: 242e fffc movel %fp@(-4),%d2
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46644: 2040 moveal %d0,%a0 46646: 7216 moveq #22,%d1 46648: 70ff moveq #-1,%d0
return 0;
}
4664a: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
4664c: 2081 movel %d1,%a0@
return 0;
}
4664e: 4e75 rts
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
46650: 4eb9 0005 1618 jsr 51618 <__errno> 46656: 7458 moveq #88,%d2 46658: 2040 moveal %d0,%a0 4665a: 70ff moveq #-1,%d0 4665c: 2082 movel %d2,%a0@
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4665e: 242e fffc movel %fp@(-4),%d2 46662: 4e5e unlk %fp 46664: 4e75 rts
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
46666: 2f01 movel %d1,%sp@- 46668: 4eb9 0004 87bc jsr 487bc <_TOD_Get_uptime_as_timespec>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4666e: 242e fffc movel %fp@(-4),%d2
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
46672: 588f addql #4,%sp
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
46674: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46676: 4e5e unlk %fp 46678: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
4667a: 2f01 movel %d1,%sp@- 4667c: 4eb9 0004 8720 jsr 48720 <_TOD_Get>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46682: 242e fffc movel %fp@(-4),%d2
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
46686: 588f addql #4,%sp
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
46688: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4668a: 4e5e unlk %fp
...
00046690 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
46690: 4e56 0000 linkw %fp,#0 46694: 202e 0008 movel %fp@(8),%d0 46698: 206e 000c moveal %fp@(12),%a0
if ( !tp )
4669c: 4a88 tstl %a0
4669e: 6712 beqs 466b2 <clock_settime+0x22> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
466a0: 7201 moveq #1,%d1 466a2: b280 cmpl %d0,%d1
466a4: 6730 beqs 466d6 <clock_settime+0x46>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
466a6: 7202 moveq #2,%d1 466a8: b280 cmpl %d0,%d1
466aa: 6718 beqs 466c4 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
466ac: 7203 moveq #3,%d1 466ae: b280 cmpl %d0,%d1
466b0: 6712 beqs 466c4 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
466b2: 4eb9 0005 1618 jsr 51618 <__errno> 466b8: 7216 moveq #22,%d1 466ba: 2040 moveal %d0,%a0 466bc: 70ff moveq #-1,%d0
return 0;
}
466be: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
466c0: 2081 movel %d1,%a0@
return 0;
}
466c2: 4e75 rts
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 );
466c4: 4eb9 0005 1618 jsr 51618 <__errno> 466ca: 7258 moveq #88,%d1 466cc: 2040 moveal %d0,%a0 466ce: 70ff moveq #-1,%d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
466d0: 4e5e unlk %fp
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 );
466d2: 2081 movel %d1,%a0@
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
466d4: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
466d6: 203c 21da e4ff movel #567993599,%d0 466dc: b090 cmpl %a0@,%d0
466de: 64d2 bccs 466b2 <clock_settime+0x22>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
466e0: 2039 0006 337c movel 6337c <_Thread_Dispatch_disable_level>,%d0 466e6: 5280 addql #1,%d0 466e8: 23c0 0006 337c movel %d0,6337c <_Thread_Dispatch_disable_level>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
466ee: 2f08 movel %a0,%sp@- 466f0: 4eb9 0004 8814 jsr 48814 <_TOD_Set>
_Thread_Enable_dispatch();
466f6: 4eb9 0004 9a74 jsr 49a74 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
466fc: 588f addql #4,%sp
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
466fe: 4280 clrl %d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46700: 4e5e unlk %fp <== NOT EXECUTED
0004f850 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
4f850: 4e56 ffd0 linkw %fp,#-48 4f854: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4f858: 262e 000c movel %fp@(12),%d3 4f85c: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
4f860: 4eb9 0004 be98 jsr 4be98 <getpid> 4f866: b0ae 0008 cmpl %fp@(8),%d0 4f86a: 6600 022c bnew 4fa98 <killinfo+0x248>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
4f86e: 4a83 tstl %d3 4f870: 6700 023e beqw 4fab0 <killinfo+0x260>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
4f874: 2003 movel %d3,%d0 4f876: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
4f878: 721f moveq #31,%d1 4f87a: b280 cmpl %d0,%d1 4f87c: 6500 0232 bcsw 4fab0 <killinfo+0x260>
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 )
4f880: 2203 movel %d3,%d1 4f882: 2803 movel %d3,%d4 4f884: 7e01 moveq #1,%d7 4f886: e589 lsll #2,%d1 4f888: e98c lsll #4,%d4 4f88a: 9881 subl %d1,%d4 4f88c: 2044 moveal %d4,%a0 4f88e: d1fc 0006 18d6 addal #399574,%a0 4f894: be90 cmpl %a0@,%d7 4f896: 6700 00d4 beqw 4f96c <killinfo+0x11c>
/* * 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 ) )
4f89a: 7208 moveq #8,%d1 4f89c: b283 cmpl %d3,%d1 4f89e: 6700 00d8 beqw 4f978 <killinfo+0x128> 4f8a2: 7e04 moveq #4,%d7 4f8a4: be83 cmpl %d3,%d7 4f8a6: 6700 00d0 beqw 4f978 <killinfo+0x128> 4f8aa: 123c 000b moveb #11,%d1 4f8ae: b283 cmpl %d3,%d1 4f8b0: 6700 00c6 beqw 4f978 <killinfo+0x128>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
4f8b4: 7401 moveq #1,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
4f8b6: 7e01 moveq #1,%d7 4f8b8: e1aa lsll %d0,%d2
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
4f8ba: 2d43 fff4 movel %d3,%fp@(-12)
siginfo->si_code = SI_USER;
4f8be: 2d47 fff8 movel %d7,%fp@(-8)
if ( !value ) {
4f8c2: 4a8a tstl %a2 4f8c4: 6700 01ca beqw 4fa90 <killinfo+0x240>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
4f8c8: 2d52 fffc movel %a2@,%fp@(-4)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4f8cc: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 4f8d2: 5280 addql #1,%d0 4f8d4: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
/*
* 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;
4f8da: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f8e0: 206a 010e moveal %a2@(270),%a0 4f8e4: 2028 00cc movel %a0@(204),%d0 4f8e8: 4680 notl %d0 4f8ea: c082 andl %d2,%d0
4f8ec: 6642 bnes 4f930 <killinfo+0xe0>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
4f8ee: 2079 0006 1a5a moveal 61a5a <_POSIX_signals_Wait_queue>,%a0 4f8f4: b1fc 0006 1a5e cmpal #399966,%a0 4f8fa: 6700 00ec beqw 4f9e8 <killinfo+0x198>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f8fe: 2002 movel %d2,%d0
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
4f900: 2448 moveal %a0,%a2
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f902: c0a8 0030 andl %a0@(48),%d0
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f906: 2268 010e moveal %a0@(270),%a1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f90a: 6624 bnes 4f930 <killinfo+0xe0>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
4f90c: 2029 00cc movel %a1@(204),%d0 4f910: 4680 notl %d0 4f912: c082 andl %d2,%d0
4f914: 661a bnes 4f930 <killinfo+0xe0>
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 ) {
4f916: 2050 moveal %a0@,%a0
the_thread = (Thread_Control *)the_node;
4f918: 2448 moveal %a0,%a2
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
4f91a: b1fc 0006 1a5e cmpal #399966,%a0 4f920: 6700 00c6 beqw 4f9e8 <killinfo+0x198>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f924: 2002 movel %d2,%d0 <== NOT EXECUTED 4f926: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f92a: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f92e: 67dc beqs 4f90c <killinfo+0xbc> <== NOT EXECUTED
* 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;
4f930: 7001 moveq #1,%d0 4f932: 1540 0074 moveb %d0,%a2@(116)
/*
* 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 ) ) {
4f936: 486e fff4 pea %fp@(-12) 4f93a: 2f03 movel %d3,%sp@- 4f93c: 2f0a movel %a2,%sp@- 4f93e: 4eb9 0004 fce0 jsr 4fce0 <_POSIX_signals_Unblock_thread> 4f944: 4fef 000c lea %sp@(12),%sp 4f948: 4a00 tstb %d0 4f94a: 6600 008a bnew 4f9d6 <killinfo+0x186>
/*
* 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 );
4f94e: 2f02 movel %d2,%sp@- 4f950: 4eb9 0004 fcb0 jsr 4fcb0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
4f956: 588f addql #4,%sp 4f958: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 4f95e: 7202 moveq #2,%d1 4f960: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1
4f964: 672e beqs 4f994 <killinfo+0x144>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
4f966: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f96c: 4280 clrl %d0
return 0; }
4f96e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f974: 4e5e unlk %fp 4f976: 4e75 rts
* 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 );
4f978: 4eb9 0004 ff88 jsr 4ff88 <pthread_self> 4f97e: 2f03 movel %d3,%sp@- 4f980: 2f00 movel %d0,%sp@- 4f982: 4eb9 0004 feac jsr 4feac <pthread_kill> 4f988: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4f98a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f990: 4e5e unlk %fp 4f992: 4e75 rts
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
4f994: 4879 0006 1a4e pea 61a4e <_POSIX_signals_Inactive_siginfo> 4f99a: 4eb9 0004 71d0 jsr 471d0 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
4f9a0: 588f addql #4,%sp
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
4f9a2: 2040 moveal %d0,%a0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
4f9a4: 4a80 tstl %d0 4f9a6: 6700 0120 beqw 4fac8 <killinfo+0x278>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
4f9aa: 216e fff4 0008 movel %fp@(-12),%a0@(8)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4f9b0: 0684 0006 1ac6 addil #400070,%d4
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
4f9b6: 216e fff8 000c movel %fp@(-8),%a0@(12) 4f9bc: 216e fffc 0010 movel %fp@(-4),%a0@(16)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4f9c2: 2f00 movel %d0,%sp@- 4f9c4: 2f04 movel %d4,%sp@- 4f9c6: 4eb9 0004 7170 jsr 47170 <_Chain_Append> 4f9cc: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
4f9ce: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f9d4: 6096 bras 4f96c <killinfo+0x11c>
/*
* 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();
4f9d6: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f9dc: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4f9de: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f9e4: 4e5e unlk %fp 4f9e6: 4e75 rts
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4f9e8: 4285 clrl %d5 4f9ea: 1a39 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d5 4f9f0: 49f9 0006 13ec lea 613ec <_Objects_Information_table+0x8>,%a4
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
4f9f6: 95ca subal %a2,%a2
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4f9f8: 5285 addql #1,%d5
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 ] )
4f9fa: 2054 moveal %a4@,%a0 4f9fc: 4a88 tstl %a0
4f9fe: 675e beqs 4fa5e <killinfo+0x20e>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
4fa00: 2068 0004 moveal %a0@(4),%a0
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
4fa04: 4286 clrl %d6 4fa06: 3c28 000e movew %a0@(14),%d6
object_table = the_info->local_table;
4fa0a: 2268 0018 moveal %a0@(24),%a1
for ( index = 1 ; index <= maximum ; index++ ) {
4fa0e: 4a86 tstl %d6
4fa10: 674c beqs 4fa5e <killinfo+0x20e>
4fa12: 5889 addql #4,%a1 4fa14: 7001 moveq #1,%d0
the_thread = (Thread_Control *) object_table[ index ];
4fa16: 2051 moveal %a1@,%a0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
4fa18: 5280 addql #1,%d0 4fa1a: 5889 addql #4,%a1
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
4fa1c: 4a88 tstl %a0
4fa1e: 673a beqs 4fa5a <killinfo+0x20a>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
4fa20: 2228 0014 movel %a0@(20),%d1 4fa24: ba81 cmpl %d1,%d5
4fa26: 6532 bcss 4fa5a <killinfo+0x20a>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4fa28: 2668 010e moveal %a0@(270),%a3 4fa2c: 2e2b 00cc movel %a3@(204),%d7 4fa30: 4687 notl %d7 4fa32: ce82 andl %d2,%d7
4fa34: 6724 beqs 4fa5a <killinfo+0x20a>
*
* 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 ) {
4fa36: ba81 cmpl %d1,%d5
4fa38: 621c bhis 4fa56 <killinfo+0x206>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
4fa3a: 2e2a 0010 movel %a2@(16),%d7
4fa3e: 671a beqs 4fa5a <killinfo+0x20a> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
4fa40: 2668 0010 moveal %a0@(16),%a3 4fa44: 4a8b tstl %a3
4fa46: 670e beqs 4fa56 <killinfo+0x206>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
4fa48: 0807 001c btst #28,%d7
4fa4c: 660c bnes 4fa5a <killinfo+0x20a>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
4fa4e: 2e0b movel %a3,%d7 4fa50: 0807 001c btst #28,%d7
4fa54: 6704 beqs 4fa5a <killinfo+0x20a>
4fa56: 2a01 movel %d1,%d5 4fa58: 2448 moveal %a0,%a2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
4fa5a: b086 cmpl %d6,%d0
4fa5c: 63b8 blss 4fa16 <killinfo+0x1c6>
4fa5e: 588c addql #4,%a4
* + 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++) {
4fa60: b9fc 0006 13f8 cmpal #398328,%a4
4fa66: 6692 bnes 4f9fa <killinfo+0x1aa>
}
}
}
}
if ( interested ) {
4fa68: 4a8a tstl %a2 4fa6a: 6700 fee2 beqw 4f94e <killinfo+0xfe>
* 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;
4fa6e: 7001 moveq #1,%d0 4fa70: 1540 0074 moveb %d0,%a2@(116)
/*
* 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 ) ) {
4fa74: 486e fff4 pea %fp@(-12) 4fa78: 2f03 movel %d3,%sp@- 4fa7a: 2f0a movel %a2,%sp@- 4fa7c: 4eb9 0004 fce0 jsr 4fce0 <_POSIX_signals_Unblock_thread> 4fa82: 4fef 000c lea %sp@(12),%sp 4fa86: 4a00 tstb %d0 4fa88: 6700 fec4 beqw 4f94e <killinfo+0xfe>
4fa8c: 6000 ff48 braw 4f9d6 <killinfo+0x186> <== NOT EXECUTED
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
4fa90: 42ae fffc clrl %fp@(-4) 4fa94: 6000 fe36 braw 4f8cc <killinfo+0x7c>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
4fa98: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fa9e: 7603 moveq #3,%d3 4faa0: 2040 moveal %d0,%a0 4faa2: 70ff moveq #-1,%d0 4faa4: 2083 movel %d3,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4faa6: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4faac: 4e5e unlk %fp 4faae: 4e75 rts
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
4fab0: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fab6: 7416 moveq #22,%d2 4fab8: 2040 moveal %d0,%a0 4faba: 70ff moveq #-1,%d0 4fabc: 2082 movel %d2,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fabe: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4fac4: 4e5e unlk %fp 4fac6: 4e75 rts
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();
4fac8: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
4face: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fad4: 720b moveq #11,%d1 4fad6: 2040 moveal %d0,%a0 4fad8: 70ff moveq #-1,%d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fada: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
4fae0: 2081 movel %d1,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fae2: 4e5e unlk %fp
...
0004bfd8 <mq_close>:
*/
int mq_close(
mqd_t mqdes
)
{
4bfd8: 4e56 fffc linkw %fp,#-4 4bfdc: 2f0a movel %a2,%sp@-
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(
4bfde: 486e fffc pea %fp@(-4) 4bfe2: 2f2e 0008 movel %fp@(8),%sp@- 4bfe6: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4bfec: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
if ( location == OBJECTS_LOCAL ) {
4bff2: 4fef 000c lea %sp@(12),%sp 4bff6: 2440 moveal %d0,%a2 4bff8: 4aae fffc tstl %fp@(-4)
4bffc: 6640 bnes 4c03e <mq_close+0x66> <== NEVER TAKEN
* First update the actual message queue to reflect this descriptor
* being disassociated. This may result in the queue being really
* deleted.
*/
the_mq = the_mq_fd->Queue;
4bffe: 206a 0010 moveal %a2@(16),%a0
the_mq->open_count -= 1;
4c002: 53a8 0016 subql #1,%a0@(22)
_POSIX_Message_queue_Delete( the_mq );
4c006: 2f08 movel %a0,%sp@- 4c008: 4eb9 0004 c054 jsr 4c054 <_POSIX_Message_queue_Delete>
/*
* Now close this file descriptor.
*/
_Objects_Close(
4c00e: 2f0a movel %a2,%sp@- 4c010: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c016: 4eb9 0004 f47c jsr 4f47c <_Objects_Close>
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 );
4c01c: 2f0a movel %a2,%sp@- 4c01e: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c024: 4eb9 0004 f724 jsr 4f724 <_Objects_Free>
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
4c02a: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
4c030: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close(
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return 0;
4c034: 4fef 0014 lea %sp@(20),%sp
_Objects_Close(
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
4c038: 4280 clrl %d0
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
4c03a: 4e5e unlk %fp 4c03c: 4e75 rts
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c03e: 4eb9 0005 80b0 jsr 580b0 <__errno>
}
4c044: 246e fff8 moveal %fp@(-8),%a2
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c048: 2040 moveal %d0,%a0 4c04a: 7209 moveq #9,%d1 4c04c: 70ff moveq #-1,%d0
}
4c04e: 4e5e unlk %fp
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c050: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
0004ab38 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
4ab38: 4e56 0000 linkw %fp,#0 4ab3c: 206e 0008 moveal %fp@(8),%a0 4ab40: 202e 000c movel %fp@(12),%d0 4ab44: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4ab46: 4a88 tstl %a0
4ab48: 672e beqs 4ab78 <pthread_attr_setschedpolicy+0x40>
4ab4a: 4a90 tstl %a0@
4ab4c: 672a beqs 4ab78 <pthread_attr_setschedpolicy+0x40>
return EINVAL;
switch ( policy ) {
4ab4e: 7204 moveq #4,%d1 4ab50: b280 cmpl %d0,%d1
4ab52: 640c bccs 4ab60 <pthread_attr_setschedpolicy+0x28>
return 0;
default:
return ENOTSUP;
}
}
4ab54: 241f movel %sp@+,%d2
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4ab56: 203c 0000 0086 movel #134,%d0
return 0;
default:
return ENOTSUP;
}
}
4ab5c: 4e5e unlk %fp 4ab5e: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4ab60: 123c 0001 moveb #1,%d1 4ab64: 7417 moveq #23,%d2 4ab66: e1a9 lsll %d0,%d1 4ab68: c282 andl %d2,%d1
4ab6a: 67e8 beqs 4ab54 <pthread_attr_setschedpolicy+0x1c><== NEVER TAKEN
return 0;
default:
return ENOTSUP;
}
}
4ab6c: 241f movel %sp@+,%d2 4ab6e: 4e5e unlk %fp
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
4ab70: 2140 0014 movel %d0,%a0@(20) 4ab74: 4280 clrl %d0
return 0;
default:
return ENOTSUP;
}
}
4ab76: 4e75 rts 4ab78: 241f movel %sp@+,%d2
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
4ab7a: 7016 moveq #22,%d0
default:
return ENOTSUP;
}
}
4ab7c: 4e5e unlk %fp <== NOT EXECUTED
0004ded4 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
4ded4: 4e56 0000 linkw %fp,#0 4ded8: 206e 0008 moveal %fp@(8),%a0 4dedc: 222e 000c movel %fp@(12),%d1
if ( !attr || !attr->is_initialized )
4dee0: 4a88 tstl %a0
4dee2: 6724 beqs 4df08 <pthread_attr_setstacksize+0x34> <== NEVER TAKEN
4dee4: 4a90 tstl %a0@
4dee6: 6720 beqs 4df08 <pthread_attr_setstacksize+0x34> <== NEVER TAKEN
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
4dee8: 2039 0006 1082 movel 61082 <rtems_minimum_stack_size>,%d0 4deee: d080 addl %d0,%d0 4def0: b280 cmpl %d0,%d1
4def2: 650a bcss 4defe <pthread_attr_setstacksize+0x2a>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4def4: 4280 clrl %d0
return 0; }
4def6: 4e5e unlk %fp
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4def8: 2141 0008 movel %d1,%a0@(8)
return 0; }
4defc: 4e75 rts
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
4defe: 2140 0008 movel %d0,%a0@(8) 4df02: 4280 clrl %d0
else
attr->stacksize = stacksize;
return 0;
}
4df04: 4e5e unlk %fp 4df06: 4e75 rts
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4df08: 7016 moveq #22,%d0
return 0; }
4df0a: 4e5e unlk %fp
...
00046ad4 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
46ad4: 4e56 ffe0 linkw %fp,#-32 46ad8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46adc: 246e 0008 moveal %fp@(8),%a2 46ae0: 262e 000c movel %fp@(12),%d3 46ae4: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
46ae8: 4a8a tstl %a2
46aea: 677a beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
if ( count == 0 )
46aec: 4a82 tstl %d2
46aee: 6776 beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
46af0: 4a83 tstl %d3 46af2: 6700 0090 beqw 46b84 <pthread_barrier_init+0xb0> 46af6: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46af8: 4a90 tstl %a0@
46afa: 676a beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
switch ( the_attr->process_shared ) {
46afc: 4aa8 0004 tstl %a0@(4)
46b00: 6664 bnes 46b66 <pthread_barrier_init+0x92> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46b02: 2039 0006 2b90 movel 62b90 <_Thread_Dispatch_disable_level>,%d0 46b08: 5280 addql #1,%d0
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
46b0a: 2d42 fffc movel %d2,%fp@(-4) 46b0e: 23c0 0006 2b90 movel %d0,62b90 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
46b14: 42ae fff8 clrl %fp@(-8)
* 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 *)
46b18: 4879 0006 2ed2 pea 62ed2 <_POSIX_Barrier_Information> 46b1e: 4eb9 0004 8eb8 jsr 48eb8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
46b24: 588f addql #4,%sp 46b26: 2640 moveal %d0,%a3 46b28: 4a80 tstl %d0
46b2a: 6746 beqs 46b72 <pthread_barrier_init+0x9e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46b2c: 486e fff8 pea %fp@(-8) 46b30: 486b 0010 pea %a3@(16) 46b34: 4eb9 0004 848c jsr 4848c <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46b3a: 202b 0008 movel %a3@(8),%d0 46b3e: 4281 clrl %d1 46b40: 2079 0006 2eea moveal 62eea <_POSIX_Barrier_Information+0x18>,%a0 46b46: 3200 movew %d0,%d1 46b48: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46b4c: 42ab 000c clrl %a3@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
46b50: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
46b52: 4eb9 0004 9bdc jsr 49bdc <_Thread_Enable_dispatch>
return 0;
46b58: 508f addql #8,%sp
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
46b5a: 4280 clrl %d0
return 0; }
46b5c: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b62: 4e5e unlk %fp 46b64: 4e75 rts
/* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0;
46b66: 7016 moveq #22,%d0
}
46b68: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b6e: 4e5e unlk %fp 46b70: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
46b72: 4eb9 0004 9bdc jsr 49bdc <_Thread_Enable_dispatch> 46b78: 700b moveq #11,%d0
* Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; }
46b7a: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b80: 4e5e unlk %fp 46b82: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
46b84: 260e movel %fp,%d3 46b86: 0683 ffff fff0 addil #-16,%d3 46b8c: 2f03 movel %d3,%sp@- 46b8e: 4eb9 0004 6a10 jsr 46a10 <pthread_barrierattr_init> 46b94: 588f addql #4,%sp 46b96: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46b98: 4a90 tstl %a0@ 46b9a: 6600 ff60 bnew 46afc <pthread_barrier_init+0x28>
46b9e: 60c6 bras 46b66 <pthread_barrier_init+0x92> <== NOT EXECUTED
00046540 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
46540: 4e56 0000 linkw %fp,#0 46544: 2f03 movel %d3,%sp@- 46546: 262e 000c movel %fp@(12),%d3 4654a: 2f02 movel %d2,%sp@- 4654c: 242e 0008 movel %fp@(8),%d2
/*
* 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 )
46550: 6754 beqs 465a6 <pthread_cleanup_push+0x66>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46552: 2039 0006 2638 movel 62638 <_Thread_Dispatch_disable_level>,%d0 46558: 5280 addql #1,%d0 4655a: 23c0 0006 2638 movel %d0,62638 <_Thread_Dispatch_disable_level>
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
46560: 4878 0010 pea 10 <INVALID_OPERATION> 46564: 4eb9 0004 ab54 jsr 4ab54 <_Workspace_Allocate>
if ( handler ) {
4656a: 588f addql #4,%sp 4656c: 4a80 tstl %d0
4656e: 6726 beqs 46596 <pthread_cleanup_push+0x56> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
46570: 2079 0006 26f2 moveal 626f2 <_Thread_Executing>,%a0 46576: 2228 010e movel %a0@(270),%d1
handler->routine = routine;
4657a: 2040 moveal %d0,%a0
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
4657c: 0681 0000 00e0 addil #224,%d1
handler->routine = routine;
46582: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
46586: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
4658a: 2f00 movel %d0,%sp@- 4658c: 2f01 movel %d1,%sp@- 4658e: 4eb9 0004 7f5c jsr 47f5c <_Chain_Append> 46594: 508f addql #8,%sp
} _Thread_Enable_dispatch(); }
46596: 242e fff8 movel %fp@(-8),%d2 4659a: 262e fffc movel %fp@(-4),%d3 4659e: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
465a0: 4ef9 0004 9678 jmp 49678 <_Thread_Enable_dispatch>
}
465a6: 242e fff8 movel %fp@(-8),%d2 465aa: 262e fffc movel %fp@(-4),%d3 465ae: 4e5e unlk %fp
...
00047404 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
47404: 4e56 0000 linkw %fp,#0 47408: 202e 000c movel %fp@(12),%d0 4740c: 2f0b movel %a3,%sp@- 4740e: 2f0a movel %a2,%sp@-
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
47410: 45f9 0006 13a2 lea 613a2 <_POSIX_Condition_variables_Default_attributes>,%a2 47416: 4a80 tstl %d0
47418: 6702 beqs 4741c <pthread_cond_init+0x18>
4741a: 2440 moveal %d0,%a2
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
4741c: 7001 moveq #1,%d0 4741e: b0aa 0004 cmpl %a2@(4),%d0
47422: 6704 beqs 47428 <pthread_cond_init+0x24> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
47424: 4a92 tstl %a2@
47426: 660e bnes 47436 <pthread_cond_init+0x32>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47428: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
4742c: 7016 moveq #22,%d0
}
4742e: 266e fffc moveal %fp@(-4),%a3 47432: 4e5e unlk %fp 47434: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47436: 2039 0006 3e7c movel 63e7c <_Thread_Dispatch_disable_level>,%d0 4743c: 5280 addql #1,%d0 4743e: 23c0 0006 3e7c movel %d0,63e7c <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
47444: 4879 0006 424a pea 6424a <_POSIX_Condition_variables_Information> 4744a: 4eb9 0004 9d98 jsr 49d98 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
47450: 588f addql #4,%sp 47452: 2640 moveal %d0,%a3 47454: 4a80 tstl %d0
47456: 6752 beqs 474aa <pthread_cond_init+0xa6>
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
47458: 42ab 0014 clrl %a3@(20)
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
4745c: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
47462: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f> 47466: 4878 0800 pea 800 <D_MAX_EXP+0x1> 4746a: 42a7 clrl %sp@- 4746c: 486b 0018 pea %a3@(24) 47470: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47476: 202b 0008 movel %a3@(8),%d0 4747a: 4281 clrl %d1 4747c: 2079 0006 4262 moveal 64262 <_POSIX_Condition_variables_Information+0x18>,%a0 47482: 3200 movew %d0,%d1 47484: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
47488: 42ab 000c clrl %a3@(12)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
4748c: 206e 0008 moveal %fp@(8),%a0 47490: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
47492: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
return 0;
}
47498: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
4749c: 4fef 0010 lea %sp@(16),%sp
0
);
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
474a0: 4280 clrl %d0
return 0;
}
474a2: 266e fffc moveal %fp@(-4),%a3 474a6: 4e5e unlk %fp 474a8: 4e75 rts
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
474aa: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474b0: 246e fff8 moveal %fp@(-8),%a2
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
474b4: 700c moveq #12,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474b6: 266e fffc moveal %fp@(-4),%a3 474ba: 4e5e unlk %fp
...
00047264 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
47264: 4e56 0000 linkw %fp,#0 47268: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
4726c: 4a88 tstl %a0
4726e: 670c beqs 4727c <pthread_condattr_destroy+0x18>
47270: 4a90 tstl %a0@
47272: 6708 beqs 4727c <pthread_condattr_destroy+0x18> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
47274: 4280 clrl %d0
return 0; }
47276: 4e5e unlk %fp
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
47278: 4290 clrl %a0@
return 0; }
4727a: 4e75 rts
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
4727c: 7016 moveq #22,%d0
}
4727e: 4e5e unlk %fp
...
0004fe90 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4fe90: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4fe94: 2f2e 0008 movel %fp@(8),%sp@- 4fe98: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 4fe9e: 4eb9 0004 fe20 jsr 4fe20 <_POSIX_Thread_Exit>
4fea4: 508f addql #8,%sp <== NOT EXECUTED
}
4fea6: 4e5e unlk %fp <== NOT EXECUTED
...
00048e18 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
48e18: 4e56 fff0 linkw %fp,#-16 48e1c: 48d7 1c00 moveml %a2-%a4,%sp@ 48e20: 266e 000c moveal %fp@(12),%a3 48e24: 246e 0010 moveal %fp@(16),%a2
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
48e28: 4a8b tstl %a3
48e2a: 676e beqs 48e9a <pthread_getschedparam+0x82> <== NEVER TAKEN
48e2c: 4a8a tstl %a2
48e2e: 676a beqs 48e9a <pthread_getschedparam+0x82> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
48e30: 486e fffc pea %fp@(-4) 48e34: 2f2e 0008 movel %fp@(8),%sp@- 48e38: 4879 0006 68d2 pea 668d2 <_POSIX_Threads_Information> 48e3e: 4eb9 0004 b468 jsr 4b468 <_Objects_Get>
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
48e44: 4fef 000c lea %sp@(12),%sp 48e48: 4aae fffc tstl %fp@(-4)
48e4c: 6640 bnes 48e8e <pthread_getschedparam+0x76>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48e4e: 2040 moveal %d0,%a0
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
param->sched_priority =
48e50: 4281 clrl %d1
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48e52: 2868 010e moveal %a0@(270),%a4
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
48e56: 204a moveal %a2,%a0 48e58: 43ec 0084 lea %a4@(132),%a1
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( policy )
*policy = api->schedpolicy;
48e5c: 26ac 0080 movel %a4@(128),%a3@
if ( param ) {
*param = api->schedparam;
param->sched_priority =
48e60: 1239 0006 4ee6 moveb 64ee6 <rtems_maximum_priority>,%d1
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
48e66: 20d9 movel %a1@+,%a0@+ 48e68: 20d9 movel %a1@+,%a0@+ 48e6a: 20d9 movel %a1@+,%a0@+ 48e6c: 20d9 movel %a1@+,%a0@+ 48e6e: 20d9 movel %a1@+,%a0@+ 48e70: 20d9 movel %a1@+,%a0@+ 48e72: 2091 movel %a1@,%a0@
param->sched_priority =
48e74: 2040 moveal %d0,%a0 48e76: 92a8 0014 subl %a0@(20),%d1 48e7a: 2481 movel %d1,%a2@
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
48e7c: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch>
break;
}
return ESRCH;
}
48e82: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4
if ( param ) {
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
48e88: 4280 clrl %d0
break;
}
return ESRCH;
}
48e8a: 4e5e unlk %fp 48e8c: 4e75 rts
if ( !policy || !param )
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
48e8e: 7003 moveq #3,%d0
break;
}
return ESRCH;
}
48e90: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48e96: 4e5e unlk %fp 48e98: 4e75 rts
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
48e9a: 7016 moveq #22,%d0
break;
}
return ESRCH;
}
48e9c: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48ea2: 4e5e unlk %fp
...
0004664c <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
4664c: 4e56 ffe4 linkw %fp,#-28 46650: 2039 0006 33bc movel 633bc <_Thread_Dispatch_disable_level>,%d0 46656: 5280 addql #1,%d0 46658: 23c0 0006 33bc movel %d0,633bc <_Thread_Dispatch_disable_level> 4665e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
* 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 );
46662: 4879 0006 3750 pea 63750 <_POSIX_Keys_Information> 46668: 4eb9 0004 8bf4 jsr 48bf4 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
4666e: 588f addql #4,%sp 46670: 2840 moveal %d0,%a4 46672: 4a80 tstl %d0 46674: 6700 0098 beqw 4670e <pthread_key_create+0xc2>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
46678: 45f9 0006 3378 lea 63378 <_Objects_Information_table+0x4>,%a2 4667e: 47ec 0018 lea %a4@(24),%a3 46682: 7601 moveq #1,%d3
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
46684: 4bf9 0004 ae88 lea 4ae88 <_Workspace_Allocate>,%a5
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4668a: 283c 0005 1c70 movel #334960,%d4
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
46690: 296e 000c 0010 movel %fp@(12),%a4@(16)
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
46696: 2052 moveal %a2@,%a0 46698: 4a88 tstl %a0
4669a: 6762 beqs 466fe <pthread_key_create+0xb2>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
4669c: 2068 0004 moveal %a0@(4),%a0 466a0: 4282 clrl %d2 466a2: 3428 000e movew %a0@(14),%d2 466a6: 5282 addql #1,%d2 466a8: e58a lsll #2,%d2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
466aa: 2f02 movel %d2,%sp@- 466ac: 4e95 jsr %a5@
if ( !table ) {
466ae: 588f addql #4,%sp 466b0: 4a80 tstl %d0
466b2: 676c beqs 46720 <pthread_key_create+0xd4>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
466b4: 2680 movel %d0,%a3@
memset( table, '\0', bytes_to_allocate );
466b6: 2044 moveal %d4,%a0
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
466b8: 5283 addql #1,%d3 466ba: 588a addql #4,%a2 466bc: 588b addql #4,%a3
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
466be: 2f02 movel %d2,%sp@- 466c0: 42a7 clrl %sp@- 466c2: 2f00 movel %d0,%sp@- 466c4: 4e90 jsr %a0@ 466c6: 4fef 000c lea %sp@(12),%sp
* 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;
466ca: 7005 moveq #5,%d0 466cc: b083 cmpl %d3,%d0
466ce: 66c6 bnes 46696 <pthread_key_create+0x4a> <== ALWAYS TAKEN
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
466d0: 202c 0008 movel %a4@(8),%d0 466d4: 4281 clrl %d1 466d6: 2079 0006 3768 moveal 63768 <_POSIX_Keys_Information+0x18>,%a0 466dc: 3200 movew %d0,%d1 466de: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
466e2: 42ac 000c clrl %a4@(12)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
466e6: 206e 0008 moveal %fp@(8),%a0 466ea: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
466ec: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch>
return 0;
}
466f2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
466f8: 4280 clrl %d0
return 0;
}
466fa: 4e5e unlk %fp 466fc: 4e75 rts
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
466fe: 4293 clrl %a3@
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
46700: 5283 addql #1,%d3 46702: 588a addql #4,%a2 46704: 588b addql #4,%a3
* 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;
46706: 7005 moveq #5,%d0 46708: b083 cmpl %d3,%d0
4670a: 668a bnes 46696 <pthread_key_create+0x4a> <== NEVER TAKEN
4670c: 60c2 bras 466d0 <pthread_key_create+0x84>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4670e: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch> 46714: 700b moveq #11,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46716: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4671c: 4e5e unlk %fp 4671e: 4e75 rts
#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;
46720: 2403 movel %d3,%d2 46722: 5382 subql #1,%d2
46724: 6718 beqs 4673e <pthread_key_create+0xf2>
46726: 47f9 0004 aea4 lea 4aea4 <_Workspace_Free>,%a3 4672c: 45f4 3c10 lea %a4@(00000010,%d3:l:4),%a2
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
46730: 2f12 movel %a2@,%sp@-
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
46732: 5382 subql #1,%d2 46734: 598a subql #4,%a2
_Workspace_Free( the_key->Values[ the_api ] );
46736: 4e93 jsr %a3@
#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;
46738: 588f addql #4,%sp 4673a: 4a82 tstl %d2
4673c: 66f2 bnes 46730 <pthread_key_create+0xe4>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
4673e: 2f0c movel %a4,%sp@- 46740: 4879 0006 3750 pea 63750 <_POSIX_Keys_Information> 46746: 4eb9 0004 8f2c jsr 48f2c <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
4674c: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch>
return ENOMEM;
46752: 508f addql #8,%sp
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
46754: 700c moveq #12,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46756: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4675c: 4e5e unlk %fp <== NOT EXECUTED
00046338 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
46338: 4e56 0000 linkw %fp,#0 4633c: 206e 0008 moveal %fp@(8),%a0 46340: 226e 000c moveal %fp@(12),%a1
if ( !attr )
46344: 4a88 tstl %a0
46346: 6712 beqs 4635a <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !attr->is_initialized )
46348: 4a90 tstl %a0@
4634a: 670e beqs 4635a <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !type )
4634c: 4a89 tstl %a1
4634e: 670a beqs 4635a <pthread_mutexattr_gettype+0x22> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
46350: 22a8 0010 movel %a0@(16),%a1@ 46354: 4280 clrl %d0
return 0; }
46356: 4e5e unlk %fp 46358: 4e75 rts
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
4635a: 7016 moveq #22,%d0
}
4635c: 4e5e unlk %fp <== NOT EXECUTED
000484b0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
484b0: 4e56 0000 linkw %fp,#0 484b4: 206e 0008 moveal %fp@(8),%a0 484b8: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
484bc: 4a88 tstl %a0
484be: 670a beqs 484ca <pthread_mutexattr_setpshared+0x1a>
484c0: 4a90 tstl %a0@
484c2: 6706 beqs 484ca <pthread_mutexattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
484c4: 7201 moveq #1,%d1 484c6: b280 cmpl %d0,%d1
484c8: 6406 bccs 484d0 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
484ca: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
484cc: 4e5e unlk %fp 484ce: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
484d0: 2140 0004 movel %d0,%a0@(4) 484d4: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
484d6: 4e5e unlk %fp
...
0004639c <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
4639c: 4e56 0000 linkw %fp,#0 463a0: 206e 0008 moveal %fp@(8),%a0 463a4: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
463a8: 4a88 tstl %a0
463aa: 670a beqs 463b6 <pthread_mutexattr_settype+0x1a>
463ac: 4a90 tstl %a0@
463ae: 6706 beqs 463b6 <pthread_mutexattr_settype+0x1a> <== NEVER TAKEN
return EINVAL;
switch ( type ) {
463b0: 7203 moveq #3,%d1 463b2: b280 cmpl %d0,%d1
463b4: 6406 bccs 463bc <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;
463b6: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
463b8: 4e5e unlk %fp 463ba: 4e75 rts
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
463bc: 2140 0010 movel %d0,%a0@(16) 463c0: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
463c2: 4e5e unlk %fp
...
0004713c <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
4713c: 4e56 ffec linkw %fp,#-20 47140: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47144: 246e 0008 moveal %fp@(8),%a2 47148: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
4714c: 4a8a tstl %a2
4714e: 6766 beqs 471b6 <pthread_once+0x7a>
47150: 4a8b tstl %a3
47152: 6762 beqs 471b6 <pthread_once+0x7a>
return EINVAL;
if ( !once_control->init_executed ) {
47154: 4aaa 0004 tstl %a2@(4)
47158: 670c beqs 47166 <pthread_once+0x2a>
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);
4715a: 4280 clrl %d0
} return 0; }
4715c: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47162: 4e5e unlk %fp 47164: 4e75 rts
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);
47166: 240e movel %fp,%d2 47168: 5982 subql #4,%d2 4716a: 49f9 0004 7dfc lea 47dfc <rtems_task_mode>,%a4 47170: 2f02 movel %d2,%sp@- 47172: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 47176: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4717a: 4e94 jsr %a4@
if ( !once_control->init_executed ) {
4717c: 4fef 000c lea %sp@(12),%sp 47180: 4aaa 0004 tstl %a2@(4)
47184: 6714 beqs 4719a <pthread_once+0x5e> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
47186: 2f02 movel %d2,%sp@- 47188: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4718c: 2f2e fffc movel %fp@(-4),%sp@-
47190: 4e94 jsr %a4@ <== NOT EXECUTED 47192: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
47196: 4280 clrl %d0 47198: 60c2 bras 4715c <pthread_once+0x20>
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;
once_control->init_executed = true;
4719a: 7001 moveq #1,%d0 4719c: 2540 0004 movel %d0,%a2@(4)
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;
471a0: 2480 movel %d0,%a2@
once_control->init_executed = true;
(*init_routine)();
471a2: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
471a4: 2f02 movel %d2,%sp@- 471a6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 471aa: 2f2e fffc movel %fp@(-4),%sp@- 471ae: 4e94 jsr %a4@ 471b0: 4fef 000c lea %sp@(12),%sp 471b4: 60e0 bras 47196 <pthread_once+0x5a> 471b6: 7016 moveq #22,%d0
} return 0; }
471b8: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 471be: 4e5e unlk %fp
...
000473d0 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
473d0: 4e56 fffc linkw %fp,#-4 473d4: 206e 0008 moveal %fp@(8),%a0 473d8: 2f0a movel %a2,%sp@-
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
473da: 4a88 tstl %a0
473dc: 673e beqs 4741c <pthread_rwlock_destroy+0x4c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
473de: 486e fffc pea %fp@(-4) 473e2: 2f10 movel %a0@,%sp@- 473e4: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 473ea: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
473f0: 4fef 000c lea %sp@(12),%sp 473f4: 2440 moveal %d0,%a2 473f6: 4aae fffc tstl %fp@(-4)
473fa: 6620 bnes 4741c <pthread_rwlock_destroy+0x4c> <== NEVER TAKEN
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 ) {
473fc: 486a 0010 pea %a2@(16) 47400: 4eb9 0004 b3e0 jsr 4b3e0 <_Thread_queue_First> 47406: 588f addql #4,%sp 47408: 4a80 tstl %d0
4740a: 671a beqs 47426 <pthread_rwlock_destroy+0x56>
_Thread_Enable_dispatch();
4740c: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47412: 246e fff8 moveal %fp@(-8),%a2
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 ) {
_Thread_Enable_dispatch();
47416: 7010 moveq #16,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47418: 4e5e unlk %fp 4741a: 4e75 rts 4741c: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
47420: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47422: 4e5e unlk %fp 47424: 4e75 rts
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
47426: 2f0a movel %a2,%sp@- 47428: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 4742e: 4eb9 0004 9e88 jsr 49e88 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
47434: 2f0a movel %a2,%sp@- 47436: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 4743c: 4eb9 0004 a130 jsr 4a130 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
47442: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47448: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
4744c: 4fef 0010 lea %sp@(16),%sp
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
47450: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47452: 4e5e unlk %fp
...
00047458 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
47458: 4e56 ffe8 linkw %fp,#-24 4745c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47460: 246e 0008 moveal %fp@(8),%a2 47464: 242e 000c movel %fp@(12),%d2
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
47468: 4a8a tstl %a2
4746a: 676e beqs 474da <pthread_rwlock_init+0x82>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
4746c: 4a82 tstl %d2 4746e: 6700 0088 beqw 474f8 <pthread_rwlock_init+0xa0> 47472: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
47474: 4a90 tstl %a0@
47476: 6762 beqs 474da <pthread_rwlock_init+0x82> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
47478: 4aa8 0004 tstl %a0@(4)
4747c: 665c bnes 474da <pthread_rwlock_init+0x82> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4747e: 2039 0006 4170 movel 64170 <_Thread_Dispatch_disable_level>,%d0 47484: 5280 addql #1,%d0 47486: 23c0 0006 4170 movel %d0,64170 <_Thread_Dispatch_disable_level>
* 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 *)
4748c: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 47492: 4eb9 0004 9df8 jsr 49df8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
47498: 588f addql #4,%sp 4749a: 2640 moveal %d0,%a3 4749c: 4a80 tstl %d0
4749e: 6746 beqs 474e6 <pthread_rwlock_init+0x8e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
474a0: 486e fffc pea %fp@(-4) 474a4: 486b 0010 pea %a3@(16) 474a8: 4eb9 0004 9524 jsr 49524 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
474ae: 202b 0008 movel %a3@(8),%d0 474b2: 4281 clrl %d1 474b4: 2079 0006 4334 moveal 64334 <_POSIX_RWLock_Information+0x18>,%a0 474ba: 3200 movew %d0,%d1 474bc: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
474c0: 42ab 000c clrl %a3@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
474c4: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
474c6: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
return 0;
474cc: 508f addql #8,%sp
0
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
474ce: 4280 clrl %d0
return 0; }
474d0: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474d6: 4e5e unlk %fp 474d8: 4e75 rts
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
474da: 7016 moveq #22,%d0
}
474dc: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474e2: 4e5e unlk %fp 474e4: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
474e6: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch> 474ec: 700b moveq #11,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474ee: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474f4: 4e5e unlk %fp 474f6: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
474f8: 240e movel %fp,%d2 474fa: 0682 ffff fff4 addil #-12,%d2 47500: 2f02 movel %d2,%sp@- 47502: 4eb9 0004 7f90 jsr 47f90 <pthread_rwlockattr_init> 47508: 588f addql #4,%sp 4750a: 2042 moveal %d2,%a0 4750c: 6000 ff66 braw 47474 <pthread_rwlock_init+0x1c>
0004757c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4757c: 4e56 ffec linkw %fp,#-20 47580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47584: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
47588: 4a8a tstl %a2 4758a: 6700 0082 beqw 4760e <pthread_rwlock_timedrdlock+0x92>
* * 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 );
4758e: 486e fff8 pea %fp@(-8) 47592: 2f2e 000c movel %fp@(12),%sp@- 47596: 4eb9 0004 eb60 jsr 4eb60 <_POSIX_Absolute_timeout_to_ticks> 4759c: 486e fffc pea %fp@(-4) 475a0: 2400 movel %d0,%d2 475a2: 2f12 movel %a2@,%sp@- 475a4: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 475aa: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
475b0: 4fef 0014 lea %sp@(20),%sp 475b4: 4aae fffc tstl %fp@(-4)
475b8: 6654 bnes 4760e <pthread_rwlock_timedrdlock+0x92> 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,
475ba: 7203 moveq #3,%d1 475bc: b282 cmpl %d2,%d1 475be: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
475c0: 42a7 clrl %sp@- 475c2: 2f2e fff8 movel %fp@(-8),%sp@- 475c6: 4483 negl %d3 475c8: 4281 clrl %d1 475ca: 1203 moveb %d3,%d1 475cc: 2040 moveal %d0,%a0 475ce: 2f01 movel %d1,%sp@- 475d0: 2f12 movel %a2@,%sp@- 475d2: 4868 0010 pea %a0@(16) 475d6: 4eb9 0004 9558 jsr 49558 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
475dc: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
if ( !do_wait ) {
475e2: 4fef 0014 lea %sp@(20),%sp 475e6: 4a03 tstb %d3
475e8: 6644 bnes 4762e <pthread_rwlock_timedrdlock+0xb2>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
475ea: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 475f0: 7202 moveq #2,%d1 475f2: 2028 0034 movel %a0@(52),%d0 475f6: b280 cmpl %d0,%d1
475f8: 6720 beqs 4761a <pthread_rwlock_timedrdlock+0x9e>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
475fa: 2f00 movel %d0,%sp@- 475fc: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47602: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47604: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4760a: 4e5e unlk %fp 4760c: 4e75 rts
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4760e: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47610: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47616: 4e5e unlk %fp 47618: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4761a: 4a82 tstl %d2
4761c: 67f0 beqs 4760e <pthread_rwlock_timedrdlock+0x92><== NEVER TAKEN
4761e: b282 cmpl %d2,%d1
47620: 65d8 bcss 475fa <pthread_rwlock_timedrdlock+0x7e><== NEVER TAKEN
47622: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47624: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4762a: 4e5e unlk %fp 4762c: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4762e: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 47634: 2028 0034 movel %a0@(52),%d0
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47638: 2f00 movel %d0,%sp@- 4763a: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47640: 588f addql #4,%sp 47642: 60c0 bras 47604 <pthread_rwlock_timedrdlock+0x88>
00047644 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
47644: 4e56 ffec linkw %fp,#-20 47648: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4764c: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
47650: 4a8a tstl %a2 47652: 6700 0082 beqw 476d6 <pthread_rwlock_timedwrlock+0x92>
* * 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 );
47656: 486e fff8 pea %fp@(-8) 4765a: 2f2e 000c movel %fp@(12),%sp@- 4765e: 4eb9 0004 eb60 jsr 4eb60 <_POSIX_Absolute_timeout_to_ticks> 47664: 486e fffc pea %fp@(-4) 47668: 2400 movel %d0,%d2 4766a: 2f12 movel %a2@,%sp@- 4766c: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 47672: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
47678: 4fef 0014 lea %sp@(20),%sp 4767c: 4aae fffc tstl %fp@(-4)
47680: 6654 bnes 476d6 <pthread_rwlock_timedwrlock+0x92>
(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,
47682: 7203 moveq #3,%d1 47684: b282 cmpl %d2,%d1 47686: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
47688: 42a7 clrl %sp@- 4768a: 2f2e fff8 movel %fp@(-8),%sp@- 4768e: 4483 negl %d3 47690: 4281 clrl %d1 47692: 1203 moveb %d3,%d1 47694: 2040 moveal %d0,%a0 47696: 2f01 movel %d1,%sp@- 47698: 2f12 movel %a2@,%sp@- 4769a: 4868 0010 pea %a0@(16) 4769e: 4eb9 0004 9618 jsr 49618 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
476a4: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
if ( !do_wait &&
476aa: 4fef 0014 lea %sp@(20),%sp 476ae: 4a03 tstb %d3
476b0: 6644 bnes 476f6 <pthread_rwlock_timedwrlock+0xb2>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476b2: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476b8: 7202 moveq #2,%d1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476ba: 2028 0034 movel %a0@(52),%d0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476be: b280 cmpl %d0,%d1
476c0: 6720 beqs 476e2 <pthread_rwlock_timedwrlock+0x9e>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
476c2: 2f00 movel %d0,%sp@- 476c4: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 476ca: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476cc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476d2: 4e5e unlk %fp 476d4: 4e75 rts
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
476d6: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476d8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476de: 4e5e unlk %fp 476e0: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
476e2: 4a82 tstl %d2
476e4: 67f0 beqs 476d6 <pthread_rwlock_timedwrlock+0x92><== NEVER TAKEN
476e6: b282 cmpl %d2,%d1
476e8: 65d8 bcss 476c2 <pthread_rwlock_timedwrlock+0x7e><== NEVER TAKEN
476ea: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476ec: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476f2: 4e5e unlk %fp 476f4: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
476f6: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 476fc: 2028 0034 movel %a0@(52),%d0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47700: 2f00 movel %d0,%sp@- 47702: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47708: 588f addql #4,%sp 4770a: 60c0 bras 476cc <pthread_rwlock_timedwrlock+0x88>
00047fb0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
47fb0: 4e56 0000 linkw %fp,#0 47fb4: 206e 0008 moveal %fp@(8),%a0 47fb8: 202e 000c movel %fp@(12),%d0
if ( !attr )
47fbc: 4a88 tstl %a0
47fbe: 670a beqs 47fca <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
if ( !attr->is_initialized )
47fc0: 4a90 tstl %a0@
47fc2: 6706 beqs 47fca <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
47fc4: 7201 moveq #1,%d1 47fc6: b280 cmpl %d0,%d1
47fc8: 6406 bccs 47fd0 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
47fca: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
47fcc: 4e5e unlk %fp 47fce: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
47fd0: 2140 0004 movel %d0,%a0@(4) 47fd4: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
47fd6: 4e5e unlk %fp
...
000492c8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
492c8: 4e56 ffe0 linkw %fp,#-32 492cc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 492d0: 282e 000c movel %fp@(12),%d4 492d4: 242e 0010 movel %fp@(16),%d2
int rc;
/*
* Check all the parameters
*/
if ( !param )
492d8: 6700 00c4 beqw 4939e <pthread_setschedparam+0xd6>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
492dc: 486e fff8 pea %fp@(-8) 492e0: 486e fffc pea %fp@(-4) 492e4: 2f02 movel %d2,%sp@- 492e6: 2f04 movel %d4,%sp@- 492e8: 4eb9 0004 fea4 jsr 4fea4 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
492ee: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
492f2: 2600 movel %d0,%d3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
492f4: 670c beqs 49302 <pthread_setschedparam+0x3a>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
492f6: 2003 movel %d3,%d0 492f8: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 492fe: 4e5e unlk %fp 49300: 4e75 rts 49302: 486e fff4 pea %fp@(-12) 49306: 2f2e 0008 movel %fp@(8),%sp@- 4930a: 4879 0006 68d2 pea 668d2 <_POSIX_Threads_Information> 49310: 4eb9 0004 b468 jsr 4b468 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
49316: 4fef 000c lea %sp@(12),%sp 4931a: 2440 moveal %d0,%a2 4931c: 4aae fff4 tstl %fp@(-12) 49320: 6600 008a bnew 493ac <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
49324: 266a 010e moveal %a2@(270),%a3
if ( api->schedpolicy == SCHED_SPORADIC )
49328: 7004 moveq #4,%d0 4932a: b0ab 0080 cmpl %a3@(128),%d0 4932e: 6700 00ba beqw 493ea <pthread_setschedparam+0x122>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
49332: 2242 moveal %d2,%a1 49334: 41eb 0084 lea %a3@(132),%a0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
49338: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
4933c: 20d9 movel %a1@+,%a0@+ 4933e: 20d9 movel %a1@+,%a0@+ 49340: 20d9 movel %a1@+,%a0@+ 49342: 20d9 movel %a1@+,%a0@+ 49344: 20d9 movel %a1@+,%a0@+ 49346: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm;
49348: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
4934e: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
49350: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
49356: 4a84 tstl %d4
49358: 6d32 blts 4938c <pthread_setschedparam+0xc4> <== NEVER TAKEN
4935a: 7002 moveq #2,%d0 4935c: b084 cmpl %d4,%d0
4935e: 6d5c blts 493bc <pthread_setschedparam+0xf4>
49360: 4280 clrl %d0 49362: 1039 0006 4ee6 moveb 64ee6 <rtems_maximum_priority>,%d0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
49368: 41f9 0006 669c lea 6669c <_Thread_Ticks_per_timeslice>,%a0 4936e: 90ab 0084 subl %a3@(132),%d0 49372: 2550 0076 movel %a0@,%a2@(118)
the_thread->real_priority =
49376: 2540 0018 movel %d0,%a2@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
4937a: 4878 0001 pea 1 <ADD> 4937e: 2f00 movel %d0,%sp@- 49380: 2f0a movel %a2,%sp@- 49382: 4eb9 0004 b7d0 jsr 4b7d0 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
49388: 4fef 000c lea %sp@(12),%sp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
4938c: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
49392: 2003 movel %d3,%d0 49394: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4939a: 4e5e unlk %fp 4939c: 4e75 rts
int rc;
/*
* Check all the parameters
*/
if ( !param )
4939e: 7616 moveq #22,%d3
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
493a0: 2003 movel %d3,%d0 493a2: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 493a8: 4e5e unlk %fp 493aa: 4e75 rts
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
493ac: 163c 0003 moveb #3,%d3
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
493b0: 2003 movel %d3,%d0 493b2: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 493b8: 4e5e unlk %fp 493ba: 4e75 rts
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
493bc: 103c 0004 moveb #4,%d0 493c0: b084 cmpl %d4,%d0
493c2: 66c8 bnes 4938c <pthread_setschedparam+0xc4> <== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
493c4: 276b 0084 00a0 movel %a3@(132),%a3@(160)
_Watchdog_Remove( &api->Sporadic_timer );
493ca: 486b 00a4 pea %a3@(164) 493ce: 4eb9 0004 d170 jsr 4d170 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
493d4: 2f0a movel %a2,%sp@- 493d6: 42a7 clrl %sp@- 493d8: 4eb9 0004 920c jsr 4920c <_POSIX_Threads_Sporadic_budget_TSR> 493de: 4fef 000c lea %sp@(12),%sp
break;
}
_Thread_Enable_dispatch();
493e2: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch> 493e8: 60a8 bras 49392 <pthread_setschedparam+0xca>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
493ea: 486b 00a4 pea %a3@(164) 493ee: 4eb9 0004 d170 jsr 4d170 <_Watchdog_Remove>
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
493f4: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
493fa: 2242 moveal %d2,%a1 493fc: 41eb 0084 lea %a3@(132),%a0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
49400: 588f addql #4,%sp
api->schedpolicy = policy;
49402: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
49406: 20d9 movel %a1@+,%a0@+ 49408: 20d9 movel %a1@+,%a0@+ 4940a: 20d9 movel %a1@+,%a0@+ 4940c: 20d9 movel %a1@+,%a0@+ 4940e: 20d9 movel %a1@+,%a0@+ 49410: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
49412: 256e fff8 007e movel %fp@(-8),%a2@(126)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
49418: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
4941a: 4a84 tstl %d4 4941c: 6c00 ff3c bgew 4935a <pthread_setschedparam+0x92>
49420: 6000 ff6a braw 4938c <pthread_setschedparam+0xc4> <== NOT EXECUTED
0004e014 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
4e014: 4e56 0000 linkw %fp,#0 4e018: 202e 0008 movel %fp@(8),%d0 4e01c: 2f0b movel %a3,%sp@- 4e01e: 226e 000c moveal %fp@(12),%a1 4e022: 2f0a movel %a2,%sp@- 4e024: 246e 0010 moveal %fp@(16),%a2
POSIX_API_Control *api;
if ( !set && !oset )
4e028: 4a89 tstl %a1 4e02a: 6700 0096 beqw 4e0c2 <pthread_sigmask+0xae>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4e02e: 2679 0006 3436 moveal 63436 <_Thread_Executing>,%a3 4e034: 206b 010e moveal %a3@(270),%a0
if ( oset )
4e038: 4a8a tstl %a2
4e03a: 6708 beqs 4e044 <pthread_sigmask+0x30>
*oset = api->signals_blocked;
4e03c: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4e040: 4a89 tstl %a1
4e042: 6744 beqs 4e088 <pthread_sigmask+0x74> <== NEVER TAKEN
return 0;
switch ( how ) {
4e044: 7201 moveq #1,%d1 4e046: b280 cmpl %d0,%d1
4e048: 6770 beqs 4e0ba <pthread_sigmask+0xa6>
4e04a: 123c 0002 moveb #2,%d1 4e04e: b280 cmpl %d0,%d1
4e050: 6744 beqs 4e096 <pthread_sigmask+0x82>
4e052: 4a80 tstl %d0
4e054: 664a bnes 4e0a0 <pthread_sigmask+0x8c>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
4e056: 2151 00cc movel %a1@,%a0@(204)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
4e05a: 2039 0006 3a12 movel 63a12 <_POSIX_signals_Pending>,%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4e060: 2228 00cc movel %a0@(204),%d1 4e064: 4681 notl %d1
(api->signals_pending | _POSIX_signals_Pending) ) {
4e066: 80a8 00d0 orl %a0@(208),%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4e06a: c081 andl %d1,%d0
4e06c: 671a beqs 4e088 <pthread_sigmask+0x74>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
4e06e: 7201 moveq #1,%d1 4e070: 1741 0074 moveb %d1,%a3@(116)
_Thread_Dispatch();
4e074: 4eb9 0004 991c jsr 4991c <_Thread_Dispatch>
}
return 0;
}
4e07a: 246e fff8 moveal %fp@(-8),%a2
/* 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();
4e07e: 4280 clrl %d0
}
return 0;
}
4e080: 266e fffc moveal %fp@(-4),%a3 4e084: 4e5e unlk %fp 4e086: 4e75 rts 4e088: 246e fff8 moveal %fp@(-8),%a2
/* 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();
4e08c: 4280 clrl %d0
}
return 0;
}
4e08e: 266e fffc moveal %fp@(-4),%a3 4e092: 4e5e unlk %fp 4e094: 4e75 rts
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
4e096: 2011 movel %a1@,%d0 4e098: 4680 notl %d0 4e09a: c1a8 00cc andl %d0,%a0@(204)
break;
4e09e: 60ba bras 4e05a <pthread_sigmask+0x46>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0a0: 4eb9 0005 1618 jsr 51618 <__errno>
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0a6: 246e fff8 moveal %fp@(-8),%a2
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0aa: 2040 moveal %d0,%a0 4e0ac: 7216 moveq #22,%d1 4e0ae: 70ff moveq #-1,%d0
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0b0: 266e fffc moveal %fp@(-4),%a3 4e0b4: 4e5e unlk %fp
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0b6: 2081 movel %d1,%a0@
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0b8: 4e75 rts
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
4e0ba: 2011 movel %a1@,%d0 4e0bc: 81a8 00cc orl %d0,%a0@(204)
break;
4e0c0: 6098 bras 4e05a <pthread_sigmask+0x46>
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
4e0c2: 4a8a tstl %a2
4e0c4: 67da beqs 4e0a0 <pthread_sigmask+0x8c>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4e0c6: 2679 0006 3436 moveal 63436 <_Thread_Executing>,%a3 4e0cc: 206b 010e moveal %a3@(270),%a0
if ( oset )
*oset = api->signals_blocked;
4e0d0: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4e0d4: 4a89 tstl %a1 4e0d6: 6600 ff6c bnew 4e044 <pthread_sigmask+0x30> 4e0da: 60ac bras 4e088 <pthread_sigmask+0x74>
00046e2c <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
46e2c: 4e56 0000 linkw %fp,#0
* 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() )
46e30: 2039 0006 26d2 movel 626d2 <_ISR_Nest_level>,%d0
46e36: 663c bnes 46e74 <pthread_testcancel+0x48> <== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46e38: 2079 0006 26f2 moveal 626f2 <_Thread_Executing>,%a0 46e3e: 2039 0006 2638 movel 62638 <_Thread_Dispatch_disable_level>,%d0 46e44: 5280 addql #1,%d0 46e46: 2068 010e moveal %a0@(270),%a0 46e4a: 23c0 0006 2638 movel %d0,62638 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
46e50: 4aa8 00d4 tstl %a0@(212)
46e54: 6622 bnes 46e78 <pthread_testcancel+0x4c> <== NEVER TAKEN
thread_support->cancelation_requested )
46e56: 4aa8 00dc tstl %a0@(220)
46e5a: 671c beqs 46e78 <pthread_testcancel+0x4c>
cancel = true;
_Thread_Enable_dispatch();
46e5c: 4eb9 0004 9678 jsr 49678 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
46e62: 4878 ffff pea ffffffff <LESS> 46e66: 2f39 0006 26f2 movel 626f2 <_Thread_Executing>,%sp@- 46e6c: 4eb9 0004 d928 jsr 4d928 <_POSIX_Thread_Exit>
46e72: 508f addql #8,%sp <== NOT EXECUTED
}
46e74: 4e5e unlk %fp <== NOT EXECUTED 46e76: 4e75 rts <== NOT EXECUTED
46e78: 4e5e unlk %fp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46e7a: 4ef9 0004 9678 jmp 49678 <_Thread_Enable_dispatch>
0004cc44 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4cc44: 4e56 ffe8 linkw %fp,#-24 4cc48: 202e 0010 movel %fp@(16),%d0 4cc4c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cc50: 242e 0008 movel %fp@(8),%d2 4cc54: 262e 000c movel %fp@(12),%d3 4cc58: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4cc5c: 4a82 tstl %d2
4cc5e: 677a beqs 4ccda <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4cc60: 4a8a tstl %a2 4cc62: 6700 00ce beqw 4cd32 <rtems_barrier_create+0xee>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4cc66: 0803 0004 btst #4,%d3
4cc6a: 677a beqs 4cce6 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4cc6c: 4a80 tstl %d0 4cc6e: 6700 00b4 beqw 4cd24 <rtems_barrier_create+0xe0> 4cc72: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1 4cc78: 5281 addql #1,%d1
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4cc7a: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4cc7e: 2d40 fffc movel %d0,%fp@(-4) 4cc82: 23c1 0006 142c movel %d1,6142c <_Thread_Dispatch_disable_level>
* 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 );
4cc88: 4879 0006 1c6e pea 61c6e <_Barrier_Information> 4cc8e: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cc94: 588f addql #4,%sp 4cc96: 2640 moveal %d0,%a3 4cc98: 4a80 tstl %d0
4cc9a: 6776 beqs 4cd12 <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4cc9c: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4cca0: 486e fff8 pea %fp@(-8) 4cca4: 486b 0014 pea %a3@(20) 4cca8: 4eb9 0004 d36c jsr 4d36c <_CORE_barrier_Initialize> 4ccae: 202b 0008 movel %a3@(8),%d0 4ccb2: 4281 clrl %d1 4ccb4: 2079 0006 1c86 moveal 61c86 <_Barrier_Information+0x18>,%a0 4ccba: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4ccbc: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4ccc0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4ccc4: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4ccc6: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4cccc: 508f addql #8,%sp
(Objects_Name) name
);
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
4ccce: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4ccd0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ccd6: 4e5e unlk %fp 4ccd8: 4e75 rts
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4ccda: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4ccdc: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cce2: 4e5e unlk %fp 4cce4: 4e75 rts
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;
4cce6: 7201 moveq #1,%d1 4cce8: 2d41 fff8 movel %d1,%fp@(-8) 4ccec: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1 4ccf2: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4ccf4: 2d40 fffc movel %d0,%fp@(-4) 4ccf8: 23c1 0006 142c movel %d1,6142c <_Thread_Dispatch_disable_level> 4ccfe: 4879 0006 1c6e pea 61c6e <_Barrier_Information> 4cd04: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cd0a: 588f addql #4,%sp 4cd0c: 2640 moveal %d0,%a3 4cd0e: 4a80 tstl %d0
4cd10: 668a bnes 4cc9c <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4cd12: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4cd18: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd1a: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd20: 4e5e unlk %fp 4cd22: 4e75 rts
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 )
4cd24: 103c 000a moveb #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd28: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd2e: 4e5e unlk %fp 4cd30: 4e75 rts
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4cd32: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd34: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd3a: 4e5e unlk %fp
...
00046d26 <rtems_initialize_data_structures>:
#endif
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(void)
{
46d26: 4e56 0000 linkw %fp,#0 46d2a: 42b9 0006 15b4 clrl 615b4 <_System_state_Current>
#endif
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize();
46d30: 4eb9 0004 9ea4 jsr 49ea4 <_CPU_Initialize>
/*
* Do this as early as possible to ensure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
46d36: 4eb9 0004 d27c jsr 4d27c <_Debug_Manager_initialization>
_API_extensions_Initialization();
46d3c: 4eb9 0004 6fdc jsr 46fdc <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem.
*/
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
46d42: 7001 moveq #1,%d0 46d44: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
/*
* Before this is called, we are not allowed to allocate memory
* from the Workspace because it is not initialized.
*/
_Workspace_Handler_initialization();
46d4a: 4eb9 0004 9d78 jsr 49d78 <_Workspace_Handler_initialization>
_User_extensions_Handler_initialization();
46d50: 4eb9 0004 9800 jsr 49800 <_User_extensions_Handler_initialization>
_ISR_Handler_initialization();
46d56: 4eb9 0004 7b00 jsr 47b00 <_ISR_Handler_initialization>
/*
* Initialize the internal support API and allocator Mutex
*/
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
_API_Mutex_Initialization( 1 );
46d5c: 4878 0001 pea 1 <ADD>
_ISR_Handler_initialization();
/*
* Initialize the internal support API and allocator Mutex
*/
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
46d60: 203c 0006 1442 movel #398402,%d0 46d66: 23c0 0006 13e8 movel %d0,613e8 <_Objects_Information_table+0x4>
_API_Mutex_Initialization( 1 );
46d6c: 4eb9 0004 7110 jsr 47110 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
46d72: 4879 0006 14de pea 614de <_RTEMS_Allocator_Mutex> 46d78: 4eb9 0004 7078 jsr 47078 <_API_Mutex_Allocate>
#include <rtems/itron/itronapi.h>
#endif
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(void)
46d7e: 508f addql #8,%sp
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
int index;
_Priority_Major_bit_map = 0;
46d80: 41f9 0006 154c lea 6154c <_Priority_Bit_map>,%a0 46d86: 4240 clrw %d0 46d88: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
for ( index=0 ; index <16 ; index++ )
_Priority_Bit_map[ index ] = 0;
46d8e: 4258 clrw %a0@+
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
int index;
_Priority_Major_bit_map = 0;
for ( index=0 ; index <16 ; index++ )
46d90: b1fc 0006 156c cmpal #398700,%a0
46d96: 66f6 bnes 46d8e <rtems_initialize_data_structures+0x68>
_API_Mutex_Initialization( 1 );
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
_Priority_Handler_initialization();
_Watchdog_Handler_initialization();
46d98: 4eb9 0004 9ba8 jsr 49ba8 <_Watchdog_Handler_initialization>
_TOD_Handler_initialization();
46d9e: 4eb9 0004 7694 jsr 47694 <_TOD_Handler_initialization>
_Thread_Handler_initialization();
46da4: 4eb9 0004 8c28 jsr 48c28 <_Thread_Handler_initialization>
_MPCI_Handler_initialization( RTEMS_TIMEOUT );
#endif
/* MANAGERS */
_RTEMS_API_Initialize();
46daa: 4eb9 0004 6f88 jsr 46f88 <_RTEMS_API_Initialize>
_Extension_Manager_initialization();
46db0: 4eb9 0004 6e00 jsr 46e00 <_Extension_Manager_initialization>
_IO_Manager_initialization();
46db6: 4eb9 0004 6e7e jsr 46e7e <_IO_Manager_initialization>
#ifdef RTEMS_POSIX_API
_POSIX_API_Initialize();
46dbc: 4eb9 0004 6f34 jsr 46f34 <_POSIX_API_Initialize>
_Thread_Create_idle();
/*
* Scheduling can properly occur now as long as we avoid dispatching.
*/
}
46dc2: 4e5e unlk %fp 46dc4: 7001 moveq #1,%d0 46dc6: 23c0 0006 15b4 movel %d0,615b4 <_System_state_Current>
* _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle();
46dcc: 4ef9 0004 86c8 jmp 486c8 <_Thread_Create_idle>
...
00048394 <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
)
{
48394: 4e56 fff4 linkw %fp,#-12 48398: 226e 000c moveal %fp@(12),%a1 4839c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 483a0: 242e 0008 movel %fp@(8),%d2 483a4: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
483a8: 2039 0006 5d0e movel 65d0e <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
483ae: 2239 0006 54ee movel 654ee <_ISR_Nest_level>,%d1 483b4: 6600 009c bnew 48452 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
483b8: 4a8a tstl %a2 483ba: 6700 00ea beqw 484a6 <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
483be: 2480 movel %d0,%a2@
if ( driver_table == NULL )
483c0: 4a89 tstl %a1 483c2: 6700 00e2 beqw 484a6 <rtems_io_register_driver+0x112>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483c6: 4a91 tstl %a1@ 483c8: 6700 00d4 beqw 4849e <rtems_io_register_driver+0x10a>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
483cc: b480 cmpl %d0,%d2
483ce: 6476 bccs 48446 <rtems_io_register_driver+0xb2> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
483d0: 2039 0006 5454 movel 65454 <_Thread_Dispatch_disable_level>,%d0 483d6: 5280 addql #1,%d0 483d8: 23c0 0006 5454 movel %d0,65454 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
483de: 4a82 tstl %d2
483e0: 667c bnes 4845e <rtems_io_register_driver+0xca> <== NEVER TAKEN
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
483e2: 2039 0006 5d0e movel 65d0e <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483e8: 6700 00fc beqw 484e6 <rtems_io_register_driver+0x152> 483ec: 2239 0006 5d12 movel 65d12 <_IO_Driver_address_table>,%d1 483f2: 2041 moveal %d1,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483f4: 4a90 tstl %a0@ 483f6: 6700 008e beqw 48486 <rtems_io_register_driver+0xf2>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483fa: 5282 addql #1,%d2 483fc: 41e8 0018 lea %a0@(24),%a0 48400: b480 cmpl %d0,%d2
48402: 65f0 bcss 483f4 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
48404: 2482 movel %d2,%a2@
if ( m != n )
48406: b480 cmpl %d0,%d2 48408: 6700 00de beqw 484e8 <rtems_io_register_driver+0x154> 4840c: 2602 movel %d2,%d3 4840e: 2002 movel %d2,%d0 48410: 2041 moveal %d1,%a0 48412: e78b lsll #3,%d3 48414: eb88 lsll #5,%d0 48416: 9083 subl %d3,%d0 48418: d1c0 addal %d0,%a0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
4841a: 20d9 movel %a1@+,%a0@+ 4841c: 20d9 movel %a1@+,%a0@+ 4841e: 20d9 movel %a1@+,%a0@+ 48420: 20d9 movel %a1@+,%a0@+ 48422: 20d9 movel %a1@+,%a0@+ 48424: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48426: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4842c: 2d42 0008 movel %d2,%fp@(8)
}
48430: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48436: 42ae 0010 clrl %fp@(16) 4843a: 42ae 000c clrl %fp@(12)
}
4843e: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48440: 4ef9 0005 1650 jmp 51650 <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
48446: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4844e: 4e5e unlk %fp 48450: 4e75 rts
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
48452: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48454: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4845a: 4e5e unlk %fp 4845c: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
4845e: 2202 movel %d2,%d1 48460: 2002 movel %d2,%d0 48462: e789 lsll #3,%d1 48464: eb88 lsll #5,%d0 48466: 2079 0006 5d12 moveal 65d12 <_IO_Driver_address_table>,%a0 4846c: 9081 subl %d1,%d0 4846e: d1c0 addal %d0,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48470: 4a90 tstl %a0@
48472: 673e beqs 484b2 <rtems_io_register_driver+0x11e>
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();
48474: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 4847a: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4847c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48482: 4e5e unlk %fp 48484: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48486: 4aa8 0004 tstl %a0@(4) 4848a: 6700 ff78 beqw 48404 <rtems_io_register_driver+0x70>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
4848e: 5282 addql #1,%d2 48490: 41e8 0018 lea %a0@(24),%a0 48494: b480 cmpl %d0,%d2 48496: 6500 ff5c bcsw 483f4 <rtems_io_register_driver+0x60> 4849a: 6000 ff68 braw 48404 <rtems_io_register_driver+0x70>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
4849e: 4aa9 0004 tstl %a1@(4) 484a2: 6600 ff28 bnew 483cc <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484a6: 7009 moveq #9,%d0
}
484a8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484ae: 4e5e unlk %fp 484b0: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
484b2: 4aa8 0004 tstl %a0@(4)
484b6: 66bc bnes 48474 <rtems_io_register_driver+0xe0>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
484b8: 20d9 movel %a1@+,%a0@+ 484ba: 20d9 movel %a1@+,%a0@+ 484bc: 20d9 movel %a1@+,%a0@+ 484be: 20d9 movel %a1@+,%a0@+ 484c0: 20d9 movel %a1@+,%a0@+ 484c2: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
484c4: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
484c6: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
484cc: 2d42 0008 movel %d2,%fp@(8)
}
484d0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484d6: 42ae 0010 clrl %fp@(16) 484da: 42ae 000c clrl %fp@(12)
}
484de: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484e0: 4ef9 0005 1650 jmp 51650 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
484e6: 4292 clrl %a2@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
484e8: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 484ee: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484f0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484f6: 4e5e unlk %fp
...
0004953c <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)
{
4953c: 4e56 fff0 linkw %fp,#-16 49540: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49544: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
49548: 4a8b tstl %a3
4954a: 6744 beqs 49590 <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
4954c: 49f9 0006 4018 lea 64018 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
49552: 2054 moveal %a4@,%a0 49554: 4a88 tstl %a0
49556: 672e beqs 49586 <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
49558: 2468 0004 moveal %a0@(4),%a2
if ( !information )
4955c: 4a8a tstl %a2
4955e: 6726 beqs 49586 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49560: 4a6a 000e tstw %a2@(14)
49564: 6720 beqs 49586 <rtems_iterate_over_all_threads+0x4a>
49566: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
49568: 206a 0018 moveal %a2@(24),%a0 4956c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49570: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
49572: 4a80 tstl %d0
49574: 6706 beqs 4957c <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
49576: 2f00 movel %d0,%sp@- 49578: 4e93 jsr %a3@ 4957a: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4957c: 4280 clrl %d0 4957e: 302a 000e movew %a2@(14),%d0 49582: b480 cmpl %d0,%d2
49584: 63e2 blss 49568 <rtems_iterate_over_all_threads+0x2c>
49586: 588c addql #4,%a4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
49588: b9fc 0006 4028 cmpal #409640,%a4
4958e: 66c2 bnes 49552 <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
49590: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49596: 4e5e unlk %fp
...
00048148 <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
)
{
48148: 4e56 0000 linkw %fp,#0 4814c: 2f0a movel %a2,%sp@- 4814e: 246e 0010 moveal %fp@(16),%a2 48152: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
48154: 4a8a tstl %a2
48156: 6766 beqs 481be <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48158: 2f2e 000c movel %fp@(12),%sp@- 4815c: 2f2e 0008 movel %fp@(8),%sp@- 48160: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get_information>
if ( !obj_info )
48166: 508f addql #8,%sp
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48168: 2040 moveal %d0,%a0
if ( !obj_info )
4816a: 4a80 tstl %d0
4816c: 675e beqs 481cc <rtems_object_get_class_information+0x84>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
4816e: 24a8 0006 movel %a0@(6),%a2@
info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
48172: 4282 clrl %d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
48174: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
4817a: 3428 000e movew %a0@(14),%d2
/* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend;
4817e: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
48184: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
48188: 6750 beqs 481da <rtems_object_get_class_information+0x92><== NEVER TAKEN
4818a: 2068 0018 moveal %a0@(24),%a0 4818e: 7201 moveq #1,%d1 48190: 7001 moveq #1,%d0 48192: 93c9 subal %a1,%a1 48194: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
48196: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
4819a: 6718 beqs 481b4 <rtems_object_get_class_information+0x6c>
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++ )
4819c: 2200 movel %d0,%d1 4819e: b082 cmpl %d2,%d0
481a0: 63f2 blss 48194 <rtems_object_get_class_information+0x4c><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
481a2: 2549 000e movel %a1,%a2@(14) 481a6: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
481a8: 242e fff8 movel %fp@(-8),%d2 481ac: 246e fffc moveal %fp@(-4),%a2 481b0: 4e5e unlk %fp 481b2: 4e75 rts
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
481b4: 5289 addql #1,%a1
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++ )
481b6: 2200 movel %d0,%d1 481b8: b082 cmpl %d2,%d0
481ba: 63d8 blss 48194 <rtems_object_get_class_information+0x4c><== NEVER TAKEN
481bc: 60e4 bras 481a2 <rtems_object_get_class_information+0x5a>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481be: 242e fff8 movel %fp@(-8),%d2
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
481c2: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481c4: 246e fffc moveal %fp@(-4),%a2 481c8: 4e5e unlk %fp 481ca: 4e75 rts 481cc: 242e fff8 movel %fp@(-8),%d2
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
481d0: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481d2: 246e fffc moveal %fp@(-4),%a2 481d6: 4e5e unlk %fp 481d8: 4e75 rts
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++ )
481da: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
481dc: 4280 clrl %d0 <== NOT EXECUTED 481de: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 481e2: 60c4 bras 481a8 <rtems_object_get_class_information+0x60><== NOT EXECUTED
00057304 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57304: 4e56 ffe8 linkw %fp,#-24 57308: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5730c: 242e 0008 movel %fp@(8),%d2 57310: 2a2e 000c movel %fp@(12),%d5 57314: 282e 0010 movel %fp@(16),%d4 57318: 262e 0014 movel %fp@(20),%d3 5731c: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
57320: 4a82 tstl %d2
57322: 673a beqs 5735e <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57324: 4a85 tstl %d5
57326: 671e beqs 57346 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57328: 4a8a tstl %a2
5732a: 671a beqs 57346 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
5732c: 4a84 tstl %d4
5732e: 6722 beqs 57352 <rtems_partition_create+0x4e>
57330: 4a83 tstl %d3
57332: 671e beqs 57352 <rtems_partition_create+0x4e>
57334: b684 cmpl %d4,%d3
57336: 621a bhis 57352 <rtems_partition_create+0x4e>
57338: 7003 moveq #3,%d0 5733a: c083 andl %d3,%d0
5733c: 6614 bnes 57352 <rtems_partition_create+0x4e>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
5733e: 103c 0003 moveb #3,%d0 57342: c085 andl %d5,%d0
57344: 6724 beqs 5736a <rtems_partition_create+0x66>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57346: 7009 moveq #9,%d0
}
57348: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5734e: 4e5e unlk %fp 57350: 4e75 rts
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57352: 7008 moveq #8,%d0
}
57354: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5735a: 4e5e unlk %fp 5735c: 4e75 rts
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
5735e: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
57360: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 57366: 4e5e unlk %fp 57368: 4e75 rts 5736a: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 57370: 5280 addql #1,%d0 57372: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
* 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 );
57378: 4879 0008 0b4a pea 80b4a <_Partition_Information> 5737e: 4eb9 0005 becc jsr 5becc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
57384: 588f addql #4,%sp 57386: 2640 moveal %d0,%a3 57388: 4a80 tstl %d0
5738a: 675a beqs 573e6 <rtems_partition_create+0xe2>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
5738c: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57390: 2004 movel %d4,%d0
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
57392: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57398: 4c43 0000 remul %d3,%d0,%d0
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
5739c: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
573a0: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
573a4: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
573a8: 2f03 movel %d3,%sp@- 573aa: 2f00 movel %d0,%sp@- 573ac: 2f05 movel %d5,%sp@- 573ae: 486b 0024 pea %a3@(36) 573b2: 4eb9 0005 a944 jsr 5a944 <_Chain_Initialize> 573b8: 202b 0008 movel %a3@(8),%d0 573bc: 4281 clrl %d1 573be: 2079 0008 0b62 moveal 80b62 <_Partition_Information+0x18>,%a0 573c4: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
573c6: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
573ca: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
573ce: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573d0: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
573d6: 4fef 0010 lea %sp@(16),%sp
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573da: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
573dc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 573e2: 4e5e unlk %fp 573e4: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
573e6: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 573ec: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
573ee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
573f4: 4e5e unlk %fp <== NOT EXECUTED
00057518 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
57518: 4e56 fffc linkw %fp,#-4 5751c: 2f0a movel %a2,%sp@- 5751e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
57520: 486e fffc pea %fp@(-4) 57524: 2f2e 0008 movel %fp@(8),%sp@- 57528: 4879 0008 0b4a pea 80b4a <_Partition_Information> 5752e: 242e 000c movel %fp@(12),%d2 57532: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57538: 4fef 000c lea %sp@(12),%sp 5753c: 2440 moveal %d0,%a2 5753e: 4aae fffc tstl %fp@(-4)
57542: 670e beqs 57552 <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57544: 242e fff4 movel %fp@(-12),%d2
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57548: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5754a: 246e fff8 moveal %fp@(-8),%a2 5754e: 4e5e unlk %fp 57550: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
57552: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
57556: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
5755a: b082 cmpl %d2,%d0
5755c: 623c bhis 5759a <rtems_partition_return_buffer+0x82>
5755e: d280 addl %d0,%d1 57560: b282 cmpl %d2,%d1
57562: 6536 bcss 5759a <rtems_partition_return_buffer+0x82><== NEVER TAKEN
return (
57564: 2202 movel %d2,%d1 57566: 9280 subl %d0,%d1 57568: 2001 movel %d1,%d0 5756a: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 57570: 4a81 tstl %d1
57572: 6626 bnes 5759a <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
57574: 2f02 movel %d2,%sp@- 57576: 486a 0024 pea %a2@(36) 5757a: 4eb9 0005 a8a8 jsr 5a8a8 <_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;
57580: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
57584: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5758a: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
5758e: 508f addql #8,%sp
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
57590: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57592: 246e fff8 moveal %fp@(-8),%a2 57596: 4e5e unlk %fp 57598: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5759a: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a0: 242e fff4 movel %fp@(-12),%d2
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
575a4: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a6: 246e fff8 moveal %fp@(-8),%a2 575aa: 4e5e unlk %fp
...
00047798 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47798: 4e56 ffec linkw %fp,#-20 4779c: 48d7 040c moveml %d2-%d3/%a2,%sp@
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
477a0: 486e fffc pea %fp@(-4) 477a4: 242e 0008 movel %fp@(8),%d2 477a8: 2f02 movel %d2,%sp@- 477aa: 4879 0006 3474 pea 63474 <_Rate_monotonic_Information> 477b0: 4eb9 0004 9b4c jsr 49b4c <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
477b6: 4fef 000c lea %sp@(12),%sp 477ba: 2440 moveal %d0,%a2 477bc: 4aae fffc tstl %fp@(-4)
477c0: 661e bnes 477e0 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
477c2: 2039 0006 3632 movel 63632 <_Thread_Executing>,%d0 477c8: b0aa 0040 cmpl %a2@(64),%d0
477cc: 671e beqs 477ec <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
477ce: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 477d4: 7017 moveq #23,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477dc: 4e5e unlk %fp 477de: 4e75 rts
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
477e0: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477e2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477e8: 4e5e unlk %fp 477ea: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
477ec: 4aae 000c tstl %fp@(12) 477f0: 6700 00ce beqw 478c0 <rtems_rate_monotonic_period+0x128>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
477f4: 203c 0000 0700 movel #1792,%d0 477fa: 40c3 movew %sr,%d3 477fc: 8083 orl %d3,%d0 477fe: 46c0 movew %d0,%sr
switch ( the_period->state ) {
47800: 202a 0038 movel %a2@(56),%d0 47804: 7202 moveq #2,%d1 47806: b280 cmpl %d0,%d1 47808: 6700 00dc beqw 478e6 <rtems_rate_monotonic_period+0x14e> 4780c: 123c 0004 moveb #4,%d1 47810: b280 cmpl %d0,%d1
47812: 6762 beqs 47876 <rtems_rate_monotonic_period+0xde>
47814: 4a80 tstl %d0
47816: 66c8 bnes 477e0 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
47818: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
4781a: 2f0a movel %a2,%sp@- 4781c: 2d40 fff8 movel %d0,%fp@(-8) 47820: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47826: 223c 0004 7bfc movel #293884,%d1
the_watchdog->id = id;
4782c: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47830: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47834: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
47838: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4783a: 2542 001c movel %d2,%a2@(28) 4783e: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47842: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
47846: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4784a: 2542 003c movel %d2,%a2@(60)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4784e: 486a 0010 pea %a2@(16) 47852: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47858: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
4785e: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47864: 202e fff8 movel %fp@(-8),%d0 47868: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4786c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47872: 4e5e unlk %fp 47874: 4e75 rts
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
47876: 2f0a movel %a2,%sp@- 47878: 4eb9 0004 767e jsr 4767e <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
4787e: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
47880: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
47882: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47884: 242e 000c movel %fp@(12),%d2
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
47888: 2541 0038 movel %d1,%a2@(56) 4788c: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
47890: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47894: 486a 0010 pea %a2@(16) 47898: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 4789e: 2d40 fff8 movel %d0,%fp@(-8) 478a2: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
478a8: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
478ae: 202e fff8 movel %fp@(-8),%d0 478b2: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478b6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478bc: 4e5e unlk %fp 478be: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478c0: 202a 0038 movel %a2@(56),%d0 478c4: 7204 moveq #4,%d1 478c6: b280 cmpl %d0,%d1 478c8: 6400 009c bccw 47966 <rtems_rate_monotonic_period+0x1ce>
478cc: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
478ce: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478d2: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
478d8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478dc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478e2: 4e5e unlk %fp 478e4: 4e75 rts
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
478e6: 2f0a movel %a2,%sp@- 478e8: 4eb9 0004 767e jsr 4767e <_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;
the_period->next_length = length;
478ee: 242e 000c movel %fp@(12),%d2
/*
* 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;
478f2: 7001 moveq #1,%d0
the_period->next_length = length;
478f4: 2542 003c movel %d2,%a2@(60)
/*
* 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;
478f8: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
478fc: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
478fe: 2079 0006 3632 moveal 63632 <_Thread_Executing>,%a0 47904: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4790a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4790e: 2f08 movel %a0,%sp@- 47910: 4eb9 0004 ade8 jsr 4ade8 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
47916: 203c 0000 0700 movel #1792,%d0 4791c: 40c1 movew %sr,%d1 4791e: 8081 orl %d1,%d0 47920: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
47922: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
47924: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
47928: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
4792c: 46c1 movew %d1,%sr
/*
* 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 )
4792e: 7203 moveq #3,%d1 47930: 4fef 000c lea %sp@(12),%sp 47934: b280 cmpl %d0,%d1
47936: 6712 beqs 4794a <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
47938: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 4793e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47940: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47946: 4e5e unlk %fp 47948: 4e75 rts
/*
* 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 );
4794a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4794e: 2f39 0006 3632 movel 63632 <_Thread_Executing>,%sp@- 47954: 4eb9 0004 a080 jsr 4a080 <_Thread_Clear_state> 4795a: 508f addql #8,%sp
_Thread_Enable_dispatch();
4795c: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 47962: 4280 clrl %d0 47964: 60da bras 47940 <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47966: 41f9 0006 0872 lea 60872 <CSWTCH.43>,%a0 4796c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47970: 2d40 fff8 movel %d0,%fp@(-8) 47974: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return( return_value );
4797a: 202e fff8 movel %fp@(-8),%d0 4797e: 6000 ff5c braw 478dc <rtems_rate_monotonic_period+0x144>
...
00047984 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47984: 4e56 ff78 linkw %fp,#-136 47988: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4798c: 262e 0008 movel %fp@(8),%d3 47990: 246e 000c moveal %fp@(12),%a2
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
47994: 4a8a tstl %a2 47996: 6700 0082 beqw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
4799a: 4879 0006 0886 pea 60886 <CSWTCH.43+0x14> 479a0: 2f03 movel %d3,%sp@- 479a2: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
479a4: 4879 0006 08a4 pea 608a4 <CSWTCH.43+0x32> 479aa: 2f03 movel %d3,%sp@- 479ac: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
479ae: 4879 0006 08c6 pea 608c6 <CSWTCH.43+0x54> 479b4: 2f03 movel %d3,%sp@- 479b6: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
479b8: 4879 0006 08e9 pea 608e9 <CSWTCH.43+0x77> 479be: 2f03 movel %d3,%sp@- 479c0: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
479c2: 4fef 001c lea %sp@(28),%sp 479c6: 2ebc 0006 0934 movel #395572,%sp@ 479cc: 2f03 movel %d3,%sp@- 479ce: 4e92 jsr %a2@
/*
* 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 ;
479d0: 2439 0006 347a movel 6347a <_Rate_monotonic_Information+0x6>,%d2 479d6: 508f addql #8,%sp 479d8: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
479de: 623a bhis 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
479e0: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479e2: 2a0e movel %fp,%d5 479e4: 0684 ffff ffa2 addil #-94,%d4 479ea: 47f9 0004 ebec lea 4ebec <rtems_rate_monotonic_get_statistics>,%a3
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
479f0: 4bf9 0004 ecac lea 4ecac <rtems_rate_monotonic_get_status>,%a5
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479f6: 5b85 subql #5,%d5 479f8: 49f9 0004 7cdc lea 47cdc <rtems_object_get_name>,%a4
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 );
479fe: 2e3c 0004 b324 movel #308004,%d7
* 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++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
47a04: 2f04 movel %d4,%sp@- 47a06: 2f02 movel %d2,%sp@- 47a08: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47a0a: 508f addql #8,%sp 47a0c: 4a80 tstl %d0
47a0e: 6714 beqs 47a24 <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
* 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++ ) {
47a10: 5282 addql #1,%d2
/*
* 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 ;
47a12: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47a18: 63ea blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47a1a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47a20: 4e5e unlk %fp 47a22: 4e75 rts
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
47a24: 486e ffda pea %fp@(-38) 47a28: 2f02 movel %d2,%sp@- 47a2a: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a2c: 2f05 movel %d5,%sp@- 47a2e: 4878 0005 pea 5 <COMPARE> 47a32: 2f2e ffda movel %fp@(-38),%sp@- 47a36: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47a38: 2f2e ffa6 movel %fp@(-90),%sp@- 47a3c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a40: 2f05 movel %d5,%sp@- 47a42: 2f02 movel %d2,%sp@- 47a44: 4879 0006 0980 pea 60980 <CSWTCH.43+0x10e> 47a4a: 2f03 movel %d3,%sp@- 47a4c: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47a4e: 202e ffa2 movel %fp@(-94),%d0 47a52: 4fef 002c lea %sp@(44),%sp
47a56: 6618 bnes 47a70 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47a58: 4879 0006 081e pea 6081e <rtems_status_assoc+0x19e>
* 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++ ) {
47a5e: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47a60: 2f03 movel %d3,%sp@- 47a62: 4e92 jsr %a2@
continue;
47a64: 508f addql #8,%sp
/*
* 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 ;
47a66: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47a6c: 6396 blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47a6e: 60aa bras 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
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 );
47a70: 486e fff2 pea %fp@(-14) 47a74: 2047 moveal %d7,%a0
* 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++ ) {
47a76: 5282 addql #1,%d2
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 );
47a78: 2f00 movel %d0,%sp@- 47a7a: 486e ffba pea %fp@(-70) 47a7e: 4e90 jsr %a0@
(*print)( context,
47a80: 202e fff6 movel %fp@(-10),%d0 47a84: 223c 0000 03e8 movel #1000,%d1 47a8a: 4c41 0800 remsl %d1,%d0,%d0 47a8e: 2c2e ffb6 movel %fp@(-74),%d6 47a92: 2f00 movel %d0,%sp@- 47a94: 2001 movel %d1,%d0 47a96: 2f2e fff2 movel %fp@(-14),%sp@- 47a9a: 4c40 6806 remsl %d0,%d6,%d6 47a9e: 202e ffae movel %fp@(-82),%d0 47aa2: 2246 moveal %d6,%a1 47aa4: 223c 0000 03e8 movel #1000,%d1 47aaa: 2f09 movel %a1,%sp@- 47aac: 2f2e ffb2 movel %fp@(-78),%sp@- 47ab0: 4c41 0800 remsl %d1,%d0,%d0
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);
(*print)( context,
47ab4: 2c3c 0000 03e8 movel #1000,%d6
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 );
(*print)( context,
47aba: 2f00 movel %d0,%sp@- 47abc: 2f2e ffaa movel %fp@(-86),%sp@- 47ac0: 4879 0006 0997 pea 60997 <CSWTCH.43+0x125> 47ac6: 2f03 movel %d3,%sp@- 47ac8: 4e92 jsr %a2@
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);
47aca: 4fef 002c lea %sp@(44),%sp 47ace: 2047 moveal %d7,%a0 47ad0: 486e fff2 pea %fp@(-14) 47ad4: 2f2e ffa2 movel %fp@(-94),%sp@- 47ad8: 486e ffd2 pea %fp@(-46) 47adc: 4e90 jsr %a0@
(*print)( context,
47ade: 202e fff6 movel %fp@(-10),%d0 47ae2: 4c46 0800 remsl %d6,%d0,%d0 47ae6: 222e ffce movel %fp@(-50),%d1 47aea: 2f00 movel %d0,%sp@- 47aec: 2f2e fff2 movel %fp@(-14),%sp@- 47af0: 4c46 1801 remsl %d6,%d1,%d1 47af4: 202e ffc6 movel %fp@(-58),%d0 47af8: 2241 moveal %d1,%a1 47afa: 2f09 movel %a1,%sp@- 47afc: 2f2e ffca movel %fp@(-54),%sp@- 47b00: 4c46 0800 remsl %d6,%d0,%d0 47b04: 2f00 movel %d0,%sp@- 47b06: 2f2e ffc2 movel %fp@(-62),%sp@- 47b0a: 4879 0006 09b6 pea 609b6 <CSWTCH.43+0x144> 47b10: 2f03 movel %d3,%sp@- 47b12: 4e92 jsr %a2@ 47b14: 4fef 002c lea %sp@(44),%sp
/*
* 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 ;
47b18: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2 47b1e: 6300 fee4 blsw 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47b22: 6000 fef6 braw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047b40 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47b40: 4e56 0000 linkw %fp,#0 47b44: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47b4a: 5280 addql #1,%d0 47b4c: 2f0a movel %a2,%sp@- 47b4e: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47b54: 2f02 movel %d2,%sp@-
/*
* 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 ;
47b56: 2439 0006 347a movel 6347a <_Rate_monotonic_Information+0x6>,%d2 47b5c: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47b62: 6216 bhis 47b7a <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47b64: 45f9 0004 7b8c lea 47b8c <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
47b6a: 2f02 movel %d2,%sp@-
* 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++ ) {
47b6c: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
47b6e: 4e92 jsr %a2@
/*
* 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 ;
47b70: 588f addql #4,%sp 47b72: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47b78: 63f0 blss 47b6a <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47b7a: 242e fff8 movel %fp@(-8),%d2 47b7e: 246e fffc moveal %fp@(-4),%a2 47b82: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47b84: 4ef9 0004 a454 jmp 4a454 <_Thread_Enable_dispatch>
...
00057e40 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57e40: 4e56 ffec linkw %fp,#-20 57e44: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57e48: 262e 0008 movel %fp@(8),%d3 57e4c: 242e 000c movel %fp@(12),%d2 57e50: 246e 001c moveal %fp@(28),%a2
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57e54: 4a83 tstl %d3 57e56: 6700 0096 beqw 57eee <rtems_region_create+0xae>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57e5a: 4a82 tstl %d2
57e5c: 670a beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57e5e: 4a8a tstl %a2
57e60: 6706 beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
57e62: 7003 moveq #3,%d0 57e64: c082 andl %d2,%d0
57e66: 670c beqs 57e74 <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
57e68: 7009 moveq #9,%d0
}
57e6a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57e70: 4e5e unlk %fp 57e72: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
57e74: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57e7a: 4eb9 0005 a814 jsr 5a814 <_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 );
57e80: 4879 0008 0bbe pea 80bbe <_Region_Information> 57e86: 4eb9 0005 becc jsr 5becc <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
57e8c: 508f addql #8,%sp 57e8e: 2640 moveal %d0,%a3 57e90: 4a80 tstl %d0
57e92: 6766 beqs 57efa <rtems_region_create+0xba>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57e94: 2f2e 0014 movel %fp@(20),%sp@- 57e98: 2f2e 0010 movel %fp@(16),%sp@- 57e9c: 2f02 movel %d2,%sp@- 57e9e: 486b 0068 pea %a3@(104) 57ea2: 4eb9 0005 b950 jsr 5b950 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57ea8: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57eac: 2740 005c movel %d0,%a3@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57eb0: 6662 bnes 57f14 <rtems_region_create+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
57eb2: 2f0b movel %a3,%sp@- 57eb4: 4879 0008 0bbe pea 80bbe <_Region_Information> 57eba: 103c 0008 moveb #8,%d0 57ebe: 2d40 fffc movel %d0,%fp@(-4) 57ec2: 4eb9 0005 c204 jsr 5c204 <_Objects_Free> 57ec8: 202e fffc movel %fp@(-4),%d0 57ecc: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57ece: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57ed4: 2d40 fffc movel %d0,%fp@(-4) 57ed8: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57ede: 202e fffc movel %fp@(-4),%d0 57ee2: 588f addql #4,%sp
}
57ee4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57eea: 4e5e unlk %fp 57eec: 4e75 rts
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57eee: 7003 moveq #3,%d0
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
57ef0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57ef6: 4e5e unlk %fp 57ef8: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57efa: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
57f00: 7005 moveq #5,%d0
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f02: 2d40 fffc movel %d0,%fp@(-4) 57f06: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57f0c: 202e fffc movel %fp@(-4),%d0 57f10: 588f addql #4,%sp 57f12: 60d0 bras 57ee4 <rtems_region_create+0xa4>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
57f14: 2742 0050 movel %d2,%a3@(80)
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f18: 222e 0018 movel %fp@(24),%d1
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f1c: 202e 0010 movel %fp@(16),%d0
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f20: e489 lsrl #2,%d1
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f22: 242e 0014 movel %fp@(20),%d2
the_region->attribute_set = attribute_set;
57f26: 206e 0018 moveal %fp@(24),%a0
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f2a: 2740 0054 movel %d0,%a3@(84)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f2e: 4280 clrl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f30: 2742 0058 movel %d2,%a3@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f34: 7401 moveq #1,%d2
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
57f36: 2748 0060 movel %a0,%a3@(96)
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f3a: c481 andl %d1,%d2
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
57f3c: 42ab 0064 clrl %a3@(100)
_Thread_queue_Initialize(
57f40: 4878 0006 pea 6 <EXTENDSFDF> 57f44: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 57f48: 2f02 movel %d2,%sp@- 57f4a: 486b 0010 pea %a3@(16)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f4e: 4282 clrl %d2 57f50: 2d40 fffc movel %d0,%fp@(-4) 57f54: 4eb9 0005 d540 jsr 5d540 <_Thread_queue_Initialize> 57f5a: 222b 0008 movel %a3@(8),%d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f5e: 4fef 0010 lea %sp@(16),%sp 57f62: 2079 0008 0bd6 moveal 80bd6 <_Region_Information+0x18>,%a0 57f68: 3401 movew %d1,%d2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57f6a: 2743 000c movel %d3,%a3@(12) 57f6e: 202e fffc movel %fp@(-4),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f72: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 57f76: 2481 movel %d1,%a2@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f78: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57f7e: 2d40 fffc movel %d0,%fp@(-4) 57f82: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57f88: 202e fffc movel %fp@(-4),%d0 57f8c: 588f addql #4,%sp 57f8e: 6000 ff54 braw 57ee4 <rtems_region_create+0xa4>
...
00058044 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
58044: 4e56 fff8 linkw %fp,#-8 58048: 2f0a movel %a2,%sp@- 5804a: 2f02 movel %d2,%sp@- 5804c: 242e 000c movel %fp@(12),%d2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
58050: 677e beqs 580d0 <rtems_region_extend+0x8c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
58052: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 58058: 4eb9 0005 a814 jsr 5a814 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
5805e: 486e fff8 pea %fp@(-8) 58062: 2f2e 0008 movel %fp@(8),%sp@- 58066: 4879 0008 0bbe pea 80bbe <_Region_Information> 5806c: 4eb9 0005 c368 jsr 5c368 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
58072: 4fef 0010 lea %sp@(16),%sp 58076: 2440 moveal %d0,%a2 58078: 4aae fff8 tstl %fp@(-8)
5807c: 6640 bnes 580be <rtems_region_extend+0x7a>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
5807e: 486e fffc pea %fp@(-4) 58082: 2f2e 0010 movel %fp@(16),%sp@- 58086: 2f02 movel %d2,%sp@- 58088: 486a 0068 pea %a2@(104) 5808c: 4eb9 0005 b640 jsr 5b640 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
58092: 4fef 0010 lea %sp@(16),%sp 58096: 4a80 tstl %d0
58098: 6748 beqs 580e2 <rtems_region_extend+0x9e>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
5809a: 7201 moveq #1,%d1 5809c: b280 cmpl %d0,%d1
5809e: 6760 beqs 58100 <rtems_region_extend+0xbc>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a0: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
580a6: 7418 moveq #24,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a8: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580ae: 588f addql #4,%sp
}
580b0: 2002 movel %d2,%d0 580b2: 242e fff0 movel %fp@(-16),%d2 580b6: 246e fff4 moveal %fp@(-12),%a2 580ba: 4e5e unlk %fp 580bc: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580be: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
580c4: 7404 moveq #4,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580c6: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580cc: 588f addql #4,%sp 580ce: 60e0 bras 580b0 <rtems_region_extend+0x6c>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
580d0: 143c 0009 moveb #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
580d4: 2002 movel %d2,%d0 580d6: 242e fff0 movel %fp@(-16),%d2 580da: 246e fff4 moveal %fp@(-12),%a2 580de: 4e5e unlk %fp 580e0: 4e75 rts
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580e2: 202e fffc movel %fp@(-4),%d0
the_region->maximum_segment_size += amount_extended;
580e6: d1aa 005c addl %d0,%a2@(92) 580ea: 4282 clrl %d2
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580ec: d1aa 0054 addl %d0,%a2@(84)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580f0: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 580f6: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580fc: 588f addql #4,%sp 580fe: 60b0 bras 580b0 <rtems_region_extend+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58100: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
58106: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58108: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
5810e: 588f addql #4,%sp 58110: 609e bras 580b0 <rtems_region_extend+0x6c>
...
00058398 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
58398: 4e56 fffc linkw %fp,#-4 5839c: 2f03 movel %d3,%sp@- 5839e: 262e 0010 movel %fp@(16),%d3 583a2: 2f02 movel %d2,%sp@- 583a4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
583a8: 6700 0092 beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
583ac: 4a83 tstl %d3 583ae: 6700 008c beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
583b2: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 583b8: 4eb9 0005 a814 jsr 5a814 <_API_Mutex_Lock> 583be: 486e fffc pea %fp@(-4) 583c2: 2f2e 0008 movel %fp@(8),%sp@- 583c6: 4879 0008 0bbe pea 80bbe <_Region_Information> 583cc: 4eb9 0005 c368 jsr 5c368 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
583d2: 222e fffc movel %fp@(-4),%d1 583d6: 4fef 0010 lea %sp@(16),%sp
583da: 6636 bnes 58412 <rtems_region_get_segment_size+0x7a><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
583dc: 2f03 movel %d3,%sp@- 583de: 2040 moveal %d0,%a0 583e0: 2f02 movel %d2,%sp@- 583e2: 4868 0068 pea %a0@(104) 583e6: 4eb9 0005 bda4 jsr 5bda4 <_Heap_Size_of_alloc_area> 583ec: 4fef 000c lea %sp@(12),%sp 583f0: 4a00 tstb %d0
583f2: 6624 bnes 58418 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583f4: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
583fa: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583fc: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
58402: 588f addql #4,%sp <== NOT EXECUTED
}
58404: 2002 movel %d2,%d0 58406: 242e fff4 movel %fp@(-12),%d2 5840a: 262e fff8 movel %fp@(-8),%d3 5840e: 4e5e unlk %fp 58410: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58412: 7001 moveq #1,%d0 58414: b081 cmpl %d1,%d0
58416: 6712 beqs 5842a <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58418: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
5841e: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58420: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
58426: 588f addql #4,%sp 58428: 60da bras 58404 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5842a: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58430: 7404 moveq #4,%d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58432: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
58438: 588f addql #4,%sp 5843a: 60c8 bras 58404 <rtems_region_get_segment_size+0x6c> 5843c: 7409 moveq #9,%d2
}
5843e: 2002 movel %d2,%d0 58440: 242e fff4 movel %fp@(-12),%d2 58444: 262e fff8 movel %fp@(-8),%d3
58448: 4e5e unlk %fp <== NOT EXECUTED
00046464 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
46464: 4e56 ffd4 linkw %fp,#-44 46468: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4646c: 262e 0008 movel %fp@(8),%d3 46470: 242e 0010 movel %fp@(16),%d2 46474: 246e 0018 moveal %fp@(24),%a2
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 ) )
46478: 4a83 tstl %d3
4647a: 6748 beqs 464c4 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
4647c: 4a8a tstl %a2 4647e: 6700 00ea beqw 4656a <rtems_semaphore_create+0x106>
* id - semaphore id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_semaphore_create(
46482: 2002 movel %d2,%d0 46484: 0280 0000 00c0 andil #192,%d0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
4648a: 6744 beqs 464d0 <rtems_semaphore_create+0x6c>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
4648c: 7230 moveq #48,%d1 4648e: 7810 moveq #16,%d4 46490: c282 andl %d2,%d1 46492: b881 cmpl %d1,%d4
46494: 670c beqs 464a2 <rtems_semaphore_create+0x3e>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46496: 700b moveq #11,%d0
}
46498: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 4649e: 4e5e unlk %fp 464a0: 4e75 rts
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
464a2: 44c2 movew %d2,%ccr
464a4: 66f0 bnes 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
464a6: 0c80 0000 00c0 cmpil #192,%d0
464ac: 67e8 beqs 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
464ae: 7001 moveq #1,%d0 464b0: b0ae 000c cmpl %fp@(12),%d0
464b4: 6420 bccs 464d6 <rtems_semaphore_create+0x72>
464b6: 103c 000a moveb #10,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464ba: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464c0: 4e5e unlk %fp 464c2: 4e75 rts
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 ) )
464c4: 7003 moveq #3,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464c6: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464cc: 4e5e unlk %fp 464ce: 4e75 rts
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
464d0: 7830 moveq #48,%d4 464d2: c882 andl %d2,%d4
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 ) )
464d4: 66d8 bnes 464ae <rtems_semaphore_create+0x4a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
464d6: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 464dc: 5280 addql #1,%d0 464de: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
* 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 );
464e4: 4879 0006 1364 pea 61364 <_Semaphore_Information> 464ea: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
464f0: 588f addql #4,%sp 464f2: 2640 moveal %d0,%a3 464f4: 4a80 tstl %d0 464f6: 6700 00d8 beqw 465d0 <rtems_semaphore_create+0x16c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
464fa: 2742 0010 movel %d2,%a3@(16)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
464fe: 4a84 tstl %d4
46500: 6774 beqs 46576 <rtems_semaphore_create+0x112>
/*
* 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;
46502: 44c2 movew %d2,%ccr 46504: 56c0 sne %d0 46506: 49c0 extbl %d0 46508: 5280 addql #1,%d0 4650a: 2d40 fff0 movel %d0,%fp@(-16)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4650e: 7010 moveq #16,%d0 46510: b084 cmpl %d4,%d0 46512: 6700 00ce beqw 465e2 <rtems_semaphore_create+0x17e>
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;
46516: 7202 moveq #2,%d1
the_mutex_attr.only_owner_release = false;
46518: 4204 clrb %d4
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;
4651a: 2d41 ffea movel %d1,%fp@(-22)
the_mutex_attr.only_owner_release = false;
4651e: 1d44 ffee moveb %d4,%fp@(-18)
}
mutex_status = _CORE_mutex_Initialize(
46522: 7001 moveq #1,%d0 46524: b0ae 000c cmpl %fp@(12),%d0 46528: 57c0 seq %d0 4652a: 49c0 extbl %d0 4652c: 4480 negl %d0 4652e: 2f00 movel %d0,%sp@- 46530: 486e ffea pea %fp@(-22) 46534: 486b 0014 pea %a3@(20) 46538: 4eb9 0004 7218 jsr 47218 <_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 ) {
4653e: 4fef 000c lea %sp@(12),%sp 46542: 7206 moveq #6,%d1 46544: b280 cmpl %d0,%d1
46546: 665e bnes 465a6 <rtems_semaphore_create+0x142>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46548: 2f0b movel %a3,%sp@- 4654a: 4879 0006 1364 pea 61364 <_Semaphore_Information> 46550: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
46556: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
4655c: 508f addql #8,%sp
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4655e: 7013 moveq #19,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
46560: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46566: 4e5e unlk %fp 46568: 4e75 rts
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4656a: 7009 moveq #9,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4656c: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46572: 4e5e unlk %fp 46574: 4e75 rts
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46576: 2f2e 000c movel %fp@(12),%sp@-
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
4657a: 72ff moveq #-1,%d1
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
4657c: 486e fff8 pea %fp@(-8) 46580: 486b 0014 pea %a3@(20)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46584: 44c2 movew %d2,%ccr 46586: 56c0 sne %d0
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
46588: 2d41 fff8 movel %d1,%fp@(-8)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
4658c: 49c0 extbl %d0 4658e: 5280 addql #1,%d0
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;
46590: 42ae ffea clrl %fp@(-22)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46594: 2d40 fffc movel %d0,%fp@(-4)
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
46598: 42ae fff4 clrl %fp@(-12)
_CORE_semaphore_Initialize(
4659c: 4eb9 0004 7560 jsr 47560 <_CORE_semaphore_Initialize> 465a2: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465a6: 202b 0008 movel %a3@(8),%d0 465aa: 4281 clrl %d1 465ac: 2079 0006 137c moveal 6137c <_Semaphore_Information+0x18>,%a0 465b2: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
465b4: 2743 000c movel %d3,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
465bc: 2480 movel %d0,%a2@
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465be: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
465c4: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465ca: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
465cc: 4e5e unlk %fp 465ce: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
465d0: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 465d6: 7005 moveq #5,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
465d8: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 465de: 4e5e unlk %fp 465e0: 4e75 rts
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
465e2: 42ae ffea clrl %fp@(-22)
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465e6: 7801 moveq #1,%d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465e8: 4201 clrb %d1
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;
465ea: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465f0: 1d41 ffee moveb %d1,%fp@(-18)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465f4: b8ae fff0 cmpl %fp@(-16),%d4 465f8: 6600 ff28 bnew 46522 <rtems_semaphore_create+0xbe>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
465fc: 0802 0006 btst #6,%d2
46600: 6712 beqs 46614 <rtems_semaphore_create+0x1b0>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
46602: 103c 0002 moveb #2,%d0
the_mutex_attr.only_owner_release = true;
46606: 7201 moveq #1,%d1
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
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;
46608: 2d40 fff0 movel %d0,%fp@(-16)
the_mutex_attr.only_owner_release = true;
4660c: 1d41 ffee moveb %d1,%fp@(-18) 46610: 6000 ff10 braw 46522 <rtems_semaphore_create+0xbe>
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
46614: 4a02 tstb %d2 46616: 6c00 ff0a bgew 46522 <rtems_semaphore_create+0xbe>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661a: 7803 moveq #3,%d4
the_mutex_attr.only_owner_release = true;
4661c: 7001 moveq #1,%d0
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 ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661e: 2d44 fff0 movel %d4,%fp@(-16)
the_mutex_attr.only_owner_release = true;
46622: 1d40 ffee moveb %d0,%fp@(-18) 46626: 6000 fefa braw 46522 <rtems_semaphore_create+0xbe>
...
0004662c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
4662c: 4e56 fffc linkw %fp,#-4 46630: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
46632: 486e fffc pea %fp@(-4) 46636: 2f2e 0008 movel %fp@(8),%sp@- 4663a: 4879 0006 1364 pea 61364 <_Semaphore_Information> 46640: 4eb9 0004 8004 jsr 48004 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46646: 4fef 000c lea %sp@(12),%sp 4664a: 2440 moveal %d0,%a2 4664c: 4aae fffc tstl %fp@(-4)
46650: 670a beqs 4665c <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46652: 246e fff8 moveal %fp@(-8),%a2
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46656: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46658: 4e5e unlk %fp 4665a: 4e75 rts 4665c: 7030 moveq #48,%d0 4665e: c0aa 0010 andl %a2@(16),%d0
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
46662: 6760 beqs 466c4 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
46664: 4aaa 0062 tstl %a2@(98)
46668: 6616 bnes 46680 <rtems_semaphore_delete+0x54>
4666a: 7220 moveq #32,%d1 4666c: b280 cmpl %d0,%d1
4666e: 6710 beqs 46680 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
46670: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46676: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
4667a: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4667c: 4e5e unlk %fp 4667e: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
46680: 4878 0004 pea 4 <CONTEXT_ARG> 46684: 42a7 clrl %sp@- 46686: 486a 0014 pea %a2@(20) 4668a: 4eb9 0004 720c jsr 4720c <_CORE_mutex_Flush> 46690: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
46694: 2f0a movel %a2,%sp@- 46696: 4879 0006 1364 pea 61364 <_Semaphore_Information> 4669c: 4eb9 0004 7bf8 jsr 47bf8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
466a2: 2f0a movel %a2,%sp@- 466a4: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466aa: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466b0: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466b6: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466ba: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466bc: 246e fff8 moveal %fp@(-8),%a2 466c0: 4e5e unlk %fp 466c2: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
466c4: 4878 0002 pea 2 <DOUBLE_FLOAT> 466c8: 42a7 clrl %sp@- 466ca: 486a 0014 pea %a2@(20) 466ce: 4eb9 0004 7554 jsr 47554 <_CORE_semaphore_Flush> 466d4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
466d8: 2f0a movel %a2,%sp@- 466da: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466e0: 4eb9 0004 7bf8 jsr 47bf8 <_Objects_Close> 466e6: 2f0a movel %a2,%sp@- 466e8: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466ee: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466f4: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466fa: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466fe: 4280 clrl %d0 46700: 60ba bras 466bc <rtems_semaphore_delete+0x90>
...
00051184 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
51184: 4e56 fffc linkw %fp,#-4 51188: 486e fffc pea %fp@(-4) 5118c: 2f2e 0008 movel %fp@(8),%sp@- 51190: 4879 0006 538c pea 6538c <_Semaphore_Information> 51196: 4eb9 0004 9628 jsr 49628 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
5119c: 4fef 000c lea %sp@(12),%sp 511a0: 4aae fffc tstl %fp@(-4)
511a4: 6706 beqs 511ac <rtems_semaphore_flush+0x28>
511a6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
511a8: 4e5e unlk %fp 511aa: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
511ac: 7230 moveq #48,%d1 511ae: 2040 moveal %d0,%a0 511b0: c2a8 0010 andl %a0@(16),%d1
511b4: 6720 beqs 511d6 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
511b6: 4878 0001 pea 1 <ADD> 511ba: 42a7 clrl %sp@- 511bc: 4868 0014 pea %a0@(20) 511c0: 4eb9 0004 8830 jsr 48830 <_CORE_mutex_Flush> 511c6: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
511ca: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 511d0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
511d2: 4e5e unlk %fp 511d4: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
511d6: 4878 0001 pea 1 <ADD> 511da: 2040 moveal %d0,%a0 511dc: 42a7 clrl %sp@- 511de: 4868 0014 pea %a0@(20) 511e2: 4eb9 0004 8b78 jsr 48b78 <_CORE_semaphore_Flush> 511e8: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
511ec: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 511f2: 4280 clrl %d0 511f4: 60dc bras 511d2 <rtems_semaphore_flush+0x4e>
...
00058b58 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58b58: 4e56 fffc linkw %fp,#-4 58b5c: 2f03 movel %d3,%sp@- 58b5e: 2f02 movel %d2,%sp@- 58b60: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b64: 660e bnes 58b74 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b66: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b6a: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b6c: 262e fff8 movel %fp@(-8),%d3 58b70: 4e5e unlk %fp 58b72: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4eb9 0005 cd90 jsr 5cd90 <_Thread_Get>
switch ( location ) {
58b82: 508f addql #8,%sp 58b84: 4aae fffc tstl %fp@(-4)
58b88: 670e beqs 58b98 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b8a: 242e fff4 movel %fp@(-12),%d2
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
58b8e: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b90: 262e fff8 movel %fp@(-8),%d3 58b94: 4e5e unlk %fp 58b96: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58b98: 2240 moveal %d0,%a1 58b9a: 2069 010a moveal %a1@(266),%a0
asr = &api->Signal;
58b9e: 4aa8 000a tstl %a0@(10)
58ba2: 6770 beqs 58c14 <rtems_signal_send+0xbc> <== NEVER TAKEN
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
58ba4: 4a28 0008 tstb %a0@(8)
58ba8: 673e beqs 58be8 <rtems_signal_send+0x90>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58baa: 223c 0000 0700 movel #1792,%d1 58bb0: 40c3 movew %sr,%d3 58bb2: 8283 orl %d3,%d1 58bb4: 46c1 movew %d1,%sr
*signal_set |= signals;
58bb6: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
58bba: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bbc: 2239 0008 0d5a movel 80d5a <_ISR_Nest_level>,%d1
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
58bc2: 7401 moveq #1,%d2 58bc4: 1342 0074 moveb %d2,%a1@(116)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bc8: 4a81 tstl %d1
58bca: 6708 beqs 58bd4 <rtems_signal_send+0x7c>
58bcc: b0b9 0008 0d7a cmpl 80d7a <_Thread_Executing>,%d0
58bd2: 6730 beqs 58c04 <rtems_signal_send+0xac> <== ALWAYS TAKEN
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bd4: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58bda: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58bdc: 242e fff4 movel %fp@(-12),%d2 58be0: 262e fff8 movel %fp@(-8),%d3 58be4: 4e5e unlk %fp 58be6: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58be8: 203c 0000 0700 movel #1792,%d0 58bee: 40c1 movew %sr,%d1 58bf0: 8081 orl %d1,%d0 58bf2: 46c0 movew %d0,%sr
*signal_set |= signals;
58bf4: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
58bf8: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bfa: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58c00: 4280 clrl %d0 58c02: 60d8 bras 58bdc <rtems_signal_send+0x84>
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
58c04: 13c2 0008 0e08 moveb %d2,80e08 <_ISR_Signals_to_thread_executing>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58c0a: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58c10: 4280 clrl %d0 58c12: 60c8 bras 58bdc <rtems_signal_send+0x84>
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c14: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c1a: 242e fff4 movel %fp@(-12),%d2
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c1e: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c20: 262e fff8 movel %fp@(-8),%d3
58c24: 4e5e unlk %fp <== NOT EXECUTED
0004ffb4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4ffb4: 4e56 ffe4 linkw %fp,#-28 4ffb8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ffbc: 2a2e 0008 movel %fp@(8),%d5 4ffc0: 242e 000c movel %fp@(12),%d2 4ffc4: 286e 0010 moveal %fp@(16),%a4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4ffc8: 4a8c tstl %a4 4ffca: 6700 0154 beqw 50120 <rtems_task_mode+0x16c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4ffce: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ffd4: 4a2a 0075 tstb %a2@(117) 4ffd8: 57c0 seq %d0 4ffda: 263c 0000 0100 movel #256,%d3 4ffe0: 49c0 extbl %d0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4ffe2: 266a 010a moveal %a2@(266),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ffe6: c680 andl %d0,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4ffe8: 4aaa 007a tstl %a2@(122) 4ffec: 6600 00d4 bnew 500c2 <rtems_task_mode+0x10e>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4fff0: 4a2b 0008 tstb %a3@(8) 4fff4: 57c0 seq %d0 4fff6: 283c 0000 0400 movel #1024,%d4 4fffc: 49c0 extbl %d0 4fffe: c880 andl %d0,%d4
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();
50000: 4eb9 0004 9eac jsr 49eac <_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;
50006: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
50008: 8083 orl %d3,%d0 5000a: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
5000c: 0802 0008 btst #8,%d2
50010: 670e beqs 50020 <rtems_task_mode+0x6c>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
50012: 2005 movel %d5,%d0 50014: 7201 moveq #1,%d1 50016: e088 lsrl #8,%d0 50018: b380 eorl %d1,%d0 5001a: c081 andl %d1,%d0 5001c: 1540 0075 moveb %d0,%a2@(117)
if ( mask & RTEMS_TIMESLICE_MASK ) {
50020: 0802 0009 btst #9,%d2
50024: 6718 beqs 5003e <rtems_task_mode+0x8a>
if ( _Modes_Is_timeslice(mode_set) ) {
50026: 0805 0009 btst #9,%d5 5002a: 6700 00c2 beqw 500ee <rtems_task_mode+0x13a>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
5002e: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
50030: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
50036: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
5003a: 2550 0076 movel %a0@,%a2@(118)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
5003e: 7007 moveq #7,%d0 50040: c082 andl %d2,%d0
50042: 6712 beqs 50056 <rtems_task_mode+0xa2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
50044: 40c0 movew %sr,%d0 50046: 7207 moveq #7,%d1 50048: c285 andl %d5,%d1 5004a: 0280 0000 f8ff andil #63743,%d0 50050: e189 lsll #8,%d1 50052: 8081 orl %d1,%d0 50054: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
50056: 0802 000a btst #10,%d2
5005a: 6758 beqs 500b4 <rtems_task_mode+0x100>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
5005c: 700a moveq #10,%d0 5005e: e0ad lsrl %d0,%d5 50060: 7201 moveq #1,%d1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
50062: 4280 clrl %d0 50064: 102b 0008 moveb %a3@(8),%d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
50068: b385 eorl %d1,%d5 5006a: ca81 andl %d1,%d5
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
5006c: ba80 cmpl %d0,%d5
5006e: 6744 beqs 500b4 <rtems_task_mode+0x100>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
50070: 203c 0000 0700 movel #1792,%d0
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;
50076: 1745 0008 moveb %d5,%a3@(8) 5007a: 40c1 movew %sr,%d1 5007c: 8081 orl %d1,%d0 5007e: 46c0 movew %d0,%sr
_signals = information->signals_pending;
50080: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
50084: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
5008a: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
5008e: 46c1 movew %d1,%sr
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
50090: 4aab 0012 tstl %a3@(18)
50094: 671e beqs 500b4 <rtems_task_mode+0x100>
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
50096: 7203 moveq #3,%d1
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;
50098: 7001 moveq #1,%d0 5009a: 7401 moveq #1,%d2 5009c: 1540 0074 moveb %d0,%a2@(116)
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500a0: b2b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d1
500a6: 6758 beqs 50100 <rtems_task_mode+0x14c> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
500a8: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
500aa: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 500b0: 4e5e unlk %fp 500b2: 4e75 rts
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500b4: 7203 moveq #3,%d1
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;
500b6: 4202 clrb %d2
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500b8: b2b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d1
500be: 66e8 bnes 500a8 <rtems_task_mode+0xf4> <== NEVER TAKEN
500c0: 603e bras 50100 <rtems_task_mode+0x14c>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
500c2: 4a2b 0008 tstb %a3@(8) 500c6: 57c0 seq %d0 500c8: 283c 0000 0400 movel #1024,%d4 500ce: 49c0 extbl %d0 500d0: c880 andl %d0,%d4
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();
500d2: 4eb9 0004 9eac jsr 49eac <_CPU_ISR_Get_level>
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;
500d8: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
500dc: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
500de: 8083 orl %d3,%d0 500e0: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
500e2: 0802 0008 btst #8,%d2 500e6: 6700 ff38 beqw 50020 <rtems_task_mode+0x6c> 500ea: 6000 ff26 braw 50012 <rtems_task_mode+0x5e>
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
500ee: 7007 moveq #7,%d0 500f0: c082 andl %d2,%d0
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;
500f2: 42aa 007a clrl %a2@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
500f6: 4a80 tstl %d0 500f8: 6700 ff5c beqw 50056 <rtems_task_mode+0xa2> 500fc: 6000 ff46 braw 50044 <rtems_task_mode+0x90>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
50100: 4eb9 0005 0310 jsr 50310 <_Thread_Evaluate_mode> 50106: 4a00 tstb %d0
50108: 6604 bnes 5010e <rtems_task_mode+0x15a>
5010a: 4a02 tstb %d2
5010c: 679a beqs 500a8 <rtems_task_mode+0xf4>
_Thread_Dispatch();
5010e: 4eb9 0004 87b4 jsr 487b4 <_Thread_Dispatch> 50114: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
50116: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 5011c: 4e5e unlk %fp 5011e: 4e75 rts
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
50120: 7009 moveq #9,%d0
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
50122: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
50128: 4e5e unlk %fp <== NOT EXECUTED
0004af5c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4af5c: 4e56 fffc linkw %fp,#-4 4af60: 2f0a movel %a2,%sp@- 4af62: 246e 0010 moveal %fp@(16),%a2 4af66: 2f02 movel %d2,%sp@- 4af68: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4af6c: 670c beqs 4af7a <rtems_task_set_priority+0x1e>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4af6e: 4280 clrl %d0 4af70: 1039 0006 3ec2 moveb 63ec2 <rtems_maximum_priority>,%d0 4af76: b082 cmpl %d2,%d0
4af78: 6566 bcss 4afe0 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af7a: 4a8a tstl %a2
4af7c: 6770 beqs 4afee <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4af7e: 486e fffc pea %fp@(-4) 4af82: 2f2e 0008 movel %fp@(8),%sp@- 4af86: 4eb9 0004 cf50 jsr 4cf50 <_Thread_Get>
switch ( location ) {
4af8c: 508f addql #8,%sp 4af8e: 4aae fffc tstl %fp@(-4)
4af92: 663e bnes 4afd2 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4af94: 2040 moveal %d0,%a0 4af96: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4af9a: 4a82 tstl %d2
4af9c: 6720 beqs 4afbe <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4af9e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4afa2: 4aa8 001c tstl %a0@(28)
4afa6: 6706 beqs 4afae <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
4afa8: b4a8 0014 cmpl %a0@(20),%d2
4afac: 6410 bccs 4afbe <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
4afae: 42a7 clrl %sp@- 4afb0: 2f02 movel %d2,%sp@- 4afb2: 2f00 movel %d0,%sp@- 4afb4: 4eb9 0004 c9d8 jsr 4c9d8 <_Thread_Change_priority> 4afba: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4afbe: 4eb9 0004 cef8 jsr 4cef8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afc4: 242e fff4 movel %fp@(-12),%d2
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
4afc8: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afca: 246e fff8 moveal %fp@(-8),%a2 4afce: 4e5e unlk %fp 4afd0: 4e75 rts 4afd2: 242e fff4 movel %fp@(-12),%d2
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
4afd6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afd8: 246e fff8 moveal %fp@(-8),%a2 4afdc: 4e5e unlk %fp 4afde: 4e75 rts 4afe0: 242e fff4 movel %fp@(-12),%d2 4afe4: 7013 moveq #19,%d0 4afe6: 246e fff8 moveal %fp@(-8),%a2 4afea: 4e5e unlk %fp 4afec: 4e75 rts 4afee: 242e fff4 movel %fp@(-12),%d2
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4aff2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4aff4: 246e fff8 moveal %fp@(-8),%a2
4aff8: 4e5e unlk %fp <== NOT EXECUTED
00047888 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47888: 4e56 fffc linkw %fp,#-4 4788c: 2f02 movel %d2,%sp@- 4788e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47892: 6762 beqs 478f6 <rtems_task_variable_delete+0x6e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47894: 486e fffc pea %fp@(-4) 47898: 2f2e 0008 movel %fp@(8),%sp@- 4789c: 4eb9 0004 96b4 jsr 496b4 <_Thread_Get>
switch (location) {
478a2: 508f addql #8,%sp 478a4: 4aae fffc tstl %fp@(-4)
478a8: 663c bnes 478e6 <rtems_task_variable_delete+0x5e>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
478aa: 2240 moveal %d0,%a1 478ac: 2069 011a moveal %a1@(282),%a0
while (tvp) {
478b0: 4a88 tstl %a0
478b2: 673c beqs 478f0 <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
478b4: b4a8 0004 cmpl %a0@(4),%d2
478b8: 6746 beqs 47900 <rtems_task_variable_delete+0x78>
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;
478ba: 2248 moveal %a0,%a1
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
478bc: 2050 moveal %a0@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
478be: 4a88 tstl %a0
478c0: 672e beqs 478f0 <rtems_task_variable_delete+0x68><== NEVER TAKEN
if (tvp->ptr == ptr) {
478c2: b4a8 0004 cmpl %a0@(4),%d2
478c6: 66f2 bnes 478ba <rtems_task_variable_delete+0x32>
if (prev)
prev->next = tvp->next;
478c8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
478ca: 2f08 movel %a0,%sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
478d4: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
478da: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
478dc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478de: 242e fff8 movel %fp@(-8),%d2 478e2: 4e5e unlk %fp 478e4: 4e75 rts 478e6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
478ea: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478ec: 4e5e unlk %fp 478ee: 4e75 rts
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478f0: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478fa: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478fc: 4e5e unlk %fp 478fe: 4e75 rts
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
47900: 2240 moveal %d0,%a1 47902: 2350 011a movel %a0@,%a1@(282)
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47906: 2f08 movel %a0,%sp@- 47908: 2f00 movel %d0,%sp@- 4790a: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47910: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47916: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
47918: 4280 clrl %d0 4791a: 60c2 bras 478de <rtems_task_variable_delete+0x56>
0004791c <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
4791c: 4e56 fffc linkw %fp,#-4 47920: 2f0a movel %a2,%sp@- 47922: 246e 0010 moveal %fp@(16),%a2 47926: 2f02 movel %d2,%sp@- 47928: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
4792c: 6752 beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
4792e: 4a8a tstl %a2
47930: 674e beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47932: 486e fffc pea %fp@(-4) 47936: 2f2e 0008 movel %fp@(8),%sp@- 4793a: 4eb9 0004 96b4 jsr 496b4 <_Thread_Get>
switch (location) {
47940: 508f addql #8,%sp 47942: 4aae fffc tstl %fp@(-4)
47946: 662a bnes 47972 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47948: 2240 moveal %d0,%a1 4794a: 2069 011a moveal %a1@(282),%a0
while (tvp) {
4794e: 4a88 tstl %a0
47950: 670c beqs 4795e <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47952: b4a8 0004 cmpl %a0@(4),%d2
47956: 6736 beqs 4798e <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47958: 2050 moveal %a0@,%a0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
4795a: 4a88 tstl %a0
4795c: 66f4 bnes 47952 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
4795e: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47964: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47968: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4796a: 246e fff8 moveal %fp@(-8),%a2 4796e: 4e5e unlk %fp 47970: 4e75 rts 47972: 242e fff4 movel %fp@(-12),%d2
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
47976: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47978: 246e fff8 moveal %fp@(-8),%a2 4797c: 4e5e unlk %fp 4797e: 4e75 rts 47980: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47984: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47986: 246e fff8 moveal %fp@(-8),%a2 4798a: 4e5e unlk %fp 4798c: 4e75 rts
if (tvp->ptr == ptr) {
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
4798e: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47992: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47998: 242e fff4 movel %fp@(-12),%d2
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
4799c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4799e: 246e fff8 moveal %fp@(-8),%a2 479a2: 4e5e unlk %fp
...
00059548 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
59548: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
5954c: 486e fffc pea %fp@(-4) 59550: 2f2e 0008 movel %fp@(8),%sp@- 59554: 4879 0008 1582 pea 81582 <_Timer_Information> 5955a: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59560: 4fef 000c lea %sp@(12),%sp 59564: 4aae fffc tstl %fp@(-4)
59568: 6706 beqs 59570 <rtems_timer_cancel+0x28>
5956a: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5956c: 4e5e unlk %fp 5956e: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
59570: 7204 moveq #4,%d1 59572: 2040 moveal %d0,%a0 59574: b2a8 0038 cmpl %a0@(56),%d1
59578: 670c beqs 59586 <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
5957a: 4868 0010 pea %a0@(16) 5957e: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove> 59584: 588f addql #4,%sp
_Thread_Enable_dispatch();
59586: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 5958c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5958e: 4e5e unlk %fp
...
00059784 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59784: 4e56 ffec linkw %fp,#-20 59788: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5978c: 242e 000c movel %fp@(12),%d2 59790: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
59794: 4a39 0008 0cd4 tstb 80cd4 <_TOD_Is_set>
5979a: 660c bnes 597a8 <rtems_timer_fire_when+0x24>
5979c: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5979e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597a4: 4e5e unlk %fp 597a6: 4e75 rts
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
597a8: 2f02 movel %d2,%sp@- 597aa: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 597b0: 588f addql #4,%sp 597b2: 4a00 tstb %d0
597b4: 671a beqs 597d0 <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
597b6: 4a83 tstl %d3 597b8: 6700 00a8 beqw 59862 <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597bc: 2f02 movel %d2,%sp@- 597be: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
597c4: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597c6: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
597c8: b0b9 0008 0d52 cmpl 80d52 <_TOD_Now>,%d0
597ce: 620c bhis 597dc <rtems_timer_fire_when+0x58>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
597d0: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
597d2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597d8: 4e5e unlk %fp 597da: 4e75 rts 597dc: 486e fffc pea %fp@(-4) 597e0: 2f2e 0008 movel %fp@(8),%sp@- 597e4: 4879 0008 1582 pea 81582 <_Timer_Information> 597ea: 4eb9 0005 c3a4 jsr 5c3a4 <_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 ) {
597f0: 4fef 000c lea %sp@(12),%sp 597f4: 2440 moveal %d0,%a2 597f6: 4aae fffc tstl %fp@(-4)
597fa: 665a bnes 59856 <rtems_timer_fire_when+0xd2> <== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
597fc: 2800 movel %d0,%d4 597fe: 0684 0000 0010 addil #16,%d4 59804: 2f04 movel %d4,%sp@- 59806: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
5980c: 202e 0008 movel %fp@(8),%d0 59810: 2540 0030 movel %d0,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59814: 94b9 0008 0d52 subl 80d52 <_TOD_Now>,%d2
the_timer->the_class = TIMER_TIME_OF_DAY;
5981a: 7002 moveq #2,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
5981c: 256e 0014 0034 movel %fp@(20),%a2@(52) 59822: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59826: 2542 001c movel %d2,%a2@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
5982a: 2543 002c movel %d3,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5982e: 42aa 0018 clrl %a2@(24)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
59832: 2f04 movel %d4,%sp@- 59834: 4879 0008 0d8c pea 80d8c <_Watchdog_Seconds_chain> 5983a: 4eb9 0005 e214 jsr 5e214 <_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();
59840: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59846: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
5984a: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5984c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 59852: 4e5e unlk %fp 59854: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59856: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59858: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5985e: 4e5e unlk %fp 59860: 4e75 rts
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
59862: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59864: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5986a: 4e5e unlk %fp
...
00059b94 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
59b94: 4e56 fffc linkw %fp,#-4 59b98: 202e 0008 movel %fp@(8),%d0 59b9c: 2f03 movel %d3,%sp@- 59b9e: 2f02 movel %d2,%sp@- 59ba0: 4a80 tstl %d0
59ba2: 6748 beqs 59bec <rtems_timer_initiate_server+0x58>
59ba4: 4281 clrl %d1 59ba6: 1239 0007 b132 moveb 7b132 <rtems_maximum_priority>,%d1 59bac: b280 cmpl %d0,%d1
59bae: 644a bccs 59bfa <rtems_timer_initiate_server+0x66>
* 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 )
59bb0: 72ff moveq #-1,%d1 59bb2: b280 cmpl %d0,%d1
59bb4: 6636 bnes 59bec <rtems_timer_initiate_server+0x58>
59bb6: 2239 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d1 59bbc: 5281 addql #1,%d1 59bbe: 4283 clrl %d3 59bc0: 23c1 0008 0cc0 movel %d1,80cc0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59bc6: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59bc8: 1439 0007 c10c moveb 7c10c <initialized.4095>,%d2
initialized = true;
59bce: 13c0 0007 c10c moveb %d0,7c10c <initialized.4095>
_Thread_Enable_dispatch();
59bd4: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59bda: 4a02 tstb %d2
59bdc: 6744 beqs 59c22 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
59bde: 242e fff4 movel %fp@(-12),%d2
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
59be2: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59be4: 262e fff8 movel %fp@(-8),%d3 59be8: 4e5e unlk %fp 59bea: 4e75 rts 59bec: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59bf0: 7013 moveq #19,%d0
}
59bf2: 262e fff8 movel %fp@(-8),%d3 59bf6: 4e5e unlk %fp 59bf8: 4e75 rts 59bfa: 2239 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d1 59c00: 5281 addql #1,%d1 59c02: 2600 movel %d0,%d3 59c04: 23c1 0008 0cc0 movel %d1,80cc0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59c0a: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59c0c: 1439 0007 c10c moveb 7c10c <initialized.4095>,%d2
initialized = true;
59c12: 13c0 0007 c10c moveb %d0,7c10c <initialized.4095>
_Thread_Enable_dispatch();
59c18: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59c1e: 4a02 tstb %d2
59c20: 66bc bnes 59bde <rtems_timer_initiate_server+0x4a><== NEVER TAKEN
* 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(
59c22: 486e fffc pea %fp@(-4) 59c26: 222e 0010 movel %fp@(16),%d1 59c2a: 08c1 000f bset #15,%d1 59c2e: 2f01 movel %d1,%sp@- 59c30: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 59c34: 2f2e 000c movel %fp@(12),%sp@- 59c38: 2f03 movel %d3,%sp@- 59c3a: 2f3c 5449 4d45 movel #1414090053,%sp@- 59c40: 4eb9 0005 8c28 jsr 58c28 <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) {
59c46: 4fef 0018 lea %sp@(24),%sp 59c4a: 4a80 tstl %d0
59c4c: 6714 beqs 59c62 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
59c4e: 242e fff4 movel %fp@(-12),%d2
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59c52: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
59c54: 262e fff8 movel %fp@(-8),%d3 59c58: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59c5a: 13c1 0007 c10c moveb %d1,7c10c <initialized.4095>
initialized = false;
}
#endif
return status;
}
59c60: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c62: 41f9 0007 c142 lea 7c142 <_Timer_server_Default+0x34>,%a0
/*
* 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(
59c68: 4282 clrl %d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c6a: 223c 0007 c13e movel #508222,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c70: 23c8 0007 c13e movel %a0,7c13e <_Timer_server_Default+0x30>
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
59c76: 202e fffc movel %fp@(-4),%d0 59c7a: 41f9 0007 c17a lea 7c17a <_Timer_server_Default+0x6c>,%a0 59c80: 23c8 0007 c176 movel %a0,7c176 <_Timer_server_Default+0x68>
/*
* 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(
59c86: 2079 0008 0c4a moveal 80c4a <_RTEMS_tasks_Information+0x18>,%a0 59c8c: 3400 movew %d0,%d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c8e: 23c1 0007 c146 movel %d1,7c146 <_Timer_server_Default+0x38>
* 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;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
59c94: 2239 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d1
/*
* 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(
59c9a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 59c9e: 23d0 0007 c10e movel %a0@,7c10e <_Timer_server_Default> 59ca4: 41f9 0007 c176 lea 7c176 <_Timer_server_Default+0x68>,%a0 59caa: 23c8 0007 c17e movel %a0,7c17e <_Timer_server_Default+0x70>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cb0: 4879 0007 c10e pea 7c10e <_Timer_server_Default>
the_watchdog->routine = routine;
59cb6: 41f9 0005 cba4 lea 5cba4 <_Thread_Delay_ended>,%a0 59cbc: 23c8 0007 c132 movel %a0,7c132 <_Timer_server_Default+0x24> 59cc2: 487a 0160 pea %pc@(59e24 <_Timer_server_Body>) 59cc6: 23c8 0007 c16a movel %a0,7c16a <_Timer_server_Default+0x5c>
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59ccc: 41f9 0008 0d52 lea 80d52 <_TOD_Now>,%a0
* 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;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
59cd2: 23c1 0007 c14a movel %d1,7c14a <_Timer_server_Default+0x3c>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59cd8: 23d0 0007 c182 movel %a0@,7c182 <_Timer_server_Default+0x74>
/*
* 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;
59cde: 223c 0005 a060 movel #368736,%d1
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59ce4: 41f9 0007 c10e lea 7c10e <_Timer_server_Default>,%a0
/*
* 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;
59cea: 23c1 0007 c112 movel %d1,7c112 <_Timer_server_Default+0x4>
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
ts->active = false;
59cf0: 4201 clrb %d1
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
59cf2: 42b9 0007 c186 clrl 7c186 <_Timer_server_Default+0x78>
ts->active = false;
59cf8: 13c1 0007 c18a moveb %d1,7c18a <_Timer_server_Default+0x7c>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cfe: 2f00 movel %d0,%sp@-
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59d00: 23c8 0008 15bc movel %a0,815bc <_Timer_server>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
59d06: 42b9 0007 c142 clrl 7c142 <_Timer_server_Default+0x34> 59d0c: 42b9 0007 c17a clrl 7c17a <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d12: 42b9 0007 c11e clrl 7c11e <_Timer_server_Default+0x10>
the_watchdog->routine = routine; the_watchdog->id = id;
59d18: 23c0 0007 c136 movel %d0,7c136 <_Timer_server_Default+0x28>
the_watchdog->user_data = user_data;
59d1e: 42b9 0007 c13a clrl 7c13a <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d24: 42b9 0007 c156 clrl 7c156 <_Timer_server_Default+0x48>
the_watchdog->routine = routine; the_watchdog->id = id;
59d2a: 23c0 0007 c16e movel %d0,7c16e <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59d30: 42b9 0007 c172 clrl 7c172 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
59d36: 4eb9 0005 9330 jsr 59330 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59d3c: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59d40: 4fef 000c lea %sp@(12),%sp
}
59d44: 262e fff8 movel %fp@(-8),%d3
59d48: 4e5e unlk %fp <== NOT EXECUTED
00059908 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
59908: 4e56 fff0 linkw %fp,#-16 5990c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59910: 486e fffc pea %fp@(-4) 59914: 2f2e 0008 movel %fp@(8),%sp@- 59918: 4879 0008 1582 pea 81582 <_Timer_Information> 5991e: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59924: 4fef 000c lea %sp@(12),%sp 59928: 2440 moveal %d0,%a2 5992a: 4aae fffc tstl %fp@(-4)
5992e: 670e beqs 5993e <rtems_timer_reset+0x36>
59930: 7404 moveq #4,%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59932: 2002 movel %d2,%d0 59934: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5993a: 4e5e unlk %fp 5993c: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5993e: 202a 0038 movel %a2@(56),%d0
59942: 671a beqs 5995e <rtems_timer_reset+0x56>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59944: 7201 moveq #1,%d1 59946: b280 cmpl %d0,%d1
59948: 673c beqs 59986 <rtems_timer_reset+0x7e>
5994a: 740b moveq #11,%d2
* 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();
5994c: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59952: 2002 movel %d2,%d0 59954: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5995a: 4e5e unlk %fp 5995c: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
5995e: 45ea 0010 lea %a2@(16),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59962: 4282 clrl %d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
59964: 2f0a movel %a2,%sp@- 59966: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
5996c: 2f0a movel %a2,%sp@- 5996e: 4879 0008 0d98 pea 80d98 <_Watchdog_Ticks_chain> 59974: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert> 5997a: 4fef 000c lea %sp@(12),%sp
* 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();
5997e: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 59984: 60cc bras 59952 <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59986: 486a 0010 pea %a2@(16)
(*timer_server->schedule_operation)( timer_server, the_timer );
5998a: 4282 clrl %d2
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
5998c: 2679 0008 15bc moveal 815bc <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59992: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
59998: 2f0a movel %a2,%sp@- 5999a: 2f0b movel %a3,%sp@- 5999c: 206b 0004 moveal %a3@(4),%a0 599a0: 4e90 jsr %a0@ 599a2: 4fef 000c lea %sp@(12),%sp
* 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();
599a6: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 599ac: 60a4 bras 59952 <rtems_timer_reset+0x4a>
...
00059a98 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59a98: 4e56 ffec linkw %fp,#-20 59a9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59aa0: 242e 000c movel %fp@(12),%d2 59aa4: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
59aa8: 2479 0008 15bc moveal 815bc <_Timer_server>,%a2
if ( !timer_server )
59aae: 4a8a tstl %a2 59ab0: 6700 00c8 beqw 59b7a <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59ab4: 4a39 0008 0cd4 tstb 80cd4 <_TOD_Is_set> 59aba: 6700 00a6 beqw 59b62 <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
59abe: 4a83 tstl %d3 59ac0: 6700 00ac beqw 59b6e <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
59ac4: 2f02 movel %d2,%sp@- 59ac6: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 59acc: 588f addql #4,%sp 59ace: 4a00 tstb %d0
59ad0: 660c bnes 59ade <rtems_timer_server_fire_when+0x46>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
59ad2: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59ad4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59ada: 4e5e unlk %fp 59adc: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ade: 2f02 movel %d2,%sp@- 59ae0: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
59ae6: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ae8: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
59aea: b0b9 0008 0d52 cmpl 80d52 <_TOD_Now>,%d0
59af0: 63e0 blss 59ad2 <rtems_timer_server_fire_when+0x3a>
59af2: 486e fffc pea %fp@(-4) 59af6: 2f2e 0008 movel %fp@(8),%sp@- 59afa: 4879 0008 1582 pea 81582 <_Timer_Information> 59b00: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b06: 4fef 000c lea %sp@(12),%sp 59b0a: 2640 moveal %d0,%a3 59b0c: 4aae fffc tstl %fp@(-4)
59b10: 6674 bnes 59b86 <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
59b12: 486b 0010 pea %a3@(16) 59b16: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
the_watchdog->routine = routine; the_watchdog->id = id;
59b1c: 202e 0008 movel %fp@(8),%d0 59b20: 2740 0030 movel %d0,%a3@(48)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59b24: 94b9 0008 0d52 subl 80d52 <_TOD_Now>,%d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
59b2a: 7003 moveq #3,%d0
the_watchdog->user_data = user_data;
59b2c: 276e 0014 0034 movel %fp@(20),%a3@(52) 59b32: 2740 0038 movel %d0,%a3@(56)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59b36: 2742 001c movel %d2,%a3@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
59b3a: 2743 002c movel %d3,%a3@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59b3e: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
59b42: 2f0b movel %a3,%sp@- 59b44: 2f0a movel %a2,%sp@- 59b46: 206a 0004 moveal %a2@(4),%a0 59b4a: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59b4c: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59b52: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
59b56: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b58: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b5e: 4e5e unlk %fp 59b60: 4e75 rts
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59b62: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b64: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59b6a: 4e5e unlk %fp <== NOT EXECUTED 59b6c: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
59b6e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b70: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b76: 4e5e unlk %fp 59b78: 4e75 rts
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
59b7a: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b7c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b82: 4e5e unlk %fp 59b84: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b86: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b88: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b8e: 4e5e unlk %fp
...
000471d8 <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
471d8: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
471da: 4e56 0000 linkw %fp,#0 471de: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
471e2: b081 cmpl %d1,%d0
471e4: 6412 bccs 471f8 <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
471e6: 4eb9 0005 1534 jsr 51534 <__errno> 471ec: 7216 moveq #22,%d1 471ee: 2040 moveal %d0,%a0 471f0: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
471f2: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
471f4: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
471f6: 4e75 rts
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
471f8: 103c 0001 moveb #1,%d0 471fc: e3a8 lsll %d1,%d0 471fe: 7217 moveq #23,%d1 47200: c081 andl %d1,%d0
47202: 67e2 beqs 471e6 <sched_get_priority_max+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
47204: 4280 clrl %d0 47206: 1039 0006 1086 moveb 61086 <rtems_maximum_priority>,%d0
}
4720c: 4e5e unlk %fp
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
4720e: 5380 subql #1,%d0
}
...
00047214 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47214: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
47216: 4e56 0000 linkw %fp,#0 4721a: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
4721e: b081 cmpl %d1,%d0
47220: 6412 bccs 47234 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47222: 4eb9 0005 1534 jsr 51534 <__errno> 47228: 7216 moveq #22,%d1 4722a: 2040 moveal %d0,%a0 4722c: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
4722e: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47230: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47232: 4e75 rts
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47234: 103c 0001 moveb #1,%d0 47238: e3a8 lsll %d1,%d0 4723a: 7217 moveq #23,%d1 4723c: c081 andl %d1,%d0
4723e: 67e2 beqs 47222 <sched_get_priority_min+0xe> <== NEVER TAKEN
47240: 7001 moveq #1,%d0
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47242: 4e5e unlk %fp
...
00047248 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
47248: 4e56 0000 linkw %fp,#0 4724c: 2f03 movel %d3,%sp@- 4724e: 262e 0008 movel %fp@(8),%d3 47252: 2f02 movel %d2,%sp@- 47254: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
47258: 4a83 tstl %d3
4725a: 6622 bnes 4727e <sched_rr_get_interval+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
4725c: 4a82 tstl %d2
4725e: 6742 beqs 472a2 <sched_rr_get_interval+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
47260: 2f02 movel %d2,%sp@- 47262: 2f39 0006 27dc movel 627dc <_Thread_Ticks_per_timeslice>,%sp@- 47268: 4eb9 0004 ab20 jsr 4ab20 <_Timespec_From_ticks>
return 0; }
4726e: 242e fff8 movel %fp@(-8),%d2
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
47272: 508f addql #8,%sp
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
47274: 4280 clrl %d0
return 0; }
47276: 262e fffc movel %fp@(-4),%d3 4727a: 4e5e unlk %fp 4727c: 4e75 rts
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
4727e: 4eb9 0004 378c jsr 4378c <getpid> 47284: b680 cmpl %d0,%d3
47286: 67d4 beqs 4725c <sched_rr_get_interval+0x14>
rtems_set_errno_and_return_minus_one( ESRCH );
47288: 4eb9 0005 1534 jsr 51534 <__errno> 4728e: 7403 moveq #3,%d2 47290: 2040 moveal %d0,%a0 47292: 70ff moveq #-1,%d0 47294: 2082 movel %d2,%a0@
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
47296: 242e fff8 movel %fp@(-8),%d2 4729a: 262e fffc movel %fp@(-4),%d3 4729e: 4e5e unlk %fp 472a0: 4e75 rts
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472a2: 4eb9 0005 1534 jsr 51534 <__errno>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
472a8: 242e fff8 movel %fp@(-8),%d2
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472ac: 2040 moveal %d0,%a0 472ae: 7216 moveq #22,%d1 472b0: 70ff moveq #-1,%d0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
472b2: 262e fffc movel %fp@(-4),%d3 472b6: 4e5e unlk %fp
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472b8: 2081 movel %d1,%a0@ <== NOT EXECUTED
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
00049404 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
49404: 4e56 ffe0 linkw %fp,#-32
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
49408: 2039 0006 64b8 movel 664b8 <_Thread_Dispatch_disable_level>,%d0 4940e: 5280 addql #1,%d0 49410: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49414: 23c0 0006 64b8 movel %d0,664b8 <_Thread_Dispatch_disable_level> 4941a: 2a2e 0008 movel %fp@(8),%d5 4941e: 262e 000c movel %fp@(12),%d3
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
49422: 2803 movel %d3,%d4 49424: 0284 0000 0200 andil #512,%d4 4942a: 6600 0086 bnew 494b2 <sem_open+0xae> 4942e: 95ca subal %a2,%a2
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 );
49430: 486e fffc pea %fp@(-4) 49434: 2f05 movel %d5,%sp@- 49436: 4eb9 0005 0810 jsr 50810 <_POSIX_Semaphore_Name_to_id>
* 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 ) {
4943c: 508f addql #8,%sp
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 );
4943e: 2400 movel %d0,%d2
* 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 ) {
49440: 6726 beqs 49468 <sem_open+0x64>
/*
* 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) ) ) {
49442: 7002 moveq #2,%d0 49444: b082 cmpl %d2,%d0
49446: 6604 bnes 4944c <sem_open+0x48> <== NEVER TAKEN
49448: 4a84 tstl %d4
4944a: 666e bnes 494ba <sem_open+0xb6>
_Thread_Enable_dispatch();
4944c: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
49452: 4eb9 0005 45e8 jsr 545e8 <__errno> 49458: 2040 moveal %d0,%a0 4945a: 70ff moveq #-1,%d0 4945c: 2082 movel %d2,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
4945e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49464: 4e5e unlk %fp 49466: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
49468: 0283 0000 0a00 andil #2560,%d3 4946e: 0c83 0000 0a00 cmpil #2560,%d3
49474: 676e beqs 494e4 <sem_open+0xe0>
49476: 486e fff4 pea %fp@(-12)
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
4947a: 45f9 0004 bf3c lea 4bf3c <_Thread_Enable_dispatch>,%a2 49480: 2f2e fffc movel %fp@(-4),%sp@- 49484: 4879 0006 6712 pea 66712 <_POSIX_Semaphore_Information> 4948a: 4eb9 0004 b65c jsr 4b65c <_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 );
the_semaphore->open_count += 1;
49490: 2040 moveal %d0,%a0 49492: 52a8 0016 addql #1,%a0@(22)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
49496: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
4949a: 4e92 jsr %a2@
_Thread_Enable_dispatch();
4949c: 4e92 jsr %a2@
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;
4949e: 202e fff8 movel %fp@(-8),%d0
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
_Thread_Enable_dispatch();
goto return_id;
494a2: 4fef 000c lea %sp@(12),%sp
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;
494a6: 5080 addql #8,%d0
#endif return id; }
494a8: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 494ae: 4e5e unlk %fp 494b0: 4e75 rts
_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 );
494b2: 246e 0014 moveal %fp@(20),%a2 494b6: 6000 ff78 braw 49430 <sem_open+0x2c>
/*
* 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(
494ba: 486e fff8 pea %fp@(-8) 494be: 2f0a movel %a2,%sp@- 494c0: 42a7 clrl %sp@- 494c2: 2f05 movel %d5,%sp@- 494c4: 4eb9 0005 0658 jsr 50658 <_POSIX_Semaphore_Create_support> 494ca: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
494cc: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
if ( status == -1 )
494d2: 4fef 0010 lea %sp@(16),%sp 494d6: 70ff moveq #-1,%d0 494d8: b082 cmpl %d2,%d0
494da: 6782 beqs 4945e <sem_open+0x5a>
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;
494dc: 202e fff8 movel %fp@(-8),%d0 494e0: 5080 addql #8,%d0 494e2: 60c4 bras 494a8 <sem_open+0xa4>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
494e4: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
494ea: 4eb9 0005 45e8 jsr 545e8 <__errno> 494f0: 7211 moveq #17,%d1 494f2: 2040 moveal %d0,%a0 494f4: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
494f6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
494fc: 2081 movel %d1,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
494fe: 4e5e unlk %fp
...
0004955c <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
4955c: 4e56 fffc linkw %fp,#-4 49560: 2f02 movel %d2,%sp@-
* * 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 );
49562: 486e fffc pea %fp@(-4) 49566: 2f2e 000c movel %fp@(12),%sp@-
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
4956a: 242e 0008 movel %fp@(8),%d2
* * 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 );
4956e: 4eb9 0004 fc1c jsr 4fc1c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
49574: 508f addql #8,%sp 49576: 7203 moveq #3,%d1 49578: b280 cmpl %d0,%d1
4957a: 671a beqs 49596 <sem_timedwait+0x3a> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
4957c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 49580: 42a7 clrl %sp@- <== NOT EXECUTED 49582: 2f02 movel %d2,%sp@- <== NOT EXECUTED 49584: 4eb9 0005 0888 jsr 50888 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
4958a: 242e fff8 movel %fp@(-8),%d2 <== 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 );
4958e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
}
}
return lock_status;
}
49592: 4e5e unlk %fp <== NOT EXECUTED 49594: 4e75 rts <== 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 );
49596: 2f2e fffc movel %fp@(-4),%sp@- 4959a: 4878 0001 pea 1 <ADD> 4959e: 2f02 movel %d2,%sp@- 495a0: 4eb9 0005 0888 jsr 50888 <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
495a6: 242e fff8 movel %fp@(-8),%d2
*/
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 );
495aa: 4fef 000c lea %sp@(12),%sp
break;
}
}
return lock_status;
}
495ae: 4e5e unlk %fp
...
00047040 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
47040: 4e56 fff4 linkw %fp,#-12 47044: 226e 0010 moveal %fp@(16),%a1 47048: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4704c: 242e 0008 movel %fp@(8),%d2 47050: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
47054: 4a89 tstl %a1
47056: 6718 beqs 47070 <sigaction+0x30>
*oact = _POSIX_signals_Vectors[ sig ];
47058: 2202 movel %d2,%d1 4705a: 2002 movel %d2,%d0 4705c: e989 lsll #4,%d1 4705e: e588 lsll #2,%d0 47060: 2041 moveal %d1,%a0 47062: 91c0 subal %d0,%a0 47064: d1fc 0006 381e addal #407582,%a0 4706a: 22d8 movel %a0@+,%a1@+ 4706c: 22d8 movel %a0@+,%a1@+ 4706e: 2290 movel %a0@,%a1@
if ( !sig )
47070: 4a82 tstl %d2
47072: 6778 beqs 470ec <sigaction+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
47074: 2002 movel %d2,%d0 47076: 5380 subql #1,%d0 47078: 721f moveq #31,%d1 4707a: b280 cmpl %d0,%d1
4707c: 656e bcss 470ec <sigaction+0xac>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
4707e: 7009 moveq #9,%d0 47080: b082 cmpl %d2,%d0
47082: 6768 beqs 470ec <sigaction+0xac>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
47084: 4a8a tstl %a2
47086: 6736 beqs 470be <sigaction+0x7e> <== 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 );
47088: 203c 0000 0700 movel #1792,%d0 4708e: 40c3 movew %sr,%d3 47090: 8083 orl %d3,%d0 47092: 46c0 movew %d0,%sr
if ( act->sa_handler == SIG_DFL ) {
47094: 4aaa 0008 tstl %a2@(8)
47098: 6730 beqs 470ca <sigaction+0x8a>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
4709a: 2f02 movel %d2,%sp@- 4709c: 4eb9 0004 da1c jsr 4da1c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
470a2: 588f addql #4,%sp 470a4: 2202 movel %d2,%d1 470a6: 224a moveal %a2,%a1 470a8: e989 lsll #4,%d1 470aa: e58a lsll #2,%d2 470ac: 2041 moveal %d1,%a0 470ae: 91c2 subal %d2,%a0 470b0: d1fc 0006 381e addal #407582,%a0 470b6: 20d9 movel %a1@+,%a0@+ 470b8: 20d9 movel %a1@+,%a0@+ 470ba: 2091 movel %a1@,%a0@
}
_ISR_Enable( level );
470bc: 46c3 movew %d3,%sr 470be: 4280 clrl %d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
470c0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 470c6: 4e5e unlk %fp 470c8: 4e75 rts
* 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 ];
470ca: 2002 movel %d2,%d0 470cc: e58a lsll #2,%d2 470ce: e988 lsll #4,%d0 470d0: 9082 subl %d2,%d0 470d2: 2040 moveal %d0,%a0 470d4: 2240 moveal %d0,%a1 470d6: d1fc 0006 381e addal #407582,%a0 470dc: d3fc 0006 0c6a addal #396394,%a1 470e2: 20d9 movel %a1@+,%a0@+ 470e4: 20d9 movel %a1@+,%a0@+ 470e6: 2091 movel %a1@,%a0@
} else {
_POSIX_signals_Clear_process_signals( sig );
_POSIX_signals_Vectors[ sig ] = *act;
}
_ISR_Enable( level );
470e8: 46c3 movew %d3,%sr 470ea: 60d2 bras 470be <sigaction+0x7e>
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
470ec: 4eb9 0005 1618 jsr 51618 <__errno> 470f2: 7216 moveq #22,%d1 470f4: 2040 moveal %d0,%a0 470f6: 70ff moveq #-1,%d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
470f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
470fe: 2081 movel %d1,%a0@
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
47100: 4e5e unlk %fp <== NOT EXECUTED
00047104 <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
47104: 4e56 0000 linkw %fp,#0 47108: 206e 0008 moveal %fp@(8),%a0 4710c: 202e 000c movel %fp@(12),%d0 47110: 2f02 movel %d2,%sp@-
if ( !set )
47112: 4a88 tstl %a0
47114: 671e beqs 47134 <sigaddset+0x30> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
47116: 4a80 tstl %d0
47118: 671a beqs 47134 <sigaddset+0x30> <== NEVER TAKEN
4711a: 2400 movel %d0,%d2 4711c: 5382 subql #1,%d2
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
4711e: 701f moveq #31,%d0 47120: b082 cmpl %d2,%d0
47122: 6510 bcss 47134 <sigaddset+0x30> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
47124: 7201 moveq #1,%d1 47126: 4280 clrl %d0 47128: e5a9 lsll %d2,%d1
return 0; }
4712a: 242e fffc movel %fp@(-4),%d2 4712e: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
47130: 8390 orl %d1,%a0@
return 0; }
47132: 4e75 rts
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
47134: 4eb9 0005 1618 jsr 51618 <__errno>
*set |= signo_to_mask(signo);
return 0;
}
4713a: 242e fffc movel %fp@(-4),%d2
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
4713e: 2040 moveal %d0,%a0 47140: 7216 moveq #22,%d1 47142: 70ff moveq #-1,%d0
*set |= signo_to_mask(signo);
return 0;
}
47144: 4e5e unlk %fp
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
47146: 2081 movel %d1,%a0@
*set |= signo_to_mask(signo);
return 0;
}
...
00049554 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
49554: 4e56 ffec linkw %fp,#-20 49558: 48d7 040c moveml %d2-%d3/%a2,%sp@
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
4955c: 240e movel %fp,%d2 4955e: 5982 subql #4,%d2 49560: 45f9 0004 952c lea 4952c <sigprocmask>,%a2
(void) sigfillset( &all_signals );
49566: 260e movel %fp,%d3 49568: 5183 subql #8,%d3
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
4956a: 2f02 movel %d2,%sp@- 4956c: 2f2e 0008 movel %fp@(8),%sp@- 49570: 4878 0001 pea 1 <ADD> 49574: 4e92 jsr %a2@
(void) sigfillset( &all_signals );
49576: 2f03 movel %d3,%sp@- 49578: 4eb9 0004 9488 jsr 49488 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
4957e: 42a7 clrl %sp@- 49580: 42a7 clrl %sp@- 49582: 2f03 movel %d3,%sp@- 49584: 4eb9 0004 9610 jsr 49610 <sigtimedwait> 4958a: 2600 movel %d0,%d3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
4958c: 42a7 clrl %sp@- 4958e: 2f02 movel %d2,%sp@- 49590: 42a7 clrl %sp@- 49592: 4e92 jsr %a2@
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
49594: 4fef 0028 lea %sp@(40),%sp 49598: 70ff moveq #-1,%d0 4959a: b083 cmpl %d3,%d0
4959c: 660c bnes 495aa <sigsuspend+0x56> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
4959e: 70ff moveq #-1,%d0 <== NOT EXECUTED 495a0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 495a6: 4e5e unlk %fp <== NOT EXECUTED 495a8: 4e75 rts <== NOT EXECUTED
/*
* 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 );
495aa: 4eb9 0005 38b0 jsr 538b0 <__errno> 495b0: 2040 moveal %d0,%a0 495b2: 7004 moveq #4,%d0
return status;
}
495b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
/*
* 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 );
495ba: 2080 movel %d0,%a0@
return status;
}
495bc: 70ff moveq #-1,%d0 495be: 4e5e unlk %fp
...
000497f8 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
497f8: 4e56 0000 linkw %fp,#0 497fc: 2f0a movel %a2,%sp@-
int status;
status = sigtimedwait( set, NULL, NULL );
497fe: 42a7 clrl %sp@-
int sigwait(
const sigset_t *set,
int *sig
)
{
49800: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
49804: 42a7 clrl %sp@- 49806: 2f2e 0008 movel %fp@(8),%sp@- 4980a: 4eb9 0004 9610 jsr 49610 <sigtimedwait>
if ( status != -1 ) {
49810: 4fef 000c lea %sp@(12),%sp 49814: 72ff moveq #-1,%d1 49816: b280 cmpl %d0,%d1
49818: 6710 beqs 4982a <sigwait+0x32>
if ( sig )
4981a: 4a8a tstl %a2
4981c: 6702 beqs 49820 <sigwait+0x28> <== NEVER TAKEN
*sig = status;
4981e: 2480 movel %d0,%a2@
return 0;
}
return errno;
}
49820: 246e fffc moveal %fp@(-4),%a2
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
49824: 4280 clrl %d0
return 0;
}
return errno;
}
49826: 4e5e unlk %fp 49828: 4e75 rts
if ( sig )
*sig = status;
return 0;
}
return errno;
4982a: 4eb9 0005 38b0 jsr 538b0 <__errno>
}
49830: 246e fffc moveal %fp@(-4),%a2
if ( sig )
*sig = status;
return 0;
}
return errno;
49834: 2040 moveal %d0,%a0
}
49836: 4e5e unlk %fp
if ( sig )
*sig = status;
return 0;
}
return errno;
49838: 2010 movel %a0@,%d0 <== NOT EXECUTED
}
000463cc <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
463cc: 4e56 ffc8 linkw %fp,#-56 463d0: 202e 000c movel %fp@(12),%d0 463d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 463d8: 266e 0010 moveal %fp@(16),%a3 463dc: 282e 0014 movel %fp@(20),%d4
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
463e0: 4a8b tstl %a3 463e2: 6700 0194 beqw 46578 <timer_settime+0x1ac>
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 ) ||
463e6: 223c 3b9a c9ff movel #999999999,%d1 463ec: b2ab 000c cmpl %a3@(12),%d1 463f0: 6500 0186 bcsw 46578 <timer_settime+0x1ac>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
463f4: b2ab 0004 cmpl %a3@(4),%d1 463f8: 6500 017e bcsw 46578 <timer_settime+0x1ac>
( 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 ) {
463fc: 7204 moveq #4,%d1 463fe: b280 cmpl %d0,%d1 46400: 6700 00fa beqw 464fc <timer_settime+0x130> 46404: 4a80 tstl %d0 46406: 6600 0170 bnew 46578 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
4640a: 260e movel %fp,%d3 4640c: 0683 ffff ffe4 addil #-28,%d3 46412: 204b moveal %a3,%a0 46414: 2243 moveal %d3,%a1 46416: 240e movel %fp,%d2 46418: 0682 ffff ffe8 addil #-24,%d2 4641e: 49ee ffec lea %fp@(-20),%a4 46422: 4bee fff0 lea %fp@(-16),%a5 46426: 2298 movel %a0@+,%a1@ 46428: 2242 moveal %d2,%a1 4642a: 2298 movel %a0@+,%a1@ 4642c: 2898 movel %a0@+,%a4@ 4642e: 2a90 movel %a0@,%a5@
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
46430: 486e fffc pea %fp@(-4) 46434: 2f2e 0008 movel %fp@(8),%sp@- 46438: 4879 0006 23d0 pea 623d0 <_POSIX_Timer_Information> 4643e: 4eb9 0004 88b8 jsr 488b8 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
46444: 4fef 000c lea %sp@(12),%sp 46448: 2440 moveal %d0,%a2 4644a: 4aae fffc tstl %fp@(-4) 4644e: 6600 0128 bnew 46578 <timer_settime+0x1ac>
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 ) {
46452: 4aae ffec tstl %fp@(-20)
46456: 6608 bnes 46460 <timer_settime+0x94>
46458: 4aae fff0 tstl %fp@(-16) 4645c: 6700 0132 beqw 46590 <timer_settime+0x1c4>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
46460: 2f0b movel %a3,%sp@- 46462: 47f9 0004 a068 lea 4a068 <_Timespec_To_ticks>,%a3 46468: 4e93 jsr %a3@ 4646a: 2540 0062 movel %d0,%a2@(98)
initial_period = _Timespec_To_ticks( &normalize.it_value );
4646e: 2f0c movel %a4,%sp@- 46470: 4e93 jsr %a3@
activated = _POSIX_Timer_Insert_helper(
46472: 2f0a movel %a2,%sp@- 46474: 4879 0004 6698 pea 46698 <_POSIX_Timer_TSR> 4647a: 2f2a 0008 movel %a2@(8),%sp@- 4647e: 2f00 movel %d0,%sp@- 46480: 486a 0010 pea %a2@(16) 46484: 4eb9 0004 d5e8 jsr 4d5e8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
4648a: 4fef 001c lea %sp@(28),%sp 4648e: 4a00 tstb %d0 46490: 6700 0166 beqw 465f8 <timer_settime+0x22c>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
46494: 4a84 tstl %d4 46496: 6700 0172 beqw 4660a <timer_settime+0x23e>
*ovalue = ptimer->timer_data;
4649a: 220a movel %a2,%d1 4649c: 0681 0000 0052 addil #82,%d1 464a2: 2044 moveal %d4,%a0 464a4: 2241 moveal %d1,%a1 464a6: 200a movel %a2,%d0 464a8: 0680 0000 0056 addil #86,%d0 464ae: 47ea 005a lea %a2@(90),%a3 464b2: 280a movel %a2,%d4 464b4: 0684 0000 005e addil #94,%d4 464ba: 20d1 movel %a1@,%a0@+ 464bc: 2240 moveal %d0,%a1 464be: 20d1 movel %a1@,%a0@+ 464c0: 2244 moveal %d4,%a1 464c2: 20d3 movel %a3@,%a0@+ 464c4: 2091 movel %a1@,%a0@
ptimer->timer_data = normalize;
464c6: 2041 moveal %d1,%a0 464c8: 2243 moveal %d3,%a1 464ca: 2091 movel %a1@,%a0@ 464cc: 2040 moveal %d0,%a0 464ce: 2242 moveal %d2,%a1 464d0: 2091 movel %a1@,%a0@ 464d2: 2044 moveal %d4,%a0 464d4: 2694 movel %a4@,%a3@ 464d6: 2095 movel %a5@,%a0@
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
464d8: 7003 moveq #3,%d0 464da: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
464de: 486a 006a pea %a2@(106) 464e2: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
_Thread_Enable_dispatch();
464e8: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch>
return 0;
464ee: 588f addql #4,%sp
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
464f0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
464f2: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 464f8: 4e5e unlk %fp 464fa: 4e75 rts
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
464fc: 260e movel %fp,%d3 464fe: 0683 ffff ffe4 addil #-28,%d3 46504: 204b moveal %a3,%a0 46506: 2243 moveal %d3,%a1 46508: 240e movel %fp,%d2 4650a: 0682 ffff ffe8 addil #-24,%d2 46510: 200e movel %fp,%d0 46512: 0680 ffff ffec addil #-20,%d0
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
46518: 2840 moveal %d0,%a4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
4651a: 4bee fff0 lea %fp@(-16),%a5
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
4651e: 45ee fff4 lea %fp@(-12),%a2
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
46522: 2298 movel %a0@+,%a1@ 46524: 2242 moveal %d2,%a1 46526: 2298 movel %a0@+,%a1@ 46528: 2898 movel %a0@+,%a4@ 4652a: 2a90 movel %a0@,%a5@
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
4652c: 2f0a movel %a2,%sp@- 4652e: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
46534: 2f0c movel %a4,%sp@- 46536: 2f0a movel %a2,%sp@- 46538: 4eb9 0004 9fe0 jsr 49fe0 <_Timespec_Greater_than> 4653e: 4fef 000c lea %sp@(12),%sp 46542: 4a00 tstb %d0
46544: 6632 bnes 46578 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
46546: 2f0c movel %a4,%sp@- 46548: 2f0c movel %a4,%sp@- 4654a: 2f0a movel %a2,%sp@- 4654c: 4eb9 0004 a014 jsr 4a014 <_Timespec_Subtract> 46552: 4fef 000c lea %sp@(12),%sp 46556: 486e fffc pea %fp@(-4) 4655a: 2f2e 0008 movel %fp@(8),%sp@- 4655e: 4879 0006 23d0 pea 623d0 <_POSIX_Timer_Information> 46564: 4eb9 0004 88b8 jsr 488b8 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
4656a: 4fef 000c lea %sp@(12),%sp 4656e: 2440 moveal %d0,%a2 46570: 4aae fffc tstl %fp@(-4) 46574: 6700 fedc beqw 46452 <timer_settime+0x86>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
46578: 4eb9 0005 0e94 jsr 50e94 <__errno> 4657e: 7216 moveq #22,%d1 46580: 2040 moveal %d0,%a0 46582: 70ff moveq #-1,%d0
}
46584: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
4658a: 2081 movel %d1,%a0@
}
4658c: 4e5e unlk %fp 4658e: 4e75 rts
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 );
46590: 486a 0010 pea %a2@(16) 46594: 4eb9 0004 a4bc jsr 4a4bc <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
4659a: 588f addql #4,%sp 4659c: 4a84 tstl %d4 4659e: 6700 00b6 beqw 46656 <timer_settime+0x28a>
*ovalue = ptimer->timer_data;
465a2: 220a movel %a2,%d1 465a4: 0681 0000 0052 addil #82,%d1 465aa: 2244 moveal %d4,%a1 465ac: 2041 moveal %d1,%a0 465ae: 200a movel %a2,%d0 465b0: 0680 0000 0056 addil #86,%d0 465b6: 47ea 005a lea %a2@(90),%a3 465ba: 280a movel %a2,%d4 465bc: 0684 0000 005e addil #94,%d4 465c2: 22d0 movel %a0@,%a1@+ 465c4: 2040 moveal %d0,%a0 465c6: 22d0 movel %a0@,%a1@+ 465c8: 2044 moveal %d4,%a0 465ca: 22d3 movel %a3@,%a1@+ 465cc: 2290 movel %a0@,%a1@
/* The new data are set */
ptimer->timer_data = normalize;
465ce: 2241 moveal %d1,%a1 465d0: 2043 moveal %d3,%a0 465d2: 2290 movel %a0@,%a1@ 465d4: 2240 moveal %d0,%a1 465d6: 2042 moveal %d2,%a0 465d8: 2290 movel %a0@,%a1@ 465da: 2244 moveal %d4,%a1 465dc: 2694 movel %a4@,%a3@ 465de: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
465e0: 7004 moveq #4,%d0 465e2: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */
_Thread_Enable_dispatch();
465e6: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 465ec: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
465ee: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 465f4: 4e5e unlk %fp 465f6: 4e75 rts
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
465f8: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 465fe: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
46600: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 46606: 4e5e unlk %fp 46608: 4e75 rts 4660a: 220a movel %a2,%d1 4660c: 0681 0000 0052 addil #82,%d1
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
46612: 2041 moveal %d1,%a0 46614: 2243 moveal %d3,%a1 46616: 200a movel %a2,%d0 46618: 0680 0000 0056 addil #86,%d0 4661e: 47ea 005a lea %a2@(90),%a3 46622: 280a movel %a2,%d4 46624: 0684 0000 005e addil #94,%d4 4662a: 2091 movel %a1@,%a0@ 4662c: 2040 moveal %d0,%a0 4662e: 2242 moveal %d2,%a1 46630: 2091 movel %a1@,%a0@ 46632: 2044 moveal %d4,%a0 46634: 2694 movel %a4@,%a3@ 46636: 2095 movel %a5@,%a0@
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
46638: 7003 moveq #3,%d0 4663a: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
4663e: 486a 006a pea %a2@(106) 46642: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
_Thread_Enable_dispatch();
46648: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch>
return 0;
4664e: 588f addql #4,%sp
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
46650: 4280 clrl %d0 46652: 6000 fe9e braw 464f2 <timer_settime+0x126> 46656: 220a movel %a2,%d1 46658: 0681 0000 0052 addil #82,%d1
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
4665e: 2241 moveal %d1,%a1 46660: 2043 moveal %d3,%a0 46662: 200a movel %a2,%d0 46664: 0680 0000 0056 addil #86,%d0 4666a: 47ea 005a lea %a2@(90),%a3 4666e: 280a movel %a2,%d4 46670: 0684 0000 005e addil #94,%d4 46676: 2290 movel %a0@,%a1@ 46678: 2240 moveal %d0,%a1 4667a: 2042 moveal %d2,%a0 4667c: 2290 movel %a0@,%a1@ 4667e: 2244 moveal %d4,%a1 46680: 2694 movel %a4@,%a3@ 46682: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
46684: 7004 moveq #4,%d0 46686: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */
_Thread_Enable_dispatch();
4668a: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 46690: 4280 clrl %d0 46692: 6000 ff5a braw 465ee <timer_settime+0x222>
...
00046454 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
46454: 4e56 ffe8 linkw %fp,#-24 46458: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4645c: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
46460: 4ab9 0006 3602 tstl 63602 <_POSIX_signals_Ualarm_timer+0x1c> 46466: 6700 0086 beqw 464ee <ualarm+0x9a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4646a: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 46470: 4eb9 0004 a24c jsr 4a24c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
46476: 588f addql #4,%sp 46478: 7201 moveq #1,%d1 4647a: 5580 subql #2,%d0 4647c: b280 cmpl %d0,%d1 4647e: 6400 0098 bccw 46518 <ualarm+0xc4>
46482: 4283 clrl %d3 <== NOT EXECUTED
/*
* 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 ) {
46484: 4a82 tstl %d2 <== NOT EXECUTED 46486: 660c bnes 46494 <ualarm+0x40> <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
46488: 2003 movel %d3,%d0 4648a: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46490: 4e5e unlk %fp 46492: 4e75 rts
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
46494: 280e movel %fp,%d4
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
46496: 223c 000f 4240 movel #1000000,%d1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
4649c: 5184 subql #8,%d4 4649e: 45f9 0004 9d64 lea 49d64 <_Timespec_To_ticks>,%a2
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
464a4: 4c41 2000 remul %d1,%d0,%d2 464a8: 4c41 2002 remul %d1,%d2,%d2
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464ac: 223c 0000 03e8 movel #1000,%d1
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
464b2: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464b6: 4c00 1800 mulsl %d0,%d1
ticks = _Timespec_To_ticks( &tp );
464ba: 2f04 movel %d4,%sp@-
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464bc: 2d41 fffc movel %d1,%fp@(-4)
ticks = _Timespec_To_ticks( &tp );
464c0: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
464c2: 2f04 movel %d4,%sp@- 464c4: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
464c6: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 464cc: 4879 0006 2ea4 pea 62ea4 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
464d2: 23c0 0006 35f2 movel %d0,635f2 <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
464d8: 4eb9 0004 a104 jsr 4a104 <_Watchdog_Insert> 464de: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
464e2: 2003 movel %d3,%d0 464e4: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 464ea: 4e5e unlk %fp 464ec: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
464ee: 42b9 0006 35ee clrl 635ee <_POSIX_signals_Ualarm_timer+0x8>
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
464f4: 4283 clrl %d3
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
464f6: 203c 0004 6560 movel #288096,%d0
the_watchdog->id = id;
464fc: 42b9 0006 3606 clrl 63606 <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46502: 23c0 0006 3602 movel %d0,63602 <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
46508: 42b9 0006 360a clrl 6360a <_POSIX_signals_Ualarm_timer+0x24>
/*
* 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 ) {
4650e: 4a82 tstl %d2 46510: 6700 ff76 beqw 46488 <ualarm+0x34> 46514: 6000 ff7e braw 46494 <ualarm+0x40>
* 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);
46518: 2039 0006 35fa movel 635fa <_POSIX_signals_Ualarm_timer+0x14>,%d0 4651e: d0b9 0006 35f2 addl 635f2 <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
46524: 486e fff8 pea %fp@(-8) 46528: 90b9 0006 35fe subl 635fe <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4652e: 283c 000f 4240 movel #1000000,%d4
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
46534: 2f00 movel %d0,%sp@- 46536: 4eb9 0004 9cd4 jsr 49cd4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4653c: 202e fff8 movel %fp@(-8),%d0 46540: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
46544: 283c 0000 03e8 movel #1000,%d4 4654a: 508f addql #8,%sp 4654c: 262e fffc movel %fp@(-4),%d3 46550: 4c44 3803 remsl %d4,%d3,%d3 46554: d680 addl %d0,%d3
/*
* 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 ) {
46556: 4a82 tstl %d2 46558: 6700 ff2e beqw 46488 <ualarm+0x34> 4655c: 6000 ff36 braw 46494 <ualarm+0x40>