RTEMS 4.9.6Annotated Report
Sun Jul 24 17:17:37 2011
00004cc8 <_API_extensions_Add>:
*/
void _API_extensions_Add(
API_extensions_Control *the_extension
)
{
4cc8: e1a01000 mov r1, r0
_Chain_Append( &_API_extensions_List, &the_extension->Node );
4ccc: e59f0000 ldr r0, [pc, #0] ; 4cd4 <_API_extensions_Add+0xc>
4cd0: ea000041 b 4ddc <_Chain_Append>
00004c04 <_API_extensions_Initialization>:
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4c04: e59f3010 ldr r3, [pc, #16] ; 4c1c <_API_extensions_Initialization+0x18>
4c08: e2832004 add r2, r3, #4 ; 0x4
4c0c: e5832000 str r2, [r3]
the_chain->permanent_null = NULL;
4c10: e3a02000 mov r2, #0 ; 0x0
4c14: e983000c stmib r3, {r2, r3}
*/
void _API_extensions_Initialization( void )
{
_Chain_Initialize_empty( &_API_extensions_List );
}
4c18: e12fff1e bx lr
00004c88 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
4c88: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4c8c: e59f502c ldr r5, [pc, #44] ; 4cc0 <_API_extensions_Run_postswitch+0x38><== NOT EXECUTED
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
4c90: e59f602c ldr r6, [pc, #44] ; 4cc4 <_API_extensions_Run_postswitch+0x3c><== NOT EXECUTED
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4c94: e4954004 ldr r4, [r5], #4 <== NOT EXECUTED
4c98: ea000005 b 4cb4 <_API_extensions_Run_postswitch+0x2c> <== NOT EXECUTED
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
4c9c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
4ca0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
(*the_extension->postswitch_hook)( _Thread_Executing );
4ca4: 15960000 ldrne r0, [r6] <== NOT EXECUTED
4ca8: 11a0e00f movne lr, pc <== NOT EXECUTED
4cac: 112fff13 bxne r3 <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
4cb0: e5944000 ldr r4, [r4] <== NOT EXECUTED
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
4cb4: e1540005 cmp r4, r5 <== NOT EXECUTED
4cb8: 1afffff7 bne 4c9c <_API_extensions_Run_postswitch+0x14> <== NOT EXECUTED
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
4cbc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000069c0 <_CORE_RWLock_Release>:
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
69c0: e59f30dc ldr r3, [pc, #220] ; 6aa4 <_CORE_RWLock_Release+0xe4>
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
69c4: e92d4010 push {r4, lr}
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
69c8: e5931000 ldr r1, [r3]
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
69cc: e1a04000 mov r4, r0
* 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 );
69d0: e10f2000 mrs r2, CPSR
69d4: e38230c0 orr r3, r2, #192 ; 0xc0
69d8: e129f003 msr CPSR_fc, r3
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
69dc: e5903044 ldr r3, [r0, #68]
69e0: e3530000 cmp r3, #0 ; 0x0
69e4: 1a000003 bne 69f8 <_CORE_RWLock_Release+0x38>
_ISR_Enable( level );
69e8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
69ec: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED
69f0: e5813034 str r3, [r1, #52] <== NOT EXECUTED
69f4: ea000028 b 6a9c <_CORE_RWLock_Release+0xdc> <== NOT EXECUTED
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
69f8: e3530001 cmp r3, #1 ; 0x1
69fc: 1a000006 bne 6a1c <_CORE_RWLock_Release+0x5c>
the_rwlock->number_of_readers -= 1;
6a00: e5903048 ldr r3, [r0, #72]
6a04: e2433001 sub r3, r3, #1 ; 0x1
if ( the_rwlock->number_of_readers != 0 ) {
6a08: e3530000 cmp r3, #0 ; 0x0
_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;
6a0c: e5803048 str r3, [r0, #72]
if ( the_rwlock->number_of_readers != 0 ) {
6a10: 0a000001 beq 6a1c <_CORE_RWLock_Release+0x5c>
/* must be unlocked again */
_ISR_Enable( level );
6a14: e129f002 msr CPSR_fc, r2
6a18: ea00001f b 6a9c <_CORE_RWLock_Release+0xdc>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
6a1c: e3a03000 mov r3, #0 ; 0x0
6a20: e5813034 str r3, [r1, #52]
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
6a24: e5843044 str r3, [r4, #68]
_ISR_Enable( level );
6a28: e129f002 msr CPSR_fc, r2
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
6a2c: e1a00004 mov r0, r4
6a30: eb00055f bl 7fb4 <_Thread_queue_Dequeue>
if ( next ) {
6a34: e3500000 cmp r0, #0 ; 0x0
6a38: 0a000017 beq 6a9c <_CORE_RWLock_Release+0xdc>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
6a3c: e5903030 ldr r3, [r0, #48]
6a40: e3530001 cmp r3, #1 ; 0x1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
6a44: 02833001 addeq r3, r3, #1 ; 0x1
6a48: 05843044 streq r3, [r4, #68]
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
6a4c: 0a000012 beq 6a9c <_CORE_RWLock_Release+0xdc>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
6a50: e5943048 ldr r3, [r4, #72]
6a54: e2833001 add r3, r3, #1 ; 0x1
6a58: e5843048 str r3, [r4, #72]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
6a5c: e3a03001 mov r3, #1 ; 0x1
6a60: e5843044 str r3, [r4, #68]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
6a64: e1a00004 mov r0, r4
6a68: eb000698 bl 84d0 <_Thread_queue_First>
if ( !next ||
6a6c: e2503000 subs r3, r0, #0 ; 0x0
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 );
6a70: e1a01003 mov r1, r3
6a74: e1a00004 mov r0, r4
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
6a78: 0a000007 beq 6a9c <_CORE_RWLock_Release+0xdc>
6a7c: e5933030 ldr r3, [r3, #48]
6a80: e3530001 cmp r3, #1 ; 0x1
6a84: 0a000004 beq 6a9c <_CORE_RWLock_Release+0xdc>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
6a88: e5943048 ldr r3, [r4, #72]
6a8c: e2833001 add r3, r3, #1 ; 0x1
6a90: e5843048 str r3, [r4, #72]
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
6a94: eb000643 bl 83a8 <_Thread_queue_Extract>
6a98: eafffff1 b 6a64 <_CORE_RWLock_Release+0xa4>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
6a9c: e3a00000 mov r0, #0 ; 0x0
6aa0: e8bd8010 pop {r4, pc}
00011b58 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11b58: e590304c ldr r3, [r0, #76]
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
11b5c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11b60: e1520003 cmp r2, r3
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
11b64: e1a07000 mov r7, r0
11b68: e1a06002 mov r6, r2
11b6c: e1a08001 mov r8, r1
11b70: e59da020 ldr sl, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
11b74: 83a00001 movhi r0, #1 ; 0x1
11b78: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, pc}
* 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 ) {
11b7c: e5973048 ldr r3, [r7, #72]
11b80: e3530000 cmp r3, #0 ; 0x0
*count = 0;
11b84: 13a03000 movne r3, #0 ; 0x0
* 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))) {
11b88: 01a05003 moveq r5, r3
* 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;
11b8c: 158a3000 strne r3, [sl]
11b90: 11a00003 movne r0, r3
* 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 ) {
11b94: 0a000005 beq 11bb0 <_CORE_message_queue_Broadcast+0x58>
11b98: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11b9c: e594002c ldr r0, [r4, #44]
11ba0: eb001f30 bl 19868 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
11ba4: e5943028 ldr r3, [r4, #40]
11ba8: e5836000 str r6, [r3]
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
11bac: e2855001 add r5, r5, #1 ; 0x1
* 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))) {
11bb0: e1a00007 mov r0, r7
11bb4: eb00092d bl 14070 <_Thread_queue_Dequeue>
11bb8: e2504000 subs r4, r0, #0 ; 0x0
11bbc: e1a01008 mov r1, r8
11bc0: e1a02006 mov r2, r6
11bc4: 1afffff4 bne 11b9c <_CORE_message_queue_Broadcast+0x44>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
11bc8: e58a5000 str r5, [sl]
11bcc: e1a00004 mov r0, r4
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11bd0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000b824 <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
b824: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
b828: e590c04c ldr ip, [r0, #76]
b82c: e152000c cmp r2, ip
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
b830: e1a05000 mov r5, r0
b834: e1a06002 mov r6, r2
b838: e1a07001 mov r7, r1
b83c: e1a0b003 mov fp, r3
b840: e59d9028 ldr r9, [sp, #40]
b844: e5dda02c ldrb sl, [sp, #44]
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
b848: 83a00001 movhi r0, #1 ; 0x1
b84c: 88bd8ff0 pophi {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
b850: e5958048 ldr r8, [r5, #72]
b854: e3580000 cmp r8, #0 ; 0x0
b858: 1a00000b bne b88c <_CORE_message_queue_Submit+0x68>
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
b85c: eb000671 bl d228 <_Thread_queue_Dequeue>
if ( the_thread ) {
b860: e2504000 subs r4, r0, #0 ; 0x0
b864: 0a000008 beq b88c <_CORE_message_queue_Submit+0x68>
b868: e1a01007 mov r1, r7
b86c: e594002c ldr r0, [r4, #44]
b870: e1a02006 mov r2, r6
b874: eb001d4c bl 12dac <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
b878: e5943028 ldr r3, [r4, #40]
the_thread->Wait.count = submit_type;
b87c: e1a00008 mov r0, r8
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
b880: e5836000 str r6, [r3]
the_thread->Wait.count = submit_type;
b884: e5849024 str r9, [r4, #36]
b888: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* 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 <
b88c: e5952048 ldr r2, [r5, #72]
b890: e5953044 ldr r3, [r5, #68]
b894: e1520003 cmp r2, r3
b898: 2a00000f bcs b8dc <_CORE_message_queue_Submit+0xb8>
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 *)
b89c: e2850068 add r0, r5, #104 ; 0x68
b8a0: eb001485 bl 10abc <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
b8a4: e2504000 subs r4, r0, #0 ; 0x0
b8a8: 0a000025 beq b944 <_CORE_message_queue_Submit+0x120>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
b8ac: e1a01007 mov r1, r7
b8b0: e1a02006 mov r2, r6
b8b4: e2840010 add r0, r4, #16 ; 0x10
b8b8: eb001d3b bl 12dac <memcpy>
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
b8bc: e1a00005 mov r0, r5
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
b8c0: e584600c str r6, [r4, #12]
the_message->priority = submit_type;
b8c4: e5849008 str r9, [r4, #8]
_CORE_message_queue_Insert_message(
b8c8: e1a01004 mov r1, r4
b8cc: e1a02009 mov r2, r9
b8d0: eb001496 bl 10b30 <_CORE_message_queue_Insert_message>
b8d4: e3a00000 mov r0, #0 ; 0x0
b8d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* 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 ) {
b8dc: e35a0000 cmp sl, #0 ; 0x0
b8e0: 03a00002 moveq r0, #2 ; 0x2
b8e4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* 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() ) {
b8e8: e59f305c ldr r3, [pc, #92] ; b94c <_CORE_message_queue_Submit+0x128>
b8ec: e5933000 ldr r3, [r3]
b8f0: e3530000 cmp r3, #0 ; 0x0
b8f4: 1a000012 bne b944 <_CORE_message_queue_Submit+0x120>
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
b8f8: e59f3050 ldr r3, [pc, #80] ; b950 <_CORE_message_queue_Submit+0x12c>
b8fc: e5932000 ldr r2, [r3]
_ISR_Disable( level );
b900: e10f1000 mrs r1, CPSR
b904: e38130c0 orr r3, r1, #192 ; 0xc0
b908: e129f003 msr CPSR_fc, r3
b90c: e3a03001 mov r3, #1 ; 0x1
b910: e5853030 str r3, [r5, #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.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
b914: e5829024 str r9, [r2, #36]
Thread_Control *executing = _Thread_Executing;
_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;
b918: e582b020 str fp, [r2, #32]
executing->Wait.return_argument_second.immutable_object = buffer;
b91c: e582702c str r7, [r2, #44]
executing->Wait.option = (uint32_t) size;
b920: e5826030 str r6, [r2, #48]
{
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
b924: e5825044 str r5, [r2, #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 );
b928: e129f001 msr CPSR_fc, r1
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
b92c: e59f2020 ldr r2, [pc, #32] ; b954 <_CORE_message_queue_Submit+0x130>
b930: e1a00005 mov r0, r5
b934: e59d1030 ldr r1, [sp, #48]
b938: eb000693 bl d38c <_Thread_queue_Enqueue_with_handler>
b93c: e3a00007 mov r0, #7 ; 0x7
b940: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
b944: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
}
b948: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00004ec0 <_CORE_mutex_Seize_interrupt_blocking>:
)
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
4ec0: e5903048 ldr r3, [r0, #72] <== NOT EXECUTED
4ec4: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
Watchdog_Interval timeout
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4ec8: e59f304c ldr r3, [pc, #76] ; 4f1c <_CORE_mutex_Seize_interrupt_blocking+0x5c><== NOT EXECUTED
void _CORE_mutex_Seize_interrupt_blocking(
CORE_mutex_Control *the_mutex,
Watchdog_Interval timeout
)
{
4ecc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
4ed0: e1a05001 mov r5, r1 <== NOT EXECUTED
4ed4: e1a04000 mov r4, r0 <== NOT EXECUTED
Thread_Control *executing;
executing = _Thread_Executing;
4ed8: e5931000 ldr r1, [r3] <== NOT EXECUTED
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
4edc: 1a000005 bne 4ef8 <_CORE_mutex_Seize_interrupt_blocking+0x38><== NOT EXECUTED
if ( the_mutex->holder->current_priority > executing->current_priority ) {
4ee0: e590005c ldr r0, [r0, #92] <== NOT EXECUTED
4ee4: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
4ee8: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
4eec: e1530001 cmp r3, r1 <== NOT EXECUTED
_Thread_Change_priority(
4ef0: 83a02000 movhi r2, #0 ; 0x0 <== NOT EXECUTED
4ef4: 8b000381 blhi 5d00 <_Thread_Change_priority> <== NOT EXECUTED
FALSE
);
}
}
the_mutex->blocked_count++;
4ef8: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED
4efc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
4f00: e5843058 str r3, [r4, #88] <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
4f04: e1a00004 mov r0, r4 <== NOT EXECUTED
4f08: e1a01005 mov r1, r5 <== NOT EXECUTED
4f0c: e59f200c ldr r2, [pc, #12] ; 4f20 <_CORE_mutex_Seize_interrupt_blocking+0x60><== NOT EXECUTED
4f10: eb00061d bl 678c <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
_Thread_Enable_dispatch();
}
4f14: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
the_mutex->blocked_count++;
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
_Thread_Enable_dispatch();
4f18: ea0004e0 b 62a0 <_Thread_Enable_dispatch> <== NOT EXECUTED
00009d34 <_CORE_mutex_Seize_interrupt_trylock>:
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
9d34: e59f3130 ldr r3, [pc, #304] ; 9e6c <_CORE_mutex_Seize_interrupt_trylock+0x138>
9d38: e593c000 ldr ip, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
9d3c: e3a02000 mov r2, #0 ; 0x0
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
9d40: e5911000 ldr r1, [r1]
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
9d44: e58c2034 str r2, [ip, #52]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
9d48: e5903050 ldr r3, [r0, #80]
9d4c: e1530002 cmp r3, r2
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
9d50: e52de004 push {lr} ; (str lr, [sp, #-4]!)
9d54: 0a00002f beq 9e18 <_CORE_mutex_Seize_interrupt_trylock+0xe4>
the_mutex->lock = CORE_MUTEX_LOCKED;
9d58: e5802050 str r2, [r0, #80]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
9d5c: e5902048 ldr r2, [r0, #72]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
9d60: e59c3008 ldr r3, [ip, #8]
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
9d64: e3520002 cmp r2, #2 ; 0x2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
9d68: e5803060 str r3, [r0, #96]
the_mutex->nest_count = 1;
9d6c: e3a03001 mov r3, #1 ; 0x1
9d70: e5803054 str r3, [r0, #84]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
9d74: e580c05c str ip, [r0, #92]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
9d78: 0a000001 beq 9d84 <_CORE_mutex_Seize_interrupt_trylock+0x50>
9d7c: e3520003 cmp r2, #3 ; 0x3
9d80: 1a000002 bne 9d90 <_CORE_mutex_Seize_interrupt_trylock+0x5c>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
9d84: e59c301c ldr r3, [ip, #28]
9d88: e2833001 add r3, r3, #1 ; 0x1
9d8c: e58c301c str r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
9d90: e5903048 ldr r3, [r0, #72]
9d94: e3530003 cmp r3, #3 ; 0x3
9d98: 0a000001 beq 9da4 <_CORE_mutex_Seize_interrupt_trylock+0x70>
_ISR_Enable( level );
9d9c: e129f001 msr CPSR_fc, r1
9da0: ea00002d b 9e5c <_CORE_mutex_Seize_interrupt_trylock+0x128>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
9da4: e590204c ldr r2, [r0, #76]
current = executing->current_priority;
9da8: e59c3014 ldr r3, [ip, #20]
if ( current == ceiling ) {
9dac: e1530002 cmp r3, r2
9db0: 1a000001 bne 9dbc <_CORE_mutex_Seize_interrupt_trylock+0x88>
_ISR_Enable( level );
9db4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
9db8: ea000027 b 9e5c <_CORE_mutex_Seize_interrupt_trylock+0x128><== NOT EXECUTED
return 0;
}
if ( current > ceiling ) {
9dbc: 9a00000a bls 9dec <_CORE_mutex_Seize_interrupt_trylock+0xb8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
9dc0: e59f20a8 ldr r2, [pc, #168] ; 9e70 <_CORE_mutex_Seize_interrupt_trylock+0x13c>
9dc4: e5923000 ldr r3, [r2]
9dc8: e2833001 add r3, r3, #1 ; 0x1
9dcc: e5823000 str r3, [r2]
_Thread_Disable_dispatch();
_ISR_Enable( level );
9dd0: e129f001 msr CPSR_fc, r1
_Thread_Change_priority(
9dd4: e3a02000 mov r2, #0 ; 0x0
9dd8: e590104c ldr r1, [r0, #76]
9ddc: e590005c ldr r0, [r0, #92]
9de0: ebffefc6 bl 5d00 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
9de4: ebfff12d bl 62a0 <_Thread_Enable_dispatch>
9de8: ea00001b b 9e5c <_CORE_mutex_Seize_interrupt_trylock+0x128>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
9dec: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED
9df0: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
9df4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
9df8: e5803054 str r3, [r0, #84] <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
9dfc: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
9e00: e5803050 str r3, [r0, #80] <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
9e04: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
9e08: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
9e0c: e58c301c str r3, [ip, #28] <== NOT EXECUTED
_ISR_Enable( level );
9e10: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
9e14: ea000010 b 9e5c <_CORE_mutex_Seize_interrupt_trylock+0x128><== NOT EXECUTED
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
9e18: e590205c ldr r2, [r0, #92]
9e1c: e152000c cmp r2, ip
9e20: 1a00000f bne 9e64 <_CORE_mutex_Seize_interrupt_trylock+0x130>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
9e24: e5903040 ldr r3, [r0, #64]
9e28: e3530000 cmp r3, #0 ; 0x0
9e2c: 0a000002 beq 9e3c <_CORE_mutex_Seize_interrupt_trylock+0x108>
9e30: e3530001 cmp r3, #1 ; 0x1
9e34: 1a00000a bne 9e64 <_CORE_mutex_Seize_interrupt_trylock+0x130>
9e38: ea000004 b 9e50 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
9e3c: e5903054 ldr r3, [r0, #84]
9e40: e2833001 add r3, r3, #1 ; 0x1
9e44: e5803054 str r3, [r0, #84]
_ISR_Enable( level );
9e48: e129f001 msr CPSR_fc, r1
9e4c: ea000002 b 9e5c <_CORE_mutex_Seize_interrupt_trylock+0x128>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
9e50: e3a03002 mov r3, #2 ; 0x2
9e54: e5823034 str r3, [r2, #52]
_ISR_Enable( level );
9e58: e129f001 msr CPSR_fc, r1
9e5c: e3a00000 mov r0, #0 ; 0x0
9e60: e49df004 pop {pc} ; (ldr pc, [sp], #4)
9e64: e3a00001 mov r0, #1 ; 0x1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
9e68: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00004fec <_CORE_mutex_Surrender>:
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
4fec: e5d03044 ldrb r3, [r0, #68]
4ff0: e3530000 cmp r3, #0 ; 0x0
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
4ff4: e92d4010 push {r4, lr}
4ff8: e1a04000 mov r4, r0
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
4ffc: e590005c ldr r0, [r0, #92]
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
5000: 0a000004 beq 5018 <_CORE_mutex_Surrender+0x2c>
if ( !_Thread_Is_executing( holder ) )
5004: e59f312c ldr r3, [pc, #300] ; 5138 <_CORE_mutex_Surrender+0x14c>
5008: e5933000 ldr r3, [r3]
500c: e1500003 cmp r0, r3
5010: 13a00003 movne r0, #3 ; 0x3
5014: 18bd8010 popne {r4, pc}
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
5018: e5943054 ldr r3, [r4, #84]
501c: e3530000 cmp r3, #0 ; 0x0
5020: 0a000042 beq 5130 <_CORE_mutex_Surrender+0x144>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
5024: e2433001 sub r3, r3, #1 ; 0x1
if ( the_mutex->nest_count != 0 ) {
5028: e3530000 cmp r3, #0 ; 0x0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
502c: e5843054 str r3, [r4, #84]
if ( the_mutex->nest_count != 0 ) {
5030: 0a000005 beq 504c <_CORE_mutex_Surrender+0x60>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
5034: e5943040 ldr r3, [r4, #64]
5038: e3530000 cmp r3, #0 ; 0x0
503c: 0a00003b beq 5130 <_CORE_mutex_Surrender+0x144>
5040: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
5044: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED
5048: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
504c: e5943048 ldr r3, [r4, #72]
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5050: e3530002 cmp r3, #2 ; 0x2
5054: 0a000001 beq 5060 <_CORE_mutex_Surrender+0x74>
5058: e3530003 cmp r3, #3 ; 0x3
505c: 1a000002 bne 506c <_CORE_mutex_Surrender+0x80>
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
5060: e590301c ldr r3, [r0, #28]
5064: e2433001 sub r3, r3, #1 ; 0x1
5068: e580301c str r3, [r0, #28]
506c: e5942048 ldr r2, [r4, #72]
}
the_mutex->holder = NULL;
5070: e3a03000 mov r3, #0 ; 0x0
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5074: e3520002 cmp r2, #2 ; 0x2
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
5078: e5843060 str r3, [r4, #96]
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
507c: e584305c str r3, [r4, #92]
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5080: 0a000001 beq 508c <_CORE_mutex_Surrender+0xa0>
5084: e3520003 cmp r2, #3 ; 0x3
5088: 1a000007 bne 50ac <_CORE_mutex_Surrender+0xc0>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
508c: e590301c ldr r3, [r0, #28]
5090: e3530000 cmp r3, #0 ; 0x0
5094: 1a000004 bne 50ac <_CORE_mutex_Surrender+0xc0>
5098: e5901018 ldr r1, [r0, #24]
509c: e5903014 ldr r3, [r0, #20]
50a0: e1510003 cmp r1, r3
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
50a4: 13a02001 movne r2, #1 ; 0x1
50a8: 1b000314 blne 5d00 <_Thread_Change_priority>
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
50ac: e1a00004 mov r0, r4
50b0: eb00055c bl 6628 <_Thread_queue_Dequeue>
50b4: e2502000 subs r2, r0, #0 ; 0x0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
50b8: 03a03001 moveq r3, #1 ; 0x1
50bc: 05843050 streq r3, [r4, #80]
50c0: 01a00002 moveq r0, r2
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
50c4: 08bd8010 popeq {r4, pc}
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
50c8: e5923008 ldr r3, [r2, #8]
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
50cc: e5941048 ldr r1, [r4, #72]
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
50d0: e5843060 str r3, [r4, #96]
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
50d4: e3510002 cmp r1, #2 ; 0x2
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
50d8: e3a03001 mov r3, #1 ; 0x1
50dc: e5843054 str r3, [r4, #84]
} else
#endif
{
the_mutex->holder = the_thread;
50e0: e584205c str r2, [r4, #92]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
50e4: 0a000002 beq 50f4 <_CORE_mutex_Surrender+0x108>
50e8: e3510003 cmp r1, #3 ; 0x3
50ec: 1a00000f bne 5130 <_CORE_mutex_Surrender+0x144>
50f0: ea000003 b 5104 <_CORE_mutex_Surrender+0x118> <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
50f4: e592301c ldr r3, [r2, #28]
50f8: e2833001 add r3, r3, #1 ; 0x1
50fc: e582301c str r3, [r2, #28]
5100: ea000008 b 5128 <_CORE_mutex_Surrender+0x13c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
5104: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
5108: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
510c: e582301c str r3, [r2, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
5110: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED
5114: e594104c ldr r1, [r4, #76] <== NOT EXECUTED
5118: e1510003 cmp r1, r3 <== NOT EXECUTED
511c: 2a000003 bcs 5130 <_CORE_mutex_Surrender+0x144> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
5120: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
5124: eb0002f5 bl 5d00 <_Thread_Change_priority> <== NOT EXECUTED
5128: e3a00000 mov r0, #0 ; 0x0
512c: e8bd8010 pop {r4, pc}
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
5130: e3a00000 mov r0, #0 ; 0x0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
5134: e8bd8010 pop {r4, pc}
00005918 <_CORE_spinlock_Release>:
CORE_spinlock_Control *the_spinlock
)
{
ISR_Level level;
_ISR_Disable( level );
5918: e10f1000 mrs r1, CPSR
591c: e38130c0 orr r3, r1, #192 ; 0xc0
5920: e129f003 msr CPSR_fc, r3
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
5924: e5903004 ldr r3, [r0, #4]
5928: e3530000 cmp r3, #0 ; 0x0
592c: 1a000002 bne 593c <_CORE_spinlock_Release+0x24>
_ISR_Enable( level );
5930: e129f001 msr CPSR_fc, r1
5934: e3a00006 mov r0, #6 ; 0x6
5938: e12fff1e bx lr
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
593c: e59f3040 ldr r3, [pc, #64] ; 5984 <_CORE_spinlock_Release+0x6c>
5940: e5933000 ldr r3, [r3]
5944: e5932008 ldr r2, [r3, #8]
5948: e590300c ldr r3, [r0, #12]
594c: e1530002 cmp r3, r2
5950: 0a000002 beq 5960 <_CORE_spinlock_Release+0x48>
_ISR_Enable( level );
5954: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
5958: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
595c: e12fff1e bx lr <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5960: e5903008 ldr r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5964: e3a02000 mov r2, #0 ; 0x0
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5968: e2433001 sub r3, r3, #1 ; 0x1
596c: e5803008 str r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5970: e5802004 str r2, [r0, #4]
the_spinlock->holder = 0;
5974: e580200c str r2, [r0, #12]
_ISR_Enable( level );
5978: e129f001 msr CPSR_fc, r1
597c: e3a00000 mov r0, #0 ; 0x0
return CORE_SPINLOCK_SUCCESSFUL;
}
5980: e12fff1e bx lr
00005988 <_CORE_spinlock_Wait>:
bool wait,
Watchdog_Interval timeout
)
{
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
5988: e59f3104 ldr r3, [pc, #260] ; 5a94 <_CORE_spinlock_Wait+0x10c>
598c: e5933000 ldr r3, [r3]
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
5990: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
5994: e1a05002 mov r5, r2
5998: e1a04000 mov r4, r0
599c: e20180ff and r8, r1, #255 ; 0xff
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
59a0: e0827003 add r7, r2, r3
_ISR_Disable( level );
59a4: e10f1000 mrs r1, CPSR
59a8: e38130c0 orr r3, r1, #192 ; 0xc0
59ac: e129f003 msr CPSR_fc, r3
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
59b0: e5903004 ldr r3, [r0, #4]
59b4: e3530001 cmp r3, #1 ; 0x1
59b8: 1a000008 bne 59e0 <_CORE_spinlock_Wait+0x58>
59bc: e59f30d4 ldr r3, [pc, #212] ; 5a98 <_CORE_spinlock_Wait+0x110>
59c0: e5933000 ldr r3, [r3]
59c4: e5932008 ldr r2, [r3, #8]
59c8: e590300c ldr r3, [r0, #12]
59cc: e1530002 cmp r3, r2
59d0: 1a000002 bne 59e0 <_CORE_spinlock_Wait+0x58>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
59d4: e129f001 msr CPSR_fc, r1
59d8: e3a00001 mov r0, #1 ; 0x1
59dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
59e0: e5943008 ldr r3, [r4, #8]
59e4: e2833001 add r3, r3, #1 ; 0x1
59e8: e5843008 str r3, [r4, #8]
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
59ec: e59fa0a0 ldr sl, [pc, #160] ; 5a94 <_CORE_spinlock_Wait+0x10c>
59f0: e59f60a4 ldr r6, [pc, #164] ; 5a9c <_CORE_spinlock_Wait+0x114>
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
59f4: e5943004 ldr r3, [r4, #4]
59f8: e3530000 cmp r3, #0 ; 0x0
59fc: 1a000008 bne 5a24 <_CORE_spinlock_Wait+0x9c>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
5a00: e2833001 add r3, r3, #1 ; 0x1
5a04: e5843004 str r3, [r4, #4]
the_spinlock->holder = _Thread_Executing->Object.id;
5a08: e59f3088 ldr r3, [pc, #136] ; 5a98 <_CORE_spinlock_Wait+0x110>
5a0c: e5933000 ldr r3, [r3]
5a10: e5933008 ldr r3, [r3, #8]
5a14: e584300c str r3, [r4, #12]
_ISR_Enable( level );
5a18: e129f001 msr CPSR_fc, r1
5a1c: e3a00000 mov r0, #0 ; 0x0
5a20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
5a24: e3580000 cmp r8, #0 ; 0x0
5a28: 1a000005 bne 5a44 <_CORE_spinlock_Wait+0xbc>
the_spinlock->users -= 1;
5a2c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
5a30: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
5a34: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
5a38: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
5a3c: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED
5a40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
5a44: e3550000 cmp r5, #0 ; 0x0
5a48: 0a000008 beq 5a70 <_CORE_spinlock_Wait+0xe8>
5a4c: e59a3000 ldr r3, [sl] <== NOT EXECUTED
5a50: e1570003 cmp r7, r3 <== NOT EXECUTED
5a54: 8a000005 bhi 5a70 <_CORE_spinlock_Wait+0xe8> <== NOT EXECUTED
the_spinlock->users -= 1;
5a58: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
5a5c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
5a60: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
5a64: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
5a68: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
5a6c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
5a70: e129f001 msr CPSR_fc, r1
/* An ISR could occur here */
_Thread_Enable_dispatch();
5a74: eb000423 bl 6b08 <_Thread_Enable_dispatch>
5a78: e5963000 ldr r3, [r6]
5a7c: e2833001 add r3, r3, #1 ; 0x1
5a80: e5863000 str r3, [r6]
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
5a84: e10f1000 mrs r1, CPSR
5a88: e38130c0 orr r3, r1, #192 ; 0xc0
5a8c: e129f003 msr CPSR_fc, r3
5a90: eaffffd7 b 59f4 <_CORE_spinlock_Wait+0x6c>
00009c30 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
9c30: e59f3010 ldr r3, [pc, #16] ; 9c48 <_Debug_Is_enabled+0x18> <== NOT EXECUTED
9c34: e5933000 ldr r3, [r3] <== NOT EXECUTED
9c38: e1100003 tst r0, r3 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
9c3c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
9c40: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED
9c44: e12fff1e bx lr <== NOT EXECUTED
00003d7c <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
3d7c: e59fc104 ldr ip, [pc, #260] ; 3e88 <_Event_Seize+0x10c>
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
3d80: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
3d84: e59c4000 ldr r4, [ip]
executing->Wait.return_code = RTEMS_SUCCESSFUL;
3d88: e3a0c000 mov ip, #0 ; 0x0
3d8c: e584c034 str ip, [r4, #52]
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
3d90: e1a07002 mov r7, r2
3d94: e1a05003 mov r5, r3
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
3d98: e5946104 ldr r6, [r4, #260]
_ISR_Disable( level );
3d9c: e10fc000 mrs ip, CPSR
3da0: e38c30c0 orr r3, ip, #192 ; 0xc0
3da4: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
3da8: e5963000 ldr r3, [r6]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
3dac: e0102003 ands r2, r0, r3
3db0: 0a000007 beq 3dd4 <_Event_Seize+0x58>
3db4: e1520000 cmp r2, r0
3db8: 0a000001 beq 3dc4 <_Event_Seize+0x48>
3dbc: e3110002 tst r1, #2 ; 0x2
3dc0: 0a000003 beq 3dd4 <_Event_Seize+0x58>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
3dc4: e1c33002 bic r3, r3, r2
3dc8: e5863000 str r3, [r6]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
3dcc: e129f00c msr CPSR_fc, ip
3dd0: ea000004 b 3de8 <_Event_Seize+0x6c>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
3dd4: e3110001 tst r1, #1 ; 0x1
3dd8: 0a000004 beq 3df0 <_Event_Seize+0x74>
_ISR_Enable( level );
3ddc: e129f00c msr CPSR_fc, ip
executing->Wait.return_code = RTEMS_UNSATISFIED;
3de0: e3a0300d mov r3, #13 ; 0xd
3de4: e5843034 str r3, [r4, #52]
*event_out = seized_events;
3de8: e5852000 str r2, [r5]
3dec: e8bd80f0 pop {r4, r5, r6, r7, pc}
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
3df0: e59f3094 ldr r3, [pc, #148] ; 3e8c <_Event_Seize+0x110>
3df4: e3a02001 mov r2, #1 ; 0x1
3df8: e5832000 str r2, [r3]
executing->Wait.option = (uint32_t) option_set;
3dfc: e5841030 str r1, [r4, #48]
executing->Wait.count = (uint32_t) event_in;
3e00: e5840024 str r0, [r4, #36]
executing->Wait.return_argument = event_out;
3e04: e5845028 str r5, [r4, #40]
_ISR_Enable( level );
3e08: e129f00c msr CPSR_fc, ip
if ( ticks ) {
3e0c: e3570000 cmp r7, #0 ; 0x0
3e10: 0a00000a beq 3e40 <_Event_Seize+0xc4>
_Watchdog_Initialize(
3e14: e5943008 ldr r3, [r4, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
3e18: e59f2070 ldr r2, [pc, #112] ; 3e90 <_Event_Seize+0x114>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
3e1c: e3a01000 mov r1, #0 ; 0x0
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
3e20: e584106c str r1, [r4, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
3e24: e5841050 str r1, [r4, #80]
the_watchdog->routine = routine;
3e28: e5842064 str r2, [r4, #100]
the_watchdog->id = id;
3e2c: e5843068 str r3, [r4, #104]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
3e30: e5847054 str r7, [r4, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
3e34: e59f0058 ldr r0, [pc, #88] ; 3e94 <_Event_Seize+0x118>
3e38: e2841048 add r1, r4, #72 ; 0x48
3e3c: eb000d52 bl 738c <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
3e40: e1a00004 mov r0, r4
3e44: e3a01c01 mov r1, #256 ; 0x100
3e48: eb000b71 bl 6c14 <_Thread_Set_state>
_ISR_Disable( level );
3e4c: e10fc000 mrs ip, CPSR
3e50: e38c30c0 orr r3, ip, #192 ; 0xc0
3e54: e129f003 msr CPSR_fc, r3
sync_state = _Event_Sync_state;
3e58: e59f202c ldr r2, [pc, #44] ; 3e8c <_Event_Seize+0x110>
3e5c: e5920000 ldr r0, [r2]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
3e60: e3a03000 mov r3, #0 ; 0x0
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
3e64: e3500001 cmp r0, #1 ; 0x1
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
3e68: e5823000 str r3, [r2]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
3e6c: 1a000001 bne 3e78 <_Event_Seize+0xfc>
_ISR_Enable( level );
3e70: e129f00c msr CPSR_fc, ip
3e74: e8bd80f0 pop {r4, r5, r6, r7, pc}
* 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 );
3e78: e1a01004 mov r1, r4 <== NOT EXECUTED
3e7c: e1a0200c mov r2, ip <== NOT EXECUTED
}
3e80: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
* 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 );
3e84: ea00078a b 5cb4 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
00003ef0 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
3ef0: e92d40f0 push {r4, r5, r6, r7, lr}
3ef4: e1a04000 mov r4, r0
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 ];
3ef8: e5906104 ldr r6, [r0, #260]
option_set = (rtems_option) the_thread->Wait.option;
3efc: e5907030 ldr r7, [r0, #48]
_ISR_Disable( level );
3f00: e10f5000 mrs r5, CPSR
3f04: e38530c0 orr r3, r5, #192 ; 0xc0
3f08: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
3f0c: e596c000 ldr ip, [r6]
event_condition = (rtems_event_set) the_thread->Wait.count;
3f10: e5902024 ldr r2, [r0, #36]
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
3f14: e012000c ands r0, r2, ip
3f18: 1a000001 bne 3f24 <_Event_Surrender+0x34>
_ISR_Enable( level );
3f1c: e129f005 msr CPSR_fc, r5
3f20: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* 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() &&
3f24: e59f30f0 ldr r3, [pc, #240] ; 401c <_Event_Surrender+0x12c>
3f28: e5933000 ldr r3, [r3]
3f2c: e3530000 cmp r3, #0 ; 0x0
3f30: 0a000019 beq 3f9c <_Event_Surrender+0xac>
3f34: e59f30e4 ldr r3, [pc, #228] ; 4020 <_Event_Surrender+0x130>
3f38: e5933000 ldr r3, [r3]
3f3c: e1540003 cmp r4, r3
3f40: 1a000015 bne 3f9c <_Event_Surrender+0xac>
3f44: e59f10d8 ldr r1, [pc, #216] ; 4024 <_Event_Surrender+0x134><== NOT EXECUTED
3f48: e5913000 ldr r3, [r1] <== NOT EXECUTED
3f4c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
3f50: 0a000002 beq 3f60 <_Event_Surrender+0x70> <== NOT EXECUTED
3f54: e5913000 ldr r3, [r1] <== NOT EXECUTED
3f58: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
3f5c: 1a00000e bne 3f9c <_Event_Surrender+0xac> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
3f60: e1500002 cmp r0, r2 <== NOT EXECUTED
3f64: 0a000001 beq 3f70 <_Event_Surrender+0x80> <== NOT EXECUTED
3f68: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED
3f6c: 0a000008 beq 3f94 <_Event_Surrender+0xa4> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
3f70: e1cc3000 bic r3, ip, r0 <== NOT EXECUTED
3f74: e5863000 str r3, [r6] <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
3f78: e59f30a4 ldr r3, [pc, #164] ; 4024 <_Event_Surrender+0x134><== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
3f7c: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
3f80: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
3f84: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
3f88: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
3f8c: e5843024 str r3, [r4, #36] <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
3f90: e5810000 str r0, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
3f94: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
3f98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
3f9c: e5943010 ldr r3, [r4, #16]
3fa0: e3130c01 tst r3, #256 ; 0x100
3fa4: 0a00001a beq 4014 <_Event_Surrender+0x124>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
3fa8: e1500002 cmp r0, r2
3fac: 0a000001 beq 3fb8 <_Event_Surrender+0xc8>
3fb0: e3170002 tst r7, #2 ; 0x2
3fb4: 0a000016 beq 4014 <_Event_Surrender+0x124>
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
3fb8: e1cc3000 bic r3, ip, r0
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
3fbc: e5942028 ldr r2, [r4, #40]
/*
* 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 );
3fc0: e5863000 str r3, [r6]
the_thread->Wait.count = 0;
3fc4: e3a03000 mov r3, #0 ; 0x0
3fc8: e5843024 str r3, [r4, #36]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
3fcc: e5820000 str r0, [r2]
_ISR_Flash( level );
3fd0: e10f3000 mrs r3, CPSR
3fd4: e129f005 msr CPSR_fc, r5
3fd8: e129f003 msr CPSR_fc, r3
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
3fdc: e5943050 ldr r3, [r4, #80]
3fe0: e3530002 cmp r3, #2 ; 0x2
3fe4: 0a000001 beq 3ff0 <_Event_Surrender+0x100>
_ISR_Enable( level );
3fe8: e129f005 msr CPSR_fc, r5
3fec: ea000004 b 4004 <_Event_Surrender+0x114>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
3ff0: e3a03003 mov r3, #3 ; 0x3
3ff4: e5843050 str r3, [r4, #80]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
3ff8: e129f005 msr CPSR_fc, r5
(void) _Watchdog_Remove( &the_thread->Timer );
3ffc: e2840048 add r0, r4, #72 ; 0x48
4000: eb000d3d bl 74fc <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4004: e59f101c ldr r1, [pc, #28] ; 4028 <_Event_Surrender+0x138>
4008: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
400c: e8bd40f0 pop {r4, r5, r6, r7, lr}
4010: ea0007a2 b 5ea0 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4014: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
4018: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000402c <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
402c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
4030: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
4034: e1a0100d mov r1, sp
4038: eb0008a1 bl 62c4 <_Thread_Get>
switch ( location ) {
403c: e59d2000 ldr r2, [sp]
4040: e3520000 cmp r2, #0 ; 0x0
4044: 1a00001e bne 40c4 <_Event_Timeout+0x98>
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
4048: e10f1000 mrs r1, CPSR
404c: e38130c0 orr r3, r1, #192 ; 0xc0
4050: e129f003 msr CPSR_fc, r3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
4054: e5903024 ldr r3, [r0, #36]
4058: e3530000 cmp r3, #0 ; 0x0
405c: 1a000005 bne 4078 <_Event_Timeout+0x4c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4060: e59f2064 ldr r2, [pc, #100] ; 40cc <_Event_Timeout+0xa0> <== NOT EXECUTED
4064: e5923000 ldr r3, [r2] <== NOT EXECUTED
4068: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
406c: e5823000 str r3, [r2] <== NOT EXECUTED
_Thread_Unnest_dispatch();
_ISR_Enable( level );
4070: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
4074: ea000012 b 40c4 <_Event_Timeout+0x98> <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
4078: e59f3050 ldr r3, [pc, #80] ; 40d0 <_Event_Timeout+0xa4>
407c: e5933000 ldr r3, [r3]
4080: e1500003 cmp r0, r3
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
4084: e5802024 str r2, [r0, #36]
if ( _Thread_Is_executing( the_thread ) ) {
4088: 1a000004 bne 40a0 <_Event_Timeout+0x74>
Thread_blocking_operation_States sync = _Event_Sync_state;
408c: e59f2040 ldr r2, [pc, #64] ; 40d4 <_Event_Timeout+0xa8> <== NOT EXECUTED
4090: e5923000 ldr r3, [r2] <== NOT EXECUTED
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
4094: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4098: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED
409c: 95823000 strls r3, [r2] <== NOT EXECUTED
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
40a0: e3a03006 mov r3, #6 ; 0x6
40a4: e5803034 str r3, [r0, #52]
_ISR_Enable( level );
40a8: e129f001 msr CPSR_fc, r1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
40ac: e59f1024 ldr r1, [pc, #36] ; 40d8 <_Event_Timeout+0xac>
40b0: eb00077a bl 5ea0 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
40b4: e59f2010 ldr r2, [pc, #16] ; 40cc <_Event_Timeout+0xa0>
40b8: e5923000 ldr r3, [r2]
40bc: e2433001 sub r3, r3, #1 ; 0x1
40c0: e5823000 str r3, [r2]
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
40c4: e28dd004 add sp, sp, #4 ; 0x4
40c8: e8bd8000 pop {pc}
00009ee0 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
9ee0: e92d4070 push {r4, r5, r6, lr}
9ee4: e1a04000 mov r4, r0
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
9ee8: e5942014 ldr r2, [r4, #20]
9eec: e1a00001 mov r0, r1
9ef0: e5941010 ldr r1, [r4, #16]
9ef4: ebffed46 bl 5414 <_Heap_Calc_block_size>
_Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size);
if(the_size == 0)
9ef8: e3500000 cmp r0, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
9efc: 15945008 ldrne r5, [r4, #8]
9f00: 13a06000 movne r6, #0 ; 0x0
9f04: 1a000012 bne 9f54 <_Heap_Allocate+0x74>
9f08: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
9f0c: e5953004 ldr r3, [r5, #4]
9f10: e1530000 cmp r3, r0
9f14: 3a00000c bcc 9f4c <_Heap_Allocate+0x6c>
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
9f18: e1a02000 mov r2, r0
9f1c: e1a01005 mov r1, r5
9f20: e1a00004 mov r0, r4
9f24: ebffed4a bl 5454 <_Heap_Block_allocate>
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
stats->searches += search_count + 1;
9f28: e2842048 add r2, r4, #72 ; 0x48
9f2c: e892000c ldm r2, {r2, r3}
9f30: e2833001 add r3, r3, #1 ; 0x1
if(the_block->size >= the_size) {
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
9f34: e2822001 add r2, r2, #1 ; 0x1
stats->searches += search_count + 1;
9f38: e0833006 add r3, r3, r6
if(the_block->size >= the_size) {
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
9f3c: e5842048 str r2, [r4, #72]
stats->searches += search_count + 1;
9f40: e584304c str r3, [r4, #76]
9f44: e2850008 add r0, r5, #8 ; 0x8
9f48: ea000004 b 9f60 <_Heap_Allocate+0x80>
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
9f4c: e5955008 ldr r5, [r5, #8]
9f50: e2866001 add r6, r6, #1 ; 0x1
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
9f54: e1550004 cmp r5, r4
9f58: 1affffeb bne 9f0c <_Heap_Allocate+0x2c>
9f5c: e3a00000 mov r0, #0 ; 0x0
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
9f60: e5943044 ldr r3, [r4, #68]
9f64: e1530006 cmp r3, r6
stats->max_search = search_count;
9f68: 35846044 strcc r6, [r4, #68]
return ptr;
}
9f6c: e8bd8070 pop {r4, r5, r6, pc}
0000d3e8 <_Heap_Get_information>:
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
d3e8: e3a03000 mov r3, #0 ; 0x0
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
d3ec: e92d4030 push {r4, r5, lr}
d3f0: e1a0c001 mov ip, r1
the_info->Free.number = 0;
the_info->Free.total = 0;
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
d3f4: e5813010 str r3, [r1, #16]
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
d3f8: e5905024 ldr r5, [r0, #36]
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
d3fc: e5813000 str r3, [r1]
the_info->Free.total = 0;
d400: e5813008 str r3, [r1, #8]
the_info->Free.largest = 0;
d404: e5813004 str r3, [r1, #4]
the_info->Used.number = 0;
d408: e581300c str r3, [r1, #12]
the_info->Used.total = 0;
d40c: e5813014 str r3, [r1, #20]
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
d410: e5902020 ldr r2, [r0, #32]
d414: ea00001e b d494 <_Heap_Get_information+0xac>
d418: e5923004 ldr r3, [r2, #4]
d41c: e3c30001 bic r0, r3, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
d420: e0824000 add r4, r2, r0
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
d424: e5943004 ldr r3, [r4, #4]
d428: e3130001 tst r3, #1 ; 0x1
d42c: 0a000009 beq d458 <_Heap_Get_information+0x70>
the_info->Used.number++;
d430: e59c300c ldr r3, [ip, #12]
the_info->Used.total += the_size;
d434: e59c1014 ldr r1, [ip, #20]
if ( the_info->Used.largest < the_size )
d438: e59c2010 ldr r2, [ip, #16]
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
d43c: e2833001 add r3, r3, #1 ; 0x1
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
d440: e1520000 cmp r2, r0
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
the_info->Used.total += the_size;
d444: e0811000 add r1, r1, r0
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
d448: e58c300c str r3, [ip, #12]
the_info->Used.total += the_size;
d44c: e58c1014 str r1, [ip, #20]
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
d450: 358c0010 strcc r0, [ip, #16]
d454: ea00000d b d490 <_Heap_Get_information+0xa8>
} else {
the_info->Free.number++;
d458: e59c3000 ldr r3, [ip]
the_info->Free.total += the_size;
d45c: e59c1008 ldr r1, [ip, #8]
if ( the_info->Free.largest < the_size )
d460: e59c2004 ldr r2, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
d464: e2833001 add r3, r3, #1 ; 0x1
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
d468: e1520000 cmp r2, r0
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
d46c: e0811000 add r1, r1, r0
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
d470: 358c0004 strcc r0, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
d474: e58c3000 str r3, [ip]
the_info->Free.total += the_size;
d478: e58c1008 str r1, [ip, #8]
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
d47c: e5943000 ldr r3, [r4]
d480: e1500003 cmp r0, r3
d484: 0a000001 beq d490 <_Heap_Get_information+0xa8>
d488: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
d48c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
d490: e1a02004 mov r2, r4
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
d494: e1520005 cmp r2, r5
d498: 1affffde bne d418 <_Heap_Get_information+0x30>
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
d49c: e59c3014 ldr r3, [ip, #20]
d4a0: e2833008 add r3, r3, #8 ; 0x8
d4a4: e58c3014 str r3, [ip, #20]
d4a8: e3a00000 mov r0, #0 ; 0x0
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
d4ac: e8bd8030 pop {r4, r5, pc}
00013e64 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13e64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
13e68: e1a05000 mov r5, r0
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
13e6c: e5900014 ldr r0, [r0, #20]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13e70: e24dd00c sub sp, sp, #12 ; 0xc
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
13e74: e58d0004 str r0, [sp, #4]
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
*avail_mem_size = 0;
13e78: e59d0030 ldr r0, [sp, #48]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13e7c: e1a09003 mov r9, r3
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
13e80: e3a03000 mov r3, #0 ; 0x0
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
13e84: e595c010 ldr ip, [r5, #16]
*old_mem_size = 0;
13e88: e5893000 str r3, [r9]
*avail_mem_size = 0;
13e8c: e5803000 str r3, [r0]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13e90: e1a04001 mov r4, r1
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
13e94: e1a00001 mov r0, r1
13e98: e5951010 ldr r1, [r5, #16]
13e9c: e1a08002 mov r8, r2
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
13ea0: e58dc008 str ip, [sp, #8]
13ea4: ebfff8ca bl 121d4 <__umodsi3>
13ea8: e2443008 sub r3, r4, #8 ; 0x8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
Heap_Control *the_heap,
Heap_Block *the_block
)
{
return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
13eac: e2851020 add r1, r5, #32 ; 0x20
13eb0: e8910006 ldm r1, {r1, r2}
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
13eb4: e0607003 rsb r7, r0, r3
*old_mem_size = 0;
*avail_mem_size = 0;
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
13eb8: e1570001 cmp r7, r1
13ebc: 33a03000 movcc r3, #0 ; 0x0
13ec0: 23a03001 movcs r3, #1 ; 0x1
13ec4: e1570002 cmp r7, r2
13ec8: 83a03000 movhi r3, #0 ; 0x0
13ecc: e3530000 cmp r3, #0 ; 0x0
13ed0: 0a000075 beq 140ac <_Heap_Resize_block+0x248>
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
13ed4: e597c004 ldr ip, [r7, #4]
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
13ed8: e3cc3001 bic r3, ip, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
13edc: e0876003 add r6, r7, r3
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
13ee0: e58d3000 str r3, [sp]
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
13ee4: e1560001 cmp r6, r1
13ee8: 33a03000 movcc r3, #0 ; 0x0
13eec: 23a03001 movcs r3, #1 ; 0x1
13ef0: e1560002 cmp r6, r2
13ef4: 83a03000 movhi r3, #0 ; 0x0
13ef8: e3530000 cmp r3, #0 ; 0x0
13efc: 0a00006a beq 140ac <_Heap_Resize_block+0x248>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
13f00: e5963004 ldr r3, [r6, #4]
13f04: e3130001 tst r3, #1 ; 0x1
13f08: 0a000067 beq 140ac <_Heap_Resize_block+0x248>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
13f0c: e3c3a001 bic sl, r3, #1 ; 0x1
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
13f10: e1560002 cmp r6, r2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
13f14: e086300a add r3, r6, sl
13f18: 15933004 ldrne r3, [r3, #4]
13f1c: 12032001 andne r2, r3, #1 ; 0x1
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
13f20: e0643006 rsb r3, r4, r6
13f24: e2830004 add r0, r3, #4 ; 0x4
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
13f28: 03a02001 moveq r2, #1 ; 0x1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
13f2c: e1580000 cmp r8, r0
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
13f30: e5890000 str r0, [r9]
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
13f34: e202b0ff and fp, r2, #255 ; 0xff
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
13f38: e20c9001 and r9, ip, #1 ; 0x1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
13f3c: 9a000019 bls 13fa8 <_Heap_Resize_block+0x144>
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
13f40: e35b0000 cmp fp, #0 ; 0x0
13f44: 1a00005a bne 140b4 <_Heap_Resize_block+0x250>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
13f48: e0604008 rsb r4, r0, r8
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
13f4c: e1a00004 mov r0, r4
13f50: e59d1008 ldr r1, [sp, #8]
13f54: ebfff89e bl 121d4 <__umodsi3>
*value = r ? v - r + a : v;
13f58: e3500000 cmp r0, #0 ; 0x0
13f5c: 159dc008 ldrne ip, [sp, #8]
13f60: e59d2004 ldr r2, [sp, #4]
13f64: 1084300c addne r3, r4, ip
13f68: 10604003 rsbne r4, r0, r3
13f6c: e1540002 cmp r4, r2
13f70: 21a02004 movcs r2, r4
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
13f74: e152000a cmp r2, sl
13f78: 8a00004d bhi 140b4 <_Heap_Resize_block+0x250>
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
13f7c: e1a01006 mov r1, r6
13f80: e1a00005 mov r0, r5
13f84: ebffc532 bl 5454 <_Heap_Block_allocate>
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
13f88: e59d2000 ldr r2, [sp]
13f8c: e0800002 add r0, r0, r2
13f90: e1800009 orr r0, r0, r9
13f94: e5870004 str r0, [r7, #4]
--stats->used_blocks;
13f98: e5953040 ldr r3, [r5, #64]
13f9c: e2433001 sub r3, r3, #1 ; 0x1
13fa0: e5853040 str r3, [r5, #64]
13fa4: ea00003b b 14098 <_Heap_Resize_block+0x234>
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
13fa8: e0684000 rsb r4, r8, r0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
13fac: e1a00004 mov r0, r4
13fb0: e59d1008 ldr r1, [sp, #8]
13fb4: ebfff886 bl 121d4 <__umodsi3>
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
13fb8: e0544000 subs r4, r4, r0
13fbc: 0a000035 beq 14098 <_Heap_Resize_block+0x234>
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
13fc0: e89d1008 ldm sp, {r3, ip}
13fc4: e0640003 rsb r0, r4, r3
if (new_block_size < min_block_size) {
13fc8: e150000c cmp r0, ip
13fcc: 2a000007 bcs 13ff0 <_Heap_Resize_block+0x18c>
uint32_t delta = min_block_size - new_block_size;
13fd0: e060300c rsb r3, r0, ip
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
13fd4: e0544003 subs r4, r4, r3
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
13fd8: 10800003 addne r0, r0, r3
if (new_block_size < min_block_size) {
uint32_t delta = min_block_size - new_block_size;
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
++stats->resizes;
13fdc: 05953054 ldreq r3, [r5, #84]
13fe0: 02833001 addeq r3, r3, #1 ; 0x1
13fe4: 05853054 streq r3, [r5, #84]
13fe8: 01a00004 moveq r0, r4
13fec: 0a000031 beq 140b8 <_Heap_Resize_block+0x254>
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
13ff0: e35b0000 cmp fp, #0 ; 0x0
13ff4: 1a000013 bne 14048 <_Heap_Resize_block+0x1e4>
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
13ff8: e084200a add r2, r4, sl
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
13ffc: e0871000 add r1, r7, r0
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
14000: e1803009 orr r3, r0, r9
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14004: e3820001 orr r0, r2, #1 ; 0x1
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
14008: e5873004 str r3, [r7, #4]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
next_next_block->prev_size = new_next_block_size;
1400c: e786200a str r2, [r6, sl]
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14010: e5810004 str r0, [r1, #4]
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
14014: e5953030 ldr r3, [r5, #48]
14018: e0833004 add r3, r3, r4
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
1401c: e596000c ldr r0, [r6, #12]
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
14020: e596c008 ldr ip, [r6, #8]
14024: e5853030 str r3, [r5, #48]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
14028: e59d3030 ldr r3, [sp, #48]
1402c: e2422004 sub r2, r2, #4 ; 0x4
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
14030: e581c008 str ip, [r1, #8]
block->prev = prev;
14034: e581000c str r0, [r1, #12]
14038: e5832000 str r2, [r3]
next->prev = prev->next = block;
1403c: e5801008 str r1, [r0, #8]
14040: e58c100c str r1, [ip, #12]
14044: ea000013 b 14098 <_Heap_Resize_block+0x234>
} else if (free_block_size >= min_block_size) {
14048: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
1404c: e154000c cmp r4, ip <== NOT EXECUTED
14050: 3a000010 bcc 14098 <_Heap_Resize_block+0x234> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14054: e0871000 add r1, r7, r0 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14058: e1803009 orr r3, r0, r9 <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
1405c: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14060: e5873004 str r3, [r7, #4] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14064: e5812004 str r2, [r1, #4] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
14068: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
1406c: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
14070: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14074: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
14078: e5853040 str r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
1407c: e5852050 str r2, [r5, #80] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
14080: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED
14084: e1a00005 mov r0, r5 <== NOT EXECUTED
14088: ebffd7b8 bl 9f70 <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
1408c: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED
14090: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED
14094: e5803000 str r3, [r0] <== NOT EXECUTED
}
}
}
++stats->resizes;
14098: e5953054 ldr r3, [r5, #84]
1409c: e2833001 add r3, r3, #1 ; 0x1
140a0: e5853054 str r3, [r5, #84]
140a4: e3a00000 mov r0, #0 ; 0x0
140a8: ea000002 b 140b8 <_Heap_Resize_block+0x254>
return HEAP_RESIZE_SUCCESSFUL;
140ac: e3a00002 mov r0, #2 ; 0x2
140b0: ea000000 b 140b8 <_Heap_Resize_block+0x254>
140b4: e3a00001 mov r0, #1 ; 0x1
}
140b8: e28dd00c add sp, sp, #12 ; 0xc
140bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000d560 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
d560: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *the_block = the_heap->start;
d564: e5907020 ldr r7, [r0, #32]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
d568: e5973004 ldr r3, [r7, #4]
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
d56c: e2516000 subs r6, r1, #0 ; 0x0
source = the_heap->stats.instance;
d570: b5906028 ldrlt r6, [r0, #40]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
d574: e3130001 tst r3, #1 ; 0x1
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
d578: e1a05000 mov r5, r0
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
d57c: e590b024 ldr fp, [r0, #36]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
d580: 13a04000 movne r4, #0 ; 0x0
d584: 1a000003 bne d598 <_Heap_Walk+0x38>
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
d588: e59f01a0 ldr r0, [pc, #416] ; d730 <_Heap_Walk+0x1d0> <== NOT EXECUTED
d58c: e1a01006 mov r1, r6 <== NOT EXECUTED
d590: ebffdc29 bl 463c <printk> <== NOT EXECUTED
d594: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
d598: e5972000 ldr r2, [r7]
d59c: e5953010 ldr r3, [r5, #16]
d5a0: e1520003 cmp r2, r3
d5a4: 0a00004c beq d6dc <_Heap_Walk+0x17c>
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
d5a8: e59f0184 ldr r0, [pc, #388] ; d734 <_Heap_Walk+0x1d4> <== NOT EXECUTED
d5ac: e1a01006 mov r1, r6 <== NOT EXECUTED
d5b0: ebffdc21 bl 463c <printk> <== NOT EXECUTED
d5b4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
d5b8: ea000047 b d6dc <_Heap_Walk+0x17c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
d5bc: e5979004 ldr r9, [r7, #4]
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
d5c0: e5952020 ldr r2, [r5, #32]
d5c4: e3c9a001 bic sl, r9, #1 ; 0x1
d5c8: e5953024 ldr r3, [r5, #36]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
d5cc: e087800a add r8, r7, sl
d5d0: e1580002 cmp r8, r2
d5d4: 33a01000 movcc r1, #0 ; 0x0
d5d8: 23a01001 movcs r1, #1 ; 0x1
d5dc: e1580003 cmp r8, r3
d5e0: 83a01000 movhi r1, #0 ; 0x0
d5e4: e3510000 cmp r1, #0 ; 0x0
d5e8: 1a000004 bne d600 <_Heap_Walk+0xa0>
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
d5ec: e1a02008 mov r2, r8 <== NOT EXECUTED
d5f0: e59f0140 ldr r0, [pc, #320] ; d738 <_Heap_Walk+0x1d8> <== NOT EXECUTED
d5f4: e1a01006 mov r1, r6 <== NOT EXECUTED
d5f8: ebffdc0f bl 463c <printk> <== NOT EXECUTED
d5fc: ea000039 b d6e8 <_Heap_Walk+0x188> <== NOT EXECUTED
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
d600: e5983004 ldr r3, [r8, #4]
d604: e3130001 tst r3, #1 ; 0x1
d608: 1a00001e bne d688 <_Heap_Walk+0x128>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
d60c: e5983000 ldr r3, [r8]
d610: e15a0003 cmp sl, r3
d614: 0a000003 beq d628 <_Heap_Walk+0xc8>
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
d618: e59f011c ldr r0, [pc, #284] ; d73c <_Heap_Walk+0x1dc> <== NOT EXECUTED
d61c: e1a01006 mov r1, r6 <== NOT EXECUTED
d620: ebffdc05 bl 463c <printk> <== NOT EXECUTED
d624: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
d628: e3190001 tst r9, #1 ; 0x1
d62c: 1a000006 bne d64c <_Heap_Walk+0xec>
if (do_dump || error) printk("\n");
d630: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
d634: 159f0104 ldrne r0, [pc, #260] ; d740 <_Heap_Walk+0x1e0> <== NOT EXECUTED
d638: 1bffdbff blne 463c <printk> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
d63c: e59f0100 ldr r0, [pc, #256] ; d744 <_Heap_Walk+0x1e4> <== NOT EXECUTED
d640: e1a01006 mov r1, r6 <== NOT EXECUTED
d644: ebffdbfc bl 463c <printk> <== NOT EXECUTED
d648: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
d64c: e5953008 ldr r3, [r5, #8]
d650: ea000000 b d658 <_Heap_Walk+0xf8>
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
d654: e5933008 ldr r3, [r3, #8]
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
d658: e1530007 cmp r3, r7
d65c: 11530005 cmpne r3, r5
d660: 1afffffb bne d654 <_Heap_Walk+0xf4>
block = block->next;
if(block != the_block) {
d664: e1530007 cmp r3, r7
d668: 0a000006 beq d688 <_Heap_Walk+0x128>
if (do_dump || error) printk("\n");
d66c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
d670: 159f00c8 ldrne r0, [pc, #200] ; d740 <_Heap_Walk+0x1e0> <== NOT EXECUTED
d674: 1bffdbf0 blne 463c <printk> <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
d678: e59f00c8 ldr r0, [pc, #200] ; d748 <_Heap_Walk+0x1e8> <== NOT EXECUTED
d67c: e1a01006 mov r1, r6 <== NOT EXECUTED
d680: ebffdbed bl 463c <printk> <== NOT EXECUTED
d684: ea000001 b d690 <_Heap_Walk+0x130> <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
d688: e3540000 cmp r4, #0 ; 0x0
d68c: 0a000002 beq d69c <_Heap_Walk+0x13c>
d690: e59f00a8 ldr r0, [pc, #168] ; d740 <_Heap_Walk+0x1e0> <== NOT EXECUTED
d694: ebffdbe8 bl 463c <printk> <== NOT EXECUTED
d698: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
d69c: e5953014 ldr r3, [r5, #20]
d6a0: e15a0003 cmp sl, r3
printk("PASS: %d !block size is too small\n", source);
d6a4: 359f00a0 ldrcc r0, [pc, #160] ; d74c <_Heap_Walk+0x1ec>
d6a8: 3a000005 bcc d6c4 <_Heap_Walk+0x164>
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
d6ac: e1a0000a mov r0, sl
d6b0: e5951010 ldr r1, [r5, #16]
d6b4: eb0026bf bl 171b8 <__umodsi3>
d6b8: e3500000 cmp r0, #0 ; 0x0
d6bc: 0a000003 beq d6d0 <_Heap_Walk+0x170>
printk("PASS: %d !block size is misaligned\n", source);
d6c0: e59f0088 ldr r0, [pc, #136] ; d750 <_Heap_Walk+0x1f0> <== NOT EXECUTED
d6c4: e1a01006 mov r1, r6 <== NOT EXECUTED
d6c8: ebffdbdb bl 463c <printk> <== NOT EXECUTED
d6cc: ea000005 b d6e8 <_Heap_Walk+0x188> <== NOT EXECUTED
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
d6d0: e3540000 cmp r4, #0 ; 0x0
d6d4: 1a000003 bne d6e8 <_Heap_Walk+0x188>
break;
d6d8: e1a07008 mov r7, r8
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
d6dc: e157000b cmp r7, fp
d6e0: 1affffb5 bne d5bc <_Heap_Walk+0x5c>
d6e4: ea000005 b d700 <_Heap_Walk+0x1a0>
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
d6e8: e1a0300b mov r3, fp <== NOT EXECUTED
d6ec: e59f0060 ldr r0, [pc, #96] ; d754 <_Heap_Walk+0x1f4> <== NOT EXECUTED
d6f0: e1a01006 mov r1, r6 <== NOT EXECUTED
d6f4: e1a02007 mov r2, r7 <== NOT EXECUTED
d6f8: ebffdbcf bl 463c <printk> <== NOT EXECUTED
d6fc: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
d700: e5973004 ldr r3, [r7, #4]
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
d704: e5950010 ldr r0, [r5, #16]
d708: e3c32001 bic r2, r3, #1 ; 0x1
d70c: e1520000 cmp r2, r0
d710: 0a000004 beq d728 <_Heap_Walk+0x1c8>
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
d714: e1a03000 mov r3, r0 <== NOT EXECUTED
d718: e1a01006 mov r1, r6 <== NOT EXECUTED
d71c: e59f0034 ldr r0, [pc, #52] ; d758 <_Heap_Walk+0x1f8> <== NOT EXECUTED
d720: ebffdbc5 bl 463c <printk> <== NOT EXECUTED
d724: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
d728: e1a00004 mov r0, r4
d72c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00004a70 <_IO_Manager_initialization>:
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
4a70: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
4a74: e59f607c ldr r6, [pc, #124] ; 4af8 <_IO_Manager_initialization+0x88>
4a78: e59f807c ldr r8, [pc, #124] ; 4afc <_IO_Manager_initialization+0x8c>
/*
* 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 )
4a7c: e1520001 cmp r2, r1
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
4a80: e1a07001 mov r7, r1
4a84: e1a05002 mov r5, r2
4a88: e1a0a000 mov sl, r0
* 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;
4a8c: 95860000 strls r0, [r6]
_IO_Number_of_drivers = number_of_drivers;
4a90: 95881000 strls r1, [r8]
/*
* 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 )
4a94: 98bd85f0 popls {r4, r5, r6, r7, r8, sl, pc}
/*
* 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 *)
4a98: e3a03018 mov r3, #24 ; 0x18 <== NOT EXECUTED
4a9c: e0040293 mul r4, r3, r2 <== NOT EXECUTED
4aa0: e1a00004 mov r0, r4 <== NOT EXECUTED
4aa4: eb000aea bl 7654 <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
4aa8: e1a02004 mov r2, r4 <== NOT EXECUTED
_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;
4aac: e5885000 str r5, [r8] <== NOT EXECUTED
/*
* 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 *)
4ab0: e5860000 str r0, [r6] <== NOT EXECUTED
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
4ab4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
4ab8: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
4abc: eb001c5e bl bc3c <memset> <== NOT EXECUTED
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
4ac0: e1a04005 mov r4, r5 <== NOT EXECUTED
4ac4: e5966000 ldr r6, [r6] <== NOT EXECUTED
4ac8: ea000003 b 4adc <_IO_Manager_initialization+0x6c> <== NOT EXECUTED
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4acc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
4ad0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
4ad4: e89e0003 ldm lr, {r0, r1} <== NOT EXECUTED
4ad8: e88c0003 stm ip, {r0, r1} <== NOT EXECUTED
4adc: e1550007 cmp r5, r7 <== NOT EXECUTED
4ae0: e08ae004 add lr, sl, r4 <== NOT EXECUTED
4ae4: e086c004 add ip, r6, r4 <== NOT EXECUTED
4ae8: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED
4aec: e2844018 add r4, r4, #24 ; 0x18 <== NOT EXECUTED
4af0: 3afffff5 bcc 4acc <_IO_Manager_initialization+0x5c> <== NOT EXECUTED
4af4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
...
00005500 <_Internal_error_Occurred>:
bool is_internal,
uint32_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
5500: e59f3038 ldr r3, [pc, #56] ; 5540 <_Internal_error_Occurred+0x40><== NOT EXECUTED
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
5504: e201c0ff and ip, r1, #255 ; 0xff <== NOT EXECUTED
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
5508: e5832008 str r2, [r3, #8] <== NOT EXECUTED
bool is_internal,
uint32_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
550c: e5830000 str r0, [r3] <== NOT EXECUTED
_Internal_errors_What_happened.is_internal = is_internal;
5510: e5c3c004 strb ip, [r3, #4] <== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
5514: e1a0100c mov r1, ip <== NOT EXECUTED
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
5518: e1a04002 mov r4, r2 <== NOT EXECUTED
_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 );
551c: eb00073c bl 7214 <_User_extensions_Fatal> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
5520: e59f301c ldr r3, [pc, #28] ; 5544 <_Internal_error_Occurred+0x44><== NOT EXECUTED
5524: e3a02005 mov r2, #5 ; 0x5 <== NOT EXECUTED
5528: e5832000 str r2, [r3] <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
552c: e10f2000 mrs r2, CPSR <== NOT EXECUTED
5530: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED
5534: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
5538: e1a00004 mov r0, r4 <== NOT EXECUTED
553c: eafffffe b 553c <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
0000a164 <_Objects_API_maximum_class>:
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
a164: e2400001 sub r0, r0, #1 ; 0x1
a168: e3500003 cmp r0, #3 ; 0x3
a16c: 979ff100 ldrls pc, [pc, r0, lsl #2]
a170: ea00000b b a1a4 <_Objects_API_maximum_class+0x40>
a174: 0000a18c .word 0x0000a18c
a178: 0000a184 .word 0x0000a184
a17c: 0000a194 .word 0x0000a194 <== NOT EXECUTED
a180: 0000a19c .word 0x0000a19c <== NOT EXECUTED
a184: e3a0000a mov r0, #10 ; 0xa
a188: e12fff1e bx lr
a18c: e3a00002 mov r0, #2 ; 0x2
a190: e12fff1e bx lr
a194: e3a0000c mov r0, #12 ; 0xc
a198: e12fff1e bx lr
case OBJECTS_INTERNAL_API:
return OBJECTS_INTERNAL_CLASSES_LAST;
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
a19c: e3a00008 mov r0, #8 ; 0x8
a1a0: e12fff1e bx lr
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
a1a4: e3e00000 mvn r0, #0 ; 0x0
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
a1a8: e12fff1e bx lr
00005608 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5608: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
560c: e1d060b8 ldrh r6, [r0, #8]
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5610: e1d041b0 ldrh r4, [r0, #16]
5614: e1540006 cmp r4, r6
5618: 33a07000 movcc r7, #0 ; 0x0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
561c: e24dd014 sub sp, sp, #20 ; 0x14
5620: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5624: 31a0a006 movcc sl, r6
5628: 31a08007 movcc r8, r7
562c: 3a00000f bcc 5670 <_Objects_Extend_information+0x68>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
5630: e5909014 ldr r9, [r0, #20]
5634: e1a00004 mov r0, r4
5638: e1a01009 mov r1, r9
563c: eb0032a0 bl 120c4 <__aeabi_uidiv>
5640: e1a0a006 mov sl, r6
5644: e1a07000 mov r7, r0
5648: e3a08000 mov r8, #0 ; 0x0
564c: ea000005 b 5668 <_Objects_Extend_information+0x60>
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
5650: e5953034 ldr r3, [r5, #52]
5654: e7933108 ldr r3, [r3, r8, lsl #2]
5658: e3530000 cmp r3, #0 ; 0x0
565c: 0a000003 beq 5670 <_Objects_Extend_information+0x68>
break;
else
index_base += information->allocation_size;
5660: e08aa009 add sl, sl, r9
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5664: e2888001 add r8, r8, #1 ; 0x1
5668: e1580007 cmp r8, r7
566c: 3afffff7 bcc 5650 <_Objects_Extend_information+0x48>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
5670: e15a0004 cmp sl, r4
5674: 3a000056 bcc 57d4 <_Objects_Extend_information+0x1cc>
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5678: e5d52012 ldrb r2, [r5, #18]
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
567c: e5953014 ldr r3, [r5, #20]
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5680: e3520000 cmp r2, #0 ; 0x0
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5684: e0843003 add r3, r4, r3
5688: e58d3004 str r3, [sp, #4]
/*
* Up the block count and maximum
*/
block_count++;
568c: e2874001 add r4, r7, #1 ; 0x1
5690: e0832006 add r2, r3, r6
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5694: 0a000007 beq 56b8 <_Objects_Extend_information+0xb0>
object_blocks = (void**)
5698: e3a03003 mov r3, #3 ; 0x3
569c: e0202493 mla r0, r3, r4, r2
56a0: e1a00100 lsl r0, r0, #2
56a4: eb0007e6 bl 7644 <_Workspace_Allocate>
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
56a8: e3500000 cmp r0, #0 ; 0x0
56ac: e58d0000 str r0, [sp]
56b0: 1a000005 bne 56cc <_Objects_Extend_information+0xc4>
56b4: ea000078 b 589c <_Objects_Extend_information+0x294> <== NOT EXECUTED
return;
}
else {
object_blocks = (void**)
56b8: e3a03003 mov r3, #3 ; 0x3
56bc: e0202493 mla r0, r3, r4, r2
56c0: e1a00100 lsl r0, r0, #2
56c4: eb0007e2 bl 7654 <_Workspace_Allocate_or_fatal_error>
56c8: e58d0000 str r0, [sp]
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
56cc: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
56d0: e59d1000 ldr r1, [sp]
56d4: e1a02104 lsl r2, r4, #2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
56d8: e1530006 cmp r3, r6
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
56dc: e081b002 add fp, r1, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
56e0: 93a03000 movls r3, #0 ; 0x0
56e4: e08b9002 add r9, fp, r2
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
56e8: 91a02003 movls r2, r3
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
56ec: 9a000011 bls 5738 <_Objects_Extend_information+0x130>
/*
* 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,
56f0: e1a04107 lsl r4, r7, #2
56f4: e5951034 ldr r1, [r5, #52]
56f8: e1a02004 mov r2, r4
56fc: e59d0000 ldr r0, [sp]
5700: eb00190e bl bb40 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
5704: e1a02004 mov r2, r4
5708: e5951030 ldr r1, [r5, #48]
570c: e1a0000b mov r0, fp
5710: eb00190a bl bb40 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5714: e1d521b0 ldrh r2, [r5, #16]
5718: e0862002 add r2, r6, r2
571c: e1a02102 lsl r2, r2, #2
5720: e1a00009 mov r0, r9
5724: e595101c ldr r1, [r5, #28]
5728: eb001904 bl bb40 <memcpy>
572c: ea000003 b 5740 <_Objects_Extend_information+0x138>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
5730: e7892103 str r2, [r9, r3, lsl #2]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5734: e2833001 add r3, r3, #1 ; 0x1
5738: e1530006 cmp r3, r6
573c: 3afffffb bcc 5730 <_Objects_Extend_information+0x128>
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5740: e3a03000 mov r3, #0 ; 0x0
inactive_per_block[block_count] = 0;
5744: e78b3107 str r3, [fp, r7, lsl #2]
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5748: e59dc000 ldr ip, [sp]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
574c: e5952014 ldr r2, [r5, #20]
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5750: e78c3107 str r3, [ip, r7, lsl #2]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5754: e08a0002 add r0, sl, r2
5758: e089110a add r1, r9, sl, lsl #2
575c: e1a0200a mov r2, sl
5760: ea000000 b 5768 <_Objects_Extend_information+0x160>
index++ ) {
local_table[ index ] = NULL;
5764: e5013004 str r3, [r1, #-4]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5768: e1520000 cmp r2, r0
index++ ) {
576c: e2811004 add r1, r1, #4 ; 0x4
5770: e2822001 add r2, r2, #1 ; 0x1
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5774: 3afffffa bcc 5764 <_Objects_Extend_information+0x15c>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
5778: e10f0000 mrs r0, CPSR
577c: e38030c0 orr r3, r0, #192 ; 0xc0
5780: e129f003 msr CPSR_fc, r3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
5784: e5953000 ldr r3, [r5]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5788: e59dc004 ldr ip, [sp, #4]
information->maximum_id = _Objects_Build_id(
578c: e1d510b4 ldrh r1, [r5, #4]
5790: e1a03c03 lsl r3, r3, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5794: e1a0280c lsl r2, ip, #16
information->maximum_id = _Objects_Build_id(
5798: e3833801 orr r3, r3, #65536 ; 0x10000
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
579c: e1a02822 lsr r2, r2, #16
information->maximum_id = _Objects_Build_id(
57a0: e1833d81 orr r3, r3, r1, lsl #27
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
57a4: e59d1000 ldr r1, [sp]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
57a8: e1833002 orr r3, r3, r2
57ac: e585300c str r3, [r5, #12]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
57b0: e585b030 str fp, [r5, #48]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
57b4: e5953034 ldr r3, [r5, #52]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
57b8: e585901c str r9, [r5, #28]
information->maximum = maximum;
57bc: e1c521b0 strh r2, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
57c0: e5851034 str r1, [r5, #52]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
57c4: e129f000 msr CPSR_fc, r0
if ( old_tables )
57c8: e3530000 cmp r3, #0 ; 0x0
_Workspace_Free( old_tables );
57cc: 11a00003 movne r0, r3
57d0: 1b000797 blne 7634 <_Workspace_Free>
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
57d4: e5d53012 ldrb r3, [r5, #18]
57d8: e3530000 cmp r3, #0 ; 0x0
57dc: e5952014 ldr r2, [r5, #20]
57e0: e5954034 ldr r4, [r5, #52]
57e4: e5953018 ldr r3, [r5, #24]
57e8: 0a000007 beq 580c <_Objects_Extend_information+0x204>
information->object_blocks[ block ] =
57ec: e0000392 mul r0, r2, r3
57f0: eb000793 bl 7644 <_Workspace_Allocate>
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
57f4: e5953034 ldr r3, [r5, #52]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
57f8: e7840108 str r0, [r4, r8, lsl #2]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
57fc: e7933108 ldr r3, [r3, r8, lsl #2]
5800: e3530000 cmp r3, #0 ; 0x0
5804: 1a000003 bne 5818 <_Objects_Extend_information+0x210>
5808: ea000023 b 589c <_Objects_Extend_information+0x294> <== NOT EXECUTED
return;
}
else {
information->object_blocks[ block ] =
580c: e0000392 mul r0, r2, r3
5810: eb00078f bl 7654 <_Workspace_Allocate_or_fatal_error>
5814: e7840108 str r0, [r4, r8, lsl #2]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
5818: e5953034 ldr r3, [r5, #52]
581c: e28d4008 add r4, sp, #8 ; 0x8
5820: e7931108 ldr r1, [r3, r8, lsl #2]
5824: e1a00004 mov r0, r4
5828: e2852014 add r2, r5, #20 ; 0x14
582c: e892000c ldm r2, {r2, r3}
5830: eb00112f bl 9cf4 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5834: e1a0600a mov r6, sl
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
5838: e1a08108 lsl r8, r8, #2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
583c: e2857020 add r7, r5, #32 ; 0x20
5840: ea000008 b 5868 <_Objects_Extend_information+0x260>
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
5844: e5953000 ldr r3, [r5]
5848: e1d520b4 ldrh r2, [r5, #4]
584c: e1a03c03 lsl r3, r3, #24
5850: e3833801 orr r3, r3, #65536 ; 0x10000
5854: e1833d82 orr r3, r3, r2, lsl #27
5858: e1833006 orr r3, r3, r6
585c: e58c3008 str r3, [ip, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5860: ebfffd5d bl 4ddc <_Chain_Append>
index++;
5864: e2866001 add r6, r6, #1 ; 0x1
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5868: e1a00004 mov r0, r4
586c: eb001113 bl 9cc0 <_Chain_Get>
5870: e250c000 subs ip, r0, #0 ; 0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5874: e1a0100c mov r1, ip
5878: e1a00007 mov r0, r7
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
587c: 1afffff0 bne 5844 <_Objects_Extend_information+0x23c>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
5880: e5952030 ldr r2, [r5, #48]
5884: e5953014 ldr r3, [r5, #20]
5888: e7823008 str r3, [r2, r8]
information->inactive += information->allocation_size;
588c: e1d522bc ldrh r2, [r5, #44]
5890: e5953014 ldr r3, [r5, #20]
5894: e0833002 add r3, r3, r2
5898: e1c532bc strh r3, [r5, #44]
}
589c: e28dd014 add sp, sp, #20 ; 0x14
58a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00006e5c <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
6e5c: e92d4030 push {r4, r5, lr}
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
6e60: e2515000 subs r5, r1, #0 ; 0x0
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
6e64: e24dd004 sub sp, sp, #4 ; 0x4
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
6e68: 03a00001 moveq r0, #1 ; 0x1
6e6c: 0a00001b beq 6ee0 <_Objects_Id_to_name+0x84>
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
6e70: e3500000 cmp r0, #0 ; 0x0
6e74: 059f3080 ldreq r3, [pc, #128] ; 6efc <_Objects_Id_to_name+0xa0>
6e78: 05933000 ldreq r3, [r3]
6e7c: 05931008 ldreq r1, [r3, #8]
6e80: 11a01000 movne r1, r0
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
6e84: e1a03c21 lsr r3, r1, #24
6e88: e2030007 and r0, r3, #7 ; 0x7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
6e8c: e2403001 sub r3, r0, #1 ; 0x1
6e90: e3530003 cmp r3, #3 ; 0x3
6e94: 8a000010 bhi 6edc <_Objects_Id_to_name+0x80>
6e98: ea000012 b 6ee8 <_Objects_Id_to_name+0x8c>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
6e9c: e1a03da1 lsr r3, r1, #27
6ea0: e7900103 ldr r0, [r0, r3, lsl #2]
if ( !information )
6ea4: e3500000 cmp r0, #0 ; 0x0
6ea8: 0a00000b beq 6edc <_Objects_Id_to_name+0x80>
return OBJECTS_INVALID_ID;
if ( information->is_string )
6eac: e5d04038 ldrb r4, [r0, #56]
6eb0: e3540000 cmp r4, #0 ; 0x0
6eb4: 1a000008 bne 6edc <_Objects_Id_to_name+0x80>
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
6eb8: e1a0200d mov r2, sp
6ebc: ebffffcb bl 6df0 <_Objects_Get>
if ( !the_object )
6ec0: e3500000 cmp r0, #0 ; 0x0
6ec4: 0a000004 beq 6edc <_Objects_Id_to_name+0x80>
return OBJECTS_INVALID_ID;
*name = the_object->name;
6ec8: e590300c ldr r3, [r0, #12]
6ecc: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
6ed0: eb000216 bl 7730 <_Thread_Enable_dispatch>
6ed4: e1a00004 mov r0, r4
6ed8: ea000000 b 6ee0 <_Objects_Id_to_name+0x84>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
6edc: e3a00003 mov r0, #3 ; 0x3
}
6ee0: e28dd004 add sp, sp, #4 ; 0x4
6ee4: e8bd8030 pop {r4, r5, pc}
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
6ee8: e59f3010 ldr r3, [pc, #16] ; 6f00 <_Objects_Id_to_name+0xa4>
6eec: e7930100 ldr r0, [r3, r0, lsl #2]
6ef0: e3500000 cmp r0, #0 ; 0x0
6ef4: 1affffe8 bne 6e9c <_Objects_Id_to_name+0x40>
6ef8: eafffff7 b 6edc <_Objects_Id_to_name+0x80> <== NOT EXECUTED
00005a74 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
5a74: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
5a78: e59fc0a8 ldr ip, [pc, #168] ; 5b28 <_Objects_Initialize_information+0xb4>
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
5a7c: e1a04c01 lsl r4, r1, #24
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
5a80: e1a07000 mov r7, r0
5a84: e59d8024 ldr r8, [sp, #36]
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
5a88: e3c3a102 bic sl, r3, #-2147483648 ; 0x80000000
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
5a8c: e3844801 orr r4, r4, #65536 ; 0x10000
/*
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
5a90: e1a03fa3 lsr r3, r3, #31
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
5a94: e79c5101 ldr r5, [ip, r1, lsl #2]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
5a98: e1844d82 orr r4, r4, r2, lsl #27
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
5a9c: e5ddc020 ldrb ip, [sp, #32]
/*
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
5aa0: e5c73012 strb r3, [r7, #18]
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
5aa4: e59f3080 ldr r3, [pc, #128] ; 5b2c <_Objects_Initialize_information+0xb8>
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
5aa8: e35a0000 cmp sl, #0 ; 0x0
5aac: 13844001 orrne r4, r4, #1 ; 0x1
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
5ab0: e3180003 tst r8, #3 ; 0x3
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
5ab4: e1dd61bc ldrh r6, [sp, #28]
information->the_api = the_api;
information->the_class = the_class;
information->is_string = is_string;
information->local_table = 0;
information->inactive_per_block = 0;
5ab8: e3a00000 mov r0, #0 ; 0x0
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
5abc: e587301c str r3, [r7, #28]
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
5ac0: 12883004 addne r3, r8, #4 ; 0x4
uint32_t name_length;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
5ac4: e5871000 str r1, [r7]
information->local_table = 0;
information->inactive_per_block = 0;
information->object_blocks = 0;
information->inactive = 0;
5ac8: e1c702bc strh r0, [r7, #44]
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
5acc: 13c31003 bicne r1, r3, #3 ; 0x3
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
5ad0: 01a01008 moveq r1, r8
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
5ad4: e7857102 str r7, [r5, r2, lsl #2]
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
5ad8: e1c720b4 strh r2, [r7, #4]
information->is_string = is_string;
information->local_table = 0;
information->inactive_per_block = 0;
5adc: e5870030 str r0, [r7, #48]
information->object_blocks = 0;
5ae0: e5870034 str r0, [r7, #52]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5ae4: e2872024 add r2, r7, #36 ; 0x24
the_chain->permanent_null = NULL;
5ae8: e3a00000 mov r0, #0 ; 0x0
the_chain->last = _Chain_Head(the_chain);
5aec: e2873020 add r3, r7, #32 ; 0x20
/*
* Initialize objects .. if there are any
*/
if ( maximum ) {
5af0: e35a0000 cmp sl, #0 ; 0x0
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->is_string = is_string;
5af4: e5c7c038 strb ip, [r7, #56]
/*
* Set the size of the object
*/
information->size = size;
5af8: e5876018 str r6, [r7, #24]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
5afc: e5874008 str r4, [r7, #8]
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum;
5b00: e587a014 str sl, [r7, #20]
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
5b04: e1c713ba strh r1, [r7, #58]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
5b08: e5872020 str r2, [r7, #32]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
5b0c: e5873028 str r3, [r7, #40]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
5b10: e5870024 str r0, [r7, #36]
/*
* Initialize objects .. if there are any
*/
if ( maximum ) {
5b14: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
/*
* Reset the maximum value. It will be updated when the information is
* extended.
*/
information->maximum = 0;
5b18: e1c701b0 strh r0, [r7, #16]
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
5b1c: e1a00007 mov r0, r7
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
5b20: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
5b24: eafffeb7 b 5608 <_Objects_Extend_information>
000111e4 <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
111e4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
111e8: e252a000 subs sl, r2, #0 ; 0x0
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
111ec: e1a06000 mov r6, r0
111f0: e1a08001 mov r8, r1
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
111f4: 03a00002 moveq r0, #2 ; 0x2
111f8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc}
return OBJECTS_INVALID_ADDRESS;
if ( !name )
111fc: e3510000 cmp r1, #0 ; 0x0
11200: 0a000016 beq 11260 <_Objects_Name_to_id_string+0x7c>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
11204: e1d671b0 ldrh r7, [r6, #16]
11208: e3570000 cmp r7, #0 ; 0x0
1120c: 13a05001 movne r5, #1 ; 0x1
11210: 1a00000f bne 11254 <_Objects_Name_to_id_string+0x70>
11214: ea000011 b 11260 <_Objects_Name_to_id_string+0x7c> <== NOT EXECUTED
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
11218: e596301c ldr r3, [r6, #28]
1121c: e7934105 ldr r4, [r3, r5, lsl #2]
if ( !the_object )
11220: e3540000 cmp r4, #0 ; 0x0
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
11224: e2855001 add r5, r5, #1 ; 0x1
the_object = information->local_table[ index ];
if ( !the_object )
11228: 0a000009 beq 11254 <_Objects_Name_to_id_string+0x70>
continue;
if ( !the_object->name.name_p )
1122c: e594300c ldr r3, [r4, #12]
11230: e2531000 subs r1, r3, #0 ; 0x0
11234: 0a000006 beq 11254 <_Objects_Name_to_id_string+0x70>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
11238: e1d623ba ldrh r2, [r6, #58]
1123c: eb000c17 bl 142a0 <strncmp>
11240: e3500000 cmp r0, #0 ; 0x0
11244: 1a000002 bne 11254 <_Objects_Name_to_id_string+0x70>
*id = the_object->id;
11248: e5943008 ldr r3, [r4, #8]
1124c: e58a3000 str r3, [sl]
11250: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
11254: e1550007 cmp r5, r7
continue;
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
11258: e1a00008 mov r0, r8
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
1125c: 9affffed bls 11218 <_Objects_Name_to_id_string+0x34>
11260: e3a00001 mov r0, #1 ; 0x1
}
}
}
return OBJECTS_INVALID_NAME;
}
11264: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00004b04 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
4b04: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
4b08: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
4b0c: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
4b10: 0a000006 beq 4b30 <_POSIX_Condition_variables_Get+0x2c>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
4b14: e5953000 ldr r3, [r5]
4b18: e3730001 cmn r3, #1 ; 0x1
4b1c: 1a000007 bne 4b40 <_POSIX_Condition_variables_Get+0x3c>
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
4b20: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
4b24: eb00000b bl 4b58 <pthread_cond_init> <== NOT EXECUTED
if ( status ) {
4b28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
4b2c: 0a000003 beq 4b40 <_POSIX_Condition_variables_Get+0x3c> <== NOT EXECUTED
*location = OBJECTS_ERROR;
4b30: e3a03001 mov r3, #1 ; 0x1
4b34: e5843000 str r3, [r4]
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
4b38: e3a00000 mov r0, #0 ; 0x0
4b3c: e8bd8030 pop {r4, r5, pc}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
4b40: e5951000 ldr r1, [r5]
4b44: e59f0008 ldr r0, [pc, #8] ; 4b54 <_POSIX_Condition_variables_Get+0x50>
4b48: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
4b4c: e8bd4030 pop {r4, r5, lr}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
4b50: ea000b06 b 7770 <_Objects_Get>
00004cec <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
4cec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
4cf0: e1a06001 mov r6, r1
4cf4: e24dd004 sub sp, sp, #4 ; 0x4
4cf8: e1a07000 mov r7, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
4cfc: e1a0100d mov r1, sp
4d00: e1a00006 mov r0, r6
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
4d04: e1a0a002 mov sl, r2
4d08: e20380ff and r8, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
4d0c: eb000070 bl 4ed4 <_POSIX_Mutex_Get>
4d10: e3500000 cmp r0, #0 ; 0x0
4d14: 0a000032 beq 4de4 <_POSIX_Condition_variables_Wait_support+0xf8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4d18: e59f30d4 ldr r3, [pc, #212] ; 4df4 <_POSIX_Condition_variables_Wait_support+0x108>
4d1c: e5932000 ldr r2, [r3]
4d20: e2422001 sub r2, r2, #1 ; 0x1
4d24: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
4d28: e1a0100d mov r1, sp
4d2c: e1a00007 mov r0, r7
4d30: ebffff73 bl 4b04 <_POSIX_Condition_variables_Get>
switch ( location ) {
4d34: e59d3000 ldr r3, [sp]
4d38: e3530000 cmp r3, #0 ; 0x0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
4d3c: e1a05000 mov r5, r0
switch ( location ) {
4d40: 1a000027 bne 4de4 <_POSIX_Condition_variables_Wait_support+0xf8>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
4d44: e5902014 ldr r2, [r0, #20]
4d48: e3520000 cmp r2, #0 ; 0x0
4d4c: 0a000004 beq 4d64 <_POSIX_Condition_variables_Wait_support+0x78>
4d50: e5963000 ldr r3, [r6]
4d54: e1520003 cmp r2, r3
4d58: 0a000001 beq 4d64 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
4d5c: eb000c87 bl 7f80 <_Thread_Enable_dispatch> <== NOT EXECUTED
4d60: ea00001f b 4de4 <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
4d64: e1a00006 mov r0, r6
4d68: eb0000df bl 50ec <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
4d6c: e3580000 cmp r8, #0 ; 0x0
4d70: 1a000015 bne 4dcc <_POSIX_Condition_variables_Wait_support+0xe0>
the_cond->Mutex = *mutex;
4d74: e5963000 ldr r3, [r6]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
4d78: e59f4078 ldr r4, [pc, #120] ; 4df8 <_POSIX_Condition_variables_Wait_support+0x10c>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
4d7c: e5853014 str r3, [r5, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
4d80: e5942000 ldr r2, [r4]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
4d84: e5973000 ldr r3, [r7]
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;
4d88: e285c018 add ip, r5, #24 ; 0x18
_Thread_Executing->Wait.id = *cond;
4d8c: e5823020 str r3, [r2, #32]
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;
4d90: e3a03001 mov r3, #1 ; 0x1
4d94: e5853048 str r3, [r5, #72]
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;
4d98: e582c044 str ip, [r2, #68]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
4d9c: e5828034 str r8, [r2, #52]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
4da0: e1a0000c mov r0, ip
4da4: e1a0100a mov r1, sl
4da8: e59f204c ldr r2, [pc, #76] ; 4dfc <_POSIX_Condition_variables_Wait_support+0x110>
4dac: eb000dae bl 846c <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
4db0: eb000c72 bl 7f80 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
4db4: e5943000 ldr r3, [r4]
4db8: e5934034 ldr r4, [r3, #52]
if ( status && status != ETIMEDOUT )
4dbc: e3540000 cmp r4, #0 ; 0x0
4dc0: 13540074 cmpne r4, #116 ; 0x74
4dc4: 0a000002 beq 4dd4 <_POSIX_Condition_variables_Wait_support+0xe8>
4dc8: ea000006 b 4de8 <_POSIX_Condition_variables_Wait_support+0xfc><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
4dcc: eb000c6b bl 7f80 <_Thread_Enable_dispatch>
4dd0: e3a04074 mov r4, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
4dd4: e1a00006 mov r0, r6
4dd8: eb0000a2 bl 5068 <pthread_mutex_lock>
if ( mutex_status )
4ddc: e3500000 cmp r0, #0 ; 0x0
4de0: 0a000000 beq 4de8 <_POSIX_Condition_variables_Wait_support+0xfc>
4de4: e3a04016 mov r4, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4de8: e1a00004 mov r0, r4
4dec: e28dd004 add sp, sp, #4 ; 0x4
4df0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000fe20 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
fe20: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
fe24: e1a0a001 mov sl, r1
fe28: e24dd010 sub sp, sp, #16 ; 0x10
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
fe2c: e3a010ff mov r1, #255 ; 0xff
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
fe30: e1a04002 mov r4, r2
fe34: e1a0b003 mov fp, r3
fe38: e1a09000 mov r9, r0
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
fe3c: eb0011ab bl 144f0 <strnlen>
if ( n > NAME_MAX )
fe40: e35000ff cmp r0, #255 ; 0xff
CORE_message_queue_Attributes *the_mq_attr;
struct mq_attr attr;
char *name;
size_t n;
n = strnlen( name_arg, NAME_MAX );
fe44: e1a06000 mov r6, r0
if ( n > NAME_MAX )
fe48: 83a0005b movhi r0, #91 ; 0x5b
fe4c: 8a00004b bhi ff80 <_POSIX_Message_queue_Create_support+0x160>
fe50: e59f2130 ldr r2, [pc, #304] ; ff88 <_POSIX_Message_queue_Create_support+0x168>
fe54: e5923000 ldr r3, [r2]
fe58: e2833001 add r3, r3, #1 ; 0x1
fe5c: e5823000 str r3, [r2]
* but were not compared against any existing implementation for
* compatibility. See README.mqueue for an example program we
* think will print out the defaults. Report anything you find with it.
*/
if ( attr_ptr == NULL ) {
fe60: e3540000 cmp r4, #0 ; 0x0
fe64: 03a08010 moveq r8, #16 ; 0x10
fe68: 03a0700a moveq r7, #10 ; 0xa
fe6c: 0a00000d beq fea8 <_POSIX_Message_queue_Create_support+0x88>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
fe70: e5943004 ldr r3, [r4, #4]
fe74: e3530000 cmp r3, #0 ; 0x0
fe78: da000002 ble fe88 <_POSIX_Message_queue_Create_support+0x68>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
fe7c: e5943008 ldr r3, [r4, #8]
fe80: e3530000 cmp r3, #0 ; 0x0
fe84: ca000003 bgt fe98 <_POSIX_Message_queue_Create_support+0x78>
_Thread_Enable_dispatch();
fe88: ebfff404 bl cea0 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
fe8c: eb0009e6 bl 1262c <__errno>
fe90: e3a03016 mov r3, #22 ; 0x16
fe94: ea00002f b ff58 <_POSIX_Message_queue_Create_support+0x138>
}
attr = *attr_ptr;
fe98: e894000f ldm r4, {r0, r1, r2, r3}
fe9c: e88d000f stm sp, {r0, r1, r2, r3}
fea0: e1a08002 mov r8, r2
fea4: e1a07001 mov r7, r1
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
fea8: e59f50dc ldr r5, [pc, #220] ; ff8c <_POSIX_Message_queue_Create_support+0x16c>
feac: e1a00005 mov r0, r5
feb0: ebfff09b bl c124 <_Objects_Allocate>
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
feb4: e2504000 subs r4, r0, #0 ; 0x0
feb8: 1a000003 bne fecc <_POSIX_Message_queue_Create_support+0xac>
_Thread_Enable_dispatch();
febc: ebfff3f7 bl cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
fec0: eb0009d9 bl 1262c <__errno> <== NOT EXECUTED
fec4: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED
fec8: ea000022 b ff58 <_POSIX_Message_queue_Create_support+0x138><== NOT EXECUTED
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
fecc: e3a03001 mov r3, #1 ; 0x1
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
fed0: e1a00006 mov r0, r6
if ( !the_mq ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
fed4: e584a010 str sl, [r4, #16]
the_mq->named = TRUE;
the_mq->open_count = 1;
the_mq->linked = TRUE;
fed8: e5c43015 strb r3, [r4, #21]
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
fedc: e5c43014 strb r3, [r4, #20]
the_mq->open_count = 1;
fee0: e5843018 str r3, [r4, #24]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
fee4: ebfff91a bl e354 <_Workspace_Allocate>
if (!name) {
fee8: e2506000 subs r6, r0, #0 ; 0x0
feec: 1a000006 bne ff0c <_POSIX_Message_queue_Create_support+0xec>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
fef0: e1a00005 mov r0, r5 <== NOT EXECUTED
fef4: e1a01004 mov r1, r4 <== NOT EXECUTED
fef8: ebfff158 bl c460 <_Objects_Free> <== NOT EXECUTED
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
fefc: ebfff3e7 bl cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
ff00: eb0009c9 bl 1262c <__errno> <== NOT EXECUTED
ff04: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
ff08: ea000012 b ff58 <_POSIX_Message_queue_Create_support+0x138><== NOT EXECUTED
}
strcpy( name, name_arg );
ff0c: e1a01009 mov r1, r9
* Note that thread blocking discipline should be based on the
* current scheduling policy.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
ff10: e3a0a000 mov sl, #0 ; 0x0
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
ff14: eb000efc bl 13b0c <strcpy>
* Note that thread blocking discipline should be based on the
* current scheduling policy.
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
ff18: e584a05c str sl, [r4, #92]
if ( ! _CORE_message_queue_Initialize(
ff1c: e1a02007 mov r2, r7
ff20: e1a03008 mov r3, r8
ff24: e284001c add r0, r4, #28 ; 0x1c
ff28: e284105c add r1, r4, #92 ; 0x5c
ff2c: eb000346 bl 10c4c <_CORE_message_queue_Initialize>
ff30: e150000a cmp r0, sl
ff34: 1a00000a bne ff64 <_POSIX_Message_queue_Create_support+0x144>
ff38: e1a01004 mov r1, r4 <== NOT EXECUTED
ff3c: e1a00005 mov r0, r5 <== NOT EXECUTED
ff40: ebfff146 bl c460 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
ff44: e1a00006 mov r0, r6 <== NOT EXECUTED
ff48: ebfff8fd bl e344 <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
ff4c: ebfff3d3 bl cea0 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
ff50: eb0009b5 bl 1262c <__errno> <== NOT EXECUTED
ff54: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
ff58: e5803000 str r3, [r0]
ff5c: e3e00000 mvn r0, #0 ; 0x0
ff60: ea000006 b ff80 <_POSIX_Message_queue_Create_support+0x160>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ff64: e595201c ldr r2, [r5, #28]
ff68: e1d430b8 ldrh r3, [r4, #8]
ff6c: e7824103 str r4, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
ff70: e584600c str r6, [r4, #12]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
ff74: e58b4000 str r4, [fp]
_Thread_Enable_dispatch();
ff78: ebfff3c8 bl cea0 <_Thread_Enable_dispatch>
ff7c: e1a0000a mov r0, sl
return 0;
}
ff80: e28dd010 add sp, sp, #16 ; 0x10
ff84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
000090b4 <_POSIX_Message_queue_Manager_initialization>:
*/
void _POSIX_Message_queue_Manager_initialization(
uint32_t maximum_message_queues
)
{
90b4: e92d4070 push {r4, r5, r6, lr}
90b8: e1a04000 mov r4, r0
90bc: e24dd00c sub sp, sp, #12 ; 0xc
_Objects_Initialize_information(
90c0: e3a05001 mov r5, #1 ; 0x1
90c4: e3a060ff mov r6, #255 ; 0xff
90c8: e1a03004 mov r3, r4
90cc: e3a0c0a4 mov ip, #164 ; 0xa4
90d0: e59f0038 ldr r0, [pc, #56] ; 9110 <_POSIX_Message_queue_Manager_initialization+0x5c>
90d4: e3a01003 mov r1, #3 ; 0x3
90d8: e3a02005 mov r2, #5 ; 0x5
90dc: e58dc000 str ip, [sp]
90e0: e98d0060 stmib sp, {r5, r6}
90e4: ebfff262 bl 5a74 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
_Objects_Initialize_information(
90e8: e3a0c018 mov ip, #24 ; 0x18
90ec: e1a03004 mov r3, r4
90f0: e59f001c ldr r0, [pc, #28] ; 9114 <_POSIX_Message_queue_Manager_initialization+0x60>
90f4: e3a01003 mov r1, #3 ; 0x3
90f8: e3a02004 mov r2, #4 ; 0x4
90fc: e58dc000 str ip, [sp]
9100: e98d0060 stmib sp, {r5, r6}
9104: ebfff25a bl 5a74 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
9108: e28dd00c add sp, sp, #12 ; 0xc
910c: e8bd8070 pop {r4, r5, r6, pc}
0000584c <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
584c: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5850: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
5854: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5858: 0a000006 beq 5878 <_POSIX_Mutex_Get+0x2c>
585c: e5953000 ldr r3, [r5]
5860: e3730001 cmn r3, #1 ; 0x1
5864: 1a000007 bne 5888 <_POSIX_Mutex_Get+0x3c>
5868: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
586c: eb00001d bl 58e8 <pthread_mutex_init> <== NOT EXECUTED
5870: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5874: 0a000003 beq 5888 <_POSIX_Mutex_Get+0x3c> <== NOT EXECUTED
5878: e3a03001 mov r3, #1 ; 0x1
587c: e5843000 str r3, [r4]
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5880: e3a00000 mov r0, #0 ; 0x0
5884: e8bd8030 pop {r4, r5, pc}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5888: e5951000 ldr r1, [r5]
588c: e59f0008 ldr r0, [pc, #8] ; 589c <_POSIX_Mutex_Get+0x50>
5890: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5894: e8bd4030 pop {r4, r5, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5898: ea000ada b 8408 <_Objects_Get>
000057f0 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
57f0: e92d4070 push {r4, r5, r6, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
57f4: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
57f8: e1a04001 mov r4, r1
57fc: e1a06002 mov r6, r2
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5800: 0a000006 beq 5820 <_POSIX_Mutex_Get_interrupt_disable+0x30>
5804: e5953000 ldr r3, [r5]
5808: e3730001 cmn r3, #1 ; 0x1
580c: 1a000007 bne 5830 <_POSIX_Mutex_Get_interrupt_disable+0x40>
5810: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
5814: eb000033 bl 58e8 <pthread_mutex_init> <== NOT EXECUTED
5818: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
581c: 0a000003 beq 5830 <_POSIX_Mutex_Get_interrupt_disable+0x40><== NOT EXECUTED
5820: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
5824: e5843000 str r3, [r4] <== NOT EXECUTED
return (POSIX_Mutex_Control *)
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5828: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
582c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5830: e5951000 ldr r1, [r5]
5834: e59f000c ldr r0, [pc, #12] ; 5848 <_POSIX_Mutex_Get_interrupt_disable+0x58>
5838: e1a02004 mov r2, r4
583c: e1a03006 mov r3, r6
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5840: e8bd4070 pop {r4, r5, r6, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5844: ea000ad5 b 83a0 <_Objects_Get_isr_disable>
0000ca08 <_POSIX_Semaphore_Create_support>:
ca08: e59fc0e8 ldr ip, [pc, #232] ; caf8 <_POSIX_Semaphore_Create_support+0xf0>
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
ca0c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
ca10: e59ce000 ldr lr, [ip]
ca14: e28ee001 add lr, lr, #1 ; 0x1
ca18: e58ce000 str lr, [ip]
ca1c: e1a07002 mov r7, r2
ca20: e1a08003 mov r8, r3
ca24: e1a06000 mov r6, r0
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
ca28: e3510000 cmp r1, #0 ; 0x0
ca2c: 0a000003 beq ca40 <_POSIX_Semaphore_Create_support+0x38>
_Thread_Enable_dispatch();
ca30: ebfff200 bl 9238 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
ca34: eb000835 bl eb10 <__errno>
ca38: e3a03058 mov r3, #88 ; 0x58
ca3c: ea00000f b ca80 <_POSIX_Semaphore_Create_support+0x78>
}
if ( name ) {
ca40: e3500000 cmp r0, #0 ; 0x0
ca44: 0a000006 beq ca64 <_POSIX_Semaphore_Create_support+0x5c>
if( strlen(name) > PATH_MAX ) {
ca48: eb000f07 bl 1066c <strlen>
ca4c: e35000ff cmp r0, #255 ; 0xff
ca50: 9a000003 bls ca64 <_POSIX_Semaphore_Create_support+0x5c>
_Thread_Enable_dispatch();
ca54: ebfff1f7 bl 9238 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
ca58: eb00082c bl eb10 <__errno> <== NOT EXECUTED
ca5c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
ca60: ea000006 b ca80 <_POSIX_Semaphore_Create_support+0x78> <== NOT EXECUTED
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
ca64: e59f0090 ldr r0, [pc, #144] ; cafc <_POSIX_Semaphore_Create_support+0xf4>
ca68: ebffeec6 bl 8588 <_Objects_Allocate>
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
ca6c: e2505000 subs r5, r0, #0 ; 0x0
ca70: 1a000005 bne ca8c <_POSIX_Semaphore_Create_support+0x84>
_Thread_Enable_dispatch();
ca74: ebfff1ef bl 9238 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
ca78: eb000824 bl eb10 <__errno>
ca7c: e3a0301c mov r3, #28 ; 0x1c
ca80: e5803000 str r3, [r0]
ca84: e3e00000 mvn r0, #0 ; 0x0
ca88: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
}
the_semaphore->process_shared = pshared;
if ( name ) {
ca8c: e3560000 cmp r6, #0 ; 0x0
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
ca90: e3a03000 mov r3, #0 ; 0x0
ca94: e5853010 str r3, [r5, #16]
if ( name ) {
the_semaphore->named = TRUE;
ca98: 12833001 addne r3, r3, #1 ; 0x1
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
ca9c: 15c53015 strbne r3, [r5, #21]
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
caa0: 15c53014 strbne r3, [r5, #20]
the_semaphore->open_count = 1;
caa4: 15853018 strne r3, [r5, #24]
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
caa8: e3a04000 mov r4, #0 ; 0x0
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
caac: e3e03000 mvn r3, #0 ; 0x0
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
cab0: e285001c add r0, r5, #28 ; 0x1c
if ( name ) {
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
} else {
the_semaphore->named = FALSE;
cab4: 05c56014 strbeq r6, [r5, #20]
the_semaphore->open_count = 0;
cab8: 05856018 streq r6, [r5, #24]
the_semaphore->linked = FALSE;
cabc: 05c56015 strbeq r6, [r5, #21]
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
cac0: e585305c str r3, [r5, #92]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
cac4: e1a02007 mov r2, r7
cac8: e285105c add r1, r5, #92 ; 0x5c
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
cacc: e5854060 str r4, [r5, #96]
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
cad0: ebffeda2 bl 8160 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
cad4: e59f3020 ldr r3, [pc, #32] ; cafc <_POSIX_Semaphore_Create_support+0xf4>
cad8: e593201c ldr r2, [r3, #28]
cadc: e1d530b8 ldrh r3, [r5, #8]
cae0: e7825103 str r5, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
cae4: e585600c str r6, [r5, #12]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
cae8: e5885000 str r5, [r8]
_Thread_Enable_dispatch();
caec: ebfff1d1 bl 9238 <_Thread_Enable_dispatch>
caf0: e1a00004 mov r0, r4
return 0;
}
caf4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000960c <_POSIX_Threads_Sporadic_budget_TSR>:
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id,
void *argument
)
{
960c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
9610: e5915108 ldr r5, [r1, #264] <== NOT EXECUTED
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
9614: e2850090 add r0, r5, #144 ; 0x90 <== NOT EXECUTED
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id,
void *argument
)
{
9618: e1a04001 mov r4, r1 <== NOT EXECUTED
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
961c: eb000404 bl a634 <_Timespec_To_ticks> <== NOT EXECUTED
9620: e5953098 ldr r3, [r5, #152] <== NOT EXECUTED
the_thread->cpu_time_budget = ticks;
new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
9624: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
if ( !ticks )
9628: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
962c: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED
9630: e26310ff rsb r1, r3, #255 ; 0xff <== NOT EXECUTED
the_thread->cpu_time_budget = ticks;
new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
9634: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
if ( !ticks )
ticks = 1;
the_thread->cpu_time_budget = ticks;
9638: e5840078 str r0, [r4, #120] <== NOT EXECUTED
new_priority = _POSIX_Priority_To_core( api->ss_high_priority );
the_thread->real_priority = new_priority;
963c: e5841018 str r1, [r4, #24] <== NOT EXECUTED
if ( the_thread->resource_count == 0 ||
9640: 0a000002 beq 9650 <_POSIX_Threads_Sporadic_budget_TSR+0x44><== NOT EXECUTED
9644: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
9648: e1530001 cmp r3, r1 <== NOT EXECUTED
964c: 9a000002 bls 965c <_POSIX_Threads_Sporadic_budget_TSR+0x50><== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
9650: e1a00004 mov r0, r4 <== NOT EXECUTED
9654: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
9658: ebfff1a8 bl 5d00 <_Thread_Change_priority> <== NOT EXECUTED
ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period );
965c: e2850088 add r0, r5, #136 ; 0x88 <== NOT EXECUTED
9660: eb0003f3 bl a634 <_Timespec_To_ticks> <== NOT EXECUTED
if ( !ticks )
9664: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
9668: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
966c: e58500a8 str r0, [r5, #168] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
9670: e59f0008 ldr r0, [pc, #8] ; 9680 <_POSIX_Threads_Sporadic_budget_TSR+0x74><== NOT EXECUTED
9674: e285109c add r1, r5, #156 ; 0x9c <== NOT EXECUTED
ticks = 1;
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
9678: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
967c: eafff742 b 738c <_Watchdog_Insert> <== NOT EXECUTED
0000ab7c <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
ab7c: e92d4070 push {r4, r5, r6, lr}
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 ];
ab80: e5905108 ldr r5, [r0, #264]
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
ab84: e3a03001 mov r3, #1 ; 0x1
ab88: e58530cc str r3, [r5, #204]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ab8c: e28560dc add r6, r5, #220 ; 0xdc
ab90: ea00000c b abc8 <_POSIX_Threads_cancel_run+0x4c>
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
ab94: e10f1000 mrs r1, CPSR <== NOT EXECUTED
ab98: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
ab9c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
aba0: e5964004 ldr r4, [r6, #4] <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
aba4: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
previous->next = next;
aba8: e5832000 str r2, [r3] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
abac: e5823004 str r3, [r2, #4] <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
abb0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
(*handler->routine)( handler->arg );
abb4: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
abb8: e1a0e00f mov lr, pc <== NOT EXECUTED
abbc: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED
_Workspace_Free( handler );
abc0: e1a00004 mov r0, r4 <== NOT EXECUTED
abc4: ebfff29a bl 7634 <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
abc8: e59530d8 ldr r3, [r5, #216]
abcc: e1530006 cmp r3, r6
abd0: 1affffef bne ab94 <_POSIX_Threads_cancel_run+0x18>
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
abd4: e8bd8070 pop {r4, r5, r6, pc}
0000b5f8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
b5f8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
b5fc: e1a08001 mov r8, r1
b600: e1a07002 mov r7, r2
b604: e1a05003 mov r5, r3
b608: e1a04000 mov r4, r0
ISR_Level level;
(void) _Watchdog_Remove( timer );
b60c: ebfff6c7 bl 9130 <_Watchdog_Remove>
_ISR_Disable( level );
b610: e10f6000 mrs r6, CPSR
b614: e38630c0 orr r3, r6, #192 ; 0xc0
b618: e129f003 msr CPSR_fc, r3
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( timer->state != WATCHDOG_INACTIVE ) {
b61c: e5943008 ldr r3, [r4, #8]
b620: e3530000 cmp r3, #0 ; 0x0
b624: 0a000002 beq b634 <_POSIX_Timer_Insert_helper+0x3c>
_ISR_Enable( level );
b628: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
b62c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
b630: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
b634: e5843008 str r3, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
b638: e59d3018 ldr r3, [sp, #24]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
b63c: e584501c str r5, [r4, #28]
the_watchdog->id = id;
b640: e5847020 str r7, [r4, #32]
the_watchdog->user_data = user_data;
b644: e5843024 str r3, [r4, #36]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
b648: e584800c str r8, [r4, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
b64c: e1a01004 mov r1, r4
b650: e59f000c ldr r0, [pc, #12] ; b664 <_POSIX_Timer_Insert_helper+0x6c>
b654: ebfff659 bl 8fc0 <_Watchdog_Insert>
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
b658: e129f006 msr CPSR_fc, r6
b65c: e3a00001 mov r0, #1 ; 0x1
return true;
}
b660: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000056e0 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
56e0: e92d4010 push {r4, lr}
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
56e4: e5913068 ldr r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
56e8: e5912054 ldr r2, [r1, #84]
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
56ec: e2833001 add r3, r3, #1 ; 0x1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
56f0: e3520000 cmp r2, #0 ; 0x0
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
56f4: e24dd004 sub sp, sp, #4 ; 0x4
56f8: e1a04001 mov r4, r1
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
56fc: e5813068 str r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5700: 1a000003 bne 5714 <_POSIX_Timer_TSR+0x34>
5704: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED
5708: e3530000 cmp r3, #0 ; 0x0 <== 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;
570c: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5710: 0a00000a beq 5740 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
5714: e5941064 ldr r1, [r4, #100]
5718: e5942008 ldr r2, [r4, #8]
571c: e2840010 add r0, r4, #16 ; 0x10
5720: e59f3038 ldr r3, [pc, #56] ; 5760 <_POSIX_Timer_TSR+0x80>
5724: e58d4000 str r4, [sp]
5728: eb0017b2 bl b5f8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
572c: e3500000 cmp r0, #0 ; 0x0
5730: 0a000008 beq 5758 <_POSIX_Timer_TSR+0x78>
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
5734: e284006c add r0, r4, #108 ; 0x6c
5738: eb000585 bl 6d54 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
573c: e3a03003 mov r3, #3 ; 0x3
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
5740: e5c4303c strb r3, [r4, #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 ) ) {
5744: e5940038 ldr r0, [r4, #56]
5748: e5941044 ldr r1, [r4, #68]
574c: eb0016d3 bl b2a0 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
5750: e3a03000 mov r3, #0 ; 0x0
5754: e5843068 str r3, [r4, #104]
}
5758: e28dd004 add sp, sp, #4 ; 0x4
575c: e8bd8010 pop {r4, pc}
00004d04 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
4d04: e1a02000 mov r2, r0
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
4d08: e3a01001 mov r1, #1 ; 0x1
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
4d0c: e3a0001b mov r0, #27 ; 0x1b
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
4d10: e2403001 sub r3, r0, #1 ; 0x1
4d14: e0123311 ands r3, r2, r1, lsl r3
4d18: 112fff1e bxne lr
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4d1c: e2800001 add r0, r0, #1 ; 0x1
4d20: e3500020 cmp r0, #32 ; 0x20
4d24: 1afffff9 bne 4d10 <_POSIX_signals_Get_highest+0xc>
4d28: e3a00001 mov r0, #1 ; 0x1
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
4d2c: e1a01000 mov r1, r0
4d30: e2403001 sub r3, r0, #1 ; 0x1
4d34: e0123311 ands r3, r2, r1, lsl r3
4d38: 112fff1e bxne lr
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4d3c: e2800001 add r0, r0, #1 ; 0x1
4d40: e350001b cmp r0, #27 ; 0x1b
4d44: 1afffff9 bne 4d30 <_POSIX_signals_Get_highest+0x2c>
4d48: e1a00003 mov r0, r3 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) )
return signo;
}
return 0;
}
4d4c: e12fff1e bx lr <== NOT EXECUTED
000091d8 <_POSIX_signals_Manager_Initialization>:
*/
void _POSIX_signals_Manager_Initialization(
int maximum_queued_signals
)
{
91d8: e92d4070 push {r4, r5, r6, lr}
assert(
sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
);
memcpy(
91dc: e59f108c ldr r1, [pc, #140] ; 9270 <_POSIX_signals_Manager_Initialization+0x98>
91e0: e3a02d06 mov r2, #384 ; 0x180
*/
void _POSIX_signals_Manager_Initialization(
int maximum_queued_signals
)
{
91e4: e1a06000 mov r6, r0
assert(
sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
);
memcpy(
91e8: e59f0084 ldr r0, [pc, #132] ; 9274 <_POSIX_signals_Manager_Initialization+0x9c>
91ec: eb000a53 bl bb40 <memcpy>
/*
* Initialize the set of pending signals for the entire process
*/
sigemptyset( &_POSIX_signals_Pending );
91f0: e59f0080 ldr r0, [pc, #128] ; 9278 <_POSIX_signals_Manager_Initialization+0xa0>
91f4: eb000142 bl 9704 <sigemptyset>
/*
* Initialize the queue we use to block for signals
*/
_Thread_queue_Initialize(
91f8: e59f007c ldr r0, [pc, #124] ; 927c <_POSIX_signals_Manager_Initialization+0xa4>
91fc: e3a01001 mov r1, #1 ; 0x1
9200: e59f2078 ldr r2, [pc, #120] ; 9280 <_POSIX_signals_Manager_Initialization+0xa8>
9204: e3a0300b mov r3, #11 ; 0xb
9208: ebfff61a bl 6a78 <_Thread_queue_Initialize>
920c: e59f2070 ldr r2, [pc, #112] ; 9284 <_POSIX_signals_Manager_Initialization+0xac>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
9210: e3a00000 mov r0, #0 ; 0x0
/*
* Allocate the siginfo pools.
*/
for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
9214: e2821f5d add r1, r2, #372 ; 0x174
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9218: e2823004 add r3, r2, #4 ; 0x4
921c: e5823000 str r3, [r2]
the_chain->permanent_null = NULL;
9220: e9820005 stmib r2, {r0, r2}
the_chain->last = _Chain_Head(the_chain);
9224: e282200c add r2, r2, #12 ; 0xc
9228: e1520001 cmp r2, r1
922c: 1afffff9 bne 9218 <_POSIX_signals_Manager_Initialization+0x40>
_Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
if ( maximum_queued_signals ) {
9230: e3560000 cmp r6, #0 ; 0x0
9234: e59f504c ldr r5, [pc, #76] ; 9288 <_POSIX_signals_Manager_Initialization+0xb0>
9238: 0a000008 beq 9260 <_POSIX_signals_Manager_Initialization+0x88>
_Chain_Initialize(
923c: e3a04014 mov r4, #20 ; 0x14 <== NOT EXECUTED
9240: e0000694 mul r0, r4, r6 <== NOT EXECUTED
9244: ebfff902 bl 7654 <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED
9248: e1a02006 mov r2, r6 <== NOT EXECUTED
924c: e1a01000 mov r1, r0 <== NOT EXECUTED
9250: e1a03004 mov r3, r4 <== NOT EXECUTED
9254: e1a00005 mov r0, r5 <== NOT EXECUTED
sizeof( POSIX_signals_Siginfo_node )
);
} else {
_Chain_Initialize_empty( &_POSIX_signals_Inactive_siginfo );
}
}
9258: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
_Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
if ( maximum_queued_signals ) {
_Chain_Initialize(
925c: ea0002a4 b 9cf4 <_Chain_Initialize> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
9260: e2853004 add r3, r5, #4 ; 0x4
9264: e8850048 stm r5, {r3, r6}
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
9268: e5855008 str r5, [r5, #8]
sizeof( POSIX_signals_Siginfo_node )
);
} else {
_Chain_Initialize_empty( &_POSIX_signals_Inactive_siginfo );
}
}
926c: e8bd8070 pop {r4, r5, r6, pc}
0000928c <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
928c: e92d4070 push {r4, r5, r6, lr}
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
9290: e5905108 ldr r5, [r0, #264]
if ( !api )
9294: e3550000 cmp r5, #0 ; 0x0
9298: 08bd8070 popeq {r4, r5, r6, pc}
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
if ( !(~api->signals_blocked &
929c: e59f60b0 ldr r6, [pc, #176] ; 9354 <_POSIX_signals_Post_switch_extension+0xc8>
* 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) {
restart:
_ISR_Disable( level );
92a0: e10f0000 mrs r0, CPSR
92a4: e38030c0 orr r3, r0, #192 ; 0xc0
92a8: e129f003 msr CPSR_fc, r3
if ( !(~api->signals_blocked &
92ac: e5963000 ldr r3, [r6]
92b0: e28510c4 add r1, r5, #196 ; 0xc4
92b4: e8910006 ldm r1, {r1, r2}
92b8: e1833002 orr r3, r3, r2
92bc: e1d31001 bics r1, r3, r1
92c0: 1a000001 bne 92cc <_POSIX_signals_Post_switch_extension+0x40>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
92c4: e129f000 msr CPSR_fc, r0
92c8: e8bd8070 pop {r4, r5, r6, pc}
break;
}
_ISR_Enable( level );
92cc: e129f000 msr CPSR_fc, r0
92d0: e3a0401b mov r4, #27 ; 0x1b
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
92d4: e1a01004 mov r1, r4
92d8: e3a02000 mov r2, #0 ; 0x0
92dc: e1a00005 mov r0, r5
92e0: eb000668 bl ac88 <_POSIX_signals_Check_signal>
92e4: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
92e8: e1a01004 mov r1, r4
92ec: e3a02001 mov r2, #1 ; 0x1
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
92f0: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
92f4: e1a00005 mov r0, r5
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
92f8: 1affffe8 bne 92a0 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
92fc: eb000661 bl ac88 <_POSIX_signals_Check_signal>
9300: e3500000 cmp r0, #0 ; 0x0
9304: 1affffe5 bne 92a0 <_POSIX_signals_Post_switch_extension+0x14>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
9308: e3540020 cmp r4, #32 ; 0x20
930c: 1afffff0 bne 92d4 <_POSIX_signals_Post_switch_extension+0x48>
9310: e3a04001 mov r4, #1 ; 0x1
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9314: e1a01004 mov r1, r4
9318: e3a02000 mov r2, #0 ; 0x0
931c: e1a00005 mov r0, r5
9320: eb000658 bl ac88 <_POSIX_signals_Check_signal>
9324: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9328: e1a01004 mov r1, r4
932c: e3a02001 mov r2, #1 ; 0x1
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9330: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9334: e1a00005 mov r0, r5
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9338: 1affffd8 bne 92a0 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
933c: eb000651 bl ac88 <_POSIX_signals_Check_signal>
9340: e3500000 cmp r0, #0 ; 0x0
9344: 1affffd5 bne 92a0 <_POSIX_signals_Post_switch_extension+0x14>
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9348: e354001b cmp r4, #27 ; 0x1b
934c: 1afffff0 bne 9314 <_POSIX_signals_Post_switch_extension+0x88>
9350: eaffffd2 b 92a0 <_POSIX_signals_Post_switch_extension+0x14><== NOT EXECUTED
00009808 <_Partition_Manager_initialization>:
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
9808: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
980c: e3a0c030 mov ip, #48 ; 0x30
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
9810: e24dd00c sub sp, sp, #12 ; 0xc
_Objects_Initialize_information(
9814: e58dc000 str ip, [sp]
9818: e3a0c000 mov ip, #0 ; 0x0
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
981c: e1a03000 mov r3, r0
_Objects_Initialize_information(
9820: e58dc004 str ip, [sp, #4]
9824: e59f0018 ldr r0, [pc, #24] ; 9844 <_Partition_Manager_initialization+0x3c>
9828: e28cc004 add ip, ip, #4 ; 0x4
982c: e3a01002 mov r1, #2 ; 0x2
9830: e3a02005 mov r2, #5 ; 0x5
9834: e58dc008 str ip, [sp, #8]
9838: ebfff08d bl 5a74 <_Objects_Initialize_information>
MP_PACKET_PARTITION,
_Partition_MP_Process_packet
);
#endif
}
983c: e28dd00c add sp, sp, #12 ; 0xc
9840: e8bd8000 pop {pc}
0000909c <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
909c: e92d4070 push {r4, r5, r6, lr}
Heap_Get_information_status status;
if ( !the_heap )
90a0: e2506000 subs r6, r0, #0 ; 0x0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
90a4: e1a04001 mov r4, r1
Heap_Get_information_status status;
if ( !the_heap )
90a8: 0a00000d beq 90e4 <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
90ac: e3510000 cmp r1, #0 ; 0x0
90b0: 0a00000b beq 90e4 <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
90b4: e59f5030 ldr r5, [pc, #48] ; 90ec <_Protected_heap_Get_information+0x50>
90b8: e5950000 ldr r0, [r5]
90bc: ebfff9df bl 7840 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
90c0: e1a01004 mov r1, r4
90c4: e1a00006 mov r0, r6
90c8: eb0010c6 bl d3e8 <_Heap_Get_information>
90cc: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
90d0: e5950000 ldr r0, [r5]
90d4: ebfff9f5 bl 78b0 <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
90d8: e2740001 rsbs r0, r4, #1 ; 0x1
90dc: 33a00000 movcc r0, #0 ; 0x0
90e0: e8bd8070 pop {r4, r5, r6, pc}
90e4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return true;
return false;
}
90e8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00004710 <_RTEMS_tasks_Initialize_user_tasks_body>:
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
rtems_api_configuration_table *api_configuration;
api_configuration = _Configuration_Table->RTEMS_api_configuration;
4710: e59f3094 ldr r3, [pc, #148] ; 47ac <_RTEMS_tasks_Initialize_user_tasks_body+0x9c>
4714: e5933000 ldr r3, [r3]
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
4718: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
rtems_api_configuration_table *api_configuration;
api_configuration = _Configuration_Table->RTEMS_api_configuration;
471c: e5933040 ldr r3, [r3, #64]
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
4720: e593002c ldr r0, [r3, #44]
maximum = api_configuration->number_of_initialization_tasks;
4724: e5936028 ldr r6, [r3, #40]
if ( !user_tasks || maximum == 0 )
4728: e3560000 cmp r6, #0 ; 0x0
472c: 13500000 cmpne r0, #0 ; 0x0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
4730: e24dd00c sub sp, sp, #12 ; 0xc
*/
user_tasks = api_configuration->User_initialization_tasks_table;
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
4734: 13a03000 movne r3, #0 ; 0x0
4738: 03a03001 moveq r3, #1 ; 0x1
return;
473c: 11a04000 movne r4, r0
4740: 11a05003 movne r5, r3
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
4744: 128d7008 addne r7, sp, #8 ; 0x8
*/
user_tasks = api_configuration->User_initialization_tasks_table;
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
4748: 1a000013 bne 479c <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
474c: ea000014 b 47a4 <_RTEMS_tasks_Initialize_user_tasks_body+0x94><== NOT EXECUTED
return;
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
4750: e594300c ldr r3, [r4, #12]
4754: e88d0088 stm sp, {r3, r7}
4758: e8940005 ldm r4, {r0, r2}
475c: e5941008 ldr r1, [r4, #8]
4760: e5943014 ldr r3, [r4, #20]
4764: ebffff63 bl 44f8 <rtems_task_create>
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
4768: e2502000 subs r2, r0, #0 ; 0x0
476c: 1a000006 bne 478c <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
4770: e5942018 ldr r2, [r4, #24]
4774: e5941010 ldr r1, [r4, #16]
4778: e59d0008 ldr r0, [sp, #8]
477c: eb00000b bl 47b0 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
4780: e2502000 subs r2, r0, #0 ; 0x0
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
4784: e284401c add r4, r4, #28 ; 0x1c
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
4788: 0a000002 beq 4798 <_RTEMS_tasks_Initialize_user_tasks_body+0x88>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
478c: e3a00001 mov r0, #1 ; 0x1
4790: e1a01000 mov r1, r0
4794: eb000359 bl 5500 <_Internal_error_Occurred>
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
4798: e2855001 add r5, r5, #1 ; 0x1
479c: e1550006 cmp r5, r6
47a0: 3affffea bcc 4750 <_RTEMS_tasks_Initialize_user_tasks_body+0x40>
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
}
}
47a4: e28dd00c add sp, sp, #12 ; 0xc
47a8: e8bd80f0 pop {r4, r5, r6, r7, pc}
000051b0 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
51b0: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
51b4: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get(
struct timespec *time
)
{
51b8: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
51bc: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get(
struct timespec *time
)
{
51c0: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
51c4: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
51c8: e10f6000 mrs r6, CPSR
51cc: e38630c0 orr r3, r6, #192 ; 0xc0
51d0: e129f003 msr CPSR_fc, r3
*time = _TOD_Now;
if ( _Watchdog_Nanoseconds_since_tick_handler )
51d4: e59f3038 ldr r3, [pc, #56] ; 5214 <_TOD_Get+0x64>
51d8: e5932000 ldr r2, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
51dc: e59f3034 ldr r3, [pc, #52] ; 5218 <_TOD_Get+0x68>
51e0: e8930018 ldm r3, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
51e4: e3520000 cmp r2, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
51e8: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
51ec: 0a000002 beq 51fc <_TOD_Get+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
51f0: e1a0e00f mov lr, pc <== NOT EXECUTED
51f4: e12fff12 bx r2 <== NOT EXECUTED
51f8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
51fc: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( time, &offset );
5200: e1a00005 mov r0, r5
5204: e1a0100d mov r1, sp
5208: eb000794 bl 7060 <_Timespec_Add_to>
}
520c: e28dd008 add sp, sp, #8 ; 0x8
5210: e8bd8070 pop {r4, r5, r6, pc}
00009e74 <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
9e74: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
9e78: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
9e7c: e24dd008 sub sp, sp, #8 ; 0x8 <== NOT EXECUTED
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
9e80: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
9e84: e1a05000 mov r5, r0 <== NOT EXECUTED
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
9e88: e58d3000 str r3, [sp] <== NOT EXECUTED
offset.tv_nsec = 0;
_ISR_Disable( level );
9e8c: e10f6000 mrs r6, CPSR <== NOT EXECUTED
9e90: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED
9e94: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
*uptime = _TOD_Uptime;
if ( _Watchdog_Nanoseconds_since_tick_handler )
9e98: e59f3038 ldr r3, [pc, #56] ; 9ed8 <_TOD_Get_uptime+0x64> <== NOT EXECUTED
9e9c: e5932000 ldr r2, [r3] <== NOT EXECUTED
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
9ea0: e59f3034 ldr r3, [pc, #52] ; 9edc <_TOD_Get_uptime+0x68> <== NOT EXECUTED
9ea4: e8930018 ldm r3, {r3, r4} <== NOT EXECUTED
if ( _Watchdog_Nanoseconds_since_tick_handler )
9ea8: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
9eac: e8800018 stm r0, {r3, r4} <== NOT EXECUTED
if ( _Watchdog_Nanoseconds_since_tick_handler )
9eb0: 0a000002 beq 9ec0 <_TOD_Get_uptime+0x4c> <== NOT EXECUTED
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
9eb4: e1a0e00f mov lr, pc <== NOT EXECUTED
9eb8: e12fff12 bx r2 <== NOT EXECUTED
9ebc: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
9ec0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
_Timespec_Add_to( uptime, &offset );
9ec4: e1a00005 mov r0, r5 <== NOT EXECUTED
9ec8: e1a0100d mov r1, sp <== NOT EXECUTED
9ecc: ebfff463 bl 7060 <_Timespec_Add_to> <== NOT EXECUTED
}
9ed0: e28dd008 add sp, sp, #8 ; 0x8 <== NOT EXECUTED
9ed4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00005f80 <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
5f80: e92d4070 push {r4, r5, r6, lr}
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5f84: e590201c ldr r2, [r0, #28]
5f88: e1a06001 mov r6, r1
5f8c: e1d110b8 ldrh r1, [r1, #8]
5f90: e3a03000 mov r3, #0 ; 0x0
5f94: e1a05000 mov r5, r0
5f98: e7823101 str r3, [r2, r1, lsl #2]
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
5f9c: e59f407c ldr r4, [pc, #124] ; 6020 <_Thread_Close+0xa0>
5fa0: e5943000 ldr r3, [r4]
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
5fa4: e1a00006 mov r0, r6
5fa8: e2433001 sub r3, r3, #1 ; 0x1
5fac: e5843000 str r3, [r4]
5fb0: eb0004c1 bl 72bc <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
5fb4: e5943000 ldr r3, [r4]
5fb8: e2833001 add r3, r3, #1 ; 0x1
5fbc: e5843000 str r3, [r4]
/*
* 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 );
5fc0: e1a00005 mov r0, r5
5fc4: e1a01006 mov r1, r6
5fc8: ebfffd89 bl 55f4 <_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 );
5fcc: e1a00006 mov r0, r6
5fd0: e3a01001 mov r1, #1 ; 0x1
5fd4: eb00030e bl 6c14 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
5fd8: e1a00006 mov r0, r6
5fdc: eb00028e bl 6a1c <_Thread_queue_Extract_with_proxy>
5fe0: e3500000 cmp r0, #0 ; 0x0
5fe4: 1a000003 bne 5ff8 <_Thread_Close+0x78>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
5fe8: e5963050 ldr r3, [r6, #80]
5fec: e3530002 cmp r3, #2 ; 0x2
(void) _Watchdog_Remove( &the_thread->Timer );
5ff0: 02860048 addeq r0, r6, #72 ; 0x48
5ff4: 0b000540 bleq 74fc <_Watchdog_Remove>
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
5ff8: e1a00006 mov r0, r6
5ffc: eb000394 bl 6e54 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
6000: e5960110 ldr r0, [r6, #272]
/*
* 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;
6004: e3a03000 mov r3, #0 ; 0x0
if ( the_thread->extensions )
6008: e3500000 cmp r0, #0 ; 0x0
/*
* 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;
600c: e58630cc str r3, [r6, #204]
if ( the_thread->extensions )
(void) _Workspace_Free( the_thread->extensions );
6010: 1b000587 blne 7634 <_Workspace_Free>
the_thread->extensions = NULL;
6014: e3a03000 mov r3, #0 ; 0x0
6018: e5863110 str r3, [r6, #272]
}
601c: e8bd8070 pop {r4, r5, r6, pc}
0000b21c <_Thread_Handler>:
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
b21c: e59f30b0 ldr r3, [pc, #176] ; b2d4 <_Thread_Handler+0xb8>
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
b220: e92d4030 push {r4, r5, lr}
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
b224: e5935000 ldr r5, [r3]
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
b228: e59530b8 ldr r3, [r5, #184]
_ISR_Set_level(level);
b22c: e3a02000 mov r2, #0 ; 0x0
b230: e10f2000 mrs r2, CPSR
b234: e3c220c0 bic r2, r2, #192 ; 0xc0
b238: e1822003 orr r2, r2, r3
b23c: e121f002 msr CPSR_c, r2
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
b240: e59f2090 ldr r2, [pc, #144] ; b2d8 <_Thread_Handler+0xbc>
doneConstructors = 1;
b244: e3a03001 mov r3, #1 ; 0x1
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
b248: e5d24000 ldrb r4, [r2]
* 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 );
b24c: e1a00005 mov r0, r5
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
doneConstructors = 1;
b250: e5c23000 strb r3, [r2]
* 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 );
b254: ebffefcf bl 7198 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
b258: ebffec10 bl 62a0 <_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) */
b25c: e3540000 cmp r4, #0 ; 0x0
{
_init ();
b260: 0bffd3ae bleq 120 <_init>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
b264: e59530a0 ldr r3, [r5, #160]
b268: e3530003 cmp r3, #3 ; 0x3
b26c: 979ff103 ldrls pc, [pc, r3, lsl #2]
b270: ea000011 b b2bc <_Thread_Handler+0xa0> <== NOT EXECUTED
b274: 0000b284 .word 0x0000b284 <== NOT EXECUTED
b278: 0000b28c .word 0x0000b28c <== NOT EXECUTED
b27c: 0000b29c .word 0x0000b29c <== NOT EXECUTED
b280: 0000b2a8 .word 0x0000b2a8 <== NOT EXECUTED
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
b284: e59500a8 ldr r0, [r5, #168]
b288: ea000000 b b290 <_Thread_Handler+0x74>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
b28c: e59500a4 ldr r0, [r5, #164]
b290: e1a0e00f mov lr, pc
b294: e595f09c ldr pc, [r5, #156]
b298: ea000006 b b2b8 <_Thread_Handler+0x9c>
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
b29c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED
b2a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
b2a4: ea000001 b b2b0 <_Thread_Handler+0x94> <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
b2a8: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED
b2ac: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED
b2b0: e1a0e00f mov lr, pc <== NOT EXECUTED
b2b4: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
b2b8: e5850028 str r0, [r5, #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 );
b2bc: e1a00005 mov r0, r5
b2c0: ebffefc3 bl 71d4 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
b2c4: e3a00000 mov r0, #0 ; 0x0
b2c8: e3a01001 mov r1, #1 ; 0x1
b2cc: e3a02006 mov r2, #6 ; 0x6
b2d0: ebffe88a bl 5500 <_Internal_error_Occurred>
0000636c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
636c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
6370: e2526000 subs r6, r2, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
6374: e1a09000 mov r9, r0
6378: e1a05001 mov r5, r1
637c: e1a04003 mov r4, r3
6380: e59d8024 ldr r8, [sp, #36]
6384: e59da02c ldr sl, [sp, #44]
6388: e5dd7028 ldrb r7, [sp, #40]
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
638c: 1a00000e bne 63cc <_Thread_Initialize+0x60>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
6390: e1a00001 mov r0, r1
6394: e1a01003 mov r1, r3
6398: eb000292 bl 6de8 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
639c: e1500004 cmp r0, r4
63a0: 23a03000 movcs r3, #0 ; 0x0
63a4: 33a03001 movcc r3, #1 ; 0x1
63a8: e3500000 cmp r0, #0 ; 0x0
63ac: 03833001 orreq r3, r3, #1 ; 0x1
63b0: e3530000 cmp r3, #0 ; 0x0
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
63b4: 03a03001 moveq r3, #1 ; 0x1
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
63b8: e1a01000 mov r1, r0
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
63bc: 05c530c0 strbeq r3, [r5, #192]
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
63c0: 059520cc ldreq r2, [r5, #204]
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
63c4: 0a000004 beq 63dc <_Thread_Initialize+0x70>
63c8: ea000017 b 642c <_Thread_Initialize+0xc0>
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;
63cc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
63d0: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED
63d4: e1a02006 mov r2, r6 <== NOT EXECUTED
63d8: e1a01004 mov r1, r4 <== NOT EXECUTED
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
63dc: e59f3128 ldr r3, [pc, #296] ; 650c <_Thread_Initialize+0x1a0>
63e0: e5930000 ldr r0, [r3]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
63e4: e3a03000 mov r3, #0 ; 0x0
63e8: e3500000 cmp r0, #0 ; 0x0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
63ec: e58520c8 str r2, [r5, #200]
the_stack->size = size;
63f0: e58510c4 str r1, [r5, #196]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
63f4: e5853100 str r3, [r5, #256]
63f8: e5853050 str r3, [r5, #80]
the_watchdog->routine = routine;
63fc: e5853064 str r3, [r5, #100]
the_watchdog->id = id;
6400: e5853068 str r3, [r5, #104]
the_watchdog->user_data = user_data;
6404: e585306c str r3, [r5, #108]
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return FALSE;
6408: 01a06000 moveq r6, r0
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
640c: 0a000008 beq 6434 <_Thread_Initialize+0xc8>
extensions_area = _Workspace_Allocate(
6410: e2800001 add r0, r0, #1 ; 0x1
6414: e1a00100 lsl r0, r0, #2
6418: eb000489 bl 7644 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
641c: e2506000 subs r6, r0, #0 ; 0x0
6420: 1a000003 bne 6434 <_Thread_Initialize+0xc8>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6424: e1a00005 mov r0, r5 <== NOT EXECUTED
6428: eb000289 bl 6e54 <_Thread_Stack_Free> <== NOT EXECUTED
642c: e1a00006 mov r0, r6
6430: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
6434: e3560000 cmp r6, #0 ; 0x0
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6438: e5856110 str r6, [r5, #272]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
643c: 0a00000a beq 646c <_Thread_Initialize+0x100>
6440: e3a02000 mov r2, #0 ; 0x0
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6444: e59f00c0 ldr r0, [pc, #192] ; 650c <_Thread_Initialize+0x1a0>
the_thread->extensions[i] = NULL;
6448: e1a01002 mov r1, r2
644c: ea000002 b 645c <_Thread_Initialize+0xf0>
6450: e5953110 ldr r3, [r5, #272]
6454: e7831102 str r1, [r3, r2, lsl #2]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6458: e2822001 add r2, r2, #1 ; 0x1
645c: e5903000 ldr r3, [r0]
6460: e2833001 add r3, r3, #1 ; 0x1
6464: e1520003 cmp r2, r3
6468: 3afffff8 bcc 6450 <_Thread_Initialize+0xe4>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
646c: e59d3030 ldr r3, [sp, #48]
switch ( budget_algorithm ) {
6470: e35a0002 cmp sl, #2 ; 0x2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6474: e58530b4 str r3, [r5, #180]
switch ( budget_algorithm ) {
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
6478: 059f3090 ldreq r3, [pc, #144] ; 6510 <_Thread_Initialize+0x1a4>
647c: 05933000 ldreq r3, [r3]
6480: 05853078 streq r3, [r5, #120]
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6484: e59d3034 ldr r3, [sp, #52]
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
6488: e3a04000 mov r4, #0 ; 0x0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
648c: e5c570ac strb r7, [r5, #172]
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
6490: e3a07001 mov r7, #1 ; 0x1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6494: e58530b8 str r3, [r5, #184]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
6498: e1a01008 mov r1, r8
649c: e1a00005 mov r0, r5
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
64a0: e585a0b0 str sl, [r5, #176]
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
64a4: e5857010 str r7, [r5, #16]
the_thread->Wait.queue = NULL;
64a8: e5854044 str r4, [r5, #68]
the_thread->resource_count = 0;
64ac: e585401c str r4, [r5, #28]
the_thread->suspend_count = 0;
64b0: e5854070 str r4, [r5, #112]
the_thread->real_priority = priority;
64b4: e5858018 str r8, [r5, #24]
the_thread->Start.initial_priority = priority;
64b8: e58580bc str r8, [r5, #188]
_Thread_Set_priority( the_thread, priority );
64bc: eb0001b7 bl 6ba0 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
64c0: e1d530b8 ldrh r3, [r5, #8]
64c4: e599201c ldr r2, [r9, #28]
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
the_thread->cpu_time_used.tv_nsec = 0;
64c8: e5854088 str r4, [r5, #136]
64cc: e7825103 str r5, [r2, r3, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
64d0: e59d3038 ldr r3, [sp, #56]
* 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 );
64d4: e1a00005 mov r0, r5
64d8: e585300c str r3, [r5, #12]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
64dc: e5854084 str r4, [r5, #132]
* 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 );
64e0: eb00035f bl 7264 <_User_extensions_Thread_create>
if ( !extension_status ) {
64e4: e1500004 cmp r0, r4
64e8: 11a00007 movne r0, r7
64ec: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc}
if ( extensions_area )
64f0: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
64f4: 11a00006 movne r0, r6 <== NOT EXECUTED
64f8: 1b00044d blne 7634 <_Workspace_Free> <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
64fc: e1a00005 mov r0, r5 <== NOT EXECUTED
6500: eb000253 bl 6e54 <_Thread_Stack_Free> <== NOT EXECUTED
6504: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
6508: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000077d8 <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
77d8: e5903010 ldr r3, [r0, #16]
77dc: e3130001 tst r3, #1 ; 0x1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
77e0: e92d4070 push {r4, r5, r6, lr}
77e4: e1a04000 mov r4, r0
77e8: e1a05001 mov r5, r1
77ec: e1a06002 mov r6, r2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
77f0: 13a00000 movne r0, #0 ; 0x0
77f4: 18bd8070 popne {r4, r5, r6, pc}
_Thread_Set_transient( the_thread );
77f8: eb000081 bl 7a04 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
77fc: e1a01005 mov r1, r5
7800: e1a02006 mov r2, r6
7804: e1a00004 mov r0, r4
7808: eb000ec2 bl b318 <_Thread_Reset>
_Thread_Load_environment( the_thread );
780c: e1a00004 mov r0, r4
7810: eb000de2 bl afa0 <_Thread_Load_environment>
_Thread_Ready( the_thread );
7814: e1a00004 mov r0, r4
7818: eb000e7b bl b20c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
781c: e1a00004 mov r0, r4
7820: eb0001e3 bl 7fb4 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
7824: e59f301c ldr r3, [pc, #28] ; 7848 <_Thread_Restart+0x70>
7828: e5933000 ldr r3, [r3]
782c: e1540003 cmp r4, r3
7830: 13a00001 movne r0, #1 ; 0x1
7834: 18bd8070 popne {r4, r5, r6, pc}
#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 );
7838: e28400d0 add r0, r4, #208 ; 0xd0
783c: eb0002ec bl 83f4 <_CPU_Context_restore>
7840: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
return TRUE;
}
return FALSE;
}
7844: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00008508 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
8508: e92d4030 push {r4, r5, lr}
850c: e20110ff and r1, r1, #255 ; 0xff
8510: e1a04000 mov r4, r0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8514: e10f5000 mrs r5, CPSR
8518: e38530c0 orr r3, r5, #192 ; 0xc0
851c: e129f003 msr CPSR_fc, r3
if ( force == TRUE )
8520: e3510000 cmp r1, #0 ; 0x0
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8524: 05903070 ldreq r3, [r0, #112]
States_Control current_state;
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
8528: 13a03000 movne r3, #0 ; 0x0
else
the_thread->suspend_count--;
852c: 02433001 subeq r3, r3, #1 ; 0x1
8530: e5803070 str r3, [r0, #112]
if ( the_thread->suspend_count > 0 ) {
8534: e5903070 ldr r3, [r0, #112]
8538: e3530000 cmp r3, #0 ; 0x0
853c: 0a000001 beq 8548 <_Thread_Resume+0x40>
_ISR_Enable( level );
8540: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
8544: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
8548: e5903010 ldr r3, [r0, #16]
if ( current_state & STATES_SUSPENDED ) {
854c: e3130002 tst r3, #2 ; 0x2
8550: 0a000028 beq 85f8 <_Thread_Resume+0xf0>
8554: e3c33002 bic r3, r3, #2 ; 0x2
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8558: e3530000 cmp r3, #0 ; 0x0
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
855c: e5803010 str r3, [r0, #16]
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8560: 1a000024 bne 85f8 <_Thread_Resume+0xf0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8564: e5900090 ldr r0, [r0, #144]
8568: e1d429b6 ldrh r2, [r4, #150]
856c: e1d030b0 ldrh r3, [r0]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8570: e594108c ldr r1, [r4, #140]
8574: e1833002 orr r3, r3, r2
8578: e1c030b0 strh r3, [r0]
_Priority_Major_bit_map |= the_priority_map->ready_major;
857c: e59fc07c ldr ip, [pc, #124] ; 8600 <_Thread_Resume+0xf8>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8580: e2813004 add r3, r1, #4 ; 0x4
8584: e5843000 str r3, [r4]
8588: e1d429b4 ldrh r2, [r4, #148]
858c: e1dc30b0 ldrh r3, [ip]
old_last_node = the_chain->last;
8590: e5910008 ldr r0, [r1, #8]
8594: e1833002 orr r3, r3, r2
the_chain->last = the_node;
8598: e5814008 str r4, [r1, #8]
859c: e1cc30b0 strh r3, [ip]
old_last_node->next = the_node;
the_node->previous = old_last_node;
85a0: e5840004 str r0, [r4, #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;
85a4: e5804000 str r4, [r0]
_ISR_Flash( level );
85a8: e10f3000 mrs r3, CPSR
85ac: e129f005 msr CPSR_fc, r5
85b0: e129f003 msr CPSR_fc, r3
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
85b4: e59f1048 ldr r1, [pc, #72] ; 8604 <_Thread_Resume+0xfc>
85b8: e5913000 ldr r3, [r1]
85bc: e5942014 ldr r2, [r4, #20]
85c0: e5933014 ldr r3, [r3, #20]
85c4: e1520003 cmp r2, r3
85c8: 2a00000a bcs 85f8 <_Thread_Resume+0xf0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
85cc: e59f3034 ldr r3, [pc, #52] ; 8608 <_Thread_Resume+0x100>
85d0: e5933000 ldr r3, [r3]
85d4: e5d33076 ldrb r3, [r3, #118]
85d8: e3530000 cmp r3, #0 ; 0x0
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
85dc: e5814000 str r4, [r1]
if ( _Thread_Executing->is_preemptible ||
85e0: 1a000001 bne 85ec <_Thread_Resume+0xe4>
85e4: e3520000 cmp r2, #0 ; 0x0
85e8: 1a000002 bne 85f8 <_Thread_Resume+0xf0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
85ec: e59f3018 ldr r3, [pc, #24] ; 860c <_Thread_Resume+0x104>
85f0: e3a02001 mov r2, #1 ; 0x1
85f4: e5c32000 strb r2, [r3]
}
}
}
_ISR_Enable( level );
85f8: e129f005 msr CPSR_fc, r5
85fc: e8bd8030 pop {r4, r5, pc}
00006d58 <_Thread_Set_transient>:
*/
void _Thread_Set_transient(
Thread_Control *the_thread
)
{
6d58: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
ISR_Level level;
uint32_t old_state;
Chain_Control *ready;
ready = the_thread->ready;
6d5c: e590c08c ldr ip, [r0, #140] <== NOT EXECUTED
_ISR_Disable( level );
6d60: e10f5000 mrs r5, CPSR <== NOT EXECUTED
6d64: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED
6d68: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
old_state = the_thread->current_state;
6d6c: e5904010 ldr r4, [r0, #16] <== NOT EXECUTED
the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
6d70: e3843004 orr r3, r4, #4 ; 0x4 <== NOT EXECUTED
if ( _States_Is_ready( old_state ) ) {
6d74: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
ready = the_thread->ready;
_ISR_Disable( level );
old_state = the_thread->current_state;
the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
6d78: e5803010 str r3, [r0, #16] <== NOT EXECUTED
if ( _States_Is_ready( old_state ) ) {
6d7c: 1a000016 bne 6ddc <_Thread_Set_transient+0x84> <== NOT EXECUTED
if ( _Chain_Has_only_one_node( ready ) ) {
6d80: e59c2000 ldr r2, [ip] <== NOT EXECUTED
6d84: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
6d88: e1520003 cmp r2, r3 <== NOT EXECUTED
6d8c: 1a00000e bne 6dcc <_Thread_Set_transient+0x74> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
6d90: e5902090 ldr r2, [r0, #144] <== NOT EXECUTED
6d94: e1d019ba ldrh r1, [r0, #154] <== NOT EXECUTED
6d98: e1d230b0 ldrh r3, [r2] <== NOT EXECUTED
6d9c: e0033001 and r3, r3, r1 <== NOT EXECUTED
6da0: e1c230b0 strh r3, [r2] <== NOT EXECUTED
if ( *the_priority_map->minor == 0 )
6da4: e1d230b0 ldrh r3, [r2] <== NOT EXECUTED
6da8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6dac: e28c3004 add r3, ip, #4 ; 0x4 <== NOT EXECUTED
6db0: e88c1018 stm ip, {r3, r4, ip} <== NOT EXECUTED
_Priority_Major_bit_map &= the_priority_map->block_major;
6db4: 059f1028 ldreq r1, [pc, #40] ; 6de4 <_Thread_Set_transient+0x8c><== NOT EXECUTED
6db8: 01d029b8 ldrheq r2, [r0, #152] <== NOT EXECUTED
6dbc: 01d130b0 ldrheq r3, [r1] <== NOT EXECUTED
6dc0: 00033002 andeq r3, r3, r2 <== NOT EXECUTED
6dc4: 01c130b0 strheq r3, [r1] <== NOT EXECUTED
6dc8: ea000003 b 6ddc <_Thread_Set_transient+0x84> <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
6dcc: e5902004 ldr r2, [r0, #4] <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
6dd0: e5903000 ldr r3, [r0] <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
previous->next = next;
6dd4: e5823000 str r3, [r2] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
6dd8: e5832004 str r2, [r3, #4] <== NOT EXECUTED
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
}
_ISR_Enable( level );
6ddc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
}
6de0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00006de8 <_Thread_Stack_Allocate>:
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
6de8: e59f305c ldr r3, [pc, #92] ; 6e4c <_Thread_Stack_Allocate+0x64>
6dec: e5933000 ldr r3, [r3]
6df0: e5932020 ldr r2, [r3, #32]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
6df4: e59f3054 ldr r3, [pc, #84] ; 6e50 <_Thread_Stack_Allocate+0x68>
6df8: e5933000 ldr r3, [r3]
6dfc: e92d4030 push {r4, r5, lr}
6e00: e1510003 cmp r1, r3
6e04: 21a04001 movcs r4, r1
6e08: 31a04003 movcc r4, r3
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
6e0c: e3520000 cmp r2, #0 ; 0x0
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
6e10: e1a05000 mov r5, r0
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
6e14: 0a000003 beq 6e28 <_Thread_Stack_Allocate+0x40>
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
6e18: e1a00004 mov r0, r4 <== NOT EXECUTED
6e1c: e1a0e00f mov lr, pc <== NOT EXECUTED
6e20: e12fff12 bx r2 <== NOT EXECUTED
6e24: ea000002 b 6e34 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
6e28: e2844004 add r4, r4, #4 ; 0x4
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
6e2c: e1a00004 mov r0, r4
6e30: eb000203 bl 7644 <_Workspace_Allocate>
6e34: e1a03000 mov r3, r0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
6e38: e3500000 cmp r0, #0 ; 0x0
6e3c: 11a00004 movne r0, r4
6e40: 03a00000 moveq r0, #0 ; 0x0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
6e44: e58530cc str r3, [r5, #204]
return the_stack_size;
}
6e48: e8bd8030 pop {r4, r5, pc}
00006e54 <_Thread_Stack_Free>:
{
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
6e54: e5d030c0 ldrb r3, [r0, #192] <== NOT EXECUTED
6e58: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
6e5c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
6e60: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) <== NOT EXECUTED
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
6e64: e59f3028 ldr r3, [pc, #40] ; 6e94 <_Thread_Stack_Free+0x40><== NOT EXECUTED
6e68: e5933000 ldr r3, [r3] <== NOT EXECUTED
6e6c: e5933024 ldr r3, [r3, #36] <== NOT EXECUTED
6e70: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
6e74: 0a000003 beq 6e88 <_Thread_Stack_Free+0x34> <== NOT EXECUTED
(*_Configuration_Table->stack_free_hook)(
6e78: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
6e7c: e1a0e00f mov lr, pc <== NOT EXECUTED
6e80: e12fff13 bx r3 <== NOT EXECUTED
6e84: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
6e88: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
}
6e8c: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
6e90: ea0001e7 b 7634 <_Workspace_Free> <== NOT EXECUTED
00005cb4 <_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 ) ) {
5cb4: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED
5cb8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
5cbc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
5cc0: e92d4010 push {r4, lr} <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
5cc4: e5813044 str r3, [r1, #68] <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
5cc8: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* 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 ) ) {
5ccc: 1a000005 bne 5ce8 <_Thread_blocking_operation_Cancel+0x34> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
5cd0: e2833003 add r3, r3, #3 ; 0x3 <== NOT EXECUTED
5cd4: e5813050 str r3, [r1, #80] <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
5cd8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
5cdc: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
5ce0: eb000605 bl 74fc <_Watchdog_Remove> <== NOT EXECUTED
5ce4: ea000000 b 5cec <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED
} else
_ISR_Enable( level );
5ce8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
5cec: e59f1008 ldr r1, [pc, #8] ; 5cfc <_Thread_blocking_operation_Cancel+0x48><== NOT EXECUTED
5cf0: e1a00004 mov r0, r4 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
5cf4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
5cf8: ea000068 b 5ea0 <_Thread_Clear_state> <== NOT EXECUTED
00006834 <_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
)
{
6834: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
6838: e1a0c001 mov ip, r1
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
683c: e5915014 ldr r5, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6840: e281303c add r3, r1, #60 ; 0x3c
6844: e58c3038 str r3, [ip, #56]
the_chain->permanent_null = NULL;
6848: e3a03000 mov r3, #0 ; 0x0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
684c: e1a04000 mov r4, r0
6850: e58c303c str r3, [ip, #60]
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
6854: e1a00325 lsr r0, r5, #6
_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 ];
6858: e283300c add r3, r3, #12 ; 0xc
685c: e0264093 mla r6, r3, r0, r4
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
6860: e3150020 tst r5, #32 ; 0x20
the_chain->last = _Chain_Head(the_chain);
6864: e2811038 add r1, r1, #56 ; 0x38
6868: e58c1040 str r1, [ip, #64]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
686c: e1a09002 mov r9, r2
_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 ];
block_state = the_thread_queue->state;
6870: e5948038 ldr r8, [r4, #56]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6874: 159fa19c ldrne sl, [pc, #412] ; 6a18 <_Thread_queue_Enqueue_priority+0x1e4>
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
6878: 12860008 addne r0, r6, #8 ; 0x8
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
687c: 1a00002d bne 6938 <_Thread_queue_Enqueue_priority+0x104>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
6880: e3a03003 mov r3, #3 ; 0x3
6884: e0030390 mul r3, r0, r3
6888: e2833001 add r3, r3, #1 ; 0x1
688c: e0840103 add r0, r4, r3, lsl #2
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
6890: e1a07006 mov r7, r6
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
6894: e10f6000 mrs r6, CPSR
6898: e38630c0 orr r3, r6, #192 ; 0xc0
689c: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->first;
68a0: e3e02000 mvn r2, #0 ; 0x0
68a4: e5971000 ldr r1, [r7]
68a8: ea000011 b 68f4 <_Thread_queue_Enqueue_priority+0xc0>
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
68ac: e5912014 ldr r2, [r1, #20]
if ( priority <= search_priority )
68b0: e1550002 cmp r5, r2
68b4: 9a000010 bls 68fc <_Thread_queue_Enqueue_priority+0xc8>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
68b8: e5911000 ldr r1, [r1]
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
68bc: e1510000 cmp r1, r0
68c0: 0a00000d beq 68fc <_Thread_queue_Enqueue_priority+0xc8>
break;
search_priority = search_thread->current_priority;
68c4: e5912014 ldr r2, [r1, #20]
if ( priority <= search_priority )
68c8: e1550002 cmp r5, r2
68cc: 9a00000a bls 68fc <_Thread_queue_Enqueue_priority+0xc8>
break;
#endif
_ISR_Flash( level );
68d0: e10f3000 mrs r3, CPSR
68d4: e129f006 msr CPSR_fc, r6
68d8: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
68dc: e5913010 ldr r3, [r1, #16]
68e0: e1180003 tst r8, r3
68e4: 1a000001 bne 68f0 <_Thread_queue_Enqueue_priority+0xbc>
_ISR_Enable( level );
68e8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
68ec: eaffffe8 b 6894 <_Thread_queue_Enqueue_priority+0x60> <== NOT EXECUTED
goto restart_forward_search;
}
search_thread =
68f0: e5911000 ldr r1, [r1]
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 ) ) {
68f4: e1510000 cmp r1, r0
68f8: 1affffeb bne 68ac <_Thread_queue_Enqueue_priority+0x78>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
68fc: e5943030 ldr r3, [r4, #48]
6900: e3530001 cmp r3, #1 ; 0x1
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 ) ) {
6904: e1a00006 mov r0, r6
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6908: 1a00003f bne 6a0c <_Thread_queue_Enqueue_priority+0x1d8>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
690c: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
6910: e1550002 cmp r5, r2
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
6914: e5843030 str r3, [r4, #48]
if ( priority == search_priority )
6918: 0a000031 beq 69e4 <_Thread_queue_Enqueue_priority+0x1b0>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
691c: e5913004 ldr r3, [r1, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
6920: e88c000a stm ip, {r1, r3}
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
6924: e58c4044 str r4, [ip, #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;
6928: e583c000 str ip, [r3]
search_node->previous = the_node;
692c: e581c004 str ip, [r1, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
6930: e129f006 msr CPSR_fc, r6
6934: ea000032 b 6a04 <_Thread_queue_Enqueue_priority+0x1d0>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6938: e5da3000 ldrb r3, [sl]
693c: e2832001 add r2, r3, #1 ; 0x1
_ISR_Disable( level );
6940: e10f7000 mrs r7, CPSR
6944: e38730c0 orr r3, r7, #192 ; 0xc0
6948: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->last;
694c: e5901000 ldr r1, [r0]
6950: ea000011 b 699c <_Thread_queue_Enqueue_priority+0x168>
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
6954: e5912014 ldr r2, [r1, #20]
if ( priority >= search_priority )
6958: e1550002 cmp r5, r2
695c: 2a000010 bcs 69a4 <_Thread_queue_Enqueue_priority+0x170>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
6960: e5911004 ldr r1, [r1, #4]
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
6964: e1510006 cmp r1, r6
6968: 0a00000d beq 69a4 <_Thread_queue_Enqueue_priority+0x170>
break;
search_priority = search_thread->current_priority;
696c: e5912014 ldr r2, [r1, #20]
if ( priority >= search_priority )
6970: e1550002 cmp r5, r2
6974: 2a00000a bcs 69a4 <_Thread_queue_Enqueue_priority+0x170>
break;
#endif
_ISR_Flash( level );
6978: e10f3000 mrs r3, CPSR
697c: e129f007 msr CPSR_fc, r7
6980: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6984: e5913010 ldr r3, [r1, #16]
6988: e1180003 tst r8, r3
698c: 1a000001 bne 6998 <_Thread_queue_Enqueue_priority+0x164>
_ISR_Enable( level );
6990: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
6994: eaffffe7 b 6938 <_Thread_queue_Enqueue_priority+0x104> <== NOT EXECUTED
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
6998: e5911004 ldr r1, [r1, #4]
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 ) ) {
699c: e1510006 cmp r1, r6
69a0: 1affffeb bne 6954 <_Thread_queue_Enqueue_priority+0x120>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
69a4: e5943030 ldr r3, [r4, #48]
69a8: e3530001 cmp r3, #1 ; 0x1
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 ) ) {
69ac: e1a00007 mov r0, r7
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
69b0: 1a000015 bne 6a0c <_Thread_queue_Enqueue_priority+0x1d8>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
69b4: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
69b8: e1550002 cmp r5, r2
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
69bc: e5843030 str r3, [r4, #48]
if ( priority == search_priority )
69c0: 0a000007 beq 69e4 <_Thread_queue_Enqueue_priority+0x1b0>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
69c4: e5913000 ldr r3, [r1]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
69c8: e58c1004 str r1, [ip, #4]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
69cc: e58c3000 str r3, [ip]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
69d0: e58c4044 str r4, [ip, #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;
69d4: e581c000 str ip, [r1]
next_node->previous = the_node;
69d8: e583c004 str ip, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
69dc: e129f007 msr CPSR_fc, r7
69e0: ea000007 b 6a04 <_Thread_queue_Enqueue_priority+0x1d0>
69e4: e281303c add r3, r1, #60 ; 0x3c
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;
69e8: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
69ec: e58c3000 str r3, [ip]
the_node->previous = previous_node;
69f0: e58c2004 str r2, [ip, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
69f4: e58c4044 str r4, [ip, #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;
69f8: e582c000 str ip, [r2]
search_node->previous = the_node;
69fc: e583c004 str ip, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
6a00: e129f000 msr CPSR_fc, r0
6a04: e3a00001 mov r0, #1 ; 0x1
6a08: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* 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;
6a0c: e5890000 str r0, [r9] <== NOT EXECUTED
return the_thread_queue->sync_state;
6a10: e5940030 ldr r0, [r4, #48] <== NOT EXECUTED
}
6a14: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0000b2dc <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
b2dc: e92d4010 push {r4, lr}
b2e0: e1a04001 mov r4, r1
ISR_Level level;
_ISR_Disable( level );
b2e4: e10f0000 mrs r0, CPSR
b2e8: e38030c0 orr r3, r0, #192 ; 0xc0
b2ec: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
b2f0: e59f3064 ldr r3, [pc, #100] ; b35c <_Thread_queue_Extract_fifo+0x80>
b2f4: e5912010 ldr r2, [r1, #16]
b2f8: e0023003 and r3, r2, r3
b2fc: e3530000 cmp r3, #0 ; 0x0
b300: 1a000001 bne b30c <_Thread_queue_Extract_fifo+0x30>
_ISR_Enable( level );
b304: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
b308: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
b30c: e5913050 ldr r3, [r1, #80]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
b310: e5942004 ldr r2, [r4, #4]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
b314: e5911000 ldr r1, [r1]
b318: e3530002 cmp r3, #2 ; 0x2
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
b31c: e3a03000 mov r3, #0 ; 0x0
previous = the_node->previous;
next->previous = previous;
previous->next = next;
b320: e5821000 str r1, [r2]
b324: e5843044 str r3, [r4, #68]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
b328: e5812004 str r2, [r1, #4]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
b32c: 0a000001 beq b338 <_Thread_queue_Extract_fifo+0x5c>
_ISR_Enable( level );
b330: e129f000 msr CPSR_fc, r0
b334: ea000004 b b34c <_Thread_queue_Extract_fifo+0x70>
b338: e3a03003 mov r3, #3 ; 0x3
b33c: e5843050 str r3, [r4, #80]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
b340: e129f000 msr CPSR_fc, r0
(void) _Watchdog_Remove( &the_thread->Timer );
b344: e2840048 add r0, r4, #72 ; 0x48
b348: ebfff06b bl 74fc <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
b34c: e59f100c ldr r1, [pc, #12] ; b360 <_Thread_queue_Extract_fifo+0x84>
b350: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
b354: e8bd4010 pop {r4, lr}
b358: eaffead0 b 5ea0 <_Thread_Clear_state>
0000a364 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
a364: e92d4070 push {r4, r5, r6, lr}
a368: e1a04001 mov r4, r1
a36c: e20260ff and r6, r2, #255 ; 0xff
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
a370: e10fc000 mrs ip, CPSR
a374: e38c30c0 orr r3, ip, #192 ; 0xc0
a378: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a37c: e59f30b4 ldr r3, [pc, #180] ; a438 <_Thread_queue_Extract_priority_helper+0xd4>
a380: e5912010 ldr r2, [r1, #16]
a384: e0023003 and r3, r2, r3
a388: e3530000 cmp r3, #0 ; 0x0
a38c: 1a000001 bne a398 <_Thread_queue_Extract_priority_helper+0x34>
_ISR_Enable( level );
a390: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
a394: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a398: e5911038 ldr r1, [r1, #56]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a39c: e284303c add r3, r4, #60 ; 0x3c
a3a0: e1510003 cmp r1, r3
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a3a4: e894000c ldm r4, {r2, r3}
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;
a3a8: 05823004 streq r3, [r2, #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;
a3ac: 05832000 streq r2, [r3]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a3b0: 0a00000e beq a3f0 <_Thread_queue_Extract_priority_helper+0x8c>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
a3b4: e5945040 ldr r5, [r4, #64]
new_second_node = new_first_node->next;
a3b8: e5910000 ldr r0, [r1]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a3bc: e5821004 str r1, [r2, #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;
a3c0: e5831000 str r1, [r3]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a3c4: e881000c stm r1, {r2, r3}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a3c8: e5942038 ldr r2, [r4, #56]
a3cc: e5943040 ldr r3, [r4, #64]
a3d0: e1520003 cmp r2, r3
a3d4: 0a000005 beq a3f0 <_Thread_queue_Extract_priority_helper+0x8c>
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a3d8: e281203c add r2, r1, #60 ; 0x3c
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
a3dc: e2813038 add r3, r1, #56 ; 0x38
a3e0: e5803004 str r3, [r0, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
a3e4: e5810038 str r0, [r1, #56]
new_first_thread->Wait.Block2n.last = last_node;
a3e8: e5815040 str r5, [r1, #64]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a3ec: e5852000 str r2, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a3f0: e3560000 cmp r6, #0 ; 0x0
a3f4: 0a000001 beq a400 <_Thread_queue_Extract_priority_helper+0x9c>
_ISR_Enable( level );
a3f8: e129f00c msr CPSR_fc, ip
a3fc: e8bd8070 pop {r4, r5, r6, pc}
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a400: e5943050 ldr r3, [r4, #80]
a404: e3530002 cmp r3, #2 ; 0x2
a408: 0a000001 beq a414 <_Thread_queue_Extract_priority_helper+0xb0>
_ISR_Enable( level );
a40c: e129f00c msr CPSR_fc, ip
a410: ea000004 b a428 <_Thread_queue_Extract_priority_helper+0xc4>
a414: e3a03003 mov r3, #3 ; 0x3
a418: e5843050 str r3, [r4, #80]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
a41c: e129f00c msr CPSR_fc, ip
(void) _Watchdog_Remove( &the_thread->Timer );
a420: e2840048 add r0, r4, #72 ; 0x48
a424: ebfff434 bl 74fc <_Watchdog_Remove>
a428: e59f100c ldr r1, [pc, #12] ; a43c <_Thread_queue_Extract_priority_helper+0xd8>
a42c: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a430: e8bd4070 pop {r4, r5, r6, lr}
a434: eaffee99 b 5ea0 <_Thread_Clear_state>
0000a440 <_Thread_queue_Process_timeout>:
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a440: e5902044 ldr r2, [r0, #68]
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
a444: e5921030 ldr r1, [r2, #48]
a448: e3510000 cmp r1, #0 ; 0x0
a44c: 0a000009 beq a478 <_Thread_queue_Process_timeout+0x38>
a450: e59f3034 ldr r3, [pc, #52] ; a48c <_Thread_queue_Process_timeout+0x4c><== NOT EXECUTED
a454: e5933000 ldr r3, [r3] <== NOT EXECUTED
a458: e1500003 cmp r0, r3 <== NOT EXECUTED
a45c: 1a000005 bne a478 <_Thread_queue_Process_timeout+0x38> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
a460: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a464: 1592303c ldrne r3, [r2, #60] <== NOT EXECUTED
a468: 15803034 strne r3, [r0, #52] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a46c: 13a03002 movne r3, #2 ; 0x2 <== NOT EXECUTED
a470: 15823030 strne r3, [r2, #48] <== NOT EXECUTED
a474: e12fff1e bx lr <== NOT EXECUTED
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a478: e592303c ldr r3, [r2, #60]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a47c: e1a01000 mov r1, r0
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a480: e5803034 str r3, [r0, #52]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a484: e5900044 ldr r0, [r0, #68]
a488: eaffffaf b a34c <_Thread_queue_Extract>
00008ddc <_Timespec_Divide_by_integer>:
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
8ddc: e5903000 ldr r3, [r0] <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
8de0: e59fc06c ldr ip, [pc, #108] ; 8e54 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
8de4: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
8de8: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
8dec: e086539c umull r5, r6, ip, r3 <== NOT EXECUTED
8df0: e026649c mla r6, ip, r4, r6 <== NOT EXECUTED
t += time->tv_nsec;
8df4: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
8df8: e0957000 adds r7, r5, r0 <== NOT EXECUTED
8dfc: e0a68fc0 adc r8, r6, r0, asr #31 <== NOT EXECUTED
8e00: e1a03001 mov r3, r1 <== NOT EXECUTED
8e04: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
8e08: e1a06002 mov r6, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
8e0c: e1a00007 mov r0, r7 <== NOT EXECUTED
8e10: e1a02003 mov r2, r3 <== NOT EXECUTED
8e14: e1a01008 mov r1, r8 <== NOT EXECUTED
8e18: e1a03004 mov r3, r4 <== NOT EXECUTED
8e1c: eb0035d1 bl 16568 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
8e20: e59f202c ldr r2, [pc, #44] ; 8e54 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
8e24: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
8e28: e1a04000 mov r4, r0 <== NOT EXECUTED
8e2c: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
8e30: eb0035cc bl 16568 <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
8e34: e1a01005 mov r1, r5 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
8e38: e5860000 str r0, [r6] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
8e3c: e59f2010 ldr r2, [pc, #16] ; 8e54 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
8e40: e1a00004 mov r0, r4 <== NOT EXECUTED
8e44: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
8e48: eb00370e bl 16a88 <__umoddi3> <== NOT EXECUTED
8e4c: e5860004 str r0, [r6, #4] <== NOT EXECUTED
}
8e50: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00007108 <_User_extensions_Handler_initialization>:
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7108: e59f3080 ldr r3, [pc, #128] ; 7190 <_User_extensions_Handler_initialization+0x88>
void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
710c: e59f2080 ldr r2, [pc, #128] ; 7194 <_User_extensions_Handler_initialization+0x8c>
7110: e92d41f0 push {r4, r5, r6, r7, r8, lr}
7114: e282c004 add ip, r2, #4 ; 0x4
the_chain->permanent_null = NULL;
7118: e3a07000 mov r7, #0 ; 0x0
uint32_t i;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
711c: e2515000 subs r5, r1, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7120: e2831004 add r1, r3, #4 ; 0x4
7124: e5831000 str r1, [r3]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7128: e5833008 str r3, [r3, #8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
712c: e582c000 str ip, [r2]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7130: e5822008 str r2, [r2, #8]
void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
7134: e1a08000 mov r8, r0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
7138: e5837004 str r7, [r3, #4]
713c: e5827004 str r7, [r2, #4]
uint32_t i;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
7140: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
extension = (User_extensions_Control *)
7144: e3a03034 mov r3, #52 ; 0x34
7148: e0040093 mul r4, r3, r0
714c: e1a00004 mov r0, r4
7150: eb00013f bl 7654 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
7154: e1a02004 mov r2, r4
7158: e1a01007 mov r1, r7
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
715c: e1a06000 mov r6, r0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
7160: e1a04007 mov r4, r7
7164: eb0012b4 bl bc3c <memset>
7168: ea000000 b 7170 <_User_extensions_Handler_initialization+0x68>
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
_User_extensions_Add_set (extension, &initial_extensions[i]);
716c: eb000d57 bl a6d0 <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
7170: e1540008 cmp r4, r8
_User_extensions_Add_set (extension, &initial_extensions[i]);
7174: e1a00006 mov r0, r6
7178: e1a01005 mov r1, r5
extension++;
717c: e2866034 add r6, r6, #52 ; 0x34
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
7180: e2844001 add r4, r4, #1 ; 0x1
7184: e2855020 add r5, r5, #32 ; 0x20
7188: 3afffff7 bcc 716c <_User_extensions_Handler_initialization+0x64>
718c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00009460 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
9460: e92d4010 push {r4, lr}
9464: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
9468: eb000afa bl c058 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
946c: e5943024 ldr r3, [r4, #36]
9470: e3530000 cmp r3, #0 ; 0x0
9474: 08bd8010 popeq {r4, pc}
_Chain_Extract( &the_extension->Switch.Node );
9478: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED
}
947c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
9480: ea000af4 b c058 <_Chain_Extract> <== NOT EXECUTED
00007198 <_User_extensions_Thread_begin>:
*/
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
7198: e92d4070 push {r4, r5, r6, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
719c: e59f502c ldr r5, [pc, #44] ; 71d0 <_User_extensions_Thread_begin+0x38>
*/
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
71a0: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
71a4: e4954004 ldr r4, [r5], #4
71a8: ea000004 b 71c0 <_User_extensions_Thread_begin+0x28>
!_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 )
71ac: e5943028 ldr r3, [r4, #40]
71b0: e3530000 cmp r3, #0 ; 0x0
(*the_extension->Callouts.thread_begin)( executing );
71b4: 11a0e00f movne lr, pc
71b8: 112fff13 bxne r3
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 ) {
71bc: e5944000 ldr r4, [r4]
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
71c0: e1540005 cmp r4, r5
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
71c4: e1a00006 mov r0, r6
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
71c8: 1afffff7 bne 71ac <_User_extensions_Thread_begin+0x14>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
71cc: e8bd8070 pop {r4, r5, r6, pc}
000072bc <_User_extensions_Thread_delete>:
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
72bc: e59f303c ldr r3, [pc, #60] ; 7300 <_User_extensions_Thread_delete+0x44><== NOT EXECUTED
*/
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
72c0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
72c4: e1a05000 mov r5, r0 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
72c8: e1a07003 mov r7, r3 <== NOT EXECUTED
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
72cc: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
72d0: e59f602c ldr r6, [pc, #44] ; 7304 <_User_extensions_Thread_delete+0x48><== NOT EXECUTED
72d4: ea000005 b 72f0 <_User_extensions_Thread_delete+0x34> <== NOT EXECUTED
!_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 )
72d8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
72dc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
(*the_extension->Callouts.thread_delete)(
72e0: 15960000 ldrne r0, [r6] <== NOT EXECUTED
72e4: 11a0e00f movne lr, pc <== NOT EXECUTED
72e8: 112fff13 bxne r3 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
72ec: e5944004 ldr r4, [r4, #4] <== NOT EXECUTED
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
72f0: e1540007 cmp r4, r7 <== NOT EXECUTED
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
72f4: e1a01005 mov r1, r5 <== NOT EXECUTED
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
72f8: 1afffff6 bne 72d8 <_User_extensions_Thread_delete+0x1c> <== NOT EXECUTED
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
72fc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000074a0 <_Watchdog_Handler_initialization>:
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
_Watchdog_Sync_count = 0;
74a0: e59f3040 ldr r3, [pc, #64] ; 74e8 <_Watchdog_Handler_initialization+0x48>
74a4: e3a01000 mov r1, #0 ; 0x0
74a8: e5831000 str r1, [r3]
_Watchdog_Sync_level = 0;
74ac: e59f3038 ldr r3, [pc, #56] ; 74ec <_Watchdog_Handler_initialization+0x4c>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
74b0: e59f0038 ldr r0, [pc, #56] ; 74f0 <_Watchdog_Handler_initialization+0x50>
74b4: e59f2038 ldr r2, [pc, #56] ; 74f4 <_Watchdog_Handler_initialization+0x54>
74b8: e5831000 str r1, [r3]
_Watchdog_Ticks_since_boot = 0;
74bc: e59f3034 ldr r3, [pc, #52] ; 74f8 <_Watchdog_Handler_initialization+0x58>
*
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
74c0: e92d4010 push {r4, lr}
74c4: e280c004 add ip, r0, #4 ; 0x4
74c8: e2824004 add r4, r2, #4 ; 0x4
74cc: e580c000 str ip, [r0]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
74d0: e5800008 str r0, [r0, #8]
_Watchdog_Sync_count = 0;
_Watchdog_Sync_level = 0;
_Watchdog_Ticks_since_boot = 0;
74d4: e5831000 str r1, [r3]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
74d8: e5824000 str r4, [r2]
the_chain->permanent_null = NULL;
74dc: e9820006 stmib r2, {r1, r2}
74e0: e5801004 str r1, [r0, #4]
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
}
74e4: e8bd8010 pop {r4, pc}
0000738c <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
738c: e59f30fc ldr r3, [pc, #252] ; 7490 <_Watchdog_Insert+0x104>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
7390: e92d41f0 push {r4, r5, r6, r7, r8, lr}
7394: e1a0c001 mov ip, r1
7398: e1a07000 mov r7, r0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
739c: e5934000 ldr r4, [r3]
_ISR_Disable( level );
73a0: e10f5000 mrs r5, CPSR
73a4: e38530c0 orr r3, r5, #192 ; 0xc0
73a8: e129f003 msr CPSR_fc, r3
/*
* 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 ) {
73ac: e5913008 ldr r3, [r1, #8]
73b0: e3530000 cmp r3, #0 ; 0x0
73b4: 0a000001 beq 73c0 <_Watchdog_Insert+0x34>
_ISR_Enable( level );
73b8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
73bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
73c0: e59f30cc ldr r3, [pc, #204] ; 7494 <_Watchdog_Insert+0x108>
73c4: e5932000 ldr r2, [r3]
73c8: e2822001 add r2, r2, #1 ; 0x1
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
73cc: e59f60c4 ldr r6, [pc, #196] ; 7498 <_Watchdog_Insert+0x10c>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
73d0: e5832000 str r2, [r3]
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
73d4: e3a03001 mov r3, #1 ; 0x1
73d8: e5813008 str r3, [r1, #8]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
73dc: e1a08006 mov r8, r6
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
73e0: e59c000c ldr r0, [ip, #12]
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
73e4: e5971000 ldr r1, [r7]
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
73e8: e3500000 cmp r0, #0 ; 0x0
73ec: 0a000014 beq 7444 <_Watchdog_Insert+0xb8>
73f0: e5913000 ldr r3, [r1]
73f4: e3530000 cmp r3, #0 ; 0x0
73f8: 0a000011 beq 7444 <_Watchdog_Insert+0xb8>
break;
if ( delta_interval < after->delta_interval ) {
73fc: e5912010 ldr r2, [r1, #16]
7400: e1500002 cmp r0, r2
after->delta_interval -= delta_interval;
7404: 30603002 rsbcc r3, r0, r2
7408: 35813010 strcc r3, [r1, #16]
740c: 3a00000c bcc 7444 <_Watchdog_Insert+0xb8>
* 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 );
7410: e10f3000 mrs r3, CPSR
7414: e129f005 msr CPSR_fc, r5
7418: e129f003 msr CPSR_fc, r3
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
741c: e59c3008 ldr r3, [ip, #8]
7420: e3530001 cmp r3, #1 ; 0x1
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7424: e0620000 rsb r0, r2, r0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7428: 1a000010 bne 7470 <_Watchdog_Insert+0xe4>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
742c: e5963000 ldr r3, [r6]
7430: e1530004 cmp r3, r4
_Watchdog_Sync_level = insert_isr_nest_level;
7434: 85884000 strhi r4, [r8]
7438: 8affffe8 bhi 73e0 <_Watchdog_Insert+0x54>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
743c: e5911000 ldr r1, [r1]
7440: eaffffe8 b 73e8 <_Watchdog_Insert+0x5c>
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
7444: e59f3050 ldr r3, [pc, #80] ; 749c <_Watchdog_Insert+0x110>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
7448: e5912004 ldr r2, [r1, #4]
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
744c: e5933000 ldr r3, [r3]
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
7450: e5921000 ldr r1, [r2]
7454: e58c3014 str r3, [ip, #20]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
7458: e3a03002 mov r3, #2 ; 0x2
after_node->next = the_node;
745c: e582c000 str ip, [r2]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
7460: e98c000c stmib ip, {r2, r3}
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
7464: e58c0010 str r0, [ip, #16]
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
7468: e581c004 str ip, [r1, #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;
746c: e58c1000 str r1, [ip]
_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;
7470: e59f3020 ldr r3, [pc, #32] ; 7498 <_Watchdog_Insert+0x10c>
_Watchdog_Sync_count--;
7474: e59f2018 ldr r2, [pc, #24] ; 7494 <_Watchdog_Insert+0x108>
_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;
7478: e5834000 str r4, [r3]
_Watchdog_Sync_count--;
747c: e5923000 ldr r3, [r2]
7480: e2433001 sub r3, r3, #1 ; 0x1
7484: e5823000 str r3, [r2]
_ISR_Enable( level );
7488: e129f005 msr CPSR_fc, r5
748c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000767c <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
767c: e92d4030 push {r4, r5, lr}
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7680: e2504000 subs r4, r0, #0 ; 0x0
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7684: e1a05001 mov r5, r1
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7688: 0a000001 beq 7694 <_Workspace_Handler_initialization+0x18>
768c: e2141003 ands r1, r4, #3 ; 0x3
7690: 0a000003 beq 76a4 <_Workspace_Handler_initialization+0x28>
_Internal_error_Occurred(
7694: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
7698: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
769c: e3a02002 mov r2, #2 ; 0x2 <== NOT EXECUTED
76a0: ea00000e b 76e0 <_Workspace_Handler_initialization+0x64> <== NOT EXECUTED
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
76a4: e59f3038 ldr r3, [pc, #56] ; 76e4 <_Workspace_Handler_initialization+0x68>
76a8: e5933000 ldr r3, [r3]
76ac: e5d33028 ldrb r3, [r3, #40]
76b0: e3530000 cmp r3, #0 ; 0x0
memset( starting_address, 0, size );
76b4: 11a02005 movne r2, r5
76b8: 1b00115f blne bc3c <memset>
memory_available = _Heap_Initialize(
76bc: e1a01004 mov r1, r4
76c0: e1a02005 mov r2, r5
76c4: e59f001c ldr r0, [pc, #28] ; 76e8 <_Workspace_Handler_initialization+0x6c>
76c8: e3a03004 mov r3, #4 ; 0x4
76cc: ebfff706 bl 52ec <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
76d0: e3500000 cmp r0, #0 ; 0x0
76d4: 18bd8030 popne {r4, r5, pc}
_Internal_error_Occurred(
76d8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
76dc: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
76e0: ebfff786 bl 5500 <_Internal_error_Occurred> <== NOT EXECUTED
00017274 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
17274: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
17278: e24dd00c sub sp, sp, #12 ; 0xc
1727c: e1a04000 mov r4, r0
17280: e1a06001 mov r6, r1
17284: e1a05002 mov r5, r2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
17288: ebfffef5 bl 16e64 <getpid>
1728c: e1540000 cmp r4, r0
17290: 0a000002 beq 172a0 <killinfo+0x2c>
rtems_set_errno_and_return_minus_one( ESRCH );
17294: ebffd726 bl cf34 <__errno> <== NOT EXECUTED
17298: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
1729c: ea000003 b 172b0 <killinfo+0x3c> <== NOT EXECUTED
/*
* Validate the signal passed.
*/
if ( !sig )
172a0: e3560000 cmp r6, #0 ; 0x0
172a4: 1a000004 bne 172bc <killinfo+0x48>
rtems_set_errno_and_return_minus_one( EINVAL );
172a8: ebffd721 bl cf34 <__errno> <== NOT EXECUTED
172ac: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
172b0: e5803000 str r3, [r0] <== NOT EXECUTED
172b4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
172b8: ea000089 b 174e4 <killinfo+0x270> <== NOT EXECUTED
if ( !is_valid_signo(sig) )
172bc: e2460001 sub r0, r6, #1 ; 0x1
172c0: e350001f cmp r0, #31 ; 0x1f
172c4: 8afffff7 bhi 172a8 <killinfo+0x34>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
172c8: e59f321c ldr r3, [pc, #540] ; 174ec <killinfo+0x278>
172cc: e3a0200c mov r2, #12 ; 0xc
172d0: e0233692 mla r3, r2, r6, r3
172d4: e5933008 ldr r3, [r3, #8]
172d8: e3530001 cmp r3, #1 ; 0x1
172dc: 0a00007f beq 174e0 <killinfo+0x26c>
* 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 ) )
172e0: e3560004 cmp r6, #4 ; 0x4
172e4: 13560008 cmpne r6, #8 ; 0x8
172e8: 0a000001 beq 172f4 <killinfo+0x80>
172ec: e356000b cmp r6, #11 ; 0xb
172f0: 1a000003 bne 17304 <killinfo+0x90>
return pthread_kill( pthread_self(), sig );
172f4: eb000115 bl 17750 <pthread_self>
172f8: e1a01006 mov r1, r6
172fc: eb0000db bl 17670 <pthread_kill>
17300: ea000077 b 174e4 <killinfo+0x270>
mask = signo_to_mask( sig );
17304: e3a03001 mov r3, #1 ; 0x1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
17308: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1730c: e58d6000 str r6, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
17310: e3550000 cmp r5, #0 ; 0x0
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
17314: e1a07013 lsl r7, r3, r0
17318: e59f21d0 ldr r2, [pc, #464] ; 174f0 <killinfo+0x27c>
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
1731c: 15953000 ldrne r3, [r5]
17320: 158d3008 strne r3, [sp, #8]
17324: e5923000 ldr r3, [r2]
17328: e2833001 add r3, r3, #1 ; 0x1
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
1732c: 058d5008 streq r5, [sp, #8]
17330: e5823000 str r3, [r2]
/*
* 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;
17334: e59f31b8 ldr r3, [pc, #440] ; 174f4 <killinfo+0x280>
17338: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
1733c: e5903108 ldr r3, [r0, #264]
17340: e59330c4 ldr r3, [r3, #196]
17344: e1d73003 bics r3, r7, r3
17348: 1a000046 bne 17468 <killinfo+0x1f4>
goto process_it;
1734c: e59f11a4 ldr r1, [pc, #420] ; 174f8 <killinfo+0x284>
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
17350: e281e030 add lr, r1, #48 ; 0x30
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
17354: e1a0c001 mov ip, r1
17358: e49c2004 ldr r2, [ip], #4
1735c: ea000008 b 17384 <killinfo+0x110>
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
17360: e5923030 ldr r3, [r2, #48]
17364: e1170003 tst r7, r3
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
17368: e1a00002 mov r0, r2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
1736c: e5923108 ldr r3, [r2, #264]
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
17370: 1a00003c bne 17468 <killinfo+0x1f4>
17374: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED
17378: e1d73003 bics r3, r7, r3 <== NOT EXECUTED
1737c: 1a000039 bne 17468 <killinfo+0x1f4> <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
17380: e5922000 ldr r2, [r2] <== NOT EXECUTED
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
17384: e152000c cmp r2, ip
17388: 1afffff4 bne 17360 <killinfo+0xec>
1738c: e281100c add r1, r1, #12 ; 0xc
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
17390: e151000e cmp r1, lr
17394: 1affffee bne 17354 <killinfo+0xe0>
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
17398: e59f315c ldr r3, [pc, #348] ; 174fc <killinfo+0x288>
1739c: e59f415c ldr r4, [pc, #348] ; 17500 <killinfo+0x28c>
173a0: e5d33000 ldrb r3, [r3]
173a4: e3a00000 mov r0, #0 ; 0x0
173a8: e2835001 add r5, r3, #1 ; 0x1
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
173ac: e284900c add r9, r4, #12 ; 0xc
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
173b0: e5943008 ldr r3, [r4, #8]
173b4: e3530000 cmp r3, #0 ; 0x0
173b8: 0a000025 beq 17454 <killinfo+0x1e0>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
173bc: e5933004 ldr r3, [r3, #4]
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
173c0: e3530000 cmp r3, #0 ; 0x0
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
173c4: 1593a01c ldrne sl, [r3, #28]
* structure for a particular manager may not be installed.
*/
if ( !the_info )
continue;
maximum = the_info->maximum;
173c8: 11d381b0 ldrhne r8, [r3, #16]
object_table = the_info->local_table;
173cc: 13a0e001 movne lr, #1 ; 0x1
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
173d0: 1a00001d bne 1744c <killinfo+0x1d8>
173d4: ea00001e b 17454 <killinfo+0x1e0> <== NOT EXECUTED
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
the_thread = (Thread_Control *) object_table[ index ];
173d8: e79a210e ldr r2, [sl, lr, lsl #2]
if ( !the_thread )
173dc: e3520000 cmp r2, #0 ; 0x0
173e0: 0a000014 beq 17438 <killinfo+0x1c4>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
173e4: e592c014 ldr ip, [r2, #20]
173e8: e15c0005 cmp ip, r5
173ec: 8a000011 bhi 17438 <killinfo+0x1c4>
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
173f0: e5923108 ldr r3, [r2, #264]
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
173f4: e3530000 cmp r3, #0 ; 0x0
173f8: 0a00000e beq 17438 <killinfo+0x1c4>
173fc: e59330c4 ldr r3, [r3, #196]
17400: e1d73003 bics r3, r7, r3
17404: 0a00000b beq 17438 <killinfo+0x1c4>
* Now we know the thread under connsideration is interested.
* If the thread under consideration is of higher priority, then
* it becomes the interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
17408: e15c0005 cmp ip, r5
1740c: 3a00000b bcc 17440 <killinfo+0x1cc>
* Now the thread and the interested thread have the same priority.
* If the interested thread is ready, then we don't need to send it
* to a blocked thread.
*/
if ( _States_Is_ready( interested_thread->current_state ) )
17410: e5901010 ldr r1, [r0, #16] <== NOT EXECUTED
17414: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
17418: 0a000006 beq 17438 <killinfo+0x1c4> <== NOT EXECUTED
* Now the interested thread is blocked.
* If the thread we are considering is not, the it becomes the
* interested thread.
*/
if ( _States_Is_ready( the_thread->current_state ) ) {
1741c: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
17420: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
17424: 0a000005 beq 17440 <killinfo+0x1cc> <== NOT EXECUTED
* Now we know both threads are blocked.
* If the interested thread is interruptible, then just use it.
*/
/* XXX need a new states macro */
if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL )
17428: e3110201 tst r1, #268435456 ; 0x10000000 <== NOT EXECUTED
1742c: 1a000001 bne 17438 <killinfo+0x1c4> <== NOT EXECUTED
* If the thread under consideration is interruptible by a signal,
* then it becomes the interested thread.
*/
/* XXX need a new states macro */
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
17430: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED
17434: 1a000001 bne 17440 <killinfo+0x1cc> <== NOT EXECUTED
17438: e1a0c005 mov ip, r5
1743c: ea000000 b 17444 <killinfo+0x1d0>
17440: e1a00002 mov r0, r2
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
17444: e28ee001 add lr, lr, #1 ; 0x1
17448: e1a0500c mov r5, ip
1744c: e15e0008 cmp lr, r8
17450: 9affffe0 bls 173d8 <killinfo+0x164>
17454: e2844004 add r4, r4, #4 ; 0x4
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
17458: e1540009 cmp r4, r9
1745c: 1affffd3 bne 173b0 <killinfo+0x13c>
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
17460: e3500000 cmp r0, #0 ; 0x0
17464: 0a000006 beq 17484 <killinfo+0x210>
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
17468: e3a03001 mov r3, #1 ; 0x1
1746c: e5c03075 strb r3, [r0, #117]
/*
* 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 ) ) {
17470: e1a01006 mov r1, r6
17474: e1a0200d mov r2, sp
17478: eb000035 bl 17554 <_POSIX_signals_Unblock_thread>
1747c: e3500000 cmp r0, #0 ; 0x0
17480: 1a000015 bne 174dc <killinfo+0x268>
/*
* 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 );
17484: e1a00007 mov r0, r7
17488: eb00001f bl 1750c <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
1748c: e3a0300c mov r3, #12 ; 0xc
17490: e0040693 mul r4, r3, r6
17494: e59f3050 ldr r3, [pc, #80] ; 174ec <killinfo+0x278>
17498: e7933004 ldr r3, [r3, r4]
1749c: e3530002 cmp r3, #2 ; 0x2
174a0: 1a00000d bne 174dc <killinfo+0x268>
psiginfo = (POSIX_signals_Siginfo_node *)
174a4: e59f0058 ldr r0, [pc, #88] ; 17504 <killinfo+0x290>
174a8: ebffd17a bl ba98 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
174ac: e250c000 subs ip, r0, #0 ; 0x0
174b0: 1a000002 bne 174c0 <killinfo+0x24c>
rtems_set_errno_and_return_minus_one( EAGAIN );
174b4: ebffd69e bl cf34 <__errno> <== NOT EXECUTED
174b8: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED
174bc: eaffff7b b 172b0 <killinfo+0x3c> <== NOT EXECUTED
}
psiginfo->Info = *siginfo;
174c0: e89d0007 ldm sp, {r0, r1, r2}
174c4: e28c3008 add r3, ip, #8 ; 0x8
174c8: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
174cc: e59f0034 ldr r0, [pc, #52] ; 17508 <killinfo+0x294>
174d0: e1a0100c mov r1, ip
174d4: e0800004 add r0, r0, r4
174d8: ebffbc0e bl 6518 <_Chain_Append>
}
_Thread_Enable_dispatch();
174dc: ebffc1b3 bl 7bb0 <_Thread_Enable_dispatch>
174e0: e3a00000 mov r0, #0 ; 0x0
return 0;
}
174e4: e28dd00c add sp, sp, #12 ; 0xc
174e8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
000095e4 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
95e4: e92d4070 push {r4, r5, r6, lr}
95e8: e1a06001 mov r6, r1
95ec: e1a04000 mov r4, r0
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
95f0: eb000573 bl abc4 <_Timespec_Is_valid>
95f4: e3500000 cmp r0, #0 ; 0x0
95f8: 0a000005 beq 9614 <nanosleep+0x30>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
95fc: e5943000 ldr r3, [r4]
9600: e3530000 cmp r3, #0 ; 0x0
9604: ba000002 blt 9614 <nanosleep+0x30>
9608: e5943004 ldr r3, [r4, #4]
960c: e3530000 cmp r3, #0 ; 0x0
9610: aa000002 bge 9620 <nanosleep+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
9614: eb0008fc bl ba0c <__errno>
9618: e3a03016 mov r3, #22 ; 0x16
961c: ea000031 b 96e8 <nanosleep+0x104>
ticks = _Timespec_To_ticks( rqtp );
9620: e1a00004 mov r0, r4
9624: eb000576 bl ac04 <_Timespec_To_ticks>
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
9628: e2505000 subs r5, r0, #0 ; 0x0
962c: e59f20c8 ldr r2, [pc, #200] ; 96fc <nanosleep+0x118>
9630: 1a00000a bne 9660 <nanosleep+0x7c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
9634: e5923000 ldr r3, [r2]
9638: e2833001 add r3, r3, #1 ; 0x1
963c: e5823000 str r3, [r2]
_Thread_Disable_dispatch();
_Thread_Yield_processor();
9640: ebfff75a bl 73b0 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
9644: ebfff411 bl 6690 <_Thread_Enable_dispatch>
if ( rmtp ) {
9648: e3560000 cmp r6, #0 ; 0x0
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
964c: 15865004 strne r5, [r6, #4]
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
9650: 15865000 strne r5, [r6]
rmtp->tv_nsec = 0;
9654: 11a00005 movne r0, r5
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
9658: 18bd8070 popne {r4, r5, r6, pc}
965c: ea000024 b 96f4 <nanosleep+0x110> <== NOT EXECUTED
9660: e5923000 ldr r3, [r2]
9664: e2833001 add r3, r3, #1 ; 0x1
9668: e5823000 str r3, [r2]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
966c: e59f408c ldr r4, [pc, #140] ; 9700 <nanosleep+0x11c>
9670: e3a01281 mov r1, #268435464 ; 0x10000008
9674: e5940000 ldr r0, [r4]
9678: ebfff661 bl 7004 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
967c: e5943000 ldr r3, [r4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
9680: e59f207c ldr r2, [pc, #124] ; 9704 <nanosleep+0x120>
9684: e5931008 ldr r1, [r3, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
9688: e3a00000 mov r0, #0 ; 0x0
the_watchdog->routine = routine;
the_watchdog->id = id;
968c: e5831068 str r1, [r3, #104]
the_watchdog->user_data = user_data;
9690: e583006c str r0, [r3, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
9694: e5830050 str r0, [r3, #80]
the_watchdog->routine = routine;
9698: e5832064 str r2, [r3, #100]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
969c: e2831048 add r1, r3, #72 ; 0x48
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
96a0: e5835054 str r5, [r3, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
96a4: e59f005c ldr r0, [pc, #92] ; 9708 <nanosleep+0x124>
96a8: ebfff85a bl 7818 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
96ac: ebfff3f7 bl 6690 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
96b0: e3560000 cmp r6, #0 ; 0x0
96b4: 0a00000e beq 96f4 <nanosleep+0x110>
ticks -=
96b8: e5943000 ldr r3, [r4]
96bc: e283205c add r2, r3, #92 ; 0x5c
96c0: e8920014 ldm r2, {r2, r4}
96c4: e0424004 sub r4, r2, r4
96c8: e0844005 add r4, r4, r5
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
96cc: e1a01006 mov r1, r6
96d0: e1a00004 mov r0, r4
96d4: eb000528 bl ab7c <_Timespec_From_ticks>
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
96d8: e3540000 cmp r4, #0 ; 0x0
96dc: 0a000004 beq 96f4 <nanosleep+0x110>
rtems_set_errno_and_return_minus_one( EINTR );
96e0: eb0008c9 bl ba0c <__errno>
96e4: e3a03004 mov r3, #4 ; 0x4
96e8: e5803000 str r3, [r0]
96ec: e3e00000 mvn r0, #0 ; 0x0
96f0: e8bd8070 pop {r4, r5, r6, pc}
96f4: e3a00000 mov r0, #0 ; 0x0
}
return 0;
}
96f8: e8bd8070 pop {r4, r5, r6, pc}
00004c7c <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
4c7c: e92d4030 push {r4, r5, lr}
4c80: e24dd004 sub sp, sp, #4 ; 0x4
4c84: e1a04000 mov r4, r0
4c88: e1a05001 mov r5, r1
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
switch ( _POSIX_Absolute_timeout_to_ticks(abstime, &ticks) ) {
4c8c: e1a00002 mov r0, r2
4c90: e1a0100d mov r1, sp
4c94: eb000125 bl 5130 <_POSIX_Absolute_timeout_to_ticks>
4c98: e3500003 cmp r0, #3 ; 0x3
4c9c: 979ff100 ldrls pc, [pc, r0, lsl #2]
4ca0: ea000008 b 4cc8 <pthread_cond_timedwait+0x4c> <== NOT EXECUTED
4ca4: 00004cb4 .word 0x00004cb4 <== NOT EXECUTED
4ca8: 00004cbc .word 0x00004cbc <== NOT EXECUTED
4cac: 00004cbc .word 0x00004cbc <== NOT EXECUTED
4cb0: 00004cc4 .word 0x00004cc4 <== NOT EXECUTED
4cb4: e3a00016 mov r0, #22 ; 0x16
4cb8: ea000006 b 4cd8 <pthread_cond_timedwait+0x5c>
4cbc: e3a03001 mov r3, #1 ; 0x1
4cc0: ea000000 b 4cc8 <pthread_cond_timedwait+0x4c>
4cc4: e3a03000 mov r3, #0 ; 0x0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
already_timedout = FALSE;
break;
}
return _POSIX_Condition_variables_Wait_support(
4cc8: e1a00004 mov r0, r4
4ccc: e1a01005 mov r1, r5
4cd0: e59d2000 ldr r2, [sp]
4cd4: eb000004 bl 4cec <_POSIX_Condition_variables_Wait_support>
cond,
mutex,
ticks,
already_timedout
);
}
4cd8: e28dd004 add sp, sp, #4 ; 0x4
4cdc: e8bd8030 pop {r4, r5, pc}
00005098 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
5098: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
509c: e3520000 cmp r2, #0 ; 0x0
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
50a0: e24dd040 sub sp, sp, #64 ; 0x40
50a4: e58d0024 str r0, [sp, #36]
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
50a8: e58d2020 str r2, [sp, #32]
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
50ac: e58d301c str r3, [sp, #28]
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
50b0: 03a0000e moveq r0, #14 ; 0xe
50b4: 0a0000a1 beq 5340 <pthread_create+0x2a8>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
50b8: e59f3288 ldr r3, [pc, #648] ; 5348 <pthread_create+0x2b0>
50bc: e3510000 cmp r1, #0 ; 0x0
50c0: 11a06001 movne r6, r1
50c4: 01a06003 moveq r6, r3
if ( !the_attr->is_initialized )
50c8: e5963000 ldr r3, [r6]
50cc: e3530000 cmp r3, #0 ; 0x0
50d0: 0a000099 beq 533c <pthread_create+0x2a4>
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
50d4: e5963004 ldr r3, [r6, #4]
50d8: e3530000 cmp r3, #0 ; 0x0
50dc: 0a000004 beq 50f4 <pthread_create+0x5c>
50e0: e59f3264 ldr r3, [pc, #612] ; 534c <pthread_create+0x2b4>
50e4: e5932000 ldr r2, [r3]
50e8: e5963008 ldr r3, [r6, #8]
50ec: e1530002 cmp r3, r2
50f0: 3a000091 bcc 533c <pthread_create+0x2a4>
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
50f4: e5963010 ldr r3, [r6, #16]
50f8: e3530001 cmp r3, #1 ; 0x1
50fc: 0a000002 beq 510c <pthread_create+0x74>
5100: e3530002 cmp r3, #2 ; 0x2
5104: 1a00008c bne 533c <pthread_create+0x2a4>
5108: ea000007 b 512c <pthread_create+0x94>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
510c: e59f323c ldr r3, [pc, #572] ; 5350 <pthread_create+0x2b8>
5110: e5933000 ldr r3, [r3]
5114: e5935108 ldr r5, [r3, #264]
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
5118: e2854080 add r4, r5, #128 ; 0x80
511c: e8b4000f ldm r4!, {r0, r1, r2, r3}
5120: e28dc028 add ip, sp, #40 ; 0x28
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
5124: e595807c ldr r8, [r5, #124]
5128: ea000003 b 513c <pthread_create+0xa4>
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
512c: e2864018 add r4, r6, #24 ; 0x18
5130: e8b4000f ldm r4!, {r0, r1, r2, r3}
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
5134: e5968014 ldr r8, [r6, #20]
schedparam = the_attr->schedparam;
5138: e28dc028 add ip, sp, #40 ; 0x28
513c: e8ac000f stmia ip!, {r0, r1, r2, r3}
5140: e8940003 ldm r4, {r0, r1}
5144: e88c0003 stm ip, {r0, r1}
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
5148: e596300c ldr r3, [r6, #12]
514c: e3530000 cmp r3, #0 ; 0x0
5150: 13a00086 movne r0, #134 ; 0x86
5154: 1a000079 bne 5340 <pthread_create+0x2a8>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
5158: e59d9028 ldr r9, [sp, #40]
515c: e2493001 sub r3, r9, #1 ; 0x1
5160: e35300fd cmp r3, #253 ; 0xfd
5164: 8a000074 bhi 533c <pthread_create+0x2a4>
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
5168: e3580003 cmp r8, #3 ; 0x3
516c: 979ff108 ldrls pc, [pc, r8, lsl #2]
5170: ea000071 b 533c <pthread_create+0x2a4>
5174: 00005190 .word 0x00005190
5178: 00005184 .word 0x00005184
517c: 00005198 .word 0x00005198
5180: 000051a4 .word 0x000051a4
5184: e3a04000 mov r4, #0 ; 0x0
5188: e1a05004 mov r5, r4
518c: ea000012 b 51dc <pthread_create+0x144>
5190: e3a04001 mov r4, #1 ; 0x1
5194: ea000000 b 519c <pthread_create+0x104>
5198: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED
519c: e3a05000 mov r5, #0 ; 0x0
51a0: ea00000d b 51dc <pthread_create+0x144>
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) <
51a4: e28d4028 add r4, sp, #40 ; 0x28
51a8: e2840008 add r0, r4, #8 ; 0x8
51ac: eb000fe6 bl 914c <_Timespec_To_ticks>
51b0: e1a05000 mov r5, r0
51b4: e2840010 add r0, r4, #16 ; 0x10
51b8: eb000fe3 bl 914c <_Timespec_To_ticks>
51bc: e1550000 cmp r5, r0
51c0: 3a00005d bcc 533c <pthread_create+0x2a4>
_Timespec_To_ticks( &schedparam.ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
51c4: e59d302c ldr r3, [sp, #44]
51c8: e2433001 sub r3, r3, #1 ; 0x1
51cc: e35300fd cmp r3, #253 ; 0xfd
51d0: 8a000059 bhi 533c <pthread_create+0x2a4>
51d4: e59f5178 ldr r5, [pc, #376] ; 5354 <pthread_create+0x2bc>
51d8: e3a04003 mov r4, #3 ; 0x3
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
51dc: e59fa174 ldr sl, [pc, #372] ; 5358 <pthread_create+0x2c0>
51e0: e59a0000 ldr r0, [sl]
51e4: eb000695 bl 6c40 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
51e8: e59f016c ldr r0, [pc, #364] ; 535c <pthread_create+0x2c4>
51ec: eb0008d8 bl 7554 <_Objects_Allocate>
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
51f0: e2507000 subs r7, r0, #0 ; 0x0
51f4: 0a000018 beq 525c <pthread_create+0x1c4>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
51f8: e59f314c ldr r3, [pc, #332] ; 534c <pthread_create+0x2b4>
51fc: e5933000 ldr r3, [r3]
5200: e3a0b001 mov fp, #1 ; 0x1
5204: e1a03b13 lsl r3, r3, fp
5208: e26920ff rsb r2, r9, #255 ; 0xff
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
520c: e3a09000 mov r9, #0 ; 0x0
status = _Thread_Initialize(
5210: e5961008 ldr r1, [r6, #8]
5214: e58d2004 str r2, [sp, #4]
5218: e58d400c str r4, [sp, #12]
521c: e58d5010 str r5, [sp, #16]
5220: e58d9000 str r9, [sp]
5224: e58db008 str fp, [sp, #8]
5228: e58d9014 str r9, [sp, #20]
522c: e58d9018 str r9, [sp, #24]
5230: e1530001 cmp r3, r1
5234: 31a03001 movcc r3, r1
5238: e59f011c ldr r0, [pc, #284] ; 535c <pthread_create+0x2c4>
523c: e1a01007 mov r1, r7
5240: e5962004 ldr r2, [r6, #4]
5244: eb000c37 bl 8328 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
5248: e1500009 cmp r0, r9
524c: 1a000006 bne 526c <pthread_create+0x1d4>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
5250: e1a01007 mov r1, r7
5254: e59f0100 ldr r0, [pc, #256] ; 535c <pthread_create+0x2c4>
5258: eb00098c bl 7890 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
525c: e59a0000 ldr r0, [sl]
5260: eb000692 bl 6cb0 <_API_Mutex_Unlock>
5264: e3a0000b mov r0, #11 ; 0xb
5268: ea000034 b 5340 <pthread_create+0x2a8>
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
526c: e5975108 ldr r5, [r7, #264]
api->Attributes = *the_attr;
5270: e1a0c006 mov ip, r6
5274: e8bc000f ldm ip!, {r0, r1, r2, r3}
5278: e1a0e005 mov lr, r5
527c: e8ae000f stmia lr!, {r0, r1, r2, r3}
5280: e8bc000f ldm ip!, {r0, r1, r2, r3}
5284: e8ae000f stmia lr!, {r0, r1, r2, r3}
5288: e8bc000f ldm ip!, {r0, r1, r2, r3}
528c: e8ae000f stmia lr!, {r0, r1, r2, r3}
5290: e89c0003 ldm ip, {r0, r1}
5294: e88e0003 stm lr, {r0, r1}
api->detachstate = the_attr->detachstate;
5298: e5963034 ldr r3, [r6, #52]
api->schedpolicy = schedpolicy;
529c: e585807c str r8, [r5, #124]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
52a0: e5853038 str r3, [r5, #56]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
52a4: e28de028 add lr, sp, #40 ; 0x28
52a8: e8be000f ldm lr!, {r0, r1, r2, r3}
52ac: e285c080 add ip, r5, #128 ; 0x80
52b0: e8ac000f stmia ip!, {r0, r1, r2, r3}
52b4: e89e0003 ldm lr, {r0, r1}
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
52b8: e5c7b075 strb fp, [r7, #117]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
52bc: e88c0003 stm ip, {r0, r1}
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
52c0: e59d2020 ldr r2, [sp, #32]
52c4: e1a0100b mov r1, fp
52c8: e59d301c ldr r3, [sp, #28]
52cc: e1a00007 mov r0, r7
52d0: e58d9000 str r9, [sp]
52d4: eb000ef0 bl 8e9c <_Thread_Start>
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
52d8: e3580003 cmp r8, #3 ; 0x3
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
52dc: e1a04000 mov r4, r0
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
52e0: 1a000005 bne 52fc <pthread_create+0x264>
_Watchdog_Insert_ticks(
52e4: e2850088 add r0, r5, #136 ; 0x88
52e8: eb000f97 bl 914c <_Timespec_To_ticks>
52ec: e285109c add r1, r5, #156 ; 0x9c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
52f0: e58500a8 str r0, [r5, #168]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
52f4: e59f0064 ldr r0, [pc, #100] ; 5360 <pthread_create+0x2c8>
52f8: eb001082 bl 9508 <_Watchdog_Insert>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
52fc: e3540000 cmp r4, #0 ; 0x0
5300: e59f4050 ldr r4, [pc, #80] ; 5358 <pthread_create+0x2c0>
5304: 1a000005 bne 5320 <pthread_create+0x288>
5308: e1a01007 mov r1, r7 <== NOT EXECUTED
530c: e59f0048 ldr r0, [pc, #72] ; 535c <pthread_create+0x2c4> <== NOT EXECUTED
5310: eb00095e bl 7890 <_Objects_Free> <== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
5314: e5940000 ldr r0, [r4] <== NOT EXECUTED
5318: eb000664 bl 6cb0 <_API_Mutex_Unlock> <== NOT EXECUTED
531c: ea000006 b 533c <pthread_create+0x2a4> <== NOT EXECUTED
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
5320: e5973008 ldr r3, [r7, #8]
5324: e59d2024 ldr r2, [sp, #36]
_RTEMS_Unlock_allocator();
5328: e5940000 ldr r0, [r4]
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
532c: e5823000 str r3, [r2]
_RTEMS_Unlock_allocator();
5330: eb00065e bl 6cb0 <_API_Mutex_Unlock>
5334: e3a00000 mov r0, #0 ; 0x0
5338: ea000000 b 5340 <pthread_create+0x2a8>
return 0;
533c: e3a00016 mov r0, #22 ; 0x16
}
5340: e28dd040 add sp, sp, #64 ; 0x40
5344: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000857c <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
857c: e92d4030 push {r4, r5, lr}
8580: e24dd008 sub sp, sp, #8 ; 0x8
8584: e1a05001 mov r5, r1
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _Thread_Get( thread, &location );
8588: e28d1004 add r1, sp, #4 ; 0x4
858c: eb000b15 bl b1e8 <_Thread_Get>
switch ( location ) {
8590: e59d4004 ldr r4, [sp, #4]
8594: e3540000 cmp r4, #0 ; 0x0
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _Thread_Get( thread, &location );
8598: e1a01000 mov r1, r0
switch ( location ) {
859c: 13a00003 movne r0, #3 ; 0x3
85a0: 1a00001a bne 8610 <pthread_join+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
85a4: e5910108 ldr r0, [r1, #264] <== NOT EXECUTED
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
85a8: e5903038 ldr r3, [r0, #56] <== NOT EXECUTED
85ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
85b0: 1a000002 bne 85c0 <pthread_join+0x44> <== NOT EXECUTED
_Thread_Enable_dispatch();
85b4: eb000b02 bl b1c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
85b8: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
85bc: ea000013 b 8610 <pthread_join+0x94> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
85c0: e59f3050 ldr r3, [pc, #80] ; 8618 <pthread_join+0x9c> <== NOT EXECUTED
85c4: e5932000 ldr r2, [r3] <== NOT EXECUTED
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
85c8: e1510002 cmp r1, r2 <== NOT EXECUTED
85cc: 1a000002 bne 85dc <pthread_join+0x60> <== NOT EXECUTED
_Thread_Enable_dispatch();
85d0: eb000afb bl b1c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
85d4: e3a0002d mov r0, #45 ; 0x2d <== NOT EXECUTED
85d8: ea00000c b 8610 <pthread_join+0x94> <== NOT EXECUTED
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;
85dc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
85e0: e580306c str r3, [r0, #108] <== NOT EXECUTED
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
85e4: e582d028 str sp, [r2, #40] <== NOT EXECUTED
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
85e8: e280003c add r0, r0, #60 ; 0x3c <== NOT EXECUTED
85ec: e1a01004 mov r1, r4 <== NOT EXECUTED
85f0: e59f2024 ldr r2, [pc, #36] ; 861c <pthread_join+0xa0> <== NOT EXECUTED
85f4: eb000c2d bl b6b0 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
_Thread_Enable_dispatch();
85f8: eb000af1 bl b1c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( value_ptr )
85fc: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
*value_ptr = return_pointer;
8600: 159d3000 ldrne r3, [sp] <== NOT EXECUTED
8604: 15853000 strne r3, [r5] <== NOT EXECUTED
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
_Thread_Enable_dispatch();
if ( value_ptr )
8608: 01a00005 moveq r0, r5 <== NOT EXECUTED
*value_ptr = return_pointer;
860c: 11a00004 movne r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
8610: e28dd008 add sp, sp, #8 ; 0x8
8614: e8bd8030 pop {r4, r5, pc}
0000410c <pthread_key_create>:
410c: e59f2100 ldr r2, [pc, #256] ; 4214 <pthread_key_create+0x108>
4110: e5923000 ldr r3, [r2]
4114: e2833001 add r3, r3, #1 ; 0x1
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
4118: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
411c: e5823000 str r3, [r2]
4120: e1a08000 mov r8, r0
4124: e1a04001 mov r4, r1
* _POSIX_Keys_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
4128: e59f00e8 ldr r0, [pc, #232] ; 4218 <pthread_key_create+0x10c>
412c: eb0008e0 bl 64b4 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
4130: e2506000 subs r6, r0, #0 ; 0x0
4134: 1a000002 bne 4144 <pthread_key_create+0x38>
_Thread_Enable_dispatch();
4138: eb000c09 bl 7164 <_Thread_Enable_dispatch>
413c: e3a0000b mov r0, #11 ; 0xb
4140: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return EAGAIN;
}
the_key->destructor = destructor;
4144: e5864014 str r4, [r6, #20]
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
4148: e59fa0cc ldr sl, [pc, #204] ; 421c <pthread_key_create+0x110>
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
414c: e1a07006 mov r7, r6
4150: e3a05001 mov r5, #1 ; 0x1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
4154: e79a3105 ldr r3, [sl, r5, lsl #2]
4158: e3530000 cmp r3, #0 ; 0x0
415c: 0a00001a beq 41cc <pthread_key_create+0xc0>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
4160: e5933004 ldr r3, [r3, #4]
4164: e1d341b0 ldrh r4, [r3, #16]
4168: e2844001 add r4, r4, #1 ; 0x1
416c: e1a04104 lsl r4, r4, #2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
4170: e1a00004 mov r0, r4
4174: eb001131 bl 8640 <_Workspace_Allocate>
if ( !table ) {
4178: e2503000 subs r3, r0, #0 ; 0x0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
417c: e1a02004 mov r2, r4
4180: e3a01000 mov r1, #0 ; 0x0
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
4184: 1a00000d bne 41c0 <pthread_key_create+0xb4>
4188: e2853005 add r3, r5, #5 ; 0x5
418c: e0864103 add r4, r6, r3, lsl #2
4190: ea000001 b 419c <pthread_key_create+0x90>
for ( --the_api;
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
4194: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
4198: eb001124 bl 8630 <_Workspace_Free> <== NOT EXECUTED
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
419c: e2555001 subs r5, r5, #1 ; 0x1
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
41a0: e2444004 sub r4, r4, #4 ; 0x4
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
41a4: 1afffffa bne 4194 <pthread_key_create+0x88>
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
41a8: e59f0068 ldr r0, [pc, #104] ; 4218 <pthread_key_create+0x10c>
41ac: e1a01006 mov r1, r6
41b0: eb00098e bl 67f0 <_Objects_Free>
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
41b4: eb000bea bl 7164 <_Thread_Enable_dispatch>
41b8: e3a0000c mov r0, #12 ; 0xc
41bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return ENOMEM;
}
the_key->Values[ the_api ] = table;
41c0: e587301c str r3, [r7, #28]
memset( table, '\0', bytes_to_allocate );
41c4: eb002235 bl caa0 <memset>
41c8: ea000000 b 41d0 <pthread_key_create+0xc4>
} else {
the_key->Values[ the_api ] = NULL;
41cc: e587301c str r3, [r7, #28]
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
41d0: e2855001 add r5, r5, #1 ; 0x1
* 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;
the_api <= OBJECTS_APIS_LAST;
41d4: e3550005 cmp r5, #5 ; 0x5
the_api++ ) {
41d8: e2877004 add r7, r7, #4 ; 0x4
* 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;
the_api <= OBJECTS_APIS_LAST;
41dc: 1affffdc bne 4154 <pthread_key_create+0x48>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
41e0: e59f3030 ldr r3, [pc, #48] ; 4218 <pthread_key_create+0x10c>
41e4: e593201c ldr r2, [r3, #28]
41e8: e1d630b8 ldrh r3, [r6, #8]
41ec: e5961008 ldr r1, [r6, #8]
41f0: e7826103 str r6, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
41f4: e3a04000 mov r4, #0 ; 0x0
}
}
the_key->is_active = TRUE;
41f8: e3a03001 mov r3, #1 ; 0x1
41fc: e586400c str r4, [r6, #12]
4200: e5c63010 strb r3, [r6, #16]
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
4204: e5881000 str r1, [r8]
_Thread_Enable_dispatch();
4208: eb000bd5 bl 7164 <_Thread_Enable_dispatch>
420c: e1a00004 mov r0, r4
return 0;
}
4210: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00017670 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
17670: e92d41f0 push {r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
17674: e2515000 subs r5, r1, #0 ; 0x0
int pthread_kill(
pthread_t thread,
int sig
)
{
17678: e24dd004 sub sp, sp, #4 ; 0x4
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
1767c: 0a000002 beq 1768c <pthread_kill+0x1c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
17680: e2458001 sub r8, r5, #1 ; 0x1
17684: e358001f cmp r8, #31 ; 0x1f
17688: 9a000002 bls 17698 <pthread_kill+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
1768c: ebffd628 bl cf34 <__errno>
17690: e3a03016 mov r3, #22 ; 0x16
17694: ea000025 b 17730 <pthread_kill+0xc0>
the_thread = _Thread_Get( thread, &location );
17698: e1a0100d mov r1, sp
1769c: ebffc162 bl 7c2c <_Thread_Get>
switch ( location ) {
176a0: e59d4000 ldr r4, [sp]
176a4: e3540000 cmp r4, #0 ; 0x0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
176a8: e1a06000 mov r6, r0
switch ( location ) {
176ac: 1a00001d bne 17728 <pthread_kill+0xb8>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
176b0: e59f3088 ldr r3, [pc, #136] ; 17740 <pthread_kill+0xd0>
176b4: e3a0200c mov r2, #12 ; 0xc
176b8: e0233592 mla r3, r2, r5, r3
176bc: e5933008 ldr r3, [r3, #8]
176c0: e3530001 cmp r3, #1 ; 0x1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
176c4: e5902108 ldr r2, [r0, #264]
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
176c8: 1a000002 bne 176d8 <pthread_kill+0x68>
_Thread_Enable_dispatch();
176cc: ebffc137 bl 7bb0 <_Thread_Enable_dispatch> <== NOT EXECUTED
176d0: e1a00004 mov r0, r4 <== NOT EXECUTED
176d4: ea000017 b 17738 <pthread_kill+0xc8> <== NOT EXECUTED
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
176d8: e59230c8 ldr r3, [r2, #200]
176dc: e3a07001 mov r7, #1 ; 0x1
176e0: e1833817 orr r3, r3, r7, lsl r8
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
176e4: e1a01005 mov r1, r5
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
176e8: e58230c8 str r3, [r2, #200]
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
176ec: e1a02004 mov r2, r4
176f0: ebffff97 bl 17554 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
176f4: e59f3048 ldr r3, [pc, #72] ; 17744 <pthread_kill+0xd4>
176f8: e5933000 ldr r3, [r3]
176fc: e3530000 cmp r3, #0 ; 0x0
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
17700: e5c67075 strb r7, [r6, #117]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
17704: 0a000004 beq 1771c <pthread_kill+0xac>
17708: e59f3038 ldr r3, [pc, #56] ; 17748 <pthread_kill+0xd8>
1770c: e5933000 ldr r3, [r3]
17710: e1560003 cmp r6, r3
_ISR_Signals_to_thread_executing = TRUE;
17714: 059f3030 ldreq r3, [pc, #48] ; 1774c <pthread_kill+0xdc>
17718: 05c37000 strbeq r7, [r3]
}
_Thread_Enable_dispatch();
1771c: ebffc123 bl 7bb0 <_Thread_Enable_dispatch>
17720: e3a00000 mov r0, #0 ; 0x0
17724: ea000003 b 17738 <pthread_kill+0xc8>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
17728: ebffd601 bl cf34 <__errno> <== NOT EXECUTED
1772c: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
17730: e5803000 str r3, [r0]
17734: e3e00000 mvn r0, #0 ; 0x0
}
17738: e28dd004 add sp, sp, #4 ; 0x4
1773c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00005778 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
5778: e92d4030 push {r4, r5, lr}
577c: e24dd004 sub sp, sp, #4 ; 0x4
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5780: e1a0100d mov r1, sp
5784: eb000030 bl 584c <_POSIX_Mutex_Get>
switch ( location ) {
5788: e59d5000 ldr r5, [sp]
578c: e3550000 cmp r5, #0 ; 0x0
)
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5790: e1a04000 mov r4, r0
switch ( location ) {
5794: 13a00016 movne r0, #22 ; 0x16
5798: 1a000011 bne 57e4 <pthread_mutex_destroy+0x6c>
/*
* XXX: There is an error for the mutex being locked
* or being in use by a condition variable.
*/
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
579c: e5943064 ldr r3, [r4, #100]
57a0: e3530000 cmp r3, #0 ; 0x0
57a4: 1a000002 bne 57b4 <pthread_mutex_destroy+0x3c>
_Thread_Enable_dispatch();
57a8: eb000d1a bl 8c18 <_Thread_Enable_dispatch> <== NOT EXECUTED
57ac: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED
57b0: ea00000b b 57e4 <pthread_mutex_destroy+0x6c> <== NOT EXECUTED
return EBUSY;
}
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
57b4: e59f0030 ldr r0, [pc, #48] ; 57ec <pthread_mutex_destroy+0x74>
57b8: e1a01004 mov r1, r4
57bc: eb000a0c bl 7ff4 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
57c0: e3a02016 mov r2, #22 ; 0x16
57c4: e2840014 add r0, r4, #20 ; 0x14
57c8: e1a01005 mov r1, r5
57cc: eb0007ee bl 778c <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
57d0: e59f0014 ldr r0, [pc, #20] ; 57ec <pthread_mutex_destroy+0x74>
57d4: e1a01004 mov r1, r4
57d8: eb000ab1 bl 82a4 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
57dc: eb000d0d bl 8c18 <_Thread_Enable_dispatch>
57e0: e1a00005 mov r0, r5
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
57e4: e28dd004 add sp, sp, #4 ; 0x4
57e8: e8bd8030 pop {r4, r5, pc}
000058a0 <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
58a0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
58a4: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
58a8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
58ac: 0a00000a beq 58dc <pthread_mutex_getprioceiling+0x3c> <== NOT EXECUTED
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
58b0: e1a0100d mov r1, sp <== NOT EXECUTED
58b4: ebffffe4 bl 584c <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
58b8: e59d4000 ldr r4, [sp] <== NOT EXECUTED
58bc: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
58c0: 1a000005 bne 58dc <pthread_mutex_getprioceiling+0x3c> <== NOT EXECUTED
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
58c4: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
58c8: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED
58cc: e5853000 str r3, [r5] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
58d0: eb000cd0 bl 8c18 <_Thread_Enable_dispatch> <== NOT EXECUTED
58d4: e1a00004 mov r0, r4 <== NOT EXECUTED
58d8: ea000000 b 58e0 <pthread_mutex_getprioceiling+0x40> <== NOT EXECUTED
return 0;
58dc: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
58e0: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
58e4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000058e8 <pthread_mutex_init>:
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
58e8: e59f3120 ldr r3, [pc, #288] ; 5a10 <pthread_mutex_init+0x128>
58ec: e3510000 cmp r1, #0 ; 0x0
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
58f0: e92d40f0 push {r4, r5, r6, r7, lr}
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
58f4: 11a04001 movne r4, r1
58f8: 01a04003 moveq r4, r3
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
58fc: e2507000 subs r7, r0, #0 ; 0x0
5900: 0a000040 beq 5a08 <pthread_mutex_init+0x120>
break;
}
}
#endif
if ( !the_attr->is_initialized )
5904: e5943000 ldr r3, [r4]
5908: e3530000 cmp r3, #0 ; 0x0
590c: 0a00003d beq 5a08 <pthread_mutex_init+0x120>
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
5910: e5943004 ldr r3, [r4, #4]
5914: e3530000 cmp r3, #0 ; 0x0
5918: 159f00f4 ldrne r0, [pc, #244] ; 5a14 <pthread_mutex_init+0x12c>
591c: 13a01068 movne r1, #104 ; 0x68
5920: 159f20f0 ldrne r2, [pc, #240] ; 5a18 <pthread_mutex_init+0x130>
5924: 159f30f0 ldrne r3, [pc, #240] ; 5a1c <pthread_mutex_init+0x134>
5928: 1bfff4c0 blne 2c30 <__assert_func>
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
592c: e594300c ldr r3, [r4, #12]
5930: e3530001 cmp r3, #1 ; 0x1
5934: 0a000005 beq 5950 <pthread_mutex_init+0x68>
5938: e3530002 cmp r3, #2 ; 0x2
593c: 0a000005 beq 5958 <pthread_mutex_init+0x70>
5940: e3530000 cmp r3, #0 ; 0x0
5944: 01a06003 moveq r6, r3
5948: 0a000003 beq 595c <pthread_mutex_init+0x74>
594c: ea00002d b 5a08 <pthread_mutex_init+0x120>
5950: e3a06002 mov r6, #2 ; 0x2
5954: ea000000 b 595c <pthread_mutex_init+0x74>
5958: e3a06003 mov r6, #3 ; 0x3
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
595c: e5943008 ldr r3, [r4, #8]
5960: e2433001 sub r3, r3, #1 ; 0x1
5964: e35300fd cmp r3, #253 ; 0xfd
5968: 8a000026 bhi 5a08 <pthread_mutex_init+0x120>
596c: e59f20ac ldr r2, [pc, #172] ; 5a20 <pthread_mutex_init+0x138>
5970: e5923000 ldr r3, [r2]
5974: e2833001 add r3, r3, #1 ; 0x1
5978: e5823000 str r3, [r2]
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
597c: e59f00a0 ldr r0, [pc, #160] ; 5a24 <pthread_mutex_init+0x13c>
5980: eb000978 bl 7f68 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
5984: e2505000 subs r5, r0, #0 ; 0x0
5988: 1a000002 bne 5998 <pthread_mutex_init+0xb0>
_Thread_Enable_dispatch();
598c: eb000ca1 bl 8c18 <_Thread_Enable_dispatch> <== NOT EXECUTED
5990: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED
5994: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
5998: e5943004 ldr r3, [r4, #4]
599c: e5853010 str r3, [r5, #16]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
59a0: e5943010 ldr r3, [r4, #16]
59a4: e3530000 cmp r3, #0 ; 0x0
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
59a8: 13a03000 movne r3, #0 ; 0x0
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
59ac: 03a03001 moveq r3, #1 ; 0x1
59b0: e5853054 str r3, [r5, #84]
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
59b4: e5943008 ldr r3, [r4, #8]
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
59b8: e3a01001 mov r1, #1 ; 0x1
the_mutex_attr->priority_ceiling =
59bc: e26330ff rsb r3, r3, #255 ; 0xff
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
59c0: e1a02001 mov r2, r1
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
59c4: e5853060 str r3, [r5, #96]
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
the_mutex_attr->only_owner_release = TRUE;
59c8: e5c51058 strb r1, [r5, #88]
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
59cc: e585605c str r6, [r5, #92]
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
59d0: e2851054 add r1, r5, #84 ; 0x54
59d4: e2850014 add r0, r5, #20 ; 0x14
59d8: eb00076c bl 7790 <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
59dc: e59f3040 ldr r3, [pc, #64] ; 5a24 <pthread_mutex_init+0x13c>
59e0: e5951008 ldr r1, [r5, #8]
59e4: e593201c ldr r2, [r3, #28]
59e8: e1d530b8 ldrh r3, [r5, #8]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
59ec: e3a04000 mov r4, #0 ; 0x0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
59f0: e7825103 str r5, [r2, r3, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
59f4: e585400c str r4, [r5, #12]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
59f8: e5871000 str r1, [r7]
_Thread_Enable_dispatch();
59fc: eb000c85 bl 8c18 <_Thread_Enable_dispatch>
5a00: e1a00004 mov r0, r4
5a04: e8bd80f0 pop {r4, r5, r6, r7, pc}
return 0;
5a08: e3a00016 mov r0, #22 ; 0x16
}
5a0c: e8bd80f0 pop {r4, r5, r6, r7, pc}
00005a9c <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
5a9c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
5aa0: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
5aa4: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5aa8: e1a06001 mov r6, r1 <== NOT EXECUTED
5aac: e1a05000 mov r5, r0 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
5ab0: 0a000016 beq 5b10 <pthread_mutex_setprioceiling+0x74> <== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
5ab4: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED
5ab8: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED
5abc: 8a000013 bhi 5b10 <pthread_mutex_setprioceiling+0x74> <== NOT EXECUTED
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
5ac0: ebffffd8 bl 5a28 <pthread_mutex_lock> <== NOT EXECUTED
if ( status )
5ac4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
5ac8: 1a000011 bne 5b14 <pthread_mutex_setprioceiling+0x78> <== NOT EXECUTED
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5acc: e1a00005 mov r0, r5 <== NOT EXECUTED
5ad0: e1a0100d mov r1, sp <== NOT EXECUTED
5ad4: ebffff5c bl 584c <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
5ad8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
5adc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
5ae0: 1a00000a bne 5b10 <pthread_mutex_setprioceiling+0x74> <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
5ae4: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
5ae8: e26620ff rsb r2, r6, #255 ; 0xff <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
5aec: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
5af0: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
5af4: e5873000 str r3, [r7] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
5af8: e5802060 str r2, [r0, #96] <== NOT EXECUTED
_CORE_mutex_Surrender(
5afc: e1a02004 mov r2, r4 <== NOT EXECUTED
5b00: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
5b04: eb000799 bl 7970 <_CORE_mutex_Surrender> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
5b08: eb000c42 bl 8c18 <_Thread_Enable_dispatch> <== NOT EXECUTED
5b0c: ea000000 b 5b14 <pthread_mutex_setprioceiling+0x78> <== NOT EXECUTED
return 0;
5b10: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5b14: e1a00004 mov r0, r4 <== NOT EXECUTED
5b18: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5b1c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00005b20 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
5b20: e92d4010 push {r4, lr} <== NOT EXECUTED
5b24: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5b28: e1a04000 mov r4, r0 <== NOT EXECUTED
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
5b2c: e1a00001 mov r0, r1 <== NOT EXECUTED
5b30: e1a0100d mov r1, sp <== NOT EXECUTED
5b34: eb000022 bl 5bc4 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
switch ( status ) {
5b38: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED
5b3c: 93a01000 movls r1, #0 ; 0x0 <== NOT EXECUTED
5b40: 9a000002 bls 5b50 <pthread_mutex_timedlock+0x30> <== NOT EXECUTED
5b44: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED
5b48: 13a01000 movne r1, #0 ; 0x0 <== NOT EXECUTED
5b4c: 03a01001 moveq r1, #1 ; 0x1 <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
5b50: e1a00004 mov r0, r4 <== NOT EXECUTED
5b54: e59d2000 ldr r2, [sp] <== NOT EXECUTED
5b58: ebffffb5 bl 5a34 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
5b5c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5b60: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000474c <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
474c: e92d40f0 push {r4, r5, r6, r7, lr}
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4750: e2507000 subs r7, r0, #0 ; 0x0
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
4754: e24dd00c sub sp, sp, #12 ; 0xc
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4758: 0a000023 beq 47ec <pthread_rwlock_init+0xa0>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
475c: e3510000 cmp r1, #0 ; 0x0
4760: 1a000003 bne 4774 <pthread_rwlock_init+0x28>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
4764: e1a0000d mov r0, sp <== NOT EXECUTED
4768: eb00028d bl 51a4 <pthread_rwlockattr_init> <== NOT EXECUTED
476c: e1a0400d mov r4, sp <== NOT EXECUTED
4770: e1a0100d mov r1, sp <== NOT EXECUTED
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
4774: e5913000 ldr r3, [r1]
4778: e3530000 cmp r3, #0 ; 0x0
477c: 0a00001a beq 47ec <pthread_rwlock_init+0xa0>
return EINVAL;
switch ( the_attr->process_shared ) {
4780: e5915004 ldr r5, [r1, #4]
4784: e3550000 cmp r5, #0 ; 0x0
4788: 1a000017 bne 47ec <pthread_rwlock_init+0xa0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
478c: e59f2064 ldr r2, [pc, #100] ; 47f8 <pthread_rwlock_init+0xac>
4790: e5923000 ldr r3, [r2]
4794: e2833001 add r3, r3, #1 ; 0x1
4798: e5823000 str r3, [r2]
* 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 *)
479c: e59f6058 ldr r6, [pc, #88] ; 47fc <pthread_rwlock_init+0xb0>
47a0: e1a00006 mov r0, r6
47a4: eb0009f4 bl 6f7c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
47a8: e2504000 subs r4, r0, #0 ; 0x0
47ac: 1a000002 bne 47bc <pthread_rwlock_init+0x70>
_Thread_Enable_dispatch();
47b0: eb000d1d bl 7c2c <_Thread_Enable_dispatch>
47b4: e3a0000b mov r0, #11 ; 0xb
47b8: ea00000c b 47f0 <pthread_rwlock_init+0xa4>
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
47bc: e2840010 add r0, r4, #16 ; 0x10
47c0: e28d1008 add r1, sp, #8 ; 0x8
47c4: eb00081b bl 6838 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47c8: e596301c ldr r3, [r6, #28]
47cc: e5941008 ldr r1, [r4, #8]
47d0: e1d420b8 ldrh r2, [r4, #8]
47d4: e7834102 str r4, [r3, r2, lsl #2]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
47d8: e584500c str r5, [r4, #12]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
47dc: e5871000 str r1, [r7]
_Thread_Enable_dispatch();
47e0: eb000d11 bl 7c2c <_Thread_Enable_dispatch>
47e4: e1a00005 mov r0, r5
47e8: ea000000 b 47f0 <pthread_rwlock_init+0xa4>
return 0;
47ec: e3a00016 mov r0, #22 ; 0x16
}
47f0: e28dd00c add sp, sp, #12 ; 0xc
47f4: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000486c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
486c: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4870: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4874: e24dd00c sub sp, sp, #12 ; 0xc
4878: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
487c: 0a000027 beq 4920 <pthread_rwlock_timedrdlock+0xb4>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4880: e28d1004 add r1, sp, #4 ; 0x4
4884: eb0019b1 bl af50 <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4888: e3500002 cmp r0, #2 ; 0x2
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
488c: e1a05000 mov r5, r0
switch (status) {
4890: 93a04000 movls r4, #0 ; 0x0
4894: 9a000002 bls 48a4 <pthread_rwlock_timedrdlock+0x38>
4898: e3500003 cmp r0, #3 ; 0x3
489c: 13a04000 movne r4, #0 ; 0x0
48a0: 03a04001 moveq r4, #1 ; 0x1
48a4: e59f0080 ldr r0, [pc, #128] ; 492c <pthread_rwlock_timedrdlock+0xc0>
48a8: e5961000 ldr r1, [r6]
48ac: e28d2008 add r2, sp, #8 ; 0x8
48b0: eb000ad9 bl 741c <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
48b4: e59d3008 ldr r3, [sp, #8]
48b8: e3530000 cmp r3, #0 ; 0x0
48bc: 1a000017 bne 4920 <pthread_rwlock_timedrdlock+0xb4>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
48c0: e58d3000 str r3, [sp]
48c4: e2800010 add r0, r0, #16 ; 0x10
48c8: e5961000 ldr r1, [r6]
48cc: e1a02004 mov r2, r4
48d0: e59d3004 ldr r3, [sp, #4]
48d4: eb0007df bl 6858 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
48d8: eb000cd3 bl 7c2c <_Thread_Enable_dispatch>
if ( !do_wait &&
48dc: e3540000 cmp r4, #0 ; 0x0
48e0: 1a000009 bne 490c <pthread_rwlock_timedrdlock+0xa0>
48e4: e59f3044 ldr r3, [pc, #68] ; 4930 <pthread_rwlock_timedrdlock+0xc4><== NOT EXECUTED
48e8: e5933000 ldr r3, [r3] <== NOT EXECUTED
48ec: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED
48f0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
48f4: 1a000004 bne 490c <pthread_rwlock_timedrdlock+0xa0> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
48f8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
48fc: 0a000007 beq 4920 <pthread_rwlock_timedrdlock+0xb4> <== NOT EXECUTED
4900: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
4904: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
4908: 9a000005 bls 4924 <pthread_rwlock_timedrdlock+0xb8> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
490c: e59f301c ldr r3, [pc, #28] ; 4930 <pthread_rwlock_timedrdlock+0xc4>
4910: e5933000 ldr r3, [r3]
4914: e5930034 ldr r0, [r3, #52]
4918: eb000037 bl 49fc <_POSIX_RWLock_Translate_core_RWLock_return_code>
491c: ea000000 b 4924 <pthread_rwlock_timedrdlock+0xb8>
4920: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4924: e28dd00c add sp, sp, #12 ; 0xc
4928: e8bd8070 pop {r4, r5, r6, pc}
00004934 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4934: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4938: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
493c: e24dd00c sub sp, sp, #12 ; 0xc
4940: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4944: 0a000027 beq 49e8 <pthread_rwlock_timedwrlock+0xb4>
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4948: e28d1004 add r1, sp, #4 ; 0x4
494c: eb00197f bl af50 <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4950: e3500002 cmp r0, #2 ; 0x2
* So we check the abstime provided, and hold on to whether it
* is valid or not. If it isn't correct and in the future,
* then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
4954: e1a05000 mov r5, r0
switch (status) {
4958: 93a04000 movls r4, #0 ; 0x0
495c: 9a000002 bls 496c <pthread_rwlock_timedwrlock+0x38>
4960: e3500003 cmp r0, #3 ; 0x3
4964: 13a04000 movne r4, #0 ; 0x0
4968: 03a04001 moveq r4, #1 ; 0x1
496c: e59f0080 ldr r0, [pc, #128] ; 49f4 <pthread_rwlock_timedwrlock+0xc0>
4970: e5961000 ldr r1, [r6]
4974: e28d2008 add r2, sp, #8 ; 0x8
4978: eb000aa7 bl 741c <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
497c: e59d3008 ldr r3, [sp, #8]
4980: e3530000 cmp r3, #0 ; 0x0
4984: 1a000017 bne 49e8 <pthread_rwlock_timedwrlock+0xb4>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
4988: e58d3000 str r3, [sp]
498c: e2800010 add r0, r0, #16 ; 0x10
4990: e5961000 ldr r1, [r6]
4994: e1a02004 mov r2, r4
4998: e59d3004 ldr r3, [sp, #4]
499c: eb0007e2 bl 692c <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
49a0: eb000ca1 bl 7c2c <_Thread_Enable_dispatch>
if ( !do_wait &&
49a4: e3540000 cmp r4, #0 ; 0x0
49a8: 1a000009 bne 49d4 <pthread_rwlock_timedwrlock+0xa0>
49ac: e59f3044 ldr r3, [pc, #68] ; 49f8 <pthread_rwlock_timedwrlock+0xc4><== NOT EXECUTED
49b0: e5933000 ldr r3, [r3] <== NOT EXECUTED
49b4: e5933034 ldr r3, [r3, #52] <== NOT EXECUTED
49b8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
49bc: 1a000004 bne 49d4 <pthread_rwlock_timedwrlock+0xa0> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
49c0: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
49c4: 0a000007 beq 49e8 <pthread_rwlock_timedwrlock+0xb4> <== NOT EXECUTED
49c8: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
49cc: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
49d0: 9a000005 bls 49ec <pthread_rwlock_timedwrlock+0xb8> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
49d4: e59f301c ldr r3, [pc, #28] ; 49f8 <pthread_rwlock_timedwrlock+0xc4>
49d8: e5933000 ldr r3, [r3]
49dc: e5930034 ldr r0, [r3, #52]
49e0: eb000005 bl 49fc <_POSIX_RWLock_Translate_core_RWLock_return_code>
49e4: ea000000 b 49ec <pthread_rwlock_timedwrlock+0xb8>
49e8: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
49ec: e28dd00c add sp, sp, #12 ; 0xc
49f0: e8bd8070 pop {r4, r5, r6, pc}
0000430c <pthread_setcancelstate>:
* 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() )
430c: e59f30a4 ldr r3, [pc, #164] ; 43b8 <pthread_setcancelstate+0xac>
4310: e5933000 ldr r3, [r3]
4314: e3530000 cmp r3, #0 ; 0x0
int pthread_setcancelstate(
int state,
int *oldstate
)
{
4318: e92d4010 push {r4, lr}
431c: e1a0c001 mov ip, r1
* 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() )
4320: 13a00047 movne r0, #71 ; 0x47
4324: 18bd8010 popne {r4, pc}
return EPROTO;
if ( !oldstate )
4328: e3510000 cmp r1, #0 ; 0x0
432c: 0a00001f beq 43b0 <pthread_setcancelstate+0xa4>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
4330: e3500001 cmp r0, #1 ; 0x1
4334: 8a00001d bhi 43b0 <pthread_setcancelstate+0xa4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4338: e59f107c ldr r1, [pc, #124] ; 43bc <pthread_setcancelstate+0xb0>
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
433c: e59f207c ldr r2, [pc, #124] ; 43c0 <pthread_setcancelstate+0xb4>
4340: e5913000 ldr r3, [r1]
4344: e5922000 ldr r2, [r2]
4348: e2833001 add r3, r3, #1 ; 0x1
434c: e5813000 str r3, [r1]
4350: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
4354: e59230cc ldr r3, [r2, #204]
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4358: e3500000 cmp r0, #0 ; 0x0
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
435c: e58c3000 str r3, [ip]
thread_support->cancelability_state = state;
4360: e58200cc str r0, [r2, #204]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4364: 1a000006 bne 4384 <pthread_setcancelstate+0x78>
4368: e59230d0 ldr r3, [r2, #208]
436c: e3530001 cmp r3, #1 ; 0x1
4370: 1a000003 bne 4384 <pthread_setcancelstate+0x78>
4374: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED
4378: e2534000 subs r4, r3, #0 ; 0x0 <== NOT EXECUTED
437c: 13a04001 movne r4, #1 ; 0x1 <== NOT EXECUTED
4380: ea000000 b 4388 <pthread_setcancelstate+0x7c> <== NOT EXECUTED
4384: e3a04000 mov r4, #0 ; 0x0
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4388: eb000a22 bl 6c18 <_Thread_Enable_dispatch>
if ( cancel )
438c: e3540000 cmp r4, #0 ; 0x0
4390: 01a00004 moveq r0, r4
4394: 08bd8010 popeq {r4, pc}
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
4398: e59f3020 ldr r3, [pc, #32] ; 43c0 <pthread_setcancelstate+0xb4><== NOT EXECUTED
439c: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
43a0: e5930000 ldr r0, [r3] <== NOT EXECUTED
43a4: ebfffed7 bl 3f08 <_POSIX_Thread_Exit> <== NOT EXECUTED
43a8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
43ac: e8bd8010 pop {r4, pc} <== NOT EXECUTED
43b0: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
return 0;
}
43b4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000043c4 <pthread_setcanceltype>:
* 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() )
43c4: e59f30a4 ldr r3, [pc, #164] ; 4470 <pthread_setcanceltype+0xac>
43c8: e5933000 ldr r3, [r3]
43cc: e3530000 cmp r3, #0 ; 0x0
int pthread_setcanceltype(
int type,
int *oldtype
)
{
43d0: e92d4010 push {r4, lr}
43d4: e1a0c001 mov ip, r1
* 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() )
43d8: 13a00047 movne r0, #71 ; 0x47
43dc: 18bd8010 popne {r4, pc}
return EPROTO;
if ( !oldtype )
43e0: e3510000 cmp r1, #0 ; 0x0
43e4: 0a00001f beq 4468 <pthread_setcanceltype+0xa4>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
43e8: e3500001 cmp r0, #1 ; 0x1
43ec: 8a00001d bhi 4468 <pthread_setcanceltype+0xa4>
43f0: e59f107c ldr r1, [pc, #124] ; 4474 <pthread_setcanceltype+0xb0>
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
43f4: e59f207c ldr r2, [pc, #124] ; 4478 <pthread_setcanceltype+0xb4>
43f8: e5913000 ldr r3, [r1]
43fc: e5922000 ldr r2, [r2]
4400: e2833001 add r3, r3, #1 ; 0x1
4404: e5813000 str r3, [r1]
4408: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
440c: e59230d0 ldr r3, [r2, #208]
4410: e58c3000 str r3, [ip]
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4414: e59230cc ldr r3, [r2, #204]
4418: e3530000 cmp r3, #0 ; 0x0
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
441c: e58200d0 str r0, [r2, #208]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4420: 1a000005 bne 443c <pthread_setcanceltype+0x78>
4424: e3500001 cmp r0, #1 ; 0x1
4428: 1a000003 bne 443c <pthread_setcanceltype+0x78>
442c: e59230d4 ldr r3, [r2, #212]
4430: e2534000 subs r4, r3, #0 ; 0x0
4434: 13a04001 movne r4, #1 ; 0x1
4438: ea000000 b 4440 <pthread_setcanceltype+0x7c>
443c: e3a04000 mov r4, #0 ; 0x0
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4440: eb0009f4 bl 6c18 <_Thread_Enable_dispatch>
if ( cancel )
4444: e3540000 cmp r4, #0 ; 0x0
4448: 01a00004 moveq r0, r4
444c: 08bd8010 popeq {r4, pc}
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
4450: e59f3020 ldr r3, [pc, #32] ; 4478 <pthread_setcanceltype+0xb4><== NOT EXECUTED
4454: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
4458: e5930000 ldr r0, [r3] <== NOT EXECUTED
445c: ebfffea9 bl 3f08 <_POSIX_Thread_Exit> <== NOT EXECUTED
4460: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
4464: e8bd8010 pop {r4, pc} <== NOT EXECUTED
4468: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
return 0;
}
446c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000063a0 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
63a0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Check all the parameters
*/
if ( !param )
63a4: e2526000 subs r6, r2, #0 ; 0x0
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
63a8: e24dd004 sub sp, sp, #4 ; 0x4
63ac: e1a05000 mov r5, r0
63b0: e1a0a001 mov sl, r1
/*
* Check all the parameters
*/
if ( !param )
63b4: 0a000051 beq 6500 <pthread_setschedparam+0x160>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
63b8: e5963000 ldr r3, [r6]
63bc: e2433001 sub r3, r3, #1 ; 0x1
63c0: e35300fd cmp r3, #253 ; 0xfd
63c4: 8a00004d bhi 6500 <pthread_setschedparam+0x160>
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
63c8: e3510003 cmp r1, #3 ; 0x3
63cc: 979ff101 ldrls pc, [pc, r1, lsl #2]
63d0: ea00004a b 6500 <pthread_setschedparam+0x160>
63d4: 000063f0 .word 0x000063f0
63d8: 000063e4 .word 0x000063e4
63dc: 000063f8 .word 0x000063f8
63e0: 00006404 .word 0x00006404
63e4: e3a07000 mov r7, #0 ; 0x0
63e8: e1a08007 mov r8, r7
63ec: ea000011 b 6438 <pthread_setschedparam+0x98>
63f0: e3a07001 mov r7, #1 ; 0x1
63f4: ea000000 b 63fc <pthread_setschedparam+0x5c>
63f8: e3a07002 mov r7, #2 ; 0x2
63fc: e3a08000 mov r8, #0 ; 0x0
6400: ea00000c b 6438 <pthread_setschedparam+0x98>
case SCHED_SPORADIC:
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
budget_callout = _POSIX_Threads_Sporadic_budget_callout;
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
6404: e2860008 add r0, r6, #8 ; 0x8
6408: eb000db9 bl 9af4 <_Timespec_To_ticks>
640c: e1a04000 mov r4, r0
6410: e2860010 add r0, r6, #16 ; 0x10
6414: eb000db6 bl 9af4 <_Timespec_To_ticks>
6418: e1540000 cmp r4, r0
641c: 3a000037 bcc 6500 <pthread_setschedparam+0x160>
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
6420: e5963004 ldr r3, [r6, #4]
6424: e2433001 sub r3, r3, #1 ; 0x1
6428: e35300fd cmp r3, #253 ; 0xfd
642c: 8a000033 bhi 6500 <pthread_setschedparam+0x160>
6430: e59f80d4 ldr r8, [pc, #212] ; 650c <pthread_setschedparam+0x16c>
6434: e3a07003 mov r7, #3 ; 0x3
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
6438: e1a01005 mov r1, r5
643c: e59f00cc ldr r0, [pc, #204] ; 6510 <pthread_setschedparam+0x170>
6440: e1a0200d mov r2, sp
6444: eb0007ef bl 8408 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
6448: e59d3000 ldr r3, [sp]
644c: e3530000 cmp r3, #0 ; 0x0
6450: e1a05000 mov r5, r0
6454: 13a00003 movne r0, #3 ; 0x3
6458: 1a000029 bne 6504 <pthread_setschedparam+0x164>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
645c: e5954108 ldr r4, [r5, #264]
if ( api->schedpolicy == SCHED_SPORADIC )
6460: e594307c ldr r3, [r4, #124]
6464: e3530003 cmp r3, #3 ; 0x3
(void) _Watchdog_Remove( &api->Sporadic_timer );
6468: 0284009c addeq r0, r4, #156 ; 0x9c
646c: 0b000eeb bleq a020 <_Watchdog_Remove>
api->schedpolicy = policy;
6470: e584a07c str sl, [r4, #124]
api->schedparam = *param;
6474: e1a0e006 mov lr, r6
6478: e8be000f ldm lr!, {r0, r1, r2, r3}
647c: e284c080 add ip, r4, #128 ; 0x80
6480: e8ac000f stmia ip!, {r0, r1, r2, r3}
6484: e89e0003 ldm lr, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
6488: e35a0000 cmp sl, #0 ; 0x0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
648c: e88c0003 stm ip, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
6490: e585707c str r7, [r5, #124]
the_thread->budget_callout = budget_callout;
6494: e5858080 str r8, [r5, #128]
switch ( api->schedpolicy ) {
6498: ba000015 blt 64f4 <pthread_setschedparam+0x154>
649c: e35a0002 cmp sl, #2 ; 0x2
64a0: da000002 ble 64b0 <pthread_setschedparam+0x110>
64a4: e35a0003 cmp sl, #3 ; 0x3
64a8: 1a000011 bne 64f4 <pthread_setschedparam+0x154>
64ac: ea000009 b 64d8 <pthread_setschedparam+0x138>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
64b0: e59f305c ldr r3, [pc, #92] ; 6514 <pthread_setschedparam+0x174>
64b4: e5941080 ldr r1, [r4, #128]
64b8: e5933000 ldr r3, [r3]
64bc: e26110ff rsb r1, r1, #255 ; 0xff
64c0: e5853078 str r3, [r5, #120]
the_thread->real_priority =
64c4: e5851018 str r1, [r5, #24]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
64c8: e1a00005 mov r0, r5
64cc: e3a02001 mov r2, #1 ; 0x1
64d0: eb000868 bl 8678 <_Thread_Change_priority>
64d4: ea000006 b 64f4 <pthread_setschedparam+0x154>
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
64d8: e5943080 ldr r3, [r4, #128]
_Watchdog_Remove( &api->Sporadic_timer );
64dc: e284009c add r0, r4, #156 ; 0x9c
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
64e0: e5843098 str r3, [r4, #152]
_Watchdog_Remove( &api->Sporadic_timer );
64e4: eb000ecd bl a020 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
64e8: e1a01005 mov r1, r5
64ec: e3a00000 mov r0, #0 ; 0x0
64f0: ebffff87 bl 6314 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
64f4: eb0009c7 bl 8c18 <_Thread_Enable_dispatch>
64f8: e3a00000 mov r0, #0 ; 0x0
64fc: ea000000 b 6504 <pthread_setschedparam+0x164>
return 0;
6500: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
6504: e28dd004 add sp, sp, #4 ; 0x4
6508: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00003ac8 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
3ac8: e92d4010 push {r4, lr}
if ( !time_buffer )
3acc: e2514000 subs r4, r1, #0 ; 0x0
3ad0: 03a00009 moveq r0, #9 ; 0x9
3ad4: 08bd8010 popeq {r4, pc}
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
3ad8: e3500004 cmp r0, #4 ; 0x4
3adc: 979ff100 ldrls pc, [pc, r0, lsl #2]
3ae0: ea000004 b 3af8 <rtems_clock_get+0x30>
3ae4: 00003b00 .word 0x00003b00
3ae8: 00003b0c .word 0x00003b0c
3aec: 00003b18 .word 0x00003b18 <== NOT EXECUTED
3af0: 00003b20 .word 0x00003b20 <== NOT EXECUTED
3af4: 00003b30 .word 0x00003b30 <== NOT EXECUTED
3af8: e3a0000a mov r0, #10 ; 0xa
3afc: e8bd8010 pop {r4, pc}
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3b00: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3b04: e8bd4010 pop {r4, lr}
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3b08: ea000025 b 3ba4 <rtems_clock_get_tod>
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3b0c: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3b10: e8bd4010 pop {r4, lr}
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3b14: ea000008 b 3b3c <rtems_clock_get_seconds_since_epoch>
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
3b18: eb00001d bl 3b94 <rtems_clock_get_ticks_since_boot>
3b1c: ea000000 b 3b24 <rtems_clock_get+0x5c>
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
3b20: eb000013 bl 3b74 <rtems_clock_get_ticks_per_second>
3b24: e5840000 str r0, [r4]
3b28: e3a00000 mov r0, #0 ; 0x0
3b2c: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3b30: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3b34: e8bd4010 pop {r4, lr}
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3b38: ea00004b b 3c6c <rtems_clock_get_tod_timeval>
00003b74 <rtems_clock_get_ticks_per_second>:
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>
rtems_interval rtems_clock_get_ticks_per_second(void)
{
3b74: e59f3010 ldr r3, [pc, #16] ; 3b8c <rtems_clock_get_ticks_per_second+0x18><== NOT EXECUTED
3b78: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3b7c: e5931000 ldr r1, [r3] <== NOT EXECUTED
3b80: e59f0008 ldr r0, [pc, #8] ; 3b90 <rtems_clock_get_ticks_per_second+0x1c><== NOT EXECUTED
3b84: eb00394e bl 120c4 <__aeabi_uidiv> <== NOT EXECUTED
return TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick;
}
3b88: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00009c18 <rtems_debug_disable>:
void rtems_debug_disable (
rtems_debug_control to_be_disabled
)
{
_Debug_Level &= ~to_be_disabled;
9c18: e59f200c ldr r2, [pc, #12] ; 9c2c <rtems_debug_disable+0x14><== NOT EXECUTED
9c1c: e5923000 ldr r3, [r2] <== NOT EXECUTED
9c20: e1c33000 bic r3, r3, r0 <== NOT EXECUTED
9c24: e5823000 str r3, [r2] <== NOT EXECUTED
}
9c28: e12fff1e bx lr <== NOT EXECUTED
00006d8c <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)
{
6d8c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
6d90: e2507000 subs r7, r0, #0 ; 0x0
6d94: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return;
6d98: e59f6054 ldr r6, [pc, #84] ; 6df4 <rtems_iterate_over_all_threads+0x68>
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
6d9c: e2868010 add r8, r6, #16 ; 0x10
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
6da0: e5963004 ldr r3, [r6, #4]
6da4: e3530000 cmp r3, #0 ; 0x0
6da8: 0a00000d beq 6de4 <rtems_iterate_over_all_threads+0x58>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
6dac: e5935004 ldr r5, [r3, #4]
if ( information ) {
6db0: e3550000 cmp r5, #0 ; 0x0
6db4: 13a04001 movne r4, #1 ; 0x1
6db8: 1a000006 bne 6dd8 <rtems_iterate_over_all_threads+0x4c>
6dbc: ea000008 b 6de4 <rtems_iterate_over_all_threads+0x58> <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
6dc0: e595301c ldr r3, [r5, #28]
6dc4: e7933104 ldr r3, [r3, r4, lsl #2]
if ( !the_thread )
6dc8: e2530000 subs r0, r3, #0 ; 0x0
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
6dcc: e2844001 add r4, r4, #1 ; 0x1
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
(*routine)(the_thread);
6dd0: 11a0e00f movne lr, pc
6dd4: 112fff17 bxne r7
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
6dd8: e1d531b0 ldrh r3, [r5, #16]
6ddc: e1540003 cmp r4, r3
6de0: 9afffff6 bls 6dc0 <rtems_iterate_over_all_threads+0x34>
6de4: e2866004 add r6, r6, #4 ; 0x4
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
6de8: e1560008 cmp r6, r8
6dec: 1affffeb bne 6da0 <rtems_iterate_over_all_threads+0x14>
6df0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000b6f0 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
b6f0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
b6f4: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
b6f8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
b6fc: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
b700: 0a000013 beq b754 <rtems_rate_monotonic_get_statistics+0x64><== NOT EXECUTED
b704: e1a01000 mov r1, r0 <== NOT EXECUTED
b708: e1a0200d mov r2, sp <== NOT EXECUTED
b70c: e59f0048 ldr r0, [pc, #72] ; b75c <rtems_rate_monotonic_get_statistics+0x6c><== NOT EXECUTED
b710: ebffef97 bl 7574 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
b714: e59d5000 ldr r5, [sp] <== NOT EXECUTED
b718: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
b71c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
b720: 1a00000b bne b754 <rtems_rate_monotonic_get_statistics+0x64><== NOT EXECUTED
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
b724: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED
b728: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
b72c: e1a0e004 mov lr, r4 <== NOT EXECUTED
b730: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
b734: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
b738: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
b73c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
b740: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
b744: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED
b748: e88e0003 stm lr, {r0, r1} <== NOT EXECUTED
_Thread_Enable_dispatch();
b74c: ebfff1ae bl 7e0c <_Thread_Enable_dispatch> <== NOT EXECUTED
b750: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
b754: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
b758: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000b760 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
b760: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
b764: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
b768: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
b76c: 03a00009 moveq r0, #9 ; 0x9
b770: 0a000021 beq b7fc <rtems_rate_monotonic_get_status+0x9c>
b774: e1a01000 mov r1, r0
b778: e28d2008 add r2, sp, #8 ; 0x8
b77c: e59f0080 ldr r0, [pc, #128] ; b804 <rtems_rate_monotonic_get_status+0xa4>
b780: ebffef7b bl 7574 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
b784: e59d3008 ldr r3, [sp, #8]
b788: e3530000 cmp r3, #0 ; 0x0
b78c: e1a06000 mov r6, r0
b790: 13a00004 movne r0, #4 ; 0x4
b794: 1a000018 bne b7fc <rtems_rate_monotonic_get_status+0x9c>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
b798: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED
b79c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
b7a0: 01a02003 moveq r2, r3 <== NOT EXECUTED
b7a4: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED
status->state = the_period->state;
b7a8: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
b7ac: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
b7b0: e885000c stm r5, {r2, r3} <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
status->executed_since_last_period.tv_nsec = 0;
b7b4: 05853014 streq r3, [r5, #20] <== NOT EXECUTED
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
b7b8: 05853008 streq r3, [r5, #8] <== NOT EXECUTED
status->since_last_period.tv_nsec = 0;
b7bc: 0585300c streq r3, [r5, #12] <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
b7c0: 05853010 streq r3, [r5, #16] <== NOT EXECUTED
b7c4: 0a00000a beq b7f4 <rtems_rate_monotonic_get_status+0x94> <== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
b7c8: e1a0000d mov r0, sp <== NOT EXECUTED
b7cc: ebffed10 bl 6c14 <_TOD_Get_uptime> <== NOT EXECUTED
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
b7d0: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED
b7d4: e1a0100d mov r1, sp <== NOT EXECUTED
b7d8: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED
b7dc: ebfff5b7 bl 8ec0 <_Timespec_Subtract> <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
b7e0: e1a0100d mov r1, sp <== NOT EXECUTED
b7e4: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED
b7e8: e59f0018 ldr r0, [pc, #24] ; b808 <rtems_rate_monotonic_get_status+0xa8><== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
b7ec: e1a0400d mov r4, sp <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
b7f0: ebfff5b2 bl 8ec0 <_Timespec_Subtract> <== NOT EXECUTED
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
b7f4: ebfff184 bl 7e0c <_Thread_Enable_dispatch> <== NOT EXECUTED
b7f8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
b7fc: e28dd00c add sp, sp, #12 ; 0xc
b800: e8bd8070 pop {r4, r5, r6, pc}
000057d0 <rtems_rate_monotonic_report_statistics>:
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
57d0: e59f1004 ldr r1, [pc, #4] ; 57dc <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
57d4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
57d8: eaffff79 b 55c4 <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
000055c4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
55c4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
55c8: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
55cc: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
55d0: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
55d4: 0a000071 beq 57a0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
55d8: e59f11c8 ldr r1, [pc, #456] ; 57a8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e4><== NOT EXECUTED
55dc: e1a0e00f mov lr, pc <== NOT EXECUTED
55e0: e12fff15 bx r5 <== NOT EXECUTED
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
55e4: e59f11c0 ldr r1, [pc, #448] ; 57ac <rtems_rate_monotonic_report_statistics_with_plugin+0x1e8><== NOT EXECUTED
55e8: e1a00006 mov r0, r6 <== NOT EXECUTED
55ec: e1a0e00f mov lr, pc <== NOT EXECUTED
55f0: e12fff15 bx r5 <== NOT EXECUTED
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
55f4: e59f11b4 ldr r1, [pc, #436] ; 57b0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
55f8: e1a00006 mov r0, r6 <== NOT EXECUTED
55fc: e1a0e00f mov lr, pc <== NOT EXECUTED
5600: e12fff15 bx r5 <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
5604: e59f11a8 ldr r1, [pc, #424] ; 57b4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
5608: e1a00006 mov r0, r6 <== NOT EXECUTED
560c: e1a0e00f mov lr, pc <== NOT EXECUTED
5610: e12fff15 bx r5 <== NOT EXECUTED
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
5614: e1a00006 mov r0, r6 <== NOT EXECUTED
5618: e59f1198 ldr r1, [pc, #408] ; 57b8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f4><== NOT EXECUTED
561c: e1a0e00f mov lr, pc <== NOT EXECUTED
5620: e12fff15 bx r5 <== NOT EXECUTED
/*
* 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 ;
5624: e59f3190 ldr r3, [pc, #400] ; 57bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
5628: e28d8010 add r8, sp, #16 ; 0x10 <== NOT EXECUTED
/*
* 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 ;
562c: e5937008 ldr r7, [r3, #8] <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5630: e2889018 add r9, r8, #24 ; 0x18 <== NOT EXECUTED
5634: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
5638: e288a030 add sl, r8, #48 ; 0x30 <== NOT EXECUTED
563c: ea000051 b 5788 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c4><== NOT EXECUTED
* 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 );
5640: eb00182a bl b6f0 <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
5644: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
5648: 1a00004d bne 5784 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c0><== NOT EXECUTED
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
564c: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED
5650: e1a00007 mov r0, r7 <== NOT EXECUTED
5654: eb001841 bl b760 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
5658: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED
565c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
5660: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
5664: 128d206b addne r2, sp, #107 ; 0x6b <== NOT EXECUTED
5668: 13a01005 movne r1, #5 ; 0x5 <== NOT EXECUTED
566c: 1b0000b4 blne 5944 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
5670: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5674: e58d3000 str r3, [sp] <== NOT EXECUTED
5678: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
567c: e1a02007 mov r2, r7 <== NOT EXECUTED
5680: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
5684: e59f1134 ldr r1, [pc, #308] ; 57c0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1fc><== NOT EXECUTED
5688: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED
568c: e1a00006 mov r0, r6 <== NOT EXECUTED
5690: e1a0e00f mov lr, pc <== NOT EXECUTED
5694: e12fff15 bx r5 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5698: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
569c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
56a0: e1a0200b mov r2, fp <== NOT EXECUTED
56a4: e1a00009 mov r0, r9 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
56a8: 1a000004 bne 56c0 <rtems_rate_monotonic_report_statistics_with_plugin+0xfc><== NOT EXECUTED
(*print)( context, "\n" );
56ac: e1a00006 mov r0, r6 <== NOT EXECUTED
56b0: e59f110c ldr r1, [pc, #268] ; 57c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
56b4: e1a0e00f mov lr, pc <== NOT EXECUTED
56b8: e12fff15 bx r5 <== NOT EXECUTED
56bc: ea000030 b 5784 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c0><== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
56c0: eb000dc5 bl 8ddc <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
56c4: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
56c8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
56cc: eb0040a4 bl 15964 <__aeabi_idiv> <== NOT EXECUTED
56d0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
56d4: e1a04000 mov r4, r0 <== NOT EXECUTED
56d8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
56dc: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED
56e0: e58d3000 str r3, [sp] <== NOT EXECUTED
56e4: eb00409e bl 15964 <__aeabi_idiv> <== NOT EXECUTED
56e8: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED
56ec: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
56f0: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
56f4: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
56f8: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
56fc: eb004098 bl 15964 <__aeabi_idiv> <== NOT EXECUTED
5700: e1a03004 mov r3, r4 <== NOT EXECUTED
5704: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5708: e59f10b8 ldr r1, [pc, #184] ; 57c8 <rtems_rate_monotonic_report_statistics_with_plugin+0x204><== NOT EXECUTED
570c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
5710: e1a00006 mov r0, r6 <== NOT EXECUTED
5714: e1a0e00f mov lr, pc <== NOT EXECUTED
5718: e12fff15 bx r5 <== NOT EXECUTED
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
571c: e1a0200b mov r2, fp <== NOT EXECUTED
5720: e1a0000a mov r0, sl <== NOT EXECUTED
5724: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
5728: eb000dab bl 8ddc <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
572c: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
5730: e59d0034 ldr r0, [sp, #52] <== NOT EXECUTED
5734: eb00408a bl 15964 <__aeabi_idiv> <== NOT EXECUTED
5738: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED
573c: e1a04000 mov r4, r0 <== NOT EXECUTED
5740: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
5744: e59d003c ldr r0, [sp, #60] <== NOT EXECUTED
5748: e58d3000 str r3, [sp] <== NOT EXECUTED
574c: eb004084 bl 15964 <__aeabi_idiv> <== NOT EXECUTED
5750: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED
5754: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
5758: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
575c: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5760: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
5764: eb00407e bl 15964 <__aeabi_idiv> <== NOT EXECUTED
5768: e1a03004 mov r3, r4 <== NOT EXECUTED
576c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5770: e59f1054 ldr r1, [pc, #84] ; 57cc <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== NOT EXECUTED
5774: e1a00006 mov r0, r6 <== NOT EXECUTED
5778: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED
577c: e1a0e00f mov lr, pc <== NOT EXECUTED
5780: e12fff15 bx r5 <== NOT EXECUTED
* 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++ ) {
5784: e2877001 add r7, r7, #1 ; 0x1 <== NOT EXECUTED
/*
* 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 ;
5788: e59f202c ldr r2, [pc, #44] ; 57bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NOT EXECUTED
578c: e592300c ldr r3, [r2, #12] <== NOT EXECUTED
5790: e1570003 cmp r7, r3 <== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
5794: e1a00007 mov r0, r7 <== NOT EXECUTED
5798: e1a01008 mov r1, r8 <== NOT EXECUTED
/*
* 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 ;
579c: 9affffa7 bls 5640 <rtems_rate_monotonic_report_statistics_with_plugin+0x7c><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
57a0: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
57a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000057e0 <rtems_rate_monotonic_reset_all_statistics>:
57e0: e59f303c ldr r3, [pc, #60] ; 5824 <rtems_rate_monotonic_reset_all_statistics+0x44><== NOT EXECUTED
57e4: e5932000 ldr r2, [r3] <== NOT EXECUTED
57e8: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
57ec: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
57f0: e5832000 str r2, [r3] <== NOT EXECUTED
/*
* 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 ;
57f4: e59f302c ldr r3, [pc, #44] ; 5828 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
57f8: e1a05003 mov r5, r3 <== NOT EXECUTED
/*
* 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 ;
57fc: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
5800: ea000000 b 5808 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
5804: eb000008 bl 582c <rtems_rate_monotonic_reset_statistics> <== NOT EXECUTED
/*
* 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 ;
5808: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
580c: e1540003 cmp r4, r3 <== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
5810: e1a00004 mov r0, r4 <== NOT EXECUTED
* 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++ ) {
5814: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
/*
* 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 ;
5818: 9afffff9 bls 5804 <rtems_rate_monotonic_reset_all_statistics+0x24><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
581c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
5820: ea000979 b 7e0c <_Thread_Enable_dispatch> <== NOT EXECUTED
0000582c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
Objects_Id id
)
{
582c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5830: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5834: e1a01000 mov r1, r0 <== NOT EXECUTED
5838: e1a0200d mov r2, sp <== NOT EXECUTED
583c: e59f0048 ldr r0, [pc, #72] ; 588c <rtems_rate_monotonic_reset_statistics+0x60><== NOT EXECUTED
5840: eb00074b bl 7574 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
5844: e59d5000 ldr r5, [sp] <== NOT EXECUTED
5848: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
584c: e1a04000 mov r4, r0 <== NOT EXECUTED
5850: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
5854: 1a00000a bne 5884 <rtems_rate_monotonic_reset_statistics+0x58><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
5858: e1a01005 mov r1, r5 <== NOT EXECUTED
585c: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
5860: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
5864: eb002074 bl da3c <memset> <== NOT EXECUTED
5868: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
586c: e5843078 str r3, [r4, #120] <== NOT EXECUTED
5870: e584305c str r3, [r4, #92] <== NOT EXECUTED
5874: e5843060 str r3, [r4, #96] <== NOT EXECUTED
5878: e5843074 str r3, [r4, #116] <== NOT EXECUTED
_Thread_Enable_dispatch();
587c: eb000962 bl 7e0c <_Thread_Enable_dispatch> <== NOT EXECUTED
5880: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5884: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5888: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000f63c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
f63c: e92d40f0 push {r4, r5, r6, r7, lr}
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
f640: e2517000 subs r7, r1, #0 ; 0x0
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
f644: e1a04000 mov r4, r0
f648: e24dd008 sub sp, sp, #8 ; 0x8
f64c: e1a06002 mov r6, r2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
f650: 03a04009 moveq r4, #9 ; 0x9
f654: 0a000029 beq f700 <rtems_region_extend+0xc4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
f658: e59f30ac ldr r3, [pc, #172] ; f70c <rtems_region_extend+0xd0>
f65c: e5930000 ldr r0, [r3]
f660: eb0008ec bl 11a18 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
f664: e1a01004 mov r1, r4
f668: e59f00a0 ldr r0, [pc, #160] ; f710 <rtems_region_extend+0xd4>
f66c: e1a0200d mov r2, sp
f670: eb000f65 bl 1340c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
f674: e59d5000 ldr r5, [sp]
f678: e3550000 cmp r5, #0 ; 0x0
f67c: e1a04000 mov r4, r0
f680: 0a000003 beq f694 <rtems_region_extend+0x58>
f684: e3550001 cmp r5, #1 ; 0x1
f688: 03a04004 moveq r4, #4 ; 0x4
f68c: 1a000017 bne f6f0 <rtems_region_extend+0xb4>
f690: ea000017 b f6f4 <rtems_region_extend+0xb8>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
f694: e1a01007 mov r1, r7
f698: e1a02006 mov r2, r6
f69c: e2800068 add r0, r0, #104 ; 0x68
f6a0: e28d3004 add r3, sp, #4 ; 0x4
f6a4: eb000bd5 bl 12600 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
f6a8: e3500001 cmp r0, #1 ; 0x1
f6ac: 03a04009 moveq r4, #9 ; 0x9
f6b0: 0a00000f beq f6f4 <rtems_region_extend+0xb8>
f6b4: 3a000002 bcc f6c4 <rtems_region_extend+0x88>
f6b8: e3500002 cmp r0, #2 ; 0x2
f6bc: 1a00000b bne f6f0 <rtems_region_extend+0xb4>
f6c0: ea000008 b f6e8 <rtems_region_extend+0xac>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
f6c4: e59d1004 ldr r1, [sp, #4]
f6c8: e5942054 ldr r2, [r4, #84]
the_region->maximum_segment_size += amount_extended;
f6cc: e594305c ldr r3, [r4, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
f6d0: e0822001 add r2, r2, r1
the_region->maximum_segment_size += amount_extended;
f6d4: e0833001 add r3, r3, r1
f6d8: e584305c str r3, [r4, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
f6dc: e5842054 str r2, [r4, #84]
the_region->maximum_segment_size += amount_extended;
f6e0: e1a04005 mov r4, r5
f6e4: ea000002 b f6f4 <rtems_region_extend+0xb8>
return_status = RTEMS_SUCCESSFUL;
break;
f6e8: e3a04018 mov r4, #24 ; 0x18
f6ec: ea000000 b f6f4 <rtems_region_extend+0xb8>
f6f0: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
f6f4: e59f3010 ldr r3, [pc, #16] ; f70c <rtems_region_extend+0xd0>
f6f8: e5930000 ldr r0, [r3]
f6fc: eb0008e1 bl 11a88 <_API_Mutex_Unlock>
return return_status;
}
f700: e1a00004 mov r0, r4
f704: e28dd008 add sp, sp, #8 ; 0x8
f708: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000fa38 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
fa38: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
fa3c: e253a000 subs sl, r3, #0 ; 0x0
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
fa40: e24dd010 sub sp, sp, #16 ; 0x10
fa44: e1a04000 mov r4, r0
fa48: e1a06001 mov r6, r1
fa4c: e1a07002 mov r7, r2
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
fa50: 0a000029 beq fafc <rtems_region_resize_segment+0xc4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
fa54: e59f80b0 ldr r8, [pc, #176] ; fb0c <rtems_region_resize_segment+0xd4>
fa58: e5980000 ldr r0, [r8]
fa5c: eb0007ed bl 11a18 <_API_Mutex_Lock>
fa60: e1a01004 mov r1, r4
fa64: e59f00a4 ldr r0, [pc, #164] ; fb10 <rtems_region_resize_segment+0xd8>
fa68: e28d2008 add r2, sp, #8 ; 0x8
fa6c: eb000e66 bl 1340c <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
fa70: e59d3008 ldr r3, [sp, #8]
fa74: e3530000 cmp r3, #0 ; 0x0
fa78: e1a05000 mov r5, r0
fa7c: 0a000005 beq fa98 <rtems_region_resize_segment+0x60>
fa80: e3530001 cmp r3, #1 ; 0x1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
fa84: e5980000 ldr r0, [r8]
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
fa88: 03a04004 moveq r4, #4 ; 0x4
fa8c: 13a04019 movne r4, #25 ; 0x19
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
fa90: eb0007fc bl 11a88 <_API_Mutex_Unlock>
fa94: ea000019 b fb00 <rtems_region_resize_segment+0xc8>
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
fa98: e28d3004 add r3, sp, #4 ; 0x4
fa9c: e28dc00c add ip, sp, #12 ; 0xc
faa0: e1a01006 mov r1, r6
faa4: e1a02007 mov r2, r7
faa8: e2800068 add r0, r0, #104 ; 0x68
faac: e58dc000 str ip, [sp]
fab0: eb000c50 bl 12bf8 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
fab4: e59d3004 ldr r3, [sp, #4]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
fab8: e2504000 subs r4, r0, #0 ; 0x0
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
fabc: e58a3000 str r3, [sl]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
fac0: 1a000005 bne fadc <rtems_region_resize_segment+0xa4>
fac4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
fac8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
facc: 0a000002 beq fadc <rtems_region_resize_segment+0xa4> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
fad0: e1a00005 mov r0, r5 <== NOT EXECUTED
fad4: eb001f65 bl 17870 <_Region_Process_queue> <== NOT EXECUTED
fad8: ea000008 b fb00 <rtems_region_resize_segment+0xc8> <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
fadc: e59f3028 ldr r3, [pc, #40] ; fb0c <rtems_region_resize_segment+0xd4>
fae0: e5930000 ldr r0, [r3]
fae4: eb0007e7 bl 11a88 <_API_Mutex_Unlock>
return
fae8: e3540000 cmp r4, #0 ; 0x0
faec: 0a000003 beq fb00 <rtems_region_resize_segment+0xc8>
faf0: e3540001 cmp r4, #1 ; 0x1
faf4: 0284400c addeq r4, r4, #12 ; 0xc
faf8: 0a000000 beq fb00 <rtems_region_resize_segment+0xc8>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
fafc: e3a04009 mov r4, #9 ; 0x9
}
fb00: e1a00004 mov r0, r4
fb04: e28dd010 add sp, sp, #16 ; 0x10
fb08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
000040dc <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
40dc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
40e0: e250a000 subs sl, r0, #0 ; 0x0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
40e4: e24dd018 sub sp, sp, #24 ; 0x18
40e8: e1a07001 mov r7, r1
40ec: e1a04002 mov r4, r2
40f0: e1a08003 mov r8, r3
40f4: e59d9038 ldr r9, [sp, #56]
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
40f8: 02800003 addeq r0, r0, #3 ; 0x3
40fc: 0a000062 beq 428c <rtems_semaphore_create+0x1b0>
return RTEMS_INVALID_NAME;
if ( !id )
4100: e3590000 cmp r9, #0 ; 0x0
4104: 03a00009 moveq r0, #9 ; 0x9
4108: 0a00005f beq 428c <rtems_semaphore_create+0x1b0>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
410c: e21220c0 ands r2, r2, #192 ; 0xc0
4110: 0a000008 beq 4138 <rtems_semaphore_create+0x5c>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
4114: e2043030 and r3, r4, #48 ; 0x30
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4118: e3530010 cmp r3, #16 ; 0x10
411c: 0a000001 beq 4128 <rtems_semaphore_create+0x4c>
4120: e3530020 cmp r3, #32 ; 0x20
4124: 1a000057 bne 4288 <rtems_semaphore_create+0x1ac>
4128: e3140004 tst r4, #4 ; 0x4
412c: 0a000055 beq 4288 <rtems_semaphore_create+0x1ac>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
4130: e35200c0 cmp r2, #192 ; 0xc0
4134: 0a000053 beq 4288 <rtems_semaphore_create+0x1ac>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
4138: e2146030 ands r6, r4, #48 ; 0x30
413c: 0a000002 beq 414c <rtems_semaphore_create+0x70>
4140: e3570001 cmp r7, #1 ; 0x1
4144: 83a0000a movhi r0, #10 ; 0xa
4148: 8a00004f bhi 428c <rtems_semaphore_create+0x1b0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
414c: e59f2140 ldr r2, [pc, #320] ; 4294 <rtems_semaphore_create+0x1b8>
4150: e5923000 ldr r3, [r2]
4154: e2833001 add r3, r3, #1 ; 0x1
4158: e5823000 str r3, [r2]
* 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 );
415c: e59f0134 ldr r0, [pc, #308] ; 4298 <rtems_semaphore_create+0x1bc>
4160: eb000500 bl 5568 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
4164: e2505000 subs r5, r0, #0 ; 0x0
4168: 1a000002 bne 4178 <rtems_semaphore_create+0x9c>
_Thread_Enable_dispatch();
416c: eb00084b bl 62a0 <_Thread_Enable_dispatch>
4170: e3a00005 mov r0, #5 ; 0x5
4174: ea000044 b 428c <rtems_semaphore_create+0x1b0>
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
4178: e3560000 cmp r6, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
417c: e5854010 str r4, [r5, #16]
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
4180: 0a000029 beq 422c <rtems_semaphore_create+0x150>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
4184: e3140040 tst r4, #64 ; 0x40
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
4188: 13a03002 movne r3, #2 ; 0x2
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
418c: 1a000004 bne 41a4 <rtems_semaphore_create+0xc8>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
4190: e3140080 tst r4, #128 ; 0x80
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4194: 13a03003 movne r3, #3 ; 0x3
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
4198: 1a000001 bne 41a4 <rtems_semaphore_create+0xc8>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
419c: e2143004 ands r3, r4, #4 ; 0x4
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
41a0: 13a03001 movne r3, #1 ; 0x1
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
41a4: e3560010 cmp r6, #16 ; 0x10
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
41a8: e58d3008 str r3, [sp, #8]
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
41ac: 13a03002 movne r3, #2 ; 0x2
41b0: 158d3000 strne r3, [sp]
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
41b4: 1a00000b bne 41e8 <rtems_semaphore_create+0x10c>
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
41b8: e59d2008 ldr r2, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
41bc: e3a03000 mov r3, #0 ; 0x0
41c0: e58d3000 str r3, [sp]
switch ( the_mutex_attributes.discipline ) {
41c4: e3520003 cmp r2, #3 ; 0x3
41c8: 979ff102 ldrls pc, [pc, r2, lsl #2]
41cc: ea000007 b 41f0 <rtems_semaphore_create+0x114> <== NOT EXECUTED
41d0: 000041e8 .word 0x000041e8 <== NOT EXECUTED
41d4: 000041e8 .word 0x000041e8 <== NOT EXECUTED
41d8: 000041e0 .word 0x000041e0 <== NOT EXECUTED
41dc: 000041e0 .word 0x000041e0 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
41e0: e3a03001 mov r3, #1 ; 0x1
41e4: ea000000 b 41ec <rtems_semaphore_create+0x110>
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
41e8: e3a03000 mov r3, #0 ; 0x0
41ec: e5cd3004 strb r3, [sp, #4]
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
41f0: e3570001 cmp r7, #1 ; 0x1
41f4: 13a02000 movne r2, #0 ; 0x0
41f8: 03a02001 moveq r2, #1 ; 0x1
41fc: e2850014 add r0, r5, #20 ; 0x14
4200: e1a0100d mov r1, sp
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
4204: e58d800c str r8, [sp, #12]
mutex_status = _CORE_mutex_Initialize(
4208: eb0002ff bl 4e0c <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
420c: e3500006 cmp r0, #6 ; 0x6
4210: 1a000012 bne 4260 <rtems_semaphore_create+0x184>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
4214: e59f007c ldr r0, [pc, #124] ; 4298 <rtems_semaphore_create+0x1bc><== NOT EXECUTED
4218: e1a01005 mov r1, r5 <== NOT EXECUTED
421c: eb0005a0 bl 58a4 <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4220: eb00081e bl 62a0 <_Thread_Enable_dispatch> <== NOT EXECUTED
4224: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
4228: ea000017 b 428c <rtems_semaphore_create+0x1b0> <== NOT EXECUTED
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
422c: e3140004 tst r4, #4 ; 0x4
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
4230: 13a03001 movne r3, #1 ; 0x1
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
4234: e3a0c000 mov ip, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
4238: 158d3014 strne r3, [sp, #20]
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
423c: e1a02007 mov r2, r7
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
4240: e3e03000 mvn r3, #0 ; 0x0
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
4244: e2850014 add r0, r5, #20 ; 0x14
4248: e28d1010 add r1, sp, #16 ; 0x10
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
424c: 058d6014 streq r6, [sp, #20]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
4250: e58d3010 str r3, [sp, #16]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
4254: e58dc00c str ip, [sp, #12]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
4258: e58dc000 str ip, [sp]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
425c: eb0003b7 bl 5140 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4260: e59f3030 ldr r3, [pc, #48] ; 4298 <rtems_semaphore_create+0x1bc>
4264: e5952008 ldr r2, [r5, #8]
4268: e593101c ldr r1, [r3, #28]
426c: e1d530b8 ldrh r3, [r5, #8]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4270: e585a00c str sl, [r5, #12]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4274: e7815103 str r5, [r1, r3, lsl #2]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
4278: e5892000 str r2, [r9]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
427c: eb000807 bl 62a0 <_Thread_Enable_dispatch>
4280: e3a00000 mov r0, #0 ; 0x0
4284: ea000000 b 428c <rtems_semaphore_create+0x1b0>
return RTEMS_SUCCESSFUL;
4288: e3a0000b mov r0, #11 ; 0xb
}
428c: e28dd018 add sp, sp, #24 ; 0x18
4290: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000fe18 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
fe18: e52de004 push {lr} ; (str lr, [sp, #-4]!)
fe1c: e24dd004 sub sp, sp, #4 ; 0x4
fe20: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
fe24: e1a0200d mov r2, sp
fe28: e59f0048 ldr r0, [pc, #72] ; fe78 <rtems_semaphore_flush+0x60>
fe2c: eb000d87 bl 13450 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
fe30: e59d2000 ldr r2, [sp]
fe34: e3520000 cmp r2, #0 ; 0x0
fe38: 13a00004 movne r0, #4 ; 0x4
fe3c: 1a00000b bne fe70 <rtems_semaphore_flush+0x58>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
fe40: e5903010 ldr r3, [r0, #16]
fe44: e2131030 ands r1, r3, #48 ; 0x30
fe48: e2800014 add r0, r0, #20 ; 0x14
fe4c: 0a000003 beq fe60 <rtems_semaphore_flush+0x48>
_CORE_mutex_Flush(
fe50: e1a01002 mov r1, r2
fe54: e3a02001 mov r2, #1 ; 0x1
fe58: eb000851 bl 11fa4 <_CORE_mutex_Flush>
fe5c: ea000001 b fe68 <rtems_semaphore_flush+0x50>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
fe60: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
fe64: eb00091b bl 122d8 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
fe68: eb000f9e bl 13ce8 <_Thread_Enable_dispatch>
fe6c: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
fe70: e28dd004 add sp, sp, #4 ; 0x4
fe74: e8bd8000 pop {pc}
00013ba8 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
13ba8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
13bac: e59f2024 ldr r2, [pc, #36] ; 13bd8 <rtems_shutdown_executive+0x30>
13bb0: e5923000 ldr r3, [r2]
13bb4: e3530004 cmp r3, #4 ; 0x4
*/
void rtems_shutdown_executive(
uint32_t result
)
{
13bb8: e24dd030 sub sp, sp, #48 ; 0x30
13bbc: 13a03004 movne r3, #4 ; 0x4
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
13bc0: 11a0000d movne r0, sp
13bc4: 159f1010 ldrne r1, [pc, #16] ; 13bdc <rtems_shutdown_executive+0x34>
13bc8: 15823000 strne r3, [r2]
13bcc: 1bffcec6 blne 76ec <_CPU_Context_switch>
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
13bd0: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED
13bd4: e8bd8000 pop {pc} <== NOT EXECUTED
000055b8 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
55b8: e92d40f0 push {r4, r5, r6, r7, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
55bc: e2516000 subs r6, r1, #0 ; 0x0
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
55c0: e24dd004 sub sp, sp, #4 ; 0x4
55c4: e1a07002 mov r7, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
55c8: 03a00009 moveq r0, #9 ; 0x9
55cc: 0a000022 beq 565c <rtems_task_variable_add+0xa4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
55d0: e1a0100d mov r1, sp
55d4: eb000726 bl 7274 <_Thread_Get>
switch (location) {
55d8: e59d3000 ldr r3, [sp]
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
55dc: e1a05000 mov r5, r0
switch (location) {
55e0: e3530000 cmp r3, #0 ; 0x0
55e4: 13a00004 movne r0, #4 ; 0x4
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
55e8: 05954114 ldreq r4, [r5, #276]
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
55ec: 0a000008 beq 5614 <rtems_task_variable_add+0x5c>
55f0: ea000019 b 565c <rtems_task_variable_add+0xa4> <== NOT EXECUTED
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
55f4: e5943004 ldr r3, [r4, #4]
55f8: e1530006 cmp r3, r6
55fc: 1a000003 bne 5610 <rtems_task_variable_add+0x58>
tvp->dtor = dtor;
5600: e5847010 str r7, [r4, #16]
_Thread_Enable_dispatch();
5604: eb000711 bl 7250 <_Thread_Enable_dispatch>
5608: e3a00000 mov r0, #0 ; 0x0
560c: ea000012 b 565c <rtems_task_variable_add+0xa4>
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
5610: e5944000 ldr r4, [r4]
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
5614: e3540000 cmp r4, #0 ; 0x0
5618: 1afffff5 bne 55f4 <rtems_task_variable_add+0x3c>
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
561c: e3a00014 mov r0, #20 ; 0x14
5620: eb000ba8 bl 84c8 <_Workspace_Allocate>
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
5624: e3500000 cmp r0, #0 ; 0x0
5628: 1a000002 bne 5638 <rtems_task_variable_add+0x80>
_Thread_Enable_dispatch();
562c: eb000707 bl 7250 <_Thread_Enable_dispatch>
5630: e3a0001a mov r0, #26 ; 0x1a
5634: ea000008 b 565c <rtems_task_variable_add+0xa4>
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
5638: e5952114 ldr r2, [r5, #276]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
563c: e5963000 ldr r3, [r6]
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
5640: e5850114 str r0, [r5, #276]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
5644: e5803008 str r3, [r0, #8]
new->ptr = ptr;
5648: e5806004 str r6, [r0, #4]
new->dtor = dtor;
564c: e5807010 str r7, [r0, #16]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
5650: e5802000 str r2, [r0]
the_thread->task_variables = new;
_Thread_Enable_dispatch();
5654: eb0006fd bl 7250 <_Thread_Enable_dispatch>
5658: e1a00004 mov r0, r4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
565c: e28dd004 add sp, sp, #4 ; 0x4
5660: e8bd80f0 pop {r4, r5, r6, r7, pc}
00005664 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
5664: e92d4010 push {r4, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
5668: e2514000 subs r4, r1, #0 ; 0x0
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
566c: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
5670: 0a000018 beq 56d8 <rtems_task_variable_delete+0x74>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
5674: e1a0100d mov r1, sp
5678: eb0006fd bl 7274 <_Thread_Get>
switch (location) {
567c: e59d3000 ldr r3, [sp]
5680: e3530000 cmp r3, #0 ; 0x0
5684: 13a00004 movne r0, #4 ; 0x4
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
5688: 01a02003 moveq r2, r3
568c: 05901114 ldreq r1, [r0, #276]
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
5690: 0a00000d beq 56cc <rtems_task_variable_delete+0x68>
5694: ea000010 b 56dc <rtems_task_variable_delete+0x78> <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
5698: e5913004 ldr r3, [r1, #4]
569c: e1530004 cmp r3, r4
56a0: 1a000007 bne 56c4 <rtems_task_variable_delete+0x60>
56a4: e5913000 ldr r3, [r1]
if (prev)
56a8: e3520000 cmp r2, #0 ; 0x0
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
56ac: 05803114 streq r3, [r0, #276]
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
56b0: 15823000 strne r3, [r2]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
56b4: eb000028 bl 575c <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
56b8: eb0006e4 bl 7250 <_Thread_Enable_dispatch>
56bc: e3a00000 mov r0, #0 ; 0x0
56c0: ea000005 b 56dc <rtems_task_variable_delete+0x78>
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
56c4: e1a02001 mov r2, r1
56c8: e5911000 ldr r1, [r1]
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
56cc: e3510000 cmp r1, #0 ; 0x0
56d0: 1afffff0 bne 5698 <rtems_task_variable_delete+0x34>
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
56d4: eb0006dd bl 7250 <_Thread_Enable_dispatch>
56d8: e3a00009 mov r0, #9 ; 0x9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56dc: e28dd004 add sp, sp, #4 ; 0x4
56e0: e8bd8010 pop {r4, pc}
000056e4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
56e4: e92d4030 push {r4, r5, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
56e8: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
56ec: e24dd004 sub sp, sp, #4 ; 0x4
56f0: e1a04002 mov r4, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
56f4: 0a000015 beq 5750 <rtems_task_variable_get+0x6c>
return RTEMS_INVALID_ADDRESS;
if ( !result )
56f8: e3520000 cmp r2, #0 ; 0x0
56fc: 0a000013 beq 5750 <rtems_task_variable_get+0x6c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
5700: e1a0100d mov r1, sp
5704: eb0006da bl 7274 <_Thread_Get>
switch (location) {
5708: e59d3000 ldr r3, [sp]
570c: e3530000 cmp r3, #0 ; 0x0
5710: 13a00004 movne r0, #4 ; 0x4
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
5714: 05900114 ldreq r0, [r0, #276]
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
5718: 0a000009 beq 5744 <rtems_task_variable_get+0x60>
571c: ea00000c b 5754 <rtems_task_variable_get+0x70> <== NOT EXECUTED
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
5720: e5903004 ldr r3, [r0, #4]
5724: e1530005 cmp r3, r5
5728: 1a000004 bne 5740 <rtems_task_variable_get+0x5c>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
572c: e590300c ldr r3, [r0, #12]
5730: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
5734: eb0006c5 bl 7250 <_Thread_Enable_dispatch>
5738: e3a00000 mov r0, #0 ; 0x0
573c: ea000004 b 5754 <rtems_task_variable_get+0x70>
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
5740: e5900000 ldr r0, [r0]
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
5744: e3500000 cmp r0, #0 ; 0x0
5748: 1afffff4 bne 5720 <rtems_task_variable_get+0x3c>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
574c: eb0006bf bl 7250 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
5750: e3a00009 mov r0, #9 ; 0x9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5754: e28dd004 add sp, sp, #4 ; 0x4
5758: e8bd8030 pop {r4, r5, pc}
0000545c <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
545c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
5460: e251a000 subs sl, r1, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
5464: e1a07000 mov r7, r0
5468: e24dd004 sub sp, sp, #4 ; 0x4
546c: e1a06002 mov r6, r2
5470: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
5474: 03a0000a moveq r0, #10 ; 0xa
5478: 0a000022 beq 5508 <rtems_timer_fire_after+0xac>
return RTEMS_INVALID_NUMBER;
if ( !routine )
547c: e3520000 cmp r2, #0 ; 0x0
5480: 03a00009 moveq r0, #9 ; 0x9
5484: 0a00001f beq 5508 <rtems_timer_fire_after+0xac>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
5488: e59f0080 ldr r0, [pc, #128] ; 5510 <rtems_timer_fire_after+0xb4>
548c: e1a01007 mov r1, r7
5490: e1a0200d mov r2, sp
5494: eb0004a9 bl 6740 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
5498: e59d3000 ldr r3, [sp]
549c: e3530000 cmp r3, #0 ; 0x0
54a0: e1a04000 mov r4, r0
54a4: 13a00004 movne r0, #4 ; 0x4
54a8: 1a000016 bne 5508 <rtems_timer_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
54ac: e2845010 add r5, r4, #16 ; 0x10
54b0: e1a00005 mov r0, r5
54b4: eb000b63 bl 8248 <_Watchdog_Remove>
_ISR_Disable( level );
54b8: e10f2000 mrs r2, CPSR
54bc: e38230c0 orr r3, r2, #192 ; 0xc0
54c0: e129f003 msr CPSR_fc, r3
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
54c4: e5943018 ldr r3, [r4, #24]
54c8: e3530000 cmp r3, #0 ; 0x0
54cc: 0a000001 beq 54d8 <rtems_timer_fire_after+0x7c>
_ISR_Enable( level );
54d0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
54d4: ea000009 b 5500 <rtems_timer_fire_after+0xa4> <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
54d8: e5843018 str r3, [r4, #24]
the_watchdog->routine = routine;
54dc: e584602c str r6, [r4, #44]
the_watchdog->id = id;
54e0: e5847030 str r7, [r4, #48]
the_watchdog->user_data = user_data;
54e4: e5848034 str r8, [r4, #52]
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
54e8: e5843038 str r3, [r4, #56]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
54ec: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
54f0: e59f001c ldr r0, [pc, #28] ; 5514 <rtems_timer_fire_after+0xb8>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
54f4: e584a01c str sl, [r4, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
54f8: e1a01005 mov r1, r5
54fc: eb000af5 bl 80d8 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
5500: eb000692 bl 6f50 <_Thread_Enable_dispatch>
5504: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5508: e28dd004 add sp, sp, #4 ; 0x4
550c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00010c3c <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
10c3c: e92d4030 push {r4, r5, lr}
10c40: e24dd004 sub sp, sp, #4 ; 0x4
10c44: e1a01000 mov r1, r0
10c48: e1a0200d mov r2, sp
10c4c: e59f00a4 ldr r0, [pc, #164] ; 10cf8 <rtems_timer_reset+0xbc>
10c50: eb0009fe bl 13450 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10c54: e59d3000 ldr r3, [sp]
10c58: e3530000 cmp r3, #0 ; 0x0
10c5c: e1a04000 mov r4, r0
10c60: 13a00004 movne r0, #4 ; 0x4
10c64: 1a000021 bne 10cf0 <rtems_timer_reset+0xb4>
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
10c68: e5943038 ldr r3, [r4, #56]
10c6c: e3530004 cmp r3, #4 ; 0x4
10c70: 979ff103 ldrls pc, [pc, r3, lsl #2]
10c74: ea00001b b 10ce8 <rtems_timer_reset+0xac> <== NOT EXECUTED
10c78: 00010c8c .word 0x00010c8c <== NOT EXECUTED
10c7c: 00010ca8 .word 0x00010ca8 <== NOT EXECUTED
10c80: 00010cdc .word 0x00010cdc <== NOT EXECUTED
10c84: 00010cdc .word 0x00010cdc <== NOT EXECUTED
10c88: 00010cdc .word 0x00010cdc <== NOT EXECUTED
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
10c8c: e2844010 add r4, r4, #16 ; 0x10
10c90: e1a00004 mov r0, r4
10c94: eb0011dd bl 15410 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
10c98: e1a01004 mov r1, r4
10c9c: e59f0058 ldr r0, [pc, #88] ; 10cfc <rtems_timer_reset+0xc0>
10ca0: eb00117e bl 152a0 <_Watchdog_Insert>
10ca4: ea00000f b 10ce8 <rtems_timer_reset+0xac>
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
10ca8: e59f5050 ldr r5, [pc, #80] ; 10d00 <rtems_timer_reset+0xc4>
10cac: e5953000 ldr r3, [r5]
10cb0: e3530000 cmp r3, #0 ; 0x0
10cb4: 1a000002 bne 10cc4 <rtems_timer_reset+0x88>
_Thread_Enable_dispatch();
10cb8: eb000c0a bl 13ce8 <_Thread_Enable_dispatch> <== NOT EXECUTED
10cbc: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED
10cc0: ea00000a b 10cf0 <rtems_timer_reset+0xb4> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
10cc4: e2840010 add r0, r4, #16 ; 0x10
10cc8: eb0011d0 bl 15410 <_Watchdog_Remove>
(*_Timer_Server_schedule_operation)( the_timer );
10ccc: e1a00004 mov r0, r4
10cd0: e1a0e00f mov lr, pc
10cd4: e595f000 ldr pc, [r5]
10cd8: ea000002 b 10ce8 <rtems_timer_reset+0xac>
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
10cdc: eb000c01 bl 13ce8 <_Thread_Enable_dispatch>
10ce0: e3a0000b mov r0, #11 ; 0xb
10ce4: ea000001 b 10cf0 <rtems_timer_reset+0xb4>
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
10ce8: eb000bfe bl 13ce8 <_Thread_Enable_dispatch>
10cec: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cf0: e28dd004 add sp, sp, #4 ; 0x4
10cf4: e8bd8030 pop {r4, r5, pc}
00010d04 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10d04: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
10d08: e59fc0c4 ldr ip, [pc, #196] ; 10dd4 <rtems_timer_server_fire_after+0xd0>
10d0c: e59cc000 ldr ip, [ip]
10d10: e35c0000 cmp ip, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10d14: e1a06000 mov r6, r0
10d18: e24dd004 sub sp, sp, #4 ; 0x4
10d1c: e1a07001 mov r7, r1
10d20: e1a05002 mov r5, r2
10d24: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
10d28: 03a0000e moveq r0, #14 ; 0xe
10d2c: 0a000026 beq 10dcc <rtems_timer_server_fire_after+0xc8>
return RTEMS_INCORRECT_STATE;
if ( !routine )
10d30: e3520000 cmp r2, #0 ; 0x0
10d34: 03a00009 moveq r0, #9 ; 0x9
10d38: 0a000023 beq 10dcc <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
10d3c: e3510000 cmp r1, #0 ; 0x0
10d40: 03a0000a moveq r0, #10 ; 0xa
10d44: 0a000020 beq 10dcc <rtems_timer_server_fire_after+0xc8>
10d48: e59f0088 ldr r0, [pc, #136] ; 10dd8 <rtems_timer_server_fire_after+0xd4>
10d4c: e1a01006 mov r1, r6
10d50: e1a0200d mov r2, sp
10d54: eb0009bd bl 13450 <_Objects_Get>
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
10d58: e59d3000 ldr r3, [sp]
10d5c: e3530000 cmp r3, #0 ; 0x0
10d60: e1a04000 mov r4, r0
10d64: 13a00004 movne r0, #4 ; 0x4
10d68: 1a000017 bne 10dcc <rtems_timer_server_fire_after+0xc8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10d6c: e2840010 add r0, r4, #16 ; 0x10
10d70: eb0011a6 bl 15410 <_Watchdog_Remove>
_ISR_Disable( level );
10d74: e10f1000 mrs r1, CPSR
10d78: e38130c0 orr r3, r1, #192 ; 0xc0
10d7c: e129f003 msr CPSR_fc, r3
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
10d80: e5942018 ldr r2, [r4, #24]
10d84: e3520000 cmp r2, #0 ; 0x0
10d88: 0a000001 beq 10d94 <rtems_timer_server_fire_after+0x90>
_ISR_Enable( level );
10d8c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
10d90: ea00000b b 10dc4 <rtems_timer_server_fire_after+0xc0> <== NOT EXECUTED
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
10d94: e3a03001 mov r3, #1 ; 0x1
10d98: e5843038 str r3, [r4, #56]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10d9c: e5842018 str r2, [r4, #24]
the_watchdog->routine = routine;
10da0: e584502c str r5, [r4, #44]
the_watchdog->id = id;
10da4: e5846030 str r6, [r4, #48]
the_watchdog->user_data = user_data;
10da8: e5848034 str r8, [r4, #52]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
10dac: e584701c str r7, [r4, #28]
_ISR_Enable( level );
10db0: e129f001 msr CPSR_fc, r1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
10db4: e59f3020 ldr r3, [pc, #32] ; 10ddc <rtems_timer_server_fire_after+0xd8>
10db8: e1a00004 mov r0, r4
10dbc: e1a0e00f mov lr, pc
10dc0: e593f000 ldr pc, [r3]
_Thread_Enable_dispatch();
10dc4: eb000bc7 bl 13ce8 <_Thread_Enable_dispatch>
10dc8: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10dcc: e28dd004 add sp, sp, #4 ; 0x4
10dd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000513c <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
513c: e92d4010 push {r4, lr}
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
5140: e2514000 subs r4, r1, #0 ; 0x0
5144: 0a000008 beq 516c <rtems_workspace_allocate+0x30>
return false;
if ( !bytes )
5148: e3500000 cmp r0, #0 ; 0x0
514c: 0a000006 beq 516c <rtems_workspace_allocate+0x30>
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
5150: e1a01000 mov r1, r0
5154: e59f0018 ldr r0, [pc, #24] ; 5174 <rtems_workspace_allocate+0x38>
5158: eb00051c bl 65d0 <_Protected_heap_Allocate>
if (!ptr)
515c: e3500000 cmp r0, #0 ; 0x0
return false;
*pointer = ptr;
5160: 15840000 strne r0, [r4]
5164: 13a00001 movne r0, #1 ; 0x1
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
5168: 18bd8010 popne {r4, pc}
return false;
*pointer = ptr;
return true;
516c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
}
5170: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000512c <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
512c: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
5130: e59f0000 ldr r0, [pc, #0] ; 5138 <rtems_workspace_free+0xc><== NOT EXECUTED
5134: ea000534 b 660c <_Protected_heap_Free> <== NOT EXECUTED
000068ac <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
68ac: e92d4010 push {r4, lr}
68b0: e24dd004 sub sp, sp, #4 ; 0x4
68b4: e5901000 ldr r1, [r0]
68b8: e1a0200d mov r2, sp
68bc: e59f0048 ldr r0, [pc, #72] ; 690c <sem_destroy+0x60>
68c0: eb000858 bl 8a28 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
68c4: e59d3000 ldr r3, [sp]
68c8: e3530000 cmp r3, #0 ; 0x0
68cc: 1a000008 bne 68f4 <sem_destroy+0x48>
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
68d0: e5d04014 ldrb r4, [r0, #20]
68d4: e3540000 cmp r4, #0 ; 0x0
68d8: 0a000001 beq 68e4 <sem_destroy+0x38>
_Thread_Enable_dispatch();
68dc: eb000a55 bl 9238 <_Thread_Enable_dispatch> <== NOT EXECUTED
68e0: ea000003 b 68f4 <sem_destroy+0x48> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
68e4: eb001885 bl cb00 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
68e8: eb000a52 bl 9238 <_Thread_Enable_dispatch>
68ec: e1a00004 mov r0, r4
68f0: ea000003 b 6904 <sem_destroy+0x58>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
68f4: eb002085 bl eb10 <__errno>
68f8: e3a03016 mov r3, #22 ; 0x16
68fc: e5803000 str r3, [r0]
6900: e3e00000 mvn r0, #0 ; 0x0
}
6904: e28dd004 add sp, sp, #4 ; 0x4
6908: e8bd8010 pop {r4, pc}
00006968 <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6968: e92d4010 push {r4, lr}
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
696c: e2504000 subs r4, r0, #0 ; 0x0
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6970: e24dd004 sub sp, sp, #4 ; 0x4
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
6974: 1a000004 bne 698c <sem_init+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
6978: eb002064 bl eb10 <__errno> <== NOT EXECUTED
697c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
6980: e5803000 str r3, [r0] <== NOT EXECUTED
6984: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
6988: ea000006 b 69a8 <sem_init+0x40> <== NOT EXECUTED
status = _POSIX_Semaphore_Create_support(
698c: e1a0300d mov r3, sp
6990: e3a00000 mov r0, #0 ; 0x0
6994: eb00181b bl ca08 <_POSIX_Semaphore_Create_support>
pshared,
value,
&the_semaphore
);
if ( status != -1 )
6998: e3700001 cmn r0, #1 ; 0x1
*sem = the_semaphore->Object.id;
699c: 159d3000 ldrne r3, [sp]
69a0: 15933008 ldrne r3, [r3, #8]
69a4: 15843000 strne r3, [r4]
return status;
}
69a8: e28dd004 add sp, sp, #4 ; 0x4
69ac: e8bd8010 pop {r4, pc}
00006540 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
6540: e92d4010 push {r4, lr}
6544: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
6548: e3a01000 mov r1, #0 ; 0x0
654c: e1a02001 mov r2, r1
6550: ebffff8d bl 638c <sigtimedwait>
if ( status != -1 ) {
6554: e3700001 cmn r0, #1 ; 0x1
6558: 0a000004 beq 6570 <sigwait+0x30>
if ( sig )
655c: e3540000 cmp r4, #0 ; 0x0
*sig = status;
6560: 15840000 strne r0, [r4]
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
6564: 01a00004 moveq r0, r4
*sig = status;
6568: 13a00000 movne r0, #0 ; 0x0
656c: e8bd8010 pop {r4, pc}
return 0;
}
return errno;
6570: eb001ee6 bl e110 <__errno> <== NOT EXECUTED
6574: e5900000 ldr r0, [r0] <== NOT EXECUTED
}
6578: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00005548 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5548: e92d40f0 push {r4, r5, r6, r7, lr}
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
554c: e2525000 subs r5, r2, #0 ; 0x0
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5550: e24dd018 sub sp, sp, #24 ; 0x18
5554: e1a07000 mov r7, r0
5558: e1a0c001 mov ip, r1
555c: e1a06003 mov r6, r3
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
5560: 0a000054 beq 56b8 <timer_settime+0x170>
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 ) ||
5564: e59f2164 ldr r2, [pc, #356] ; 56d0 <timer_settime+0x188>
5568: e595300c ldr r3, [r5, #12]
556c: e1530002 cmp r3, r2
5570: 8a000050 bhi 56b8 <timer_settime+0x170>
5574: e5953004 ldr r3, [r5, #4]
5578: e1530002 cmp r3, r2
557c: 8a00004d bhi 56b8 <timer_settime+0x170>
5580: e3530000 cmp r3, #0 ; 0x0
5584: ba00004b blt 56b8 <timer_settime+0x170>
( 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 ) {
5588: e3510004 cmp r1, #4 ; 0x4
558c: 13510000 cmpne r1, #0 ; 0x0
5590: 1a000048 bne 56b8 <timer_settime+0x170>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
5594: e895000f ldm r5, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
5598: e35c0004 cmp ip, #4 ; 0x4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
559c: e28dc004 add ip, sp, #4 ; 0x4
55a0: e88c000f stm ip, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
55a4: 1a000009 bne 55d0 <timer_settime+0x88>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
55a8: e28c4008 add r4, ip, #8 ; 0x8
55ac: e59f0120 ldr r0, [pc, #288] ; 56d4 <timer_settime+0x18c>
55b0: e1a01004 mov r1, r4
55b4: eb000d9b bl 8c28 <_Timespec_Greater_than>
55b8: e3500000 cmp r0, #0 ; 0x0
55bc: 1a00003d bne 56b8 <timer_settime+0x170>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
55c0: e1a01004 mov r1, r4
55c4: e59f0108 ldr r0, [pc, #264] ; 56d4 <timer_settime+0x18c>
55c8: e1a02004 mov r2, r4
55cc: eb000da2 bl 8c5c <_Timespec_Subtract>
55d0: e1a01007 mov r1, r7
55d4: e59f00fc ldr r0, [pc, #252] ; 56d8 <timer_settime+0x190>
55d8: e28d2014 add r2, sp, #20 ; 0x14
55dc: eb0007f2 bl 75ac <_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 ) {
55e0: e59d3014 ldr r3, [sp, #20]
55e4: e3530000 cmp r3, #0 ; 0x0
55e8: e1a04000 mov r4, r0
55ec: 1a000031 bne 56b8 <timer_settime+0x170>
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 ) {
55f0: e59d300c ldr r3, [sp, #12]
55f4: e3530000 cmp r3, #0 ; 0x0
55f8: 1a00000f bne 563c <timer_settime+0xf4>
55fc: e59d3010 ldr r3, [sp, #16]
5600: e3530000 cmp r3, #0 ; 0x0
5604: 1a00000c bne 563c <timer_settime+0xf4>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
5608: e2800010 add r0, r0, #16 ; 0x10
560c: eb000ec7 bl 9130 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
5610: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5614: 12843054 addne r3, r4, #84 ; 0x54
5618: 1893000f ldmne r3, {r0, r1, r2, r3}
561c: 1886000f stmne r6, {r0, r1, r2, r3}
/* The new data are set */
ptimer->timer_data = normalize;
5620: e28d3004 add r3, sp, #4 ; 0x4
5624: e893000f ldm r3, {r0, r1, r2, r3}
5628: e284c054 add ip, r4, #84 ; 0x54
562c: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
5630: e3a03004 mov r3, #4 ; 0x4
5634: e5c4303c strb r3, [r4, #60]
5638: ea00001b b 56ac <timer_settime+0x164>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
563c: e1a00005 mov r0, r5
5640: eb000d96 bl 8ca0 <_Timespec_To_ticks>
5644: e5840064 str r0, [r4, #100]
initial_period = _Timespec_To_ticks( &normalize.it_value );
5648: e28d000c add r0, sp, #12 ; 0xc
564c: eb000d93 bl 8ca0 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
5650: e58d4000 str r4, [sp]
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
5654: e1a01000 mov r1, r0
activated = _POSIX_Timer_Insert_helper(
5658: e5942008 ldr r2, [r4, #8]
565c: e2840010 add r0, r4, #16 ; 0x10
5660: e59f3074 ldr r3, [pc, #116] ; 56dc <timer_settime+0x194>
5664: eb0017e3 bl b5f8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
5668: e2505000 subs r5, r0, #0 ; 0x0
566c: 1a000002 bne 567c <timer_settime+0x134>
_Thread_Enable_dispatch();
5670: eb0009d1 bl 7dbc <_Thread_Enable_dispatch> <== NOT EXECUTED
5674: e1a00005 mov r0, r5 <== NOT EXECUTED
5678: ea000012 b 56c8 <timer_settime+0x180> <== NOT EXECUTED
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
567c: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5680: 12843054 addne r3, r4, #84 ; 0x54
5684: 1893000f ldmne r3, {r0, r1, r2, r3}
5688: 1886000f stmne r6, {r0, r1, r2, r3}
ptimer->timer_data = normalize;
568c: e28d3004 add r3, sp, #4 ; 0x4
5690: e893000f ldm r3, {r0, r1, r2, r3}
5694: e284c054 add ip, r4, #84 ; 0x54
5698: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
569c: e3a03003 mov r3, #3 ; 0x3
56a0: e5c4303c strb r3, [r4, #60]
_TOD_Get( &ptimer->time );
56a4: e284006c add r0, r4, #108 ; 0x6c
56a8: eb0005a9 bl 6d54 <_TOD_Get>
_Thread_Enable_dispatch();
56ac: eb0009c2 bl 7dbc <_Thread_Enable_dispatch>
56b0: e3a00000 mov r0, #0 ; 0x0
56b4: ea000003 b 56c8 <timer_settime+0x180>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
56b8: eb001ef4 bl d290 <__errno>
56bc: e3a03016 mov r3, #22 ; 0x16
56c0: e5803000 str r3, [r0]
56c4: e3e00000 mvn r0, #0 ; 0x0
}
56c8: e28dd018 add sp, sp, #24 ; 0x18
56cc: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003fec <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
3fec: e92d4070 push {r4, r5, r6, lr}
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
3ff0: e59f40dc ldr r4, [pc, #220] ; 40d4 <ualarm+0xe8>
3ff4: e594201c ldr r2, [r4, #28]
3ff8: e3520000 cmp r2, #0 ; 0x0
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
3ffc: e24dd008 sub sp, sp, #8 ; 0x8
4000: e1a06000 mov r6, r0
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
4004: 1a000006 bne 4024 <ualarm+0x38>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4008: e59f30c8 ldr r3, [pc, #200] ; 40d8 <ualarm+0xec>
the_watchdog->id = id;
the_watchdog->user_data = user_data;
400c: e5842024 str r2, [r4, #36]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4010: e584301c str r3, [r4, #28]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4014: e5842008 str r2, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
4018: e5842020 str r2, [r4, #32]
the_watchdog->user_data = user_data;
401c: e1a05002 mov r5, r2
4020: ea000013 b 4074 <ualarm+0x88>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
4024: e1a00004 mov r0, r4 <== NOT EXECUTED
4028: eb000ed7 bl 7b8c <_Watchdog_Remove> <== NOT EXECUTED
402c: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED
4030: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
4034: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED
4038: 8a00000d bhi 4074 <ualarm+0x88> <== NOT EXECUTED
* 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);
403c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
4040: e2840014 add r0, r4, #20 ; 0x14 <== NOT EXECUTED
4044: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED
4048: e0800003 add r0, r0, r3 <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
404c: e0620000 rsb r0, r2, r0 <== NOT EXECUTED
4050: e1a0100d mov r1, sp <== NOT EXECUTED
4054: eb000d6d bl 7610 <_Timespec_From_ticks> <== NOT EXECUTED
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4058: e59d2000 ldr r2, [sp] <== NOT EXECUTED
405c: e59f3078 ldr r3, [pc, #120] ; 40dc <ualarm+0xf0> <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
4060: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
4064: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4068: e0040392 mul r4, r2, r3 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
406c: eb00304e bl 101ac <__aeabi_idiv> <== NOT EXECUTED
4070: e0805004 add r5, r0, r4 <== 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 ) {
4074: e3560000 cmp r6, #0 ; 0x0
4078: 0a000012 beq 40c8 <ualarm+0xdc>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
407c: e59f1058 ldr r1, [pc, #88] ; 40dc <ualarm+0xf0>
4080: e1a00006 mov r0, r6
4084: eb003004 bl 1009c <__aeabi_uidiv>
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
4088: e59f104c ldr r1, [pc, #76] ; 40dc <ualarm+0xf0>
* 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;
408c: e58d0000 str r0, [sp]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
4090: e1a00006 mov r0, r6
4094: eb003094 bl 102ec <__umodsi3>
4098: e3a03ffa mov r3, #1000 ; 0x3e8
409c: e0030390 mul r3, r0, r3
ticks = _Timespec_To_ticks( &tp );
40a0: e1a0000d mov r0, sp
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
40a4: e58d3004 str r3, [sp, #4]
ticks = _Timespec_To_ticks( &tp );
40a8: eb000d7b bl 769c <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
40ac: e1a0000d mov r0, sp
40b0: eb000d79 bl 769c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40b4: e59f1018 ldr r1, [pc, #24] ; 40d4 <ualarm+0xe8>
40b8: e581000c str r0, [r1, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40bc: e59f001c ldr r0, [pc, #28] ; 40e0 <ualarm+0xf4>
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 );
40c0: e1a0400d mov r4, sp
40c4: eb000e54 bl 7a1c <_Watchdog_Insert>
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
40c8: e1a00005 mov r0, r5
40cc: e28dd008 add sp, sp, #8 ; 0x8
40d0: e8bd8070 pop {r4, r5, r6, pc}