RTEMS 4.9.6Annotated Report
Sun Jul 24 18:09:16 2011
00005270 <_API_Mutex_Initialization>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Initialization(
uint32_t maximum_mutexes
)
{
5270: e92d4010 push {r4, lr}
5274: e1a03000 mov r3, r0
5278: e24dd00c sub sp, sp, #12 ; 0xc
_Objects_Initialize_information(
527c: e3a04000 mov r4, #0 ; 0x0
5280: e3a0c074 mov ip, #116 ; 0x74
5284: e59f001c ldr r0, [pc, #28] ; 52a8 <_API_Mutex_Initialization+0x38>
5288: e3a01001 mov r1, #1 ; 0x1
528c: e3a02002 mov r2, #2 ; 0x2
5290: e58dc000 str ip, [sp]
5294: e58d4008 str r4, [sp, #8]
5298: e58d4004 str r4, [sp, #4]
529c: eb000369 bl 6048 <_Objects_Initialize_information>
,
TRUE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
52a0: e28dd00c add sp, sp, #12 ; 0xc
52a4: e8bd8010 pop {r4, pc}
00007194 <_CORE_RWLock_Release>:
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
7194: e59f30e4 ldr r3, [pc, #228] ; 7280 <_CORE_RWLock_Release+0xec>
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
7198: e92d4010 push {r4, lr}
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
719c: e5931000 ldr r1, [r3]
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
71a0: 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 );
71a4: e10f2000 mrs r2, CPSR
71a8: e38230c0 orr r3, r2, #192 ; 0xc0
71ac: e129f003 msr CPSR_fc, r3
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
71b0: e5903044 ldr r3, [r0, #68]
71b4: e3530000 cmp r3, #0 ; 0x0
71b8: 0a00002b beq 726c <_CORE_RWLock_Release+0xd8>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
71bc: e3530001 cmp r3, #1 ; 0x1
71c0: 0a000021 beq 724c <_CORE_RWLock_Release+0xb8>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
71c4: e3a03000 mov r3, #0 ; 0x0
71c8: 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;
71cc: e5843044 str r3, [r4, #68]
_ISR_Enable( level );
71d0: e129f002 msr CPSR_fc, r2
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
71d4: e1a00004 mov r0, r4
71d8: eb0005b9 bl 88c4 <_Thread_queue_Dequeue>
if ( next ) {
71dc: e3500000 cmp r0, #0 ; 0x0
71e0: 0a000017 beq 7244 <_CORE_RWLock_Release+0xb0>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
71e4: e5903030 ldr r3, [r0, #48]
71e8: e3530001 cmp r3, #1 ; 0x1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
71ec: 02833001 addeq r3, r3, #1 ; 0x1
71f0: 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 ) {
71f4: 0a000012 beq 7244 <_CORE_RWLock_Release+0xb0>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
71f8: e5943048 ldr r3, [r4, #72]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
71fc: e3a02001 mov r2, #1 ; 0x1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
7200: e2833001 add r3, r3, #1 ; 0x1
7204: e5843048 str r3, [r4, #72]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
7208: e5842044 str r2, [r4, #68]
720c: ea000006 b 722c <_CORE_RWLock_Release+0x98>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
7210: e5933030 ldr r3, [r3, #48]
7214: e3530001 cmp r3, #1 ; 0x1
7218: 0a000009 beq 7244 <_CORE_RWLock_Release+0xb0>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
721c: e5943048 ldr r3, [r4, #72]
7220: e2833001 add r3, r3, #1 ; 0x1
7224: e5843048 str r3, [r4, #72]
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
7228: eb0006bb bl 8d1c <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
722c: e1a00004 mov r0, r4
7230: eb000706 bl 8e50 <_Thread_queue_First>
if ( !next ||
7234: 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 );
7238: e1a01003 mov r1, r3
723c: 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 ||
7240: 1afffff2 bne 7210 <_CORE_RWLock_Release+0x7c>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7244: e3a00000 mov r0, #0 ; 0x0
7248: e8bd8010 pop {r4, pc}
_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;
724c: e5903048 ldr r3, [r0, #72]
7250: e2433001 sub r3, r3, #1 ; 0x1
if ( the_rwlock->number_of_readers != 0 ) {
7254: 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;
7258: e5803048 str r3, [r0, #72]
if ( the_rwlock->number_of_readers != 0 ) {
725c: 0affffd8 beq 71c4 <_CORE_RWLock_Release+0x30>
/* must be unlocked again */
_ISR_Enable( level );
7260: e129f002 msr CPSR_fc, r2
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7264: e3a00000 mov r0, #0 ; 0x0
7268: e8bd8010 pop {r4, pc}
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
726c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
7270: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED
7274: e5813034 str r3, [r1, #52] <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
7278: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
727c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000136f4 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
136f4: e590304c ldr r3, [r0, #76]
136f8: e1530002 cmp r3, r2
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
136fc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
13700: e1a07000 mov r7, r0
13704: e1a06002 mov r6, r2
13708: e1a08001 mov r8, r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1370c: 33a00001 movcc r0, #1 ; 0x1
13710: 38bd81f0 popcc {r4, r5, r6, r7, r8, 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 ) {
13714: e5973048 ldr r3, [r7, #72]
13718: e3530000 cmp 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))) {
1371c: 01a05003 moveq r5, 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 ) {
13720: 0a000009 beq 1374c <_CORE_message_queue_Broadcast+0x58>
*count = 0;
13724: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
13728: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
1372c: e5823000 str r3, [r2] <== NOT EXECUTED
13730: e1a00003 mov r0, r3 <== NOT EXECUTED
13734: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
13738: e594002c ldr r0, [r4, #44]
1373c: eb002108 bl 1bb64 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
13740: e5943028 ldr r3, [r4, #40]
13744: 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;
13748: 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))) {
1374c: e1a00007 mov r0, r7
13750: eb00099d bl 15dcc <_Thread_queue_Dequeue>
13754: e2504000 subs r4, r0, #0 ; 0x0
13758: e1a01008 mov r1, r8
1375c: e1a02006 mov r2, r6
13760: 1afffff4 bne 13738 <_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;
13764: e59d301c ldr r3, [sp, #28]
13768: e1a00004 mov r0, r4
1376c: e5835000 str r5, [r3]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
13770: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000c154 <_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
)
{
c154: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
c158: e590c04c ldr ip, [r0, #76]
c15c: e15c0002 cmp ip, r2
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
c160: e1a04000 mov r4, r0
c164: e1a07002 mov r7, r2
c168: e1a0a001 mov sl, r1
c16c: e1a09003 mov r9, r3
c170: e5dd8028 ldrb r8, [sp, #40]
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
c174: 33a00001 movcc r0, #1 ; 0x1
c178: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
c17c: e5945048 ldr r5, [r4, #72]
c180: e3550000 cmp r5, #0 ; 0x0
c184: 0a00001d beq c200 <_CORE_message_queue_Submit+0xac>
/*
* 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 <
c188: e5943044 ldr r3, [r4, #68]
c18c: e1530005 cmp r3, r5
c190: 8a00002a bhi c240 <_CORE_message_queue_Submit+0xec>
* 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 ) {
c194: e3580000 cmp r8, #0 ; 0x0
c198: 03a00002 moveq r0, #2 ; 0x2
c19c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, 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() ) {
c1a0: e59f30dc ldr r3, [pc, #220] ; c284 <_CORE_message_queue_Submit+0x130>
c1a4: e5932000 ldr r2, [r3]
c1a8: e3520000 cmp r2, #0 ; 0x0
c1ac: 1a000021 bne c238 <_CORE_message_queue_Submit+0xe4>
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
c1b0: e59f30d0 ldr r3, [pc, #208] ; c288 <_CORE_message_queue_Submit+0x134>
c1b4: e5932000 ldr r2, [r3]
_ISR_Disable( level );
c1b8: e10f1000 mrs r1, CPSR
c1bc: e38130c0 orr r3, r1, #192 ; 0xc0
c1c0: e129f003 msr CPSR_fc, r3
_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;
c1c4: e59d3024 ldr r3, [sp, #36]
c1c8: e5823024 str r3, [r2, #36]
c1cc: e3a03001 mov r3, #1 ; 0x1
c1d0: e5843030 str r3, [r4, #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;
executing->Wait.id = id;
c1d4: e5829020 str r9, [r2, #32]
executing->Wait.return_argument_second.immutable_object = buffer;
c1d8: e582a02c str sl, [r2, #44]
executing->Wait.option = (uint32_t) size;
c1dc: e5827030 str r7, [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;
c1e0: e5824044 str r4, [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 );
c1e4: e129f001 msr CPSR_fc, r1
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
c1e8: e59f209c ldr r2, [pc, #156] ; c28c <_CORE_message_queue_Submit+0x138>
c1ec: e1a00004 mov r0, r4
c1f0: e59d102c ldr r1, [sp, #44]
c1f4: eb00070f bl de38 <_Thread_queue_Enqueue_with_handler>
c1f8: e3a00007 mov r0, #7 ; 0x7
c1fc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
c200: eb0006aa bl dcb0 <_Thread_queue_Dequeue>
if ( the_thread ) {
c204: e2506000 subs r6, r0, #0 ; 0x0
c208: 05945048 ldreq r5, [r4, #72]
c20c: 0affffdd beq c188 <_CORE_message_queue_Submit+0x34>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
c210: e1a0100a mov r1, sl
c214: e596002c ldr r0, [r6, #44]
c218: e1a02007 mov r2, r7
c21c: eb001f22 bl 13eac <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
c220: e5963028 ldr r3, [r6, #40]
c224: e5837000 str r7, [r3]
the_thread->Wait.count = submit_type;
c228: e59d3024 ldr r3, [sp, #36]
c22c: e1a00005 mov r0, r5
c230: e5863024 str r3, [r6, #36]
c234: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
c238: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
}
c23c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
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 *)
c240: e2840068 add r0, r4, #104 ; 0x68
c244: eb0015bd bl 11940 <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
c248: e2505000 subs r5, r0, #0 ; 0x0
c24c: 0afffff9 beq c238 <_CORE_message_queue_Submit+0xe4>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
c250: e1a0100a mov r1, sl
c254: e1a02007 mov r2, r7
c258: e2850010 add r0, r5, #16 ; 0x10
c25c: eb001f12 bl 13eac <memcpy>
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
c260: e59d3024 ldr r3, [sp, #36]
c264: e5853008 str r3, [r5, #8]
_CORE_message_queue_Insert_message(
c268: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
c26c: e585700c str r7, [r5, #12]
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
c270: e1a01005 mov r1, r5
c274: e59d2024 ldr r2, [sp, #36]
c278: eb0015d4 bl 119d0 <_CORE_message_queue_Insert_message>
c27c: e3a00000 mov r0, #0 ; 0x0
c280: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000530c <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
530c: e92d40f0 push {r4, r5, r6, r7, lr}
5310: e1a05000 mov r5, r0
5314: e1a04002 mov r4, r2
5318: e1a07001 mov r7, r1
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
531c: e891000f ldm r1, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
5320: e3a06000 mov r6, #0 ; 0x0
if ( initial_lock == CORE_MUTEX_LOCKED ) {
5324: e3540000 cmp r4, #0 ; 0x0
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
5328: e285c040 add ip, r5, #64 ; 0x40
532c: e88c000f stm ip, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
5330: e5854050 str r4, [r5, #80]
the_mutex->blocked_count = 0;
5334: e5856058 str r6, [r5, #88]
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
5338: 15856060 strne r6, [r5, #96]
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
533c: 15856054 strne r6, [r5, #84]
the_mutex->holder = NULL;
5340: 1585605c strne r6, [r5, #92]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
5344: 1a00000b bne 5378 <_CORE_mutex_Initialize+0x6c>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
5348: e59f2070 ldr r2, [pc, #112] ; 53c0 <_CORE_mutex_Initialize+0xb4>
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
534c: e3a03001 mov r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
5350: e5921000 ldr r1, [r2]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
5354: e5853054 str r3, [r5, #84]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
5358: e5952048 ldr r2, [r5, #72]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
535c: e5913008 ldr r3, [r1, #8]
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5360: e3520002 cmp r2, #2 ; 0x2
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
5364: e5853060 str r3, [r5, #96]
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
5368: e585105c str r1, [r5, #92]
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
536c: 0a00000a beq 539c <_CORE_mutex_Initialize+0x90>
5370: e3520003 cmp r2, #3 ; 0x3
5374: 0a000008 beq 539c <_CORE_mutex_Initialize+0x90>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
5378: e5971008 ldr r1, [r7, #8]
537c: e1a00005 mov r0, r5
5380: e2511000 subs r1, r1, #0 ; 0x0
5384: 13a01001 movne r1, #1 ; 0x1
5388: e3a02b01 mov r2, #1024 ; 0x400
538c: e3a03005 mov r3, #5 ; 0x5
5390: eb000768 bl 7138 <_Thread_queue_Initialize>
5394: e3a00000 mov r0, #0 ; 0x0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
5398: e8bd80f0 pop {r4, r5, r6, r7, pc}
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
539c: e595304c ldr r3, [r5, #76]
53a0: e5912014 ldr r2, [r1, #20]
53a4: e1520003 cmp r2, r3
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
53a8: 2591301c ldrcs r3, [r1, #28]
53ac: 22833001 addcs r3, r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
53b0: 33a00006 movcc r0, #6 ; 0x6
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
53b4: 2581301c strcs r3, [r1, #28]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
53b8: 2affffee bcs 5378 <_CORE_mutex_Initialize+0x6c>
53bc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000a760 <_CORE_mutex_Seize_interrupt_trylock>:
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
a760: e59f313c ldr r3, [pc, #316] ; a8a4 <_CORE_mutex_Seize_interrupt_trylock+0x144>
a764: e593c000 ldr ip, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a768: e3a02000 mov r2, #0 ; 0x0
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a76c: e92d4010 push {r4, lr}
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
a770: e5914000 ldr r4, [r1]
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a774: e58c2034 str r2, [ip, #52]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a778: e5903050 ldr r3, [r0, #80]
a77c: e1530002 cmp r3, r2
a780: 0a00000d beq a7bc <_CORE_mutex_Seize_interrupt_trylock+0x5c>
the_mutex->lock = CORE_MUTEX_LOCKED;
a784: 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;
a788: e5901048 ldr r1, [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;
a78c: e59c2008 ldr r2, [ip, #8]
the_mutex->nest_count = 1;
a790: e3a03001 mov r3, #1 ; 0x1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a794: e3510002 cmp r1, #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;
a798: e5802060 str r2, [r0, #96]
the_mutex->nest_count = 1;
a79c: 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;
a7a0: 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 ) ||
a7a4: 0a000009 beq a7d0 <_CORE_mutex_Seize_interrupt_trylock+0x70>
a7a8: e3510003 cmp r1, #3 ; 0x3
a7ac: 0a000007 beq a7d0 <_CORE_mutex_Seize_interrupt_trylock+0x70>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( level );
a7b0: e129f004 msr CPSR_fc, r4
a7b4: e3a00000 mov r0, #0 ; 0x0
a7b8: e8bd8010 pop {r4, pc}
/*
* 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 ) ) {
a7bc: e590305c ldr r3, [r0, #92]
a7c0: e15c0003 cmp ip, r3
a7c4: 0a000017 beq a828 <_CORE_mutex_Seize_interrupt_trylock+0xc8>
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( level );
a7c8: e3a00001 mov r0, #1 ; 0x1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a7cc: e8bd8010 pop {r4, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a7d0: e59c301c ldr r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a7d4: e3510003 cmp r1, #3 ; 0x3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a7d8: e2833001 add r3, r3, #1 ; 0x1
a7dc: e58c301c str r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a7e0: 1afffff2 bne a7b0 <_CORE_mutex_Seize_interrupt_trylock+0x50>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a7e4: e590204c ldr r2, [r0, #76]
current = executing->current_priority;
a7e8: e59c3014 ldr r3, [ip, #20]
if ( current == ceiling ) {
a7ec: e1520003 cmp r2, r3
a7f0: 0a00001c beq a868 <_CORE_mutex_Seize_interrupt_trylock+0x108>
_ISR_Enable( level );
return 0;
}
if ( current > ceiling ) {
a7f4: 3a00001e bcc a874 <_CORE_mutex_Seize_interrupt_trylock+0x114>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a7f8: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a7fc: e3a02000 mov r2, #0 ; 0x0 <== 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;
a800: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a804: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a808: e5802054 str r2, [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;
a80c: e5801050 str r1, [r0, #80] <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
a810: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
a814: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
a818: e58c301c str r3, [ip, #28] <== NOT EXECUTED
_ISR_Enable( level );
a81c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a820: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a824: e8bd8010 pop {r4, pc} <== 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a828: e5903040 ldr r3, [r0, #64]
a82c: e3530000 cmp r3, #0 ; 0x0
a830: 0a000006 beq a850 <_CORE_mutex_Seize_interrupt_trylock+0xf0>
a834: e3530001 cmp r3, #1 ; 0x1
a838: 1affffe2 bne a7c8 <_CORE_mutex_Seize_interrupt_trylock+0x68>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a83c: e3a03002 mov r3, #2 ; 0x2
a840: e58c3034 str r3, [ip, #52]
_ISR_Enable( level );
a844: e129f004 msr CPSR_fc, r4
a848: e3a00000 mov r0, #0 ; 0x0
a84c: e8bd8010 pop {r4, pc}
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a850: e5903054 ldr r3, [r0, #84]
a854: e2833001 add r3, r3, #1 ; 0x1
a858: e5803054 str r3, [r0, #84]
_ISR_Enable( level );
a85c: e129f004 msr CPSR_fc, r4
a860: e3a00000 mov r0, #0 ; 0x0
a864: e8bd8010 pop {r4, pc}
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( level );
a868: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a86c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a870: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a874: e59f202c ldr r2, [pc, #44] ; a8a8 <_CORE_mutex_Seize_interrupt_trylock+0x148>
a878: e5923000 ldr r3, [r2]
a87c: e2833001 add r3, r3, #1 ; 0x1
a880: e5823000 str r3, [r2]
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( level );
a884: e129f004 msr CPSR_fc, r4
_Thread_Change_priority(
a888: e3a02000 mov r2, #0 ; 0x0
a88c: e590104c ldr r1, [r0, #76]
a890: e590005c ldr r0, [r0, #92]
a894: ebffeea1 bl 6320 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
a898: ebfff012 bl 68e8 <_Thread_Enable_dispatch>
a89c: e3a00000 mov r0, #0 ; 0x0
a8a0: e8bd8010 pop {r4, pc}
000054fc <_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 ) {
54fc: e5d03044 ldrb r3, [r0, #68]
5500: 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
)
{
5504: e92d4010 push {r4, lr}
5508: 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;
550c: 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 ) {
5510: 0a000004 beq 5528 <_CORE_mutex_Surrender+0x2c>
if ( !_Thread_Is_executing( holder ) )
5514: e59f3138 ldr r3, [pc, #312] ; 5654 <_CORE_mutex_Surrender+0x158>
5518: e5932000 ldr r2, [r3]
551c: e1500002 cmp r0, r2
5520: 13a00003 movne r0, #3 ; 0x3
5524: 18bd8010 popne {r4, pc}
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
5528: e5943054 ldr r3, [r4, #84]
552c: e3530000 cmp r3, #0 ; 0x0
5530: 0a000020 beq 55b8 <_CORE_mutex_Surrender+0xbc>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
5534: e2433001 sub r3, r3, #1 ; 0x1
if ( the_mutex->nest_count != 0 ) {
5538: 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--;
553c: e5843054 str r3, [r4, #84]
if ( the_mutex->nest_count != 0 ) {
5540: 1a00001e bne 55c0 <_CORE_mutex_Surrender+0xc4>
5544: e5942048 ldr r2, [r4, #72]
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
5548: e3520002 cmp r2, #2 ; 0x2
554c: 0a00002c beq 5604 <_CORE_mutex_Surrender+0x108>
5550: e3520003 cmp r2, #3 ; 0x3
5554: 0a00002a beq 5604 <_CORE_mutex_Surrender+0x108>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
5558: 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 ) ||
555c: 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;
5560: e5843060 str r3, [r4, #96]
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
5564: 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 ) ||
5568: 0a00001b beq 55dc <_CORE_mutex_Surrender+0xe0>
556c: e3520003 cmp r2, #3 ; 0x3
5570: 0a000019 beq 55dc <_CORE_mutex_Surrender+0xe0>
/*
* 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 ) ) ) {
5574: e1a00004 mov r0, r4
5578: eb0005c0 bl 6c80 <_Thread_queue_Dequeue>
557c: e2501000 subs r1, r0, #0 ; 0x0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
5580: 03a03001 moveq r3, #1 ; 0x1
5584: 05843050 streq r3, [r4, #80]
5588: 01a00001 moveq r0, r1
/*
* 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 ) ) ) {
558c: 08bd8010 popeq {r4, pc}
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
5590: e594c048 ldr ip, [r4, #72]
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
5594: e5912008 ldr r2, [r1, #8]
the_mutex->nest_count = 1;
5598: e3a03001 mov r3, #1 ; 0x1
switch ( the_mutex->Attributes.discipline ) {
559c: e35c0002 cmp ip, #2 ; 0x2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
55a0: e5842060 str r2, [r4, #96]
the_mutex->nest_count = 1;
55a4: e5843054 str r3, [r4, #84]
} else
#endif
{
the_mutex->holder = the_thread;
55a8: e584105c str r1, [r4, #92]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
55ac: 0a000023 beq 5640 <_CORE_mutex_Surrender+0x144>
55b0: e35c0003 cmp ip, #3 ; 0x3
55b4: 0a000016 beq 5614 <_CORE_mutex_Surrender+0x118>
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
55b8: e3a00000 mov r0, #0 ; 0x0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
55bc: e8bd8010 pop {r4, pc}
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
55c0: e5943040 ldr r3, [r4, #64]
55c4: e3530000 cmp r3, #0 ; 0x0
55c8: 0afffffa beq 55b8 <_CORE_mutex_Surrender+0xbc>
55cc: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
55d0: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED
55d4: 1affffda bne 5544 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED
55d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_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 &&
55dc: e590301c ldr r3, [r0, #28]
55e0: e3530000 cmp r3, #0 ; 0x0
55e4: 1affffe2 bne 5574 <_CORE_mutex_Surrender+0x78>
55e8: e5901018 ldr r1, [r0, #24]
55ec: e5903014 ldr r3, [r0, #20]
55f0: e1510003 cmp r1, r3
55f4: 0affffde beq 5574 <_CORE_mutex_Surrender+0x78>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
55f8: e3a02001 mov r2, #1 ; 0x1
55fc: eb000347 bl 6320 <_Thread_Change_priority>
5600: eaffffdb b 5574 <_CORE_mutex_Surrender+0x78>
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
5604: e590301c ldr r3, [r0, #28]
5608: e2433001 sub r3, r3, #1 ; 0x1
560c: e580301c str r3, [r0, #28]
5610: eaffffd0 b 5558 <_CORE_mutex_Surrender+0x5c>
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++;
5614: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
5618: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
561c: e581301c str r3, [r1, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
5620: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED
5624: e594104c ldr r1, [r4, #76] <== NOT EXECUTED
5628: e1510002 cmp r1, r2 <== NOT EXECUTED
562c: 2affffe1 bcs 55b8 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
5630: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
5634: eb000339 bl 6320 <_Thread_Change_priority> <== NOT EXECUTED
5638: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
563c: e8bd8010 pop {r4, pc} <== 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++;
5640: e591301c ldr r3, [r1, #28]
5644: e2833001 add r3, r3, #1 ; 0x1
5648: e581301c str r3, [r1, #28]
564c: e3a00000 mov r0, #0 ; 0x0
5650: e8bd8010 pop {r4, pc}
00005f54 <_CORE_spinlock_Release>:
CORE_spinlock_Control *the_spinlock
)
{
ISR_Level level;
_ISR_Disable( level );
5f54: e10fc000 mrs ip, CPSR
5f58: e38c30c0 orr r3, ip, #192 ; 0xc0
5f5c: e129f003 msr CPSR_fc, r3
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
5f60: e5903004 ldr r3, [r0, #4]
5f64: e3530000 cmp r3, #0 ; 0x0
5f68: 1a000002 bne 5f78 <_CORE_spinlock_Release+0x24>
_ISR_Enable( level );
5f6c: e129f00c msr CPSR_fc, ip
5f70: e3a00006 mov r0, #6 ; 0x6
5f74: e12fff1e bx lr
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
5f78: e59f3040 ldr r3, [pc, #64] ; 5fc0 <_CORE_spinlock_Release+0x6c>
5f7c: e5932000 ldr r2, [r3]
5f80: e590300c ldr r3, [r0, #12]
5f84: e5921008 ldr r1, [r2, #8]
5f88: e1530001 cmp r3, r1
5f8c: 0a000002 beq 5f9c <_CORE_spinlock_Release+0x48>
_ISR_Enable( level );
5f90: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
5f94: e3a00002 mov r0, #2 ; 0x2 <== NOT EXECUTED
5f98: e12fff1e bx lr <== NOT EXECUTED
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5f9c: e5903008 ldr r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5fa0: e3a02000 mov r2, #0 ; 0x0
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
5fa4: e2433001 sub r3, r3, #1 ; 0x1
5fa8: e5803008 str r3, [r0, #8]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
5fac: e5802004 str r2, [r0, #4]
the_spinlock->holder = 0;
5fb0: e580200c str r2, [r0, #12]
_ISR_Enable( level );
5fb4: e129f00c msr CPSR_fc, ip
5fb8: e3a00000 mov r0, #0 ; 0x0
return CORE_SPINLOCK_SUCCESSFUL;
}
5fbc: e12fff1e bx lr
00005fc4 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
5fc4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
5fc8: e59f8104 ldr r8, [pc, #260] ; 60d4 <_CORE_spinlock_Wait+0x110>
5fcc: e5983000 ldr r3, [r8]
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
5fd0: e1a06002 mov r6, r2
5fd4: e1a04000 mov r4, r0
5fd8: e201c0ff and ip, r1, #255 ; 0xff
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
5fdc: e0827003 add r7, r2, r3
_ISR_Disable( level );
5fe0: e10f0000 mrs r0, CPSR
5fe4: e38030c0 orr r3, r0, #192 ; 0xc0
5fe8: e129f003 msr CPSR_fc, r3
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
5fec: e5943004 ldr r3, [r4, #4]
5ff0: e3530001 cmp r3, #1 ; 0x1
5ff4: 0a000027 beq 6098 <_CORE_spinlock_Wait+0xd4>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
5ff8: e5943008 ldr r3, [r4, #8]
5ffc: e2833001 add r3, r3, #1 ; 0x1
6000: e5843008 str r3, [r4, #8]
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
6004: e5942004 ldr r2, [r4, #4]
6008: e3520000 cmp r2, #0 ; 0x0
600c: 0a000012 beq 605c <_CORE_spinlock_Wait+0x98>
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
6010: e35c0000 cmp ip, #0 ; 0x0
6014: 159f50bc ldrne r5, [pc, #188] ; 60d8 <_CORE_spinlock_Wait+0x114>
6018: 0a000018 beq 6080 <_CORE_spinlock_Wait+0xbc>
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
601c: e3560000 cmp r6, #0 ; 0x0
6020: 0a000002 beq 6030 <_CORE_spinlock_Wait+0x6c>
6024: e5983000 ldr r3, [r8] <== NOT EXECUTED
6028: e1570003 cmp r7, r3 <== NOT EXECUTED
602c: 9a000022 bls 60bc <_CORE_spinlock_Wait+0xf8> <== NOT EXECUTED
*
* A spinlock cannot be deleted while it is being used so we are
* safe from deletion.
*/
_ISR_Enable( level );
6030: e129f000 msr CPSR_fc, r0
/* An ISR could occur here */
_Thread_Enable_dispatch();
6034: eb000489 bl 7260 <_Thread_Enable_dispatch>
6038: e5953000 ldr r3, [r5]
603c: e2833001 add r3, r3, #1 ; 0x1
6040: e5853000 str r3, [r5]
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
6044: e10f0000 mrs r0, CPSR
6048: e38030c0 orr r3, r0, #192 ; 0xc0
604c: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
6050: e5943004 ldr r3, [r4, #4]
6054: e3530000 cmp r3, #0 ; 0x0
6058: 1affffef bne 601c <_CORE_spinlock_Wait+0x58>
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
the_spinlock->holder = _Thread_Executing->Object.id;
605c: e59f2078 ldr r2, [pc, #120] ; 60dc <_CORE_spinlock_Wait+0x118>
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
6060: e3a03001 mov r3, #1 ; 0x1
6064: e5843004 str r3, [r4, #4]
the_spinlock->holder = _Thread_Executing->Object.id;
6068: e5923000 ldr r3, [r2]
606c: e5931008 ldr r1, [r3, #8]
6070: e584100c str r1, [r4, #12]
_ISR_Enable( level );
6074: e129f000 msr CPSR_fc, r0
6078: e3a00000 mov r0, #0 ; 0x0
607c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
6080: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
6084: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
6088: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
608c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
6090: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED
6094: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
_ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
6098: e59f303c ldr r3, [pc, #60] ; 60dc <_CORE_spinlock_Wait+0x118>
609c: e5932000 ldr r2, [r3]
60a0: e594300c ldr r3, [r4, #12]
60a4: e5921008 ldr r1, [r2, #8]
60a8: e1530001 cmp r3, r1
60ac: 1affffd1 bne 5ff8 <_CORE_spinlock_Wait+0x34>
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
60b0: e129f000 msr CPSR_fc, r0
60b4: e3a00001 mov r0, #1 ; 0x1
60b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
the_spinlock->users -= 1;
60bc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
60c0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
60c4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
_ISR_Enable( level );
60c8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
60cc: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
60d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000a640 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
a640: e59f3010 ldr r3, [pc, #16] ; a658 <_Debug_Is_enabled+0x18> <== NOT EXECUTED
a644: e5932000 ldr r2, [r3] <== NOT EXECUTED
a648: e1100002 tst r0, r2 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
a64c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
a650: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED
a654: e12fff1e bx lr <== NOT EXECUTED
0000a170 <_Dual_ported_memory_Manager_initialization>:
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
a170: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a174: e3a0c01c mov ip, #28 ; 0x1c
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
a178: e24dd00c sub sp, sp, #12 ; 0xc
a17c: e1a03000 mov r3, r0
_Objects_Initialize_information(
a180: e58dc000 str ip, [sp]
a184: e3a0e000 mov lr, #0 ; 0x0
a188: e24cc018 sub ip, ip, #24 ; 0x18
a18c: e59f0018 ldr r0, [pc, #24] ; a1ac <_Dual_ported_memory_Manager_initialization+0x3c>
a190: e3a01002 mov r1, #2 ; 0x2
a194: e3a02007 mov r2, #7 ; 0x7
a198: e58de004 str lr, [sp, #4]
a19c: e58dc008 str ip, [sp, #8]
a1a0: ebffefa8 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a1a4: e28dd00c add sp, sp, #12 ; 0xc
a1a8: e8bd8000 pop {pc}
000041e4 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41e4: e59fc108 ldr ip, [pc, #264] ; 42f4 <_Event_Seize+0x110> <== NOT EXECUTED
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41ec: e59c5000 ldr r5, [ip] <== NOT EXECUTED
executing->Wait.return_code = RTEMS_SUCCESSFUL;
41f0: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED
41f4: e5854034 str r4, [r5, #52] <== NOT EXECUTED
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41f8: e1a08002 mov r8, r2 <== NOT EXECUTED
41fc: e1a07003 mov r7, r3 <== NOT EXECUTED
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4200: e5954104 ldr r4, [r5, #260] <== NOT EXECUTED
_ISR_Disable( level );
4204: e10f6000 mrs r6, CPSR <== NOT EXECUTED
4208: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED
420c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
pending_events = api->pending_events;
4210: e5942000 ldr r2, [r4] <== NOT EXECUTED
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
4214: e010c002 ands ip, r0, r2 <== NOT EXECUTED
4218: 0a000003 beq 422c <_Event_Seize+0x48> <== NOT EXECUTED
421c: e150000c cmp r0, ip <== NOT EXECUTED
4220: 0a00001f beq 42a4 <_Event_Seize+0xc0> <== NOT EXECUTED
4224: e3110002 tst r1, #2 ; 0x2 <== NOT EXECUTED
4228: 1a00001d bne 42a4 <_Event_Seize+0xc0> <== NOT EXECUTED
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
422c: e3110001 tst r1, #1 ; 0x1 <== NOT EXECUTED
4230: 1a000016 bne 4290 <_Event_Seize+0xac> <== NOT EXECUTED
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4234: e59f40bc ldr r4, [pc, #188] ; 42f8 <_Event_Seize+0x114> <== NOT EXECUTED
4238: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
423c: e5843000 str r3, [r4] <== NOT EXECUTED
executing->Wait.option = (uint32_t) option_set;
4240: e5851030 str r1, [r5, #48] <== NOT EXECUTED
executing->Wait.count = (uint32_t) event_in;
4244: e5850024 str r0, [r5, #36] <== NOT EXECUTED
executing->Wait.return_argument = event_out;
4248: e5857028 str r7, [r5, #40] <== NOT EXECUTED
_ISR_Enable( level );
424c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
if ( ticks ) {
4250: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
4254: 1a00001a bne 42c4 <_Event_Seize+0xe0> <== NOT EXECUTED
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4258: e1a00005 mov r0, r5 <== NOT EXECUTED
425c: e3a01c01 mov r1, #256 ; 0x100 <== NOT EXECUTED
4260: eb000c24 bl 72f8 <_Thread_Set_state> <== NOT EXECUTED
_ISR_Disable( level );
4264: e10f2000 mrs r2, CPSR <== NOT EXECUTED
4268: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED
426c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
sync_state = _Event_Sync_state;
4270: e5940000 ldr r0, [r4] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4274: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4278: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
427c: e5843000 str r3, [r4] <== NOT EXECUTED
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4280: 0a00000d beq 42bc <_Event_Seize+0xd8> <== 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 );
4284: e1a01005 mov r1, r5 <== NOT EXECUTED
}
4288: e8bd41f0 pop {r4, r5, r6, r7, r8, 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 );
428c: ea00080f b 62d0 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
4290: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
executing->Wait.return_code = RTEMS_UNSATISFIED;
4294: e3a0300d mov r3, #13 ; 0xd <== NOT EXECUTED
4298: e5853034 str r3, [r5, #52] <== NOT EXECUTED
*event_out = seized_events;
429c: e587c000 str ip, [r7] <== NOT EXECUTED
42a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
42a4: e1e0300c mvn r3, ip <== NOT EXECUTED
42a8: e0033002 and r3, r3, r2 <== NOT EXECUTED
42ac: e5843000 str r3, [r4] <== NOT EXECUTED
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
42b0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
*event_out = seized_events;
42b4: e587c000 str ip, [r7] <== NOT EXECUTED
42b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
42bc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
42c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
42c4: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
42c8: e59f202c ldr r2, [pc, #44] ; 42fc <_Event_Seize+0x118> <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42cc: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
42d0: e585106c str r1, [r5, #108] <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42d4: e5851050 str r1, [r5, #80] <== NOT EXECUTED
the_watchdog->routine = routine;
42d8: e5852064 str r2, [r5, #100] <== NOT EXECUTED
the_watchdog->id = id;
42dc: e5853068 str r3, [r5, #104] <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
42e0: e5858054 str r8, [r5, #84] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
42e4: e59f0014 ldr r0, [pc, #20] ; 4300 <_Event_Seize+0x11c> <== NOT EXECUTED
42e8: e2851048 add r1, r5, #72 ; 0x48 <== NOT EXECUTED
42ec: eb000e03 bl 7b00 <_Watchdog_Insert> <== NOT EXECUTED
42f0: eaffffd8 b 4258 <_Event_Seize+0x74> <== NOT EXECUTED
0000435c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
435c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
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 ];
4360: e590c104 ldr ip, [r0, #260]
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4364: e1a04000 mov r4, r0
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
4368: e5907030 ldr r7, [r0, #48]
_ISR_Disable( level );
436c: e10f6000 mrs r6, CPSR
4370: e38630c0 orr r3, r6, #192 ; 0xc0
4374: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
4378: e59c0000 ldr r0, [ip]
event_condition = (rtems_event_set) the_thread->Wait.count;
437c: e5941024 ldr r1, [r4, #36]
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
4380: e0115000 ands r5, r1, r0
4384: 0a000024 beq 441c <_Event_Surrender+0xc0>
/*
* 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() &&
4388: e59f3118 ldr r3, [pc, #280] ; 44a8 <_Event_Surrender+0x14c>
438c: e5932000 ldr r2, [r3]
4390: e3520000 cmp r2, #0 ; 0x0
4394: 0a000003 beq 43a8 <_Event_Surrender+0x4c>
4398: e59f310c ldr r3, [pc, #268] ; 44ac <_Event_Surrender+0x150>
439c: e5932000 ldr r2, [r3]
43a0: e1540002 cmp r4, r2
43a4: 0a000029 beq 4450 <_Event_Surrender+0xf4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
43a8: e5943010 ldr r3, [r4, #16]
43ac: e3130c01 tst r3, #256 ; 0x100
43b0: 0a000017 beq 4414 <_Event_Surrender+0xb8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
43b4: e1510005 cmp r1, r5
43b8: 0a000001 beq 43c4 <_Event_Surrender+0x68>
43bc: e3170002 tst r7, #2 ; 0x2
43c0: 0a000013 beq 4414 <_Event_Surrender+0xb8>
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43c4: e1e03005 mvn r3, r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43c8: e5941028 ldr r1, [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 );
43cc: e0033000 and r3, r3, r0
the_thread->Wait.count = 0;
43d0: e3a02000 mov r2, #0 ; 0x0
/*
* 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 );
43d4: e58c3000 str r3, [ip]
the_thread->Wait.count = 0;
43d8: e5842024 str r2, [r4, #36]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43dc: e5815000 str r5, [r1]
_ISR_Flash( level );
43e0: e10f3000 mrs r3, CPSR
43e4: e129f006 msr CPSR_fc, r6
43e8: e129f003 msr CPSR_fc, r3
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
43ec: e5943050 ldr r3, [r4, #80]
43f0: e3530002 cmp r3, #2 ; 0x2
43f4: 0a00000a beq 4424 <_Event_Surrender+0xc8>
_ISR_Enable( level );
43f8: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
43fc: e3a01201 mov r1, #268435456 ; 0x10000000
4400: e2811bff add r1, r1, #261120 ; 0x3fc00
4404: e1a00004 mov r0, r4
4408: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
440c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
4410: ea00082d b 64cc <_Thread_Clear_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4414: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
4418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
441c: e129f006 msr CPSR_fc, r6
4420: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4424: e3a03003 mov r3, #3 ; 0x3
4428: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
442c: e129f006 msr CPSR_fc, r6
(void) _Watchdog_Remove( &the_thread->Timer );
4430: e2840048 add r0, r4, #72 ; 0x48
4434: eb000e20 bl 7cbc <_Watchdog_Remove>
4438: e3a01201 mov r1, #268435456 ; 0x10000000
443c: e2811bff add r1, r1, #261120 ; 0x3fc00
4440: e1a00004 mov r0, r4
4444: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
4448: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
444c: ea00081e b 64cc <_Thread_Clear_state>
/*
* 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() &&
4450: e59f8058 ldr r8, [pc, #88] ; 44b0 <_Event_Surrender+0x154> <== NOT EXECUTED
4454: e5983000 ldr r3, [r8] <== NOT EXECUTED
4458: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
445c: 0a000002 beq 446c <_Event_Surrender+0x110> <== NOT EXECUTED
4460: e5983000 ldr r3, [r8] <== NOT EXECUTED
4464: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
4468: 1affffce bne 43a8 <_Event_Surrender+0x4c> <== 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) ) {
446c: e1510005 cmp r1, r5 <== NOT EXECUTED
4470: 0a000001 beq 447c <_Event_Surrender+0x120> <== NOT EXECUTED
4474: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED
4478: 0a000008 beq 44a0 <_Event_Surrender+0x144> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
447c: e1e03005 mvn r3, r5 <== NOT EXECUTED
4480: e0033000 and r3, r3, r0 <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4484: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED
if ( _ISR_Is_in_progress() &&
_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 );
4488: e58c3000 str r3, [ip] <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
448c: e3a02003 mov r2, #3 ; 0x3 <== 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;
4490: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
4494: e5843024 str r3, [r4, #36] <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4498: e5882000 str r2, [r8] <== 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;
449c: e5815000 str r5, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
44a0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
44a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000044b4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
44b4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
44b8: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
44bc: e1a0100d mov r1, sp
44c0: eb000911 bl 690c <_Thread_Get>
switch ( location ) {
44c4: e59d1000 ldr r1, [sp]
44c8: e3510000 cmp r1, #0 ; 0x0
44cc: 1a000015 bne 4528 <_Event_Timeout+0x74>
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
44d0: e10fc000 mrs ip, CPSR
44d4: e38c30c0 orr r3, ip, #192 ; 0xc0
44d8: e129f003 msr CPSR_fc, r3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
44dc: e5903024 ldr r3, [r0, #36]
44e0: e3530000 cmp r3, #0 ; 0x0
44e4: 0a000011 beq 4530 <_Event_Timeout+0x7c>
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
44e8: e59f3070 ldr r3, [pc, #112] ; 4560 <_Event_Timeout+0xac>
44ec: e5932000 ldr r2, [r3]
44f0: e1500002 cmp r0, r2
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
44f4: e5801024 str r1, [r0, #36]
if ( _Thread_Is_executing( the_thread ) ) {
44f8: 0a000012 beq 4548 <_Event_Timeout+0x94>
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
44fc: e3a03006 mov r3, #6 ; 0x6
4500: e5803034 str r3, [r0, #52]
_ISR_Enable( level );
4504: e129f00c msr CPSR_fc, ip
4508: e3a01201 mov r1, #268435456 ; 0x10000000
450c: e2811bff add r1, r1, #261120 ; 0x3fc00
4510: e2811ffe add r1, r1, #1016 ; 0x3f8
4514: eb0007ec bl 64cc <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4518: e59f2044 ldr r2, [pc, #68] ; 4564 <_Event_Timeout+0xb0>
451c: e5923000 ldr r3, [r2]
4520: e2433001 sub r3, r3, #1 ; 0x1
4524: e5823000 str r3, [r2]
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4528: e28dd004 add sp, sp, #4 ; 0x4
452c: e8bd8000 pop {pc}
4530: e59f202c ldr r2, [pc, #44] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED
4534: e5923000 ldr r3, [r2] <== NOT EXECUTED
4538: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
453c: e5823000 str r3, [r2] <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
4540: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
4544: eafffff7 b 4528 <_Event_Timeout+0x74> <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
4548: e59f2018 ldr r2, [pc, #24] ; 4568 <_Event_Timeout+0xb4> <== NOT EXECUTED
454c: e5923000 ldr r3, [r2] <== NOT EXECUTED
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
4550: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4554: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED
4558: 95823000 strls r3, [r2] <== NOT EXECUTED
455c: eaffffe6 b 44fc <_Event_Timeout+0x48> <== NOT EXECUTED
00008658 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8658: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
865c: e5909010 ldr r9, [r0, #16]
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8660: e1a07000 mov r7, r0
8664: e1a03001 mov r3, r1
8668: e24dd010 sub sp, sp, #16 ; 0x10
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
866c: e1a00001 mov r0, r1
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
8670: e2433004 sub r3, r3, #4 ; 0x4
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
8674: e1a0b002 mov fp, r2
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
8678: e1a01009 mov r1, r9
867c: e5972014 ldr r2, [r7, #20]
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
8680: e58d3004 str r3, [sp, #4]
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
8684: eb000163 bl 8c18 <_Heap_Calc_block_size>
if(the_size == 0)
8688: e3500000 cmp r0, #0 ; 0x0
868c: e58d0008 str r0, [sp, #8]
8690: 0a000064 beq 8828 <_Heap_Allocate_aligned+0x1d0>
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
8694: e5975008 ldr r5, [r7, #8]
return NULL;
if(alignment == 0)
8698: e35b0000 cmp fp, #0 ; 0x0
869c: 03a0b004 moveq fp, #4 ; 0x4
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
86a0: e1570005 cmp r7, r5
86a4: 0a00005f beq 8828 <_Heap_Allocate_aligned+0x1d0>
86a8: e3a0a000 mov sl, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
86ac: e5953004 ldr r3, [r5, #4]
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
86b0: e59d1008 ldr r1, [sp, #8]
86b4: e3c36001 bic r6, r3, #1 ; 0x1
86b8: e1510006 cmp r1, r6
86bc: 8a000023 bhi 8750 <_Heap_Allocate_aligned+0xf8>
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
aligned_user_addr = block_end - end_to_user_offs;
86c0: e59d3004 ldr r3, [sp, #4]
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
86c4: e0852006 add r2, r5, r6
aligned_user_addr = block_end - end_to_user_offs;
86c8: e0634002 rsb r4, r3, r2
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
86cc: e1a0100b mov r1, fp
86d0: e1a00004 mov r0, r4
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
86d4: e58d200c str r2, [sp, #12]
86d8: eb003e93 bl 1812c <__umodsi3>
86dc: e0608004 rsb r8, r0, r4
if(block_size >= the_size) { /* the_block is large enough. */
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
86e0: e1a00008 mov r0, r8
86e4: e1a01009 mov r1, r9
86e8: eb003e8f bl 1812c <__umodsi3>
86ec: e2854008 add r4, r5, #8 ; 0x8
86f0: e0602008 rsb r2, r0, r8
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
86f4: e1540002 cmp r4, r2
86f8: 8a000014 bhi 8750 <_Heap_Allocate_aligned+0xf8>
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
86fc: e597c014 ldr ip, [r7, #20]
8700: e0643002 rsb r3, r4, r2
8704: e153000c cmp r3, ip
8708: 2a00001c bcs 8780 <_Heap_Allocate_aligned+0x128>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
870c: e0643008 rsb r3, r4, r8
8710: e1590003 cmp r9, r3
8714: 81a02004 movhi r2, r4
8718: 8a000018 bhi 8780 <_Heap_Allocate_aligned+0x128>
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
871c: e1a00004 mov r0, r4
8720: e1a0100b mov r1, fp
8724: e58dc000 str ip, [sp]
8728: eb003e7f bl 1812c <__umodsi3>
*value = r ? v - r + a : v;
872c: e3500000 cmp r0, #0 ; 0x0
8730: 1084300b addne r3, r4, fp
8734: 10600003 rsbne r0, r0, r3
8738: 01a03000 moveq r3, r0
873c: 10643000 rsbne r3, r4, r0
8740: 01a00004 moveq r0, r4
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
8744: e1590003 cmp r9, r3
8748: e59dc000 ldr ip, [sp]
874c: 8a000009 bhi 8778 <_Heap_Allocate_aligned+0x120>
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
8750: e5955008 ldr r5, [r5, #8]
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
8754: e1570005 cmp r7, r5
the_block = the_block->next, ++search_count)
8758: e28aa001 add sl, sl, #1 ; 0x1
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
875c: 1affffd2 bne 86ac <_Heap_Allocate_aligned+0x54>
8760: e3a00000 mov r0, #0 ; 0x0
}
}
}
}
if(stats->max_search < search_count)
8764: e5973044 ldr r3, [r7, #68]
8768: e153000a cmp r3, sl
stats->max_search = search_count;
876c: 3587a044 strcc sl, [r7, #68]
return user_ptr;
}
8770: e28dd010 add sp, sp, #16 ; 0x10
8774: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
8778: e1a02004 mov r2, r4
877c: e1a08000 mov r8, r0
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
8780: e3580000 cmp r8, #0 ; 0x0
8784: 0afffff1 beq 8750 <_Heap_Allocate_aligned+0xf8>
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
8788: e59d100c ldr r1, [sp, #12]
878c: e2813008 add r3, r1, #8 ; 0x8
8790: e0624003 rsb r4, r2, r3
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
8794: e0642006 rsb r2, r4, r6
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
8798: e152000c cmp r2, ip
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
879c: 23823001 orrcs r3, r2, #1 ; 0x1
87a0: 25853004 strcs r3, [r5, #4]
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
87a4: 27a52002 strcs r2, [r5, r2]!
the_block->size = alloc_size;
87a8: 25854004 strcs r4, [r5, #4]
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
87ac: 2a000007 bcs 87d0 <_Heap_Allocate_aligned+0x178>
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
87b0: e5973038 ldr r3, [r7, #56]
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
87b4: e2851008 add r1, r5, #8 ; 0x8
87b8: e8910006 ldm r1, {r1, r2}
87bc: e2433001 sub r3, r3, #1 ; 0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
87c0: e581200c str r2, [r1, #12]
87c4: e5873038 str r3, [r7, #56]
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
87c8: e5821008 str r1, [r2, #8]
87cc: e1a04006 mov r4, r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
87d0: e0852004 add r2, r5, r4
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
87d4: e5923004 ldr r3, [r2, #4]
87d8: e3833001 orr r3, r3, #1 ; 0x1
87dc: e5823004 str r3, [r2, #4]
/* Update statistics */
stats->free_size -= alloc_size;
87e0: e2871030 add r1, r7, #48 ; 0x30
87e4: e891000a ldm r1, {r1, r3}
87e8: e0641001 rsb r1, r4, r1
if(stats->min_free_size > stats->free_size)
87ec: e1510003 cmp r1, r3
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
87f0: e597304c ldr r3, [r7, #76]
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
87f4: e5972040 ldr r2, [r7, #64]
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
87f8: e5871030 str r1, [r7, #48]
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
87fc: 35871034 strcc r1, [r7, #52]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
8800: e5971048 ldr r1, [r7, #72]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8804: e2833001 add r3, r3, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
8808: e2822001 add r2, r2, #1 ; 0x1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
880c: e083300a add r3, r3, sl
stats->allocs += 1;
8810: e2811001 add r1, r1, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
8814: e5872040 str r2, [r7, #64]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8818: e587304c str r3, [r7, #76]
stats->allocs += 1;
881c: e5871048 str r1, [r7, #72]
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
8820: e1a00008 mov r0, r8
8824: eaffffce b 8764 <_Heap_Allocate_aligned+0x10c>
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
8828: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
882c: eaffffcf b 8770 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED
0000e14c <_Heap_Get_information>:
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
e14c: e92d0070 push {r4, r5, r6}
Heap_Block *the_block = the_heap->start;
e150: e2802020 add r2, r0, #32 ; 0x20
e154: e8920044 ldm r2, {r2, r6}
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;
e158: e3a03000 mov r3, #0 ; 0x0
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
e15c: e1520006 cmp r2, r6
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
e160: 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;
e164: e5813010 str r3, [r1, #16]
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;
e168: e5813000 str r3, [r1]
the_info->Free.total = 0;
e16c: e5813008 str r3, [r1, #8]
the_info->Free.largest = 0;
e170: e5813004 str r3, [r1, #4]
the_info->Used.number = 0;
e174: e581300c str r3, [r1, #12]
the_info->Used.total = 0;
e178: e5813014 str r3, [r1, #20]
the_info->Used.largest = 0;
while ( the_block != end ) {
e17c: 0a000020 beq e204 <_Heap_Get_information+0xb8>
e180: e5925004 ldr r5, [r2, #4]
e184: ea00000b b e1b8 <_Heap_Get_information+0x6c>
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++;
e188: e59c300c ldr r3, [ip, #12]
the_info->Used.total += the_size;
e18c: e59c1014 ldr r1, [ip, #20]
if ( the_info->Used.largest < the_size )
e190: 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++;
e194: e2833001 add r3, r3, #1 ; 0x1
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
e198: 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;
e19c: 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++;
e1a0: e58c300c str r3, [ip, #12]
the_info->Used.total += the_size;
e1a4: e58c1014 str r1, [ip, #20]
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
e1a8: 358c0010 strcc r0, [ip, #16]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
e1ac: e1560004 cmp r6, r4
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
e1b0: 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 ) {
e1b4: 0a000012 beq e204 <_Heap_Get_information+0xb8>
e1b8: e3c50001 bic r0, r5, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
e1bc: e0824000 add r4, r2, r0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e1c0: e5945004 ldr r5, [r4, #4]
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) ) {
e1c4: e3150001 tst r5, #1 ; 0x1
e1c8: 1affffee bne e188 <_Heap_Get_information+0x3c>
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++;
e1cc: e59c3000 ldr r3, [ip]
the_info->Free.total += the_size;
e1d0: e59c1008 ldr r1, [ip, #8]
if ( the_info->Free.largest < the_size )
e1d4: 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++;
e1d8: e2833001 add r3, r3, #1 ; 0x1
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
e1dc: 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;
e1e0: e0811000 add r1, r1, r0
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
e1e4: 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++;
e1e8: e58c3000 str r3, [ip]
the_info->Free.total += the_size;
e1ec: 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 )
e1f0: e5943000 ldr r3, [r4]
e1f4: e1530000 cmp r3, r0
e1f8: 0affffeb beq e1ac <_Heap_Get_information+0x60>
e1fc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
e200: ea000003 b e214 <_Heap_Get_information+0xc8> <== NOT EXECUTED
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
e204: e59c3014 ldr r3, [ip, #20]
e208: e2833008 add r3, r3, #8 ; 0x8
e20c: e58c3014 str r3, [ip, #20]
e210: e3a00000 mov r0, #0 ; 0x0
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
e214: e8bd0070 pop {r4, r5, r6}
e218: e12fff1e bx lr
00014bf4 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14bf4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
14bf8: e24dd00c sub sp, sp, #12 ; 0xc
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;
*avail_mem_size = 0;
14bfc: e59dc030 ldr ip, [sp, #48]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14c00: e1a05000 mov r5, r0
14c04: 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;
14c08: e3a03000 mov r3, #0 ; 0x0
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;
14c0c: e5900014 ldr r0, [r0, #20]
uint32_t const page_size = the_heap->page_size;
14c10: e595b010 ldr fp, [r5, #16]
*old_mem_size = 0;
14c14: e5893000 str r3, [r9]
*avail_mem_size = 0;
14c18: e58c3000 str r3, [ip]
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;
14c1c: e58d0004 str r0, [sp, #4]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
14c20: 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);
14c24: e1a00001 mov r0, r1
14c28: e5951010 ldr r1, [r5, #16]
14c2c: e1a08002 mov r8, r2
14c30: ebfff862 bl 12dc0 <__umodsi3>
14c34: e2442008 sub r2, 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 );
14c38: e595c020 ldr ip, [r5, #32]
14c3c: e5951024 ldr r1, [r5, #36]
/* 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);
14c40: e0606002 rsb r6, r0, r2
*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))
14c44: e156000c cmp r6, ip
14c48: 33a03000 movcc r3, #0 ; 0x0
14c4c: 23a03001 movcs r3, #1 ; 0x1
14c50: e1560001 cmp r6, r1
14c54: 83a03000 movhi r3, #0 ; 0x0
14c58: e3530000 cmp r3, #0 ; 0x0
14c5c: 0a00002d beq 14d18 <_Heap_Resize_block+0x124>
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
14c60: e5962004 ldr r2, [r6, #4]
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14c64: e3c2a001 bic sl, r2, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14c68: e086700a add r7, r6, sl
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) ||
14c6c: e15c0007 cmp ip, r7
14c70: 83a03000 movhi r3, #0 ; 0x0
14c74: 93a03001 movls r3, #1 ; 0x1
14c78: e1510007 cmp r1, r7
14c7c: 33a03000 movcc r3, #0 ; 0x0
14c80: e3530000 cmp r3, #0 ; 0x0
14c84: 0a000023 beq 14d18 <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
14c88: e5973004 ldr r3, [r7, #4]
14c8c: e3130001 tst r3, #1 ; 0x1
14c90: 0a000020 beq 14d18 <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14c94: e3c33001 bic r3, 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) ||
14c98: e1510007 cmp r1, r7
14c9c: e58d3000 str r3, [sp]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14ca0: e0873003 add r3, r7, r3
14ca4: 15933004 ldrne r3, [r3, #4]
14ca8: 12033001 andne r3, r3, #1 ; 0x1
14cac: 03a00001 moveq r0, #1 ; 0x1
14cb0: 158d3008 strne r3, [sp, #8]
_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)
14cb4: e0643007 rsb r3, r4, r7
!_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) ||
14cb8: 058d0008 streq r0, [sp, #8]
_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)
14cbc: e2830004 add r0, r3, #4 ; 0x4
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
14cc0: e1500008 cmp r0, r8
/* 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;
14cc4: e5890000 str r0, [r9]
_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;
14cc8: e2029001 and r9, 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) {
14ccc: 2a000014 bcs 14d24 <_Heap_Resize_block+0x130>
/* 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 */
14cd0: e59d1008 ldr r1, [sp, #8]
14cd4: e3510000 cmp r1, #0 ; 0x0
14cd8: 1a00000c bne 14d10 <_Heap_Resize_block+0x11c>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
14cdc: e0604008 rsb r4, r0, r8
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
14ce0: e1a00004 mov r0, r4
14ce4: e1a0100b mov r1, fp
14ce8: ebfff834 bl 12dc0 <__umodsi3>
*value = r ? v - r + a : v;
14cec: e3500000 cmp r0, #0 ; 0x0
14cf0: 1084300b addne r3, r4, fp
14cf4: e59d2004 ldr r2, [sp, #4]
14cf8: 10604003 rsbne r4, r0, r3
_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)
14cfc: e59d3000 ldr r3, [sp]
14d00: e1540002 cmp r4, r2
14d04: 21a02004 movcs r2, r4
14d08: e1530002 cmp r3, r2
14d0c: 2a000049 bcs 14e38 <_Heap_Resize_block+0x244>
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
14d10: e3a00001 mov r0, #1 ; 0x1
14d14: ea000000 b 14d1c <_Heap_Resize_block+0x128>
14d18: e3a00002 mov r0, #2 ; 0x2
}
14d1c: e28dd00c add sp, sp, #12 ; 0xc
14d20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
14d24: e0684000 rsb r4, r8, r0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
14d28: e1a00004 mov r0, r4
14d2c: e1a0100b mov r1, fp
14d30: ebfff822 bl 12dc0 <__umodsi3>
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
14d34: e0544000 subs r4, r4, r0
14d38: 0a000020 beq 14dc0 <_Heap_Resize_block+0x1cc>
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;
if (new_block_size < min_block_size) {
14d3c: e59dc004 ldr ip, [sp, #4]
/* 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;
14d40: e064000a rsb r0, r4, sl
if (new_block_size < min_block_size) {
14d44: e15c0000 cmp ip, r0
14d48: 9a000021 bls 14dd4 <_Heap_Resize_block+0x1e0>
uint32_t delta = min_block_size - new_block_size;
14d4c: e060300c rsb r3, r0, ip
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
14d50: e0544003 subs r4, r4, r3
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
14d54: 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) {
14d58: 1a00001d bne 14dd4 <_Heap_Resize_block+0x1e0>
++stats->resizes;
14d5c: e5953054 ldr r3, [r5, #84]
14d60: e2833001 add r3, r3, #1 ; 0x1
14d64: e5853054 str r3, [r5, #84]
14d68: e1a00004 mov r0, r4
14d6c: eaffffea b 14d1c <_Heap_Resize_block+0x128>
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;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
14d70: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
14d74: e15c0004 cmp ip, r4 <== NOT EXECUTED
14d78: 8a000010 bhi 14dc0 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14d7c: e0861000 add r1, r6, r0 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14d80: 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;
14d84: 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;
14d88: e5863004 str r3, [r6, #4] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14d8c: e5812004 str r2, [r1, #4] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
14d90: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14d94: 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 */
14d98: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14d9c: 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 */
14da0: e5853040 str r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14da4: e5852050 str r2, [r5, #80] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
14da8: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED
14dac: e1a00005 mov r0, r5 <== NOT EXECUTED
14db0: ebffd70a bl a9e0 <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
14db4: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED
14db8: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED
14dbc: e5803000 str r3, [r0] <== NOT EXECUTED
}
}
}
++stats->resizes;
14dc0: e5953054 ldr r3, [r5, #84]
14dc4: e2833001 add r3, r3, #1 ; 0x1
14dc8: e5853054 str r3, [r5, #84]
14dcc: e3a00000 mov r0, #0 ; 0x0
14dd0: eaffffd1 b 14d1c <_Heap_Resize_block+0x128>
_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) {
14dd4: e59d1008 ldr r1, [sp, #8]
14dd8: e3510000 cmp r1, #0 ; 0x0
14ddc: 1affffe3 bne 14d70 <_Heap_Resize_block+0x17c>
/* 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;
14de0: e59d3000 ldr r3, [sp]
_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;
next_next_block->prev_size = new_next_block_size;
14de4: e59dc000 ldr ip, [sp]
if (!next_is_used) {
/* 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;
14de8: e0842003 add r2, r4, r3
14dec: e0861000 add r1, r6, r0
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
14df0: e1803009 orr r3, r0, r9
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14df4: e3820001 orr r0, r2, #1 ; 0x1
next_next_block->prev_size = new_next_block_size;
14df8: e787200c str r2, [r7, ip]
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;
14dfc: e5863004 str r3, [r6, #4]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
14e00: 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;
14e04: e5953030 ldr r3, [r5, #48]
14e08: e0833004 add r3, r3, r4
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
14e0c: e597000c ldr r0, [r7, #12]
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
14e10: e597c008 ldr ip, [r7, #8]
14e14: e5853030 str r3, [r5, #48]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
14e18: e59d3030 ldr r3, [sp, #48]
14e1c: e2422004 sub r2, r2, #4 ; 0x4
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
14e20: e581c008 str ip, [r1, #8]
block->prev = prev;
14e24: e581000c str r0, [r1, #12]
14e28: e5832000 str r2, [r3]
next->prev = prev->next = block;
14e2c: e5801008 str r1, [r0, #8]
14e30: e58c100c str r1, [ip, #12]
14e34: eaffffe1 b 14dc0 <_Heap_Resize_block+0x1cc>
_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)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
14e38: e1a01007 mov r1, r7
14e3c: e1a00005 mov r0, r5
14e40: ebffc2d3 bl 5994 <_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;
14e44: e080000a add r0, r0, sl
14e48: e1800009 orr r0, r0, r9
14e4c: e5860004 str r0, [r6, #4]
--stats->used_blocks;
14e50: e5953040 ldr r3, [r5, #64]
14e54: e2433001 sub r3, r3, #1 ; 0x1
14e58: e5853040 str r3, [r5, #64]
14e5c: eaffffd7 b 14dc0 <_Heap_Resize_block+0x1cc>
0000e2c8 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
e2cc: e5903024 ldr r3, [r0, #36]
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
e2d0: e5906020 ldr r6, [r0, #32]
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2d4: e24dd004 sub sp, sp, #4 ; 0x4
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
e2d8: e58d3000 str r3, [sp]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2dc: e5963004 ldr r3, [r6, #4]
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
e2e0: e251b000 subs fp, r1, #0 ; 0x0
source = the_heap->stats.instance;
e2e4: b590b028 ldrlt fp, [r0, #40]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2e8: e3130001 tst r3, #1 ; 0x1
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
e2ec: e1a05000 mov r5, r0
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
e2f0: 13a08000 movne r8, #0 ; 0x0
e2f4: 0a000086 beq e514 <_Heap_Walk+0x24c>
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
e2f8: e5962000 ldr r2, [r6]
e2fc: e5953010 ldr r3, [r5, #16]
e300: e1520003 cmp r2, r3
e304: 0a000003 beq e318 <_Heap_Walk+0x50>
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
e308: e59f0238 ldr r0, [pc, #568] ; e548 <_Heap_Walk+0x280> <== NOT EXECUTED
e30c: e1a0100b mov r1, fp <== NOT EXECUTED
e310: ebffd9e4 bl 4aa8 <printk> <== NOT EXECUTED
e314: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
e318: e59d3000 ldr r3, [sp]
e31c: e1560003 cmp r6, r3
e320: 0a000080 beq e528 <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e324: e5960004 ldr r0, [r6, #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)) {
e328: e5951020 ldr r1, [r5, #32]
e32c: e3c07001 bic r7, r0, #1 ; 0x1
e330: e5952024 ldr r2, [r5, #36]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
e334: e0864007 add r4, r6, r7
e338: e1540001 cmp r4, r1
e33c: 33a03000 movcc r3, #0 ; 0x0
e340: 23a03001 movcs r3, #1 ; 0x1
e344: e1540002 cmp r4, r2
e348: 83a03000 movhi r3, #0 ; 0x0
e34c: e3530000 cmp r3, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e350: 1200a001 andne sl, r0, #1 ; 0x1
e354: 11a09004 movne r9, r4
e358: 0a000075 beq e534 <_Heap_Walk+0x26c>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
e35c: e5943004 ldr r3, [r4, #4]
e360: e3130001 tst r3, #1 ; 0x1
e364: 1a00003f bne e468 <_Heap_Walk+0x1a0>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
e368: e5943000 ldr r3, [r4]
e36c: e1530007 cmp r3, r7
e370: 0a000003 beq e384 <_Heap_Walk+0xbc>
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
e374: e59f01d0 ldr r0, [pc, #464] ; e54c <_Heap_Walk+0x284> <== NOT EXECUTED
e378: e1a0100b mov r1, fp <== NOT EXECUTED
e37c: ebffd9c9 bl 4aa8 <printk> <== NOT EXECUTED
e380: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
e384: e35a0000 cmp sl, #0 ; 0x0
e388: 1a000005 bne e3a4 <_Heap_Walk+0xdc>
if (do_dump || error) printk("\n");
e38c: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
e390: 1a00005c bne e508 <_Heap_Walk+0x240> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
e394: e59f01b4 ldr r0, [pc, #436] ; e550 <_Heap_Walk+0x288> <== NOT EXECUTED
e398: e1a0100b mov r1, fp <== NOT EXECUTED
e39c: ebffd9c1 bl 4aa8 <printk> <== NOT EXECUTED
e3a0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
e3a4: e5953008 ldr r3, [r5, #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)
e3a8: e1530006 cmp r3, r6
e3ac: 11550003 cmpne r5, r3
e3b0: 0a000003 beq e3c4 <_Heap_Walk+0xfc>
block = block->next;
e3b4: 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)
e3b8: e1530006 cmp r3, r6
e3bc: 11550003 cmpne r5, r3
e3c0: 1afffffb bne e3b4 <_Heap_Walk+0xec>
block = block->next;
if(block != the_block) {
e3c4: e1530006 cmp r3, r6
e3c8: 0a000026 beq e468 <_Heap_Walk+0x1a0>
if (do_dump || error) printk("\n");
e3cc: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
e3d0: 1a000049 bne e4fc <_Heap_Walk+0x234> <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
e3d4: e59f0178 ldr r0, [pc, #376] ; e554 <_Heap_Walk+0x28c> <== NOT EXECUTED
e3d8: e1a0100b mov r1, fp <== NOT EXECUTED
e3dc: ebffd9b1 bl 4aa8 <printk> <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e3e0: e59f0170 ldr r0, [pc, #368] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e3e4: ebffd9af bl 4aa8 <printk> <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
e3e8: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
e3ec: e1530007 cmp r3, r7 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e3f0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
e3f4: 8a000020 bhi e47c <_Heap_Walk+0x1b4> <== NOT EXECUTED
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
e3f8: e1a00007 mov r0, r7
e3fc: e5951010 ldr r1, [r5, #16]
e400: eb002749 bl 1812c <__umodsi3>
e404: e3500000 cmp r0, #0 ; 0x0
e408: 1a000031 bne e4d4 <_Heap_Walk+0x20c>
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
e40c: e3580000 cmp r8, #0 ; 0x0
e410: 1a000032 bne e4e0 <_Heap_Walk+0x218>
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 ) {
e414: e59d3000 ldr r3, [sp]
e418: e1530004 cmp r3, r4
e41c: 0a000041 beq e528 <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e420: e5940004 ldr r0, [r4, #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)) {
e424: e5951020 ldr r1, [r5, #32]
e428: e3c07001 bic r7, r0, #1 ; 0x1
e42c: e5952024 ldr r2, [r5, #36]
e430: e0844007 add r4, r4, r7
e434: e1540001 cmp r4, r1
e438: 33a03000 movcc r3, #0 ; 0x0
e43c: 23a03001 movcs r3, #1 ; 0x1
e440: e1540002 cmp r4, r2
e444: 83a03000 movhi r3, #0 ; 0x0
e448: e3530000 cmp r3, #0 ; 0x0
e44c: 0a000037 beq e530 <_Heap_Walk+0x268>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
e450: e5943004 ldr r3, [r4, #4]
e454: e3130001 tst r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e458: e1a06009 mov r6, r9
e45c: e200a001 and sl, r0, #1 ; 0x1
e460: e1a09004 mov r9, r4
e464: 0affffbf beq e368 <_Heap_Walk+0xa0>
error = 1;
}
}
}
if (do_dump || error) printk("\n");
e468: e3580000 cmp r8, #0 ; 0x0
e46c: 1affffdb bne e3e0 <_Heap_Walk+0x118>
if (the_size < the_heap->min_block_size) {
e470: e5953014 ldr r3, [r5, #20]
e474: e1530007 cmp r3, r7
e478: 9affffde bls e3f8 <_Heap_Walk+0x130>
printk("PASS: %d !block size is too small\n", source);
e47c: e59f00d8 ldr r0, [pc, #216] ; e55c <_Heap_Walk+0x294> <== NOT EXECUTED
e480: e1a0100b mov r1, fp <== NOT EXECUTED
e484: ebffd987 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
e488: e59d3000 ldr r3, [sp] <== NOT EXECUTED
e48c: e59f00cc ldr r0, [pc, #204] ; e560 <_Heap_Walk+0x298> <== NOT EXECUTED
e490: e1a0100b mov r1, fp <== NOT EXECUTED
e494: e1a02006 mov r2, r6 <== NOT EXECUTED
e498: ebffd982 bl 4aa8 <printk> <== NOT EXECUTED
e49c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
e4a0: e5963004 ldr r3, [r6, #4]
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
e4a4: e5950010 ldr r0, [r5, #16]
e4a8: e3c32001 bic r2, r3, #1 ; 0x1
e4ac: e1500002 cmp r0, r2
e4b0: 01a00008 moveq r0, r8
e4b4: 0a000004 beq e4cc <_Heap_Walk+0x204>
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
e4b8: e1a03000 mov r3, r0 <== NOT EXECUTED
e4bc: e1a0100b mov r1, fp <== NOT EXECUTED
e4c0: e59f009c ldr r0, [pc, #156] ; e564 <_Heap_Walk+0x29c> <== NOT EXECUTED
e4c4: ebffd977 bl 4aa8 <printk> <== NOT EXECUTED
e4c8: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
e4cc: e28dd004 add sp, sp, #4 ; 0x4
e4d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
e4d4: e59f008c ldr r0, [pc, #140] ; e568 <_Heap_Walk+0x2a0> <== NOT EXECUTED
e4d8: e1a0100b mov r1, fp <== NOT EXECUTED
e4dc: ebffd971 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
e4e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
e4e4: e59f0074 ldr r0, [pc, #116] ; e560 <_Heap_Walk+0x298> <== NOT EXECUTED
e4e8: e1a0100b mov r1, fp <== NOT EXECUTED
e4ec: e1a02006 mov r2, r6 <== NOT EXECUTED
e4f0: ebffd96c bl 4aa8 <printk> <== NOT EXECUTED
e4f4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
e4f8: eaffffe8 b e4a0 <_Heap_Walk+0x1d8> <== NOT EXECUTED
{ /* 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;
if(block != the_block) {
if (do_dump || error) printk("\n");
e4fc: e59f0054 ldr r0, [pc, #84] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e500: ebffd968 bl 4aa8 <printk> <== NOT EXECUTED
e504: eaffffb2 b e3d4 <_Heap_Walk+0x10c> <== NOT EXECUTED
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
e508: e59f0048 ldr r0, [pc, #72] ; e558 <_Heap_Walk+0x290> <== NOT EXECUTED
e50c: ebffd965 bl 4aa8 <printk> <== NOT EXECUTED
e510: eaffff9f b e394 <_Heap_Walk+0xcc> <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
e514: e59f0050 ldr r0, [pc, #80] ; e56c <_Heap_Walk+0x2a4> <== NOT EXECUTED
e518: e1a0100b mov r1, fp <== NOT EXECUTED
e51c: ebffd961 bl 4aa8 <printk> <== NOT EXECUTED
e520: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
e524: eaffff73 b e2f8 <_Heap_Walk+0x30> <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
e528: e59d6000 ldr r6, [sp]
e52c: eaffffdb b e4a0 <_Heap_Walk+0x1d8>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
e530: e1a06009 mov r6, r9 <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
e534: e1a02004 mov r2, r4 <== NOT EXECUTED
e538: e59f0030 ldr r0, [pc, #48] ; e570 <_Heap_Walk+0x2a8> <== NOT EXECUTED
e53c: e1a0100b mov r1, fp <== NOT EXECUTED
e540: ebffd958 bl 4aa8 <printk> <== NOT EXECUTED
e544: eaffffe5 b e4e0 <_Heap_Walk+0x218> <== NOT EXECUTED
0000abd0 <_Objects_API_maximum_class>:
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
abd0: e2400001 sub r0, r0, #1 ; 0x1
abd4: e3500003 cmp r0, #3 ; 0x3
abd8: 979ff100 ldrls pc, [pc, r0, lsl #2]
abdc: ea000003 b abf0 <_Objects_API_maximum_class+0x20>
abe0: 0000ac10 .word 0x0000ac10
abe4: 0000ac08 .word 0x0000ac08
abe8: 0000ac00 .word 0x0000ac00
abec: 0000abf8 .word 0x0000abf8
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
abf0: e3e00000 mvn r0, #0 ; 0x0
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
abf4: 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;
abf8: e3a00008 mov r0, #8 ; 0x8
abfc: e12fff1e bx lr
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
ac00: e3a0000c mov r0, #12 ; 0xc
ac04: e12fff1e bx lr
ac08: e3a0000a mov r0, #10 ; 0xa
ac0c: e12fff1e bx lr
ac10: e3a00002 mov r0, #2 ; 0x2
ac14: e12fff1e bx lr
00005b78 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5b78: 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;
5b7c: e1d0a0b8 ldrh sl, [r0, #8]
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5b80: e1d091b0 ldrh r9, [r0, #16]
5b84: e159000a cmp r9, sl
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5b88: e24dd014 sub sp, sp, #20 ; 0x14
5b8c: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5b90: 2a000071 bcs 5d5c <_Objects_Extend_information+0x1e4>
5b94: e3a07000 mov r7, #0 ; 0x0
5b98: e5904014 ldr r4, [r0, #20]
5b9c: e1a0800a mov r8, sl
5ba0: e1a06007 mov r6, r7
5ba4: e3a0b001 mov fp, #1 ; 0x1
5ba8: e3a00003 mov r0, #3 ; 0x3
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bac: e5d53012 ldrb r3, [r5, #18]
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5bb0: e0849009 add r9, r4, r9
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bb4: e3530000 cmp r3, #0 ; 0x0
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5bb8: e58d9004 str r9, [sp, #4]
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5bbc: 1a000080 bne 5dc4 <_Objects_Extend_information+0x24c>
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5bc0: e59d3004 ldr r3, [sp, #4]
5bc4: e080000a add r0, r0, sl
5bc8: e0800003 add r0, r0, r3
5bcc: e1a00100 lsl r0, r0, #2
5bd0: eb000893 bl 7e24 <_Workspace_Allocate_or_fatal_error>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5bd4: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5bd8: e1a0210b lsl r2, fp, #2
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5bdc: e1a0c000 mov ip, r0
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5be0: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5be4: e153000a cmp r3, sl
5be8: e0894002 add r4, r9, r2
5bec: 8a000080 bhi 5df4 <_Objects_Extend_information+0x27c>
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5bf0: e35a0000 cmp sl, #0 ; 0x0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5bf4: 13a03000 movne r3, #0 ; 0x0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
5bf8: 11a02003 movne r2, r3
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5bfc: 0a000003 beq 5c10 <_Objects_Extend_information+0x98>
local_table[ index ] = NULL;
5c00: e7842103 str r2, [r4, r3, lsl #2]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5c04: e2833001 add r3, r3, #1 ; 0x1
5c08: e153000a cmp r3, sl
5c0c: 3afffffb bcc 5c00 <_Objects_Extend_information+0x88>
5c10: e1a07107 lsl r7, r7, #2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5c14: e3a00000 mov r0, #0 ; 0x0
inactive_per_block[block_count] = 0;
5c18: e7890007 str r0, [r9, r7]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c1c: e5953014 ldr r3, [r5, #20]
5c20: e0881003 add r1, r8, r3
5c24: e1580001 cmp r8, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5c28: e78c0007 str r0, [ip, r7]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c2c: 2a000006 bcs 5c4c <_Objects_Extend_information+0xd4>
5c30: e1a03108 lsl r3, r8, #2
5c34: e0842003 add r2, r4, r3
5c38: e1a03008 mov r3, r8
index++ ) {
5c3c: e2833001 add r3, r3, #1 ; 0x1
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c40: e1530001 cmp r3, r1
index++ ) {
local_table[ index ] = NULL;
5c44: e4820004 str r0, [r2], #4
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5c48: 3afffffb bcc 5c3c <_Objects_Extend_information+0xc4>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
5c4c: e10f0000 mrs r0, CPSR
5c50: e38030c0 orr r3, r0, #192 ; 0xc0
5c54: 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(
5c58: 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;
5c5c: e59de004 ldr lr, [sp, #4]
information->maximum_id = _Objects_Build_id(
5c60: e1d510b4 ldrh r1, [r5, #4]
5c64: 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;
5c68: e1a0280e lsl r2, lr, #16
information->maximum_id = _Objects_Build_id(
5c6c: 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;
5c70: e1a02822 lsr r2, r2, #16
information->maximum_id = _Objects_Build_id(
5c74: e1833d81 orr r3, r3, r1, lsl #27
5c78: e1833002 orr r3, r3, r2
5c7c: 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;
5c80: e5859030 str r9, [r5, #48]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
5c84: e5953034 ldr r3, [r5, #52]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
5c88: e585401c str r4, [r5, #28]
information->maximum = maximum;
5c8c: e1c521b0 strh r2, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
5c90: e585c034 str ip, [r5, #52]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
5c94: e129f000 msr CPSR_fc, r0
if ( old_tables )
5c98: e3530000 cmp r3, #0 ; 0x0
_Workspace_Free( old_tables );
5c9c: 11a00003 movne r0, r3
5ca0: 1b000857 blne 7e04 <_Workspace_Free>
5ca4: e5954014 ldr r4, [r5, #20]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
5ca8: e5d53012 ldrb r3, [r5, #18]
5cac: e3530000 cmp r3, #0 ; 0x0
5cb0: 0a000061 beq 5e3c <_Objects_Extend_information+0x2c4>
information->object_blocks[ block ] =
5cb4: e5953018 ldr r3, [r5, #24]
5cb8: e0000493 mul r0, r3, r4
5cbc: e5954034 ldr r4, [r5, #52]
5cc0: eb000853 bl 7e14 <_Workspace_Allocate>
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5cc4: e5953034 ldr r3, [r5, #52]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5cc8: e7840106 str r0, [r4, r6, lsl #2]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5ccc: e7931106 ldr r1, [r3, r6, lsl #2]
5cd0: e3510000 cmp r1, #0 ; 0x0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5cd4: e1a0a106 lsl sl, r6, #2
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5cd8: 0a00001d beq 5d54 <_Objects_Extend_information+0x1dc>
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
5cdc: e28d7008 add r7, sp, #8 ; 0x8
5ce0: e1a00007 mov r0, r7
5ce4: e2852014 add r2, r5, #20 ; 0x14
5ce8: e892000c ldm r2, {r2, r3}
5cec: eb001284 bl a704 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5cf0: e1a04008 mov r4, r8
5cf4: e2856020 add r6, r5, #32 ; 0x20
5cf8: ea000008 b 5d20 <_Objects_Extend_information+0x1a8>
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
5cfc: e5953000 ldr r3, [r5]
5d00: e1d520b4 ldrh r2, [r5, #4]
5d04: e1a03c03 lsl r3, r3, #24
5d08: e3833801 orr r3, r3, #65536 ; 0x10000
5d0c: e1833d82 orr r3, r3, r2, lsl #27
5d10: e1833004 orr r3, r3, r4
5d14: e58c3008 str r3, [ip, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5d18: ebfffd6f bl 52dc <_Chain_Append>
index++;
5d1c: e2844001 add r4, r4, #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 ) {
5d20: e1a00007 mov r0, r7
5d24: eb001269 bl a6d0 <_Chain_Get>
5d28: e250c000 subs ip, r0, #0 ; 0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5d2c: e1a0100c mov r1, ip
5d30: e1a00006 mov r0, r6
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5d34: 1afffff0 bne 5cfc <_Objects_Extend_information+0x184>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
5d38: e5953014 ldr r3, [r5, #20]
5d3c: e5952030 ldr r2, [r5, #48]
5d40: e782300a str r3, [r2, sl]
information->inactive += information->allocation_size;
5d44: e1d512bc ldrh r1, [r5, #44]
5d48: e5953014 ldr r3, [r5, #20]
5d4c: e0833001 add r3, r3, r1
5d50: e1c532bc strh r3, [r5, #44]
}
5d54: e28dd014 add sp, sp, #20 ; 0x14
5d58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
5d5c: e5904014 ldr r4, [r0, #20]
5d60: e1a00009 mov r0, r9
5d64: e1a01004 mov r1, r4
5d68: eb0033d0 bl 12cb0 <__aeabi_uidiv>
for ( ; block < block_count; block++ ) {
5d6c: e2507000 subs r7, r0, #0 ; 0x0
5d70: 0a00003a beq 5e60 <_Objects_Extend_information+0x2e8>
if ( information->object_blocks[ block ] == NULL )
5d74: e5952034 ldr r2, [r5, #52]
5d78: e5923000 ldr r3, [r2]
5d7c: e3530000 cmp r3, #0 ; 0x0
5d80: 11a0800a movne r8, sl
5d84: 13a06000 movne r6, #0 ; 0x0
5d88: 1a000003 bne 5d9c <_Objects_Extend_information+0x224>
5d8c: ea000033 b 5e60 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED
5d90: e7923106 ldr r3, [r2, r6, lsl #2]
5d94: e3530000 cmp r3, #0 ; 0x0
5d98: 0a000003 beq 5dac <_Objects_Extend_information+0x234>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5d9c: e2866001 add r6, r6, #1 ; 0x1
5da0: e1570006 cmp r7, r6
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
5da4: e0888004 add r8, r8, r4
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5da8: 8afffff8 bhi 5d90 <_Objects_Extend_information+0x218>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
5dac: e1580009 cmp r8, r9
5db0: 3affffbc bcc 5ca8 <_Objects_Extend_information+0x130>
5db4: e287b001 add fp, r7, #1 ; 0x1
5db8: e1a0308b lsl r3, fp, #1
5dbc: e083000b add r0, r3, fp
5dc0: eaffff79 b 5bac <_Objects_Extend_information+0x34>
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
5dc4: e080000a add r0, r0, sl
5dc8: e0800009 add r0, r0, r9
5dcc: e1a00100 lsl r0, r0, #2
5dd0: eb00080f bl 7e14 <_Workspace_Allocate>
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
5dd4: e250c000 subs ip, r0, #0 ; 0x0
5dd8: 0affffdd beq 5d54 <_Objects_Extend_information+0x1dc>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5ddc: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5de0: e1a0210b lsl r2, fp, #2
5de4: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5de8: e153000a cmp r3, sl
5dec: e0894002 add r4, r9, r2
5df0: 9affff7e bls 5bf0 <_Objects_Extend_information+0x78>
/*
* 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,
5df4: e1a07107 lsl r7, r7, #2
5df8: e1a0000c mov r0, ip
5dfc: e5951034 ldr r1, [r5, #52]
5e00: e1a02007 mov r2, r7
5e04: e58dc000 str ip, [sp]
5e08: eb001a47 bl c72c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
5e0c: e5951030 ldr r1, [r5, #48]
5e10: e1a02007 mov r2, r7
5e14: e1a00009 mov r0, r9
5e18: eb001a43 bl c72c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5e1c: e1d521b0 ldrh r2, [r5, #16]
5e20: e08a2002 add r2, sl, r2
5e24: e1a02102 lsl r2, r2, #2
5e28: e1a00004 mov r0, r4
5e2c: e595101c ldr r1, [r5, #28]
5e30: eb001a3d bl c72c <memcpy>
5e34: e59dc000 ldr ip, [sp]
5e38: eaffff75 b 5c14 <_Objects_Extend_information+0x9c>
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
5e3c: e5953018 ldr r3, [r5, #24]
5e40: e0000493 mul r0, r3, r4
5e44: e5954034 ldr r4, [r5, #52]
5e48: eb0007f5 bl 7e24 <_Workspace_Allocate_or_fatal_error>
5e4c: e5953034 ldr r3, [r5, #52]
5e50: e7840106 str r0, [r4, r6, lsl #2]
5e54: e1a0a106 lsl sl, r6, #2
5e58: e7931106 ldr r1, [r3, r6, lsl #2]
5e5c: eaffff9e b 5cdc <_Objects_Extend_information+0x164>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5e60: e1a0800a mov r8, sl <== NOT EXECUTED
5e64: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED
5e68: eaffffcf b 5dac <_Objects_Extend_information+0x234> <== NOT EXECUTED
00005144 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
5144: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
5148: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
514c: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
5150: 0a00000b beq 5184 <_POSIX_Condition_variables_Get+0x40>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
5154: e5951000 ldr r1, [r5]
5158: e3710001 cmn r1, #1 ; 0x1
515c: 0a000003 beq 5170 <_POSIX_Condition_variables_Get+0x2c>
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
5160: e59f002c ldr r0, [pc, #44] ; 5194 <_POSIX_Condition_variables_Get+0x50>
5164: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
5168: e8bd4030 pop {r4, r5, lr}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
516c: ea000b92 b 7fbc <_Objects_Get>
if ( *id == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
5170: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5174: eb000007 bl 5198 <pthread_cond_init> <== NOT EXECUTED
if ( status ) {
5178: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
517c: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5180: 0afffff6 beq 5160 <_POSIX_Condition_variables_Get+0x1c> <== NOT EXECUTED
*location = OBJECTS_ERROR;
5184: e3a03001 mov r3, #1 ; 0x1
5188: e5843000 str r3, [r4]
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
518c: e3a00000 mov r0, #0 ; 0x0
5190: e8bd8030 pop {r4, r5, pc}
0000532c <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
532c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
5330: e1a06001 mov r6, r1
5334: e24dd004 sub sp, sp, #4 ; 0x4
5338: 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 ) ) {
533c: e1a0100d mov r1, sp
5340: e1a00006 mov r0, r6
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
5344: e1a0a002 mov sl, r2
5348: 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 ) ) {
534c: eb000071 bl 5518 <_POSIX_Mutex_Get>
5350: e3500000 cmp r0, #0 ; 0x0
5354: 0a00001d beq 53d0 <_POSIX_Condition_variables_Wait_support+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
5358: e59f30d8 ldr r3, [pc, #216] ; 5438 <_POSIX_Condition_variables_Wait_support+0x10c>
535c: e5932000 ldr r2, [r3]
5360: e2422001 sub r2, r2, #1 ; 0x1
5364: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
5368: e1a0100d mov r1, sp
536c: e1a00007 mov r0, r7
5370: ebffff73 bl 5144 <_POSIX_Condition_variables_Get>
switch ( location ) {
5374: e59d3000 ldr r3, [sp]
5378: e3530000 cmp r3, #0 ; 0x0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
537c: e1a05000 mov r5, r0
switch ( location ) {
5380: 1a000012 bne 53d0 <_POSIX_Condition_variables_Wait_support+0xa4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
5384: e5902014 ldr r2, [r0, #20]
5388: e3520000 cmp r2, #0 ; 0x0
538c: 0a000005 beq 53a8 <_POSIX_Condition_variables_Wait_support+0x7c>
5390: e5963000 ldr r3, [r6]
5394: e1520003 cmp r2, r3
5398: 0a000002 beq 53a8 <_POSIX_Condition_variables_Wait_support+0x7c>
_Thread_Enable_dispatch();
539c: eb000d27 bl 8840 <_Thread_Enable_dispatch> <== NOT EXECUTED
53a0: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED
53a4: ea00000a b 53d4 <_POSIX_Condition_variables_Wait_support+0xa8><== NOT EXECUTED
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
53a8: e1a00006 mov r0, r6
53ac: eb0000e9 bl 5758 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
53b0: e3580000 cmp r8, #0 ; 0x0
53b4: 0a000009 beq 53e0 <_POSIX_Condition_variables_Wait_support+0xb4>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
53b8: eb000d20 bl 8840 <_Thread_Enable_dispatch>
53bc: e3a04074 mov r4, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
53c0: e1a00006 mov r0, r6
53c4: eb0000c2 bl 56d4 <pthread_mutex_lock>
if ( mutex_status )
53c8: e3500000 cmp r0, #0 ; 0x0
53cc: 0a000000 beq 53d4 <_POSIX_Condition_variables_Wait_support+0xa8>
53d0: e3a04016 mov r4, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
53d4: e1a00004 mov r0, r4
53d8: e28dd004 add sp, sp, #4 ; 0x4
53dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
53e0: e5963000 ldr r3, [r6]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
53e4: e59f4050 ldr r4, [pc, #80] ; 543c <_POSIX_Condition_variables_Wait_support+0x110>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
53e8: e5853014 str r3, [r5, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
53ec: e5942000 ldr r2, [r4]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
53f0: e5971000 ldr r1, [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;
53f4: e285c018 add ip, r5, #24 ; 0x18
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;
53f8: e3a03001 mov r3, #1 ; 0x1
_Thread_Executing->Wait.id = *cond;
53fc: e5821020 str r1, [r2, #32]
5400: 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;
5404: 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;
5408: 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 );
540c: e1a0000c mov r0, ip
5410: e1a0100a mov r1, sl
5414: e59f2024 ldr r2, [pc, #36] ; 5440 <_POSIX_Condition_variables_Wait_support+0x114>
5418: eb000e50 bl 8d60 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
541c: eb000d07 bl 8840 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
5420: e5943000 ldr r3, [r4]
5424: e5934034 ldr r4, [r3, #52]
if ( status && status != ETIMEDOUT )
5428: e3540000 cmp r4, #0 ; 0x0
542c: 13540074 cmpne r4, #116 ; 0x74
5430: 0affffe2 beq 53c0 <_POSIX_Condition_variables_Wait_support+0x94>
5434: eaffffe6 b 53d4 <_POSIX_Condition_variables_Wait_support+0xa8><== NOT EXECUTED
00010c50 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
10c50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
10c54: e1a08001 mov r8, r1
10c58: 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 );
10c5c: e3a010ff mov r1, #255 ; 0xff
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
10c60: e1a04002 mov r4, r2
10c64: e1a0b003 mov fp, r3
10c68: 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 );
10c6c: eb00125f bl 155f0 <strnlen>
if ( n > NAME_MAX )
10c70: 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 );
10c74: e1a05000 mov r5, r0
if ( n > NAME_MAX )
10c78: 83a0005b movhi r0, #91 ; 0x5b
10c7c: 8a000031 bhi 10d48 <_POSIX_Message_queue_Create_support+0xf8>
10c80: e59f2148 ldr r2, [pc, #328] ; 10dd0 <_POSIX_Message_queue_Create_support+0x180>
10c84: e5923000 ldr r3, [r2]
10c88: e2833001 add r3, r3, #1 ; 0x1
10c8c: 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 ) {
10c90: e3540000 cmp r4, #0 ; 0x0
10c94: 03a0a010 moveq sl, #16 ; 0x10
10c98: 03a0700a moveq r7, #10 ; 0xa
10c9c: 0a000009 beq 10cc8 <_POSIX_Message_queue_Create_support+0x78>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
10ca0: e5943004 ldr r3, [r4, #4]
10ca4: e3530000 cmp r3, #0 ; 0x0
10ca8: da000033 ble 10d7c <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
10cac: e5943008 ldr r3, [r4, #8]
10cb0: e3530000 cmp r3, #0 ; 0x0
10cb4: da000030 ble 10d7c <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
10cb8: e894000f ldm r4, {r0, r1, r2, r3}
10cbc: e88d000f stm sp, {r0, r1, r2, r3}
10cc0: e1a0a002 mov sl, r2
10cc4: e1a07001 mov r7, r1
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
10cc8: e59f6104 ldr r6, [pc, #260] ; 10dd4 <_POSIX_Message_queue_Create_support+0x184>
10ccc: e1a00006 mov r0, r6
10cd0: ebffef75 bl caac <_Objects_Allocate>
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
10cd4: e2504000 subs r4, r0, #0 ; 0x0
10cd8: 0a000036 beq 10db8 <_POSIX_Message_queue_Create_support+0x168>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
10cdc: 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);
10ce0: e1a00005 mov r0, r5
if ( !the_mq ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
10ce4: e5848010 str r8, [r4, #16]
the_mq->named = TRUE;
the_mq->open_count = 1;
the_mq->linked = TRUE;
10ce8: 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;
10cec: e5c43014 strb r3, [r4, #20]
the_mq->open_count = 1;
10cf0: 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);
10cf4: ebfff899 bl ef60 <_Workspace_Allocate>
if (!name) {
10cf8: e2505000 subs r5, r0, #0 ; 0x0
10cfc: 0a000024 beq 10d94 <_POSIX_Message_queue_Create_support+0x144>
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
10d00: 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;
10d04: e3a08000 mov r8, #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 );
10d08: eb000fbf bl 14c0c <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;
10d0c: e584805c str r8, [r4, #92]
if ( ! _CORE_message_queue_Initialize(
10d10: e1a02007 mov r2, r7
10d14: e1a0300a mov r3, sl
10d18: e284001c add r0, r4, #28 ; 0x1c
10d1c: e284105c add r1, r4, #92 ; 0x5c
10d20: eb00037a bl 11b10 <_CORE_message_queue_Initialize>
10d24: e1500008 cmp r0, r8
10d28: 0a000008 beq 10d50 <_POSIX_Message_queue_Create_support+0x100>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d2c: e596201c ldr r2, [r6, #28]
10d30: e1d430b8 ldrh r3, [r4, #8]
10d34: 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;
10d38: e584500c str r5, [r4, #12]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
10d3c: e58b4000 str r4, [fp]
_Thread_Enable_dispatch();
10d40: ebfff2f4 bl d918 <_Thread_Enable_dispatch>
10d44: e1a00008 mov r0, r8
return 0;
}
10d48: e28dd010 add sp, sp, #16 ; 0x10
10d4c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
10d50: e1a01004 mov r1, r4 <== NOT EXECUTED
10d54: e1a00006 mov r0, r6 <== NOT EXECUTED
10d58: ebfff040 bl ce60 <_Objects_Free> <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
10d5c: e1a00005 mov r0, r5 <== NOT EXECUTED
10d60: ebfff87a bl ef50 <_Workspace_Free> <== NOT EXECUTED
_Thread_Enable_dispatch();
10d64: ebfff2eb bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
10d68: eb000a6f bl 1372c <__errno> <== NOT EXECUTED
10d6c: e3a0301c mov r3, #28 ; 0x1c <== NOT EXECUTED
10d70: e5803000 str r3, [r0] <== NOT EXECUTED
10d74: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10d78: eafffff2 b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
10d7c: ebfff2e5 bl d918 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10d80: eb000a69 bl 1372c <__errno>
10d84: e3a03016 mov r3, #22 ; 0x16
10d88: e5803000 str r3, [r0]
10d8c: e3e00000 mvn r0, #0 ; 0x0
10d90: eaffffec b 10d48 <_POSIX_Message_queue_Create_support+0xf8>
10d94: e1a00006 mov r0, r6 <== NOT EXECUTED
10d98: e1a01004 mov r1, r4 <== NOT EXECUTED
10d9c: ebfff02f bl ce60 <_Objects_Free> <== NOT EXECUTED
*/
name = _Workspace_Allocate(n);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
10da0: ebfff2dc bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
10da4: eb000a60 bl 1372c <__errno> <== NOT EXECUTED
10da8: e3a0300c mov r3, #12 ; 0xc <== NOT EXECUTED
10dac: e5803000 str r3, [r0] <== NOT EXECUTED
10db0: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10db4: eaffffe3 b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
10db8: ebfff2d6 bl d918 <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
10dbc: eb000a5a bl 1372c <__errno> <== NOT EXECUTED
10dc0: e3a03017 mov r3, #23 ; 0x17 <== NOT EXECUTED
10dc4: e5803000 str r3, [r0] <== NOT EXECUTED
10dc8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
10dcc: eaffffdd b 10d48 <_POSIX_Message_queue_Create_support+0xf8><== NOT EXECUTED
00005df4 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
5df4: e92d4030 push {r4, r5, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5df8: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
5dfc: e1a04001 mov r4, r1
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5e00: 0a00000b beq 5e34 <_POSIX_Mutex_Get+0x40>
5e04: e5951000 ldr r1, [r5]
5e08: e3710001 cmn r1, #1 ; 0x1
5e0c: 0a000003 beq 5e20 <_POSIX_Mutex_Get+0x2c>
return (POSIX_Mutex_Control *)
5e10: e59f002c ldr r0, [pc, #44] ; 5e44 <_POSIX_Mutex_Get+0x50>
5e14: e1a02004 mov r2, r4
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5e18: e8bd4030 pop {r4, r5, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5e1c: ea000b6e b 8bdc <_Objects_Get>
Objects_Locations *location
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5e20: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5e24: eb000019 bl 5e90 <pthread_mutex_init> <== NOT EXECUTED
5e28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5e2c: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5e30: 0afffff6 beq 5e10 <_POSIX_Mutex_Get+0x1c> <== NOT EXECUTED
5e34: e3a03001 mov r3, #1 ; 0x1
5e38: e5843000 str r3, [r4]
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
5e3c: e3a00000 mov r0, #0 ; 0x0
5e40: e8bd8030 pop {r4, r5, pc}
00005d98 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
5d98: e92d4070 push {r4, r5, r6, lr}
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5d9c: e2505000 subs r5, r0, #0 ; 0x0
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
5da0: e1a04001 mov r4, r1
5da4: e1a06002 mov r6, r2
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5da8: 0a00000c beq 5de0 <_POSIX_Mutex_Get_interrupt_disable+0x48>
5dac: e5951000 ldr r1, [r5]
5db0: e3710001 cmn r1, #1 ; 0x1
5db4: 0a000004 beq 5dcc <_POSIX_Mutex_Get_interrupt_disable+0x34>
return (POSIX_Mutex_Control *)
5db8: e59f0030 ldr r0, [pc, #48] ; 5df0 <_POSIX_Mutex_Get_interrupt_disable+0x58>
5dbc: e1a02004 mov r2, r4
5dc0: e1a03006 mov r3, r6
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5dc4: e8bd4070 pop {r4, r5, r6, lr}
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
return (POSIX_Mutex_Control *)
5dc8: ea000b67 b 8b6c <_Objects_Get_isr_disable>
ISR_Level *level
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
5dcc: e2811001 add r1, r1, #1 ; 0x1 <== NOT EXECUTED
5dd0: eb00002e bl 5e90 <pthread_mutex_init> <== NOT EXECUTED
5dd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
5dd8: 05951000 ldreq r1, [r5] <== NOT EXECUTED
5ddc: 0afffff5 beq 5db8 <_POSIX_Mutex_Get_interrupt_disable+0x20><== NOT EXECUTED
5de0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
5de4: e5843000 str r3, [r4] <== NOT EXECUTED
return (POSIX_Mutex_Control *)
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
5de8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5dec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000d590 <_POSIX_Semaphore_Create_support>:
d590: e59fc0f8 ldr ip, [pc, #248] ; d690 <_POSIX_Semaphore_Create_support+0x100>
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
d594: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
d598: e59ce000 ldr lr, [ip]
d59c: e28ee001 add lr, lr, #1 ; 0x1
d5a0: e58ce000 str lr, [ip]
d5a4: e1a07002 mov r7, r2
d5a8: e1a0a003 mov sl, r3
d5ac: e1a06000 mov r6, r0
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
d5b0: e3510000 cmp r1, #0 ; 0x0
d5b4: 1a000023 bne d648 <_POSIX_Semaphore_Create_support+0xb8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
if ( name ) {
d5b8: e3500000 cmp r0, #0 ; 0x0
d5bc: 0a000002 beq d5cc <_POSIX_Semaphore_Create_support+0x3c>
if( strlen(name) > PATH_MAX ) {
d5c0: eb000f8e bl 11400 <strlen>
d5c4: e35000ff cmp r0, #255 ; 0xff
d5c8: 8a000024 bhi d660 <_POSIX_Semaphore_Create_support+0xd0>
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
d5cc: e59f80c0 ldr r8, [pc, #192] ; d694 <_POSIX_Semaphore_Create_support+0x104>
d5d0: e1a00008 mov r0, r8
d5d4: ebffed90 bl 8c1c <_Objects_Allocate>
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
d5d8: e2505000 subs r5, r0, #0 ; 0x0
d5dc: 0a000025 beq d678 <_POSIX_Semaphore_Create_support+0xe8>
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
if ( name ) {
d5e0: e3560000 cmp r6, #0 ; 0x0
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
d5e4: e3a03000 mov r3, #0 ; 0x0
d5e8: e5853010 str r3, [r5, #16]
if ( name ) {
the_semaphore->named = TRUE;
d5ec: 12833001 addne r3, r3, #1 ; 0x1
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
d5f0: 15c53015 strbne r3, [r5, #21]
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
d5f4: 15c53014 strbne r3, [r5, #20]
the_semaphore->open_count = 1;
d5f8: 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;
d5fc: e3a04000 mov r4, #0 ; 0x0
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
d600: e3e03000 mvn r3, #0 ; 0x0
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
d604: 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;
d608: 05c56014 strbeq r6, [r5, #20]
the_semaphore->open_count = 0;
d60c: 05856018 streq r6, [r5, #24]
the_semaphore->linked = FALSE;
d610: 05c56015 strbeq r6, [r5, #21]
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
d614: e585305c str r3, [r5, #92]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
d618: e1a02007 mov r2, r7
d61c: 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;
d620: 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 );
d624: ebffec65 bl 87c0 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
d628: e598201c ldr r2, [r8, #28]
d62c: e1d530b8 ldrh r3, [r5, #8]
d630: 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;
d634: e585600c str r6, [r5, #12]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
d638: e58a5000 str r5, [sl]
_Thread_Enable_dispatch();
d63c: ebfff0de bl 99bc <_Thread_Enable_dispatch>
d640: e1a00004 mov r0, r4
return 0;
}
d644: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
_Thread_Enable_dispatch();
d648: ebfff0db bl 99bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
d64c: eb000894 bl f8a4 <__errno>
d650: e3a03058 mov r3, #88 ; 0x58
d654: e5803000 str r3, [r0]
d658: e3e00000 mvn r0, #0 ; 0x0
d65c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
}
if ( name ) {
if( strlen(name) > PATH_MAX ) {
_Thread_Enable_dispatch();
d660: ebfff0d5 bl 99bc <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
d664: eb00088e bl f8a4 <__errno> <== NOT EXECUTED
d668: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
d66c: e5803000 str r3, [r0] <== NOT EXECUTED
d670: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
d674: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
d678: ebfff0cf bl 99bc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
d67c: eb000888 bl f8a4 <__errno>
d680: e3a0301c mov r3, #28 ; 0x1c
d684: e5803000 str r3, [r0]
d688: e3e00000 mvn r0, #0 ; 0x0
d68c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000a0c0 <_POSIX_Semaphore_Manager_initialization>:
*/
void _POSIX_Semaphore_Manager_initialization(
uint32_t maximum_semaphores
)
{
a0c0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a0c4: e3a0c068 mov ip, #104 ; 0x68
*/
void _POSIX_Semaphore_Manager_initialization(
uint32_t maximum_semaphores
)
{
a0c8: e24dd00c sub sp, sp, #12 ; 0xc
a0cc: e1a03000 mov r3, r0
_Objects_Initialize_information(
a0d0: e58dc000 str ip, [sp]
a0d4: e3a0e001 mov lr, #1 ; 0x1
a0d8: e28cc097 add ip, ip, #151 ; 0x97
a0dc: e59f0018 ldr r0, [pc, #24] ; a0fc <_POSIX_Semaphore_Manager_initialization+0x3c>
a0e0: e3a01003 mov r1, #3 ; 0x3
a0e4: e3a02007 mov r2, #7 ; 0x7
a0e8: e58de004 str lr, [sp, #4]
a0ec: e58dc008 str ip, [sp, #8]
a0f0: ebffefd4 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a0f4: e28dd00c add sp, sp, #12 ; 0xc
a0f8: e8bd8000 pop {pc}
00009d94 <_POSIX_Threads_Initialize_user_threads>:
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
9d94: e59f3018 ldr r3, [pc, #24] ; 9db4 <_POSIX_Threads_Initialize_user_threads+0x20>
9d98: e5933000 ldr r3, [r3]
9d9c: e3530000 cmp r3, #0 ; 0x0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
9da0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _POSIX_Threads_Initialize_user_threads_p )
9da4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
(*_POSIX_Threads_Initialize_user_threads_p)();
9da8: e1a0e00f mov lr, pc <== NOT EXECUTED
9dac: e12fff13 bx r3 <== NOT EXECUTED
9db0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00009db8 <_POSIX_Threads_Manager_initialization>:
uint32_t maximum_pthreads,
uint32_t number_of_initialization_threads,
posix_initialization_threads_table *user_threads
)
{
9db8: e92d4010 push {r4, lr}
9dbc: e1a03000 mov r3, r0
_POSIX_Threads_Number_of_initialization_threads =
9dc0: e59f0048 ldr r0, [pc, #72] ; 9e10 <_POSIX_Threads_Manager_initialization+0x58>
9dc4: e5801000 str r1, [r0]
number_of_initialization_threads;
_POSIX_Threads_User_initialization_threads = user_threads;
9dc8: e59f1044 ldr r1, [pc, #68] ; 9e14 <_POSIX_Threads_Manager_initialization+0x5c>
#if 0
if ( user_threads == NULL || number_of_initialization_threads == 0 )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
#endif
_Objects_Initialize_information(
9dcc: e3a04001 mov r4, #1 ; 0x1
uint32_t maximum_pthreads,
uint32_t number_of_initialization_threads,
posix_initialization_threads_table *user_threads
)
{
9dd0: e24dd00c sub sp, sp, #12 ; 0xc
_POSIX_Threads_Number_of_initialization_threads =
number_of_initialization_threads;
_POSIX_Threads_User_initialization_threads = user_threads;
9dd4: e5812000 str r2, [r1]
#if 0
if ( user_threads == NULL || number_of_initialization_threads == 0 )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, EINVAL );
#endif
_Objects_Initialize_information(
9dd8: e3a0cf46 mov ip, #280 ; 0x118
9ddc: e3a0e0ff mov lr, #255 ; 0xff
9de0: e1a02004 mov r2, r4
9de4: e3a01003 mov r1, #3 ; 0x3
9de8: e59f0028 ldr r0, [pc, #40] ; 9e18 <_POSIX_Threads_Manager_initialization+0x60>
9dec: e58dc000 str ip, [sp]
9df0: e98d4010 stmib sp, {r4, lr}
9df4: ebfff093 bl 6048 <_Objects_Initialize_information>
/*
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
9df8: e59f001c ldr r0, [pc, #28] ; 9e1c <_POSIX_Threads_Manager_initialization+0x64>
9dfc: eb0004ce bl b13c <_User_extensions_Add_API_set>
_API_extensions_Add( &_POSIX_Threads_API_extensions );
9e00: e59f0018 ldr r0, [pc, #24] ; 9e20 <_POSIX_Threads_Manager_initialization+0x68>
/*
* If we supported MP, then here we would ...
* Register the MP Process Packet routine.
*/
}
9e04: e28dd00c add sp, sp, #12 ; 0xc
9e08: e8bd4010 pop {r4, lr}
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
_API_extensions_Add( &_POSIX_Threads_API_extensions );
9e0c: eaffece9 b 51b8 <_API_extensions_Add>
0000b688 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
b688: 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 ];
b68c: e5906108 ldr r6, [r0, #264]
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
b690: e59620d8 ldr r2, [r6, #216]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b694: e28650dc add r5, r6, #220 ; 0xdc
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
b698: e3a03001 mov r3, #1 ; 0x1
while ( !_Chain_Is_empty( handler_stack ) ) {
b69c: e1520005 cmp r2, r5
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
b6a0: e58630cc str r3, [r6, #204]
while ( !_Chain_Is_empty( handler_stack ) ) {
b6a4: 08bd8070 popeq {r4, r5, r6, pc}
_ISR_Disable( level );
b6a8: e10f1000 mrs r1, CPSR <== NOT EXECUTED
b6ac: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
b6b0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
b6b4: e5954004 ldr r4, [r5, #4] <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
b6b8: e894000c ldm r4, {r2, r3} <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
previous->next = next;
b6bc: e5832000 str r2, [r3] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
b6c0: e5823004 str r3, [r2, #4] <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
b6c4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
(*handler->routine)( handler->arg );
b6c8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
b6cc: e1a0e00f mov lr, pc <== NOT EXECUTED
b6d0: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED
_Workspace_Free( handler );
b6d4: e1a00004 mov r0, r4 <== NOT EXECUTED
b6d8: ebfff1c9 bl 7e04 <_Workspace_Free> <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
b6dc: e59630d8 ldr r3, [r6, #216] <== NOT EXECUTED
b6e0: e1530005 cmp r3, r5 <== NOT EXECUTED
b6e4: 1affffef bne b6a8 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED
b6e8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000c1c8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
c1c8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
c1cc: e1a08001 mov r8, r1
c1d0: e1a07002 mov r7, r2
c1d4: e1a05003 mov r5, r3
c1d8: e1a04000 mov r4, r0
ISR_Level level;
(void) _Watchdog_Remove( timer );
c1dc: ebfff62f bl 9aa0 <_Watchdog_Remove>
_ISR_Disable( level );
c1e0: e10f6000 mrs r6, CPSR
c1e4: e38630c0 orr r3, r6, #192 ; 0xc0
c1e8: 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 ) {
c1ec: e5943008 ldr r3, [r4, #8]
c1f0: e3530000 cmp r3, #0 ; 0x0
c1f4: 0a000002 beq c204 <_POSIX_Timer_Insert_helper+0x3c>
_ISR_Enable( level );
c1f8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
c1fc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
c200: 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;
c204: e5843008 str r3, [r4, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
c208: e59d3018 ldr r3, [sp, #24]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
c20c: e584501c str r5, [r4, #28]
the_watchdog->id = id;
c210: e5847020 str r7, [r4, #32]
the_watchdog->user_data = user_data;
c214: e5843024 str r3, [r4, #36]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
c218: e584800c str r8, [r4, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
c21c: e1a01004 mov r1, r4
c220: e59f000c ldr r0, [pc, #12] ; c234 <_POSIX_Timer_Insert_helper+0x6c>
c224: ebfff5ae bl 98e4 <_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 );
c228: e129f006 msr CPSR_fc, r6
c22c: e3a00001 mov r0, #1 ; 0x1
return true;
}
c230: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00005cc4 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
5cc4: e92d4010 push {r4, lr}
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5cc8: e5913068 ldr r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5ccc: e5912054 ldr r2, [r1, #84]
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5cd0: e2833001 add r3, r3, #1 ; 0x1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5cd4: 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)
{
5cd8: e24dd004 sub sp, sp, #4 ; 0x4
5cdc: e1a04001 mov r4, r1
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
5ce0: e5813068 str r3, [r1, #104]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
5ce4: 1a000004 bne 5cfc <_POSIX_Timer_TSR+0x38>
5ce8: e5913058 ldr r3, [r1, #88] <== NOT EXECUTED
5cec: 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;
5cf0: 03a03004 moveq r3, #4 ; 0x4 <== NOT EXECUTED
5cf4: 05c1303c strbeq r3, [r1, #60] <== 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 ) ||
5cf8: 0a00000d beq 5d34 <_POSIX_Timer_TSR+0x70> <== NOT EXECUTED
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
5cfc: e5941064 ldr r1, [r4, #100]
5d00: e5942008 ldr r2, [r4, #8]
5d04: e2840010 add r0, r4, #16 ; 0x10
5d08: e59f303c ldr r3, [pc, #60] ; 5d4c <_POSIX_Timer_TSR+0x88>
5d0c: e58d4000 str r4, [sp]
5d10: eb00192c bl c1c8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
5d14: e3500000 cmp r0, #0 ; 0x0
5d18: 1a000001 bne 5d24 <_POSIX_Timer_TSR+0x60>
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
5d1c: e28dd004 add sp, sp, #4 ; 0x4
5d20: e8bd8010 pop {r4, pc}
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
5d24: e284006c add r0, r4, #108 ; 0x6c
5d28: eb0005bd bl 7424 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5d2c: e3a03003 mov r3, #3 ; 0x3
5d30: 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 ) ) {
5d34: e5940038 ldr r0, [r4, #56]
5d38: e5941044 ldr r1, [r4, #68]
5d3c: eb001847 bl be60 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
5d40: e3a03000 mov r3, #0 ; 0x0
5d44: e5843068 str r3, [r4, #104]
5d48: eafffff3 b 5d1c <_POSIX_Timer_TSR+0x58>
000052a8 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
52a8: e1a02000 mov r2, r0
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52ac: e3a01001 mov r1, #1 ; 0x1
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
52b0: e3a0001b mov r0, #27 ; 0x1b
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52b4: e2403001 sub r3, r0, #1 ; 0x1
52b8: e0123311 ands r3, r2, r1, lsl r3
52bc: 112fff1e bxne lr
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
52c0: e2800001 add r0, r0, #1 ; 0x1
52c4: e3500020 cmp r0, #32 ; 0x20
52c8: 1afffff9 bne 52b4 <_POSIX_signals_Get_highest+0xc>
52cc: e240001f sub r0, r0, #31 ; 0x1f
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
52d0: e1a01000 mov r1, r0
52d4: e2403001 sub r3, r0, #1 ; 0x1
52d8: e0123311 ands r3, r2, r1, lsl r3
52dc: 112fff1e bxne lr
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
52e0: e2800001 add r0, r0, #1 ; 0x1
52e4: e350001b cmp r0, #27 ; 0x1b
52e8: 1afffff9 bne 52d4 <_POSIX_signals_Get_highest+0x2c>
52ec: e1a00003 mov r0, r3 <== NOT EXECUTED
if ( set & signo_to_mask( signo ) )
return signo;
}
return 0;
}
52f0: e12fff1e bx lr <== NOT EXECUTED
00009c7c <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
9c7c: e92d4070 push {r4, r5, r6, lr}
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
9c80: e5905108 ldr r5, [r0, #264]
if ( !api )
9c84: e3550000 cmp r5, #0 ; 0x0
9c88: 08bd8070 popeq {r4, r5, r6, pc}
9c8c: e59f60b0 ldr r6, [pc, #176] ; 9d44 <_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 );
9c90: e10f0000 mrs r0, CPSR
9c94: e38030c0 orr r3, r0, #192 ; 0xc0
9c98: e129f003 msr CPSR_fc, r3
if ( !(~api->signals_blocked &
9c9c: e5963000 ldr r3, [r6]
9ca0: e28510c4 add r1, r5, #196 ; 0xc4
9ca4: e8910006 ldm r1, {r1, r2}
9ca8: e1833002 orr r3, r3, r2
9cac: e1d31001 bics r1, r3, r1
9cb0: 0a000021 beq 9d3c <_POSIX_signals_Post_switch_extension+0xc0>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
9cb4: e129f000 msr CPSR_fc, r0
9cb8: e3a0401b mov r4, #27 ; 0x1b
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9cbc: e1a01004 mov r1, r4
9cc0: e3a02000 mov r2, #0 ; 0x0
9cc4: e1a00005 mov r0, r5
9cc8: eb0006b5 bl b7a4 <_POSIX_signals_Check_signal>
9ccc: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9cd0: e1a01004 mov r1, r4
9cd4: e3a02001 mov r2, #1 ; 0x1
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
9cd8: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9cdc: e1a00005 mov r0, r5
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
9ce0: 1affffea bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9ce4: eb0006ae bl b7a4 <_POSIX_signals_Check_signal>
9ce8: e3500000 cmp r0, #0 ; 0x0
9cec: 1affffe7 bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
9cf0: e3540020 cmp r4, #32 ; 0x20
9cf4: 1afffff0 bne 9cbc <_POSIX_signals_Post_switch_extension+0x40>
9cf8: e244401f sub r4, r4, #31 ; 0x1f
/* 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 ) )
9cfc: e1a01004 mov r1, r4
9d00: e3a02000 mov r2, #0 ; 0x0
9d04: e1a00005 mov r0, r5
9d08: eb0006a5 bl b7a4 <_POSIX_signals_Check_signal>
9d0c: e3500000 cmp r0, #0 ; 0x0
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d10: e1a01004 mov r1, r4
9d14: e3a02001 mov r2, #1 ; 0x1
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9d18: e2844001 add r4, r4, #1 ; 0x1
if ( _POSIX_signals_Check_signal( api, signo, false ) )
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d1c: 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 ) )
9d20: 1affffda bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
9d24: eb00069e bl b7a4 <_POSIX_signals_Check_signal>
9d28: e3500000 cmp r0, #0 ; 0x0
9d2c: 1affffd7 bne 9c90 <_POSIX_signals_Post_switch_extension+0x14>
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
9d30: e354001b cmp r4, #27 ; 0x1b
9d34: 1afffff0 bne 9cfc <_POSIX_signals_Post_switch_extension+0x80>
9d38: eaffffd4 b 9c90 <_POSIX_signals_Post_switch_extension+0x14><== NOT EXECUTED
while (1) {
restart:
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
9d3c: e129f000 msr CPSR_fc, r0
9d40: e8bd8070 pop {r4, r5, r6, pc}
0000a204 <_Partition_Manager_initialization>:
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
a204: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a208: e3a0c030 mov ip, #48 ; 0x30
*/
void _Partition_Manager_initialization(
uint32_t maximum_partitions
)
{
a20c: e24dd00c sub sp, sp, #12 ; 0xc
a210: e1a03000 mov r3, r0
_Objects_Initialize_information(
a214: e58dc000 str ip, [sp]
a218: e3a0e000 mov lr, #0 ; 0x0
a21c: e24cc02c sub ip, ip, #44 ; 0x2c
a220: e59f0018 ldr r0, [pc, #24] ; a240 <_Partition_Manager_initialization+0x3c>
a224: e3a01002 mov r1, #2 ; 0x2
a228: e3a02005 mov r2, #5 ; 0x5
a22c: e58de004 str lr, [sp, #4]
a230: e58dc008 str ip, [sp, #8]
a234: ebffef83 bl 6048 <_Objects_Initialize_information>
MP_PACKET_PARTITION,
_Partition_MP_Process_packet
);
#endif
}
a238: e28dd00c add sp, sp, #12 ; 0xc
a23c: e8bd8000 pop {pc}
0000ac18 <_Protected_heap_Allocate>:
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
ac18: e92d4070 push {r4, r5, r6, lr}
void *p;
_RTEMS_Lock_allocator();
ac1c: e59f602c ldr r6, [pc, #44] ; ac50 <_Protected_heap_Allocate+0x38>
void *_Protected_heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
ac20: e1a04000 mov r4, r0
ac24: e1a05001 mov r5, r1
void *p;
_RTEMS_Lock_allocator();
ac28: e5960000 ldr r0, [r6]
ac2c: ebffe982 bl 523c <_API_Mutex_Lock>
p = _Heap_Allocate( the_heap, size );
ac30: e1a01005 mov r1, r5
ac34: e1a00004 mov r0, r4
ac38: ebffff36 bl a918 <_Heap_Allocate>
ac3c: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
ac40: e5960000 ldr r0, [r6]
ac44: ebffe998 bl 52ac <_API_Mutex_Unlock>
return p;
}
ac48: e1a00004 mov r0, r4
ac4c: e8bd8070 pop {r4, r5, r6, pc}
0000998c <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
998c: e92d4070 push {r4, r5, r6, lr}
Heap_Get_information_status status;
if ( !the_heap )
9990: e2506000 subs r6, r0, #0 ; 0x0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
9994: e1a04001 mov r4, r1
Heap_Get_information_status status;
if ( !the_heap )
9998: 0a00000d beq 99d4 <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
999c: e3510000 cmp r1, #0 ; 0x0
99a0: 0a00000b beq 99d4 <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
99a4: e59f5030 ldr r5, [pc, #48] ; 99dc <_Protected_heap_Get_information+0x50>
99a8: e5950000 ldr r0, [r5]
99ac: ebfff981 bl 7fb8 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
99b0: e1a01004 mov r1, r4
99b4: e1a00006 mov r0, r6
99b8: eb0011e3 bl e14c <_Heap_Get_information>
99bc: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
99c0: e5950000 ldr r0, [r5]
99c4: ebfff997 bl 8028 <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
99c8: e2740001 rsbs r0, r4, #1 ; 0x1
99cc: 33a00000 movcc r0, #0 ; 0x0
99d0: e8bd8070 pop {r4, r5, r6, pc}
99d4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return true;
return false;
}
99d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000a3cc <_RTEMS_tasks_Initialize_user_tasks>:
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
a3cc: e59f3018 ldr r3, [pc, #24] ; a3ec <_RTEMS_tasks_Initialize_user_tasks+0x20>
a3d0: e5933000 ldr r3, [r3]
a3d4: e3530000 cmp r3, #0 ; 0x0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
a3d8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _RTEMS_tasks_Initialize_user_tasks_p )
a3dc: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
(*_RTEMS_tasks_Initialize_user_tasks_p)();
a3e0: e1a0e00f mov lr, pc
a3e4: e12fff13 bx r3
a3e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000a3f0 <_RTEMS_tasks_Manager_initialization>:
*/
void _RTEMS_tasks_Manager_initialization(
uint32_t maximum_tasks
)
{
a3f0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a3f4: e3a0cf46 mov ip, #280 ; 0x118
*/
void _RTEMS_tasks_Manager_initialization(
uint32_t maximum_tasks
)
{
a3f8: e24dd00c sub sp, sp, #12 ; 0xc
a3fc: e1a03000 mov r3, r0
_Objects_Initialize_information(
a400: e3a0e000 mov lr, #0 ; 0x0
a404: e3a01002 mov r1, #2 ; 0x2
a408: e3a02001 mov r2, #1 ; 0x1
a40c: e58dc000 str ip, [sp]
a410: e59f0024 ldr r0, [pc, #36] ; a43c <_RTEMS_tasks_Manager_initialization+0x4c>
a414: e24ccf45 sub ip, ip, #276 ; 0x114
a418: e58de004 str lr, [sp, #4]
a41c: e58dc008 str ip, [sp, #8]
a420: ebffef08 bl 6048 <_Objects_Initialize_information>
/*
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
a424: e59f0014 ldr r0, [pc, #20] ; a440 <_RTEMS_tasks_Manager_initialization+0x50>
a428: eb000343 bl b13c <_User_extensions_Add_API_set>
_API_extensions_Add( &_RTEMS_tasks_API_extensions );
a42c: e59f0010 ldr r0, [pc, #16] ; a444 <_RTEMS_tasks_Manager_initialization+0x54>
MP_PACKET_TASKS,
_RTEMS_tasks_MP_Process_packet
);
#endif
}
a430: e28dd00c add sp, sp, #12 ; 0xc
a434: e49de004 pop {lr} ; (ldr lr, [sp], #4)
* Add all the extensions for this API
*/
_User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
_API_extensions_Add( &_RTEMS_tasks_API_extensions );
a438: eaffeb5e b 51b8 <_API_extensions_Add>
0000a244 <_Rate_monotonic_Manager_initialization>:
*/
void _Rate_monotonic_Manager_initialization(
uint32_t maximum_periods
)
{
a244: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
a248: e3a0c08c mov ip, #140 ; 0x8c
*/
void _Rate_monotonic_Manager_initialization(
uint32_t maximum_periods
)
{
a24c: e24dd00c sub sp, sp, #12 ; 0xc
a250: e1a03000 mov r3, r0
_Objects_Initialize_information(
a254: e58dc000 str ip, [sp]
a258: e3a0e000 mov lr, #0 ; 0x0
a25c: e24cc088 sub ip, ip, #136 ; 0x88
a260: e59f0018 ldr r0, [pc, #24] ; a280 <_Rate_monotonic_Manager_initialization+0x3c>
a264: e3a01002 mov r1, #2 ; 0x2
a268: e3a02008 mov r2, #8 ; 0x8
a26c: e58de004 str lr, [sp, #4]
a270: e58dc008 str ip, [sp, #8]
a274: ebffef73 bl 6048 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
a278: e28dd00c add sp, sp, #12 ; 0xc
a27c: e8bd8000 pop {pc}
0000499c <_Semaphore_Translate_core_mutex_return_code>:
};
rtems_status_code _Semaphore_Translate_core_mutex_return_code (
uint32_t status
)
{
499c: e59f3004 ldr r3, [pc, #4] ; 49a8 <_Semaphore_Translate_core_mutex_return_code+0xc>
#if defined(RTEMS_DEBUG)
if ( status > CORE_MUTEX_STATUS_LAST )
return RTEMS_INTERNAL_ERROR;
#endif
return _Semaphore_Translate_core_mutex_return_code_[status];
}
49a0: e7930100 ldr r0, [r3, r0, lsl #2]
49a4: e12fff1e bx lr
...
000056d8 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
56d8: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
56dc: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get(
struct timespec *time
)
{
56e0: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
56e4: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get(
struct timespec *time
)
{
56e8: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
56ec: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
56f0: e10f6000 mrs r6, CPSR
56f4: e38630c0 orr r3, r6, #192 ; 0xc0
56f8: e129f003 msr CPSR_fc, r3
*time = _TOD_Now;
if ( _Watchdog_Nanoseconds_since_tick_handler )
56fc: e59f3038 ldr r3, [pc, #56] ; 573c <_TOD_Get+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5700: e59f2038 ldr r2, [pc, #56] ; 5740 <_TOD_Get+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
5704: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5708: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
570c: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5710: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
5714: 0a000002 beq 5724 <_TOD_Get+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
5718: e1a0e00f mov lr, pc <== NOT EXECUTED
571c: e12fff11 bx r1 <== NOT EXECUTED
5720: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
5724: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( time, &offset );
5728: e1a00005 mov r0, r5
572c: e1a0100d mov r1, sp
5730: eb000813 bl 7784 <_Timespec_Add_to>
}
5734: e28dd008 add sp, sp, #8 ; 0x8
5738: e8bd8070 pop {r4, r5, r6, pc}
0000a8ac <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8ac: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a8b0: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8b4: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
a8b8: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a8bc: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a8c0: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
_ISR_Disable( level );
a8c4: e10f6000 mrs r6, CPSR
a8c8: e38630c0 orr r3, r6, #192 ; 0xc0
a8cc: e129f003 msr CPSR_fc, r3
*uptime = _TOD_Uptime;
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8d0: e59f3038 ldr r3, [pc, #56] ; a910 <_TOD_Get_uptime+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8d4: e59f2038 ldr r2, [pc, #56] ; a914 <_TOD_Get_uptime+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8d8: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8dc: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8e0: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a8e4: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a8e8: 0a000002 beq a8f8 <_TOD_Get_uptime+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
a8ec: e1a0e00f mov lr, pc <== NOT EXECUTED
a8f0: e12fff11 bx r1 <== NOT EXECUTED
a8f4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
a8f8: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( uptime, &offset );
a8fc: e1a00005 mov r0, r5
a900: e1a0100d mov r1, sp
a904: ebfff39e bl 7784 <_Timespec_Add_to>
}
a908: e28dd008 add sp, sp, #8 ; 0x8
a90c: e8bd8070 pop {r4, r5, r6, pc}
00006750 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
6750: e52de004 push {lr} ; (str lr, [sp, #-4]!)
6754: e24dd004 sub sp, sp, #4 ; 0x4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
6758: e1a0100d mov r1, sp
675c: eb00006a bl 690c <_Thread_Get>
switch ( location ) {
6760: e59d3000 ldr r3, [sp]
6764: e3530000 cmp r3, #0 ; 0x0
6768: 1a000007 bne 678c <_Thread_Delay_ended+0x3c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
676c: e3a01201 mov r1, #268435456 ; 0x10000000
6770: e2811bff add r1, r1, #261120 ; 0x3fc00
6774: e2811ffe add r1, r1, #1016 ; 0x3f8
6778: ebffff53 bl 64cc <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
677c: e59f2010 ldr r2, [pc, #16] ; 6794 <_Thread_Delay_ended+0x44>
6780: e5923000 ldr r3, [r2]
6784: e2433001 sub r3, r3, #1 ; 0x1
6788: e5823000 str r3, [r2]
case OBJECTS_LOCAL:
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
}
}
678c: e28dd004 add sp, sp, #4 ; 0x4
6790: e8bd8000 pop {pc}
000068e8 <_Thread_Enable_dispatch>:
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
68e8: e59f3018 ldr r3, [pc, #24] ; 6908 <_Thread_Enable_dispatch+0x20>
68ec: e5932000 ldr r2, [r3]
68f0: e2422001 sub r2, r2, #1 ; 0x1
68f4: e5832000 str r2, [r3]
68f8: e5931000 ldr r1, [r3]
68fc: e3510000 cmp r1, #0 ; 0x0
6900: 112fff1e bxne lr
return;
_Thread_Dispatch();
6904: eaffffa3 b 6798 <_Thread_Dispatch>
0000bd78 <_Thread_Handler>:
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
bd78: e59f3110 ldr r3, [pc, #272] ; be90 <_Thread_Handler+0x118>
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
bd7c: e92d4030 push {r4, r5, lr}
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
bd80: 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;
bd84: e59520b8 ldr r2, [r5, #184]
_ISR_Set_level(level);
bd88: e3a03000 mov r3, #0 ; 0x0
bd8c: e10f3000 mrs r3, CPSR
bd90: e3c330c0 bic r3, r3, #192 ; 0xc0
bd94: e1833002 orr r3, r3, r2
bd98: e121f003 msr CPSR_c, r3
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
bd9c: e59f20f0 ldr r2, [pc, #240] ; be94 <_Thread_Handler+0x11c>
doneConstructors = 1;
bda0: e3a03001 mov r3, #1 ; 0x1
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
bda4: 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 );
bda8: 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;
bdac: 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 );
bdb0: ebffeece bl 78f0 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
bdb4: ebffeacb bl 68e8 <_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) */
bdb8: e3540000 cmp r4, #0 ; 0x0
bdbc: 0a000031 beq be88 <_Thread_Handler+0x110>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
bdc0: e59530a0 ldr r3, [r5, #160]
bdc4: e3530003 cmp r3, #3 ; 0x3
bdc8: 979ff103 ldrls pc, [pc, r3, lsl #2]
bdcc: ea000008 b bdf4 <_Thread_Handler+0x7c> <== NOT EXECUTED
bdd0: 0000be60 .word 0x0000be60 <== NOT EXECUTED
bdd4: 0000be38 .word 0x0000be38 <== NOT EXECUTED
bdd8: 0000be0c .word 0x0000be0c <== NOT EXECUTED
bddc: 0000bde0 .word 0x0000bde0 <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
bde0: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED
bde4: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED
bde8: e1a0e00f mov lr, pc <== NOT EXECUTED
bdec: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
bdf0: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* 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 );
bdf4: e1a00005 mov r0, r5 <== NOT EXECUTED
bdf8: ebffeecc bl 7930 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
bdfc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be00: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be04: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be08: ebffe710 bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
be0c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED
be10: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
be14: e1a0e00f mov lr, pc <== NOT EXECUTED
be18: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
be1c: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* 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 );
be20: e1a00005 mov r0, r5 <== NOT EXECUTED
be24: ebffeec1 bl 7930 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
be28: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be2c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be30: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be34: ebffe705 bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
be38: e59500a4 ldr r0, [r5, #164]
be3c: e1a0e00f mov lr, pc
be40: e595f09c ldr pc, [r5, #156]
be44: 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 );
be48: e1a00005 mov r0, r5
be4c: ebffeeb7 bl 7930 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
be50: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
be54: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
be58: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
be5c: ebffe6fb bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
__main ();
#endif
switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
be60: e59500a8 ldr r0, [r5, #168]
be64: e1a0e00f mov lr, pc
be68: e595f09c ldr pc, [r5, #156]
be6c: 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 );
be70: e1a00005 mov r0, r5
be74: ebffeead bl 7930 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
be78: e3a00000 mov r0, #0 ; 0x0
be7c: e3a01001 mov r1, #1 ; 0x1
be80: e3a02006 mov r2, #6 ; 0x6
be84: ebffe6f1 bl 5a50 <_Internal_error_Occurred>
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
{
_init ();
be88: ebffd0a4 bl 120 <_init>
be8c: eaffffcb b bdc0 <_Thread_Handler+0x48>
000069b4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
69b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
69b8: 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
)
{
69bc: e1a04003 mov r4, r3
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;
69c0: 13a03000 movne r3, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
69c4: e5dda02c ldrb sl, [sp, #44]
69c8: e1a09000 mov r9, r0
69cc: e1a05001 mov r5, r1
69d0: e59d8028 ldr r8, [sp, #40]
69d4: e59db030 ldr fp, [sp, #48]
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;
69d8: 15c130c0 strbne r3, [r1, #192]
69dc: 11a0c004 movne ip, r4
69e0: 11a02006 movne r2, r6
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
69e4: 0a000034 beq 6abc <_Thread_Initialize+0x108>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
69e8: e59f416c ldr r4, [pc, #364] ; 6b5c <_Thread_Initialize+0x1a8>
69ec: e5940000 ldr r0, [r4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
69f0: e3a06000 mov r6, #0 ; 0x0
69f4: e3500000 cmp r0, #0 ; 0x0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
69f8: e58520c8 str r2, [r5, #200]
the_stack->size = size;
69fc: e585c0c4 str ip, [r5, #196]
6a00: e5856050 str r6, [r5, #80]
the_watchdog->routine = routine;
6a04: e5856064 str r6, [r5, #100]
the_watchdog->id = id;
6a08: e5856068 str r6, [r5, #104]
the_watchdog->user_data = user_data;
6a0c: e585606c str r6, [r5, #108]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
6a10: e5856100 str r6, [r5, #256]
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6a14: 05850110 streq r0, [r5, #272]
6a18: 01a07000 moveq r7, r0
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
6a1c: 1a000033 bne 6af0 <_Thread_Initialize+0x13c>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6a20: e59d3034 ldr r3, [sp, #52]
switch ( budget_algorithm ) {
6a24: e35b0002 cmp fp, #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;
6a28: 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;
6a2c: 059f312c ldreq r3, [pc, #300] ; 6b60 <_Thread_Initialize+0x1ac>
6a30: 05932000 ldreq r2, [r3]
6a34: 05852078 streq r2, [r5, #120]
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6a38: e59d3038 ldr r3, [sp, #56]
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
6a3c: e3a04000 mov r4, #0 ; 0x0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
6a40: e3a06001 mov r6, #1 ; 0x1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
6a44: 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 );
6a48: e1a01008 mov r1, r8
6a4c: e1a00005 mov r0, r5
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
6a50: e5c5a0ac strb sl, [r5, #172]
the_thread->Start.budget_algorithm = budget_algorithm;
6a54: e585b0b0 str fp, [r5, #176]
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
6a58: e5856010 str r6, [r5, #16]
the_thread->Wait.queue = NULL;
6a5c: e5854044 str r4, [r5, #68]
the_thread->resource_count = 0;
6a60: e585401c str r4, [r5, #28]
the_thread->suspend_count = 0;
6a64: e5854070 str r4, [r5, #112]
the_thread->real_priority = priority;
6a68: e5858018 str r8, [r5, #24]
the_thread->Start.initial_priority = priority;
6a6c: e58580bc str r8, [r5, #188]
_Thread_Set_priority( the_thread, priority );
6a70: eb000200 bl 7278 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
6a74: e1d530b8 ldrh r3, [r5, #8]
6a78: 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;
6a7c: e5854088 str r4, [r5, #136]
6a80: e7825103 str r5, [r2, r3, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
6a84: e59d303c ldr r3, [sp, #60]
* 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 );
6a88: e1a00005 mov r0, r5
6a8c: 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;
6a90: 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 );
6a94: eb0003cb bl 79c8 <_User_extensions_Thread_create>
if ( !extension_status ) {
6a98: e1500004 cmp r0, r4
6a9c: 1a000011 bne 6ae8 <_Thread_Initialize+0x134>
if ( extensions_area )
6aa0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
6aa4: 11a00007 movne r0, r7 <== NOT EXECUTED
6aa8: 1b0004d5 blne 7e04 <_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 );
6aac: e1a00005 mov r0, r5 <== NOT EXECUTED
6ab0: eb0002ad bl 756c <_Thread_Stack_Free> <== NOT EXECUTED
6ab4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
6ab8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
6abc: e1a00001 mov r0, r1
6ac0: e1a01004 mov r1, r4
6ac4: eb000288 bl 74ec <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
6ac8: e1540000 cmp r4, r0
6acc: 93a03000 movls r3, #0 ; 0x0
6ad0: 83a03001 movhi r3, #1 ; 0x1
6ad4: e3500000 cmp r0, #0 ; 0x0
6ad8: 03833001 orreq r3, r3, #1 ; 0x1
6adc: e3530000 cmp r3, #0 ; 0x0
6ae0: e1a0c000 mov ip, r0
6ae4: 0a000014 beq 6b3c <_Thread_Initialize+0x188>
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( !extension_status ) {
6ae8: e1a00006 mov r0, r6
6aec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
6af0: e2800001 add r0, r0, #1 ; 0x1
6af4: e1a00100 lsl r0, r0, #2
6af8: eb0004c5 bl 7e14 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
6afc: e2507000 subs r7, r0, #0 ; 0x0
6b00: 0a000011 beq 6b4c <_Thread_Initialize+0x198>
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b04: e5943000 ldr r3, [r4]
6b08: e3730001 cmn r3, #1 ; 0x1
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6b0c: e5857110 str r7, [r5, #272]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b10: 0affffc2 beq 6a20 <_Thread_Initialize+0x6c>
6b14: e1a02006 mov r2, r6
6b18: e1a01007 mov r1, r7
the_thread->extensions[i] = NULL;
6b1c: e1a00006 mov r0, r6
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b20: e5943000 ldr r3, [r4]
the_thread->extensions[i] = NULL;
6b24: e7810102 str r0, [r1, r2, lsl #2]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6b28: e2833001 add r3, r3, #1 ; 0x1
6b2c: e2822001 add r2, r2, #1 ; 0x1
6b30: e1530002 cmp r3, r2
6b34: 8afffff9 bhi 6b20 <_Thread_Initialize+0x16c>
6b38: eaffffb8 b 6a20 <_Thread_Initialize+0x6c>
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
6b3c: e3a03001 mov r3, #1 ; 0x1
6b40: e5c530c0 strb 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;
6b44: e59520cc ldr r2, [r5, #204]
6b48: eaffffa6 b 69e8 <_Thread_Initialize+0x34>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6b4c: e1a00005 mov r0, r5 <== NOT EXECUTED
6b50: eb000285 bl 756c <_Thread_Stack_Free> <== NOT EXECUTED
6b54: e1a00007 mov r0, r7 <== NOT EXECUTED
6b58: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00007f74 <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7f74: e5903010 ldr r3, [r0, #16]
7f78: e3130001 tst r3, #1 ; 0x1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
7f7c: e92d4070 push {r4, r5, r6, lr}
7f80: e1a04000 mov r4, r0
7f84: e1a05001 mov r5, r1
7f88: e1a06002 mov r6, r2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7f8c: 13a00000 movne r0, #0 ; 0x0
7f90: 18bd8070 popne {r4, r5, r6, pc}
_Thread_Set_transient( the_thread );
7f94: eb000089 bl 81c0 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
7f98: e1a02006 mov r2, r6
7f9c: e1a01005 mov r1, r5
7fa0: e1a00004 mov r0, r4
7fa4: eb000fbd bl bea0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
7fa8: e1a00004 mov r0, r4
7fac: eb000ed1 bl baf8 <_Thread_Load_environment>
_Thread_Ready( the_thread );
7fb0: e1a00004 mov r0, r4
7fb4: eb000f74 bl bd8c <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
7fb8: e1a00004 mov r0, r4
7fbc: eb000208 bl 87e4 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
7fc0: e59f301c ldr r3, [pc, #28] ; 7fe4 <_Thread_Restart+0x70>
7fc4: e5932000 ldr r2, [r3]
7fc8: e1540002 cmp r4, r2
7fcc: 13a00001 movne r0, #1 ; 0x1
7fd0: 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 );
7fd4: e28400d0 add r0, r4, #208 ; 0xd0
7fd8: eb00032e bl 8c98 <_CPU_Context_restore>
7fdc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
return TRUE;
}
return FALSE;
}
7fe0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00008d78 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
8d78: e92d0030 push {r4, r5}
8d7c: e20110ff and r1, r1, #255 ; 0xff
8d80: e1a04000 mov r4, r0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8d84: e10f5000 mrs r5, CPSR
8d88: e38530c0 orr r3, r5, #192 ; 0xc0
8d8c: e129f003 msr CPSR_fc, r3
if ( force == TRUE )
8d90: e3510000 cmp r1, #0 ; 0x0
the_thread->suspend_count = 0;
8d94: 13a03000 movne r3, #0 ; 0x0
8d98: 15803070 strne r3, [r0, #112]
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
if ( force == TRUE )
8d9c: 1a000006 bne 8dbc <_Thread_Resume+0x44>
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8da0: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED
8da4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8da8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8dac: e5803070 str r3, [r0, #112] <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8db0: 0a000001 beq 8dbc <_Thread_Resume+0x44> <== NOT EXECUTED
_ISR_Enable( level );
8db4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
8db8: ea000003 b 8dcc <_Thread_Resume+0x54> <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
8dbc: e5943010 ldr r3, [r4, #16]
if ( current_state & STATES_SUSPENDED ) {
8dc0: e3130002 tst r3, #2 ; 0x2
8dc4: 1a000002 bne 8dd4 <_Thread_Resume+0x5c>
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
8dc8: e129f005 msr CPSR_fc, r5
}
8dcc: e8bd0030 pop {r4, r5}
8dd0: e12fff1e bx lr
8dd4: e3c33002 bic r3, r3, #2 ; 0x2
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8dd8: e3530000 cmp r3, #0 ; 0x0
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
8ddc: e5843010 str r3, [r4, #16]
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8de0: 1afffff8 bne 8dc8 <_Thread_Resume+0x50>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8de4: e5940090 ldr r0, [r4, #144]
8de8: e1d429b6 ldrh r2, [r4, #150]
8dec: e1d030b0 ldrh r3, [r0]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8df0: e594108c ldr r1, [r4, #140]
8df4: e1833002 orr r3, r3, r2
8df8: e1c030b0 strh r3, [r0]
_Priority_Major_bit_map |= the_priority_map->ready_major;
8dfc: e59fc07c ldr ip, [pc, #124] ; 8e80 <_Thread_Resume+0x108>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8e00: e2813004 add r3, r1, #4 ; 0x4
8e04: e5843000 str r3, [r4]
8e08: e1dc20b0 ldrh r2, [ip]
8e0c: e1d439b4 ldrh r3, [r4, #148]
old_last_node = the_chain->last;
8e10: e5910008 ldr r0, [r1, #8]
8e14: e1822003 orr r2, r2, r3
the_chain->last = the_node;
8e18: e5814008 str r4, [r1, #8]
8e1c: e1cc20b0 strh r2, [ip]
old_last_node->next = the_node;
the_node->previous = old_last_node;
8e20: 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;
8e24: e5804000 str r4, [r0]
_ISR_Flash( level );
8e28: e10f3000 mrs r3, CPSR
8e2c: e129f005 msr CPSR_fc, r5
8e30: e129f003 msr CPSR_fc, r3
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
8e34: e59fc048 ldr ip, [pc, #72] ; 8e84 <_Thread_Resume+0x10c>
8e38: e59c3000 ldr r3, [ip]
8e3c: e5940014 ldr r0, [r4, #20]
8e40: e5932014 ldr r2, [r3, #20]
8e44: e1500002 cmp r0, r2
8e48: 2affffde bcs 8dc8 <_Thread_Resume+0x50>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8e4c: e59f3034 ldr r3, [pc, #52] ; 8e88 <_Thread_Resume+0x110>
8e50: e5932000 ldr r2, [r3]
8e54: e5d21076 ldrb r1, [r2, #118]
8e58: e3510000 cmp r1, #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;
8e5c: e58c4000 str r4, [ip]
if ( _Thread_Executing->is_preemptible ||
8e60: 0a000003 beq 8e74 <_Thread_Resume+0xfc>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
8e64: e59f3020 ldr r3, [pc, #32] ; 8e8c <_Thread_Resume+0x114>
8e68: e3a02001 mov r2, #1 ; 0x1
8e6c: e5c32000 strb r2, [r3]
8e70: eaffffd4 b 8dc8 <_Thread_Resume+0x50>
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8e74: e3500000 cmp r0, #0 ; 0x0
8e78: 1affffd2 bne 8dc8 <_Thread_Resume+0x50>
8e7c: eafffff8 b 8e64 <_Thread_Resume+0xec> <== NOT EXECUTED
000074ec <_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 ) {
74ec: e59f3070 ldr r3, [pc, #112] ; 7564 <_Thread_Stack_Allocate+0x78>
74f0: e5932000 ldr r2, [r3]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
74f4: e59f306c ldr r3, [pc, #108] ; 7568 <_Thread_Stack_Allocate+0x7c>
* 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 ) {
74f8: e592c020 ldr ip, [r2, #32]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
74fc: e5932000 ldr r2, [r3]
7500: e92d4030 push {r4, r5, lr}
7504: e1510002 cmp r1, r2
7508: 21a04001 movcs r4, r1
750c: 31a04002 movcc r4, r2
* 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 ) {
7510: e35c0000 cmp ip, #0 ; 0x0
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
7514: 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 ) {
7518: 0a000008 beq 7540 <_Thread_Stack_Allocate+0x54>
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
751c: e1a00004 mov r0, r4 <== NOT EXECUTED
7520: e1a0e00f mov lr, pc <== NOT EXECUTED
7524: e12fff1c bx ip <== NOT EXECUTED
7528: e1a03000 mov r3, r0 <== NOT EXECUTED
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
752c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7530: 11a00004 movne r0, r4 <== NOT EXECUTED
7534: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
7538: e58530cc str r3, [r5, #204] <== NOT EXECUTED
return the_stack_size;
}
753c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
7540: 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 );
7544: e1a00004 mov r0, r4
7548: eb000231 bl 7e14 <_Workspace_Allocate>
754c: e1a03000 mov r3, r0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
7550: e3530000 cmp r3, #0 ; 0x0
7554: 11a00004 movne r0, r4
7558: 03a00000 moveq r0, #0 ; 0x0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
755c: e58530cc str r3, [r5, #204]
return the_stack_size;
}
7560: e8bd8030 pop {r4, r5, pc}
0000756c <_Thread_Stack_Free>:
{
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
756c: e5d030c0 ldrb r3, [r0, #192]
7570: e3530000 cmp r3, #0 ; 0x0
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
7574: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
7578: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
* 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 )
757c: e59f3028 ldr r3, [pc, #40] ; 75ac <_Thread_Stack_Free+0x40>
7580: e5932000 ldr r2, [r3]
7584: e5923024 ldr r3, [r2, #36]
7588: e3530000 cmp r3, #0 ; 0x0
758c: 0a000003 beq 75a0 <_Thread_Stack_Free+0x34>
(*_Configuration_Table->stack_free_hook)(
7590: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
7594: e1a0e00f mov lr, pc <== NOT EXECUTED
7598: e12fff13 bx r3 <== NOT EXECUTED
759c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
75a0: e59000c8 ldr r0, [r0, #200]
}
75a4: e49de004 pop {lr} ; (ldr lr, [sp], #4)
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 );
75a8: ea000215 b 7e04 <_Workspace_Free>
00007648 <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
7648: e59f3084 ldr r3, [pc, #132] ; 76d4 <_Thread_Tickle_timeslice+0x8c>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
764c: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
7650: e5934000 ldr r4, [r3]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
7654: e5d42076 ldrb r2, [r4, #118]
7658: e3520000 cmp r2, #0 ; 0x0
765c: 08bd8010 popeq {r4, pc}
return;
if ( !_States_Is_ready( executing->current_state ) )
7660: e5943010 ldr r3, [r4, #16]
7664: e3530000 cmp r3, #0 ; 0x0
7668: 18bd8010 popne {r4, pc}
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
766c: e594307c ldr r3, [r4, #124]
7670: e3530001 cmp r3, #1 ; 0x1
7674: 38bd8010 popcc {r4, pc}
7678: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
767c: 9a00000a bls 76ac <_Thread_Tickle_timeslice+0x64> <== NOT EXECUTED
7680: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
7684: 18bd8010 popne {r4, pc} <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
7688: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
768c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
7690: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7694: e5843078 str r3, [r4, #120] <== NOT EXECUTED
7698: 18bd8010 popne {r4, pc} <== NOT EXECUTED
(*executing->budget_callout)( executing );
769c: e1a00004 mov r0, r4 <== NOT EXECUTED
76a0: e1a0e00f mov lr, pc <== NOT EXECUTED
76a4: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED
76a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
76ac: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
76b0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
76b4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
76b8: e5843078 str r3, [r4, #120] <== NOT EXECUTED
76bc: c8bd8010 popgt {r4, pc} <== NOT EXECUTED
_Thread_Reset_timeslice();
76c0: eb000e5c bl b038 <_Thread_Reset_timeslice> <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
76c4: e59f300c ldr r3, [pc, #12] ; 76d8 <_Thread_Tickle_timeslice+0x90><== NOT EXECUTED
76c8: e5932000 ldr r2, [r3] <== NOT EXECUTED
76cc: e5842078 str r2, [r4, #120] <== NOT EXECUTED
76d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000076dc <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
76dc: e59f3094 ldr r3, [pc, #148] ; 7778 <_Thread_Yield_processor+0x9c><== NOT EXECUTED
76e0: e5930000 ldr r0, [r3] <== NOT EXECUTED
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
76e4: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
76e8: e590c08c ldr ip, [r0, #140] <== NOT EXECUTED
_ISR_Disable( level );
76ec: e10f4000 mrs r4, CPSR <== NOT EXECUTED
76f0: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED
76f4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( ready ) ) {
76f8: e59c2000 ldr r2, [ip] <== NOT EXECUTED
76fc: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
7700: e1520003 cmp r2, r3 <== NOT EXECUTED
7704: 0a000016 beq 7764 <_Thread_Yield_processor+0x88> <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
7708: e8900006 ldm r0, {r1, r2} <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
770c: e28c3004 add r3, ip, #4 ; 0x4 <== NOT EXECUTED
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
7710: e5821000 str r1, [r2] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
7714: e5812004 str r2, [r1, #4] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
7718: e5803000 str r3, [r0] <== NOT EXECUTED
old_last_node = the_chain->last;
771c: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
the_chain->last = the_node;
7720: e58c0008 str r0, [ip, #8] <== NOT EXECUTED
old_last_node->next = the_node;
the_node->previous = old_last_node;
7724: e5803004 str r3, [r0, #4] <== NOT EXECUTED
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;
7728: e5830000 str r0, [r3] <== NOT EXECUTED
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
772c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7730: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
7734: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
7738: e59f103c ldr r1, [pc, #60] ; 777c <_Thread_Yield_processor+0xa0><== NOT EXECUTED
773c: e5913000 ldr r3, [r1] <== NOT EXECUTED
7740: e1500003 cmp r0, r3 <== NOT EXECUTED
_Thread_Heir = (Thread_Control *) ready->first;
7744: 059c3000 ldreq r3, [ip] <== NOT EXECUTED
7748: 05813000 streq r3, [r1] <== NOT EXECUTED
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
774c: e59f302c ldr r3, [pc, #44] ; 7780 <_Thread_Yield_processor+0xa4><== NOT EXECUTED
7750: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
7754: e5c32000 strb r2, [r3] <== NOT EXECUTED
_ISR_Enable( level );
7758: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
775c: e8bd0010 pop {r4} <== NOT EXECUTED
7760: e12fff1e bx lr <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
7764: e59f3010 ldr r3, [pc, #16] ; 777c <_Thread_Yield_processor+0xa0><== NOT EXECUTED
7768: e5932000 ldr r2, [r3] <== NOT EXECUTED
776c: e1500002 cmp r0, r2 <== NOT EXECUTED
7770: 1afffff5 bne 774c <_Thread_Yield_processor+0x70> <== NOT EXECUTED
7774: eafffff7 b 7758 <_Thread_Yield_processor+0x7c> <== NOT EXECUTED
000062d0 <_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 ) ) {
62d0: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
62d4: e92d4010 push {r4, lr} <== 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 ) ) {
62d8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
62dc: e1a04001 mov r4, r1 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
62e0: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
62e4: e5841044 str r1, [r4, #68] <== 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 ) ) {
62e8: 0a000006 beq 6308 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
62ec: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
62f0: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED
62f4: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED
62f8: e1a00004 mov r0, r4 <== NOT EXECUTED
62fc: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
6300: e8bd4010 pop {r4, lr} <== NOT EXECUTED
6304: ea000070 b 64cc <_Thread_Clear_state> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
6308: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
630c: e5843050 str r3, [r4, #80] <== 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 ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
6310: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
6314: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
6318: eb000667 bl 7cbc <_Watchdog_Remove> <== NOT EXECUTED
631c: eafffff3 b 62f0 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED
00006eb4 <_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
)
{
6eb4: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl}
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6eb8: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
6ebc: e5914014 ldr r4, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6ec0: e1a07001 mov r7, r1
6ec4: e1a08000 mov r8, r0
6ec8: e5813038 str r3, [r1, #56]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
6ecc: e2810038 add r0, r1, #56 ; 0x38
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
6ed0: e3a01000 mov r1, #0 ; 0x0
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 ) )
6ed4: e3140020 tst r4, #32 ; 0x20
6ed8: e587103c str r1, [r7, #60]
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
6edc: e1a01324 lsr r1, r4, #6
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6ee0: e1a0a002 mov sl, r2
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
6ee4: 11a02201 lslne r2, r1, #4
6ee8: 10423101 subne r3, r2, r1, lsl #2
6eec: 10882003 addne r2, r8, r3
the_chain->last = _Chain_Head(the_chain);
6ef0: e5870040 str r0, [r7, #64]
_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;
6ef4: e5986038 ldr r6, [r8, #56]
6ef8: 159f91d4 ldrne r9, [pc, #468] ; 70d4 <_Thread_queue_Enqueue_priority+0x220>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
6efc: 12820008 addne r0, r2, #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 ) )
6f00: 1a000028 bne 6fa8 <_Thread_queue_Enqueue_priority+0xf4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
6f04: e1a03081 lsl r3, r1, #1
6f08: e0833001 add r3, r3, r1
6f0c: e2833001 add r3, r3, #1 ; 0x1
6f10: e1a02201 lsl r2, r1, #4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
6f14: e0422101 sub r2, r2, r1, lsl #2
6f18: e1a03103 lsl r3, r3, #2
6f1c: e0880003 add r0, r8, r3
6f20: e0882002 add r2, r8, r2
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
6f24: e10f5000 mrs r5, CPSR
6f28: e38530c0 orr r3, r5, #192 ; 0xc0
6f2c: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->first;
6f30: e5921000 ldr r1, [r2]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f34: e1510000 cmp r1, r0
6f38: 1a00000f bne 6f7c <_Thread_queue_Enqueue_priority+0xc8>
6f3c: ea000061 b 70c8 <_Thread_queue_Enqueue_priority+0x214>
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
6f40: e5911000 ldr r1, [r1]
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
6f44: e1510000 cmp r1, r0
6f48: 0a00000e beq 6f88 <_Thread_queue_Enqueue_priority+0xd4>
break;
search_priority = search_thread->current_priority;
6f4c: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6f50: e154000c cmp r4, ip
6f54: 9a00000b bls 6f88 <_Thread_queue_Enqueue_priority+0xd4>
break;
#endif
_ISR_Flash( level );
6f58: e10f3000 mrs r3, CPSR
6f5c: e129f005 msr CPSR_fc, r5
6f60: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6f64: e5913010 ldr r3, [r1, #16]
6f68: e1160003 tst r6, r3
6f6c: 0a000049 beq 7098 <_Thread_queue_Enqueue_priority+0x1e4>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
6f70: 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 ) ) {
6f74: e1510000 cmp r1, r0
6f78: 0a000002 beq 6f88 <_Thread_queue_Enqueue_priority+0xd4>
search_priority = search_thread->current_priority;
6f7c: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6f80: e154000c cmp r4, ip
6f84: 8affffed bhi 6f40 <_Thread_queue_Enqueue_priority+0x8c>
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 ) ) {
6f88: e1a06005 mov r6, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6f8c: e5980030 ldr r0, [r8, #48]
6f90: e3500001 cmp r0, #1 ; 0x1
6f94: 0a000034 beq 706c <_Thread_queue_Enqueue_priority+0x1b8>
* 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;
6f98: e58a6000 str r6, [sl] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
6f9c: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl}
6fa0: e12fff1e bx lr
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
6fa4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6fa8: e5d93000 ldrb r3, [r9]
6fac: e283c001 add ip, r3, #1 ; 0x1
_ISR_Disable( level );
6fb0: e10f5000 mrs r5, CPSR
6fb4: e38530c0 orr r3, r5, #192 ; 0xc0
6fb8: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->last;
6fbc: e5901000 ldr r1, [r0]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6fc0: e1520001 cmp r2, r1
6fc4: 0a000018 beq 702c <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
6fc8: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
6fcc: e154000c cmp r4, ip
6fd0: 2a000015 bcs 702c <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
6fd4: e5911004 ldr r1, [r1, #4]
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
6fd8: e1520001 cmp r2, r1
6fdc: 1a00000f bne 7020 <_Thread_queue_Enqueue_priority+0x16c>
6fe0: ea000011 b 702c <_Thread_queue_Enqueue_priority+0x178>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
6fe4: e10f3000 mrs r3, CPSR
6fe8: e129f005 msr CPSR_fc, r5
6fec: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6ff0: e5913010 ldr r3, [r1, #16]
6ff4: e1160003 tst r6, r3
6ff8: 0affffe9 beq 6fa4 <_Thread_queue_Enqueue_priority+0xf0>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
6ffc: 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 ) ) {
7000: e1510002 cmp r1, r2
7004: 0a000008 beq 702c <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
7008: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
700c: e154000c cmp r4, ip
7010: 2a000005 bcs 702c <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
7014: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
7018: e1510002 cmp r1, r2 <== NOT EXECUTED
701c: 0a000002 beq 702c <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED
break;
search_priority = search_thread->current_priority;
7020: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
7024: e154000c cmp r4, ip
7028: 3affffed bcc 6fe4 <_Thread_queue_Enqueue_priority+0x130>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
702c: e5980030 ldr r0, [r8, #48]
7030: e3500001 cmp r0, #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 ) ) {
7034: e1a06005 mov r6, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7038: 1affffd6 bne 6f98 <_Thread_queue_Enqueue_priority+0xe4>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
703c: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
7040: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7044: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
7048: 0a000014 beq 70a0 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
704c: e5913000 ldr r3, [r1]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7050: e5871004 str r1, [r7, #4]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
7054: e5873000 str r3, [r7]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7058: e5878044 str r8, [r7, #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;
705c: e5817000 str r7, [r1]
next_node->previous = the_node;
7060: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
7064: e129f005 msr CPSR_fc, r5
7068: eaffffcb b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
706c: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
7070: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7074: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
7078: 0a000008 beq 70a0 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
707c: e5913004 ldr r3, [r1, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7080: e887000a stm r7, {r1, r3}
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7084: e5878044 str r8, [r7, #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;
7088: e5837000 str r7, [r3]
search_node->previous = the_node;
708c: e5817004 str r7, [r1, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
7090: e129f005 msr CPSR_fc, r5
7094: eaffffc0 b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
7098: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
709c: eaffffa0 b 6f24 <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED
70a0: e281303c add r3, r1, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
70a4: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
70a8: e5873000 str r3, [r7]
the_node->previous = previous_node;
70ac: e5872004 str r2, [r7, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
70b0: e5878044 str r8, [r7, #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;
70b4: e5827000 str r7, [r2]
search_node->previous = the_node;
70b8: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
70bc: e129f006 msr CPSR_fc, r6
70c0: e3a00001 mov r0, #1 ; 0x1
70c4: eaffffb4 b 6f9c <_Thread_queue_Enqueue_priority+0xe8>
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 ) ) {
70c8: e1a06005 mov r6, r5
70cc: e3e0c000 mvn ip, #0 ; 0x0
70d0: eaffffad b 6f8c <_Thread_queue_Enqueue_priority+0xd8>
0000be98 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
be98: e92d4010 push {r4, lr}
be9c: e1a04001 mov r4, r1
ISR_Level level;
_ISR_Disable( level );
bea0: e10f0000 mrs r0, CPSR
bea4: e38030c0 orr r3, r0, #192 ; 0xc0
bea8: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
beac: e5913010 ldr r3, [r1, #16]
beb0: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
beb4: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
beb8: e3c33c41 bic r3, r3, #16640 ; 0x4100
bebc: e3c3301f bic r3, r3, #31 ; 0x1f
bec0: e3530000 cmp r3, #0 ; 0x0
bec4: 0a00000f beq bf08 <_Thread_queue_Extract_fifo+0x70>
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
bec8: e5913050 ldr r3, [r1, #80]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
becc: e5942004 ldr r2, [r4, #4]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
bed0: e5911000 ldr r1, [r1]
bed4: e3530002 cmp r3, #2 ; 0x2
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
bed8: e3a03000 mov r3, #0 ; 0x0
previous = the_node->previous;
next->previous = previous;
previous->next = next;
bedc: e5821000 str r1, [r2]
bee0: e5843044 str r3, [r4, #68]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
bee4: e5812004 str r2, [r1, #4]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
bee8: 0a000008 beq bf10 <_Thread_queue_Extract_fifo+0x78>
_ISR_Enable( level );
beec: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
bef0: e3a01201 mov r1, #268435456 ; 0x10000000
bef4: e2811bff add r1, r1, #261120 ; 0x3fc00
bef8: e1a00004 mov r0, r4
befc: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
bf00: e8bd4010 pop {r4, lr}
bf04: eaffe970 b 64cc <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
bf08: 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
}
bf0c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
bf10: e3a03003 mov r3, #3 ; 0x3
bf14: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
bf18: e129f000 msr CPSR_fc, r0
(void) _Watchdog_Remove( &the_thread->Timer );
bf1c: e2840048 add r0, r4, #72 ; 0x48
bf20: ebffef65 bl 7cbc <_Watchdog_Remove>
bf24: eafffff1 b bef0 <_Thread_queue_Extract_fifo+0x58>
0000adf4 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
adf4: e92d4070 push {r4, r5, r6, lr}
adf8: e1a04001 mov r4, r1
adfc: 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 );
ae00: e10fc000 mrs ip, CPSR
ae04: e38c30c0 orr r3, ip, #192 ; 0xc0
ae08: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ae0c: e5913010 ldr r3, [r1, #16]
ae10: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
ae14: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
ae18: e3c33c41 bic r3, r3, #16640 ; 0x4100
ae1c: e3c3301f bic r3, r3, #31 ; 0x1f
ae20: e3530000 cmp r3, #0 ; 0x0
ae24: 0a000023 beq aeb8 <_Thread_queue_Extract_priority_helper+0xc4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ae28: e5911038 ldr r1, [r1, #56]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
ae2c: e284303c add r3, r4, #60 ; 0x3c
ae30: e1510003 cmp r1, r3
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
ae34: 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;
ae38: 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;
ae3c: 05832000 streq r2, [r3]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
ae40: 0a00000e beq ae80 <_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;
ae44: e5945040 ldr r5, [r4, #64]
new_second_node = new_first_node->next;
ae48: e5910000 ldr r0, [r1]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
ae4c: 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;
ae50: e5831000 str r1, [r3]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
ae54: e881000c stm r1, {r2, r3}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
ae58: e5942038 ldr r2, [r4, #56]
ae5c: e5943040 ldr r3, [r4, #64]
ae60: e1520003 cmp r2, r3
ae64: 0a000005 beq ae80 <_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 );
ae68: 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 =
ae6c: e2813038 add r3, r1, #56 ; 0x38
ae70: e5803004 str r3, [r0, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
ae74: e5810038 str r0, [r1, #56]
new_first_thread->Wait.Block2n.last = last_node;
ae78: e5815040 str r5, [r1, #64]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
ae7c: e5852000 str r2, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
ae80: e3560000 cmp r6, #0 ; 0x0
ae84: 1a000009 bne aeb0 <_Thread_queue_Extract_priority_helper+0xbc>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ae88: e5943050 ldr r3, [r4, #80]
ae8c: e3530002 cmp r3, #2 ; 0x2
ae90: 0a00000a beq aec0 <_Thread_queue_Extract_priority_helper+0xcc>
_ISR_Enable( level );
ae94: e129f00c msr CPSR_fc, ip
ae98: e3a01201 mov r1, #268435456 ; 0x10000000
ae9c: e2811bff add r1, r1, #261120 ; 0x3fc00
aea0: e1a00004 mov r0, r4
aea4: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
aea8: e8bd4070 pop {r4, r5, r6, lr}
aeac: eaffed86 b 64cc <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
aeb0: e129f00c msr CPSR_fc, ip
aeb4: e8bd8070 pop {r4, r5, r6, pc}
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
aeb8: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
aebc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
aec0: e3a03003 mov r3, #3 ; 0x3
aec4: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
aec8: e129f00c msr CPSR_fc, ip
(void) _Watchdog_Remove( &the_thread->Timer );
aecc: e2840048 add r0, r4, #72 ; 0x48
aed0: ebfff379 bl 7cbc <_Watchdog_Remove>
aed4: eaffffef b ae98 <_Thread_queue_Extract_priority_helper+0xa4>
0000aed8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
aed8: e1a01000 mov r1, r0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
aedc: e5900044 ldr r0, [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 &&
aee0: e590c030 ldr ip, [r0, #48]
aee4: e35c0000 cmp ip, #0 ; 0x0
aee8: 0a000003 beq aefc <_Thread_queue_Process_timeout+0x24>
aeec: e59f302c ldr r3, [pc, #44] ; af20 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED
aef0: e5932000 ldr r2, [r3] <== NOT EXECUTED
aef4: e1510002 cmp r1, r2 <== NOT EXECUTED
aef8: 0a000002 beq af08 <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED
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;
aefc: e590303c ldr r3, [r0, #60]
af00: e5813034 str r3, [r1, #52]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
af04: eaffffb4 b addc <_Thread_queue_Extract>
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
af08: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
af0c: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
af10: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
af14: 15813034 strne r3, [r1, #52] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
af18: 15802030 strne r2, [r0, #48] <== NOT EXECUTED
af1c: e12fff1e bx lr <== NOT EXECUTED
00012c24 <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c28: e59f01cc ldr r0, [pc, #460] ; 12dfc <_Timer_Server_body+0x1d8>
12c2c: e59f81cc ldr r8, [pc, #460] ; 12e00 <_Timer_Server_body+0x1dc>
12c30: e5902000 ldr r2, [r0]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c34: e59f01c8 ldr r0, [pc, #456] ; 12e04 <_Timer_Server_body+0x1e0>
12c38: e5983000 ldr r3, [r8]
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c3c: e24dd00c sub sp, sp, #12 ; 0xc
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c40: e59f91c0 ldr r9, [pc, #448] ; 12e08 <_Timer_Server_body+0x1e4>
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c44: e59fb1c0 ldr fp, [pc, #448] ; 12e0c <_Timer_Server_body+0x1e8>
12c48: e5901000 ldr r1, [r0]
12c4c: e2833001 add r3, r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c50: e28d5004 add r5, sp, #4 ; 0x4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12c54: e3a04000 mov r4, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c58: e1a0600d mov r6, sp
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c5c: e5892000 str r2, [r9]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c60: e58b1000 str r1, [fp]
12c64: e5883000 str r3, [r8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c68: e58d5000 str r5, [sp]
the_chain->permanent_null = NULL;
12c6c: e98d2010 stmib sp, {r4, sp}
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
12c70: ebffffce bl 12bb0 <_Timer_Server_process_insertions>
_Thread_Enable_dispatch();
12c74: eb000b6e bl 15a34 <_Thread_Enable_dispatch>
12c78: e59fa190 ldr sl, [pc, #400] ; 12e10 <_Timer_Server_body+0x1ec>
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12c7c: e1a07004 mov r7, r4
12c80: e5983000 ldr r3, [r8]
12c84: e2833001 add r3, r3, #1 ; 0x1
12c88: e5883000 str r3, [r8]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
12c8c: e3a01008 mov r1, #8 ; 0x8
12c90: e59a0000 ldr r0, [sl]
12c94: eb000e4d bl 165d0 <_Thread_Set_state>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12c98: e59f2174 ldr r2, [pc, #372] ; 12e14 <_Timer_Server_body+0x1f0>
_Timer_Server_reset_ticks_timer();
12c9c: e59f0174 ldr r0, [pc, #372] ; 12e18 <_Timer_Server_body+0x1f4>
12ca0: e5923000 ldr r3, [r2]
12ca4: e1530000 cmp r3, r0
12ca8: 0a000006 beq 12cc8 <_Timer_Server_body+0xa4>
12cac: e59f215c ldr r2, [pc, #348] ; 12e10 <_Timer_Server_body+0x1ec>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cb0: e5933010 ldr r3, [r3, #16]
12cb4: e5921000 ldr r1, [r2]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cb8: e59f015c ldr r0, [pc, #348] ; 12e1c <_Timer_Server_body+0x1f8>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cbc: e5813054 str r3, [r1, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cc0: e2811048 add r1, r1, #72 ; 0x48
12cc4: eb001125 bl 17160 <_Watchdog_Insert>
12cc8: e59f0150 ldr r0, [pc, #336] ; 12e20 <_Timer_Server_body+0x1fc>
_Timer_Server_reset_seconds_timer();
12ccc: e59f2150 ldr r2, [pc, #336] ; 12e24 <_Timer_Server_body+0x200>
12cd0: e5903000 ldr r3, [r0]
12cd4: e1530002 cmp r3, r2
12cd8: 0a000004 beq 12cf0 <_Timer_Server_body+0xcc>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cdc: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12ce0: e59f1140 ldr r1, [pc, #320] ; 12e28 <_Timer_Server_body+0x204><== NOT EXECUTED
12ce4: e59f0140 ldr r0, [pc, #320] ; 12e2c <_Timer_Server_body+0x208><== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12ce8: e581300c str r3, [r1, #12] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12cec: eb00111b bl 17160 <_Watchdog_Insert> <== NOT EXECUTED
_Thread_Enable_dispatch();
12cf0: eb000b4f bl 15a34 <_Thread_Enable_dispatch>
12cf4: e5983000 ldr r3, [r8]
12cf8: e2833001 add r3, r3, #1 ; 0x1
12cfc: e5883000 str r3, [r8]
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
12d00: e59a0000 ldr r0, [sl]
12d04: e2800048 add r0, r0, #72 ; 0x48
12d08: eb001183 bl 1731c <_Watchdog_Remove>
_Timer_Server_stop_seconds_timer();
12d0c: e59f0114 ldr r0, [pc, #276] ; 12e28 <_Timer_Server_body+0x204>
12d10: eb001181 bl 1731c <_Watchdog_Remove>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d14: e59f30e0 ldr r3, [pc, #224] ; 12dfc <_Timer_Server_body+0x1d8>
if ( snapshot >= _Timer_Server_ticks_last_time )
12d18: e5991000 ldr r1, [r9]
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d1c: e593c000 ldr ip, [r3]
if ( snapshot >= _Timer_Server_ticks_last_time )
12d20: e15c0001 cmp ip, r1
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d24: 31e03001 mvncc r3, r1
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
12d28: 2061100c rsbcs r1, r1, ip
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d2c: 3083100c addcc r1, r3, ip
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d30: e59f00dc ldr r0, [pc, #220] ; 12e14 <_Timer_Server_body+0x1f0>
12d34: e1a0200d mov r2, sp
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
12d38: e589c000 str ip, [r9]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d3c: eb0010d9 bl 170a8 <_Watchdog_Adjust_to_chain>
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d40: e59f00bc ldr r0, [pc, #188] ; 12e04 <_Timer_Server_body+0x1e0>
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d44: e59b2000 ldr r2, [fp]
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d48: e5904000 ldr r4, [r0]
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d4c: e1540002 cmp r4, r2
12d50: 8a00001f bhi 12dd4 <_Timer_Server_body+0x1b0>
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
12d54: 3a000023 bcc 12de8 <_Timer_Server_body+0x1c4>
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
}
_Timer_Server_seconds_last_time = snapshot;
12d58: e58b4000 str r4, [fp]
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12d5c: ebffff93 bl 12bb0 <_Timer_Server_process_insertions>
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
12d60: eb000b33 bl 15a34 <_Thread_Enable_dispatch>
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12d64: e10f1000 mrs r1, CPSR
12d68: e38130c0 orr r3, r1, #192 ; 0xc0
12d6c: e129f003 msr CPSR_fc, r3
12d70: e59d2000 ldr r2, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12d74: e1550002 cmp r5, r2
12d78: 0a000013 beq 12dcc <_Timer_Server_body+0x1a8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d7c: e5923000 ldr r3, [r2]
the_chain->first = new_first;
12d80: e58d3000 str r3, [sp]
new_first->previous = _Chain_Head(the_chain);
12d84: e5836004 str r6, [r3, #4]
12d88: ea000002 b 12d98 <_Timer_Server_body+0x174>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED
the_chain->first = new_first;
12d90: e58d3000 str r3, [sp] <== NOT EXECUTED
new_first->previous = _Chain_Head(the_chain);
12d94: e5836004 str r6, [r3, #4] <== NOT EXECUTED
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12d98: e5827008 str r7, [r2, #8]
_ISR_Enable( level );
12d9c: e129f001 msr CPSR_fc, r1
(*watch->routine)( watch->id, watch->user_data );
12da0: e2820020 add r0, r2, #32 ; 0x20
12da4: e8900003 ldm r0, {r0, r1}
12da8: e1a0e00f mov lr, pc
12dac: e592f01c ldr pc, [r2, #28]
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12db0: e10f1000 mrs r1, CPSR
12db4: e38130c0 orr r3, r1, #192 ; 0xc0
12db8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12dbc: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12dc0: e1550003 cmp r5, r3
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
12dc4: e1a02003 mov r2, r3
12dc8: 1affffef bne 12d8c <_Timer_Server_body+0x168>
if ( watch == NULL ) {
_ISR_Enable( level );
12dcc: e129f001 msr CPSR_fc, r1
12dd0: eaffffaa b 12c80 <_Timer_Server_body+0x5c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
12dd4: e0621004 rsb r1, r2, r4
12dd8: e59f0040 ldr r0, [pc, #64] ; 12e20 <_Timer_Server_body+0x1fc>
12ddc: e1a0200d mov r2, sp
12de0: eb0010b0 bl 170a8 <_Watchdog_Adjust_to_chain>
12de4: eaffffdb b 12d58 <_Timer_Server_body+0x134>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
12de8: e0642002 rsb r2, r4, r2 <== NOT EXECUTED
12dec: e59f002c ldr r0, [pc, #44] ; 12e20 <_Timer_Server_body+0x1fc><== NOT EXECUTED
12df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
12df4: eb00107c bl 16fec <_Watchdog_Adjust> <== NOT EXECUTED
12df8: eaffffd6 b 12d58 <_Timer_Server_body+0x134> <== NOT EXECUTED
00012bb0 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
12bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bb4: e59f005c ldr r0, [pc, #92] ; 12c18 <_Timer_Server_process_insertions+0x68>
12bb8: eb0002a9 bl 13664 <_Chain_Get>
if ( the_timer == NULL )
12bbc: e3500000 cmp r0, #0 ; 0x0
12bc0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
12bc4: e5903038 ldr r3, [r0, #56]
12bc8: e3530001 cmp r3, #1 ; 0x1
12bcc: 0a00000c beq 12c04 <_Timer_Server_process_insertions+0x54>
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
12bd0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
12bd4: 0a000005 beq 12bf0 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bd8: ebfffff4 bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bdc: e59f0034 ldr r0, [pc, #52] ; 12c18 <_Timer_Server_process_insertions+0x68>
12be0: eb00029f bl 13664 <_Chain_Get>
if ( the_timer == NULL )
12be4: e3500000 cmp r0, #0 ; 0x0
12be8: 1afffff5 bne 12bc4 <_Timer_Server_process_insertions+0x14>
12bec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
12bf0: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED
12bf4: e59f0020 ldr r0, [pc, #32] ; 12c1c <_Timer_Server_process_insertions+0x6c><== NOT EXECUTED
12bf8: eb001158 bl 17160 <_Watchdog_Insert> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bfc: ebffffeb bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
12c00: eafffff5 b 12bdc <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
12c04: e2801010 add r1, r0, #16 ; 0x10
12c08: e59f0010 ldr r0, [pc, #16] ; 12c20 <_Timer_Server_process_insertions+0x70>
12c0c: eb001153 bl 17160 <_Watchdog_Insert>
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12c10: ebffffe6 bl 12bb0 <_Timer_Server_process_insertions>
12c14: eafffff0 b 12bdc <_Timer_Server_process_insertions+0x2c>
00009644 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
9644: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
9648: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
964c: e5907000 ldr r7, [r0] <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
9650: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED
9654: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
9658: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
965c: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED
9660: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED
t += time->tv_nsec;
9664: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
9668: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
966c: e0950003 adds r0, r5, r3 <== NOT EXECUTED
9670: e1a07001 mov r7, r1 <== NOT EXECUTED
9674: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
9678: e1a0a002 mov sl, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
967c: e0a61004 adc r1, r6, r4 <== NOT EXECUTED
9680: e1a02007 mov r2, r7 <== NOT EXECUTED
9684: e1a03008 mov r3, r8 <== NOT EXECUTED
9688: eb0036b2 bl 17158 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
968c: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
9690: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
9694: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
9698: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
969c: e1a04000 mov r4, r0 <== NOT EXECUTED
96a0: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
96a4: eb0036ab bl 17158 <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
96a8: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
96ac: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
96b0: e58a0000 str r0, [sl] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
96b4: e1a01005 mov r1, r5 <== NOT EXECUTED
96b8: e1a00004 mov r0, r4 <== NOT EXECUTED
96bc: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
96c0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
96c4: eb0037eb bl 17678 <__umoddi3> <== NOT EXECUTED
96c8: e58a0004 str r0, [sl, #4] <== NOT EXECUTED
}
96cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00009d20 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
9d20: e92d4010 push {r4, lr}
9d24: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
9d28: eb000bb2 bl cbf8 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
9d2c: e5943024 ldr r3, [r4, #36]
9d30: e3530000 cmp r3, #0 ; 0x0
9d34: 08bd8010 popeq {r4, pc}
_Chain_Extract( &the_extension->Switch.Node );
9d38: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED
}
9d3c: 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 );
9d40: ea000bac b cbf8 <_Chain_Extract> <== NOT EXECUTED
00007930 <_User_extensions_Thread_exitted>:
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
7930: e59f3038 ldr r3, [pc, #56] ; 7970 <_User_extensions_Thread_exitted+0x40><== NOT EXECUTED
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
7934: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
7938: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
793c: e1540003 cmp r4, r3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
7940: e1a06003 mov r6, r3 <== NOT EXECUTED
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
7944: 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 ) ;
7948: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
794c: e594302c ldr r3, [r4, #44] <== NOT EXECUTED
7950: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
(*the_extension->Callouts.thread_exitted)( executing );
7954: e1a00005 mov r0, r5 <== NOT EXECUTED
7958: 11a0e00f movne lr, pc <== NOT EXECUTED
795c: 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 ) {
7960: 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 ) ;
7964: e1540006 cmp r4, r6 <== NOT EXECUTED
7968: 1afffff7 bne 794c <_User_extensions_Thread_exitted+0x1c> <== NOT EXECUTED
796c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00007a74 <_User_extensions_Thread_start>:
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
7a74: e92d40f0 push {r4, r5, r6, r7, lr}
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
7a78: e59f5038 ldr r5, [pc, #56] ; 7ab8 <_User_extensions_Thread_start+0x44>
7a7c: e4954004 ldr r4, [r5], #4
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
7a80: e1540005 cmp r4, r5
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
7a84: e1a06000 mov r6, r0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
7a88: 08bd80f0 popeq {r4, r5, r6, r7, pc}
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
7a8c: e59f7028 ldr r7, [pc, #40] ; 7abc <_User_extensions_Thread_start+0x48>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
7a90: e5943018 ldr r3, [r4, #24]
7a94: e3530000 cmp r3, #0 ; 0x0
(*the_extension->Callouts.thread_start)(
7a98: e1a01006 mov r1, r6
7a9c: 15970000 ldrne r0, [r7]
7aa0: 11a0e00f movne lr, pc
7aa4: 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 ) {
7aa8: 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 ) ;
7aac: e1540005 cmp r4, r5
7ab0: 1afffff6 bne 7a90 <_User_extensions_Thread_start+0x1c>
7ab4: e8bd80f0 pop {r4, r5, r6, r7, pc}
00007ac0 <_User_extensions_Thread_switch>:
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
7ac0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
7ac4: e59f5030 ldr r5, [pc, #48] ; 7afc <_User_extensions_Thread_switch+0x3c><== NOT EXECUTED
7ac8: e4954004 ldr r4, [r5], #4 <== NOT EXECUTED
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7acc: e1540005 cmp r4, r5 <== NOT EXECUTED
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
7ad0: e1a07000 mov r7, r0 <== NOT EXECUTED
7ad4: e1a06001 mov r6, r1 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7ad8: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
7adc: e1a00007 mov r0, r7 <== NOT EXECUTED
7ae0: e1a01006 mov r1, r6 <== NOT EXECUTED
7ae4: e1a0e00f mov lr, pc <== NOT EXECUTED
7ae8: e594f008 ldr pc, [r4, #8] <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
7aec: e5944000 ldr r4, [r4] <== NOT EXECUTED
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
7af0: e1540005 cmp r4, r5 <== NOT EXECUTED
7af4: 1afffff8 bne 7adc <_User_extensions_Thread_switch+0x1c> <== NOT EXECUTED
7af8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000996c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
996c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
9970: e1a07000 mov r7, r0
9974: e1a04002 mov r4, r2
ISR_Level level;
_ISR_Disable( level );
9978: e10fc000 mrs ip, CPSR
997c: e38c30c0 orr r3, ip, #192 ; 0xc0
9980: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
9984: e1a06000 mov r6, r0
9988: e4960004 ldr r0, [r6], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
998c: e1500006 cmp r0, r6
9990: 0a000019 beq 99fc <_Watchdog_Adjust+0x90>
switch ( direction ) {
9994: e3510000 cmp r1, #0 ; 0x0
9998: 1a000019 bne 9a04 <_Watchdog_Adjust+0x98>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
999c: e3520000 cmp r2, #0 ; 0x0
99a0: 0a000015 beq 99fc <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
99a4: e5905010 ldr r5, [r0, #16]
99a8: e1520005 cmp r2, r5
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
99ac: e1a01000 mov r1, r0
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
99b0: 23a08001 movcs r8, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
99b4: 2a000005 bcs 99d0 <_Watchdog_Adjust+0x64>
99b8: ea000017 b 9a1c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
99bc: e0544005 subs r4, r4, r5
99c0: 0a00000d beq 99fc <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
99c4: e5915010 ldr r5, [r1, #16]
99c8: e1550004 cmp r5, r4
99cc: 8a000012 bhi 9a1c <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
99d0: e5818010 str r8, [r1, #16]
_ISR_Enable( level );
99d4: e129f00c msr CPSR_fc, ip
_Watchdog_Tickle( header );
99d8: e1a00007 mov r0, r7
99dc: eb0000ab bl 9c90 <_Watchdog_Tickle>
_ISR_Disable( level );
99e0: e10fc000 mrs ip, CPSR
99e4: e38c30c0 orr r3, ip, #192 ; 0xc0
99e8: e129f003 msr CPSR_fc, r3
99ec: e5973000 ldr r3, [r7]
if ( _Chain_Is_empty( header ) )
99f0: e1560003 cmp r6, r3
99f4: e1a01003 mov r1, r3
99f8: 1affffef bne 99bc <_Watchdog_Adjust+0x50>
}
break;
}
}
_ISR_Enable( level );
99fc: e129f00c msr CPSR_fc, ip
}
9a00: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
9a04: e3510001 cmp r1, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
9a08: 05903010 ldreq r3, [r0, #16]
9a0c: 00833002 addeq r3, r3, r2
9a10: 05803010 streq r3, [r0, #16]
}
break;
}
}
_ISR_Enable( level );
9a14: e129f00c msr CPSR_fc, ip
}
9a18: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
9a1c: e0643005 rsb r3, r4, r5
9a20: e5813010 str r3, [r1, #16]
9a24: eafffff4 b 99fc <_Watchdog_Adjust+0x90>
00007c5c <_Watchdog_Handler_initialization>:
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
_Watchdog_Sync_count = 0;
7c5c: e59f3044 ldr r3, [pc, #68] ; 7ca8 <_Watchdog_Handler_initialization+0x4c>
7c60: e3a01000 mov r1, #0 ; 0x0
7c64: e5831000 str r1, [r3]
_Watchdog_Sync_level = 0;
7c68: e59f303c ldr r3, [pc, #60] ; 7cac <_Watchdog_Handler_initialization+0x50>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7c6c: e59f003c ldr r0, [pc, #60] ; 7cb0 <_Watchdog_Handler_initialization+0x54>
7c70: e59f203c ldr r2, [pc, #60] ; 7cb4 <_Watchdog_Handler_initialization+0x58>
7c74: e5831000 str r1, [r3]
_Watchdog_Ticks_since_boot = 0;
7c78: e59f3038 ldr r3, [pc, #56] ; 7cb8 <_Watchdog_Handler_initialization+0x5c>
*
* Output parameters: NONE
*/
void _Watchdog_Handler_initialization( void )
{
7c7c: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
7c80: e280c004 add ip, r0, #4 ; 0x4
7c84: e2824004 add r4, r2, #4 ; 0x4
7c88: e580c000 str ip, [r0]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7c8c: e5800008 str r0, [r0, #8]
_Watchdog_Sync_count = 0;
_Watchdog_Sync_level = 0;
_Watchdog_Ticks_since_boot = 0;
7c90: e5831000 str r1, [r3]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7c94: e5824000 str r4, [r2]
the_chain->permanent_null = NULL;
7c98: e9820006 stmib r2, {r1, r2}
7c9c: e5801004 str r1, [r0, #4]
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
}
7ca0: e8bd0010 pop {r4}
7ca4: e12fff1e bx lr
00007b00 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7b00: e59f3144 ldr r3, [pc, #324] ; 7c4c <_Watchdog_Insert+0x14c>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
7b04: e92d01f0 push {r4, r5, r6, r7, r8}
7b08: e1a04001 mov r4, r1
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7b0c: e5935000 ldr r5, [r3]
_ISR_Disable( level );
7b10: e10f6000 mrs r6, CPSR
7b14: e38630c0 orr r3, r6, #192 ; 0xc0
7b18: 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 ) {
7b1c: e5913008 ldr r3, [r1, #8]
7b20: e3530000 cmp r3, #0 ; 0x0
7b24: 1a000041 bne 7c30 <_Watchdog_Insert+0x130>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
7b28: e59f8120 ldr r8, [pc, #288] ; 7c50 <_Watchdog_Insert+0x150>
7b2c: e5983000 ldr r3, [r8]
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7b30: e3a02001 mov r2, #1 ; 0x1
_Watchdog_Sync_count++;
7b34: e2833001 add r3, r3, #1 ; 0x1
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7b38: e5812008 str r2, [r1, #8]
_Watchdog_Sync_count++;
7b3c: e5883000 str r3, [r8]
7b40: e59f710c ldr r7, [pc, #268] ; 7c54 <_Watchdog_Insert+0x154>
restart:
delta_interval = the_watchdog->initial;
7b44: e594c00c ldr ip, [r4, #12]
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b48: e35c0000 cmp ip, #0 ; 0x0
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
7b4c: e5902000 ldr r2, [r0]
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b50: 0a000023 beq 7be4 <_Watchdog_Insert+0xe4>
7b54: e5923000 ldr r3, [r2]
7b58: e3530000 cmp r3, #0 ; 0x0
7b5c: 0a000020 beq 7be4 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
7b60: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7b64: e15c0001 cmp ip, r1 <== NOT EXECUTED
7b68: 3a000032 bcc 7c38 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* 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 );
7b6c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7b70: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7b74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7b78: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7b7c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
7b80: 1a000023 bne 7c14 <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7b84: e5973000 ldr r3, [r7] <== NOT EXECUTED
7b88: e1550003 cmp r5, r3 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7b8c: 2061c00c rsbcs ip, r1, ip <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7b90: 2a000010 bcs 7bd8 <_Watchdog_Insert+0xd8> <== NOT EXECUTED
7b94: ea00002a b 7c44 <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b98: e5923000 ldr r3, [r2] <== NOT EXECUTED
7b9c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7ba0: 0a00000f beq 7be4 <_Watchdog_Insert+0xe4> <== NOT EXECUTED
break;
if ( delta_interval < after->delta_interval ) {
7ba4: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7ba8: e151000c cmp r1, ip <== NOT EXECUTED
7bac: 8a000021 bhi 7c38 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* 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 );
7bb0: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7bb4: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7bb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7bbc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7bc0: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7bc4: e061c00c rsb ip, r1, ip <== NOT EXECUTED
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7bc8: 1a000011 bne 7c14 <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7bcc: e5973000 ldr r3, [r7] <== NOT EXECUTED
7bd0: e1550003 cmp r5, r3 <== NOT EXECUTED
7bd4: 3a00001a bcc 7c44 <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7bd8: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7bdc: e5922000 ldr r2, [r2] <== NOT EXECUTED
7be0: 1affffec bne 7b98 <_Watchdog_Insert+0x98> <== NOT EXECUTED
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
7be4: e5921004 ldr r1, [r2, #4]
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
7be8: e59f3068 ldr r3, [pc, #104] ; 7c58 <_Watchdog_Insert+0x158>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
7bec: e5910000 ldr r0, [r1]
7bf0: e5932000 ldr r2, [r3]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
7bf4: e3a03002 mov r3, #2 ; 0x2
after_node->next = the_node;
7bf8: e5814000 str r4, [r1]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
7bfc: e5841004 str r1, [r4, #4]
7c00: e5842014 str r2, [r4, #20]
7c04: e5843008 str r3, [r4, #8]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
7c08: e584c010 str ip, [r4, #16]
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
7c0c: e5804004 str r4, [r0, #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;
7c10: e5840000 str r0, [r4]
_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;
7c14: e5875000 str r5, [r7]
_Watchdog_Sync_count--;
7c18: e5983000 ldr r3, [r8]
7c1c: e2433001 sub r3, r3, #1 ; 0x1
7c20: e5883000 str r3, [r8]
_ISR_Enable( level );
7c24: e129f006 msr CPSR_fc, r6
}
7c28: e8bd01f0 pop {r4, r5, r6, r7, r8}
7c2c: e12fff1e bx lr
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
7c30: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7c34: eafffffb b 7c28 <_Watchdog_Insert+0x128> <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
7c38: e06c3001 rsb r3, ip, r1 <== NOT EXECUTED
7c3c: e5823010 str r3, [r2, #16] <== NOT EXECUTED
7c40: eaffffe7 b 7be4 <_Watchdog_Insert+0xe4> <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
7c44: e5875000 str r5, [r7] <== NOT EXECUTED
7c48: eaffffbd b 7b44 <_Watchdog_Insert+0x44> <== NOT EXECUTED
00007cbc <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
7cbc: e92d0030 push {r4, r5}
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
7cc0: e10f5000 mrs r5, CPSR
7cc4: e38530c0 orr r3, r5, #192 ; 0xc0
7cc8: e129f003 msr CPSR_fc, r3
previous_state = the_watchdog->state;
7ccc: e590c008 ldr ip, [r0, #8]
switch ( previous_state ) {
7cd0: e35c0001 cmp ip, #1 ; 0x1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
7cd4: 03a03000 moveq r3, #0 ; 0x0
7cd8: 05803008 streq r3, [r0, #8]
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7cdc: 0a000000 beq 7ce4 <_Watchdog_Remove+0x28>
7ce0: 2a000006 bcs 7d00 <_Watchdog_Remove+0x44>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
7ce4: e59f306c ldr r3, [pc, #108] ; 7d58 <_Watchdog_Remove+0x9c>
7ce8: e5932000 ldr r2, [r3]
7cec: e5802018 str r2, [r0, #24]
_ISR_Enable( level );
7cf0: e129f005 msr CPSR_fc, r5
return( previous_state );
}
7cf4: e1a0000c mov r0, ip
7cf8: e8bd0030 pop {r4, r5}
7cfc: e12fff1e bx lr
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7d00: e35c0003 cmp ip, #3 ; 0x3
7d04: 8afffff6 bhi 7ce4 <_Watchdog_Remove+0x28>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7d08: e5904000 ldr r4, [r0]
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7d0c: e5943000 ldr r3, [r4]
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7d10: e3a02000 mov r2, #0 ; 0x0
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7d14: e3530000 cmp r3, #0 ; 0x0
next_watchdog->delta_interval += the_watchdog->delta_interval;
7d18: 15943010 ldrne r3, [r4, #16]
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7d1c: e5802008 str r2, [r0, #8]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
next_watchdog->delta_interval += the_watchdog->delta_interval;
7d20: 15902010 ldrne r2, [r0, #16]
7d24: 10833002 addne r3, r3, r2
7d28: 15843010 strne r3, [r4, #16]
if ( _Watchdog_Sync_count )
7d2c: e59f3028 ldr r3, [pc, #40] ; 7d5c <_Watchdog_Remove+0xa0>
7d30: e5932000 ldr r2, [r3]
7d34: e3520000 cmp r2, #0 ; 0x0
_Watchdog_Sync_level = _ISR_Nest_level;
7d38: 159f3020 ldrne r3, [pc, #32] ; 7d60 <_Watchdog_Remove+0xa4>
7d3c: 159f2020 ldrne r2, [pc, #32] ; 7d64 <_Watchdog_Remove+0xa8>
7d40: 15931000 ldrne r1, [r3]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
7d44: e5903004 ldr r3, [r0, #4]
7d48: 15821000 strne r1, [r2]
next->previous = previous;
previous->next = next;
7d4c: e5834000 str r4, [r3]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
7d50: e5843004 str r3, [r4, #4]
7d54: eaffffe2 b 7ce4 <_Watchdog_Remove+0x28>
00007e04 <_Workspace_Free>:
* _Workspace_Free
*/
bool _Workspace_Free(
void *block
)
{
7e04: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Heap_Free( &_Workspace_Area, block );
7e08: e59f0000 ldr r0, [pc, #0] ; 7e10 <_Workspace_Free+0xc> <== NOT EXECUTED
7e0c: ea000af3 b a9e0 <_Heap_Free> <== NOT EXECUTED
00007e4c <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7e4c: e92d4030 push {r4, r5, lr}
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7e50: e2504000 subs r4, r0, #0 ; 0x0
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7e54: e1a05001 mov r5, r1
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7e58: 0a000010 beq 7ea0 <_Workspace_Handler_initialization+0x54>
7e5c: e214c003 ands ip, r4, #3 ; 0x3
7e60: 1a00000e bne 7ea0 <_Workspace_Handler_initialization+0x54>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
7e64: e59f3054 ldr r3, [pc, #84] ; 7ec0 <_Workspace_Handler_initialization+0x74>
7e68: e5932000 ldr r2, [r3]
7e6c: e5d21028 ldrb r1, [r2, #40]
7e70: e3510000 cmp r1, #0 ; 0x0
7e74: 1a00000d bne 7eb0 <_Workspace_Handler_initialization+0x64>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
7e78: e1a01004 mov r1, r4
7e7c: e1a02005 mov r2, r5
7e80: e59f003c ldr r0, [pc, #60] ; 7ec4 <_Workspace_Handler_initialization+0x78>
7e84: e3a03004 mov r3, #4 ; 0x4
7e88: ebfff665 bl 5824 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
7e8c: e3500000 cmp r0, #0 ; 0x0
7e90: 18bd8030 popne {r4, r5, pc}
_Internal_error_Occurred(
7e94: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
7e98: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
7e9c: ebfff6eb bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
7ea0: e3a00000 mov r0, #0 ; 0x0
7ea4: e3a01001 mov r1, #1 ; 0x1
7ea8: e3a02002 mov r2, #2 ; 0x2
7eac: ebfff6e7 bl 5a50 <_Internal_error_Occurred>
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
7eb0: e1a0100c mov r1, ip <== NOT EXECUTED
7eb4: e1a02005 mov r2, r5 <== NOT EXECUTED
7eb8: eb00125a bl c828 <memset> <== NOT EXECUTED
7ebc: eaffffed b 7e78 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED
000181cc <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
181cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
181d0: e24dd00c sub sp, sp, #12 ; 0xc
181d4: e1a04000 mov r4, r0
181d8: e1a05001 mov r5, r1
181dc: e1a06002 mov r6, r2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
181e0: ebfffedf bl 17d64 <getpid>
181e4: e1500004 cmp r0, r4
181e8: 1a0000a5 bne 18484 <killinfo+0x2b8>
/*
* Validate the signal passed.
*/
if ( !sig )
181ec: e3550000 cmp r5, #0 ; 0x0
181f0: 0a0000a8 beq 18498 <killinfo+0x2cc>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
181f4: e2450001 sub r0, r5, #1 ; 0x1
181f8: e350001f cmp r0, #31 ; 0x1f
181fc: 8a0000a5 bhi 18498 <killinfo+0x2cc>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
18200: e59f22b8 ldr r2, [pc, #696] ; 184c0 <killinfo+0x2f4>
18204: e1a0b105 lsl fp, r5, #2
18208: e1a09205 lsl r9, r5, #4
1820c: e06b3009 rsb r3, fp, r9
18210: e0823003 add r3, r2, r3
18214: e5932008 ldr r2, [r3, #8]
18218: e3520001 cmp r2, #1 ; 0x1
1821c: 0a00003c beq 18314 <killinfo+0x148>
* 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 ) )
18220: e3550004 cmp r5, #4 ; 0x4
18224: 13550008 cmpne r5, #8 ; 0x8
18228: 0a00003b beq 1831c <killinfo+0x150>
1822c: e355000b cmp r5, #11 ; 0xb
18230: 0a000039 beq 1831c <killinfo+0x150>
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
18234: e3a03001 mov r3, #1 ; 0x1
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
18238: e58d3004 str r3, [sp, #4]
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
1823c: e58d5000 str r5, [sp]
siginfo->si_code = SI_USER;
if ( !value ) {
18240: e3560000 cmp r6, #0 ; 0x0
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
mask = signo_to_mask( sig );
18244: e1a04013 lsl r4, r3, r0
18248: e59f2274 ldr r2, [pc, #628] ; 184c4 <killinfo+0x2f8>
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
1824c: 15963000 ldrne r3, [r6]
18250: 158d3008 strne r3, [sp, #8]
18254: e5923000 ldr r3, [r2]
18258: 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;
1825c: 058d6008 streq r6, [sp, #8]
18260: 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;
18264: e59f325c ldr r3, [pc, #604] ; 184c8 <killinfo+0x2fc>
18268: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
1826c: e5902108 ldr r2, [r0, #264]
18270: e59230c4 ldr r3, [r2, #196]
18274: e1d43003 bics r3, r4, r3
18278: 1a000016 bne 182d8 <killinfo+0x10c>
goto process_it;
1827c: e59fc248 ldr ip, [pc, #584] ; 184cc <killinfo+0x300>
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
18280: e28ce030 add lr, ip, #48 ; 0x30
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
18284: e1a0100c mov r1, ip
18288: e4912004 ldr r2, [r1], #4
!_Chain_Is_tail( the_chain, the_node ) ;
1828c: e1520001 cmp r2, r1
18290: 0a000036 beq 18370 <killinfo+0x1a4>
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)) {
18294: e5923030 ldr r3, [r2, #48]
18298: e1140003 tst r4, 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;
1829c: e1a00002 mov r0, r2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
182a0: e5923108 ldr r3, [r2, #264]
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
182a4: 0a000008 beq 182cc <killinfo+0x100>
182a8: ea00000a b 182d8 <killinfo+0x10c>
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 ) {
182ac: 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 ) ;
182b0: e1520001 cmp r2, r1 <== NOT EXECUTED
182b4: 0a00002d beq 18370 <killinfo+0x1a4> <== NOT EXECUTED
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)) {
182b8: e5923030 ldr r3, [r2, #48] <== NOT EXECUTED
182bc: e1140003 tst r4, r3 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
182c0: e1a00002 mov r0, r2 <== NOT EXECUTED
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
182c4: e5923108 ldr r3, [r2, #264] <== NOT EXECUTED
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
182c8: 1a000002 bne 182d8 <killinfo+0x10c> <== NOT EXECUTED
182cc: e59330c4 ldr r3, [r3, #196] <== NOT EXECUTED
182d0: e1d43003 bics r3, r4, r3 <== NOT EXECUTED
182d4: 0afffff4 beq 182ac <killinfo+0xe0> <== NOT EXECUTED
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
182d8: e3a03001 mov r3, #1 ; 0x1
182dc: 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 ) ) {
182e0: e1a01005 mov r1, r5
182e4: e1a0200d mov r2, sp
182e8: eb000090 bl 18530 <_POSIX_signals_Unblock_thread>
182ec: e3500000 cmp r0, #0 ; 0x0
182f0: 1a00001b bne 18364 <killinfo+0x198>
/*
* 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 );
182f4: e1a00004 mov r0, r4
182f8: eb000079 bl 184e4 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
182fc: e59f21bc ldr r2, [pc, #444] ; 184c0 <killinfo+0x2f4>
18300: e06b5009 rsb r5, fp, r9
18304: e7923005 ldr r3, [r2, r5]
18308: e3530002 cmp r3, #2 ; 0x2
1830c: 0a000007 beq 18330 <killinfo+0x164>
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
18310: ebffc01e bl 8390 <_Thread_Enable_dispatch>
18314: e3a00000 mov r0, #0 ; 0x0
18318: ea000002 b 18328 <killinfo+0x15c>
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
1831c: eb00010c bl 18754 <pthread_self>
18320: e1a01005 mov r1, r5
18324: eb0000cf bl 18668 <pthread_kill>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
return 0;
}
18328: e28dd00c add sp, sp, #12 ; 0xc
1832c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
18330: e59f0198 ldr r0, [pc, #408] ; 184d0 <killinfo+0x304>
18334: ebffd0da bl c6a4 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
18338: e250e000 subs lr, r0, #0 ; 0x0
1833c: 0a00005a beq 184ac <killinfo+0x2e0>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
18340: e89d0007 ldm sp, {r0, r1, r2}
18344: e28ec008 add ip, lr, #8 ; 0x8
18348: e88c0007 stm ip, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
1834c: e59f0180 ldr r0, [pc, #384] ; 184d4 <killinfo+0x308>
18350: e1a0100e mov r1, lr
18354: e0800005 add r0, r0, r5
18358: ebffba0c bl 6b90 <_Chain_Append>
}
_Thread_Enable_dispatch();
1835c: ebffc00b bl 8390 <_Thread_Enable_dispatch>
18360: eaffffeb b 18314 <killinfo+0x148>
* Returns TRUE if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
_Thread_Enable_dispatch();
18364: ebffc009 bl 8390 <_Thread_Enable_dispatch>
18368: e3a00000 mov r0, #0 ; 0x0
1836c: eaffffed b 18328 <killinfo+0x15c>
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
18370: e28cc00c add ip, ip, #12 ; 0xc
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
18374: e15c000e cmp ip, lr
18378: 1affffc1 bne 18284 <killinfo+0xb8>
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
1837c: e59f3154 ldr r3, [pc, #340] ; 184d8 <killinfo+0x30c>
18380: e5d32000 ldrb r2, [r3]
18384: e59f7150 ldr r7, [pc, #336] ; 184dc <killinfo+0x310>
18388: e2822001 add r2, r2, #1 ; 0x1
1838c: e3a0a000 mov sl, #0 ; 0x0
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
18390: e5973008 ldr r3, [r7, #8]
18394: e3530000 cmp r3, #0 ; 0x0
18398: 0a00002d beq 18454 <killinfo+0x288>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
1839c: 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 )
183a0: e3530000 cmp r3, #0 ; 0x0
183a4: 0a00002a beq 18454 <killinfo+0x288>
continue;
maximum = the_info->maximum;
183a8: e1d361b0 ldrh r6, [r3, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
183ac: e3560000 cmp r6, #0 ; 0x0
*/
if ( !the_info )
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
183b0: e593001c ldr r0, [r3, #28]
for ( index = 1 ; index <= maximum ; index++ ) {
183b4: 0a000026 beq 18454 <killinfo+0x288>
183b8: e3a0c001 mov ip, #1 ; 0x1
the_thread = (Thread_Control *) object_table[ index ];
183bc: e790110c ldr r1, [r0, ip, lsl #2]
if ( !the_thread )
183c0: e3510000 cmp r1, #0 ; 0x0
183c4: 0a000018 beq 1842c <killinfo+0x260>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
183c8: e591e014 ldr lr, [r1, #20]
183cc: e15e0002 cmp lr, r2
183d0: 8a000015 bhi 1842c <killinfo+0x260>
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
183d4: e5913108 ldr r3, [r1, #264]
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
183d8: e3530000 cmp r3, #0 ; 0x0
183dc: 0a000012 beq 1842c <killinfo+0x260>
183e0: e59330c4 ldr r3, [r3, #196]
183e4: e1d43003 bics r3, r4, r3
183e8: 0a00000f beq 1842c <killinfo+0x260>
* 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 ) {
183ec: e15e0002 cmp lr, r2
183f0: 3a000005 bcc 1840c <killinfo+0x240>
* 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 ) )
183f4: e59a3010 ldr r3, [sl, #16] <== NOT EXECUTED
183f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
183fc: 0a00000a beq 1842c <killinfo+0x260> <== 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 ) ) {
18400: e5918010 ldr r8, [r1, #16] <== NOT EXECUTED
18404: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
18408: 1a000017 bne 1846c <killinfo+0x2a0> <== NOT EXECUTED
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
1840c: e28cc001 add ip, ip, #1 ; 0x1
18410: e156000c cmp r6, ip
* 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 ) {
18414: e1a0a001 mov sl, r1
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18418: 3a000007 bcc 1843c <killinfo+0x270>
the_thread = (Thread_Control *) object_table[ index ];
1841c: e790110c ldr r1, [r0, ip, lsl #2]
if ( !the_thread )
18420: e3510000 cmp r1, #0 ; 0x0
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18424: e1a0200e mov r2, lr
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
18428: 1affffe6 bne 183c8 <killinfo+0x1fc>
* 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 ) {
1842c: e1a0e002 mov lr, r2
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18430: e28cc001 add ip, ip, #1 ; 0x1
18434: e156000c cmp r6, ip
18438: 2afffff7 bcs 1841c <killinfo+0x250>
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
1843c: e59f309c ldr r3, [pc, #156] ; 184e0 <killinfo+0x314>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18440: e2877004 add r7, r7, #4 ; 0x4
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
18444: e1570003 cmp r7, r3
18448: 0a000003 beq 1845c <killinfo+0x290>
1844c: e1a0200e mov r2, lr
18450: eaffffce b 18390 <killinfo+0x1c4>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
18454: e1a0e002 mov lr, r2
18458: eafffff7 b 1843c <killinfo+0x270>
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
1845c: e35a0000 cmp sl, #0 ; 0x0
18460: 0affffa3 beq 182f4 <killinfo+0x128>
18464: e1a0000a mov r0, sl
18468: eaffff9a b 182d8 <killinfo+0x10c>
* 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 )
1846c: e3130201 tst r3, #268435456 ; 0x10000000 <== NOT EXECUTED
18470: 1affffed bne 1842c <killinfo+0x260> <== 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 ) {
18474: e3180201 tst r8, #268435456 ; 0x10000000 <== NOT EXECUTED
18478: 1affffe3 bne 1840c <killinfo+0x240> <== NOT EXECUTED
1847c: e1a0e002 mov lr, r2 <== NOT EXECUTED
18480: eaffffea b 18430 <killinfo+0x264> <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
18484: ebffd617 bl dce8 <__errno> <== NOT EXECUTED
18488: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
1848c: e5803000 str r3, [r0] <== NOT EXECUTED
18490: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
18494: eaffffa3 b 18328 <killinfo+0x15c> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
18498: ebffd612 bl dce8 <__errno> <== NOT EXECUTED
1849c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
184a0: e5803000 str r3, [r0] <== NOT EXECUTED
184a4: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
184a8: eaffff9e b 18328 <killinfo+0x15c> <== NOT EXECUTED
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
rtems_set_errno_and_return_minus_one( EAGAIN );
184ac: ebffd60d bl dce8 <__errno> <== NOT EXECUTED
184b0: e3a0300b mov r3, #11 ; 0xb <== NOT EXECUTED
184b4: e5803000 str r3, [r0] <== NOT EXECUTED
184b8: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
184bc: eaffff99 b 18328 <killinfo+0x15c> <== NOT EXECUTED
0000a040 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
a040: e92d4070 push {r4, r5, r6, lr}
a044: e1a06001 mov r6, r1
a048: e1a04000 mov r4, r0
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
a04c: eb0005a5 bl b6e8 <_Timespec_Is_valid>
a050: e3500000 cmp r0, #0 ; 0x0
a054: 0a000038 beq a13c <nanosleep+0xfc>
* 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 )
a058: e5943000 ldr r3, [r4]
a05c: e3530000 cmp r3, #0 ; 0x0
a060: ba000035 blt a13c <nanosleep+0xfc>
a064: e5943004 ldr r3, [r4, #4]
a068: e3530000 cmp r3, #0 ; 0x0
a06c: ba000032 blt a13c <nanosleep+0xfc>
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
a070: e1a00004 mov r0, r4
a074: eb0005ac bl b72c <_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 ) {
a078: e2505000 subs r5, r0, #0 ; 0x0
a07c: 0a000022 beq a10c <nanosleep+0xcc>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a080: e59f20dc ldr r2, [pc, #220] ; a164 <nanosleep+0x124>
a084: e5923000 ldr r3, [r2]
a088: e2833001 add r3, r3, #1 ; 0x1
a08c: e5823000 str r3, [r2]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
a090: e59f40d0 ldr r4, [pc, #208] ; a168 <nanosleep+0x128>
a094: e3a01281 mov r1, #268435464 ; 0x10000008
a098: e5940000 ldr r0, [r4]
a09c: ebfff5a5 bl 7738 <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
a0a0: e5943000 ldr r3, [r4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0a4: e59f20c0 ldr r2, [pc, #192] ; a16c <nanosleep+0x12c>
a0a8: e5931008 ldr r1, [r3, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0ac: e3a00000 mov r0, #0 ; 0x0
the_watchdog->routine = routine;
the_watchdog->id = id;
a0b0: e5831068 str r1, [r3, #104]
the_watchdog->user_data = user_data;
a0b4: e583006c str r0, [r3, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0b8: e5830050 str r0, [r3, #80]
the_watchdog->routine = routine;
a0bc: e5832064 str r2, [r3, #100]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0c0: e2831048 add r1, r3, #72 ; 0x48
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0c4: e5835054 str r5, [r3, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0c8: e59f00a0 ldr r0, [pc, #160] ; a170 <nanosleep+0x130>
a0cc: ebfff7ca bl 7ffc <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
a0d0: ebfff314 bl 6d28 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
a0d4: e3560000 cmp r6, #0 ; 0x0
a0d8: 0a000009 beq a104 <nanosleep+0xc4>
ticks -=
a0dc: e5943000 ldr r3, [r4]
a0e0: e283205c add r2, r3, #92 ; 0x5c
a0e4: e8920014 ldm r2, {r2, r4}
a0e8: e0424004 sub r4, r2, r4
a0ec: e0844005 add r4, r4, r5
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
a0f0: e1a01006 mov r1, r6
a0f4: e1a00004 mov r0, r4
a0f8: eb000566 bl b698 <_Timespec_From_ticks>
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
a0fc: e3540000 cmp r4, #0 ; 0x0
a100: 1a000012 bne a150 <nanosleep+0x110>
rtems_set_errno_and_return_minus_one( EINTR );
a104: e3a00000 mov r0, #0 ; 0x0
}
return 0;
}
a108: e8bd8070 pop {r4, r5, r6, pc}
a10c: e59f2050 ldr r2, [pc, #80] ; a164 <nanosleep+0x124>
a110: e5923000 ldr r3, [r2]
a114: e2833001 add r3, r3, #1 ; 0x1
a118: e5823000 str r3, [r2]
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
a11c: ebfff67e bl 7b1c <_Thread_Yield_processor>
_Thread_Enable_dispatch();
a120: ebfff300 bl 6d28 <_Thread_Enable_dispatch>
if ( rmtp ) {
a124: e3560000 cmp r6, #0 ; 0x0
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
a128: 15865004 strne r5, [r6, #4]
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
a12c: 15865000 strne r5, [r6]
rmtp->tv_nsec = 0;
a130: 11a00005 movne r0, r5
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
a134: 18bd8070 popne {r4, r5, r6, pc}
a138: eafffff1 b a104 <nanosleep+0xc4> <== NOT EXECUTED
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
a13c: eb00094f bl c680 <__errno>
a140: e3a03016 mov r3, #22 ; 0x16
a144: e5803000 str r3, [r0]
a148: e3e00000 mvn r0, #0 ; 0x0
a14c: e8bd8070 pop {r4, r5, r6, pc}
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
a150: eb00094a bl c680 <__errno>
a154: e3a03004 mov r3, #4 ; 0x4
a158: e5803000 str r3, [r0]
a15c: e3e00000 mvn r0, #0 ; 0x0
a160: e8bd8070 pop {r4, r5, r6, pc}
000052bc <pthread_cond_timedwait>:
int pthread_cond_timedwait(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
52bc: e92d4030 push {r4, r5, lr}
52c0: e24dd004 sub sp, sp, #4 ; 0x4
52c4: e1a04000 mov r4, r0
52c8: 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) ) {
52cc: e1a00002 mov r0, r2
52d0: e1a0100d mov r1, sp
52d4: eb000130 bl 579c <_POSIX_Absolute_timeout_to_ticks>
52d8: e3500003 cmp r0, #3 ; 0x3
52dc: 979ff100 ldrls pc, [pc, r0, lsl #2]
52e0: ea000004 b 52f8 <pthread_cond_timedwait+0x3c> <== NOT EXECUTED
52e4: 00005318 .word 0x00005318 <== NOT EXECUTED
52e8: 00005310 .word 0x00005310 <== NOT EXECUTED
52ec: 00005310 .word 0x00005310 <== NOT EXECUTED
52f0: 000052f4 .word 0x000052f4 <== NOT EXECUTED
52f4: e3a03000 mov r3, #0 ; 0x0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
already_timedout = FALSE;
break;
}
return _POSIX_Condition_variables_Wait_support(
52f8: e1a00004 mov r0, r4
52fc: e1a01005 mov r1, r5
5300: e59d2000 ldr r2, [sp]
5304: eb000008 bl 532c <_POSIX_Condition_variables_Wait_support>
cond,
mutex,
ticks,
already_timedout
);
}
5308: e28dd004 add sp, sp, #4 ; 0x4
530c: e8bd8030 pop {r4, r5, pc}
* 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) ) {
5310: e3a03001 mov r3, #1 ; 0x1
5314: eafffff7 b 52f8 <pthread_cond_timedwait+0x3c>
5318: e3a00016 mov r0, #22 ; 0x16
531c: eafffff9 b 5308 <pthread_cond_timedwait+0x4c>
00005510 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
5510: 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 )
5514: e2529000 subs r9, r2, #0 ; 0x0
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
5518: e24dd03c sub sp, sp, #60 ; 0x3c
551c: e58d001c str r0, [sp, #28]
5520: e1a0a003 mov sl, r3
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
5524: 03a0000e moveq r0, #14 ; 0xe
5528: 0a000014 beq 5580 <pthread_create+0x70>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
552c: e59f32d0 ldr r3, [pc, #720] ; 5804 <pthread_create+0x2f4>
5530: e3510000 cmp r1, #0 ; 0x0
5534: 11a06001 movne r6, r1
5538: 01a06003 moveq r6, r3
if ( !the_attr->is_initialized )
553c: e5962000 ldr r2, [r6]
5540: e3520000 cmp r2, #0 ; 0x0
5544: 0a00000c beq 557c <pthread_create+0x6c>
* 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) )
5548: e5963004 ldr r3, [r6, #4]
554c: e3530000 cmp r3, #0 ; 0x0
5550: 0a000004 beq 5568 <pthread_create+0x58>
5554: e59f32ac ldr r3, [pc, #684] ; 5808 <pthread_create+0x2f8>
5558: e5962008 ldr r2, [r6, #8]
555c: e5931000 ldr r1, [r3]
5560: e1520001 cmp r2, r1
5564: 3a000004 bcc 557c <pthread_create+0x6c>
* 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 ) {
5568: e5963010 ldr r3, [r6, #16]
556c: e3530001 cmp r3, #1 ; 0x1
5570: 0a00001b beq 55e4 <pthread_create+0xd4>
5574: e3530002 cmp r3, #2 ; 0x2
5578: 0a000002 beq 5588 <pthread_create+0x78>
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
557c: e3a00016 mov r0, #22 ; 0x16
}
5580: e28dd03c add sp, sp, #60 ; 0x3c
5584: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
5588: e286c018 add ip, r6, #24 ; 0x18
558c: e8bc000f ldm ip!, {r0, r1, r2, r3}
5590: e28d7024 add r7, sp, #36 ; 0x24
5594: e1a04007 mov r4, r7
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
5598: e5968014 ldr r8, [r6, #20]
schedparam = the_attr->schedparam;
559c: e8a4000f stmia r4!, {r0, r1, r2, r3}
55a0: e89c0003 ldm ip, {r0, r1}
55a4: e8840003 stm r4, {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 )
55a8: e596300c ldr r3, [r6, #12]
55ac: e3530000 cmp r3, #0 ; 0x0
55b0: 13a00086 movne r0, #134 ; 0x86
55b4: 1afffff1 bne 5580 <pthread_create+0x70>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
55b8: e59db024 ldr fp, [sp, #36]
55bc: e24b3001 sub r3, fp, #1 ; 0x1
55c0: e35300fd cmp r3, #253 ; 0xfd
55c4: 8affffec bhi 557c <pthread_create+0x6c>
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
55c8: e3580003 cmp r8, #3 ; 0x3
55cc: 979ff108 ldrls pc, [pc, r8, lsl #2]
55d0: eaffffe9 b 557c <pthread_create+0x6c>
55d4: 00005700 .word 0x00005700
55d8: 000056f4 .word 0x000056f4 <== NOT EXECUTED
55dc: 000056e4 .word 0x000056e4 <== NOT EXECUTED
55e0: 00005614 .word 0x00005614 <== NOT EXECUTED
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
55e4: e59f3220 ldr r3, [pc, #544] ; 580c <pthread_create+0x2fc>
55e8: e5932000 ldr r2, [r3]
55ec: e5925108 ldr r5, [r2, #264]
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
55f0: e285c080 add ip, r5, #128 ; 0x80
55f4: e8bc000f ldm ip!, {r0, r1, r2, r3}
55f8: e28d7024 add r7, sp, #36 ; 0x24
55fc: e1a04007 mov r4, r7
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
5600: e595807c ldr r8, [r5, #124]
schedparam = api->schedparam;
5604: e8a4000f stmia r4!, {r0, r1, r2, r3}
5608: e89c0003 ldm ip, {r0, r1}
560c: e8840003 stm r4, {r0, r1}
5610: eaffffe4 b 55a8 <pthread_create+0x98>
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 ) <
5614: e28d002c add r0, sp, #44 ; 0x2c
5618: eb0010d9 bl 9984 <_Timespec_To_ticks>
561c: e1a04000 mov r4, r0
5620: e28d0034 add r0, sp, #52 ; 0x34
5624: eb0010d6 bl 9984 <_Timespec_To_ticks>
5628: e1540000 cmp r4, r0
562c: 3affffd2 bcc 557c <pthread_create+0x6c>
_Timespec_To_ticks( &schedparam.ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
5630: e59d3028 ldr r3, [sp, #40]
5634: e2433001 sub r3, r3, #1 ; 0x1
5638: e35300fd cmp r3, #253 ; 0xfd
563c: 8affffce bhi 557c <pthread_create+0x6c>
5640: e59fc1c8 ldr ip, [pc, #456] ; 5810 <pthread_create+0x300>
5644: e58dc020 str ip, [sp, #32]
5648: e3a04003 mov r4, #3 ; 0x3
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
564c: e59f21c0 ldr r2, [pc, #448] ; 5814 <pthread_create+0x304>
5650: e5920000 ldr r0, [r2]
5654: eb0006f1 bl 7220 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
5658: e59f01b8 ldr r0, [pc, #440] ; 5818 <pthread_create+0x308>
565c: eb00094a bl 7b8c <_Objects_Allocate>
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
5660: e2505000 subs r5, r0, #0 ; 0x0
5664: 0a000052 beq 57b4 <pthread_create+0x2a4>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
5668: e59f2198 ldr r2, [pc, #408] ; 5808 <pthread_create+0x2f8>
566c: e26bc0ff rsb ip, fp, #255 ; 0xff
5670: e5923000 ldr r3, [r2]
5674: e5961008 ldr r1, [r6, #8]
5678: e5962004 ldr r2, [r6, #4]
567c: e58dc004 str ip, [sp, #4]
5680: e59dc020 ldr ip, [sp, #32]
5684: e1a03083 lsl r3, r3, #1
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
5688: e3a0b000 mov fp, #0 ; 0x0
status = _Thread_Initialize(
568c: e1530001 cmp r3, r1
5690: 31a03001 movcc r3, r1
5694: e58dc010 str ip, [sp, #16]
5698: e59f0178 ldr r0, [pc, #376] ; 5818 <pthread_create+0x308>
569c: e3a0c001 mov ip, #1 ; 0x1
56a0: e1a01005 mov r1, r5
56a4: e58d400c str r4, [sp, #12]
56a8: e58db000 str fp, [sp]
56ac: e58dc008 str ip, [sp, #8]
56b0: e58db014 str fp, [sp, #20]
56b4: e58db018 str fp, [sp, #24]
56b8: eb000ce4 bl 8a50 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
56bc: e150000b cmp r0, fp
56c0: 1a000012 bne 5710 <pthread_create+0x200>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
56c4: e1a01005 mov r1, r5
56c8: e59f0148 ldr r0, [pc, #328] ; 5818 <pthread_create+0x308>
56cc: eb000a1b bl 7f40 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
56d0: e59f213c ldr r2, [pc, #316] ; 5814 <pthread_create+0x304>
56d4: e5920000 ldr r0, [r2]
56d8: eb0006ec bl 7290 <_API_Mutex_Unlock>
56dc: e3a0000b mov r0, #11 ; 0xb
56e0: eaffffa6 b 5580 <pthread_create+0x70>
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
56e4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
56e8: e3a04002 mov r4, #2 ; 0x2 <== NOT EXECUTED
56ec: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
56f0: eaffffd5 b 564c <pthread_create+0x13c> <== NOT EXECUTED
56f4: e3a04000 mov r4, #0 ; 0x0
56f8: e58d4020 str r4, [sp, #32]
56fc: eaffffd2 b 564c <pthread_create+0x13c>
5700: e3a02000 mov r2, #0 ; 0x0
5704: e3a04001 mov r4, #1 ; 0x1
5708: e58d2020 str r2, [sp, #32]
570c: eaffffce b 564c <pthread_create+0x13c>
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5710: e5954108 ldr r4, [r5, #264]
api->Attributes = *the_attr;
5714: e1a0c006 mov ip, r6
5718: e8bc000f ldm ip!, {r0, r1, r2, r3}
571c: e1a0e004 mov lr, r4
5720: e8ae000f stmia lr!, {r0, r1, r2, r3}
5724: e8bc000f ldm ip!, {r0, r1, r2, r3}
5728: e8ae000f stmia lr!, {r0, r1, r2, r3}
572c: e8bc000f ldm ip!, {r0, r1, r2, r3}
5730: e8ae000f stmia lr!, {r0, r1, r2, r3}
5734: e89c0003 ldm ip, {r0, r1}
5738: e88e0003 stm lr, {r0, r1}
api->detachstate = the_attr->detachstate;
573c: e5963034 ldr r3, [r6, #52]
api->schedpolicy = schedpolicy;
5740: e584807c str r8, [r4, #124]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
5744: e5843038 str r3, [r4, #56]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
5748: e1a0e007 mov lr, r7
574c: e8be000f ldm lr!, {r0, r1, r2, r3}
5750: e284c080 add ip, r4, #128 ; 0x80
5754: e8ac000f stmia ip!, {r0, r1, r2, r3}
5758: 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;
575c: e3a03001 mov r3, #1 ; 0x1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
5760: e88c0003 stm ip, {r0, r1}
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
5764: e5c53075 strb r3, [r5, #117]
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
5768: e3a01001 mov r1, #1 ; 0x1
576c: e1a02009 mov r2, r9
5770: e1a0300a mov r3, sl
5774: e1a00005 mov r0, r5
5778: e58db000 str fp, [sp]
577c: eb000fc6 bl 969c <_Thread_Start>
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
5780: e3580003 cmp r8, #3 ; 0x3
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
5784: e1a06000 mov r6, r0
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
5788: 0a000016 beq 57e8 <pthread_create+0x2d8>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
578c: e3560000 cmp r6, #0 ; 0x0
5790: 1a00000c bne 57c8 <pthread_create+0x2b8>
5794: e1a01005 mov r1, r5 <== NOT EXECUTED
5798: e59f0078 ldr r0, [pc, #120] ; 5818 <pthread_create+0x308> <== NOT EXECUTED
579c: eb0009e7 bl 7f40 <_Objects_Free> <== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
57a0: e59fc06c ldr ip, [pc, #108] ; 5814 <pthread_create+0x304> <== NOT EXECUTED
57a4: e59c0000 ldr r0, [ip] <== NOT EXECUTED
57a8: eb0006b8 bl 7290 <_API_Mutex_Unlock> <== NOT EXECUTED
57ac: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
57b0: eaffff72 b 5580 <pthread_create+0x70> <== NOT EXECUTED
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
57b4: e59f3058 ldr r3, [pc, #88] ; 5814 <pthread_create+0x304>
57b8: e5930000 ldr r0, [r3]
57bc: eb0006b3 bl 7290 <_API_Mutex_Unlock>
57c0: e3a0000b mov r0, #11 ; 0xb
57c4: eaffff6d b 5580 <pthread_create+0x70>
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
57c8: e5953008 ldr r3, [r5, #8]
57cc: e59d201c ldr r2, [sp, #28]
57d0: e5823000 str r3, [r2]
_RTEMS_Unlock_allocator();
57d4: e59f3038 ldr r3, [pc, #56] ; 5814 <pthread_create+0x304>
57d8: e5930000 ldr r0, [r3]
57dc: eb0006ab bl 7290 <_API_Mutex_Unlock>
57e0: e3a00000 mov r0, #0 ; 0x0
57e4: eaffff65 b 5580 <pthread_create+0x70>
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
57e8: e2840088 add r0, r4, #136 ; 0x88
57ec: eb001064 bl 9984 <_Timespec_To_ticks>
57f0: e284109c add r1, r4, #156 ; 0x9c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
57f4: e58400a8 str r0, [r4, #168]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
57f8: e59f001c ldr r0, [pc, #28] ; 581c <pthread_create+0x30c>
57fc: eb001163 bl 9d90 <_Watchdog_Insert>
5800: eaffffe1 b 578c <pthread_create+0x27c>
0000459c <pthread_key_create>:
459c: e59f2104 ldr r2, [pc, #260] ; 46a8 <pthread_key_create+0x10c>
45a0: e5923000 ldr r3, [r2]
45a4: e2833001 add r3, r3, #1 ; 0x1
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
45a8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
45ac: e5823000 str r3, [r2]
45b0: e1a09000 mov r9, r0
45b4: 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 );
45b8: e59fa0ec ldr sl, [pc, #236] ; 46ac <pthread_key_create+0x110>
45bc: e1a0000a mov r0, sl
45c0: eb00093a bl 6ab0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
45c4: e2507000 subs r7, r0, #0 ; 0x0
45c8: 0a000024 beq 4660 <pthread_key_create+0xc4>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
45cc: e5874014 str r4, [r7, #20]
45d0: e59f80d8 ldr r8, [pc, #216] ; 46b0 <pthread_key_create+0x114>
45d4: e1a06007 mov r6, r7
45d8: e3a05001 mov r5, #1 ; 0x1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
45dc: e7983105 ldr r3, [r8, r5, lsl #2]
45e0: e3530000 cmp r3, #0 ; 0x0
45e4: 0a00001b beq 4658 <pthread_key_create+0xbc>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
45e8: e5933004 ldr r3, [r3, #4]
45ec: e1d341b0 ldrh r4, [r3, #16]
45f0: e2844001 add r4, r4, #1 ; 0x1
45f4: e1a04104 lsl r4, r4, #2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
45f8: e1a00004 mov r0, r4
45fc: eb001236 bl 8edc <_Workspace_Allocate>
if ( !table ) {
4600: e2503000 subs r3, r0, #0 ; 0x0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4604: e1a02004 mov r2, r4
4608: 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 ) {
460c: 0a000016 beq 466c <pthread_key_create+0xd0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
4610: e586301c str r3, [r6, #28]
memset( table, '\0', bytes_to_allocate );
4614: eb002452 bl d764 <memset>
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
4618: 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;
461c: e3550005 cmp r5, #5 ; 0x5
the_api++ ) {
4620: e2866004 add r6, r6, #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;
4624: 1affffec bne 45dc <pthread_key_create+0x40>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4628: e5970008 ldr r0, [r7, #8]
462c: e59a101c ldr r1, [sl, #28]
4630: e1a02800 lsl r2, r0, #16
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4634: e3a04000 mov r4, #0 ; 0x0
}
}
the_key->is_active = TRUE;
4638: e3a03001 mov r3, #1 ; 0x1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
463c: e7817722 str r7, [r1, r2, lsr #14]
4640: e5c73010 strb r3, [r7, #16]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4644: e587400c str r4, [r7, #12]
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
4648: e5890000 str r0, [r9]
_Thread_Enable_dispatch();
464c: eb000c7f bl 7850 <_Thread_Enable_dispatch>
4650: e1a00004 mov r0, r4
return 0;
}
4654: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
4658: e586301c str r3, [r6, #28]
465c: eaffffed b 4618 <pthread_key_create+0x7c>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4660: eb000c7a bl 7850 <_Thread_Enable_dispatch>
4664: e3a0000b mov r0, #11 ; 0xb
4668: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
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;
466c: e2554001 subs r4, r5, #1 ; 0x1
4670: 0a000006 beq 4690 <pthread_key_create+0xf4>
4674: e2853006 add r3, r5, #6 ; 0x6 <== NOT EXECUTED
4678: e1a03103 lsl r3, r3, #2 <== NOT EXECUTED
467c: e0875003 add r5, r7, r3 <== NOT EXECUTED
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
4680: e5350004 ldr r0, [r5, #-4]! <== NOT EXECUTED
4684: eb001210 bl 8ecc <_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;
4688: e2544001 subs r4, r4, #1 ; 0x1 <== NOT EXECUTED
468c: 1afffffb bne 4680 <pthread_key_create+0xe4> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
4690: e59f0014 ldr r0, [pc, #20] ; 46ac <pthread_key_create+0x110>
4694: e1a01007 mov r1, r7
4698: eb0009f1 bl 6e64 <_Objects_Free>
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
469c: eb000c6b bl 7850 <_Thread_Enable_dispatch>
46a0: e3a0000c mov r0, #12 ; 0xc
46a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00018668 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
18668: e92d41f0 push {r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
1866c: e2514000 subs r4, r1, #0 ; 0x0
int pthread_kill(
pthread_t thread,
int sig
)
{
18670: e24dd004 sub sp, sp, #4 ; 0x4
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
18674: 0a000028 beq 1871c <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
18678: e2447001 sub r7, r4, #1 ; 0x1
1867c: e357001f cmp r7, #31 ; 0x1f
18680: 8a000025 bhi 1871c <pthread_kill+0xb4>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
18684: e1a0100d mov r1, sp
18688: ebffbf5f bl 840c <_Thread_Get>
switch ( location ) {
1868c: e59d5000 ldr r5, [sp]
18690: e3550000 cmp r5, #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 );
18694: e1a06000 mov r6, r0
switch ( location ) {
18698: 1a000024 bne 18730 <pthread_kill+0xc8>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
1869c: e1a03204 lsl r3, r4, #4
186a0: e59f209c ldr r2, [pc, #156] ; 18744 <pthread_kill+0xdc>
186a4: e0433104 sub r3, r3, r4, lsl #2
186a8: e0822003 add r2, r2, r3
186ac: e5921008 ldr r1, [r2, #8]
186b0: e3510001 cmp r1, #1 ; 0x1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
186b4: e5902108 ldr r2, [r0, #264]
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
186b8: 0a000014 beq 18710 <pthread_kill+0xa8>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
186bc: e59230c8 ldr r3, [r2, #200]
186c0: e3a08001 mov r8, #1 ; 0x1
186c4: e1833718 orr r3, r3, r8, lsl r7
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
186c8: e1a01004 mov r1, r4
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
186cc: e58230c8 str r3, [r2, #200]
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
186d0: e1a02005 mov r2, r5
186d4: ebffff95 bl 18530 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
186d8: e59f3068 ldr r3, [pc, #104] ; 18748 <pthread_kill+0xe0>
186dc: e5932000 ldr r2, [r3]
186e0: e3520000 cmp r2, #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;
186e4: e5c68075 strb r8, [r6, #117]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
186e8: 0a000004 beq 18700 <pthread_kill+0x98>
186ec: e59f3058 ldr r3, [pc, #88] ; 1874c <pthread_kill+0xe4>
186f0: e5932000 ldr r2, [r3]
186f4: e1560002 cmp r6, r2
_ISR_Signals_to_thread_executing = TRUE;
186f8: 059f3050 ldreq r3, [pc, #80] ; 18750 <pthread_kill+0xe8>
186fc: 05c38000 strbeq r8, [r3]
}
_Thread_Enable_dispatch();
18700: ebffbf22 bl 8390 <_Thread_Enable_dispatch>
18704: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
18708: e28dd004 add sp, sp, #4 ; 0x4
1870c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
_Thread_Enable_dispatch();
18710: ebffbf1e bl 8390 <_Thread_Enable_dispatch> <== NOT EXECUTED
18714: e1a00005 mov r0, r5 <== NOT EXECUTED
18718: eafffffa b 18708 <pthread_kill+0xa0> <== NOT EXECUTED
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
1871c: ebffd571 bl dce8 <__errno>
18720: e3a03016 mov r3, #22 ; 0x16
18724: e5803000 str r3, [r0]
18728: e3e00000 mvn r0, #0 ; 0x0
1872c: eafffff5 b 18708 <pthread_kill+0xa0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
18730: ebffd56c bl dce8 <__errno> <== NOT EXECUTED
18734: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
18738: e5803000 str r3, [r0] <== NOT EXECUTED
1873c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
18740: eafffff0 b 18708 <pthread_kill+0xa0> <== NOT EXECUTED
00005d20 <pthread_mutex_destroy>:
*/
int pthread_mutex_destroy(
pthread_mutex_t *mutex
)
{
5d20: e92d4030 push {r4, r5, lr}
5d24: e24dd004 sub sp, sp, #4 ; 0x4
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5d28: e1a0100d mov r1, sp
5d2c: eb000030 bl 5df4 <_POSIX_Mutex_Get>
switch ( location ) {
5d30: e59d5000 ldr r5, [sp]
5d34: e3550000 cmp r5, #0 ; 0x0
)
{
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5d38: e1a04000 mov r4, r0
switch ( location ) {
5d3c: 13a00016 movne r0, #22 ; 0x16
5d40: 1a000004 bne 5d58 <pthread_mutex_destroy+0x38>
/*
* 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 ) ) {
5d44: e5943064 ldr r3, [r4, #100]
5d48: e3530000 cmp r3, #0 ; 0x0
5d4c: 1a000003 bne 5d60 <pthread_mutex_destroy+0x40>
_Thread_Enable_dispatch();
5d50: eb000dc2 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5d54: e3a00010 mov r0, #16 ; 0x10 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5d58: e28dd004 add sp, sp, #4 ; 0x4
5d5c: e8bd8030 pop {r4, r5, pc}
if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
5d60: e59f002c ldr r0, [pc, #44] ; 5d94 <pthread_mutex_destroy+0x74>
5d64: e1a01004 mov r1, r4
5d68: eb000a7a bl 8758 <_Objects_Close>
_CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
5d6c: e3a02016 mov r2, #22 ; 0x16
5d70: e2840014 add r0, r4, #20 ; 0x14
5d74: e1a01005 mov r1, r5
5d78: eb000843 bl 7e8c <_CORE_mutex_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
POSIX_Mutex_Control *the_mutex
)
{
_Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
5d7c: e59f0010 ldr r0, [pc, #16] ; 5d94 <pthread_mutex_destroy+0x74>
5d80: e1a01004 mov r1, r4
5d84: eb000b3a bl 8a74 <_Objects_Free>
_POSIX_Mutex_Free( the_mutex );
_Thread_Enable_dispatch();
5d88: eb000db4 bl 9460 <_Thread_Enable_dispatch>
5d8c: e1a00005 mov r0, r5
5d90: eafffff0 b 5d58 <pthread_mutex_destroy+0x38>
00005e48 <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
5e48: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
5e4c: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
5e50: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
5e54: 0a000004 beq 5e6c <pthread_mutex_getprioceiling+0x24> <== NOT EXECUTED
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
5e58: e1a0100d mov r1, sp <== NOT EXECUTED
5e5c: ebffffe4 bl 5df4 <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
5e60: e59d4000 ldr r4, [sp] <== NOT EXECUTED
5e64: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
5e68: 0a000002 beq 5e78 <pthread_mutex_getprioceiling+0x30> <== NOT EXECUTED
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
return 0;
5e6c: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5e70: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5e74: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
5e78: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
5e7c: e26330ff rsb r3, r3, #255 ; 0xff <== NOT EXECUTED
5e80: e5853000 str r3, [r5] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
5e84: eb000d75 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5e88: e1a00004 mov r0, r4 <== NOT EXECUTED
5e8c: eafffff7 b 5e70 <pthread_mutex_getprioceiling+0x28> <== NOT EXECUTED
00005e90 <pthread_mutex_init>:
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
5e90: e59f3148 ldr r3, [pc, #328] ; 5fe0 <pthread_mutex_init+0x150>
5e94: e3510000 cmp r1, #0 ; 0x0
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
5e98: e92d41f0 push {r4, r5, r6, r7, r8, lr}
#if 0
register POSIX_Mutex_Control *mutex_in_use;
Objects_Locations location;
#endif
if ( attr ) the_attr = attr;
5e9c: 11a04001 movne r4, r1
5ea0: 01a04003 moveq r4, r3
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
5ea4: e2507000 subs r7, r0, #0 ; 0x0
5ea8: 0a000011 beq 5ef4 <pthread_mutex_init+0x64>
break;
}
}
#endif
if ( !the_attr->is_initialized )
5eac: e5943000 ldr r3, [r4]
5eb0: e3530000 cmp r3, #0 ; 0x0
5eb4: 0a00000e beq 5ef4 <pthread_mutex_init+0x64>
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
5eb8: e5943004 ldr r3, [r4, #4]
5ebc: e3530000 cmp r3, #0 ; 0x0
5ec0: 1a000041 bne 5fcc <pthread_mutex_init+0x13c>
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5ec4: e594300c ldr r3, [r4, #12]
5ec8: e3530001 cmp r3, #1 ; 0x1
5ecc: 0a00002f beq 5f90 <pthread_mutex_init+0x100>
5ed0: e3530002 cmp r3, #2 ; 0x2
5ed4: 0a000033 beq 5fa8 <pthread_mutex_init+0x118>
5ed8: e3530000 cmp r3, #0 ; 0x0
5edc: 01a06003 moveq r6, r3
5ee0: 1a000003 bne 5ef4 <pthread_mutex_init+0x64>
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5ee4: e5943008 ldr r3, [r4, #8]
5ee8: e2433001 sub r3, r3, #1 ; 0x1
5eec: e35300fd cmp r3, #253 ; 0xfd
5ef0: 9a000001 bls 5efc <pthread_mutex_init+0x6c>
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
5ef4: e3a00016 mov r0, #22 ; 0x16
}
5ef8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
5efc: e59f20e0 ldr r2, [pc, #224] ; 5fe4 <pthread_mutex_init+0x154>
5f00: e5923000 ldr r3, [r2]
5f04: e2833001 add r3, r3, #1 ; 0x1
5f08: 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 );
5f0c: e59f80d4 ldr r8, [pc, #212] ; 5fe8 <pthread_mutex_init+0x158>
5f10: e1a00008 mov r0, r8
5f14: eb0009e9 bl 86c0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
5f18: e2505000 subs r5, r0, #0 ; 0x0
5f1c: 0a000027 beq 5fc0 <pthread_mutex_init+0x130>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
5f20: e5943004 ldr r3, [r4, #4]
5f24: e5853010 str r3, [r5, #16]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
5f28: e5942010 ldr r2, [r4, #16]
5f2c: e3520000 cmp r2, #0 ; 0x0
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
5f30: 13a03000 movne r3, #0 ; 0x0
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
5f34: 03a03001 moveq r3, #1 ; 0x1
the_mutex->process_shared = the_attr->process_shared;
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
5f38: 15853054 strne r3, [r5, #84]
else
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;
5f3c: 05853054 streq r3, [r5, #84]
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
5f40: 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;
5f44: e3a01001 mov r1, #1 ; 0x1
the_mutex_attr->priority_ceiling =
5f48: e26330ff rsb r3, r3, #255 ; 0xff
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
5f4c: 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 =
5f50: 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;
5f54: e5c51058 strb r1, [r5, #88]
the_mutex_attr->priority_ceiling =
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
5f58: e585605c str r6, [r5, #92]
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
5f5c: e2851054 add r1, r5, #84 ; 0x54
5f60: e2850014 add r0, r5, #20 ; 0x14
5f64: eb0007c9 bl 7e90 <_CORE_mutex_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5f68: e5951008 ldr r1, [r5, #8]
5f6c: e598201c ldr r2, [r8, #28]
5f70: e1a03801 lsl r3, r1, #16
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
5f74: e3a04000 mov r4, #0 ; 0x0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5f78: e7825723 str r5, [r2, r3, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
5f7c: e585400c str r4, [r5, #12]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
5f80: e5871000 str r1, [r7]
_Thread_Enable_dispatch();
5f84: eb000d35 bl 9460 <_Thread_Enable_dispatch>
5f88: e1a00004 mov r0, r4
5f8c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5f90: e5943008 ldr r3, [r4, #8]
5f94: e2433001 sub r3, r3, #1 ; 0x1
5f98: e35300fd cmp r3, #253 ; 0xfd
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5f9c: e3a06002 mov r6, #2 ; 0x2
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5fa0: 8affffd3 bhi 5ef4 <pthread_mutex_init+0x64>
5fa4: eaffffd4 b 5efc <pthread_mutex_init+0x6c>
5fa8: e5943008 ldr r3, [r4, #8]
5fac: e2433001 sub r3, r3, #1 ; 0x1
5fb0: e35300fd cmp r3, #253 ; 0xfd
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
5fb4: e3a06003 mov r6, #3 ; 0x3
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
5fb8: 8affffcd bhi 5ef4 <pthread_mutex_init+0x64>
5fbc: eaffffce b 5efc <pthread_mutex_init+0x6c>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
5fc0: eb000d26 bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
5fc4: e3a0000b mov r0, #11 ; 0xb <== NOT EXECUTED
5fc8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
5fcc: e59f0018 ldr r0, [pc, #24] ; 5fec <pthread_mutex_init+0x15c><== NOT EXECUTED
5fd0: e3a01068 mov r1, #104 ; 0x68 <== NOT EXECUTED
5fd4: e59f2014 ldr r2, [pc, #20] ; 5ff0 <pthread_mutex_init+0x160><== NOT EXECUTED
5fd8: e59f3014 ldr r3, [pc, #20] ; 5ff4 <pthread_mutex_init+0x164><== NOT EXECUTED
5fdc: ebfff387 bl 2e00 <__assert_func> <== NOT EXECUTED
0000606c <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
606c: 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 )
6070: e2527000 subs r7, r2, #0 ; 0x0 <== NOT EXECUTED
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
6074: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
6078: e1a06001 mov r6, r1 <== NOT EXECUTED
607c: e1a05000 mov r5, r0 <== NOT EXECUTED
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
int status;
if ( !old_ceiling )
6080: 0a000002 beq 6090 <pthread_mutex_setprioceiling+0x24> <== NOT EXECUTED
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
6084: e2413001 sub r3, r1, #1 ; 0x1 <== NOT EXECUTED
6088: e35300fd cmp r3, #253 ; 0xfd <== NOT EXECUTED
608c: 9a000003 bls 60a0 <pthread_mutex_setprioceiling+0x34> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
return 0;
6090: e3a04016 mov r4, #22 ; 0x16 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
6094: e1a00004 mov r0, r4 <== NOT EXECUTED
6098: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
609c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
60a0: ebffffd4 bl 5ff8 <pthread_mutex_lock> <== NOT EXECUTED
if ( status )
60a4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
60a8: 1afffff9 bne 6094 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
60ac: e1a00005 mov r0, r5 <== NOT EXECUTED
60b0: e1a0100d mov r1, sp <== NOT EXECUTED
60b4: ebffff4e bl 5df4 <_POSIX_Mutex_Get> <== NOT EXECUTED
switch ( location ) {
60b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
60bc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
60c0: 1afffff2 bne 6090 <pthread_mutex_setprioceiling+0x24> <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
60c4: e5903060 ldr r3, [r0, #96] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
60c8: 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(
60cc: 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(
60d0: 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(
60d4: e5873000 str r3, [r7] <== NOT EXECUTED
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
60d8: e5802060 str r2, [r0, #96] <== NOT EXECUTED
_CORE_mutex_Surrender(
60dc: e1a02004 mov r2, r4 <== NOT EXECUTED
60e0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
60e4: eb0007e5 bl 8080 <_CORE_mutex_Surrender> <== NOT EXECUTED
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
60e8: eb000cdc bl 9460 <_Thread_Enable_dispatch> <== NOT EXECUTED
60ec: eaffffe8 b 6094 <pthread_mutex_setprioceiling+0x28> <== NOT EXECUTED
000060f0 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
60f0: e92d4010 push {r4, lr} <== NOT EXECUTED
60f4: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
60f8: 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 );
60fc: e1a00001 mov r0, r1 <== NOT EXECUTED
6100: e1a0100d mov r1, sp <== NOT EXECUTED
6104: eb000026 bl 61a4 <_POSIX_Absolute_timeout_to_ticks> <== NOT EXECUTED
switch ( status ) {
6108: e3500002 cmp r0, #2 ; 0x2 <== NOT EXECUTED
610c: 9a000001 bls 6118 <pthread_mutex_timedlock+0x28> <== NOT EXECUTED
6110: e3500003 cmp r0, #3 ; 0x3 <== NOT EXECUTED
6114: 0a000005 beq 6130 <pthread_mutex_timedlock+0x40> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
6118: e1a00004 mov r0, r4 <== NOT EXECUTED
611c: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
6120: e59d2000 ldr r2, [sp] <== NOT EXECUTED
6124: ebffffb6 bl 6004 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
6128: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
612c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
6130: e1a00004 mov r0, r4 <== NOT EXECUTED
6134: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
6138: e59d2000 ldr r2, [sp] <== NOT EXECUTED
613c: ebffffb0 bl 6004 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
6140: eafffff8 b 6128 <pthread_mutex_timedlock+0x38> <== NOT EXECUTED
00004d98 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
4d98: e92d40f0 push {r4, r5, r6, r7, lr}
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4d9c: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
4da0: e24dd00c sub sp, sp, #12 ; 0xc
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4da4: 0a000007 beq 4dc8 <pthread_rwlock_init+0x30>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
4da8: e3510000 cmp r1, #0 ; 0x0
4dac: 0a000020 beq 4e34 <pthread_rwlock_init+0x9c>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
4db0: e5913000 ldr r3, [r1]
4db4: e3530000 cmp r3, #0 ; 0x0
4db8: 0a000002 beq 4dc8 <pthread_rwlock_init+0x30>
return EINVAL;
switch ( the_attr->process_shared ) {
4dbc: e5915004 ldr r5, [r1, #4]
4dc0: e3550000 cmp r5, #0 ; 0x0
4dc4: 0a000002 beq 4dd4 <pthread_rwlock_init+0x3c>
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
4dc8: e3a00016 mov r0, #22 ; 0x16
}
4dcc: e28dd00c add sp, sp, #12 ; 0xc
4dd0: e8bd80f0 pop {r4, r5, r6, r7, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4dd4: e59f206c ldr r2, [pc, #108] ; 4e48 <pthread_rwlock_init+0xb0>
4dd8: e5923000 ldr r3, [r2]
4ddc: e2833001 add r3, r3, #1 ; 0x1
4de0: 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 *)
4de4: e59f7060 ldr r7, [pc, #96] ; 4e4c <pthread_rwlock_init+0xb4>
4de8: e1a00007 mov r0, r7
4dec: eb000a66 bl 778c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
4df0: e2504000 subs r4, r0, #0 ; 0x0
4df4: 0a00000b beq 4e28 <pthread_rwlock_init+0x90>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
4df8: e2840010 add r0, r4, #16 ; 0x10
4dfc: e28d1008 add r1, sp, #8 ; 0x8
4e00: eb00087d bl 6ffc <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e04: e5941008 ldr r1, [r4, #8]
4e08: e597201c ldr r2, [r7, #28]
4e0c: e1a03801 lsl r3, r1, #16
4e10: e7824723 str r4, [r2, r3, lsr #14]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
4e14: e584500c str r5, [r4, #12]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
4e18: e5861000 str r1, [r6]
_Thread_Enable_dispatch();
4e1c: eb000dc2 bl 852c <_Thread_Enable_dispatch>
4e20: e1a00005 mov r0, r5
4e24: eaffffe8 b 4dcc <pthread_rwlock_init+0x34>
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
4e28: eb000dbf bl 852c <_Thread_Enable_dispatch>
4e2c: e3a0000b mov r0, #11 ; 0xb
4e30: eaffffe5 b 4dcc <pthread_rwlock_init+0x34>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
4e34: e1a0000d mov r0, sp <== NOT EXECUTED
4e38: eb000294 bl 5890 <pthread_rwlockattr_init> <== NOT EXECUTED
4e3c: e1a0400d mov r4, sp <== NOT EXECUTED
4e40: e1a0100d mov r1, sp <== NOT EXECUTED
4e44: eaffffd9 b 4db0 <pthread_rwlock_init+0x18> <== NOT EXECUTED
00004ec0 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4ec0: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4ec4: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4ec8: e24dd00c sub sp, sp, #12 ; 0xc
4ecc: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4ed0: 0a00000c beq 4f08 <pthread_rwlock_timedrdlock+0x48>
* 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 );
4ed4: e28d1004 add r1, sp, #4 ; 0x4
4ed8: eb001b4f bl bc1c <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4edc: 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 );
4ee0: e1a05000 mov r5, r0
switch (status) {
4ee4: 93a04000 movls r4, #0 ; 0x0
4ee8: 8a000009 bhi 4f14 <pthread_rwlock_timedrdlock+0x54>
4eec: e59f00a8 ldr r0, [pc, #168] ; 4f9c <pthread_rwlock_timedrdlock+0xdc>
4ef0: e5961000 ldr r1, [r6]
4ef4: e28d2008 add r2, sp, #8 ; 0x8
4ef8: eb000b6a bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4efc: e59dc008 ldr ip, [sp, #8]
4f00: e35c0000 cmp ip, #0 ; 0x0
4f04: 0a00000c beq 4f3c <pthread_rwlock_timedrdlock+0x7c>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4f08: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4f0c: e28dd00c add sp, sp, #12 ; 0xc
4f10: e8bd8070 pop {r4, r5, r6, pc}
* 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 );
switch (status) {
4f14: e3500003 cmp r0, #3 ; 0x3
4f18: e5961000 ldr r1, [r6]
4f1c: e59f0078 ldr r0, [pc, #120] ; 4f9c <pthread_rwlock_timedrdlock+0xdc>
4f20: e28d2008 add r2, sp, #8 ; 0x8
4f24: e3a04000 mov r4, #0 ; 0x0
4f28: 03a04001 moveq r4, #1 ; 0x1
4f2c: eb000b5d bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4f30: e59dc008 ldr ip, [sp, #8]
4f34: e35c0000 cmp ip, #0 ; 0x0
4f38: 1afffff2 bne 4f08 <pthread_rwlock_timedrdlock+0x48>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
4f3c: e5961000 ldr r1, [r6]
4f40: e2800010 add r0, r0, #16 ; 0x10
4f44: e59d3004 ldr r3, [sp, #4]
4f48: e1a02004 mov r2, r4
4f4c: e58dc000 str ip, [sp]
4f50: eb000831 bl 701c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
4f54: eb000d74 bl 852c <_Thread_Enable_dispatch>
if ( !do_wait &&
4f58: e3540000 cmp r4, #0 ; 0x0
4f5c: 159f103c ldrne r1, [pc, #60] ; 4fa0 <pthread_rwlock_timedrdlock+0xe0>
4f60: 1a000009 bne 4f8c <pthread_rwlock_timedrdlock+0xcc>
4f64: e59f1034 ldr r1, [pc, #52] ; 4fa0 <pthread_rwlock_timedrdlock+0xe0><== NOT EXECUTED
4f68: e5913000 ldr r3, [r1] <== NOT EXECUTED
4f6c: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED
4f70: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED
4f74: 1a000004 bne 4f8c <pthread_rwlock_timedrdlock+0xcc> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
4f78: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
4f7c: 0affffe1 beq 4f08 <pthread_rwlock_timedrdlock+0x48> <== NOT EXECUTED
4f80: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
4f84: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
4f88: 9affffdf bls 4f0c <pthread_rwlock_timedrdlock+0x4c> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4f8c: e5913000 ldr r3, [r1]
4f90: e5930034 ldr r0, [r3, #52]
4f94: eb00003b bl 5088 <_POSIX_RWLock_Translate_core_RWLock_return_code>
4f98: eaffffdb b 4f0c <pthread_rwlock_timedrdlock+0x4c>
00004fa4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4fa4: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4fa8: e2506000 subs r6, r0, #0 ; 0x0
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4fac: e24dd00c sub sp, sp, #12 ; 0xc
4fb0: e1a00001 mov r0, r1
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4fb4: 0a00000c beq 4fec <pthread_rwlock_timedwrlock+0x48>
* 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 );
4fb8: e28d1004 add r1, sp, #4 ; 0x4
4fbc: eb001b16 bl bc1c <_POSIX_Absolute_timeout_to_ticks>
switch (status) {
4fc0: 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 );
4fc4: e1a05000 mov r5, r0
switch (status) {
4fc8: 93a04000 movls r4, #0 ; 0x0
4fcc: 8a000009 bhi 4ff8 <pthread_rwlock_timedwrlock+0x54>
4fd0: e59f00a8 ldr r0, [pc, #168] ; 5080 <pthread_rwlock_timedwrlock+0xdc>
4fd4: e5961000 ldr r1, [r6]
4fd8: e28d2008 add r2, sp, #8 ; 0x8
4fdc: eb000b31 bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4fe0: e59dc008 ldr ip, [sp, #8]
4fe4: e35c0000 cmp ip, #0 ; 0x0
4fe8: 0a00000c beq 5020 <pthread_rwlock_timedwrlock+0x7c>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4fec: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4ff0: e28dd00c add sp, sp, #12 ; 0xc
4ff4: e8bd8070 pop {r4, r5, r6, pc}
* 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 );
switch (status) {
4ff8: e3500003 cmp r0, #3 ; 0x3
4ffc: e5961000 ldr r1, [r6]
5000: e59f0078 ldr r0, [pc, #120] ; 5080 <pthread_rwlock_timedwrlock+0xdc>
5004: e28d2008 add r2, sp, #8 ; 0x8
5008: e3a04000 mov r4, #0 ; 0x0
500c: 03a04001 moveq r4, #1 ; 0x1
5010: eb000b24 bl 7ca8 <_Objects_Get>
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
5014: e59dc008 ldr ip, [sp, #8]
5018: e35c0000 cmp ip, #0 ; 0x0
501c: 1afffff2 bne 4fec <pthread_rwlock_timedwrlock+0x48>
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
5020: e5961000 ldr r1, [r6]
5024: e2800010 add r0, r0, #16 ; 0x10
5028: e59d3004 ldr r3, [sp, #4]
502c: e1a02004 mov r2, r4
5030: e58dc000 str ip, [sp]
5034: eb00082f bl 70f8 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
5038: eb000d3b bl 852c <_Thread_Enable_dispatch>
if ( !do_wait &&
503c: e3540000 cmp r4, #0 ; 0x0
5040: 159f103c ldrne r1, [pc, #60] ; 5084 <pthread_rwlock_timedwrlock+0xe0>
5044: 1a000009 bne 5070 <pthread_rwlock_timedwrlock+0xcc>
5048: e59f1034 ldr r1, [pc, #52] ; 5084 <pthread_rwlock_timedwrlock+0xe0><== NOT EXECUTED
504c: e5913000 ldr r3, [r1] <== NOT EXECUTED
5050: e5932034 ldr r2, [r3, #52] <== NOT EXECUTED
5054: e3520002 cmp r2, #2 ; 0x2 <== NOT EXECUTED
5058: 1a000004 bne 5070 <pthread_rwlock_timedwrlock+0xcc> <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
505c: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
5060: 0affffe1 beq 4fec <pthread_rwlock_timedwrlock+0x48> <== NOT EXECUTED
5064: e3550002 cmp r5, #2 ; 0x2 <== NOT EXECUTED
5068: 93a00074 movls r0, #116 ; 0x74 <== NOT EXECUTED
506c: 9affffdf bls 4ff0 <pthread_rwlock_timedwrlock+0x4c> <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
5070: e5913000 ldr r3, [r1]
5074: e5930034 ldr r0, [r3, #52]
5078: eb000002 bl 5088 <_POSIX_RWLock_Translate_core_RWLock_return_code>
507c: eaffffdb b 4ff0 <pthread_rwlock_timedwrlock+0x4c>
0000479c <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() )
479c: e59f309c ldr r3, [pc, #156] ; 4840 <pthread_setcancelstate+0xa4>
47a0: e5932000 ldr r2, [r3]
47a4: e3520000 cmp r2, #0 ; 0x0
int pthread_setcancelstate(
int state,
int *oldstate
)
{
47a8: e92d4030 push {r4, r5, lr}
47ac: e1a04000 mov r4, r0
47b0: e1a00001 mov r0, 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() )
47b4: 13a00047 movne r0, #71 ; 0x47
47b8: 18bd8030 popne {r4, r5, pc}
return EPROTO;
if ( !oldstate )
47bc: e3500000 cmp r0, #0 ; 0x0
47c0: 0a000001 beq 47cc <pthread_setcancelstate+0x30>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
47c4: e3540001 cmp r4, #1 ; 0x1
47c8: 9a000001 bls 47d4 <pthread_setcancelstate+0x38>
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
47cc: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
47d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47d4: e59f1068 ldr r1, [pc, #104] ; 4844 <pthread_setcancelstate+0xa8>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
47d8: e59f5068 ldr r5, [pc, #104] ; 4848 <pthread_setcancelstate+0xac>
47dc: e5913000 ldr r3, [r1]
47e0: e5952000 ldr r2, [r5]
47e4: e2833001 add r3, r3, #1 ; 0x1
47e8: e5813000 str r3, [r1]
47ec: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
47f0: e59230cc ldr r3, [r2, #204]
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
47f4: e3540000 cmp r4, #0 ; 0x0
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
47f8: e5803000 str r3, [r0]
thread_support->cancelability_state = state;
47fc: e58240cc str r4, [r2, #204]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4800: 1a000002 bne 4810 <pthread_setcancelstate+0x74>
4804: e59230d0 ldr r3, [r2, #208]
4808: e3530001 cmp r3, #1 ; 0x1
480c: 0a000002 beq 481c <pthread_setcancelstate+0x80>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4810: eb000a9c bl 7288 <_Thread_Enable_dispatch>
4814: e3a00000 mov r0, #0 ; 0x0
4818: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
481c: e59230d4 ldr r3, [r2, #212] <== NOT EXECUTED
4820: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4824: 0afffff9 beq 4810 <pthread_setcancelstate+0x74> <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4828: eb000a96 bl 7288 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
482c: e5950000 ldr r0, [r5] <== NOT EXECUTED
4830: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
4834: ebfffed4 bl 438c <_POSIX_Thread_Exit> <== NOT EXECUTED
4838: e1a00004 mov r0, r4 <== NOT EXECUTED
483c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000484c <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() )
484c: e59f3098 ldr r3, [pc, #152] ; 48ec <pthread_setcanceltype+0xa0>
4850: e5932000 ldr r2, [r3]
4854: e3520000 cmp r2, #0 ; 0x0
int pthread_setcanceltype(
int type,
int *oldtype
)
{
4858: e92d4030 push {r4, r5, lr}
485c: 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() )
4860: 13a00047 movne r0, #71 ; 0x47
4864: 18bd8030 popne {r4, r5, pc}
return EPROTO;
if ( !oldtype )
4868: e3510000 cmp r1, #0 ; 0x0
486c: 0a000001 beq 4878 <pthread_setcanceltype+0x2c>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
4870: e3500001 cmp r0, #1 ; 0x1
4874: 9a000001 bls 4880 <pthread_setcanceltype+0x34>
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
4878: e3a00016 mov r0, #22 ; 0x16 <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
487c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
4880: e59f1068 ldr r1, [pc, #104] ; 48f0 <pthread_setcanceltype+0xa4>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4884: e59f5068 ldr r5, [pc, #104] ; 48f4 <pthread_setcanceltype+0xa8>
4888: e5913000 ldr r3, [r1]
488c: e5952000 ldr r2, [r5]
4890: e2833001 add r3, r3, #1 ; 0x1
4894: e5813000 str r3, [r1]
4898: e5922108 ldr r2, [r2, #264]
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
489c: e59230d0 ldr r3, [r2, #208]
48a0: e58c3000 str r3, [ip]
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48a4: e59240cc ldr r4, [r2, #204]
48a8: e3540000 cmp r4, #0 ; 0x0
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
48ac: e58200d0 str r0, [r2, #208]
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48b0: 1a000001 bne 48bc <pthread_setcanceltype+0x70>
48b4: e3500001 cmp r0, #1 ; 0x1
48b8: 0a000002 beq 48c8 <pthread_setcanceltype+0x7c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
48bc: eb000a71 bl 7288 <_Thread_Enable_dispatch>
48c0: e3a00000 mov r0, #0 ; 0x0
48c4: e8bd8030 pop {r4, r5, pc}
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
48c8: e59230d4 ldr r3, [r2, #212]
48cc: e3530000 cmp r3, #0 ; 0x0
48d0: 0afffff9 beq 48bc <pthread_setcanceltype+0x70>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
48d4: eb000a6b bl 7288 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
48d8: e5950000 ldr r0, [r5] <== NOT EXECUTED
48dc: e3e01000 mvn r1, #0 ; 0x0 <== NOT EXECUTED
48e0: ebfffea9 bl 438c <_POSIX_Thread_Exit> <== NOT EXECUTED
48e4: e1a00004 mov r0, r4 <== NOT EXECUTED
48e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000069dc <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
69dc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Check all the parameters
*/
if ( !param )
69e0: e2525000 subs r5, r2, #0 ; 0x0
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
69e4: e24dd004 sub sp, sp, #4 ; 0x4
69e8: e1a06000 mov r6, r0
69ec: e1a07001 mov r7, r1
/*
* Check all the parameters
*/
if ( !param )
69f0: 0a000015 beq 6a4c <pthread_setschedparam+0x70>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
69f4: e5953000 ldr r3, [r5]
69f8: e2433001 sub r3, r3, #1 ; 0x1
69fc: e35300fd cmp r3, #253 ; 0xfd
6a00: 8a000011 bhi 6a4c <pthread_setschedparam+0x70>
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6a04: e3510003 cmp r1, #3 ; 0x3
6a08: 979ff101 ldrls pc, [pc, r1, lsl #2]
6a0c: ea00000e b 6a4c <pthread_setschedparam+0x70>
6a10: 00006a58 .word 0x00006a58
6a14: 00006af8 .word 0x00006af8
6a18: 00006b04 .word 0x00006b04
6a1c: 00006a20 .word 0x00006a20
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 ) <
6a20: e2850008 add r0, r5, #8 ; 0x8
6a24: eb000e86 bl a444 <_Timespec_To_ticks>
6a28: e1a04000 mov r4, r0
6a2c: e2850010 add r0, r5, #16 ; 0x10
6a30: eb000e83 bl a444 <_Timespec_To_ticks>
6a34: e1540000 cmp r4, r0
6a38: 3a000003 bcc 6a4c <pthread_setschedparam+0x70>
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
6a3c: e5953004 ldr r3, [r5, #4]
6a40: e2433001 sub r3, r3, #1 ; 0x1
6a44: e35300fd cmp r3, #253 ; 0xfd
6a48: 9a00003a bls 6b38 <pthread_setschedparam+0x15c>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
return 0;
6a4c: e3a00016 mov r0, #22 ; 0x16
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
6a50: e28dd004 add sp, sp, #4 ; 0x4
6a54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6a58: e3a08001 mov r8, #1 ; 0x1
6a5c: e3a0a000 mov sl, #0 ; 0x0
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
6a60: e1a01006 mov r1, r6
6a64: e59f00e4 ldr r0, [pc, #228] ; 6b50 <pthread_setschedparam+0x174>
6a68: e1a0200d mov r2, sp
6a6c: eb00085a bl 8bdc <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
6a70: e59d3000 ldr r3, [sp]
6a74: e3530000 cmp r3, #0 ; 0x0
6a78: e1a06000 mov r6, r0
6a7c: 13a00003 movne r0, #3 ; 0x3
6a80: 1afffff2 bne 6a50 <pthread_setschedparam+0x74>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
6a84: e5964108 ldr r4, [r6, #264]
if ( api->schedpolicy == SCHED_SPORADIC )
6a88: e594307c ldr r3, [r4, #124]
6a8c: e3530003 cmp r3, #3 ; 0x3
6a90: 0a00002b beq 6b44 <pthread_setschedparam+0x168>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
6a94: e584707c str r7, [r4, #124]
api->schedparam = *param;
6a98: e1a0e005 mov lr, r5
6a9c: e8be000f ldm lr!, {r0, r1, r2, r3}
6aa0: e284c080 add ip, r4, #128 ; 0x80
6aa4: e8ac000f stmia ip!, {r0, r1, r2, r3}
6aa8: e89e0003 ldm lr, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
6aac: e3570000 cmp r7, #0 ; 0x0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
6ab0: e88c0003 stm ip, {r0, r1}
the_thread->budget_algorithm = budget_algorithm;
6ab4: e586807c str r8, [r6, #124]
the_thread->budget_callout = budget_callout;
6ab8: e586a080 str sl, [r6, #128]
switch ( api->schedpolicy ) {
6abc: ba00000a blt 6aec <pthread_setschedparam+0x110>
6ac0: e3570002 cmp r7, #2 ; 0x2
6ac4: ca000011 bgt 6b10 <pthread_setschedparam+0x134>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
6ac8: e59f3084 ldr r3, [pc, #132] ; 6b54 <pthread_setschedparam+0x178>
6acc: e5941080 ldr r1, [r4, #128]
6ad0: e5932000 ldr r2, [r3]
6ad4: e26110ff rsb r1, r1, #255 ; 0xff
6ad8: e5862078 str r2, [r6, #120]
the_thread->real_priority =
6adc: e5861018 str r1, [r6, #24]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
6ae0: e1a00006 mov r0, r6
6ae4: e3a02001 mov r2, #1 ; 0x1
6ae8: eb0008ea bl 8e98 <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
6aec: eb000a5b bl 9460 <_Thread_Enable_dispatch>
6af0: e3a00000 mov r0, #0 ; 0x0
6af4: eaffffd5 b 6a50 <pthread_setschedparam+0x74>
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
6af8: e3a08000 mov r8, #0 ; 0x0
6afc: e1a0a008 mov sl, r8
6b00: eaffffd6 b 6a60 <pthread_setschedparam+0x84>
6b04: e3a08002 mov r8, #2 ; 0x2
6b08: e3a0a000 mov sl, #0 ; 0x0
6b0c: eaffffd3 b 6a60 <pthread_setschedparam+0x84>
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
6b10: e3570003 cmp r7, #3 ; 0x3
6b14: 1afffff4 bne 6aec <pthread_setschedparam+0x110>
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
6b18: e5943080 ldr r3, [r4, #128]
_Watchdog_Remove( &api->Sporadic_timer );
6b1c: e284009c add r0, r4, #156 ; 0x9c
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
6b20: e5843098 str r3, [r4, #152]
_Watchdog_Remove( &api->Sporadic_timer );
6b24: eb000fb8 bl aa0c <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
6b28: e1a01006 mov r1, r6
6b2c: e3a00000 mov r0, #0 ; 0x0
6b30: ebffff86 bl 6950 <_POSIX_Threads_Sporadic_budget_TSR>
6b34: eaffffec b 6aec <pthread_setschedparam+0x110>
if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) <
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
6b38: e59fa018 ldr sl, [pc, #24] ; 6b58 <pthread_setschedparam+0x17c>
6b3c: e3a08003 mov r8, #3 ; 0x3
6b40: eaffffc6 b 6a60 <pthread_setschedparam+0x84>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
6b44: e284009c add r0, r4, #156 ; 0x9c
6b48: eb000faf bl aa0c <_Watchdog_Remove>
6b4c: eaffffd0 b 6a94 <pthread_setschedparam+0xb8>
00003f0c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
3f0c: e92d4010 push {r4, lr}
if ( !time_buffer )
3f10: e2514000 subs r4, r1, #0 ; 0x0
3f14: 03a00009 moveq r0, #9 ; 0x9
3f18: 08bd8010 popeq {r4, pc}
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
3f1c: e3500004 cmp r0, #4 ; 0x4
3f20: 979ff100 ldrls pc, [pc, r0, lsl #2]
3f24: ea000004 b 3f3c <rtems_clock_get+0x30>
3f28: 00003f44 .word 0x00003f44
3f2c: 00003f50 .word 0x00003f50
3f30: 00003f5c .word 0x00003f5c <== NOT EXECUTED
3f34: 00003f6c .word 0x00003f6c <== NOT EXECUTED
3f38: 00003f7c .word 0x00003f7c <== NOT EXECUTED
3f3c: e3a0000a mov r0, #10 ; 0xa
3f40: e8bd8010 pop {r4, pc}
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3f44: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f48: 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 );
3f4c: ea000027 b 3ff0 <rtems_clock_get_tod>
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3f50: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f54: 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);
3f58: ea00000a b 3f88 <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();
3f5c: eb00001f bl 3fe0 <rtems_clock_get_ticks_since_boot>
3f60: e5840000 str r0, [r4]
3f64: e3a00000 mov r0, #0 ; 0x0
3f68: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
3f6c: eb000013 bl 3fc0 <rtems_clock_get_ticks_per_second>
3f70: e5840000 str r0, [r4]
3f74: e3a00000 mov r0, #0 ; 0x0
3f78: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3f7c: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f80: 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 );
3f84: ea00004c b 40bc <rtems_clock_get_tod_timeval>
00003f88 <rtems_clock_get_seconds_since_epoch>:
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
3f88: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
3f8c: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
3f90: 012fff1e bxeq lr <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
3f94: e59f301c ldr r3, [pc, #28] ; 3fb8 <rtems_clock_get_seconds_since_epoch+0x30><== NOT EXECUTED
3f98: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3f9c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
3fa0: 159f3014 ldrne r3, [pc, #20] ; 3fbc <rtems_clock_get_seconds_since_epoch+0x34><== NOT EXECUTED
3fa4: 15932000 ldrne r2, [r3] <== NOT EXECUTED
)
{
if ( !the_interval )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
3fa8: 03a0000b moveq r0, #11 ; 0xb <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
3fac: 15802000 strne r2, [r0] <== NOT EXECUTED
3fb0: 13a00000 movne r0, #0 ; 0x0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
3fb4: e12fff1e bx lr <== NOT EXECUTED
00003fc0 <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)
{
3fc0: e59f3014 ldr r3, [pc, #20] ; 3fdc <rtems_clock_get_ticks_per_second+0x1c>
3fc4: e3a0093d mov r0, #999424 ; 0xf4000
3fc8: e52de004 push {lr} ; (str lr, [sp, #-4]!)
3fcc: e5931000 ldr r1, [r3]
3fd0: e2800d09 add r0, r0, #576 ; 0x240
3fd4: eb003b35 bl 12cb0 <__aeabi_uidiv>
return TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick;
}
3fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000412c <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
412c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
4130: eb000598 bl 5798 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
4134: e59f0038 ldr r0, [pc, #56] ; 4174 <rtems_clock_tick+0x48>
4138: eb000f0a bl 7d68 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
413c: eb000d41 bl 7648 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Context_Switch_necessary );
4140: e59f3030 ldr r3, [pc, #48] ; 4178 <rtems_clock_tick+0x4c>
4144: e5d32000 ldrb r2, [r3]
if ( _Thread_Is_context_switch_necessary() &&
4148: e3520000 cmp r2, #0 ; 0x0
414c: 0a000003 beq 4160 <rtems_clock_tick+0x34>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
4150: e59f3024 ldr r3, [pc, #36] ; 417c <rtems_clock_tick+0x50> <== NOT EXECUTED
4154: e5932000 ldr r2, [r3] <== NOT EXECUTED
4158: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
415c: 0a000001 beq 4168 <rtems_clock_tick+0x3c> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4160: e3a00000 mov r0, #0 ; 0x0
4164: e49df004 pop {pc} ; (ldr pc, [sp], #4)
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
4168: eb00098a bl 6798 <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
416c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
4170: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000a624 <rtems_debug_disable>:
void rtems_debug_disable (
rtems_debug_control to_be_disabled
)
{
_Debug_Level &= ~to_be_disabled;
a624: e59f2010 ldr r2, [pc, #16] ; a63c <rtems_debug_disable+0x18><== NOT EXECUTED
a628: e5923000 ldr r3, [r2] <== NOT EXECUTED
a62c: e1e00000 mvn r0, r0 <== NOT EXECUTED
a630: e0000003 and r0, r0, r3 <== NOT EXECUTED
a634: e5820000 str r0, [r2] <== NOT EXECUTED
}
a638: e12fff1e bx lr <== NOT EXECUTED
00004d90 <rtems_initialize_data_structures>:
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(
rtems_configuration_table *configuration_table
)
{
4d90: e92d40f0 push {r4, r5, r6, r7, lr}
4d94: e1a06000 mov r6, r0
/*
* Dispatching and interrupts are disabled until the end of the
* initialization sequence. This prevents an inadvertent context
* switch before the executive is initialized.
*/
_ISR_Disable( bsp_level );
4d98: e10f2000 mrs r2, CPSR
4d9c: e38230c0 orr r3, r2, #192 ; 0xc0
4da0: e129f003 msr CPSR_fc, r3
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
4da4: e3500000 cmp r0, #0 ; 0x0
4da8: 0a000035 beq 4e84 <rtems_initialize_data_structures+0xf4>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4dac: e59f30dc ldr r3, [pc, #220] ; 4e90 <rtems_initialize_data_structures+0x100>
RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
bool is_multiprocessing
)
{
_System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
4db0: e59f70dc ldr r7, [pc, #220] ; 4e94 <rtems_initialize_data_structures+0x104>
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4db4: e59f00dc ldr r0, [pc, #220] ; 4e98 <rtems_initialize_data_structures+0x108>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4db8: e5836000 str r6, [r3]
4dbc: e3a04000 mov r4, #0 ; 0x0
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4dc0: eb000c96 bl 8020 <_CPU_Initialize>
4dc4: e5874000 str r4, [r7]
/*
* Do this as early as possible to insure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
4dc8: eb00160a bl a5f8 <_Debug_Manager_initialization>
_API_extensions_Initialization();
4dcc: eb0000c5 bl 50e8 <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem.
*/
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
4dd0: e59f30c4 ldr r3, [pc, #196] ; 4e9c <rtems_initialize_data_structures+0x10c>
4dd4: e3a05001 mov r5, #1 ; 0x1
/*
* Before this is called, we are not allowed to allocate memory
* from the Workspace because it is not initialized.
*/
_Workspace_Handler_initialization(
4dd8: e8960003 ldm r6, {r0, r1}
4ddc: e5835000 str r5, [r3]
4de0: eb000c19 bl 7e4c <_Workspace_Handler_initialization>
(void *)configuration_table->work_space_start,
configuration_table->work_space_size
);
_User_extensions_Handler_initialization(
4de4: e2860038 add r0, r6, #56 ; 0x38
4de8: e8900003 ldm r0, {r0, r1}
4dec: eb000a98 bl 7854 <_User_extensions_Handler_initialization>
configuration_table->number_of_initial_extensions,
configuration_table->User_extension_table
);
_ISR_Handler_initialization();
4df0: eb000328 bl 5a98 <_ISR_Handler_initialization>
_Objects_Handler_initialization(
4df4: eb0004f5 bl 61d0 <_Objects_Handler_initialization>
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4df8: e59f30a0 ldr r3, [pc, #160] ; 4ea0 <rtems_initialize_data_structures+0x110>
4dfc: e59f20a0 ldr r2, [pc, #160] ; 4ea4 <rtems_initialize_data_structures+0x114>
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e00: e1a00005 mov r0, r5
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4e04: e5832004 str r2, [r3, #4]
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e08: eb000118 bl 5270 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
4e0c: e59f0094 ldr r0, [pc, #148] ; 4ea8 <rtems_initialize_data_structures+0x118>
4e10: eb0000ec bl 51c8 <_API_Mutex_Allocate>
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
4e14: e59f3090 ldr r3, [pc, #144] ; 4eac <rtems_initialize_data_structures+0x11c>
4e18: e1c340b0 strh r4, [r3]
4e1c: e59f308c ldr r3, [pc, #140] ; 4eb0 <rtems_initialize_data_structures+0x120>
for ( index=0 ; index <16 ; index++ )
_Priority_Bit_map[ index ] = 0;
4e20: e3a02000 mov r2, #0 ; 0x0
4e24: e18320b4 strh r2, [r3, r4]
4e28: e2844002 add r4, r4, #2 ; 0x2
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
for ( index=0 ; index <16 ; index++ )
4e2c: e3540020 cmp r4, #32 ; 0x20
4e30: 1afffffa bne 4e20 <rtems_initialize_data_structures+0x90>
_Priority_Handler_initialization();
_Watchdog_Handler_initialization();
4e34: eb000b88 bl 7c5c <_Watchdog_Handler_initialization>
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
4e38: e596000c ldr r0, [r6, #12]
4e3c: eb000240 bl 5744 <_TOD_Handler_initialization>
_Thread_Handler_initialization(
4e40: e5961008 ldr r1, [r6, #8]
4e44: e5960010 ldr r0, [r6, #16]
4e48: eb000745 bl 6b64 <_Thread_Handler_initialization>
);
#endif
/* MANAGERS */
_RTEMS_API_Initialize( configuration_table );
4e4c: e1a00006 mov r0, r6
4e50: eb000087 bl 5074 <_RTEMS_API_Initialize>
_Extension_Manager_initialization( configuration_table->maximum_extensions );
4e54: e5960008 ldr r0, [r6, #8]
4e58: eb000015 bl 4eb4 <_Extension_Manager_initialization>
_IO_Manager_initialization(
4e5c: e5961030 ldr r1, [r6, #48]
4e60: e596202c ldr r2, [r6, #44]
4e64: e5960034 ldr r0, [r6, #52]
4e68: eb000035 bl 4f44 <_IO_Manager_initialization>
configuration_table->number_of_device_drivers,
configuration_table->maximum_drivers
);
#ifdef RTEMS_POSIX_API
_POSIX_API_Initialize( configuration_table );
4e6c: e1a00006 mov r0, r6
4e70: eb00005b bl 4fe4 <_POSIX_API_Initialize>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
4e74: e3a03001 mov r3, #1 ; 0x1
4e78: e5873000 str r3, [r7]
_Thread_Create_idle();
/*
* Scheduling can properly occur now as long as we avoid dispatching.
*/
}
4e7c: e8bd40f0 pop {r4, r5, r6, r7, lr}
*
* At this point all API extensions are in place. After the call to
* _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
*/
_Thread_Create_idle();
4e80: ea0005f6 b 6660 <_Thread_Create_idle>
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
_Internal_error_Occurred(
4e84: e1a02000 mov r2, r0 <== NOT EXECUTED
4e88: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
4e8c: eb0002ef bl 5a50 <_Internal_error_Occurred> <== NOT EXECUTED
000062e4 <rtems_io_register_driver>:
{
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62e4: e251c000 subs ip, r1, #0 ; 0x0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
62e8: e92d00f0 push {r4, r5, r6, r7}
62ec: e1a06000 mov r6, r0
62f0: e1a07002 mov r7, r2
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62f4: 0a00003e beq 63f4 <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
62f8: e3520000 cmp r2, #0 ; 0x0
62fc: 0a00003c beq 63f4 <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
6300: e59c3000 ldr r3, [ip]
6304: e3530000 cmp r3, #0 ; 0x0
6308: 0a000036 beq 63e8 <rtems_io_register_driver+0x104>
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
630c: e3a03000 mov r3, #0 ; 0x0
6310: e5873000 str r3, [r7]
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
6314: e59f20e0 ldr r2, [pc, #224] ; 63fc <rtems_io_register_driver+0x118>
6318: e5922000 ldr r2, [r2]
631c: e1520006 cmp r2, r6
6320: 93a0000a movls r0, #10 ; 0xa
6324: 9a00002b bls 63d8 <rtems_io_register_driver+0xf4>
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
6328: e3560000 cmp r6, #0 ; 0x0
632c: 1a00001d bne 63a8 <rtems_io_register_driver+0xc4>
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6330: e2526001 subs r6, r2, #1 ; 0x1
6334: 0a000029 beq 63e0 <rtems_io_register_driver+0xfc>
6338: e1a03282 lsl r3, r2, #5
633c: e0433182 sub r3, r3, r2, lsl #3
6340: e59f20b8 ldr r2, [pc, #184] ; 6400 <rtems_io_register_driver+0x11c>
6344: e5921000 ldr r1, [r2]
6348: e2433018 sub r3, r3, #24 ; 0x18
634c: e0811003 add r1, r1, r3
6350: ea000002 b 6360 <rtems_io_register_driver+0x7c>
6354: e2566001 subs r6, r6, #1 ; 0x1
6358: e2411018 sub r1, r1, #24 ; 0x18
635c: 0a00001f beq 63e0 <rtems_io_register_driver+0xfc>
if ( !_IO_Driver_address_table[major].initialization_entry &&
6360: e5913000 ldr r3, [r1]
6364: e3530000 cmp r3, #0 ; 0x0
* in use.
*/
if ( major == 0 ) {
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6368: e1a05001 mov r5, r1
if ( !_IO_Driver_address_table[major].initialization_entry &&
636c: 1afffff8 bne 6354 <rtems_io_register_driver+0x70>
6370: e5913004 ldr r3, [r1, #4]
6374: e3530000 cmp r3, #0 ; 0x0
6378: 1afffff5 bne 6354 <rtems_io_register_driver+0x70>
if ( _IO_Driver_address_table[major].initialization_entry ||
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
637c: e8bc000f ldm ip!, {r0, r1, r2, r3}
6380: e1a04005 mov r4, r5
6384: e8a4000f stmia r4!, {r0, r1, r2, r3}
6388: e89c0003 ldm ip, {r0, r1}
638c: e8840003 stm r4, {r0, r1}
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
6390: e3a01000 mov r1, #0 ; 0x0
6394: e1a00006 mov r0, r6
6398: e1a02001 mov r2, r1
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
639c: e5876000 str r6, [r7]
return rtems_io_initialize( major, 0, NULL );
}
63a0: e8bd00f0 pop {r4, r5, r6, r7}
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63a4: eaffff58 b 610c <rtems_io_initialize>
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
63a8: e59f2050 ldr r2, [pc, #80] ; 6400 <rtems_io_register_driver+0x11c>
63ac: e1a03286 lsl r3, r6, #5
63b0: e5921000 ldr r1, [r2]
63b4: e0433186 sub r3, r3, r6, lsl #3
63b8: e7912003 ldr r2, [r1, r3]
63bc: e3520000 cmp r2, #0 ; 0x0
63c0: e0815003 add r5, r1, r3
63c4: 1a000002 bne 63d4 <rtems_io_register_driver+0xf0>
63c8: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
63cc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
63d0: 0affffe9 beq 637c <rtems_io_register_driver+0x98> <== NOT EXECUTED
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63d4: e3a0000c mov r0, #12 ; 0xc
}
63d8: e8bd00f0 pop {r4, r5, r6, r7}
63dc: e12fff1e bx lr
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63e0: e3a00005 mov r0, #5 ; 0x5
63e4: eafffffb b 63d8 <rtems_io_register_driver+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
63e8: e59c3004 ldr r3, [ip, #4]
63ec: e3530000 cmp r3, #0 ; 0x0
63f0: 1affffc5 bne 630c <rtems_io_register_driver+0x28>
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63f4: e3a00009 mov r0, #9 ; 0x9
63f8: eafffff6 b 63d8 <rtems_io_register_driver+0xf4>
000102b4 <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
Objects_Id id
)
{
102b4: e92d4030 push {r4, r5, lr}
102b8: e24dd004 sub sp, sp, #4 ; 0x4
102bc: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
102c0: e1a0200d mov r2, sp
102c4: e59f004c ldr r0, [pc, #76] ; 10318 <rtems_message_queue_delete+0x64>
102c8: eb001394 bl 15120 <_Objects_Get>
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
102cc: e59d4000 ldr r4, [sp]
102d0: e3540000 cmp r4, #0 ; 0x0
102d4: e1a05000 mov r5, r0
102d8: 13a00004 movne r0, #4 ; 0x4
102dc: 1a00000b bne 10310 <rtems_message_queue_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
102e0: e59f0030 ldr r0, [pc, #48] ; 10318 <rtems_message_queue_delete+0x64>
102e4: e1a01005 mov r1, r5
102e8: eb00125a bl 14c58 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
102ec: e3a02005 mov r2, #5 ; 0x5
102f0: e2850014 add r0, r5, #20 ; 0x14
102f4: e1a01004 mov r1, r4
102f8: eb000d1d bl 13774 <_CORE_message_queue_Close>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
102fc: e59f0014 ldr r0, [pc, #20] ; 10318 <rtems_message_queue_delete+0x64>
10300: e1a01005 mov r1, r5
10304: eb00131a bl 14f74 <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
10308: eb0015c9 bl 15a34 <_Thread_Enable_dispatch>
1030c: e1a00004 mov r0, r4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10310: e28dd004 add sp, sp, #4 ; 0x4
10314: e8bd8030 pop {r4, r5, pc}
0001031c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
1031c: e92d4030 push {r4, r5, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
10320: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
10324: e24dd004 sub sp, sp, #4 ; 0x4
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
10328: 03a00009 moveq r0, #9 ; 0x9
1032c: 0a000007 beq 10350 <rtems_message_queue_flush+0x34>
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
10330: e1a01000 mov r1, r0
10334: e1a0200d mov r2, sp
10338: e59f0030 ldr r0, [pc, #48] ; 10370 <rtems_message_queue_flush+0x54>
1033c: eb001377 bl 15120 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
10340: e59d4000 ldr r4, [sp]
10344: e3540000 cmp r4, #0 ; 0x0
10348: 13a00004 movne r0, #4 ; 0x4
1034c: 0a000001 beq 10358 <rtems_message_queue_flush+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10350: e28dd004 add sp, sp, #4 ; 0x4
10354: e8bd8030 pop {r4, r5, pc}
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
10358: e2800014 add r0, r0, #20 ; 0x14
1035c: eb000d0e bl 1379c <_CORE_message_queue_Flush>
10360: e5850000 str r0, [r5]
_Thread_Enable_dispatch();
10364: eb0015b2 bl 15a34 <_Thread_Enable_dispatch>
10368: e1a00004 mov r0, r4
1036c: eafffff7 b 10350 <rtems_message_queue_flush+0x34>
0000c25c <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
c25c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
c260: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
c264: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
c268: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
c26c: 0a000007 beq c290 <rtems_rate_monotonic_get_statistics+0x34><== NOT EXECUTED
c270: e1a01000 mov r1, r0 <== NOT EXECUTED
c274: e1a0200d mov r2, sp <== NOT EXECUTED
c278: e59f004c ldr r0, [pc, #76] ; c2cc <rtems_rate_monotonic_get_statistics+0x70><== NOT EXECUTED
c27c: ebffee7b bl 7c70 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c280: e59d6000 ldr r6, [sp] <== NOT EXECUTED
c284: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
c288: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
c28c: 0a000001 beq c298 <rtems_rate_monotonic_get_statistics+0x3c><== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
c290: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
c294: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
c298: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED
c29c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2a0: e1a04005 mov r4, r5 <== NOT EXECUTED
c2a4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2a8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2ac: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
c2b8: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED
c2bc: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
_Thread_Enable_dispatch();
c2c0: ebfff0af bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
c2c4: e1a00006 mov r0, r6 <== NOT EXECUTED
c2c8: eafffff0 b c290 <rtems_rate_monotonic_get_statistics+0x34> <== NOT EXECUTED
0000c2d0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
c2d0: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
c2d4: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
c2d8: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
c2dc: 03a00009 moveq r0, #9 ; 0x9
c2e0: 0a000016 beq c340 <rtems_rate_monotonic_get_status+0x70>
c2e4: e1a01000 mov r1, r0
c2e8: e28d2008 add r2, sp, #8 ; 0x8
c2ec: e59f0084 ldr r0, [pc, #132] ; c378 <rtems_rate_monotonic_get_status+0xa8>
c2f0: ebffee5e bl 7c70 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
c2f4: e59d3008 ldr r3, [sp, #8]
c2f8: e3530000 cmp r3, #0 ; 0x0
c2fc: e1a06000 mov r6, r0
c300: 13a00004 movne r0, #4 ; 0x4
c304: 1a00000d bne c340 <rtems_rate_monotonic_get_status+0x70>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
c308: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED
c30c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
c310: 01a02003 moveq r2, r3 <== NOT EXECUTED
c314: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED
status->state = the_period->state;
c318: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c31c: 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);
c320: e885000c stm r5, {r2, r3} <== NOT EXECUTED
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
c324: 1a000007 bne c348 <rtems_rate_monotonic_get_status+0x78> <== 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;
c328: e5853014 str 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;
c32c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
status->since_last_period.tv_nsec = 0;
c330: e585300c str 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;
c334: e5853010 str r3, [r5, #16] <== NOT EXECUTED
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
c338: ebfff091 bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
c33c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
c340: e28dd00c add sp, sp, #12 ; 0xc
c344: e8bd8070 pop {r4, r5, r6, pc}
* 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 );
c348: e1a0000d mov r0, sp <== NOT EXECUTED
c34c: ebffebc1 bl 7258 <_TOD_Get_uptime> <== NOT EXECUTED
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
c350: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED
c354: e1a0100d mov r1, sp <== NOT EXECUTED
c358: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED
c35c: ebfff4f5 bl 9738 <_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(
c360: e1a0100d mov r1, sp <== NOT EXECUTED
c364: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED
c368: e59f000c ldr r0, [pc, #12] ; c37c <rtems_rate_monotonic_get_status+0xac><== 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 );
c36c: 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(
c370: ebfff4f0 bl 9738 <_Timespec_Subtract> <== NOT EXECUTED
c374: eaffffef b c338 <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
00005d48 <rtems_rate_monotonic_report_statistics>:
}
}
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
5d48: e59f1004 ldr r1, [pc, #4] ; 5d54 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
5d4c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5d50: eaffff71 b 5b1c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
00005b1c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b1c: 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 )
5b20: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b24: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
5b28: e1a07000 mov r7, 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 )
5b2c: 0a000042 beq 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
5b30: e59f11e4 ldr r1, [pc, #484] ; 5d1c <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
5b34: e1a0e00f mov lr, pc <== NOT EXECUTED
5b38: e12fff16 bx r6 <== NOT EXECUTED
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
5b3c: e59f11dc ldr r1, [pc, #476] ; 5d20 <rtems_rate_monotonic_report_statistics_with_plugin+0x204><== NOT EXECUTED
5b40: e1a00007 mov r0, r7 <== NOT EXECUTED
5b44: e1a0e00f mov lr, pc <== NOT EXECUTED
5b48: e12fff16 bx r6 <== NOT EXECUTED
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
5b4c: e59f11d0 ldr r1, [pc, #464] ; 5d24 <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== NOT EXECUTED
5b50: e1a00007 mov r0, r7 <== NOT EXECUTED
5b54: e1a0e00f mov lr, pc <== NOT EXECUTED
5b58: e12fff16 bx r6 <== 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 ;
5b5c: e59f81c4 ldr r8, [pc, #452] ; 5d28 <rtems_rate_monotonic_report_statistics_with_plugin+0x20c><== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
5b60: e59f11c4 ldr r1, [pc, #452] ; 5d2c <rtems_rate_monotonic_report_statistics_with_plugin+0x210><== NOT EXECUTED
5b64: e1a00007 mov r0, r7 <== NOT EXECUTED
5b68: e1a0e00f mov lr, pc <== NOT EXECUTED
5b6c: e12fff16 bx r6 <== NOT EXECUTED
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
5b70: e1a00007 mov r0, r7 <== NOT EXECUTED
5b74: e59f11b4 ldr r1, [pc, #436] ; 5d30 <rtems_rate_monotonic_report_statistics_with_plugin+0x214><== NOT EXECUTED
5b78: e1a0e00f mov lr, pc <== NOT EXECUTED
5b7c: e12fff16 bx r6 <== 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 ;
5b80: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5b84: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
5b88: e1550003 cmp r5, r3 <== NOT EXECUTED
5b8c: 8a00002a bhi 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
_Timespec_Divide_by_integer(
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5b90: e59fa19c ldr sl, [pc, #412] ; 5d34 <rtems_rate_monotonic_report_statistics_with_plugin+0x218><== NOT EXECUTED
5b94: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5b98: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED
5b9c: ea000003 b 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== 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 ;
5ba0: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5ba4: e2855001 add r5, r5, #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 ;
5ba8: e1530005 cmp r3, r5 <== NOT EXECUTED
5bac: 3a000022 bcc 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
5bb0: e1a00005 mov r0, r5 <== NOT EXECUTED
5bb4: e1a01009 mov r1, r9 <== NOT EXECUTED
5bb8: eb0019a7 bl c25c <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
5bbc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
5bc0: 1afffff6 bne 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
5bc4: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED
5bc8: e1a00005 mov r0, r5 <== NOT EXECUTED
5bcc: eb0019bf bl c2d0 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
5bd0: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED
5bd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
5bd8: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED
if ( the_status.owner ) {
5bdc: 1a00004a bne 5d0c <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
5be0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
5be8: e58d3000 str r3, [sp] <== NOT EXECUTED
5bec: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
5bf0: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED
5bf4: e1a02005 mov r2, r5 <== NOT EXECUTED
5bf8: e59f1138 ldr r1, [pc, #312] ; 5d38 <rtems_rate_monotonic_report_statistics_with_plugin+0x21c><== NOT EXECUTED
5bfc: e1a00007 mov r0, r7 <== NOT EXECUTED
5c00: e1a0e00f mov lr, pc <== NOT EXECUTED
5c04: e12fff16 bx r6 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5c0c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c10: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
5c14: e1a0200b mov r2, fp <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c18: 1a000009 bne 5c44 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NOT EXECUTED
(*print)( context, "\n" );
5c1c: e1a00007 mov r0, r7 <== NOT EXECUTED
5c20: e59f1114 ldr r1, [pc, #276] ; 5d3c <rtems_rate_monotonic_report_statistics_with_plugin+0x220><== NOT EXECUTED
5c24: e1a0e00f mov lr, pc <== NOT EXECUTED
5c28: e12fff16 bx r6 <== 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 ;
5c2c: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5c30: e2855001 add r5, r5, #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 ;
5c34: e1530005 cmp r3, r5 <== NOT EXECUTED
5c38: 2affffdc bcs 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
5c3c: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
5c40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c44: eb000e7e bl 9644 <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5c48: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED
5c4c: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5c50: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5c54: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
5c58: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5c5c: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5c60: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5c64: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5c68: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
5c6c: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5c70: e58d2000 str r2, [sp] <== NOT EXECUTED
5c74: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5c78: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5c7c: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5c80: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5c84: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5c88: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5c8c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
5c90: e59f10a8 ldr r1, [pc, #168] ; 5d40 <rtems_rate_monotonic_report_statistics_with_plugin+0x224><== NOT EXECUTED
5c94: e1a00007 mov r0, r7 <== NOT EXECUTED
5c98: e1a0e00f mov lr, pc <== NOT EXECUTED
5c9c: e12fff16 bx r6 <== NOT EXECUTED
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
5ca0: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED
5ca4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
5ca8: e1a0200b mov r2, fp <== NOT EXECUTED
5cac: eb000e64 bl 9644 <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
5cb0: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED
5cb4: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5cb8: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5cbc: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED
5cc0: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5cc4: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5cc8: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5ccc: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5cd0: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED
5cd4: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5cd8: e58d2000 str r2, [sp] <== NOT EXECUTED
5cdc: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5ce0: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5ce4: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5ce8: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5cec: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5cf0: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5cf4: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED
5cf8: e1a00007 mov r0, r7 <== NOT EXECUTED
5cfc: e59f1040 ldr r1, [pc, #64] ; 5d44 <rtems_rate_monotonic_report_statistics_with_plugin+0x228><== NOT EXECUTED
5d00: e1a0e00f mov lr, pc <== NOT EXECUTED
5d04: e12fff16 bx r6 <== NOT EXECUTED
5d08: eaffffa4 b 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
5d0c: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED
5d10: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED
5d14: eb000070 bl 5edc <rtems_object_get_name> <== NOT EXECUTED
5d18: eaffffb0 b 5be0 <rtems_rate_monotonic_report_statistics_with_plugin+0xc4><== NOT EXECUTED
00005d58 <rtems_rate_monotonic_reset_all_statistics>:
5d58: e59f3040 ldr r3, [pc, #64] ; 5da0 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
5d5c: e5932000 ldr r2, [r3] <== NOT EXECUTED
5d60: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
5d64: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5d68: 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 ;
5d6c: e59f5030 ldr r5, [pc, #48] ; 5da4 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NOT EXECUTED
5d70: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5d74: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
5d78: e1540003 cmp r4, r3 <== NOT EXECUTED
5d7c: 8a000005 bhi 5d98 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
5d80: e1a00004 mov r0, r4 <== NOT EXECUTED
5d84: eb000007 bl 5da8 <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 ;
5d88: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
id++ ) {
5d8c: 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 ;
5d90: e1530004 cmp r3, r4 <== NOT EXECUTED
5d94: 2afffff9 bcs 5d80 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
5d98: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
5d9c: ea0009f8 b 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
00005da8 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
Objects_Id id
)
{
5da8: e92d4010 push {r4, lr} <== NOT EXECUTED
5dac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5db0: e1a01000 mov r1, r0 <== NOT EXECUTED
5db4: e1a0200d mov r2, sp <== NOT EXECUTED
5db8: e59f005c ldr r0, [pc, #92] ; 5e1c <rtems_rate_monotonic_reset_statistics+0x74><== NOT EXECUTED
5dbc: eb0007ab bl 7c70 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
5dc0: e59d4000 ldr r4, [sp] <== NOT EXECUTED
5dc4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
5dc8: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
5dcc: 1a000010 bne 5e14 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
5dd0: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
5dd4: e5803078 str r3, [r0, #120] <== NOT EXECUTED
5dd8: e5804054 str r4, [r0, #84] <== NOT EXECUTED
5ddc: e5804058 str r4, [r0, #88] <== NOT EXECUTED
5de0: e5804064 str r4, [r0, #100] <== NOT EXECUTED
5de4: e5804068 str r4, [r0, #104] <== NOT EXECUTED
5de8: e580406c str r4, [r0, #108] <== NOT EXECUTED
5dec: e5804070 str r4, [r0, #112] <== NOT EXECUTED
5df0: e580407c str r4, [r0, #124] <== NOT EXECUTED
5df4: e5804080 str r4, [r0, #128] <== NOT EXECUTED
5df8: e5804084 str r4, [r0, #132] <== NOT EXECUTED
5dfc: e5804088 str r4, [r0, #136] <== NOT EXECUTED
5e00: e580305c str r3, [r0, #92] <== NOT EXECUTED
5e04: e5803060 str r3, [r0, #96] <== NOT EXECUTED
5e08: e5803074 str r3, [r0, #116] <== NOT EXECUTED
_Thread_Enable_dispatch();
5e0c: eb0009dc bl 8584 <_Thread_Enable_dispatch> <== NOT EXECUTED
5e10: e1a00004 mov r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5e14: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5e18: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000110cc <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110cc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
110d0: e2517000 subs r7, r1, #0 ; 0x0
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110d4: e1a04000 mov r4, r0
110d8: e24dd008 sub sp, sp, #8 ; 0x8
110dc: 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 )
110e0: 03a04009 moveq r4, #9 ; 0x9
110e4: 0a000020 beq 1116c <rtems_region_extend+0xa0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
110e8: e59f80a0 ldr r8, [pc, #160] ; 11190 <rtems_region_extend+0xc4>
110ec: e5980000 ldr r0, [r8]
110f0: eb000928 bl 13598 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
110f4: e1a01004 mov r1, r4
110f8: e59f0094 ldr r0, [pc, #148] ; 11194 <rtems_region_extend+0xc8>
110fc: e1a0200d mov r2, sp
11100: eb000ff5 bl 150dc <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
11104: e59d4000 ldr r4, [sp]
11108: e3540000 cmp r4, #0 ; 0x0
1110c: e1a05000 mov r5, r0
11110: 1a000018 bne 11178 <rtems_region_extend+0xac>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
11114: e1a01007 mov r1, r7
11118: e1a02006 mov r2, r6
1111c: e2800068 add r0, r0, #104 ; 0x68
11120: e28d3004 add r3, sp, #4 ; 0x4
11124: eb000c3a bl 14214 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11128: e3500001 cmp r0, #1 ; 0x1
1112c: 03a04009 moveq r4, #9 ; 0x9
11130: 0a00000b beq 11164 <rtems_region_extend+0x98>
11134: 2a000007 bcs 11158 <rtems_region_extend+0x8c>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11138: e59d1004 ldr r1, [sp, #4]
1113c: e5952054 ldr r2, [r5, #84]
the_region->maximum_segment_size += amount_extended;
11140: e595305c ldr r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11144: e0822001 add r2, r2, r1
the_region->maximum_segment_size += amount_extended;
11148: e0833001 add r3, r3, r1
1114c: e585305c str r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11150: e5852054 str r2, [r5, #84]
11154: ea000002 b 11164 <rtems_region_extend+0x98>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11158: e3500002 cmp r0, #2 ; 0x2
1115c: 0a000009 beq 11188 <rtems_region_extend+0xbc>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11160: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11164: e5980000 ldr r0, [r8]
11168: eb000926 bl 13608 <_API_Mutex_Unlock>
return return_status;
}
1116c: e1a00004 mov r0, r4
11170: e28dd008 add sp, sp, #8 ; 0x8
11174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
11178: e3540001 cmp r4, #1 ; 0x1
1117c: 03a04004 moveq r4, #4 ; 0x4
11180: 1afffff6 bne 11160 <rtems_region_extend+0x94>
11184: eafffff6 b 11164 <rtems_region_extend+0x98>
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11188: e3a04018 mov r4, #24 ; 0x18
1118c: eafffff4 b 11164 <rtems_region_extend+0x98>
000114b4 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114b4: 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 )
114b8: e253a000 subs sl, r3, #0 ; 0x0
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114bc: e24dd010 sub sp, sp, #16 ; 0x10
114c0: e1a04000 mov r4, r0
114c4: e1a05001 mov r5, r1
114c8: e1a06002 mov r6, r2
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114cc: 0a000028 beq 11574 <rtems_region_resize_segment+0xc0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
114d0: e59f70b4 ldr r7, [pc, #180] ; 1158c <rtems_region_resize_segment+0xd8>
114d4: e5970000 ldr r0, [r7]
114d8: eb00082e bl 13598 <_API_Mutex_Lock>
114dc: e1a01004 mov r1, r4
114e0: e59f00a8 ldr r0, [pc, #168] ; 11590 <rtems_region_resize_segment+0xdc>
114e4: e28d2008 add r2, sp, #8 ; 0x8
114e8: eb000efb bl 150dc <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
114ec: e59d3008 ldr r3, [sp, #8]
114f0: e3530000 cmp r3, #0 ; 0x0
114f4: e1a08000 mov r8, r0
114f8: 0a000007 beq 1151c <rtems_region_resize_segment+0x68>
114fc: e3530001 cmp r3, #1 ; 0x1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11500: e5970000 ldr r0, [r7]
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11504: 03a04004 moveq r4, #4 ; 0x4
11508: 13a04019 movne r4, #25 ; 0x19
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1150c: eb00083d bl 13608 <_API_Mutex_Unlock>
return return_status;
}
11510: e1a00004 mov r0, r4
11514: e28dd010 add sp, sp, #16 ; 0x10
11518: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1151c: e1a01005 mov r1, r5
11520: e28d3004 add r3, sp, #4 ; 0x4
11524: e28dc00c add ip, sp, #12 ; 0xc
11528: e1a02006 mov r2, r6
1152c: e2800068 add r0, r0, #104 ; 0x68
11530: e58dc000 str ip, [sp]
11534: eb000cc1 bl 14840 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11538: e59d3004 ldr r3, [sp, #4]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
1153c: e2505000 subs r5, r0, #0 ; 0x0
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11540: e58a3000 str r3, [sl]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
11544: 1a000005 bne 11560 <rtems_region_resize_segment+0xac>
11548: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED
1154c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
11550: 1a000009 bne 1157c <rtems_region_resize_segment+0xc8> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11554: e5970000 ldr r0, [r7] <== NOT EXECUTED
11558: eb00082a bl 13608 <_API_Mutex_Unlock> <== NOT EXECUTED
1155c: eaffffeb b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
11560: e5970000 ldr r0, [r7]
11564: eb000827 bl 13608 <_API_Mutex_Unlock>
return
11568: e3550001 cmp r5, #1 ; 0x1
1156c: 03a0400d moveq r4, #13 ; 0xd
11570: 0affffe6 beq 11510 <rtems_region_resize_segment+0x5c>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
11574: e3a04009 mov r4, #9 ; 0x9
11578: eaffffe4 b 11510 <rtems_region_resize_segment+0x5c>
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
1157c: e1a00008 mov r0, r8 <== NOT EXECUTED
11580: eb002115 bl 199dc <_Region_Process_queue> <== NOT EXECUTED
11584: e1a04005 mov r4, r5 <== NOT EXECUTED
11588: eaffffe0 b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
0000456c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
456c: 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 ) )
4570: e250a000 subs sl, r0, #0 ; 0x0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
4574: e24dd018 sub sp, sp, #24 ; 0x18
4578: e1a06001 mov r6, r1
457c: e1a04002 mov r4, r2
4580: e1a08003 mov r8, r3
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
4584: 02800003 addeq r0, r0, #3 ; 0x3
4588: 0a000037 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_INVALID_NAME;
if ( !id )
458c: e59d3038 ldr r3, [sp, #56]
4590: e3530000 cmp r3, #0 ; 0x0
4594: 03a00009 moveq r0, #9 ; 0x9
4598: 0a000033 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
459c: e21230c0 ands r3, r2, #192 ; 0xc0
45a0: 02025030 andeq r5, r2, #48 ; 0x30
45a4: 1a000032 bne 4674 <rtems_semaphore_create+0x108>
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
45a8: e3550000 cmp r5, #0 ; 0x0
45ac: 0a000002 beq 45bc <rtems_semaphore_create+0x50>
45b0: e3560001 cmp r6, #1 ; 0x1
45b4: 83a0000a movhi r0, #10 ; 0xa
45b8: 8a00002b bhi 466c <rtems_semaphore_create+0x100>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45bc: e59f218c ldr r2, [pc, #396] ; 4750 <rtems_semaphore_create+0x1e4>
45c0: e5923000 ldr r3, [r2]
45c4: e2833001 add r3, r3, #1 ; 0x1
45c8: 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 );
45cc: e59f9180 ldr r9, [pc, #384] ; 4754 <rtems_semaphore_create+0x1e8>
45d0: e1a00009 mov r0, r9
45d4: eb000537 bl 5ab8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
45d8: e2507000 subs r7, r0, #0 ; 0x0
45dc: 0a000048 beq 4704 <rtems_semaphore_create+0x198>
* 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 ) ) {
45e0: e3550000 cmp r5, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
45e4: e5874010 str r4, [r7, #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 ) ) {
45e8: 0a00002e beq 46a8 <rtems_semaphore_create+0x13c>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45ec: e3140040 tst r4, #64 ; 0x40
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45f0: 13a03002 movne r3, #2 ; 0x2
45f4: 158d3008 strne r3, [sp, #8]
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45f8: 1a000007 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
45fc: e3140080 tst r4, #128 ; 0x80
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4600: 13a03003 movne r3, #3 ; 0x3
4604: 158d3008 strne r3, [sp, #8]
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 ) )
4608: 1a000003 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
460c: e2143004 ands r3, r4, #4 ; 0x4
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
4610: 13a03001 movne r3, #1 ; 0x1
4614: 158d3008 strne r3, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
4618: 058d3008 streq r3, [sp, #8]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
461c: e3550010 cmp r5, #16 ; 0x10
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;
4620: 13a03002 movne r3, #2 ; 0x2
the_mutex_attributes.only_owner_release = FALSE;
4624: 13a02000 movne r2, #0 ; 0x0
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;
4628: 158d3000 strne r3, [sp]
the_mutex_attributes.only_owner_release = FALSE;
462c: 15cd2004 strbne r2, [sp, #4]
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4630: 0a000036 beq 4710 <rtems_semaphore_create+0x1a4>
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
4634: e3560001 cmp r6, #1 ; 0x1
4638: 13a02000 movne r2, #0 ; 0x0
463c: 03a02001 moveq r2, #1 ; 0x1
4640: e2870014 add r0, r7, #20 ; 0x14
4644: 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;
4648: e58d800c str r8, [sp, #12]
mutex_status = _CORE_mutex_Initialize(
464c: eb00032e bl 530c <_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 ) {
4650: e3500006 cmp r0, #6 ; 0x6
4654: 1a000020 bne 46dc <rtems_semaphore_create+0x170>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
4658: e59f00f4 ldr r0, [pc, #244] ; 4754 <rtems_semaphore_create+0x1e8><== NOT EXECUTED
465c: e1a01007 mov r1, r7 <== NOT EXECUTED
4660: eb000601 bl 5e6c <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4664: eb00089f bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4668: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
466c: e28dd018 add sp, sp, #24 ; 0x18
4670: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
4674: e2025030 and r5, r2, #48 ; 0x30
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4678: e3550010 cmp r5, #16 ; 0x10
467c: 0a000003 beq 4690 <rtems_semaphore_create+0x124>
4680: e3550020 cmp r5, #32 ; 0x20
4684: 0a000001 beq 4690 <rtems_semaphore_create+0x124>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4688: e3a0000b mov r0, #11 ; 0xb
468c: eafffff6 b 466c <rtems_semaphore_create+0x100>
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4690: e3140004 tst r4, #4 ; 0x4
4694: 0afffffb beq 4688 <rtems_semaphore_create+0x11c>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
4698: e35300c0 cmp r3, #192 ; 0xc0
469c: 1affffc1 bne 45a8 <rtems_semaphore_create+0x3c>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46a0: e3a0000b mov r0, #11 ; 0xb
46a4: eafffff0 b 466c <rtems_semaphore_create+0x100>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
46a8: e3140004 tst r4, #4 ; 0x4
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46ac: 13a03001 movne r3, #1 ; 0x1
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46b0: 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;
46b4: 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(
46b8: e1a02006 mov r2, r6
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46bc: 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(
46c0: e2870014 add r0, r7, #20 ; 0x14
46c4: 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;
46c8: 058d5014 streq r5, [sp, #20]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46cc: 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;
46d0: e58dc00c str ip, [sp, #12]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46d4: e58dc000 str ip, [sp]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46d8: eb0003df bl 565c <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46dc: e5971008 ldr r1, [r7, #8]
46e0: e599201c ldr r2, [r9, #28]
46e4: e1a03801 lsl r3, r1, #16
46e8: e7827723 str r7, [r2, r3, lsr #14]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
46ec: e59d3038 ldr r3, [sp, #56]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
46f0: e587a00c str sl, [r7, #12]
46f4: e5831000 str r1, [r3]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
46f8: eb00087a bl 68e8 <_Thread_Enable_dispatch>
46fc: e3a00000 mov r0, #0 ; 0x0
4700: eaffffd9 b 466c <rtems_semaphore_create+0x100>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
4704: eb000877 bl 68e8 <_Thread_Enable_dispatch>
4708: e3a00005 mov r0, #5 ; 0x5
470c: eaffffd6 b 466c <rtems_semaphore_create+0x100>
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
4710: 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;
4714: e3a03000 mov r3, #0 ; 0x0
4718: e58d3000 str r3, [sp]
switch ( the_mutex_attributes.discipline ) {
471c: e3520003 cmp r2, #3 ; 0x3
4720: 979ff102 ldrls pc, [pc, r2, lsl #2]
4724: eaffffc2 b 4634 <rtems_semaphore_create+0xc8> <== NOT EXECUTED
4728: 00004744 .word 0x00004744 <== NOT EXECUTED
472c: 00004744 .word 0x00004744 <== NOT EXECUTED
4730: 00004738 .word 0x00004738 <== NOT EXECUTED
4734: 00004738 .word 0x00004738 <== 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;
4738: e3a03001 mov r3, #1 ; 0x1
473c: e5cd3004 strb r3, [sp, #4]
4740: eaffffbb b 4634 <rtems_semaphore_create+0xc8>
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
4744: e3a03000 mov r3, #0 ; 0x0
4748: e5cd3004 strb r3, [sp, #4]
474c: eaffffb8 b 4634 <rtems_semaphore_create+0xc8>
000118bc <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
118bc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
118c0: e24dd004 sub sp, sp, #4 ; 0x4
118c4: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
118c8: e1a0200d mov r2, sp
118cc: e59f004c ldr r0, [pc, #76] ; 11920 <rtems_semaphore_flush+0x64>
118d0: eb000e12 bl 15120 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
118d4: e59d1000 ldr r1, [sp]
118d8: e3510000 cmp r1, #0 ; 0x0
118dc: 13a00004 movne r0, #4 ; 0x4
118e0: 1a000008 bne 11908 <rtems_semaphore_flush+0x4c>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
118e4: e5903010 ldr r3, [r0, #16]
118e8: e2133030 ands r3, r3, #48 ; 0x30
118ec: 1a000007 bne 11910 <rtems_semaphore_flush+0x54>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
118f0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
118f4: e1a01003 mov r1, r3 <== NOT EXECUTED
118f8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
118fc: eb000963 bl 13e90 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
11900: eb00104b bl 15a34 <_Thread_Enable_dispatch>
11904: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11908: e28dd004 add sp, sp, #4 ; 0x4
1190c: e8bd8000 pop {pc}
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
11910: e2800014 add r0, r0, #20 ; 0x14
11914: e3a02001 mov r2, #1 ; 0x1
11918: eb000888 bl 13b40 <_CORE_mutex_Flush>
1191c: eafffff7 b 11900 <rtems_semaphore_flush+0x44>
000047fc <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
47fc: e92d40f0 push {r4, r5, r6, r7, lr}
4800: e1a04000 mov r4, r0
4804: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Id id,
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
4808: e28d3004 add r3, sp, #4 ; 0x4
480c: e1a05001 mov r5, r1
4810: e1a06002 mov r6, r2
4814: e1a01004 mov r1, r4
4818: e59f00e8 ldr r0, [pc, #232] ; 4908 <rtems_semaphore_obtain+0x10c>
481c: e28d2008 add r2, sp, #8 ; 0x8
4820: eb0005cf bl 5f64 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
4824: e59d3008 ldr r3, [sp, #8]
4828: e3530000 cmp r3, #0 ; 0x0
482c: e1a01000 mov r1, r0
4830: 13a00004 movne r0, #4 ; 0x4
4834: 1a00000e bne 4874 <rtems_semaphore_obtain+0x78>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
4838: e5913010 ldr r3, [r1, #16]
483c: e2133030 ands r3, r3, #48 ; 0x30
4840: 0a00000d beq 487c <rtems_semaphore_obtain+0x80>
_CORE_mutex_Seize(
4844: e59dc004 ldr ip, [sp, #4]
4848: e2252001 eor r2, r5, #1 ; 0x1
484c: e2810014 add r0, r1, #20 ; 0x14
4850: e2022001 and r2, r2, #1 ; 0x1
4854: e1a03006 mov r3, r6
4858: e1a01004 mov r1, r4
485c: e58dc000 str ip, [sp]
4860: eb0002f2 bl 5430 <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
4864: e59f30a0 ldr r3, [pc, #160] ; 490c <rtems_semaphore_obtain+0x110>
4868: e5932000 ldr r2, [r3]
486c: e5920034 ldr r0, [r2, #52]
4870: eb000049 bl 499c <_Semaphore_Translate_core_mutex_return_code>
break;
}
return RTEMS_INVALID_ID;
}
4874: e28dd00c add sp, sp, #12 ; 0xc
4878: e8bd80f0 pop {r4, r5, r6, r7, pc}
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
487c: e59f7088 ldr r7, [pc, #136] ; 490c <rtems_semaphore_obtain+0x110><== NOT EXECUTED
4880: e597c000 ldr ip, [r7] <== NOT EXECUTED
Watchdog_Interval timeout,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
4884: e59de004 ldr lr, [sp, #4] <== NOT EXECUTED
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
4888: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
if ( the_semaphore->count != 0 ) {
488c: e591305c ldr r3, [r1, #92] <== NOT EXECUTED
4890: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
4894: 1a000008 bne 48bc <rtems_semaphore_obtain+0xc0> <== NOT EXECUTED
the_semaphore->count -= 1;
_ISR_Enable( level );
return;
}
if ( !wait ) {
4898: e3150001 tst r5, #1 ; 0x1 <== NOT EXECUTED
489c: 0a00000a beq 48cc <rtems_semaphore_obtain+0xd0> <== NOT EXECUTED
_ISR_Enable( level );
48a0: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
48a4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
48a8: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
id,
((_Options_Is_no_wait( option_set )) ? FALSE : TRUE),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
48ac: e5973000 ldr r3, [r7] <== NOT EXECUTED
48b0: e5930034 ldr r0, [r3, #52] <== NOT EXECUTED
48b4: eb00003c bl 49ac <_Semaphore_Translate_core_semaphore_return_code><== NOT EXECUTED
48b8: eaffffed b 4874 <rtems_semaphore_obtain+0x78> <== NOT EXECUTED
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
48bc: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
48c0: e581305c str r3, [r1, #92] <== NOT EXECUTED
_ISR_Enable( level );
48c4: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
48c8: eafffff7 b 48ac <rtems_semaphore_obtain+0xb0> <== NOT EXECUTED
48cc: e59f203c ldr r2, [pc, #60] ; 4910 <rtems_semaphore_obtain+0x114><== NOT EXECUTED
48d0: e5923000 ldr r3, [r2] <== NOT EXECUTED
48d4: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
48d8: e5823000 str r3, [r2] <== 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;
48dc: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
48e0: e2810014 add r0, r1, #20 ; 0x14 <== NOT EXECUTED
48e4: e5813044 str r3, [r1, #68] <== NOT EXECUTED
executing->Wait.id = id;
48e8: e58c4020 str r4, [ip, #32] <== NOT EXECUTED
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
48ec: e58c0044 str r0, [ip, #68] <== NOT EXECUTED
executing->Wait.id = id;
_ISR_Enable( level );
48f0: e129f00e msr CPSR_fc, lr <== NOT EXECUTED
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
48f4: e59f2018 ldr r2, [pc, #24] ; 4914 <rtems_semaphore_obtain+0x118><== NOT EXECUTED
48f8: e1a01006 mov r1, r6 <== NOT EXECUTED
48fc: eb000941 bl 6e08 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
_Thread_Enable_dispatch();
4900: eb0007f8 bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4904: eaffffe8 b 48ac <rtems_semaphore_obtain+0xb0> <== NOT EXECUTED
00014910 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
14910: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
14914: e59f2028 ldr r2, [pc, #40] ; 14944 <rtems_shutdown_executive+0x34>
14918: e5923000 ldr r3, [r2]
1491c: e3530004 cmp r3, #4 ; 0x4
*/
void rtems_shutdown_executive(
uint32_t result
)
{
14920: e24dd030 sub sp, sp, #48 ; 0x30
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
14924: 0a000004 beq 1493c <rtems_shutdown_executive+0x2c>
14928: e3a03004 mov 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 );
1492c: e1a0000d mov r0, sp
14930: e59f1010 ldr r1, [pc, #16] ; 14948 <rtems_shutdown_executive+0x38>
14934: e5823000 str r3, [r2]
14938: ebffcd62 bl 7ec8 <_CPU_Context_switch>
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
1493c: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED
14940: e8bd8000 pop {pc} <== NOT EXECUTED
000049bc <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
49bc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
49c0: e24dd01c sub sp, sp, #28 ; 0x1c
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
49c4: e59dc044 ldr ip, [sp, #68]
49c8: e35c0000 cmp ip, #0 ; 0x0
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
49cc: e1a08000 mov r8, r0
49d0: e1a05001 mov r5, r1
49d4: e1a0a002 mov sl, r2
49d8: e1a06003 mov r6, r3
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
49dc: 03a00009 moveq r0, #9 ; 0x9
49e0: 0a000031 beq 4aac <rtems_task_create+0xf0>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
49e4: e3580000 cmp r8, #0 ; 0x0
49e8: 03a00003 moveq r0, #3 ; 0x3
49ec: 0a00002e beq 4aac <rtems_task_create+0xf0>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
49f0: e59d3040 ldr r3, [sp, #64]
49f4: e3130902 tst r3, #32768 ; 0x8000
RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear (
rtems_attribute attribute_set,
rtems_attribute mask
)
{
return attribute_set & ~mask;
49f8: e3c34001 bic r4, r3, #1 ; 0x1
49fc: 1a000005 bne 4a18 <rtems_task_create+0x5c>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4a00: e3510000 cmp r1, #0 ; 0x0
4a04: 0a000032 beq 4ad4 <rtems_task_create+0x118>
4a08: e59f30dc ldr r3, [pc, #220] ; 4aec <rtems_task_create+0x130>
4a0c: e5d32000 ldrb r2, [r3]
4a10: e1510002 cmp r1, r2
4a14: 8a00002e bhi 4ad4 <rtems_task_create+0x118>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
4a18: e59fb0d0 ldr fp, [pc, #208] ; 4af0 <rtems_task_create+0x134>
4a1c: e59b0000 ldr r0, [fp]
4a20: eb000205 bl 523c <_API_Mutex_Lock>
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
4a24: e59f00c8 ldr r0, [pc, #200] ; 4af4 <rtems_task_create+0x138>
4a28: eb000422 bl 5ab8 <_Objects_Allocate>
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
4a2c: e2507000 subs r7, r0, #0 ; 0x0
4a30: 0a000029 beq 4adc <rtems_task_create+0x120>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
4a34: e1a0c426 lsr ip, r6, #8
4a38: e2049001 and r9, r4, #1 ; 0x1
4a3c: e22cc001 eor ip, ip, #1 ; 0x1
4a40: e1a0e4a6 lsr lr, r6, #9
4a44: e20cc001 and ip, ip, #1 ; 0x1
4a48: e20ee001 and lr, lr, #1 ; 0x1
4a4c: e1a0300a mov r3, sl
4a50: e20640c0 and r4, r6, #192 ; 0xc0
4a54: e59f0098 ldr r0, [pc, #152] ; 4af4 <rtems_task_create+0x138>
4a58: e1a01007 mov r1, r7
4a5c: e1a02009 mov r2, r9
4a60: e98d5020 stmib sp, {r5, ip, lr}
4a64: e58d4014 str r4, [sp, #20]
4a68: e58d8018 str r8, [sp, #24]
4a6c: e58d9000 str r9, [sp]
4a70: e58d9010 str r9, [sp, #16]
4a74: eb0007ce bl 69b4 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
4a78: e3500000 cmp r0, #0 ; 0x0
4a7c: 0a00000c beq 4ab4 <rtems_task_create+0xf8>
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a80: e1a03526 lsr r3, r6, #10
*id = the_thread->Object.id;
4a84: e5971008 ldr r1, [r7, #8]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a88: e5972104 ldr r2, [r7, #260]
*id = the_thread->Object.id;
4a8c: e59dc044 ldr ip, [sp, #68]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a90: e2233001 eor r3, r3, #1 ; 0x1
4a94: e2033001 and r3, r3, #1 ; 0x1
);
}
#endif
_RTEMS_Unlock_allocator();
4a98: e59b0000 ldr r0, [fp]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
4a9c: e5c23008 strb r3, [r2, #8]
*id = the_thread->Object.id;
4aa0: e58c1000 str r1, [ip]
);
}
#endif
_RTEMS_Unlock_allocator();
4aa4: eb000200 bl 52ac <_API_Mutex_Unlock>
4aa8: e1a00009 mov r0, r9
return RTEMS_SUCCESSFUL;
}
4aac: e28dd01c add sp, sp, #28 ; 0x1c
4ab0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
4ab4: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED
4ab8: eb000508 bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
4abc: e1a01007 mov r1, r7 <== NOT EXECUTED
4ac0: eb0004e9 bl 5e6c <_Objects_Free> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
4ac4: e59b0000 ldr r0, [fp] <== NOT EXECUTED
4ac8: eb0001f7 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4acc: e3a0000d mov r0, #13 ; 0xd <== NOT EXECUTED
4ad0: eafffff5 b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
4ad4: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
4ad8: eafffff3 b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
4adc: e59b0000 ldr r0, [fp] <== NOT EXECUTED
4ae0: eb0001f1 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4ae4: e3a00005 mov r0, #5 ; 0x5 <== NOT EXECUTED
4ae8: eaffffef b 4aac <rtems_task_create+0xf0> <== NOT EXECUTED
00004af8 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
4af8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
4afc: e59f6070 ldr r6, [pc, #112] ; 4b74 <rtems_task_delete+0x7c><== NOT EXECUTED
*/
rtems_status_code rtems_task_delete(
Objects_Id id
)
{
4b00: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
4b04: e1a04000 mov r4, r0 <== NOT EXECUTED
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
4b08: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b0c: eb0001ca bl 523c <_API_Mutex_Lock> <== NOT EXECUTED
the_thread = _Thread_Get( id, &location );
4b10: e1a00004 mov r0, r4 <== NOT EXECUTED
4b14: e1a0100d mov r1, sp <== NOT EXECUTED
4b18: eb00077b bl 690c <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
4b1c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
4b20: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
the_thread = _Thread_Get( id, &location );
4b24: e1a04000 mov r4, r0 <== NOT EXECUTED
switch ( location ) {
4b28: 1a00000d bne 4b64 <rtems_task_delete+0x6c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
4b2c: e5900008 ldr r0, [r0, #8] <== NOT EXECUTED
4b30: eb0004ea bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
4b34: e1a01004 mov r1, r4 <== NOT EXECUTED
4b38: eb00069d bl 65b4 <_Thread_Close> <== NOT EXECUTED
4b3c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
4b40: eb0004e6 bl 5ee0 <_Objects_Get_information_id> <== NOT EXECUTED
4b44: e1a01004 mov r1, r4 <== NOT EXECUTED
4b48: eb0004c7 bl 5e6c <_Objects_Free> <== NOT EXECUTED
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
4b4c: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b50: eb0001d5 bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
_Thread_Enable_dispatch();
4b54: eb000763 bl 68e8 <_Thread_Enable_dispatch> <== NOT EXECUTED
4b58: e1a00005 mov r0, r5 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
4b5c: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
4b60: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
4b64: e5960000 ldr r0, [r6] <== NOT EXECUTED
4b68: eb0001cf bl 52ac <_API_Mutex_Unlock> <== NOT EXECUTED
4b6c: e3a00004 mov r0, #4 ; 0x4 <== NOT EXECUTED
4b70: eafffff9 b 4b5c <rtems_task_delete+0x64> <== NOT EXECUTED
000059b8 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59b8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
59bc: e2518000 subs r8, r1, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59c0: e1a06000 mov r6, r0
59c4: e24dd004 sub sp, sp, #4 ; 0x4
59c8: e1a05002 mov r5, r2
59cc: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
59d0: 03a0000a moveq r0, #10 ; 0xa
59d4: 0a000020 beq 5a5c <rtems_timer_fire_after+0xa4>
return RTEMS_INVALID_NUMBER;
if ( !routine )
59d8: e3520000 cmp r2, #0 ; 0x0
59dc: 03a00009 moveq r0, #9 ; 0x9
59e0: 0a00001d beq 5a5c <rtems_timer_fire_after+0xa4>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
59e4: e59f0088 ldr r0, [pc, #136] ; 5a74 <rtems_timer_fire_after+0xbc>
59e8: e1a01006 mov r1, r6
59ec: e1a0200d mov r2, sp
59f0: eb0004f4 bl 6dc8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59f4: e59d3000 ldr r3, [sp]
59f8: e3530000 cmp r3, #0 ; 0x0
59fc: e1a04000 mov r4, r0
5a00: 13a00004 movne r0, #4 ; 0x4
5a04: 1a000014 bne 5a5c <rtems_timer_fire_after+0xa4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
5a08: e284a010 add sl, r4, #16 ; 0x10
5a0c: e1a0000a mov r0, sl
5a10: eb000c31 bl 8adc <_Watchdog_Remove>
_ISR_Disable( level );
5a14: e10f2000 mrs r2, CPSR
5a18: e38230c0 orr r3, r2, #192 ; 0xc0
5a1c: 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 ) {
5a20: e5943018 ldr r3, [r4, #24]
5a24: e3530000 cmp r3, #0 ; 0x0
5a28: 1a00000d bne 5a64 <rtems_timer_fire_after+0xac>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5a2c: e5843018 str r3, [r4, #24]
the_watchdog->routine = routine;
5a30: e584502c str r5, [r4, #44]
the_watchdog->id = id;
5a34: e5846030 str r6, [r4, #48]
the_watchdog->user_data = user_data;
5a38: e5847034 str r7, [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;
5a3c: e5843038 str r3, [r4, #56]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
5a40: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
5a44: e59f002c ldr r0, [pc, #44] ; 5a78 <rtems_timer_fire_after+0xc0>
5a48: e1a0100a mov r1, sl
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
5a4c: e584801c str r8, [r4, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
5a50: eb000bb2 bl 8920 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
5a54: eb0006fc bl 764c <_Thread_Enable_dispatch>
5a58: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5a5c: e28dd004 add sp, sp, #4 ; 0x4
5a60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
5a64: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_Thread_Enable_dispatch();
5a68: eb0006f7 bl 764c <_Thread_Enable_dispatch> <== NOT EXECUTED
5a6c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5a70: eafffff9 b 5a5c <rtems_timer_fire_after+0xa4> <== NOT EXECUTED
000129cc <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
129cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
129d0: e3500000 cmp r0, #0 ; 0x0
129d4: e24dd010 sub sp, sp, #16 ; 0x10
129d8: e1a07001 mov r7, r1
129dc: e1a06002 mov r6, r2
129e0: 1a000002 bne 129f0 <rtems_timer_initiate_server+0x24>
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
129e4: e3a00013 mov r0, #19 ; 0x13
}
return status;
}
129e8: e28dd010 add sp, sp, #16 ; 0x10
129ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
129f0: e59f3144 ldr r3, [pc, #324] ; 12b3c <rtems_timer_initiate_server+0x170>
129f4: e5d32000 ldrb r2, [r3]
129f8: e1500002 cmp r0, r2
129fc: 8a00004a bhi 12b2c <rtems_timer_initiate_server+0x160>
12a00: e1a08000 mov r8, r0 <== NOT EXECUTED
12a04: e59f3134 ldr r3, [pc, #308] ; 12b40 <rtems_timer_initiate_server+0x174>
12a08: e5932000 ldr r2, [r3]
12a0c: e2822001 add r2, r2, #1 ; 0x1
12a10: e5832000 str r2, [r3]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
12a14: e59fa128 ldr sl, [pc, #296] ; 12b44 <rtems_timer_initiate_server+0x178>
12a18: e5da5000 ldrb r5, [sl]
initialized = true;
12a1c: e3a03001 mov r3, #1 ; 0x1
12a20: e5ca3000 strb r3, [sl]
_Thread_Enable_dispatch();
12a24: eb000c02 bl 15a34 <_Thread_Enable_dispatch>
if ( tmpInitialized )
12a28: e3550000 cmp r5, #0 ; 0x0
12a2c: 13a0000e movne r0, #14 ; 0xe
12a30: 1affffec bne 129e8 <rtems_timer_initiate_server+0x1c>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12a34: e59f410c ldr r4, [pc, #268] ; 12b48 <rtems_timer_initiate_server+0x17c>
12a38: e284c004 add ip, r4, #4 ; 0x4
12a3c: e584c000 str ip, [r4]
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
12a40: e386e902 orr lr, r6, #32768 ; 0x8000
12a44: e28dc00c add ip, sp, #12 ; 0xc
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12a48: e5844008 str r4, [r4, #8]
12a4c: e1a01008 mov r1, r8
12a50: e58de000 str lr, [sp]
12a54: e58dc004 str ip, [sp, #4]
12a58: e1a02007 mov r2, r7
12a5c: e59f00e8 ldr r0, [pc, #232] ; 12b4c <rtems_timer_initiate_server+0x180>
12a60: e3a03c01 mov r3, #256 ; 0x100
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12a64: e5845004 str r5, [r4, #4]
12a68: ebfffc60 bl 11bf0 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a6c: e3500000 cmp r0, #0 ; 0x0
initialized = false;
12a70: 15ca5000 strbne r5, [sl]
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a74: 1affffdb bne 129e8 <rtems_timer_initiate_server+0x1c>
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12a78: e59d200c ldr r2, [sp, #12]
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
12a7c: e59fc0cc ldr ip, [pc, #204] ; 12b50 <rtems_timer_initiate_server+0x184>
12a80: e1a03802 lsl r3, r2, #16
12a84: e58d2008 str r2, [sp, #8]
12a88: e1dc21b0 ldrh r2, [ip, #16]
12a8c: e1a01823 lsr r1, r3, #16
12a90: e1520001 cmp r2, r1
12a94: 259c301c ldrcs r3, [ip, #28]
12a98: 27939101 ldrcs r9, [r3, r1, lsl #2]
the_watchdog->routine = routine;
12a9c: e59f30b0 ldr r3, [pc, #176] ; 12b54 <rtems_timer_initiate_server+0x188>
12aa0: 31a09000 movcc r9, r0
12aa4: e5893064 str r3, [r9, #100]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
12aa8: e59fe0a8 ldr lr, [pc, #168] ; 12b58 <rtems_timer_initiate_server+0x18c>
12aac: e59f30a8 ldr r3, [pc, #168] ; 12b5c <rtems_timer_initiate_server+0x190>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ab0: e59f40a8 ldr r4, [pc, #168] ; 12b60 <rtems_timer_initiate_server+0x194>
the_watchdog->id = id;
12ab4: e59f50a8 ldr r5, [pc, #168] ; 12b64 <rtems_timer_initiate_server+0x198>
12ab8: e59d2008 ldr r2, [sp, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12abc: e59f60a4 ldr r6, [pc, #164] ; 12b68 <rtems_timer_initiate_server+0x19c>
12ac0: e583e000 str lr, [r3]
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12ac4: e59fc0a0 ldr ip, [pc, #160] ; 12b6c <rtems_timer_initiate_server+0x1a0>
the_watchdog->routine = routine;
12ac8: e59f3084 ldr r3, [pc, #132] ; 12b54 <rtems_timer_initiate_server+0x188>
the_chain->permanent_null = NULL;
12acc: e3a0b000 mov fp, #0 ; 0x0
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12ad0: e1a00002 mov r0, r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ad4: e2847004 add r7, r4, #4 ; 0x4
12ad8: e2858004 add r8, r5, #4 ; 0x4
the_watchdog->id = id;
12adc: e5892068 str r2, [r9, #104]
the_watchdog->user_data = user_data;
12ae0: e589b06c str fp, [r9, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12ae4: e589b050 str fp, [r9, #80]
12ae8: e59f1080 ldr r1, [pc, #128] ; 12b70 <rtems_timer_initiate_server+0x1a4>
12aec: e1a0200b mov r2, fp
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12af0: e58c9000 str r9, [ip]
12af4: e5847000 str r7, [r4]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12af8: e5844008 str r4, [r4, #8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12afc: e5858000 str r8, [r5]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12b00: e5855008 str r5, [r5, #8]
the_watchdog->routine = routine;
12b04: e586301c str r3, [r6, #28]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
12b08: e586b024 str fp, [r6, #36]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12b0c: e584b004 str fp, [r4, #4]
12b10: e585b004 str fp, [r5, #4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12b14: e586b008 str fp, [r6, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
12b18: e5860020 str r0, [r6, #32]
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12b1c: ebfffd8e bl 1215c <rtems_task_start>
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
12b20: e3500000 cmp r0, #0 ; 0x0
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
12b24: 15cab000 strbne fp, [sl]
12b28: eaffffae b 129e8 <rtems_timer_initiate_server+0x1c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
12b2c: e3700001 cmn r0, #1 ; 0x1
12b30: 03a08000 moveq r8, #0 ; 0x0
12b34: 0affffb2 beq 12a04 <rtems_timer_initiate_server+0x38>
12b38: eaffffa9 b 129e4 <rtems_timer_initiate_server+0x18>
00012714 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
12714: e92d4030 push {r4, r5, lr}
12718: e24dd004 sub sp, sp, #4 ; 0x4
1271c: e1a01000 mov r1, r0
12720: e1a0200d mov r2, sp
12724: e59f00a8 ldr r0, [pc, #168] ; 127d4 <rtems_timer_reset+0xc0>
12728: eb000a7c bl 15120 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1272c: e59d3000 ldr r3, [sp]
12730: e3530000 cmp r3, #0 ; 0x0
12734: e1a04000 mov r4, r0
12738: 13a00004 movne r0, #4 ; 0x4
1273c: 1a00000a bne 1276c <rtems_timer_reset+0x58>
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
12740: e5943038 ldr r3, [r4, #56]
12744: e3530004 cmp r3, #4 ; 0x4
12748: 979ff103 ldrls pc, [pc, r3, lsl #2]
1274c: ea000011 b 12798 <rtems_timer_reset+0x84> <== NOT EXECUTED
12750: 000127b0 .word 0x000127b0 <== NOT EXECUTED
12754: 00012774 .word 0x00012774 <== NOT EXECUTED
12758: 000127a4 .word 0x000127a4 <== NOT EXECUTED
1275c: 000127a4 .word 0x000127a4 <== NOT EXECUTED
12760: 000127a4 .word 0x000127a4 <== NOT EXECUTED
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
12764: eb000cb2 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
12768: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1276c: e28dd004 add sp, sp, #4 ; 0x4
12770: e8bd8030 pop {r4, r5, pc}
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
12774: e59f505c ldr r5, [pc, #92] ; 127d8 <rtems_timer_reset+0xc4><== NOT EXECUTED
12778: e5953000 ldr r3, [r5] <== NOT EXECUTED
1277c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
12780: 0afffff7 beq 12764 <rtems_timer_reset+0x50> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
12784: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12788: eb0012e3 bl 1731c <_Watchdog_Remove> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
1278c: e1a00004 mov r0, r4 <== NOT EXECUTED
12790: e1a0e00f mov lr, pc <== NOT EXECUTED
12794: e595f000 ldr pc, [r5] <== NOT EXECUTED
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
12798: eb000ca5 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
1279c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
127a0: eafffff1 b 1276c <rtems_timer_reset+0x58> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
127a4: eb000ca2 bl 15a34 <_Thread_Enable_dispatch>
127a8: e3a0000b mov r0, #11 ; 0xb
127ac: eaffffee b 1276c <rtems_timer_reset+0x58>
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
127b0: e2844010 add r4, r4, #16 ; 0x10
127b4: e1a00004 mov r0, r4
127b8: eb0012d7 bl 1731c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
127bc: e59f0018 ldr r0, [pc, #24] ; 127dc <rtems_timer_reset+0xc8>
127c0: e1a01004 mov r1, r4
127c4: eb001265 bl 17160 <_Watchdog_Insert>
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
127c8: eb000c99 bl 15a34 <_Thread_Enable_dispatch>
127cc: e3a00000 mov r0, #0 ; 0x0
127d0: eaffffe5 b 1276c <rtems_timer_reset+0x58>
000127e0 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127e0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
127e4: e59fc0d0 ldr ip, [pc, #208] ; 128bc <rtems_timer_server_fire_after+0xdc>
127e8: e59c4000 ldr r4, [ip]
127ec: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127f0: e1a07000 mov r7, r0
127f4: e24dd004 sub sp, sp, #4 ; 0x4
127f8: e1a06001 mov r6, r1
127fc: e1a05002 mov r5, r2
12800: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
12804: 03a0000e moveq r0, #14 ; 0xe
12808: 0a000005 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INCORRECT_STATE;
if ( !routine )
1280c: e3520000 cmp r2, #0 ; 0x0
12810: 03a00009 moveq r0, #9 ; 0x9
12814: 0a000002 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
12818: e3510000 cmp r1, #0 ; 0x0
1281c: 03a0000a moveq r0, #10 ; 0xa
12820: 1a000001 bne 1282c <rtems_timer_server_fire_after+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12824: e28dd004 add sp, sp, #4 ; 0x4
12828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
1282c: e59f008c ldr r0, [pc, #140] ; 128c0 <rtems_timer_server_fire_after+0xe0>
12830: e1a01007 mov r1, r7
12834: e1a0200d mov r2, sp
12838: eb000a38 bl 15120 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1283c: e59d3000 ldr r3, [sp]
12840: e3530000 cmp r3, #0 ; 0x0
12844: e1a04000 mov r4, r0
12848: 13a00004 movne r0, #4 ; 0x4
1284c: 1afffff4 bne 12824 <rtems_timer_server_fire_after+0x44>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12850: e2840010 add r0, r4, #16 ; 0x10
12854: eb0012b0 bl 1731c <_Watchdog_Remove>
_ISR_Disable( level );
12858: e10f1000 mrs r1, CPSR
1285c: e38130c0 orr r3, r1, #192 ; 0xc0
12860: 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 ) {
12864: e5942018 ldr r2, [r4, #24]
12868: e3520000 cmp r2, #0 ; 0x0
1286c: 1a00000e bne 128ac <rtems_timer_server_fire_after+0xcc>
/*
* 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;
12870: e3a03001 mov r3, #1 ; 0x1
12874: e5843038 str r3, [r4, #56]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12878: e5842018 str r2, [r4, #24]
the_watchdog->routine = routine;
1287c: e584502c str r5, [r4, #44]
the_watchdog->id = id;
12880: e5847030 str r7, [r4, #48]
the_watchdog->user_data = user_data;
12884: e5848034 str r8, [r4, #52]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
12888: e584601c str r6, [r4, #28]
_ISR_Enable( level );
1288c: 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 );
12890: e59f302c ldr r3, [pc, #44] ; 128c4 <rtems_timer_server_fire_after+0xe4>
12894: e1a00004 mov r0, r4
12898: e1a0e00f mov lr, pc
1289c: e593f000 ldr pc, [r3]
_Thread_Enable_dispatch();
128a0: eb000c63 bl 15a34 <_Thread_Enable_dispatch>
128a4: e3a00000 mov r0, #0 ; 0x0
128a8: eaffffdd b 12824 <rtems_timer_server_fire_after+0x44>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
128ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Thread_Enable_dispatch();
128b0: eb000c5f bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
128b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
128b8: eaffffd9 b 12824 <rtems_timer_server_fire_after+0x44> <== NOT EXECUTED
000128c8 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128c8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128cc: e59fc0e4 ldr ip, [pc, #228] ; 129b8 <rtems_timer_server_fire_when+0xf0>
128d0: e59c4000 ldr r4, [ip]
128d4: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128d8: e1a06000 mov r6, r0
128dc: e24dd004 sub sp, sp, #4 ; 0x4
128e0: e1a04001 mov r4, r1
128e4: e1a05002 mov r5, r2
128e8: e1a0a003 mov sl, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128ec: 03a0000e moveq r0, #14 ; 0xe
128f0: 0a00000c beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
128f4: e59f30c0 ldr r3, [pc, #192] ; 129bc <rtems_timer_server_fire_when+0xf4>
128f8: e5d32000 ldrb r2, [r3]
128fc: e3520000 cmp r2, #0 ; 0x0
12900: 03a0000b moveq r0, #11 ; 0xb
12904: 0a000007 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_NOT_DEFINED;
if ( !routine )
12908: e3550000 cmp r5, #0 ; 0x0
1290c: 03a00009 moveq r0, #9 ; 0x9
12910: 0a000004 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
12914: e1a00001 mov r0, r1
12918: ebfff458 bl fa80 <_TOD_Validate>
1291c: e3500000 cmp r0, #0 ; 0x0
12920: 1a000002 bne 12930 <rtems_timer_server_fire_when+0x68>
*/
(*_Timer_Server_schedule_operation)( the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
12924: e3a00014 mov r0, #20 ; 0x14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12928: e28dd004 add sp, sp, #4 ; 0x4
1292c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12930: e1a00004 mov r0, r4
12934: ebfff417 bl f998 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch )
12938: e59f9080 ldr r9, [pc, #128] ; 129c0 <rtems_timer_server_fire_when+0xf8>
1293c: e5993000 ldr r3, [r9]
12940: e1500003 cmp r0, r3
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12944: e1a08000 mov r8, r0
if ( seconds <= _TOD_Seconds_since_epoch )
12948: 9afffff5 bls 12924 <rtems_timer_server_fire_when+0x5c>
1294c: e59f0070 ldr r0, [pc, #112] ; 129c4 <rtems_timer_server_fire_when+0xfc>
12950: e1a01006 mov r1, r6
12954: e1a0200d mov r2, sp
12958: eb0009f0 bl 15120 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1295c: e59d7000 ldr r7, [sp]
12960: e3570000 cmp r7, #0 ; 0x0
12964: e1a04000 mov r4, r0
12968: 13a00004 movne r0, #4 ; 0x4
1296c: 1affffed bne 12928 <rtems_timer_server_fire_when+0x60>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12970: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12974: eb001268 bl 1731c <_Watchdog_Remove> <== NOT EXECUTED
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
12978: e5846030 str r6, [r4, #48] <== NOT EXECUTED
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
1297c: e5993000 ldr r3, [r9] <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
12980: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12984: e0633008 rsb r3, r3, r8 <== NOT EXECUTED
/*
* _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 );
12988: e1a00004 mov r0, r4 <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
1298c: e5842038 str r2, [r4, #56] <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12990: e584301c str r3, [r4, #28] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
12994: e584502c str r5, [r4, #44] <== NOT EXECUTED
/*
* _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 );
12998: e59f3028 ldr r3, [pc, #40] ; 129c8 <rtems_timer_server_fire_when+0x100><== NOT EXECUTED
the_watchdog->id = id;
the_watchdog->user_data = user_data;
1299c: e584a034 str sl, [r4, #52] <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
129a0: e5847018 str r7, [r4, #24] <== NOT EXECUTED
129a4: e1a0e00f mov lr, pc <== NOT EXECUTED
129a8: e593f000 ldr pc, [r3] <== NOT EXECUTED
_Thread_Enable_dispatch();
129ac: eb000c20 bl 15a34 <_Thread_Enable_dispatch> <== NOT EXECUTED
129b0: e1a00007 mov r0, r7 <== NOT EXECUTED
129b4: eaffffdb b 12928 <rtems_timer_server_fire_when+0x60> <== NOT EXECUTED
00005664 <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
5664: e92d4010 push {r4, lr}
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
5668: e2514000 subs r4, r1, #0 ; 0x0
566c: 0a000001 beq 5678 <rtems_workspace_allocate+0x14>
return false;
if ( !bytes )
5670: e3500000 cmp r0, #0 ; 0x0
5674: 1a000001 bne 5680 <rtems_workspace_allocate+0x1c>
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
return false;
*pointer = ptr;
return true;
5678: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
}
567c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
5680: e1a01000 mov r1, r0
5684: e59f0014 ldr r0, [pc, #20] ; 56a0 <rtems_workspace_allocate+0x3c>
5688: eb000570 bl 6c50 <_Protected_heap_Allocate>
if (!ptr)
568c: e3500000 cmp r0, #0 ; 0x0
return false;
*pointer = ptr;
5690: 15840000 strne r0, [r4]
5694: 13a00001 movne r0, #1 ; 0x1
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
if (!ptr)
5698: 18bd8010 popne {r4, pc}
569c: eafffff5 b 5678 <rtems_workspace_allocate+0x14> <== NOT EXECUTED
00005654 <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
5654: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
5658: e59f0000 ldr r0, [pc, #0] ; 5660 <rtems_workspace_free+0xc><== NOT EXECUTED
565c: ea00058a b 6c8c <_Protected_heap_Free> <== NOT EXECUTED
00006e04 <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
6e04: e92d4010 push {r4, lr}
6e08: e24dd004 sub sp, sp, #4 ; 0x4
6e0c: e5901000 ldr r1, [r0]
6e10: e1a0200d mov r2, sp
6e14: e59f0058 ldr r0, [pc, #88] ; 6e74 <sem_destroy+0x70>
6e18: eb0008c6 bl 9138 <_Objects_Get>
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
6e1c: e59d3000 ldr r3, [sp]
6e20: e3530000 cmp r3, #0 ; 0x0
6e24: 0a000005 beq 6e40 <sem_destroy+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
6e28: eb00229d bl f8a4 <__errno>
6e2c: e3a03016 mov r3, #22 ; 0x16
6e30: e5803000 str r3, [r0]
6e34: e3e00000 mvn r0, #0 ; 0x0
}
6e38: e28dd004 add sp, sp, #4 ; 0x4
6e3c: e8bd8010 pop {r4, pc}
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
6e40: e5d04014 ldrb r4, [r0, #20]
6e44: e3540000 cmp r4, #0 ; 0x0
6e48: 1a000003 bne 6e5c <sem_destroy+0x58>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
6e4c: eb001a11 bl d698 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
6e50: eb000ad9 bl 99bc <_Thread_Enable_dispatch>
6e54: e1a00004 mov r0, r4
6e58: eafffff6 b 6e38 <sem_destroy+0x34>
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
_Thread_Enable_dispatch();
6e5c: eb000ad6 bl 99bc <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
6e60: eb00228f bl f8a4 <__errno> <== NOT EXECUTED
6e64: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
6e68: e5803000 str r3, [r0] <== NOT EXECUTED
6e6c: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
6e70: eafffff0 b 6e38 <sem_destroy+0x34> <== NOT EXECUTED
00006ed4 <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6ed4: e92d4010 push {r4, lr}
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
6ed8: e2504000 subs r4, r0, #0 ; 0x0
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
6edc: e24dd004 sub sp, sp, #4 ; 0x4
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
6ee0: 0a000008 beq 6f08 <sem_init+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support(
6ee4: e1a0300d mov r3, sp
6ee8: e3a00000 mov r0, #0 ; 0x0
6eec: eb0019a7 bl d590 <_POSIX_Semaphore_Create_support>
pshared,
value,
&the_semaphore
);
if ( status != -1 )
6ef0: e3700001 cmn r0, #1 ; 0x1
*sem = the_semaphore->Object.id;
6ef4: 159d3000 ldrne r3, [sp]
6ef8: 15932008 ldrne r2, [r3, #8]
6efc: 15842000 strne r2, [r4]
return status;
}
6f00: e28dd004 add sp, sp, #4 ; 0x4
6f04: e8bd8010 pop {r4, pc}
{
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
rtems_set_errno_and_return_minus_one( EINVAL );
6f08: eb002265 bl f8a4 <__errno> <== NOT EXECUTED
6f0c: e3a03016 mov r3, #22 ; 0x16 <== NOT EXECUTED
6f10: e5803000 str r3, [r0] <== NOT EXECUTED
6f14: e3e00000 mvn r0, #0 ; 0x0 <== NOT EXECUTED
6f18: eafffff8 b 6f00 <sem_init+0x2c> <== NOT EXECUTED
00007078 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
7078: e92d4010 push {r4, lr}
707c: e24dd004 sub sp, sp, #4 ; 0x4
7080: e1a04000 mov r4, r0
* 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 );
7084: e1a00001 mov r0, r1
7088: e1a0100d mov r1, sp
708c: eb0016db bl cc00 <_POSIX_Absolute_timeout_to_ticks>
switch ( status ) {
7090: e3500002 cmp r0, #2 ; 0x2
7094: 9a000005 bls 70b0 <sem_timedwait+0x38>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
7098: e1a00004 mov r0, r4
709c: e3a01001 mov r1, #1 ; 0x1
70a0: e59d2000 ldr r2, [sp]
70a4: eb0019b0 bl d76c <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
70a8: e28dd004 add sp, sp, #4 ; 0x4
70ac: e8bd8010 pop {r4, pc}
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
70b0: e1a00004 mov r0, r4 <== NOT EXECUTED
70b4: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
70b8: e59d2000 ldr r2, [sp] <== NOT EXECUTED
70bc: eb0019aa bl d76c <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
70c0: eafffff8 b 70a8 <sem_timedwait+0x30> <== NOT EXECUTED
00006d78 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
6d78: e92d4010 push {r4, lr}
6d7c: e1a04001 mov r4, r1
int status;
status = sigtimedwait( set, NULL, NULL );
6d80: e3a01000 mov r1, #0 ; 0x0
6d84: e1a02001 mov r2, r1
6d88: ebffff8c bl 6bc0 <sigtimedwait>
if ( status != -1 ) {
6d8c: e3700001 cmn r0, #1 ; 0x1
6d90: 0a000004 beq 6da8 <sigwait+0x30>
if ( sig )
6d94: e3540000 cmp r4, #0 ; 0x0
*sig = status;
6d98: 15840000 strne r0, [r4]
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
6d9c: 01a00004 moveq r0, r4
*sig = status;
6da0: 13a00000 movne r0, #0 ; 0x0
6da4: e8bd8010 pop {r4, pc}
return 0;
}
return errno;
6da8: eb002105 bl f1c4 <__errno> <== NOT EXECUTED
6dac: e5900000 ldr r0, [r0] <== NOT EXECUTED
}
6db0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00005b24 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5b24: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
5b28: e2524000 subs r4, r2, #0 ; 0x0
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
5b2c: e24dd018 sub sp, sp, #24 ; 0x18
5b30: e1a05000 mov r5, r0
5b34: e1a0c001 mov ip, r1
5b38: e1a06003 mov r6, r3
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
5b3c: 0a00003b beq 5c30 <timer_settime+0x10c>
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 ) ||
5b40: e3e02331 mvn r2, #-1006632960 ; 0xc4000000
5b44: e2422865 sub r2, r2, #6619136 ; 0x650000
5b48: e594300c ldr r3, [r4, #12]
5b4c: e2422c36 sub r2, r2, #13824 ; 0x3600
5b50: e1530002 cmp r3, r2
5b54: 8a000035 bhi 5c30 <timer_settime+0x10c>
5b58: e5943004 ldr r3, [r4, #4]
5b5c: e1530002 cmp r3, r2
5b60: 8a000032 bhi 5c30 <timer_settime+0x10c>
5b64: e3530000 cmp r3, #0 ; 0x0
5b68: ba000030 blt 5c30 <timer_settime+0x10c>
( 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 ) {
5b6c: e3510004 cmp r1, #4 ; 0x4
5b70: 13510000 cmpne r1, #0 ; 0x0
5b74: 1a00002d bne 5c30 <timer_settime+0x10c>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
5b78: e894000f ldm r4, {r0, r1, r2, r3}
5b7c: e28d7004 add r7, sp, #4 ; 0x4
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
5b80: e35c0004 cmp ip, #4 ; 0x4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
5b84: e887000f stm r7, {r0, r1, r2, r3}
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
5b88: 0a00003c beq 5c80 <timer_settime+0x15c>
5b8c: e1a01005 mov r1, r5
5b90: e59f0120 ldr r0, [pc, #288] ; 5cb8 <timer_settime+0x194>
5b94: e28d2014 add r2, sp, #20 ; 0x14
5b98: eb000860 bl 7d20 <_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 ) {
5b9c: e59d3014 ldr r3, [sp, #20]
5ba0: e3530000 cmp r3, #0 ; 0x0
5ba4: e1a05000 mov r5, r0
5ba8: 1a000020 bne 5c30 <timer_settime+0x10c>
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 ) {
5bac: e59d300c ldr r3, [sp, #12]
5bb0: e3530000 cmp r3, #0 ; 0x0
5bb4: 1a000002 bne 5bc4 <timer_settime+0xa0>
5bb8: e59d3010 ldr r3, [sp, #16]
5bbc: e3530000 cmp r3, #0 ; 0x0
5bc0: 0a000020 beq 5c48 <timer_settime+0x124>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
5bc4: e1a00004 mov r0, r4
5bc8: eb000e71 bl 9594 <_Timespec_To_ticks>
5bcc: e5850064 str r0, [r5, #100]
initial_period = _Timespec_To_ticks( &normalize.it_value );
5bd0: e28d000c add r0, sp, #12 ; 0xc
5bd4: eb000e6e bl 9594 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
5bd8: e5952008 ldr r2, [r5, #8]
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 );
5bdc: e1a01000 mov r1, r0
activated = _POSIX_Timer_Insert_helper(
5be0: e59f30d4 ldr r3, [pc, #212] ; 5cbc <timer_settime+0x198>
5be4: e2850010 add r0, r5, #16 ; 0x10
5be8: e58d5000 str r5, [sp]
5bec: eb001975 bl c1c8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
5bf0: e2504000 subs r4, r0, #0 ; 0x0
5bf4: 0a00002c beq 5cac <timer_settime+0x188>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
5bf8: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5bfc: 1285c054 addne ip, r5, #84 ; 0x54
5c00: 189c000f ldmne ip, {r0, r1, r2, r3}
5c04: 1886000f stmne r6, {r0, r1, r2, r3}
ptimer->timer_data = normalize;
5c08: e897000f ldm r7, {r0, r1, r2, r3}
5c0c: 0285c054 addeq ip, r5, #84 ; 0x54
5c10: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5c14: e3a03003 mov r3, #3 ; 0x3
_TOD_Get( &ptimer->time );
5c18: e285006c add r0, r5, #108 ; 0x6c
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
5c1c: e5c5303c strb r3, [r5, #60]
_TOD_Get( &ptimer->time );
5c20: eb0005ff bl 7424 <_TOD_Get>
_Thread_Enable_dispatch();
5c24: eb000a5e bl 85a4 <_Thread_Enable_dispatch>
5c28: e3a00000 mov r0, #0 ; 0x0
5c2c: ea000003 b 5c40 <timer_settime+0x11c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
5c30: eb002108 bl e058 <__errno>
5c34: e3a03016 mov r3, #22 ; 0x16
5c38: e5803000 str r3, [r0]
5c3c: e3e00000 mvn r0, #0 ; 0x0
}
5c40: e28dd018 add sp, sp, #24 ; 0x18
5c44: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
5c48: e2800010 add r0, r0, #16 ; 0x10
5c4c: eb000f93 bl 9aa0 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
5c50: e3560000 cmp r6, #0 ; 0x0
*ovalue = ptimer->timer_data;
5c54: 1285c054 addne ip, r5, #84 ; 0x54
5c58: 189c000f ldmne ip, {r0, r1, r2, r3}
5c5c: 1886000f stmne r6, {r0, r1, r2, r3}
/* The new data are set */
ptimer->timer_data = normalize;
5c60: e897000f ldm r7, {r0, r1, r2, r3}
5c64: 0285c054 addeq ip, r5, #84 ; 0x54
5c68: e88c000f stm ip, {r0, r1, r2, r3}
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
5c6c: e3a03004 mov r3, #4 ; 0x4
5c70: e5c5303c strb r3, [r5, #60]
/* Returns with success */
_Thread_Enable_dispatch();
5c74: eb000a4a bl 85a4 <_Thread_Enable_dispatch>
5c78: e3a00000 mov r0, #0 ; 0x0
5c7c: eaffffef b 5c40 <timer_settime+0x11c>
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
5c80: e28d800c add r8, sp, #12 ; 0xc
5c84: e59f0034 ldr r0, [pc, #52] ; 5cc0 <timer_settime+0x19c>
5c88: e1a01008 mov r1, r8
5c8c: eb000e1a bl 94fc <_Timespec_Greater_than>
5c90: e3500000 cmp r0, #0 ; 0x0
5c94: 1affffe5 bne 5c30 <timer_settime+0x10c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
5c98: e1a01008 mov r1, r8
5c9c: e59f001c ldr r0, [pc, #28] ; 5cc0 <timer_settime+0x19c>
5ca0: e1a02008 mov r2, r8
5ca4: eb000e21 bl 9530 <_Timespec_Subtract>
5ca8: eaffffb7 b 5b8c <timer_settime+0x68>
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
5cac: eb000a3c bl 85a4 <_Thread_Enable_dispatch> <== NOT EXECUTED
5cb0: e1a00004 mov r0, r4 <== NOT EXECUTED
5cb4: eaffffe1 b 5c40 <timer_settime+0x11c> <== NOT EXECUTED
0000447c <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
447c: e92d4070 push {r4, r5, r6, lr}
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
4480: e59f6108 ldr r6, [pc, #264] ; 4590 <ualarm+0x114>
4484: e596201c ldr r2, [r6, #28]
4488: e3520000 cmp r2, #0 ; 0x0
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
448c: e24dd008 sub sp, sp, #8 ; 0x8
4490: e1a04000 mov r4, r0
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
4494: 0a000036 beq 4574 <ualarm+0xf8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
4498: e1a00006 mov r0, r6 <== NOT EXECUTED
449c: eb000fd5 bl 83f8 <_Watchdog_Remove> <== NOT EXECUTED
44a0: e2400002 sub r0, r0, #2 ; 0x2 <== NOT EXECUTED
44a4: e3500001 cmp r0, #1 ; 0x1 <== NOT EXECUTED
44a8: 83a05000 movhi r5, #0 ; 0x0 <== NOT EXECUTED
44ac: 9a00001b bls 4520 <ualarm+0xa4> <== 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 ) {
44b0: e3540000 cmp r4, #0 ; 0x0
44b4: 0a000016 beq 4514 <ualarm+0x98>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
44b8: e59f30d4 ldr r3, [pc, #212] ; 4594 <ualarm+0x118>
44bc: e0812493 umull r2, r1, r3, r4
44c0: e1a01921 lsr r1, r1, #18
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
44c4: e1a02401 lsl r2, r1, #8
44c8: e0422181 sub r2, r2, r1, lsl #3
44cc: e1a03302 lsl r3, r2, #6
44d0: e0623003 rsb r3, r2, r3
44d4: e0833001 add r3, r3, r1
44d8: e0443303 sub r3, r4, r3, lsl #6
44dc: e1a02383 lsl r2, r3, #7
44e0: e0422103 sub r2, r2, r3, lsl #2
44e4: e0822003 add r2, r2, r3
44e8: e1a02182 lsl r2, r2, #3
ticks = _Timespec_To_ticks( &tp );
44ec: e1a0000d mov r0, sp
* 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;
44f0: e88d0006 stm sp, {r1, r2}
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
44f4: eb000e5c bl 7e6c <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
44f8: e1a0000d mov r0, sp
44fc: eb000e5a bl 7e6c <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4500: e59f1088 ldr r1, [pc, #136] ; 4590 <ualarm+0x114>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4504: e586000c str r0, [r6, #12]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4508: e59f0088 ldr r0, [pc, #136] ; 4598 <ualarm+0x11c>
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 );
450c: e1a0400d mov r4, sp
4510: eb000f49 bl 823c <_Watchdog_Insert>
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
4514: e1a00005 mov r0, r5
4518: e28dd008 add sp, sp, #8 ; 0x8
451c: e8bd8070 pop {r4, r5, r6, pc}
* 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);
4520: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
4524: e2860014 add r0, r6, #20 ; 0x14 <== NOT EXECUTED
4528: e8900005 ldm r0, {r0, r2} <== NOT EXECUTED
452c: e0800003 add r0, r0, r3 <== NOT EXECUTED
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
4530: e0620000 rsb r0, r2, r0 <== NOT EXECUTED
4534: e1a0100d mov r1, sp <== NOT EXECUTED
4538: eb000e1e bl 7db8 <_Timespec_From_ticks> <== NOT EXECUTED
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
453c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
4540: e59f3054 ldr r3, [pc, #84] ; 459c <ualarm+0x120> <== NOT EXECUTED
4544: e0cc2093 smull r2, ip, r3, r0 <== 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;
4548: e59d1000 ldr r1, [sp] <== NOT EXECUTED
454c: e1a02401 lsl r2, r1, #8 <== NOT EXECUTED
4550: e0422181 sub r2, r2, r1, lsl #3 <== NOT EXECUTED
4554: e1a03302 lsl r3, r2, #6 <== NOT EXECUTED
4558: e0623003 rsb r3, r2, r3 <== NOT EXECUTED
455c: e0833001 add r3, r3, r1 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
4560: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
4564: e060034c rsb r0, r0, ip, asr #6 <== 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;
4568: e1a03303 lsl r3, r3, #6 <== NOT EXECUTED
remaining += tp.tv_nsec / 1000;
456c: e0805003 add r5, r0, r3 <== NOT EXECUTED
4570: eaffffce b 44b0 <ualarm+0x34> <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4574: e59f3024 ldr r3, [pc, #36] ; 45a0 <ualarm+0x124>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4578: e5862008 str r2, [r6, #8]
the_watchdog->routine = routine;
457c: e586301c str r3, [r6, #28]
the_watchdog->id = id;
4580: e5862020 str r2, [r6, #32]
the_watchdog->user_data = user_data;
4584: e5862024 str r2, [r6, #36]
4588: e1a05002 mov r5, r2
458c: eaffffc7 b 44b0 <ualarm+0x34>